From 0b6f7785cf017630341a68dfc82e46ba6bbc10fd Mon Sep 17 00:00:00 2001 From: Code Migration Date: Sun, 18 Oct 2026 13:25:32 +0800 Subject: [PATCH] chore: seed migration objects batch 13 --- server/internal/logic/admin/post.go | 202 + server/internal/logic/admin/role.go | 356 + server/internal/logic/admin/site.go | 338 + server/internal/logic/common/upload.go | 104 + server/internal/logic/common/wechat.go | 156 + server/internal/logic/hook/access_log.go | 56 + server/internal/logic/hook/init.go | 31 + server/internal/logic/hook/last_active.go | 94 + server/internal/logic/logic.go | 17 + .../internal/logic/middleware/admin_auth.go | 53 + server/internal/logic/middleware/api_auth.go | 40 + server/internal/logic/middleware/home_auth.go | 18 + server/internal/logic/middleware/init.go | 206 + .../logic/middleware/limit_blacklist.go | 21 + .../logic/middleware/limit_develop.go | 43 + .../internal/logic/middleware/pre_filter.go | 66 + server/internal/logic/middleware/response.go | 124 + .../logic/middleware/weboscket_auth.go | 37 + server/internal/logic/pay/create.go | 147 + server/internal/logic/pay/notify.go | 98 + server/internal/logic/pay/pay.go | 150 + server/internal/logic/pay/refund.go | 219 + server/internal/logic/sys/addons.go | 127 + server/internal/logic/sys/addons_config.go | 143 + server/internal/logic/sys/attachment.go | 128 + server/internal/logic/sys/blacklist.go | 167 + server/internal/logic/sys/config.go | 332 + server/internal/logic/sys/cron.go | 244 + server/internal/logic/sys/cron_group.go | 161 + server/internal/logic/sys/curd_demo.go | 240 + server/internal/logic/sys/dict_data.go | 178 + server/internal/logic/sys/dict_type.go | 204 + server/internal/logic/sys/ems_log.go | 430 + server/internal/logic/sys/gen_codes.go | 351 + server/internal/logic/sys/log.go | 452 ++ server/internal/logic/sys/login_log.go | 183 + server/internal/logic/sys/normal_tree_demo.go | 176 + server/internal/logic/sys/option_tree_demo.go | 177 + server/internal/logic/sys/provinces.go | 257 + server/internal/logic/sys/serve_license.go | 193 + server/internal/logic/sys/serve_log.go | 138 + server/internal/logic/sys/sms_log.go | 291 + server/internal/logic/sys/test_category.go | 167 + server/internal/logic/tcpclient/auth.go | 118 + .../internal/logic/tcpclient/auth_handle.go | 54 + server/internal/logic/tcpclient/client.go | 6 + server/internal/logic/tcpclient/cron.go | 102 + .../internal/logic/tcpclient/cron_handle.go | 43 + .../logic/tcpclient/cron_interceptor.go | 18 + .../internal/logic/tcpserver/auth_handle.go | 80 + .../internal/logic/tcpserver/cron_handle.go | 117 + .../logic/tcpserver/example_handle.go | 54 + server/internal/logic/tcpserver/server.go | 74 + .../internal/logic/tcpserver/server_handle.go | 167 + .../logic/tcpserver/server_interceptor.go | 75 + server/internal/logic/view/view.go | 131 + server/internal/logic/view/view_buildin.go | 54 + server/internal/model/.gitkeep | 0 server/internal/model/config.go | 188 + server/internal/model/config_load.go | 115 + server/internal/model/context.go | 37 + server/internal/model/dict.go | 17 + server/internal/model/do/.gitkeep | 0 .../model/do/addon_hgexample_table.go | 53 + .../model/do/addon_hgexample_tenant_order.go | 26 + server/internal/model/do/admin_cash.go | 25 + server/internal/model/do/admin_credits_log.go | 30 + server/internal/model/do/admin_dept.go | 29 + server/internal/model/do/admin_member.go | 44 + server/internal/model/do/admin_member_post.go | 16 + server/internal/model/do/admin_member_role.go | 16 + server/internal/model/do/admin_menu.go | 41 + server/internal/model/do/admin_notice.go | 30 + server/internal/model/do/admin_notice_read.go | 21 + server/internal/model/do/admin_oauth.go | 30 + server/internal/model/do/admin_order.go | 27 + server/internal/model/do/admin_post.go | 23 + server/internal/model/do/admin_role.go | 29 + server/internal/model/do/admin_role_casbin.go | 22 + server/internal/model/do/admin_role_menu.go | 16 + server/internal/model/do/pay_log.go | 46 + server/internal/model/do/pay_refund.go | 28 + server/internal/model/do/sys_addons_config.go | 29 + .../internal/model/do/sys_addons_install.go | 21 + server/internal/model/do/sys_attachment.go | 32 + server/internal/model/do/sys_blacklist.go | 21 + server/internal/model/do/sys_config.go | 28 + server/internal/model/do/sys_cron.go | 28 + server/internal/model/do/sys_cron_group.go | 24 + server/internal/model/do/sys_dict_data.go | 27 + server/internal/model/do/sys_dict_type.go | 24 + server/internal/model/do/sys_ems_log.go | 25 + server/internal/model/do/sys_gen_codes.go | 30 + server/internal/model/do/sys_gen_curd_demo.go | 32 + server/internal/model/do/sys_gen_tree_demo.go | 29 + server/internal/model/do/sys_log.go | 39 + server/internal/model/do/sys_login_log.go | 30 + server/internal/model/do/sys_provinces.go | 27 + server/internal/model/do/sys_serve_license.go | 33 + server/internal/model/do/sys_serve_log.go | 26 + server/internal/model/do/sys_sms_log.go | 24 + server/internal/model/do/test_category.go | 25 + server/internal/model/entity/.gitkeep | 0 .../model/entity/addon_hgexample_table.go | 51 + .../entity/addon_hgexample_tenant_order.go | 24 + server/internal/model/entity/admin_cash.go | 23 + .../model/entity/admin_credits_log.go | 28 + server/internal/model/entity/admin_dept.go | 27 + server/internal/model/entity/admin_member.go | 42 + .../model/entity/admin_member_post.go | 11 + .../model/entity/admin_member_role.go | 11 + server/internal/model/entity/admin_menu.go | 39 + server/internal/model/entity/admin_notice.go | 28 + .../model/entity/admin_notice_read.go | 19 + server/internal/model/entity/admin_oauth.go | 28 + server/internal/model/entity/admin_order.go | 25 + server/internal/model/entity/admin_post.go | 21 + server/internal/model/entity/admin_role.go | 27 + .../model/entity/admin_role_casbin.go | 17 + .../internal/model/entity/admin_role_menu.go | 11 + server/internal/model/entity/pay_log.go | 44 + server/internal/model/entity/pay_refund.go | 26 + .../model/entity/sys_addons_config.go | 27 + .../model/entity/sys_addons_install.go | 19 + .../internal/model/entity/sys_attachment.go | 30 + server/internal/model/entity/sys_blacklist.go | 19 + server/internal/model/entity/sys_config.go | 26 + server/internal/model/entity/sys_cron.go | 26 + .../internal/model/entity/sys_cron_group.go | 22 + server/internal/model/entity/sys_dict_data.go | 25 + server/internal/model/entity/sys_dict_type.go | 22 + server/internal/model/entity/sys_ems_log.go | 23 + server/internal/model/entity/sys_gen_codes.go | 28 + .../model/entity/sys_gen_curd_demo.go | 30 + .../model/entity/sys_gen_tree_demo.go | 27 + server/internal/model/entity/sys_log.go | 37 + server/internal/model/entity/sys_login_log.go | 28 + server/internal/model/entity/sys_provinces.go | 25 + .../model/entity/sys_serve_license.go | 31 + server/internal/model/entity/sys_serve_log.go | 24 + server/internal/model/entity/sys_sms_log.go | 22 + server/internal/model/entity/test_category.go | 23 + server/internal/model/gen_codes.go | 41 + server/internal/model/input/adminin/cash.go | 49 + .../model/input/adminin/credits_log.go | 154 + server/internal/model/input/adminin/dept.go | 175 + server/internal/model/input/adminin/member.go | 338 + server/internal/model/input/adminin/menu.go | 147 + server/internal/model/input/adminin/notice.go | 139 + server/internal/model/input/adminin/order.go | 156 + server/internal/model/input/adminin/post.go | 102 + server/internal/model/input/adminin/role.go | 154 + server/internal/model/input/adminin/site.go | 69 + .../internal/model/input/commonin/wechat.go | 22 + server/internal/model/input/form/base.go | 30 + server/internal/model/input/form/page.go | 68 + server/internal/model/input/form/select.go | 30 + server/internal/model/input/form/sorter.go | 20 + server/internal/model/input/payin/general.go | 60 + server/internal/model/input/payin/pay.go | 198 + server/internal/model/input/payin/refund.go | 59 + server/internal/model/input/servmsgin/auth.go | 16 + .../internal/model/input/servmsgin/example.go | 14 + server/internal/model/input/sysin/addons.go | 64 + .../model/input/sysin/addons_config.go | 26 + .../internal/model/input/sysin/attachment.go | 106 + .../internal/model/input/sysin/blacklist.go | 81 + server/internal/model/input/sysin/config.go | 25 + server/internal/model/input/sysin/cron.go | 75 + .../internal/model/input/sysin/cron_group.go | 134 + .../internal/model/input/sysin/curd_demo.go | 201 + .../internal/model/input/sysin/dict_data.go | 92 + .../internal/model/input/sysin/dict_type.go | 76 + server/internal/model/input/sysin/ems_log.go | 72 + .../internal/model/input/sysin/gen_codes.go | 235 + server/internal/model/input/sysin/log.go | 58 + .../internal/model/input/sysin/login_log.go | 79 + .../model/input/sysin/normal_tree_demo.go | 145 + .../model/input/sysin/option_tree_demo.go | 144 + .../internal/model/input/sysin/provinces.go | 182 + .../model/input/sysin/serve_license.go | 190 + .../internal/model/input/sysin/serve_log.go | 69 + server/internal/model/input/sysin/sms_log.go | 84 + .../model/input/sysin/test_category.go | 143 + .../internal/model/input/websocketin/send.go | 16 + server/internal/model/monitor.go | 37 + server/internal/model/response.go | 16 + server/internal/model/tree.go | 30 + server/internal/model/view.go | 41 + server/internal/queues/login_log.go | 38 + server/internal/queues/serve_log.go | 45 + server/internal/queues/sys_log.go | 38 + server/internal/router/admin.go | 73 + server/internal/router/api.go | 30 + server/internal/router/genrouter/curd_demo.go | 13 + server/internal/router/genrouter/init.go | 32 + .../router/genrouter/normal_tree_demo.go | 13 + .../router/genrouter/option_tree_demo.go | 13 + .../router/genrouter/test_category.go | 13 + server/internal/router/home.go | 33 + server/internal/router/websocket.go | 46 + server/internal/service/.gitkeep | 0 server/internal/service/admin.go | 404 + server/internal/service/common.go | 64 + server/internal/service/hook.go | 32 + server/internal/service/middleware.go | 63 + server/internal/service/pay.go | 78 + server/internal/service/sys.go | 661 ++ server/internal/service/tcpclient.go | 77 + server/internal/service/tcpserver.go | 59 + server/internal/service/view.go | 41 + server/internal/websocket/client.go | 199 + server/internal/websocket/client_manager.go | 335 + server/internal/websocket/init.go | 56 + server/internal/websocket/model.go | 43 + server/internal/websocket/router.go | 64 + server/main.go | 25 + server/manifest/config/casbin.conf | 15 + server/manifest/config/config.example.yaml | 303 + .../deploy/kustomize/base/deployment.yaml | 21 + .../deploy/kustomize/base/kustomization.yaml | 8 + .../deploy/kustomize/base/service.yaml | 12 + .../kustomize/overlays/develop/configmap.yaml | 14 + .../overlays/develop/deployment.yaml | 10 + .../overlays/develop/kustomization.yaml | 14 + server/manifest/docker/Dockerfile | 23 + server/manifest/docker/docker.sh | 8 + server/manifest/docker/entrypoint.sh | 5 + server/manifest/i18n/en.json | 5 + server/manifest/i18n/zh-CN.json | 3 + server/manifest/i18n/zh-TW.json | 5 + server/resource/addons/.gitkeep | 0 .../resource/addons/hgexample/public/default | 1 + .../addons/hgexample/template/home/index.html | 32 + .../generate/default/addon/README.MD.template | 39 + .../addon/api/admin/config/config.go.template | 30 + .../addon/api/admin/index/index.go.template | 21 + .../addon/api/api/index/index.go.template | 21 + .../addon/api/home/index/index.go.template | 21 + .../api/websocket/index/index.go.template | 21 + .../default/addon/consts/consts.go.template | 9 + .../controller/admin/sys/config.go.template | 33 + .../controller/admin/sys/index.go.template | 30 + .../addon/controller/api/index.go.template | 31 + .../addon/controller/home/index.go.template | 34 + .../controller/websocket/index.go.template | 30 + .../default/addon/crons/crons.go.template | 9 + .../default/addon/global/global.go.template | 12 + .../default/addon/global/init.go.template | 22 + .../generate/default/addon/logic/.gitkeep | 0 .../default/addon/logic/logic.go.template | 9 + .../addon/logic/sys/config.go.template | 59 + .../default/addon/logic/sys/index.go.template | 35 + .../generate/default/addon/main.go.template | 96 + .../default/addon/model/config.go.template | 11 + .../model/input/sysin/config.go.template | 24 + .../addon/model/input/sysin/index.go.template | 27 + .../default/addon/queues/queues.go.template | 9 + .../default/addon/resource/public/.gitkeep | 0 .../addon/resource/public/default.template | 1 + .../addon/resource/template/home/index.html | 30 + .../default/addon/router/admin.go.template | 34 + .../default/addon/router/api.go.template | 32 + .../addon/router/genrouter/init.go.template | 34 + .../default/addon/router/home.go.template | 25 + .../addon/router/websocket.go.template | 39 + .../generate/default/addon/service/.gitkeep | 0 .../default/addon/service/sys.go.template | 50 + .../generate/default/curd/api.go.template | 101 + .../default/curd/controller.go.template | 118 + .../generate/default/curd/input.go.template | 167 + .../generate/default/curd/logic.go.template | 256 + .../generate/default/curd/router.go.template | 14 + .../generate/default/curd/source.sql.template | 74 + .../default/curd/source_pgsql.sql.template | 84 + .../generate/default/curd/web.api.ts.template | 84 + .../default/curd/web.edit.vue.template | 127 + .../default/curd/web.index.vue.template | 528 ++ .../default/curd/web.model.ts.template | 52 + .../default/curd/web.view.vue.template | 63 + server/resource/i18n/.gitkeep | 0 server/resource/public/.gitignore | 3 + server/resource/public/favicon.ico | Bin 0 -> 8175 bytes server/resource/public/html/.gitkeep | 0 server/resource/public/resource/css/.gitkeep | 0 .../resource/home/js/jquery-3.6.0.min.js | 2 + .../resource/public/resource/image/.gitkeep | 0 server/resource/public/resource/js/.gitkeep | 0 server/resource/template/.gitkeep | 0 server/resource/template/email/code.html | 217 + server/resource/template/email/resetPwd.html | 301 + server/resource/template/email/text.html | 12 + server/resource/template/error/default.html | 94 + server/resource/template/home/index.html | 29 + server/storage/cert/.gitkeep | 0 server/storage/cert/pay/.gitkeep | 0 server/storage/cert/ssl/.gitkeep | 0 server/storage/data/.gitkeep | 0 server/storage/data/generate/.gitkeep | 0 server/storage/data/generate/addons/.gitkeep | 0 .../generate/addons/tenant_order_menu.sql | 62 + .../storage/data/generate/curd_demo_menu.sql | 71 + .../data/generate/normal_tree_demo_menu.sql | 71 + .../data/generate/option_tree_demo_menu.sql | 71 + .../data/generate/test_category_menu.sql | 62 + server/storage/data/hotgo-pg.sql | 7066 +++++++++++++++++ 306 files changed, 29023 insertions(+) create mode 100644 server/internal/logic/admin/post.go create mode 100644 server/internal/logic/admin/role.go create mode 100644 server/internal/logic/admin/site.go create mode 100644 server/internal/logic/common/upload.go create mode 100644 server/internal/logic/common/wechat.go create mode 100644 server/internal/logic/hook/access_log.go create mode 100644 server/internal/logic/hook/init.go create mode 100644 server/internal/logic/hook/last_active.go create mode 100644 server/internal/logic/logic.go create mode 100644 server/internal/logic/middleware/admin_auth.go create mode 100644 server/internal/logic/middleware/api_auth.go create mode 100644 server/internal/logic/middleware/home_auth.go create mode 100644 server/internal/logic/middleware/init.go create mode 100644 server/internal/logic/middleware/limit_blacklist.go create mode 100644 server/internal/logic/middleware/limit_develop.go create mode 100644 server/internal/logic/middleware/pre_filter.go create mode 100644 server/internal/logic/middleware/response.go create mode 100644 server/internal/logic/middleware/weboscket_auth.go create mode 100644 server/internal/logic/pay/create.go create mode 100644 server/internal/logic/pay/notify.go create mode 100644 server/internal/logic/pay/pay.go create mode 100644 server/internal/logic/pay/refund.go create mode 100644 server/internal/logic/sys/addons.go create mode 100644 server/internal/logic/sys/addons_config.go create mode 100644 server/internal/logic/sys/attachment.go create mode 100644 server/internal/logic/sys/blacklist.go create mode 100644 server/internal/logic/sys/config.go create mode 100644 server/internal/logic/sys/cron.go create mode 100644 server/internal/logic/sys/cron_group.go create mode 100644 server/internal/logic/sys/curd_demo.go create mode 100644 server/internal/logic/sys/dict_data.go create mode 100644 server/internal/logic/sys/dict_type.go create mode 100644 server/internal/logic/sys/ems_log.go create mode 100644 server/internal/logic/sys/gen_codes.go create mode 100644 server/internal/logic/sys/log.go create mode 100644 server/internal/logic/sys/login_log.go create mode 100644 server/internal/logic/sys/normal_tree_demo.go create mode 100644 server/internal/logic/sys/option_tree_demo.go create mode 100644 server/internal/logic/sys/provinces.go create mode 100644 server/internal/logic/sys/serve_license.go create mode 100644 server/internal/logic/sys/serve_log.go create mode 100644 server/internal/logic/sys/sms_log.go create mode 100644 server/internal/logic/sys/test_category.go create mode 100644 server/internal/logic/tcpclient/auth.go create mode 100644 server/internal/logic/tcpclient/auth_handle.go create mode 100644 server/internal/logic/tcpclient/client.go create mode 100644 server/internal/logic/tcpclient/cron.go create mode 100644 server/internal/logic/tcpclient/cron_handle.go create mode 100644 server/internal/logic/tcpclient/cron_interceptor.go create mode 100644 server/internal/logic/tcpserver/auth_handle.go create mode 100644 server/internal/logic/tcpserver/cron_handle.go create mode 100644 server/internal/logic/tcpserver/example_handle.go create mode 100644 server/internal/logic/tcpserver/server.go create mode 100644 server/internal/logic/tcpserver/server_handle.go create mode 100644 server/internal/logic/tcpserver/server_interceptor.go create mode 100644 server/internal/logic/view/view.go create mode 100644 server/internal/logic/view/view_buildin.go create mode 100644 server/internal/model/.gitkeep create mode 100644 server/internal/model/config.go create mode 100644 server/internal/model/config_load.go create mode 100644 server/internal/model/context.go create mode 100644 server/internal/model/dict.go create mode 100644 server/internal/model/do/.gitkeep create mode 100755 server/internal/model/do/addon_hgexample_table.go create mode 100755 server/internal/model/do/addon_hgexample_tenant_order.go create mode 100755 server/internal/model/do/admin_cash.go create mode 100755 server/internal/model/do/admin_credits_log.go create mode 100755 server/internal/model/do/admin_dept.go create mode 100755 server/internal/model/do/admin_member.go create mode 100755 server/internal/model/do/admin_member_post.go create mode 100755 server/internal/model/do/admin_member_role.go create mode 100755 server/internal/model/do/admin_menu.go create mode 100755 server/internal/model/do/admin_notice.go create mode 100755 server/internal/model/do/admin_notice_read.go create mode 100755 server/internal/model/do/admin_oauth.go create mode 100755 server/internal/model/do/admin_order.go create mode 100755 server/internal/model/do/admin_post.go create mode 100755 server/internal/model/do/admin_role.go create mode 100755 server/internal/model/do/admin_role_casbin.go create mode 100755 server/internal/model/do/admin_role_menu.go create mode 100755 server/internal/model/do/pay_log.go create mode 100755 server/internal/model/do/pay_refund.go create mode 100755 server/internal/model/do/sys_addons_config.go create mode 100644 server/internal/model/do/sys_addons_install.go create mode 100755 server/internal/model/do/sys_attachment.go create mode 100755 server/internal/model/do/sys_blacklist.go create mode 100755 server/internal/model/do/sys_config.go create mode 100755 server/internal/model/do/sys_cron.go create mode 100755 server/internal/model/do/sys_cron_group.go create mode 100755 server/internal/model/do/sys_dict_data.go create mode 100755 server/internal/model/do/sys_dict_type.go create mode 100755 server/internal/model/do/sys_ems_log.go create mode 100755 server/internal/model/do/sys_gen_codes.go create mode 100755 server/internal/model/do/sys_gen_curd_demo.go create mode 100755 server/internal/model/do/sys_gen_tree_demo.go create mode 100755 server/internal/model/do/sys_log.go create mode 100755 server/internal/model/do/sys_login_log.go create mode 100755 server/internal/model/do/sys_provinces.go create mode 100755 server/internal/model/do/sys_serve_license.go create mode 100755 server/internal/model/do/sys_serve_log.go create mode 100755 server/internal/model/do/sys_sms_log.go create mode 100755 server/internal/model/do/test_category.go create mode 100644 server/internal/model/entity/.gitkeep create mode 100755 server/internal/model/entity/addon_hgexample_table.go create mode 100755 server/internal/model/entity/addon_hgexample_tenant_order.go create mode 100755 server/internal/model/entity/admin_cash.go create mode 100755 server/internal/model/entity/admin_credits_log.go create mode 100755 server/internal/model/entity/admin_dept.go create mode 100755 server/internal/model/entity/admin_member.go create mode 100755 server/internal/model/entity/admin_member_post.go create mode 100755 server/internal/model/entity/admin_member_role.go create mode 100755 server/internal/model/entity/admin_menu.go create mode 100755 server/internal/model/entity/admin_notice.go create mode 100755 server/internal/model/entity/admin_notice_read.go create mode 100755 server/internal/model/entity/admin_oauth.go create mode 100755 server/internal/model/entity/admin_order.go create mode 100755 server/internal/model/entity/admin_post.go create mode 100755 server/internal/model/entity/admin_role.go create mode 100755 server/internal/model/entity/admin_role_casbin.go create mode 100755 server/internal/model/entity/admin_role_menu.go create mode 100755 server/internal/model/entity/pay_log.go create mode 100755 server/internal/model/entity/pay_refund.go create mode 100755 server/internal/model/entity/sys_addons_config.go create mode 100644 server/internal/model/entity/sys_addons_install.go create mode 100755 server/internal/model/entity/sys_attachment.go create mode 100755 server/internal/model/entity/sys_blacklist.go create mode 100755 server/internal/model/entity/sys_config.go create mode 100755 server/internal/model/entity/sys_cron.go create mode 100755 server/internal/model/entity/sys_cron_group.go create mode 100755 server/internal/model/entity/sys_dict_data.go create mode 100755 server/internal/model/entity/sys_dict_type.go create mode 100755 server/internal/model/entity/sys_ems_log.go create mode 100755 server/internal/model/entity/sys_gen_codes.go create mode 100755 server/internal/model/entity/sys_gen_curd_demo.go create mode 100755 server/internal/model/entity/sys_gen_tree_demo.go create mode 100755 server/internal/model/entity/sys_log.go create mode 100755 server/internal/model/entity/sys_login_log.go create mode 100755 server/internal/model/entity/sys_provinces.go create mode 100755 server/internal/model/entity/sys_serve_license.go create mode 100755 server/internal/model/entity/sys_serve_log.go create mode 100755 server/internal/model/entity/sys_sms_log.go create mode 100755 server/internal/model/entity/test_category.go create mode 100644 server/internal/model/gen_codes.go create mode 100644 server/internal/model/input/adminin/cash.go create mode 100644 server/internal/model/input/adminin/credits_log.go create mode 100644 server/internal/model/input/adminin/dept.go create mode 100644 server/internal/model/input/adminin/member.go create mode 100644 server/internal/model/input/adminin/menu.go create mode 100644 server/internal/model/input/adminin/notice.go create mode 100644 server/internal/model/input/adminin/order.go create mode 100644 server/internal/model/input/adminin/post.go create mode 100644 server/internal/model/input/adminin/role.go create mode 100644 server/internal/model/input/adminin/site.go create mode 100644 server/internal/model/input/commonin/wechat.go create mode 100644 server/internal/model/input/form/base.go create mode 100644 server/internal/model/input/form/page.go create mode 100644 server/internal/model/input/form/select.go create mode 100644 server/internal/model/input/form/sorter.go create mode 100644 server/internal/model/input/payin/general.go create mode 100644 server/internal/model/input/payin/pay.go create mode 100644 server/internal/model/input/payin/refund.go create mode 100644 server/internal/model/input/servmsgin/auth.go create mode 100644 server/internal/model/input/servmsgin/example.go create mode 100644 server/internal/model/input/sysin/addons.go create mode 100644 server/internal/model/input/sysin/addons_config.go create mode 100644 server/internal/model/input/sysin/attachment.go create mode 100644 server/internal/model/input/sysin/blacklist.go create mode 100644 server/internal/model/input/sysin/config.go create mode 100644 server/internal/model/input/sysin/cron.go create mode 100644 server/internal/model/input/sysin/cron_group.go create mode 100644 server/internal/model/input/sysin/curd_demo.go create mode 100644 server/internal/model/input/sysin/dict_data.go create mode 100644 server/internal/model/input/sysin/dict_type.go create mode 100644 server/internal/model/input/sysin/ems_log.go create mode 100644 server/internal/model/input/sysin/gen_codes.go create mode 100644 server/internal/model/input/sysin/log.go create mode 100644 server/internal/model/input/sysin/login_log.go create mode 100644 server/internal/model/input/sysin/normal_tree_demo.go create mode 100644 server/internal/model/input/sysin/option_tree_demo.go create mode 100644 server/internal/model/input/sysin/provinces.go create mode 100644 server/internal/model/input/sysin/serve_license.go create mode 100644 server/internal/model/input/sysin/serve_log.go create mode 100644 server/internal/model/input/sysin/sms_log.go create mode 100644 server/internal/model/input/sysin/test_category.go create mode 100644 server/internal/model/input/websocketin/send.go create mode 100644 server/internal/model/monitor.go create mode 100644 server/internal/model/response.go create mode 100644 server/internal/model/tree.go create mode 100644 server/internal/model/view.go create mode 100644 server/internal/queues/login_log.go create mode 100644 server/internal/queues/serve_log.go create mode 100644 server/internal/queues/sys_log.go create mode 100644 server/internal/router/admin.go create mode 100644 server/internal/router/api.go create mode 100644 server/internal/router/genrouter/curd_demo.go create mode 100644 server/internal/router/genrouter/init.go create mode 100644 server/internal/router/genrouter/normal_tree_demo.go create mode 100644 server/internal/router/genrouter/option_tree_demo.go create mode 100644 server/internal/router/genrouter/test_category.go create mode 100644 server/internal/router/home.go create mode 100644 server/internal/router/websocket.go create mode 100644 server/internal/service/.gitkeep create mode 100644 server/internal/service/admin.go create mode 100644 server/internal/service/common.go create mode 100644 server/internal/service/hook.go create mode 100644 server/internal/service/middleware.go create mode 100644 server/internal/service/pay.go create mode 100644 server/internal/service/sys.go create mode 100644 server/internal/service/tcpclient.go create mode 100644 server/internal/service/tcpserver.go create mode 100644 server/internal/service/view.go create mode 100644 server/internal/websocket/client.go create mode 100644 server/internal/websocket/client_manager.go create mode 100644 server/internal/websocket/init.go create mode 100644 server/internal/websocket/model.go create mode 100644 server/internal/websocket/router.go create mode 100644 server/main.go create mode 100644 server/manifest/config/casbin.conf create mode 100644 server/manifest/config/config.example.yaml create mode 100644 server/manifest/deploy/kustomize/base/deployment.yaml create mode 100644 server/manifest/deploy/kustomize/base/kustomization.yaml create mode 100644 server/manifest/deploy/kustomize/base/service.yaml create mode 100644 server/manifest/deploy/kustomize/overlays/develop/configmap.yaml create mode 100644 server/manifest/deploy/kustomize/overlays/develop/deployment.yaml create mode 100644 server/manifest/deploy/kustomize/overlays/develop/kustomization.yaml create mode 100644 server/manifest/docker/Dockerfile create mode 100644 server/manifest/docker/docker.sh create mode 100644 server/manifest/docker/entrypoint.sh create mode 100644 server/manifest/i18n/en.json create mode 100644 server/manifest/i18n/zh-CN.json create mode 100644 server/manifest/i18n/zh-TW.json create mode 100644 server/resource/addons/.gitkeep create mode 100644 server/resource/addons/hgexample/public/default create mode 100644 server/resource/addons/hgexample/template/home/index.html create mode 100644 server/resource/generate/default/addon/README.MD.template create mode 100644 server/resource/generate/default/addon/api/admin/config/config.go.template create mode 100644 server/resource/generate/default/addon/api/admin/index/index.go.template create mode 100644 server/resource/generate/default/addon/api/api/index/index.go.template create mode 100644 server/resource/generate/default/addon/api/home/index/index.go.template create mode 100644 server/resource/generate/default/addon/api/websocket/index/index.go.template create mode 100644 server/resource/generate/default/addon/consts/consts.go.template create mode 100644 server/resource/generate/default/addon/controller/admin/sys/config.go.template create mode 100644 server/resource/generate/default/addon/controller/admin/sys/index.go.template create mode 100644 server/resource/generate/default/addon/controller/api/index.go.template create mode 100644 server/resource/generate/default/addon/controller/home/index.go.template create mode 100644 server/resource/generate/default/addon/controller/websocket/index.go.template create mode 100644 server/resource/generate/default/addon/crons/crons.go.template create mode 100644 server/resource/generate/default/addon/global/global.go.template create mode 100644 server/resource/generate/default/addon/global/init.go.template create mode 100644 server/resource/generate/default/addon/logic/.gitkeep create mode 100644 server/resource/generate/default/addon/logic/logic.go.template create mode 100644 server/resource/generate/default/addon/logic/sys/config.go.template create mode 100644 server/resource/generate/default/addon/logic/sys/index.go.template create mode 100644 server/resource/generate/default/addon/main.go.template create mode 100644 server/resource/generate/default/addon/model/config.go.template create mode 100644 server/resource/generate/default/addon/model/input/sysin/config.go.template create mode 100644 server/resource/generate/default/addon/model/input/sysin/index.go.template create mode 100644 server/resource/generate/default/addon/queues/queues.go.template create mode 100644 server/resource/generate/default/addon/resource/public/.gitkeep create mode 100644 server/resource/generate/default/addon/resource/public/default.template create mode 100644 server/resource/generate/default/addon/resource/template/home/index.html create mode 100644 server/resource/generate/default/addon/router/admin.go.template create mode 100644 server/resource/generate/default/addon/router/api.go.template create mode 100644 server/resource/generate/default/addon/router/genrouter/init.go.template create mode 100644 server/resource/generate/default/addon/router/home.go.template create mode 100644 server/resource/generate/default/addon/router/websocket.go.template create mode 100644 server/resource/generate/default/addon/service/.gitkeep create mode 100644 server/resource/generate/default/addon/service/sys.go.template create mode 100644 server/resource/generate/default/curd/api.go.template create mode 100644 server/resource/generate/default/curd/controller.go.template create mode 100644 server/resource/generate/default/curd/input.go.template create mode 100644 server/resource/generate/default/curd/logic.go.template create mode 100644 server/resource/generate/default/curd/router.go.template create mode 100644 server/resource/generate/default/curd/source.sql.template create mode 100644 server/resource/generate/default/curd/source_pgsql.sql.template create mode 100644 server/resource/generate/default/curd/web.api.ts.template create mode 100644 server/resource/generate/default/curd/web.edit.vue.template create mode 100644 server/resource/generate/default/curd/web.index.vue.template create mode 100644 server/resource/generate/default/curd/web.model.ts.template create mode 100644 server/resource/generate/default/curd/web.view.vue.template create mode 100644 server/resource/i18n/.gitkeep create mode 100644 server/resource/public/.gitignore create mode 100644 server/resource/public/favicon.ico create mode 100644 server/resource/public/html/.gitkeep create mode 100644 server/resource/public/resource/css/.gitkeep create mode 100644 server/resource/public/resource/home/js/jquery-3.6.0.min.js create mode 100644 server/resource/public/resource/image/.gitkeep create mode 100644 server/resource/public/resource/js/.gitkeep create mode 100644 server/resource/template/.gitkeep create mode 100644 server/resource/template/email/code.html create mode 100644 server/resource/template/email/resetPwd.html create mode 100644 server/resource/template/email/text.html create mode 100644 server/resource/template/error/default.html create mode 100644 server/resource/template/home/index.html create mode 100644 server/storage/cert/.gitkeep create mode 100644 server/storage/cert/pay/.gitkeep create mode 100644 server/storage/cert/ssl/.gitkeep create mode 100644 server/storage/data/.gitkeep create mode 100644 server/storage/data/generate/.gitkeep create mode 100644 server/storage/data/generate/addons/.gitkeep create mode 100644 server/storage/data/generate/addons/tenant_order_menu.sql create mode 100644 server/storage/data/generate/curd_demo_menu.sql create mode 100644 server/storage/data/generate/normal_tree_demo_menu.sql create mode 100644 server/storage/data/generate/option_tree_demo_menu.sql create mode 100644 server/storage/data/generate/test_category_menu.sql create mode 100644 server/storage/data/hotgo-pg.sql diff --git a/server/internal/logic/admin/post.go b/server/internal/logic/admin/post.go new file mode 100644 index 0000000..67ae7d2 --- /dev/null +++ b/server/internal/logic/admin/post.go @@ -0,0 +1,202 @@ +// Package admin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package admin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/dict" + "hotgo/internal/library/hgorm" + "hotgo/internal/model" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/adminin" + "hotgo/internal/model/input/form" + "hotgo/internal/service" +) + +type sAdminPost struct{} + +func NewAdminPost() *sAdminPost { + return &sAdminPost{} +} + +func init() { + service.RegisterAdminPost(NewAdminPost()) + dict.RegisterFunc("adminPostOption", "岗位选项", service.AdminPost().Option) +} + +// Delete 删除 +func (s *sAdminPost) Delete(ctx context.Context, in *adminin.PostDeleteInp) (err error) { + exist, err := dao.AdminMemberPost.Ctx(ctx).Where(dao.AdminMemberPost.Columns().PostId, in.Id).One() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + + if !exist.IsEmpty() { + return gerror.New("请先解除该岗位下所有已关联用户关联关系!") + } + + _, err = dao.AdminPost.Ctx(ctx).WherePri(in.Id).Delete() + return +} + +// VerifyUnique 验证部门唯一属性 +func (s *sAdminPost) VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error) { + if in.Where == nil { + return + } + + cols := dao.AdminPost.Columns() + msgMap := g.MapStrStr{ + cols.Name: "岗位名称已存在,请换一个", + cols.Code: "岗位编码已存在,请换一个", + } + + for k, v := range in.Where { + if v == "" { + continue + } + message, ok := msgMap[k] + if !ok { + err = gerror.Newf("字段 [ %v ] 未配置唯一属性验证", k) + return + } + if err = hgorm.IsUnique(ctx, &dao.AdminPost, g.Map{k: v}, message, in.Id); err != nil { + return + } + } + return +} + +// Edit 修改/新增 +func (s *sAdminPost) Edit(ctx context.Context, in *adminin.PostEditInp) (err error) { + // 验证唯一性 + err = s.VerifyUnique(ctx, &adminin.VerifyUniqueInp{ + Id: in.Id, + Where: g.Map{ + dao.AdminPost.Columns().Name: in.Name, + dao.AdminPost.Columns().Code: in.Code, + }, + }) + if err != nil { + return + } + + // 修改 + if in.Id > 0 { + _, err = dao.AdminPost.Ctx(ctx).WherePri(in.Id).Data(in).Update() + return + } + + // 新增 + _, err = dao.AdminPost.Ctx(ctx).Data(in).OmitEmptyData().Insert() + return +} + +// MaxSort 最大排序 +func (s *sAdminPost) MaxSort(ctx context.Context, in *adminin.PostMaxSortInp) (res *adminin.PostMaxSortModel, err error) { + if in.Id > 0 { + if err = dao.AdminPost.Ctx(ctx).WherePri(in.Id).OrderDesc(dao.AdminPost.Columns().Sort).Scan(&res); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + } + + if res == nil { + res = new(adminin.PostMaxSortModel) + } + res.Sort = form.DefaultMaxSort(res.Sort) + return +} + +// View 获取指定岗位信息 +func (s *sAdminPost) View(ctx context.Context, in *adminin.PostViewInp) (res *adminin.PostViewModel, err error) { + err = dao.AdminPost.Ctx(ctx).WherePri(in.Id).Scan(&res) + return +} + +// List 获取列表 +func (s *sAdminPost) List(ctx context.Context, in *adminin.PostListInp) (list []*adminin.PostListModel, totalCount int, err error) { + mod := dao.AdminPost.Ctx(ctx) + cols := dao.AdminPost.Columns() + + // 访问路径 + if in.Name != "" { + mod = mod.WhereLike(cols.Name, "%"+in.Name+"%") + } + + // 模块 + if in.Code != "" { + mod = mod.Where(cols.Code, in.Code) + } + + // 请求方式 + if in.Status > 0 { + mod = mod.Where(cols.Status, in.Status) + } + + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween(cols.CreatedAt, in.CreatedAt[0], in.CreatedAt[1]) + } + + totalCount, err = mod.Count() + if err != nil { + err = gerror.Wrap(err, "获取岗位列表失败!") + return + } + + if totalCount == 0 { + return + } + + err = mod.Page(in.Page, in.PerPage).OrderAsc(cols.Sort).Scan(&list) + return +} + +// Option 岗位选项 +func (s *sAdminPost) Option(ctx context.Context) (opts []*model.Option, err error) { + var list []*entity.AdminPost + if err = dao.AdminPost.Ctx(ctx).OrderAsc(dao.AdminPost.Columns().Sort).Scan(&list); err != nil { + return nil, err + } + + if len(list) == 0 { + opts = make([]*model.Option, 0) + return + } + + for _, v := range list { + opts = append(opts, dict.GenHashOption(v.Id, v.Name)) + } + return +} + +// GetMemberByStartName 获取指定用户的第一岗位 +func (s *sAdminPost) GetMemberByStartName(ctx context.Context, memberId int64) (name string, err error) { + // 默认取第一岗位 + postId, err := dao.AdminMemberPost.Ctx(ctx).Fields(dao.AdminMemberPost.Columns().PostId).Where(dao.AdminMemberPost.Columns().MemberId, memberId).Limit(1).Value() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + val, err := dao.AdminPost.Ctx(ctx).Fields(dao.AdminPost.Columns().Name).WherePri(postId.Int()).OrderDesc(dao.AdminPost.Columns().Id).Value() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + return val.String(), nil +} + +// Status 更新状态 +func (s *sAdminPost) Status(ctx context.Context, in *adminin.PostStatusInp) (err error) { + _, err = dao.AdminPost.Ctx(ctx).WherePri(in.Id).Data(dao.AdminPost.Columns().Status, in.Status).Update() + return +} diff --git a/server/internal/logic/admin/role.go b/server/internal/logic/admin/role.go new file mode 100644 index 0000000..8dd1511 --- /dev/null +++ b/server/internal/logic/admin/role.go @@ -0,0 +1,356 @@ +// Package admin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2025 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package admin + +import ( + "context" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/casbin" + "hotgo/internal/library/contexts" + "hotgo/internal/library/hgorm" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/adminin" + "hotgo/internal/model/input/form" + "hotgo/internal/service" + "hotgo/utility/convert" + "hotgo/utility/tree" + "hotgo/utility/validate" + "sort" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" +) + +type sAdminRole struct{} + +func NewAdminRole() *sAdminRole { + return &sAdminRole{} +} + +func init() { + service.RegisterAdminRole(NewAdminRole()) +} + +// Verify 验证权限 +func (s *sAdminRole) Verify(ctx context.Context, path, method string) bool { + var ( + user = contexts.Get(ctx).User + err error + ) + + if user == nil { + g.Log().Info(ctx, "admin Verify user = nil") + return false + } + + if service.AdminMember().VerifySuperId(ctx, user.Id) { + return true + } + + ok, err := casbin.Enforcer.Enforce(user.RoleKey, path, method) + if err != nil { + g.Log().Infof(ctx, "admin Verify Enforce err:%+v", err) + return false + } + return ok +} + +// List 获取列表 +func (s *sAdminRole) List(ctx context.Context, in *adminin.RoleListInp) (res *adminin.RoleListModel, totalCount int, err error) { + var ( + mod = dao.AdminRole.Ctx(ctx) + models []*entity.AdminRole + pid int64 = 0 + ) + + // 非超管只获取下级角色 + if !service.AdminMember().VerifySuperId(ctx, contexts.GetUserId(ctx)) { + pid = contexts.GetRoleId(ctx) + mod = mod.WhereLike(dao.AdminRole.Columns().Tree, "%"+tree.GetIdLabel(pid)+"%") + } + + totalCount, err = mod.Count() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if err = mod.Page(in.Page, in.PerPage).Order("sort asc,id asc").Scan(&models); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + res = new(adminin.RoleListModel) + res.List = s.treeList(pid, models) + return +} + +// GetName 获取指定角色的名称 +func (s *sAdminRole) GetName(ctx context.Context, id int64) (name string, err error) { + r, err := dao.AdminRole.Ctx(ctx).Fields(dao.AdminRole.Columns().Name).WherePri(id).OrderDesc(dao.AdminRole.Columns().Id).Value() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + return r.String(), nil +} + +// GetMemberList 获取指定用户的岗位列表 +func (s *sAdminRole) GetMemberList(ctx context.Context, id int64) (list []*adminin.RoleListModel, err error) { + if err = dao.AdminRole.Ctx(ctx).WherePri(id).OrderDesc(dao.AdminRole.Columns().Id).Scan(&list); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + } + return +} + +// GetPermissions 更改角色菜单权限 +func (s *sAdminRole) GetPermissions(ctx context.Context, in *adminin.GetPermissionsInp) (res *adminin.GetPermissionsModel, err error) { + values, err := dao.AdminRoleMenu.Ctx(ctx).Fields(dao.AdminRoleMenu.Columns().MenuId).Where(dao.AdminRoleMenu.Columns().RoleId, in.RoleId).Array() + if err != nil { + return + } + + if len(values) == 0 { + return + } + + res = new(adminin.GetPermissionsModel) + for i := 0; i < len(values); i++ { + res.MenuIds = append(res.MenuIds, values[i].Int64()) + } + return +} + +// UpdatePermissions 更改角色菜单权限 +func (s *sAdminRole) UpdatePermissions(ctx context.Context, in *adminin.UpdatePermissionsInp) (err error) { + err = dao.AdminRoleMenu.Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { + if _, err = dao.AdminRoleMenu.Ctx(ctx).Where("role_id", in.RoleId).Delete(); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if in.MenuIds = convert.UniqueSlice(in.MenuIds); len(in.MenuIds) == 0 { + return + } + + list := make(g.List, 0, len(in.MenuIds)) + for _, v := range in.MenuIds { + list = append(list, g.Map{ + "role_id": in.RoleId, + "menu_id": v, + }) + } + + if _, err = dao.AdminRoleMenu.Ctx(ctx).Data(list).OmitEmptyData().Insert(); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + return + }) + + if err != nil { + return + } + return casbin.Refresh(ctx) +} + +func (s *sAdminRole) Edit(ctx context.Context, in *adminin.RoleEditInp) (err error) { + if err = hgorm.IsUnique(ctx, &dao.AdminRole, g.Map{dao.AdminRole.Columns().Name: in.Name}, "名称已存在", in.Id); err != nil { + return + } + + if err = hgorm.IsUnique(ctx, &dao.AdminRole, g.Map{dao.AdminRole.Columns().Key: in.Key}, "编码已存在", in.Id); err != nil { + return + } + + if in.Pid, in.Level, in.Tree, err = hgorm.GenSubTree(ctx, &dao.AdminRole, in.Pid); err != nil { + return + } + + // 修改 + if in.Id > 0 { + err = dao.AdminRole.Transaction(ctx, func(ctx context.Context, tx gdb.TX) error { + // 更新数据 + _, err = dao.AdminRole.Ctx(ctx).Fields(adminin.RoleUpdateFields{}).WherePri(in.Id).Data(in).Update() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + + // 如果当前角色有子级,更新子级tree关系树 + return updateRoleChildrenTree(ctx, in.Id, in.Level, in.Tree) + }) + return + } + + // 新增 + if _, err = dao.AdminRole.Ctx(ctx).Fields(adminin.RoleInsertFields{}).Data(in).OmitEmptyData().Insert(); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + return +} + +func updateRoleChildrenTree(ctx context.Context, _id int64, _level int, _tree string) (err error) { + var list []*entity.AdminRole + if err = dao.AdminRole.Ctx(ctx).Where("pid", _id).Scan(&list); err != nil { + return + } + for _, child := range list { + child.Level = _level + 1 + child.Tree = tree.GenLabel(_tree, child.Pid) + + if _, err = dao.AdminRole.Ctx(ctx).Where("id", child.Id).Data("level", child.Level, "tree", child.Tree).Update(); err != nil { + return + } + + if err = updateRoleChildrenTree(ctx, child.Id, child.Level, child.Tree); err != nil { + return + } + } + return +} + +func (s *sAdminRole) Delete(ctx context.Context, in *adminin.RoleDeleteInp) (err error) { + var models *entity.AdminRole + if err = dao.AdminRole.Ctx(ctx).Where("id", in.Id).Scan(&models); err != nil { + return + } + + if models == nil { + return gerror.New("数据不存在或已删除!") + } + + if models.Key == consts.SuperRoleKey { + return gerror.New("超管角色禁止删除!") + } + + exist, err := dao.AdminRole.Ctx(ctx).Where("pid", models.Id).Exist() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if exist { + return gerror.New("请先删除该角色下得所有子级!") + } + + exist, err = dao.AdminMember.Ctx(ctx).Where("role_id", models.Id).Exist() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if exist { + return gerror.New("请先删除该角色下得所有用户账号!") + } + + if _, err = dao.AdminRole.Ctx(ctx).Where("id", in.Id).Delete(); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + } + return +} + +func (s *sAdminRole) DataScopeSelect() (res form.Selects) { + for k, v := range consts.RoleDataNameMap { + res = append(res, &form.Select{ + Value: k, + Name: v, + Label: v, + }) + } + sort.Sort(res) + return res +} + +func (s *sAdminRole) DataScopeEdit(ctx context.Context, in *adminin.DataScopeEditInp) (err error) { + var models *entity.AdminRole + if err = dao.AdminRole.Ctx(ctx).Where("id", in.Id).Scan(&models); err != nil { + return + } + + if models == nil { + return gerror.New("角色不存在") + } + + if models.Key == consts.SuperRoleKey { + return gerror.New("超管角色拥有全部权限,无需修改!") + } + + if in.DataScope == consts.RoleDataDeptCustom && len(convert.UniqueSlice(in.CustomDept)) == 0 { + return gerror.New("自定义权限必须配置自定义部门!") + } + + models.DataScope = in.DataScope + models.CustomDept = gjson.New(convert.UniqueSlice(in.CustomDept)) + + _, err = dao.AdminRole.Ctx(ctx). + Fields(dao.AdminRole.Columns().DataScope, dao.AdminRole.Columns().CustomDept). + Where("id", in.Id). + Data(models). + Update() + return +} + +// treeList 角色树列表 +func (s *sAdminRole) treeList(pid int64, nodes []*entity.AdminRole) (list []*adminin.RoleTree) { + list = make([]*adminin.RoleTree, 0) + for _, v := range nodes { + if v.Pid == pid { + item := new(adminin.RoleTree) + item.AdminRole = *v + item.Label = v.Name + item.Value = v.Id + + child := s.treeList(v.Id, nodes) + if len(child) > 0 { + item.Children = child + } + list = append(list, item) + } + } + return +} + +// VerifyRoleId 验证角色ID +func (s *sAdminRole) VerifyRoleId(ctx context.Context, id int64) (err error) { + mb := contexts.GetUser(ctx) + if mb == nil { + err = gerror.New("用户信息获取失败!") + return + } + + ids, err := s.GetSubRoleIds(ctx, mb.RoleId, service.AdminMember().VerifySuperId(ctx, mb.Id)) + if err != nil { + err = gerror.New("验证角色信息失败!") + return + } + + if !validate.InSlice(ids, id) { + err = gerror.New("角色ID是无效的") + return + } + return +} + +// GetSubRoleIds 获取所有下级角色ID +func (s *sAdminRole) GetSubRoleIds(ctx context.Context, roleId int64, isSuper bool) (ids []int64, err error) { + mod := dao.AdminRole.Ctx(ctx).Fields(dao.AdminRole.Columns().Id) + if !isSuper { + mod = mod.WhereNot(dao.AdminRole.Columns().Id, roleId).WhereLike(dao.AdminRole.Columns().Tree, "%"+tree.GetIdLabel(roleId)+"%") + } + + columns, err := mod.Array() + if err != nil { + return nil, err + } + + ids = g.NewVar(columns).Int64s() + return +} diff --git a/server/internal/logic/admin/site.go b/server/internal/logic/admin/site.go new file mode 100644 index 0000000..0409e1c --- /dev/null +++ b/server/internal/logic/admin/site.go @@ -0,0 +1,338 @@ +// Package admin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package admin + +import ( + "context" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/contexts" + "hotgo/internal/library/token" + "hotgo/internal/model" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/adminin" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/simple" + + "github.com/gogf/gf/v2/crypto/gmd5" + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/util/grand" +) + +type sAdminSite struct{} + +func NewAdminSite() *sAdminSite { + return &sAdminSite{} +} + +func init() { + service.RegisterAdminSite(NewAdminSite()) +} + +// Register 账号注册 +func (s *sAdminSite) Register(ctx context.Context, in *adminin.RegisterInp) (err error) { + config, err := service.SysConfig().GetLogin(ctx) + if err != nil { + return + } + + if config.ForceInvite == 1 && in.InviteCode == "" { + err = gerror.New("请填写邀请码") + return + } + + var data adminin.MemberAddInp + + // 默认上级 + data.Pid = 1 + + // 存在邀请人 + if in.InviteCode != "" { + pmb, err := service.AdminMember().GetIdByCode(ctx, &adminin.GetIdByCodeInp{Code: in.InviteCode}) + if err != nil { + return err + } + + if pmb == nil { + err = gerror.New("邀请人信息不存在") + return err + } + + data.Pid = pmb.Id + } + + if config.RegisterSwitch != 1 { + err = gerror.New("管理员未开放注册") + return + } + + if config.RoleId < 1 { + err = gerror.New("管理员未配置默认角色") + return + } + + if config.DeptId < 1 { + err = gerror.New("管理员未配置默认部门") + return + } + + // 验证唯一性 + err = service.AdminMember().VerifyUnique(ctx, &adminin.VerifyUniqueInp{ + Where: g.Map{ + dao.AdminMember.Columns().Username: in.Username, + dao.AdminMember.Columns().Mobile: in.Mobile, + }, + }) + if err != nil { + return + } + + // 验证短信验证码 + err = service.SysSmsLog().VerifyCode(ctx, &sysin.VerifyCodeInp{ + Event: consts.SmsTemplateRegister, + Mobile: in.Mobile, + Code: in.Code, + }) + if err != nil { + return + } + + data.MemberEditInp = &adminin.MemberEditInp{ + Id: 0, + RoleId: config.RoleId, + PostIds: config.PostIds, + DeptId: config.DeptId, + Username: in.Username, + Password: in.Password, + RealName: "", + Avatar: config.Avatar, + Sex: 3, // 保密 + Mobile: in.Mobile, + Status: consts.StatusEnabled, + } + data.Salt = grand.S(6) + data.InviteCode = grand.S(12) + data.PasswordHash = gmd5.MustEncryptString(data.Password + data.Salt) + data.Level, data.Tree, err = service.AdminMember().GenTree(ctx, data.Pid) + if err != nil { + return + } + + // 提交注册信息 + return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { + id, err := dao.AdminMember.Ctx(ctx).Data(data).OmitEmptyData().InsertAndGetId() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + // 更新岗位 + if err = service.AdminMemberPost().UpdatePostIds(ctx, id, config.PostIds); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + } + return + }) +} + +// AccountLogin 账号登录 +func (s *sAdminSite) AccountLogin(ctx context.Context, in *adminin.AccountLoginInp) (res *adminin.LoginModel, err error) { + defer func() { + service.SysLoginLog().Push(ctx, &sysin.LoginLogPushInp{Response: res, Err: err}) + }() + + var mb *entity.AdminMember + if err = dao.AdminMember.Ctx(ctx).Where("username", in.Username).Scan(&mb); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if mb == nil { + err = gerror.New("用户名或密码错误") + return + } + + res = new(adminin.LoginModel) + res.Id = mb.Id + res.Username = mb.Username + if mb.Salt == "" { + err = gerror.New("用户信息错误") + return + } + + if err = simple.CheckPassword(in.Password, mb.Salt, mb.PasswordHash); err != nil { + return + } + + if mb.Status != consts.StatusEnabled { + err = gerror.New("账号已被禁用") + return + } + + res, err = s.handleLogin(ctx, mb) + return +} + +// MobileLogin 手机号登录 +func (s *sAdminSite) MobileLogin(ctx context.Context, in *adminin.MobileLoginInp) (res *adminin.LoginModel, err error) { + defer func() { + service.SysLoginLog().Push(ctx, &sysin.LoginLogPushInp{Response: res, Err: err}) + }() + + var mb *entity.AdminMember + if err = dao.AdminMember.Ctx(ctx).Where("mobile ", in.Mobile).Scan(&mb); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if mb == nil { + err = gerror.New("账号不存在") + return + } + + res = new(adminin.LoginModel) + res.Id = mb.Id + res.Username = mb.Username + + err = service.SysSmsLog().VerifyCode(ctx, &sysin.VerifyCodeInp{ + Event: consts.SmsTemplateLogin, + Mobile: in.Mobile, + Code: in.Code, + }) + + if err != nil { + return + } + + if mb.Status != consts.StatusEnabled { + err = gerror.New("账号已被禁用") + return + } + + res, err = s.handleLogin(ctx, mb) + return +} + +// handleLogin . +func (s *sAdminSite) handleLogin(ctx context.Context, mb *entity.AdminMember) (res *adminin.LoginModel, err error) { + role, dept, err := s.getLoginRoleAndDept(ctx, mb.RoleId, mb.DeptId) + if err != nil { + return nil, err + } + + user := &model.Identity{ + Id: mb.Id, + Pid: mb.Pid, + DeptId: dept.Id, + DeptType: dept.Type, + RoleId: role.Id, + RoleKey: role.Key, + Username: mb.Username, + RealName: mb.RealName, + Avatar: mb.Avatar, + Email: mb.Email, + Mobile: mb.Mobile, + App: consts.AppAdmin, + LoginAt: gtime.Now(), + } + + lt, expires, err := token.Login(ctx, user) + if err != nil { + return nil, err + } + + res = &adminin.LoginModel{ + Username: user.Username, + Id: user.Id, + Token: lt, + Expires: expires, + } + return +} + +// getLoginRoleAndDept 获取登录的角色和部门信息 +func (s *sAdminSite) getLoginRoleAndDept(ctx context.Context, roleId, deptId int64) (role *entity.AdminRole, dept *entity.AdminDept, err error) { + if err = dao.AdminRole.Ctx(ctx).Fields(dao.AdminRole.Columns().Id, dao.AdminRole.Columns().Key, dao.AdminRole.Columns().Status).WherePri(roleId).Scan(&role); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if role == nil { + err = gerror.New("角色不存在或已被删除") + return + } + + if role.Status != consts.StatusEnabled { + err = gerror.New("角色已被禁用,如有疑问请联系管理员") + return + } + + if err = dao.AdminDept.Ctx(ctx).Fields(dao.AdminDept.Columns().Id, dao.AdminDept.Columns().Type, dao.AdminDept.Columns().Status).WherePri(deptId).Scan(&dept); err != nil { + err = gerror.Wrap(err, "获取部门信息失败,请稍后重试!") + return + } + + if dept == nil { + err = gerror.New("部门不存在或已被删除") + return + } + + if dept.Status != consts.StatusEnabled { + err = gerror.New("部门已被禁用,如有疑问请联系管理员") + return + } + return +} + +// BindUserContext 绑定用户上下文 +func (s *sAdminSite) BindUserContext(ctx context.Context, claims *model.Identity) (err error) { + //// 如果不想每次访问都重新加载用户信息,可以放开注释。但在本次登录未失效前,用户信息不会刷新 + // contexts.SetUser(ctx, claims) + // return + + var mb *entity.AdminMember + if err = dao.AdminMember.Ctx(ctx).WherePri(claims.Id).Scan(&mb); err != nil { + err = gerror.Wrap(err, "获取用户信息失败,请稍后重试!") + return + } + + if mb == nil { + err = gerror.Wrap(err, "账号不存在或已被删除!") + return + } + + if mb.Status != consts.StatusEnabled { + err = gerror.New("账号已被禁用,如有疑问请联系管理员") + return + } + + role, dept, err := s.getLoginRoleAndDept(ctx, mb.RoleId, mb.DeptId) + if err != nil { + return err + } + + user := &model.Identity{ + Id: mb.Id, + Pid: mb.Pid, + DeptId: dept.Id, + DeptType: dept.Type, + RoleId: mb.RoleId, + RoleKey: role.Key, + Username: mb.Username, + RealName: mb.RealName, + Avatar: mb.Avatar, + Email: mb.Email, + Mobile: mb.Mobile, + App: claims.App, + LoginAt: claims.LoginAt, + } + + contexts.SetUser(ctx, user) + return +} diff --git a/server/internal/logic/common/upload.go b/server/internal/logic/common/upload.go new file mode 100644 index 0000000..23fea6d --- /dev/null +++ b/server/internal/logic/common/upload.go @@ -0,0 +1,104 @@ +// Package common +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2025 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package common + +import ( + "context" + "hotgo/internal/library/storager" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/file" + "hotgo/utility/format" + "time" + + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/text/gstr" + "github.com/gogf/gf/v2/util/grand" +) + +type sCommonUpload struct{} + +func NewCommonUpload() *sCommonUpload { + return &sCommonUpload{} +} + +func init() { + service.RegisterCommonUpload(NewCommonUpload()) +} + +// UploadFile 上传文件 +func (s *sCommonUpload) UploadFile(ctx context.Context, uploadType string, file *ghttp.UploadFile) (res *sysin.AttachmentListModel, err error) { + attachment, err := storager.DoUpload(ctx, uploadType, file) + if err != nil { + return + } + + attachment.FileUrl = storager.LastUrl(ctx, attachment.FileUrl, attachment.Drive) + res = &sysin.AttachmentListModel{ + SysAttachment: *attachment, + SizeFormat: format.FileSize(attachment.Size), + } + return +} + +// CheckMultipart 检查文件分片 +func (s *sCommonUpload) CheckMultipart(ctx context.Context, in *sysin.CheckMultipartInp) (res *sysin.CheckMultipartModel, err error) { + data, err := storager.CheckMultipart(ctx, in.CheckMultipartParams) + if err != nil { + return nil, err + } + res = new(sysin.CheckMultipartModel) + res.CheckMultipartModel = data + return +} + +// UploadPart 上传分片 +func (s *sCommonUpload) UploadPart(ctx context.Context, in *sysin.UploadPartInp) (res *sysin.UploadPartModel, err error) { + data, err := storager.UploadPart(ctx, in.UploadPartParams) + if err != nil { + return nil, err + } + res = new(sysin.UploadPartModel) + res.UploadPartModel = data + return +} + +// ImageTransferStorage 图片链接转存 +func (s *sCommonUpload) ImageTransferStorage(ctx context.Context, in *sysin.ImageTransferStorageInp) (res *sysin.ImageTransferStorageModel, err error) { + if !gstr.HasPrefix(in.Url, "http://") && !gstr.HasPrefix(in.Url, "https://") { + return nil, gerror.New("仅支持 HTTP/HTTPS 协议的图片链接") + } + + resp, err := g.Client().SetTimeout(time.Second*30).Get(ctx, in.Url) + if err != nil { + return nil, err + } + defer resp.Close() + + if resp.StatusCode != 200 { + return nil, gerror.Newf("请求图片资源失败, StatusCode:%v", resp.StatusCode) + } + + contentType := gstr.ToLower(resp.Header.Get("Content-Type")) + if !gstr.HasPrefix(contentType, "image/") { + return nil, gerror.New("资源不是图片类型") + } + + content := resp.ReadAll() + if len(content) == 0 { + return nil, gerror.New("图片内容为空") + } + + res = new(sysin.ImageTransferStorageModel) + fileHeader, err := file.NewMultipartFileHeader("its-"+grand.Letters(8)+".png", content) + if err != nil { + return nil, gerror.Newf("创建文件头失败:%v", err) + } + res.AttachmentListModel, err = s.UploadFile(ctx, storager.KindImg, &ghttp.UploadFile{FileHeader: fileHeader}) + return +} diff --git a/server/internal/logic/common/wechat.go b/server/internal/logic/common/wechat.go new file mode 100644 index 0000000..1e269db --- /dev/null +++ b/server/internal/logic/common/wechat.go @@ -0,0 +1,156 @@ +// Package common +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package common + +import ( + "context" + "fmt" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gcron" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/util/gmeta" + "hotgo/api/admin/common" + "hotgo/internal/consts" + "hotgo/internal/library/cache" + "hotgo/internal/library/contexts" + "hotgo/internal/library/response" + "hotgo/internal/library/token" + "hotgo/internal/library/wechat" + "hotgo/internal/model/input/commonin" + "hotgo/internal/service" + "time" +) + +type sCommonWechat struct { + temp map[string]*AuthorizeCallState +} + +// AuthorizeCallState 微信授权回调参数 +type AuthorizeCallState struct { + State string `json:"state" dc:"state"` + MemberId int64 `json:"memberId" dc:"管理员ID"` + Type string `json:"type" dc:"授权类型"` + SyncRedirect string `json:"syncRedirect" dc:"同步跳转地址"` + Tick *gtime.Time `json:"tick" dc:"标记授权时间"` +} + +func NewCommonWechat() *sCommonWechat { + return &sCommonWechat{ + temp: make(map[string]*AuthorizeCallState), + } +} + +func init() { + serv := NewCommonWechat() + service.RegisterCommonWechat(serv) + _, _ = gcron.Add(gctx.New(), "@every 300s", serv.CleanTempMap, "WechatCleanTempMap") +} + +// Authorize 微信用户授权 +func (s *sCommonWechat) Authorize(ctx context.Context, in *commonin.WechatAuthorizeInp) (res *commonin.WechatAuthorizeModel, err error) { + basic, err := service.SysConfig().GetBasic(ctx) + if err != nil { + return + } + + var ( + request = g.RequestFromCtx(ctx) + prefix = g.Cfg().MustGet(ctx, "router.admin.prefix", "/admin").String() + path = gmeta.Get(common.WechatAuthorizeCallReq{}, "path").String() + redirectUri = basic.Domain + prefix + path + memberId = contexts.GetUserId(ctx) + state = s.GetCacheKey(in.Type, token.GetAuthKey(token.GetAuthorization(request))) + scope string + ) + + if memberId <= 0 { + err = gerror.New("获取用户信息失败!") + return + } + + switch in.Type { + case consts.WechatAuthorizeOpenId: // 设置openid + scope = consts.WechatScopeBase + case consts.WechatAuthorizeBindLogin: // 绑定微信登录 + scope = consts.WechatScopeUserinfo + default: + err = gerror.New("无效的授权方式!") + return + } + + url, err := wechat.GetOauthURL(ctx, redirectUri, scope, state) + if err != nil { + return + } + + s.temp[state] = &AuthorizeCallState{ + State: state, + MemberId: memberId, + Type: in.Type, + SyncRedirect: in.SyncRedirect, + Tick: gtime.Now(), + } + response.Redirect(g.RequestFromCtx(ctx), url) + return +} + +func (s *sCommonWechat) AuthorizeCall(ctx context.Context, in *commonin.WechatAuthorizeCallInp) (res *commonin.WechatAuthorizeCallModel, err error) { + data, ok := s.temp[in.State] + if !ok || data == nil { + err = gerror.New("授权无效或已过期,请重试") + return + } + + defer delete(s.temp, in.State) + + tk, err := wechat.GetUserAccessToken(ctx, in.Code) + if err != nil { + return + } + + switch data.Type { + case consts.WechatAuthorizeOpenId: // 设置openid + _ = cache.Instance().Set(ctx, data.State, tk.OpenID, time.Hour*24*7) + case consts.WechatAuthorizeBindLogin: // 绑定微信登录 + // ... + default: + err = gerror.New("无效的授权方式!") + return + } + + response.Redirect(g.RequestFromCtx(ctx), data.SyncRedirect) + return +} + +// GetOpenId 从缓存中获取临时openid +func (s *sCommonWechat) GetOpenId(ctx context.Context) (openId string, err error) { + request := ghttp.RequestFromCtx(ctx) + key := s.GetCacheKey(consts.WechatAuthorizeOpenId, token.GetAuthKey(token.GetAuthorization(request))) + date, err := cache.Instance().Get(ctx, key) + if err != nil { + err = gerror.Newf("GetOpenId err:%+v", err.Error()) + return + } + openId = date.String() + return +} + +func (s *sCommonWechat) GetCacheKey(typ, ak string) string { + return fmt.Sprintf("%v:%v", typ, ak) +} + +// CleanTempMap 清理临时map +func (s *sCommonWechat) CleanTempMap(ctx context.Context) { + t := gtime.Now().Add(time.Second * 600) + for _, state := range s.temp { + if state.Tick.After(t) { + delete(s.temp, state.State) + } + } +} diff --git a/server/internal/logic/hook/access_log.go b/server/internal/logic/hook/access_log.go new file mode 100644 index 0000000..49af9e1 --- /dev/null +++ b/server/internal/logic/hook/access_log.go @@ -0,0 +1,56 @@ +// Package hook +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package hook + +import ( + "context" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/text/gstr" + "hotgo/internal/library/contexts" + "hotgo/internal/service" + "hotgo/utility/simple" + "strings" +) + +// 忽略的请求方式 +var ignoredRequestMethods = []string{"HEAD", "PRI"} + +// accessLog 访问日志 +func (s *sHook) accessLog(r *ghttp.Request) { + if s.isIgnoredRequest(r) { + return + } + + var ctx = r.Context() + if contexts.Get(ctx) == nil { + return + } + + contexts.SetDataMap(ctx, g.Map{ + "request.takeUpTime": gtime.Now().Sub(gtime.New(r.EnterTime)).Milliseconds(), + // ... + }) + + simple.SafeGo(ctx, func(ctx context.Context) { + if err := service.SysLog().AutoLog(ctx); err != nil { + g.Log().Infof(ctx, "hook accessLog err:%+v", err) + } + }) +} + +// isIgnoredRequest 是否忽略请求 +func (s *sHook) isIgnoredRequest(r *ghttp.Request) bool { + if r.IsFileRequest() { + return true + } + + if gstr.InArray(ignoredRequestMethods, strings.ToUpper(r.Method)) { + return true + } + return false +} diff --git a/server/internal/logic/hook/init.go b/server/internal/logic/hook/init.go new file mode 100644 index 0000000..8bc315f --- /dev/null +++ b/server/internal/logic/hook/init.go @@ -0,0 +1,31 @@ +// Package hook +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package hook + +import ( + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/internal/service" +) + +type sHook struct { +} + +func init() { + service.RegisterHook(New()) +} + +func New() *sHook { + return &sHook{} +} + +func (s *sHook) BeforeServe(r *ghttp.Request) { + +} + +func (s *sHook) AfterOutput(r *ghttp.Request) { + s.accessLog(r) + s.lastAdminActive(r) +} diff --git a/server/internal/logic/hook/last_active.go b/server/internal/logic/hook/last_active.go new file mode 100644 index 0000000..a76973f --- /dev/null +++ b/server/internal/logic/hook/last_active.go @@ -0,0 +1,94 @@ +// Package hook +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package hook + +import ( + "context" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/contexts" + "hotgo/utility/simple" + "sync" + "time" + + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/os/gtimer" +) + +type visitor struct { + lastSeen *gtime.Time +} + +var ( + visitors = make(map[int64]*visitor) + mtx sync.Mutex +) + +// Run a background goroutine to remove old entries from the visitors map. +func init() { + go cleanupVisitors() +} + +// Every minute check the map for visitors that haven't been seen for +// more than 3 minutes and delete the entries. +func cleanupVisitors() { + gtimer.AddSingleton(gctx.New(), time.Minute, func(ctx context.Context) { + mtx.Lock() + for memberId, v := range visitors { + if gtime.Now().Sub(v.lastSeen) > 3*time.Minute { + delete(visitors, memberId) + } + } + mtx.Unlock() + }) +} + +func allow(memberId int64) bool { + mtx.Lock() + defer mtx.Unlock() + v, exists := visitors[memberId] + if !exists { + visitors[memberId] = &visitor{gtime.Now()} + return true + } + + if gtime.Now().Sub(v.lastSeen) > time.Second*3 { + v.lastSeen = gtime.Now() + return true + } + return false +} + +// lastAdminActive 更新后台用户最后活跃 +func (s *sHook) lastAdminActive(r *ghttp.Request) { + if r.IsFileRequest() { + return + } + + var ( + ctx = r.Context() + member = contexts.GetUser(ctx) + ) + + if member == nil || member.App != consts.AppAdmin { + return + } + + if allow(member.Id) { + simple.SafeGo(ctx, func(ctx context.Context) { + _, err := dao.AdminMember.Ctx(ctx). + Where(dao.AdminMember.Columns().Id, member.Id). + Data(g.Map{dao.AdminMember.Columns().LastActiveAt: gtime.Now()}). + Update() + if err != nil { + g.Log().Warningf(ctx, "hook lastActive err:%+v, memberId:%v", err, member.Id) + } + }) + } +} diff --git a/server/internal/logic/logic.go b/server/internal/logic/logic.go new file mode 100644 index 0000000..84ee81d --- /dev/null +++ b/server/internal/logic/logic.go @@ -0,0 +1,17 @@ +// ========================================================================== +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package logic + +import ( + _ "hotgo/internal/logic/admin" + _ "hotgo/internal/logic/common" + _ "hotgo/internal/logic/hook" + _ "hotgo/internal/logic/middleware" + _ "hotgo/internal/logic/pay" + _ "hotgo/internal/logic/sys" + _ "hotgo/internal/logic/tcpclient" + _ "hotgo/internal/logic/tcpserver" + _ "hotgo/internal/logic/view" +) diff --git a/server/internal/logic/middleware/admin_auth.go b/server/internal/logic/middleware/admin_auth.go new file mode 100644 index 0000000..6533843 --- /dev/null +++ b/server/internal/logic/middleware/admin_auth.go @@ -0,0 +1,53 @@ +// Package middleware +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package middleware + +import ( + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/text/gstr" + "hotgo/internal/consts" + "hotgo/internal/library/contexts" + "hotgo/internal/library/response" + "hotgo/internal/service" + "hotgo/utility/simple" +) + +// AdminAuth 后台鉴权中间件 +func (s *sMiddleware) AdminAuth(r *ghttp.Request) { + var ( + ctx = r.Context() + path = gstr.Replace(r.URL.Path, simple.RouterPrefix(ctx, consts.AppAdmin), "", 1) + ) + + // 不需要验证登录的路由地址 + if s.IsExceptLogin(ctx, consts.AppAdmin, path) { + r.Middleware.Next() + return + } + + // 将用户信息传递到上下文中 + if err := s.DeliverUserContext(r); err != nil { + response.JsonExit(r, gcode.CodeNotAuthorized.Code(), err.Error()) + return + } + + // 不需要验证权限的路由地址 + if s.IsExceptAuth(ctx, consts.AppAdmin, path) { + r.Middleware.Next() + return + } + + // 验证路由访问权限 + if !service.AdminRole().Verify(ctx, path, r.Method) { + g.Log().Debugf(ctx, "AdminAuth fail path:%+v, GetRoleKey:%+v, r.Method:%+v", path, contexts.GetRoleKey(ctx), r.Method) + response.JsonExit(r, gcode.CodeSecurityReason.Code(), "你没有访问权限!") + return + } + + r.Middleware.Next() +} diff --git a/server/internal/logic/middleware/api_auth.go b/server/internal/logic/middleware/api_auth.go new file mode 100644 index 0000000..e217443 --- /dev/null +++ b/server/internal/logic/middleware/api_auth.go @@ -0,0 +1,40 @@ +// Package middleware +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package middleware + +import ( + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/text/gstr" + "hotgo/internal/consts" + "hotgo/internal/library/response" + "hotgo/utility/simple" +) + +// ApiAuth API鉴权中间件 +func (s *sMiddleware) ApiAuth(r *ghttp.Request) { + var ( + ctx = r.Context() + path = gstr.Replace(r.URL.Path, simple.RouterPrefix(ctx, consts.AppApi), "", 1) + ) + + // 不需要验证登录的路由地址 + if s.IsExceptLogin(ctx, consts.AppApi, path) { + r.Middleware.Next() + return + } + + // 将用户信息传递到上下文中 + if err := s.DeliverUserContext(r); err != nil { + response.JsonExit(r, gcode.CodeNotAuthorized.Code(), err.Error()) + return + } + + // 验证路由访问权限 + // ... + + r.Middleware.Next() +} diff --git a/server/internal/logic/middleware/home_auth.go b/server/internal/logic/middleware/home_auth.go new file mode 100644 index 0000000..a1396e4 --- /dev/null +++ b/server/internal/logic/middleware/home_auth.go @@ -0,0 +1,18 @@ +// Package middleware +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package middleware + +import ( + "github.com/gogf/gf/v2/net/ghttp" +) + +// HomeAuth 前台页面鉴权中间件 +func (s *sMiddleware) HomeAuth(r *ghttp.Request) { + // 鉴权 + // ... + + r.Middleware.Next() +} diff --git a/server/internal/logic/middleware/init.go b/server/internal/logic/middleware/init.go new file mode 100644 index 0000000..7cf5234 --- /dev/null +++ b/server/internal/logic/middleware/init.go @@ -0,0 +1,206 @@ +// Package middleware +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2025 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package middleware + +import ( + "context" + "fmt" + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/i18n/gi18n" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/net/gtrace" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/text/gstr" + "go.opentelemetry.io/otel/attribute" + "hotgo/internal/consts" + "hotgo/internal/library/addons" + "hotgo/internal/library/contexts" + "hotgo/internal/library/response" + "hotgo/internal/library/token" + "hotgo/internal/model" + "hotgo/internal/service" + "hotgo/utility/simple" + "hotgo/utility/validate" + "net/http" + "strings" +) + +type sMiddleware struct { + LoginUrl string // 登录路由地址 + DemoWhiteList g.Map // 演示模式放行的路由白名单 + NotRecordRequest g.Map // 不记录请求数据的路由(当前请求数据过大时会影响响应效率,可以将路径放到该选项中改善) +} + +func init() { + service.RegisterMiddleware(NewMiddleware()) +} + +func NewMiddleware() *sMiddleware { + return &sMiddleware{ + LoginUrl: "/common", + DemoWhiteList: g.Map{ + "/admin/site/accountLogin": struct{}{}, // 账号登录 + "/admin/site/mobileLogin": struct{}{}, // 手机号登录 + "/admin/genCodes/preview": struct{}{}, // 预览代码 + }, + NotRecordRequest: g.Map{ + "/admin/upload/file": struct{}{}, // 上传文件 + "/admin/upload/uploadPart": struct{}{}, // 上传分片 + }, + } +} + +// Ctx 初始化请求上下文 +func (s *sMiddleware) Ctx(r *ghttp.Request) { + // 国际化 + r.SetCtx(gi18n.WithLanguage(r.Context(), simple.GetHeaderLocale(r.Context()))) + + // 链路追踪 + if g.Cfg().MustGet(r.Context(), "jaeger.switch").Bool() { + ctx, span := gtrace.NewSpan(r.Context(), "middleware.ctx") + span.SetAttributes(attribute.KeyValue{ + Key: "traceID", + Value: attribute.StringValue(gctx.CtxId(ctx)), + }) + span.End() + r.SetCtx(ctx) + } + + data := make(g.Map) + if _, ok := s.NotRecordRequest[r.URL.Path]; ok { + data["request.body"] = gjson.New(nil) + } else { + data["request.body"] = gjson.New(r.GetBodyString()) + } + + contexts.Init(r, &model.Context{ + Data: data, + Module: getModule(r.URL.Path), + }) + + if len(r.Cookie.GetSessionId()) == 0 { + r.Cookie.SetSessionId(gctx.CtxId(r.Context())) + } + + r.SetCtx(r.GetNeverDoneCtx()) + r.Middleware.Next() +} + +func getModule(path string) (module string) { + slice := strings.Split(path, "/") + if len(slice) < 2 { + module = consts.AppDefault + return + } + + if slice[1] == "" { + module = consts.AppDefault + return + } + return slice[1] +} + +// CORS allows Cross-origin resource sharing. +func (s *sMiddleware) CORS(r *ghttp.Request) { + r.Response.CORSDefault() + r.Middleware.Next() +} + +// DemoLimit 演示系统操作限制 +func (s *sMiddleware) DemoLimit(r *ghttp.Request) { + if !simple.IsDemo(r.Context()) { + r.Middleware.Next() + return + } + + if r.Method == http.MethodPost { + if _, ok := s.DemoWhiteList[r.URL.Path]; ok { + r.Middleware.Next() + return + } + response.JsonExit(r, gcode.CodeNotSupported.Code(), "演示系统禁止操作!") + return + } + + r.Middleware.Next() +} + +// Addon 插件中间件 +func (s *sMiddleware) Addon(r *ghttp.Request) { + var ctx = r.Context() + + if contexts.Get(ctx).Module == "" { + g.Log().Warning(ctx, "application module is not initialized.") + return + } + + // 替换掉应用模块前缀 + path := gstr.Replace(r.URL.Path, "/"+contexts.Get(ctx).Module+"/", "", 1) + ss := gstr.Explode("/", path) + if len(ss) == 0 { + g.Log().Warning(ctx, "addon was not recognized.") + return + } + + module := addons.GetModule(ss[0]) + if module == nil { + g.Log().Warningf(ctx, "addon module = nil, name:%v", ss[0]) + return + } + + sk := module.GetSkeleton() + if sk == nil { + g.Log().Warningf(ctx, "addon skeleton = nil, name:%v", ss[0]) + return + } + + contexts.SetAddonName(ctx, sk.Name) + r.Middleware.Next() +} + +// DeliverUserContext 将用户信息传递到上下文中 +func (s *sMiddleware) DeliverUserContext(r *ghttp.Request) (err error) { + user, err := token.ParseLoginUser(r) + if err != nil { + return + } + + switch user.App { + case consts.AppAdmin: + if err = service.AdminSite().BindUserContext(r.Context(), user); err != nil { + return + } + default: + contexts.SetUser(r.Context(), user) + } + return +} + +// IsExceptAuth 是否是不需要验证权限的路由地址 +func (s *sMiddleware) IsExceptAuth(ctx context.Context, appName, path string) bool { + pathList := g.Cfg().MustGet(ctx, fmt.Sprintf("router.%v.exceptAuth", appName)).Strings() + + for i := 0; i < len(pathList); i++ { + if validate.InSliceExistStr(pathList[i], path) { + return true + } + } + return false +} + +// IsExceptLogin 是否是不需要登录的路由地址 +func (s *sMiddleware) IsExceptLogin(ctx context.Context, appName, path string) bool { + pathList := g.Cfg().MustGet(ctx, fmt.Sprintf("router.%v.exceptLogin", appName)).Strings() + + for i := 0; i < len(pathList); i++ { + if validate.InSliceExistStr(pathList[i], path) { + return true + } + } + return false +} diff --git a/server/internal/logic/middleware/limit_blacklist.go b/server/internal/logic/middleware/limit_blacklist.go new file mode 100644 index 0000000..b2c0ed3 --- /dev/null +++ b/server/internal/logic/middleware/limit_blacklist.go @@ -0,0 +1,21 @@ +// Package middleware +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package middleware + +import ( + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/internal/library/response" + "hotgo/internal/service" +) + +// Blacklist IP黑名单限制中间件 +func (s *sMiddleware) Blacklist(r *ghttp.Request) { + if err := service.SysBlacklist().VerifyRequest(r); err != nil { + response.JsonExit(r, gerror.Code(err).Code(), err.Error()) + } + r.Middleware.Next() +} diff --git a/server/internal/logic/middleware/limit_develop.go b/server/internal/logic/middleware/limit_develop.go new file mode 100644 index 0000000..b1928ba --- /dev/null +++ b/server/internal/logic/middleware/limit_develop.go @@ -0,0 +1,43 @@ +// Package middleware +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package middleware + +import ( + "fmt" + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/text/gstr" + "hotgo/internal/library/location" + "hotgo/internal/library/response" +) + +// Develop 开发工具白名单过滤 +func (s *sMiddleware) Develop(r *ghttp.Request) { + ips := g.Cfg().MustGet(r.Context(), "hggen.allowedIPs").Strings() + if len(ips) == 0 { + response.JsonExit(r, gcode.CodeNotSupported.Code(), "请配置生成白名单!") + return + } + + if !gstr.InArray(ips, "*") { + clientIp := location.GetClientIp(r) + ok := false + for _, ip := range ips { + if ip == clientIp { + ok = true + break + } + } + + if !ok { + response.JsonExit(r, gcode.CodeNotSupported.Code(), fmt.Sprintf("当前IP[%s]没有配置生成白名单!", clientIp)) + return + } + } + + r.Middleware.Next() +} diff --git a/server/internal/logic/middleware/pre_filter.go b/server/internal/logic/middleware/pre_filter.go new file mode 100644 index 0000000..d1e346c --- /dev/null +++ b/server/internal/logic/middleware/pre_filter.go @@ -0,0 +1,66 @@ +// Package middleware +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package middleware + +import ( + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/util/gconv" + "hotgo/internal/global" + "hotgo/internal/library/response" + "hotgo/utility/validate" + "reflect" +) + +// PreFilter 请求输入预处理 +// api使用gf规范路由并且XxxReq结构体实现了validate.Filter接口即可 +func (s *sMiddleware) PreFilter(r *ghttp.Request) { + router := global.GetRequestRoute(r) + if router == nil { + r.Middleware.Next() + return + } + + funcInfo := router.Handler.Info + + // 非规范路由不处理 + if funcInfo.Type.NumIn() != 2 { + r.Middleware.Next() + return + } + + inputType := funcInfo.Type.In(1) + var inputObject reflect.Value + if inputType.Kind() == reflect.Ptr { + inputObject = reflect.New(inputType.Elem()) + } else { + inputObject = reflect.New(inputType.Elem()).Elem() + } + + // 先验证基本校验规则 + if err := r.Parse(inputObject.Interface()); err != nil { + resp := gerror.Code(err) + response.JsonExit(r, resp.Code(), gerror.Current(err).Error(), resp.Detail()) + return + } + + // 没有实现预处理 + if _, ok := inputObject.Interface().(validate.Filter); !ok { + r.Middleware.Next() + return + } + + // 执行预处理 + if err := validate.PreFilter(r.Context(), inputObject.Interface()); err != nil { + resp := gerror.Code(err) + response.JsonExit(r, resp.Code(), gerror.Current(err).Error(), resp.Detail()) + return + } + + // 过滤后的参数 + r.SetParamMap(gconv.Map(inputObject.Interface())) + r.Middleware.Next() +} diff --git a/server/internal/logic/middleware/response.go b/server/internal/logic/middleware/response.go new file mode 100644 index 0000000..5caa83e --- /dev/null +++ b/server/internal/logic/middleware/response.go @@ -0,0 +1,124 @@ +// Package middleware +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package middleware + +import ( + "hotgo/internal/consts" + "hotgo/internal/library/response" + "hotgo/utility/charset" + "hotgo/utility/simple" + + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/util/gmeta" +) + +// ResponseHandler HTTP响应预处理 +func (s *sMiddleware) ResponseHandler(r *ghttp.Request) { + r.Middleware.Next() + + // 错误状态码接管 + switch r.Response.Status { + case 403: + r.Response.Writeln("403 - 网站拒绝显示此网页") + return + case 404: + r.Response.Writeln("404 - 你似乎来到了没有知识存在的荒原…") + return + } + + contentType := getContentType(r) + // 已存在响应 + if contentType != consts.HTTPContentTypeStream && r.Response.BufferLength() > 0 { // && contexts.Get(r.Context()).Response != nil + return + } + + switch contentType { + case consts.HTTPContentTypeHtml: + s.responseHtml(r) + return + case consts.HTTPContentTypeXml: + s.responseXml(r) + return + case consts.HTTPContentTypeStream: + case consts.HTTPContentTypeOctetStream: + default: + responseJson(r) + } +} + +// responseHtml html模板响应 +func (s *sMiddleware) responseHtml(r *ghttp.Request) { + code, message, resp := parseResponse(r) + if code == gcode.CodeOK.Code() { + return + } + + r.Response.ClearBuffer() + _ = r.Response.WriteTplContent(simple.DefaultErrorTplContent(r.Context()), g.Map{"code": code, "message": message, "stack": resp}) +} + +// responseXml xml响应 +func (s *sMiddleware) responseXml(r *ghttp.Request) { + code, message, data := parseResponse(r) + response.RXml(r, code, message, data) +} + +// responseJson json响应 +func responseJson(r *ghttp.Request) { + code, message, data := parseResponse(r) + response.RJson(r, code, message, data) +} + +// parseResponse 解析响应数据 +func parseResponse(r *ghttp.Request) (code int, message string, resp interface{}) { + ctx := r.Context() + err := r.GetError() + if err == nil { + return gcode.CodeOK.Code(), "操作成功", r.GetHandlerResponse() + } + + // 是否输出错误堆栈到页面 + if simple.Debug(ctx) { + message = gerror.Current(err).Error() + if getContentType(r) == consts.HTTPContentTypeHtml { + resp = charset.SerializeStack(err) + } else { + resp = charset.ParseErrStack(err) + } + } else { + message = consts.ErrorMessage(gerror.Current(err)) + } + + code = gerror.Code(err).Code() + + // 记录异常日志 + // 如果你想对错误做不同的处理,可以通过定义不同的错误码来区分 + // 默认-1为安全可控错误码只记录文件日志,非-1为不可控错误,记录文件日志+服务日志并打印堆栈 + if code == gcode.CodeNil.Code() { + g.Log().Stdout(false).Infof(ctx, "exception:%v", err) + } else { + g.Log().Errorf(ctx, "exception:%v", err) + } + return +} + +func getContentType(r *ghttp.Request) (contentType string) { + contentType = r.Response.Header().Get("Content-Type") + if contentType != "" { + return + } + + mime := gmeta.Get(r.GetHandlerResponse(), "mime").String() + if mime == "" { + contentType = consts.HTTPContentTypeJson + } else { + contentType = mime + } + return +} diff --git a/server/internal/logic/middleware/weboscket_auth.go b/server/internal/logic/middleware/weboscket_auth.go new file mode 100644 index 0000000..07afa9b --- /dev/null +++ b/server/internal/logic/middleware/weboscket_auth.go @@ -0,0 +1,37 @@ +// Package middleware +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package middleware + +import ( + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/text/gstr" + "hotgo/internal/consts" + "hotgo/internal/library/response" + "hotgo/utility/simple" +) + +// WebSocketAuth websocket鉴权中间件 +func (s *sMiddleware) WebSocketAuth(r *ghttp.Request) { + var ( + ctx = r.Context() + path = gstr.Replace(r.URL.Path, simple.RouterPrefix(ctx, consts.AppWebSocket), "", 1) + ) + + // 不需要验证登录的路由地址 + if s.IsExceptLogin(ctx, consts.AppWebSocket, path) { + r.Middleware.Next() + return + } + + // 将用户信息传递到上下文中 + if err := s.DeliverUserContext(r); err != nil { + response.JsonExit(r, gcode.CodeNotAuthorized.Code(), err.Error()) + return + } + + r.Middleware.Next() +} diff --git a/server/internal/logic/pay/create.go b/server/internal/logic/pay/create.go new file mode 100644 index 0000000..ff8634b --- /dev/null +++ b/server/internal/logic/pay/create.go @@ -0,0 +1,147 @@ +// Package pay +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package pay + +// 订单创建 + +import ( + "context" + "fmt" + v1 "hotgo/api/api/pay/v1" + "hotgo/internal/consts" + "hotgo/internal/library/contexts" + "hotgo/internal/library/location" + "hotgo/internal/library/payment" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/payin" + "hotgo/internal/service" + "hotgo/utility/validate" + + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/util/gmeta" +) + +// Create 创建支付订单和日志 +func (s *sPay) Create(ctx context.Context, in payin.PayCreateInp) (res *payin.PayCreateModel, err error) { + request := ghttp.RequestFromCtx(ctx) + if in.TradeType == "" { + in.TradeType = payment.AutoTradeType(in.PayType, request.UserAgent()) + } + + if in.Openid == "" { + if in.Openid, err = service.CommonWechat().GetOpenId(ctx); err != nil { + return + } + } + + if in.TradeType == consts.TradeTypeWxMP { + if in.Openid == "" { + err = gerror.New("微信公众号支付必须设置openid") + return + } + if in.ReturnUrl == "" { + err = gerror.New("微信公众号支付必须设置同步通知地址") + return + } + } + + notifyURL, err := s.GenNotifyURL(ctx, in) + if err != nil { + return + } + + config := payment.GetConfig() + mchId := "" + switch in.PayType { + case consts.PayTypeAliPay: + mchId = config.AliPayAppId + case consts.PayTypeWxPay: + mchId = config.WxPayMchId + case consts.PayTypeQQPay: + mchId = config.QQPayMchId + } + + data := &entity.PayLog{ + MemberId: contexts.GetUserId(ctx), + AppId: contexts.GetModule(ctx), + AddonsName: contexts.GetAddonName(ctx), + OrderSn: in.OrderSn, + OrderGroup: in.OrderGroup, + Openid: in.Openid, + MchId: mchId, + Subject: in.Subject, + Detail: in.Detail, + OutTradeNo: payment.GenOutTradeNo(ctx), + TransactionId: "", + PayType: in.PayType, + PayAmount: in.PayAmount, + PayStatus: consts.PayStatusWait, + TradeType: in.TradeType, + IsRefund: consts.RefundStatusNo, + CreateIp: location.GetClientIp(request), + NotifyUrl: notifyURL, + ReturnUrl: in.ReturnUrl, + TraceIds: gjson.New([]string{gctx.CtxId(ctx)}), + Status: consts.StatusEnabled, + } + + // 创建支付记录 + if _, err = s.Model(ctx).Data(data).OmitEmptyData().Insert(); err != nil { + return + } + + // 创建第三方平台支付订单 + order, err := payment.New(in.PayType).CreateOrder(ctx, payin.CreateOrderInp{Pay: data}) + if err != nil { + return + } + + res = new(payin.PayCreateModel) + res.Order = order + return +} + +// GenNotifyURL 生成支付通知地址 +func (s *sPay) GenNotifyURL(ctx context.Context, in payin.PayCreateInp) (notifyURL string, err error) { + basic, err := service.SysConfig().GetBasic(ctx) + if err != nil { + return + } + + if basic.Domain == "" { + err = gerror.New("请先到后台【系统设置】-【配置管理】中设置网站域名!") + return + } + + if !validate.IsURL(basic.Domain) { + err = gerror.New("网站域名格式有误,请检查!") + return + } + + var object interface{} + switch in.PayType { + case consts.PayTypeAliPay: + object = v1.NotifyAliPayReq{} + case consts.PayTypeWxPay: + object = v1.NotifyWxPayReq{} + case consts.PayTypeQQPay: + object = v1.NotifyQQPayReq{} + default: + err = gerror.Newf("未被支持的支付方式:%v", in.PayType) + return + } + + notifyURL = fmt.Sprintf("%s%s%s", + basic.Domain, + g.Cfg().MustGet(ctx, "router.api.prefix", "/api").String(), + gmeta.Get(object, "path").String(), + ) + return +} diff --git a/server/internal/logic/pay/notify.go b/server/internal/logic/pay/notify.go new file mode 100644 index 0000000..b4b06ac --- /dev/null +++ b/server/internal/logic/pay/notify.go @@ -0,0 +1,98 @@ +// Package pay +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package pay + +// 异步通知 + +import ( + "context" + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gctx" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/location" + "hotgo/internal/library/payment" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/payin" + "hotgo/internal/service" +) + +// RegisterNotifyCall 注册支付成功回调方法 +func (s *sPay) RegisterNotifyCall() { + payment.RegisterNotifyCallMap(map[string]payment.NotifyCallFunc{ + consts.OrderGroupAdminOrder: service.AdminOrder().PayNotify, // 后台充值订单 + }) +} + +// Notify 异步通知 +func (s *sPay) Notify(ctx context.Context, in *payin.PayNotifyInp) (res *payin.PayNotifyModel, err error) { + data, err := payment.New(in.PayType).Notify(ctx, payin.NotifyInp{}) + if err != nil { + return + } + + var models *entity.PayLog + if err = s.Model(ctx).Where(dao.PayLog.Columns().OutTradeNo, data.OutTradeNo).Scan(&models); err != nil { + return + } + + if models == nil { + err = gerror.Newf("商户订单号[%v]不存在支付记录,请检查", data.OutTradeNo) + return + } + + if models.PayStatus != consts.PayStatusWait { + err = gerror.Newf("商户订单号[%v]已被处理,请勿重复操作", data.OutTradeNo) + return + } + + var traceIds []string + if err = models.TraceIds.Scan(&traceIds); err != nil { + return + } + traceIds = append(traceIds, gctx.CtxId(ctx)) + + models.TransactionId = data.TransactionId + models.PayStatus = consts.PayStatusOk + models.PayAt = data.PayAt + models.ActualAmount = data.ActualAmount + models.PayIp = location.GetClientIp(ghttp.RequestFromCtx(ctx)) + models.TraceIds = gjson.New(traceIds) + + result, err := s.Model(ctx). + Fields( + dao.PayLog.Columns().TransactionId, + dao.PayLog.Columns().PayStatus, + dao.PayLog.Columns().PayAt, + dao.PayLog.Columns().PayIp, + dao.PayLog.Columns().TraceIds, + dao.PayLog.Columns().ActualAmount, + ). + Where(dao.PayLog.Columns().Id, models.Id). + Where(dao.PayLog.Columns().PayStatus, consts.PayStatusWait). + OmitEmpty(). + Data(models).Update() + if err != nil { + return + } + + ret, err := result.RowsAffected() + if err != nil { + return + } + + if ret == 0 { + g.Log().Warningf(ctx, "没有被更新的数据行") + return + } + + // 回调业务 + payment.NotifyCall(ctx, &payin.NotifyCallFuncInp{Pay: models}) + return +} diff --git a/server/internal/logic/pay/pay.go b/server/internal/logic/pay/pay.go new file mode 100644 index 0000000..68aeec7 --- /dev/null +++ b/server/internal/logic/pay/pay.go @@ -0,0 +1,150 @@ +// Package pay +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package pay + +// 支付日志相关 + +import ( + "context" + "fmt" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/payin" + "hotgo/internal/service" + "hotgo/utility/convert" + "hotgo/utility/excel" + "hotgo/utility/validate" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/util/gconv" +) + +type sPay struct{} + +func NewPay() *sPay { + return &sPay{} +} + +func init() { + service.RegisterPay(NewPay()) +} + +// Model 支付日志ORM模型 +func (s *sPay) Model(ctx context.Context, option ...*handler.Option) *gdb.Model { + return handler.Model(dao.PayLog.Ctx(ctx), option...) +} + +// List 获取支付日志列表 +func (s *sPay) List(ctx context.Context, in payin.PayListInp) (list []*payin.PayListModel, totalCount int, err error) { + mod := s.Model(ctx) + + // 查询ID + if in.Id > 0 { + mod = mod.Where(dao.PayLog.Columns().Id, in.Id) + } + + // 查询状态 + if in.Status > 0 { + mod = mod.Where(dao.PayLog.Columns().Status, in.Status) + } + + // 查询创建时间 + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween(dao.PayLog.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1]) + } + + totalCount, err = mod.Clone().Count() + if err != nil { + return + } + + if totalCount == 0 { + return + } + + err = mod.Page(in.Page, in.PerPage).OrderDesc(dao.PayLog.Columns().Id).Scan(&list) + return +} + +// Export 导出支付日志 +func (s *sPay) Export(ctx context.Context, in payin.PayListInp) (err error) { + list, totalCount, err := s.List(ctx, in) + if err != nil { + return + } + + // 字段的排序是依据tags的字段顺序,如果你不想使用默认的排序方式,可以直接定义 tags = []string{"字段名称", "字段名称2", ...} + tags, err := convert.GetEntityDescTags(payin.PayExportModel{}) + if err != nil { + return + } + + var ( + fileName = "导出支付日志-" + gctx.CtxId(ctx) + sheetName = fmt.Sprintf("索引条件共%v行,共%v页,当前导出是第%v页,本页共%v行", totalCount, form.CalPageCount(totalCount, in.PerPage), in.Page, len(list)) + exports []payin.PayExportModel + ) + + if err = gconv.Scan(list, &exports); err != nil { + return + } + + err = excel.ExportByStructs(ctx, tags, exports, fileName, sheetName) + return +} + +// Edit 修改/新增支付日志 +func (s *sPay) Edit(ctx context.Context, in payin.PayEditInp) (err error) { + // 修改 + if in.Id > 0 { + _, err = s.Model(ctx).Where(dao.PayLog.Columns().Id, in.Id).Data(in).Update() + return + } + + // 新增 + _, err = s.Model(ctx, &handler.Option{FilterAuth: false}).Data(in).OmitEmptyData().Insert() + return +} + +// Delete 删除支付日志 +func (s *sPay) Delete(ctx context.Context, in payin.PayDeleteInp) (err error) { + _, err = s.Model(ctx).Where(dao.PayLog.Columns().Id, in.Id).Delete() + return +} + +// View 获取支付日志指定信息 +func (s *sPay) View(ctx context.Context, in payin.PayViewInp) (res *payin.PayViewModel, err error) { + err = s.Model(ctx).Where(dao.PayLog.Columns().Id, in.Id).Scan(&res) + return +} + +// Status 更新支付日志状态 +func (s *sPay) Status(ctx context.Context, in payin.PayStatusInp) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + + _, err = s.Model(ctx).Where(dao.PayLog.Columns().Id, in.Id).Data(g.Map{ + dao.PayLog.Columns().Status: in.Status, + }).Update() + return +} diff --git a/server/internal/logic/pay/refund.go b/server/internal/logic/pay/refund.go new file mode 100644 index 0000000..acd0a50 --- /dev/null +++ b/server/internal/logic/pay/refund.go @@ -0,0 +1,219 @@ +// Package pay +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.5.3 +// @AutoGenerate Date 2023-04-15 15:59:58 +package pay + +import ( + "context" + "fmt" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/library/location" + "hotgo/internal/library/payment" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/payin" + "hotgo/internal/service" + "hotgo/utility/convert" + "hotgo/utility/excel" + + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/util/gconv" +) + +// 订单退款. + +type sPayRefund struct{} + +func NewPayRefund() *sPayRefund { + return &sPayRefund{} +} + +func init() { + service.RegisterPayRefund(NewPayRefund()) +} + +// Model 交易退款ORM模型 +func (s *sPayRefund) Model(ctx context.Context, option ...*handler.Option) *gdb.Model { + return handler.Model(dao.PayRefund.Ctx(ctx), option...) +} + +// Refund 订单退款 +func (s *sPayRefund) Refund(ctx context.Context, in *payin.PayRefundInp) (res *payin.PayRefundModel, err error) { + var models *entity.PayLog + if err = service.Pay().Model(ctx).Where(dao.PayLog.Columns().OrderSn, in.OrderSn).Scan(&models); err != nil { + return + } + + if models == nil { + err = gerror.Newf("业务订单号[%v]不存在支付记录,请检查", in.OrderSn) + return + } + + if models.PayStatus != consts.PayStatusOk { + err = gerror.Newf("业务订单号[%v]未支付,无需退款", in.OrderSn) + return + } + + if models.IsRefund != consts.RefundStatusNo { + err = gerror.Newf("业务订单号[%v]退款已被处理,请勿重复操作", in.OrderSn) + return + } + + var traceIds []string + if err = models.TraceIds.Scan(&traceIds); err != nil { + return + } + traceIds = append(traceIds, gctx.CtxId(ctx)) + + refundSn := payment.GenRefundSn(ctx) + + // 创建第三方平台退款 + req := payin.RefundInp{ + Pay: models, + RefundMoney: in.RefundMoney, + Reason: in.Reason, + Remark: in.Remark, + RefundSn: refundSn, + } + + if _, err = payment.New(models.PayType).Refund(ctx, req); err != nil { + return + } + + models.RefundSn = refundSn + models.IsRefund = consts.RefundStatusAgree + models.TraceIds = gjson.New(traceIds) + + result, err := s.Model(ctx). + Fields( + dao.PayLog.Columns().RefundSn, + dao.PayLog.Columns().IsRefund, + dao.PayLog.Columns().TraceIds, + ). + Where(dao.PayLog.Columns().Id, models.Id). + OmitEmpty(). + Data(models).Update() + if err != nil { + return + } + + ret, err := result.RowsAffected() + if err != nil { + return + } + + if ret == 0 { + g.Log().Warningf(ctx, "Refund 没有被更新的数据行") + } + + data := &entity.PayRefund{ + Id: 0, + MemberId: models.MemberId, + AppId: models.AppId, + OrderSn: models.OrderSn, + RefundTradeNo: "", + RefundMoney: in.RefundMoney, + RefundWay: 1, + Ip: location.GetClientIp(ghttp.RequestFromCtx(ctx)), + Reason: in.Reason, + Remark: in.Remark, + Status: consts.RefundStatusAgree, + } + + // 创建退款记录 + if _, err = s.Model(ctx).Data(data).OmitEmptyData().Insert(); err != nil { + return + } + return +} + +// List 获取交易退款列表 +func (s *sPayRefund) List(ctx context.Context, in *payin.PayRefundListInp) (list []*payin.PayRefundListModel, totalCount int, err error) { + mod := s.Model(ctx) + + // 查询变动ID + if in.Id > 0 { + mod = mod.Where(dao.PayRefund.Columns().Id, in.Id) + } + + // 查询管理员ID + if in.MemberId > 0 { + mod = mod.Where(dao.PayRefund.Columns().MemberId, in.MemberId) + } + + // 查询应用id + if in.AppId != "" { + mod = mod.WhereLike(dao.PayRefund.Columns().AppId, in.AppId) + } + + // 查询备注 + if in.Remark != "" { + mod = mod.WhereLike(dao.PayRefund.Columns().Remark, in.Remark) + } + + // 查询操作人IP + if in.Ip != "" { + mod = mod.WhereLike(dao.PayRefund.Columns().Ip, in.Ip) + } + + // 查询状态 + if in.Status > 0 { + mod = mod.Where(dao.PayRefund.Columns().Status, in.Status) + } + + // 查询创建时间 + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween(dao.PayRefund.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1]) + } + + totalCount, err = mod.Clone().Count() + if err != nil { + return + } + + if totalCount == 0 { + return + } + + err = mod.Fields(payin.PayRefundListModel{}).Page(in.Page, in.PerPage).OrderDesc(dao.PayRefund.Columns().Id).Scan(&list) + return +} + +// Export 导出交易退款 +func (s *sPayRefund) Export(ctx context.Context, in *payin.PayRefundListInp) (err error) { + list, totalCount, err := s.List(ctx, in) + if err != nil { + return + } + + // 字段的排序是依据tags的字段顺序,如果你不想使用默认的排序方式,可以直接定义 tags = []string{"字段名称", "字段名称2", ...} + tags, err := convert.GetEntityDescTags(payin.PayRefundExportModel{}) + if err != nil { + return + } + + var ( + fileName = "导出交易退款-" + gctx.CtxId(ctx) + sheetName = fmt.Sprintf("索引条件共%v行,共%v页,当前导出是第%v页,本页共%v行", totalCount, form.CalPageCount(totalCount, in.PerPage), in.Page, len(list)) + exports []payin.PayRefundExportModel + ) + + if err = gconv.Scan(list, &exports); err != nil { + return + } + + err = excel.ExportByStructs(ctx, tags, exports, fileName, sheetName) + return +} diff --git a/server/internal/logic/sys/addons.go b/server/internal/logic/sys/addons.go new file mode 100644 index 0000000..c54536e --- /dev/null +++ b/server/internal/logic/sys/addons.go @@ -0,0 +1,127 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/text/gstr" + "hotgo/internal/consts" + "hotgo/internal/library/addons" + "hotgo/internal/library/dict" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" +) + +type sSysAddons struct{} + +func NewSysAddons() *sSysAddons { + return &sSysAddons{} +} + +func init() { + service.RegisterSysAddons(NewSysAddons()) +} + +// List 获取列表 +func (s *sSysAddons) List(ctx context.Context, in *sysin.AddonsListInp) (list []*sysin.AddonsListModel, totalCount int, err error) { + sks := addons.GetSkeletons() + if len(sks) == 0 { + return + } + + var ( + i int + _, perPage, offset = form.CalPage(in.Page, in.PerPage) + ) + + for k, skeleton := range sks { + ok := k >= offset && i <= perPage + if !ok { + break + } + row := new(sysin.AddonsListModel) + row.Skeleton = *skeleton + + if in.Group > 0 { + if row.Skeleton.Group != in.Group { + continue + } + } + + if in.Name != "" { + if row.Skeleton.Label != in.Name && row.Skeleton.Name != in.Name { + continue + } + } + + install, err := addons.ScanInstall(row.Skeleton.GetModule()) + if err != nil { + continue + } + + if install == nil { + row.InstallStatus = consts.AddonsInstallStatusNo + row.InstallVersion = "v0.0.0" + } else { + row.InstallStatus = install.Status + row.InstallVersion = install.Version + row.CanSave = gstr.CompareVersion(row.Skeleton.Version, install.Version) > 0 + } + + if in.Status > 0 { + if row.InstallStatus != in.Status { + continue + } + } + + if row.Skeleton.Logo == "" { + row.Skeleton.Logo = consts.AddonsGroupIconMap[row.Skeleton.Group] + } + + row.GroupName = dict.GetOptionLabel(consts.AddonsGroupOptions, row.Skeleton.Group) + list = append(list, row) + i++ + } + + totalCount = len(sks) + return +} + +// Build 提交生成 +func (s *sSysAddons) Build(ctx context.Context, in *sysin.AddonsBuildInp) (err error) { + config, err := service.SysConfig().GetLoadGenerate(ctx) + if err != nil { + return + } + + if config == nil || config.Addon == nil { + err = gerror.New("没有找到有效的生成或插件配置,请检查配置文件是否正常") + return + } + + option := new(addons.BuildOption) + option.Config = config.Addon + option.Skeleton = in.Skeleton + option.Extend = in.Extend + return addons.Build(ctx, option) +} + +// Install 安装模块 +func (s *sSysAddons) Install(ctx context.Context, in *sysin.AddonsInstallInp) (err error) { + return addons.Install(in.GetModule()) +} + +// Upgrade 更新模块 +func (s *sSysAddons) Upgrade(ctx context.Context, in *sysin.AddonsUpgradeInp) (err error) { + return addons.Upgrade(in.GetModule()) +} + +// UnInstall 卸载模块 +func (s *sSysAddons) UnInstall(ctx context.Context, in *sysin.AddonsUnInstallInp) (err error) { + return addons.UnInstall(in.GetModule()) +} diff --git a/server/internal/logic/sys/addons_config.go b/server/internal/logic/sys/addons_config.go new file mode 100644 index 0000000..fd2bbf4 --- /dev/null +++ b/server/internal/logic/sys/addons_config.go @@ -0,0 +1,143 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/simple" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/text/gstr" +) + +var AddonsMaskDemoField []string + +type sSysAddonsConfig struct{} + +func NewSysAddonsConfig() *sSysAddonsConfig { + return &sSysAddonsConfig{} +} + +func init() { + service.RegisterSysAddonsConfig(NewSysAddonsConfig()) +} + +// GetConfigByGroup 获取指定分组的配置 +func (s *sSysAddonsConfig) GetConfigByGroup(ctx context.Context, in *sysin.GetAddonsConfigInp) (res *sysin.GetAddonsConfigModel, err error) { + if in.AddonName == "" { + err = gerror.New("插件名称不能为空") + return + } + + if in.Group == "" { + err = gerror.New("分组不能为空") + return + } + + var ( + mod = dao.SysAddonsConfig.Ctx(ctx) + models []*entity.SysAddonsConfig + cols = dao.SysAddonsConfig.Columns() + ) + + if err = mod.Fields(cols.Key, cols.Value, cols.Type). + Where(cols.AddonName, in.AddonName). + Where(cols.Group, in.Group). + Scan(&models); err != nil { + return nil, err + } + + if len(models) > 0 { + res = new(sysin.GetAddonsConfigModel) + res.List = make(g.Map, len(models)) + for _, v := range models { + val, err := s.ConversionType(ctx, v) + if err != nil { + return nil, err + } + res.List[v.Key] = val + if simple.IsDemo(ctx) && gstr.InArray(AddonsMaskDemoField, v.Key) { + res.List[v.Key] = consts.DemoTips + res.List[v.Key] = consts.DemoTips + } + } + } + return +} + +// ConversionType 转换类型 +func (s *sSysAddonsConfig) ConversionType(ctx context.Context, models *entity.SysAddonsConfig) (value interface{}, err error) { + if models == nil { + err = gerror.New("数据不存在") + return + } + return consts.ConvType(models.Value, models.Type), nil +} + +// UpdateConfigByGroup 更新指定分组的配置 +func (s *sSysAddonsConfig) UpdateConfigByGroup(ctx context.Context, in *sysin.UpdateAddonsConfigInp) (err error) { + if in.AddonName == "" { + err = gerror.New("插件名称不能为空") + return + } + + if in.Group == "" { + err = gerror.New("分组不能为空") + return + } + + var ( + mod = dao.SysAddonsConfig.Ctx(ctx) + models []*entity.SysAddonsConfig + ) + + if err = mod. + Where("addon_name", in.AddonName). + Where("group", in.Group). + Scan(&models); err != nil { + return + } + + err = dao.SysAddonsConfig.Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { + for k, v := range in.List { + row := s.getConfigByKey(k, models) + // 新增 + if row == nil { + return gerror.Newf("暂不支持从前台添加变量,请先在数据库表[%v]中配置变量:%v", dao.SysAddonsConfig.Table(), k) + } + + // 更新 + if _, err = dao.SysAddonsConfig.Ctx(ctx).Where("id", row.Id).Data(g.Map{"value": v, "updated_at": gtime.Now()}).Update(); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + } + + return + }) + return +} + +func (s *sSysAddonsConfig) getConfigByKey(key string, models []*entity.SysAddonsConfig) *entity.SysAddonsConfig { + if len(models) == 0 { + return nil + } + + for _, v := range models { + if key == v.Key { + return v + } + } + return nil +} diff --git a/server/internal/logic/sys/attachment.go b/server/internal/logic/sys/attachment.go new file mode 100644 index 0000000..7f08ec7 --- /dev/null +++ b/server/internal/logic/sys/attachment.go @@ -0,0 +1,128 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/errors/gerror" + "hotgo/internal/dao" + "hotgo/internal/library/contexts" + "hotgo/internal/library/dict" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/library/storager" + "hotgo/internal/model" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/format" +) + +type sSysAttachment struct{} + +func NewSysAttachment() *sSysAttachment { + return &sSysAttachment{} +} + +func init() { + service.RegisterSysAttachment(NewSysAttachment()) + dict.RegisterFunc("AttachmentKindOption", "上传类型选项", service.SysAttachment().AttachmentKindOption) +} + +// Model ORM模型 +func (s *sSysAttachment) Model(ctx context.Context, option ...*handler.Option) *gdb.Model { + return handler.Model(dao.SysAttachment.Ctx(ctx), option...) +} + +// Delete 删除附件 +func (s *sSysAttachment) Delete(ctx context.Context, in *sysin.AttachmentDeleteInp) (err error) { + if _, err = s.Model(ctx).WherePri(in.Id).Delete(); err != nil { + err = gerror.Wrap(err, "删除附件失败,请稍后重试!") + } + return +} + +// View 获取附件信息 +func (s *sSysAttachment) View(ctx context.Context, in *sysin.AttachmentViewInp) (res *sysin.AttachmentViewModel, err error) { + if err = s.Model(ctx).WherePri(in.Id).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取附件信息失败,请稍后重试!") + } + return +} + +// List 获取附件列表 +func (s *sSysAttachment) List(ctx context.Context, in *sysin.AttachmentListInp) (list []*sysin.AttachmentListModel, totalCount int, err error) { + mod := s.Model(ctx) + memberId := contexts.GetUserId(ctx) + + // 超管允许查看指定用户的附件 + if service.AdminMember().VerifySuperId(ctx, memberId) && in.MemberId > 0 { + mod = mod.Where(dao.SysAttachment.Columns().MemberId, in.MemberId) + } else { + mod = mod.Where(dao.SysAttachment.Columns().MemberId, memberId) + } + + if in.Drive != "" { + mod = mod.Where(dao.SysAttachment.Columns().Drive, in.Drive) + } + + if in.Name != "" { + mod = mod.WhereLike(dao.SysAttachment.Columns().Name, "%"+in.Name+"%") + } + + if in.Status > 0 { + mod = mod.Where(dao.SysAttachment.Columns().Status, in.Status) + } + + if len(in.UpdatedAt) == 2 { + mod = mod.WhereBetween(dao.SysAttachment.Columns().UpdatedAt, in.UpdatedAt[0], in.UpdatedAt[1]) + } + + if in.Kind != "" { + mod = mod.Where(dao.SysAttachment.Columns().Kind, in.Kind) + } + + totalCount, err = mod.Count() + if err != nil { + err = gerror.Wrap(err, "获取附件数据行失败!") + return + } + + if totalCount == 0 { + return + } + + if err = mod.Page(in.Page, in.PerPage).OrderDesc(dao.SysAttachment.Columns().UpdatedAt).Scan(&list); err != nil { + err = gerror.Wrap(err, "获取附件列表失败!") + return + } + + for _, v := range list { + v.SizeFormat = format.FileSize(v.Size) + v.FileUrl = storager.LastUrl(ctx, v.FileUrl, v.Drive) + } + return +} + +// ClearKind 清空上传类型 +func (s *sSysAttachment) ClearKind(ctx context.Context, in *sysin.AttachmentClearKindInp) (err error) { + memberId := contexts.GetUserId(ctx) + if _, err = s.Model(ctx).Where(dao.SysAttachment.Columns().MemberId, memberId).Where(dao.SysAttachment.Columns().Kind, in.Kind).Delete(); err != nil { + err = gerror.Wrap(err, "删除附件上传类型失败,请稍后重试!") + } + return +} + +// AttachmentKindOption 上传类型选项 +func (s *sSysAttachment) AttachmentKindOption(ctx context.Context) (opts []*model.Option, err error) { + opts = append(opts, dict.GenDefaultOption("", "全部")) + opts = append(opts, dict.GenSuccessOption(storager.KindImg, "图片", "PictureOutlined")) + opts = append(opts, dict.GenPrimaryOption(storager.KindDoc, "文档", "FileWordOutlined")) + opts = append(opts, dict.GenSuccessOption(storager.KindAudio, "音频", "CustomerServiceOutlined")) + opts = append(opts, dict.GenSuccessOption(storager.KindVideo, "视频", "PlaySquareOutlined")) + opts = append(opts, dict.GenSuccessOption(storager.KindZip, "压缩包", "FileZipOutlined")) + opts = append(opts, dict.GenSuccessOption(storager.KindOther, "其他", "PlusOutlined")) + return +} diff --git a/server/internal/logic/sys/blacklist.go b/server/internal/logic/sys/blacklist.go new file mode 100644 index 0000000..808709c --- /dev/null +++ b/server/internal/logic/sys/blacklist.go @@ -0,0 +1,167 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "github.com/gogf/gf/v2/database/gredis" + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/global" + "hotgo/internal/library/location" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/convert" + "sync" +) + +type sSysBlacklist struct { + sync.RWMutex + list map[string]struct{} +} + +func NewSysBlacklist() *sSysBlacklist { + return &sSysBlacklist{ + list: make(map[string]struct{}), + } +} + +func init() { + service.RegisterSysBlacklist(NewSysBlacklist()) +} + +// Delete 删除 +func (s *sSysBlacklist) Delete(ctx context.Context, in *sysin.BlacklistDeleteInp) (err error) { + defer s.VariableLoad(ctx, err) + _, err = dao.SysBlacklist.Ctx(ctx).Where("id", in.Id).Delete() + return +} + +// Edit 修改/新增 +func (s *sSysBlacklist) Edit(ctx context.Context, in *sysin.BlacklistEditInp) (err error) { + defer s.VariableLoad(ctx, err) + if in.Ip == "" { + err = gerror.New("ip不能为空") + return + } + + // 修改 + if in.Id > 0 { + _, err = dao.SysBlacklist.Ctx(ctx).Where("id", in.Id).Data(in).Update() + return + } + + // 新增 + _, err = dao.SysBlacklist.Ctx(ctx).Data(in).OmitEmptyData().Insert() + return +} + +// Status 更新状态 +func (s *sSysBlacklist) Status(ctx context.Context, in *sysin.BlacklistStatusInp) (err error) { + defer s.VariableLoad(ctx, err) + // 修改 + _, err = dao.SysBlacklist.Ctx(ctx).Where("id", in.Id).Data("status", in.Status).Update() + return +} + +// View 获取指定信息 +func (s *sSysBlacklist) View(ctx context.Context, in *sysin.BlacklistViewInp) (res *sysin.BlacklistViewModel, err error) { + err = dao.SysBlacklist.Ctx(ctx).Where("id", in.Id).Scan(&res) + return +} + +// List 获取列表 +func (s *sSysBlacklist) List(ctx context.Context, in *sysin.BlacklistListInp) (list []*sysin.BlacklistListModel, totalCount int, err error) { + mod := dao.SysBlacklist.Ctx(ctx) + cols := dao.SysBlacklist.Columns() + + if in.Ip != "" { + mod = mod.WhereLike(cols.Ip, "%"+in.Ip+"%") + } + + if in.Remark != "" { + mod = mod.WhereLike(cols.Remark, "%"+in.Remark+"%") + } + + if in.Status > 0 { + mod = mod.Where(cols.Status, in.Status) + } + + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween(cols.CreatedAt, gtime.New(in.CreatedAt[0]), gtime.New(in.CreatedAt[1])) + } + + totalCount, err = mod.Count() + if err != nil { + return + } + + if totalCount == 0 { + return + } + + if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil { + return + } + return +} + +// VariableLoad 变化加载 +func (s *sSysBlacklist) VariableLoad(ctx context.Context, err error) { + if err == nil { + s.Load(ctx) + global.PublishClusterSync(ctx, consts.ClusterSyncSysBlacklist, nil) + } +} + +// Load 加载黑名单 +func (s *sSysBlacklist) Load(ctx context.Context) { + s.RLock() + defer s.RUnlock() + + s.list = make(map[string]struct{}) + + array, err := dao.SysBlacklist.Ctx(ctx). + Fields(dao.SysBlacklist.Columns().Ip). + Where(dao.SysBlacklist.Columns().Status, consts.StatusEnabled). + Array() + if err != nil { + g.Log().Errorf(ctx, "load blacklist fail:%+v", err) + return + } + + for _, v := range array { + list := convert.IpFilterStrategy(v.String()) + if len(list) > 0 { + for k := range list { + s.list[k] = struct{}{} + } + } + } +} + +// VerifyRequest 验证请求的访问IP是否在黑名单,如果存在则返回错误 +func (s *sSysBlacklist) VerifyRequest(r *ghttp.Request) (err error) { + if len(s.list) == 0 { + return + } + + if _, ok := s.list[location.GetClientIp(r)]; ok { + err = gerror.NewCode(gcode.New(gcode.CodeServerBusy.Code(), "请求异常,已被封禁,如有疑问请联系管理员!", nil)) + return + } + return +} + +// ClusterSync 集群同步 +func (s *sSysBlacklist) ClusterSync(ctx context.Context, message *gredis.Message) { + s.Load(ctx) +} diff --git a/server/internal/logic/sys/config.go b/server/internal/logic/sys/config.go new file mode 100644 index 0000000..5aa923e --- /dev/null +++ b/server/internal/logic/sys/config.go @@ -0,0 +1,332 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "fmt" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/global" + "hotgo/internal/library/payment" + "hotgo/internal/library/sms" + "hotgo/internal/library/storager" + "hotgo/internal/library/token" + "hotgo/internal/library/wechat" + "hotgo/internal/model" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/simple" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/database/gredis" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/util/gconv" +) + +type sSysConfig struct{} + +func NewSysConfig() *sSysConfig { + return &sSysConfig{} +} + +func init() { + service.RegisterSysConfig(NewSysConfig()) +} + +// InitConfig 初始化系统配置 +func (s *sSysConfig) InitConfig(ctx context.Context) { + if err := s.LoadConfig(ctx); err != nil { + g.Log().Fatalf(ctx, "InitConfig fail:%+v", err) + } +} + +// LoadConfig 加载系统配置 +func (s *sSysConfig) LoadConfig(ctx context.Context) (err error) { + wx, err := s.GetWechat(ctx) + if err != nil { + return + } + wechat.SetConfig(wx) + + pay, err := s.GetPay(ctx) + if err != nil { + return + } + payment.SetConfig(pay) + + upload, err := s.GetUpload(ctx) + if err != nil { + return + } + storager.SetConfig(upload) + + sm, err := s.GetSms(ctx) + if err != nil { + return + } + sms.SetConfig(sm) + + tk, err := s.GetLoadToken(ctx) + if err != nil { + return + } + token.SetConfig(tk) + + // 更多 + // ... + return +} + +// GetLogin 获取登录配置 +func (s *sSysConfig) GetLogin(ctx context.Context) (conf *model.LoginConfig, err error) { + models, err := s.GetConfigByGroup(ctx, &sysin.GetConfigInp{Group: "login"}) + if err != nil { + return + } + err = gconv.Scan(models.List, &conf) + return +} + +// GetWechat 获取微信配置 +func (s *sSysConfig) GetWechat(ctx context.Context) (conf *model.WechatConfig, err error) { + models, err := s.GetConfigByGroup(ctx, &sysin.GetConfigInp{Group: "wechat"}) + if err != nil { + return + } + err = gconv.Scan(models.List, &conf) + return +} + +// GetPay 获取支付配置 +func (s *sSysConfig) GetPay(ctx context.Context) (conf *model.PayConfig, err error) { + models, err := s.GetConfigByGroup(ctx, &sysin.GetConfigInp{Group: "pay"}) + if err != nil { + return + } + err = gconv.Scan(models.List, &conf) + return +} + +// GetSms 获取短信配置 +func (s *sSysConfig) GetSms(ctx context.Context) (conf *model.SmsConfig, err error) { + models, err := s.GetConfigByGroup(ctx, &sysin.GetConfigInp{Group: "sms"}) + if err != nil { + return + } + err = gconv.Scan(models.List, &conf) + return +} + +// GetGeo 获取地理配置 +func (s *sSysConfig) GetGeo(ctx context.Context) (conf *model.GeoConfig, err error) { + models, err := s.GetConfigByGroup(ctx, &sysin.GetConfigInp{Group: "geo"}) + if err != nil { + return + } + err = gconv.Scan(models.List, &conf) + return +} + +// GetUpload 获取上传配置 +func (s *sSysConfig) GetUpload(ctx context.Context) (conf *model.UploadConfig, err error) { + models, err := s.GetConfigByGroup(ctx, &sysin.GetConfigInp{Group: "upload"}) + if err != nil { + return + } + err = gconv.Scan(models.List, &conf) + return +} + +// GetSmtp 获取邮件配置 +func (s *sSysConfig) GetSmtp(ctx context.Context) (conf *model.EmailConfig, err error) { + models, err := s.GetConfigByGroup(ctx, &sysin.GetConfigInp{Group: "smtp"}) + if err != nil { + return + } + if err = gconv.Scan(models.List, &conf); err != nil { + return + } + + conf.Addr = fmt.Sprintf("%s:%d", conf.Host, conf.Port) + + return +} + +// GetBasic 获取基础配置 +func (s *sSysConfig) GetBasic(ctx context.Context) (conf *model.BasicConfig, err error) { + models, err := s.GetConfigByGroup(ctx, &sysin.GetConfigInp{Group: "basic"}) + if err != nil { + return + } + err = gconv.Scan(models.List, &conf) + return +} + +// GetLoadTCP 获取本地tcp配置 +func (s *sSysConfig) GetLoadTCP(ctx context.Context) (conf *model.TCPConfig, err error) { + err = g.Cfg().MustGet(ctx, "tcp").Scan(&conf) + return +} + +// GetLoadGenerate 获取本地生成配置 +func (s *sSysConfig) GetLoadGenerate(ctx context.Context) (conf *model.GenerateConfig, err error) { + err = g.Cfg().MustGet(ctx, "hggen").Scan(&conf) + return +} + +// GetLoadToken 获取本地token配置 +func (s *sSysConfig) GetLoadToken(ctx context.Context) (conf *model.TokenConfig, err error) { + err = g.Cfg().MustGet(ctx, "token").Scan(&conf) + return +} + +// GetLoadLog 获取本地日志配置 +func (s *sSysConfig) GetLoadLog(ctx context.Context) (conf *model.LogConfig, err error) { + err = g.Cfg().MustGet(ctx, "system.log").Scan(&conf) + return +} + +// GetLoadServeLog 获取本地服务日志配置 +func (s *sSysConfig) GetLoadServeLog(ctx context.Context) (conf *model.ServeLogConfig, err error) { + err = g.Cfg().MustGet(ctx, "system.serveLog").Scan(&conf) + return +} + +// GetConfigByGroup 获取指定分组的配置 +func (s *sSysConfig) GetConfigByGroup(ctx context.Context, in *sysin.GetConfigInp) (res *sysin.GetConfigModel, err error) { + if in.Group == "" { + err = gerror.New("分组不能为空") + return + } + + var models []*entity.SysConfig + cols := dao.SysConfig.Columns() + if err = dao.SysConfig.Ctx(ctx).Fields(cols.Key, cols.Value, cols.Type).Where(cols.Group, in.Group).Scan(&models); err != nil { + err = gerror.Wrapf(err, "获取配置分组[ %v ]失败,请稍后重试!", in.Group) + return + } + + res = new(sysin.GetConfigModel) + if len(models) > 0 { + res.List = make(g.Map, len(models)) + for _, v := range models { + val, err := s.ConversionType(ctx, v) + if err != nil { + return nil, err + } + res.List[v.Key] = val + } + } + + res.List = simple.FilterMaskDemo(ctx, res.List) + return +} + +// ConversionType 转换类型 +func (s *sSysConfig) ConversionType(ctx context.Context, models *entity.SysConfig) (value interface{}, err error) { + if models == nil { + err = gerror.New("数据不存在") + return + } + return consts.ConvType(models.Value, models.Type), nil +} + +// UpdateConfigByGroup 更新指定分组的配置 +func (s *sSysConfig) UpdateConfigByGroup(ctx context.Context, in *sysin.UpdateConfigInp) (err error) { + if in.Group == "" { + err = gerror.New("分组不能为空") + return + } + var ( + mod = dao.SysConfig.Ctx(ctx) + models []*entity.SysConfig + ) + + if err = mod.Where("group", in.Group).Scan(&models); err != nil { + return + } + + err = dao.SysConfig.Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { + for k, v := range in.List { + row := s.getConfigByKey(k, models) + // 新增 + if row == nil { + err = gerror.Newf("暂不支持从前台添加变量,请先在数据库表[%v]中配置变量:%v", dao.SysConfig.Table(), k) + return + } + + // 更新 + _, err = dao.SysConfig.Ctx(ctx).Where("id", row.Id).Data(g.Map{"value": v, "updated_at": gtime.Now()}).Update() + if err != nil { + return + } + } + return s.syncUpdate(ctx, in) + }) + + if err != nil { + return + } + + global.PublishClusterSync(ctx, consts.ClusterSyncSysconfig, nil) + return +} + +func (s *sSysConfig) getConfigByKey(key string, models []*entity.SysConfig) *entity.SysConfig { + if len(models) == 0 { + return nil + } + + for _, v := range models { + if key == v.Key { + return v + } + } + return nil +} + +// syncUpdate 同步更新一些加载配置 +func (s *sSysConfig) syncUpdate(ctx context.Context, in *sysin.UpdateConfigInp) (err error) { + var cfg any + switch in.Group { + case "wechat": + cfg, err = s.GetWechat(ctx) + if err == nil { + wechat.SetConfig(cfg.(*model.WechatConfig)) + } + case "pay": + cfg, err = s.GetPay(ctx) + if err == nil { + payment.SetConfig(cfg.(*model.PayConfig)) + } + case "upload": + cfg, err = s.GetUpload(ctx) + if err == nil { + storager.SetConfig(cfg.(*model.UploadConfig)) + } + case "sms": + cfg, err = s.GetSms(ctx) + if err == nil { + sms.SetConfig(cfg.(*model.SmsConfig)) + } + } + + if err != nil { + err = gerror.Newf("syncUpdate %v conifg fail:%+v", in.Group, err.Error()) + } + return +} + +// ClusterSync 集群同步 +func (s *sSysConfig) ClusterSync(ctx context.Context, message *gredis.Message) { + if err := s.LoadConfig(ctx); err != nil { + g.Log().Errorf(ctx, "ClusterSync fail:%+v", err) + } +} diff --git a/server/internal/logic/sys/cron.go b/server/internal/logic/sys/cron.go new file mode 100644 index 0000000..54e50c3 --- /dev/null +++ b/server/internal/logic/sys/cron.go @@ -0,0 +1,244 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/cron" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/simple" + "hotgo/utility/validate" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gctx" +) + +type sSysCron struct{} + +func NewSysCron() *sSysCron { + return &sSysCron{} +} + +func init() { + service.RegisterSysCron(NewSysCron()) +} + +func (s *sSysCron) StartCron(ctx context.Context) { + var list []*entity.SysCron + if err := dao.SysCron.Ctx(ctx). + Where("status", consts.StatusEnabled). + Order("sort asc,id desc"). + Scan(&list); err != nil { + cron.Logger().Fatalf(ctx, "定时任务获取失败, err . %v", err) + return + } + + if err := cron.StartALL(list); err != nil { + cron.Logger().Fatalf(ctx, "定时任务启动失败, err . %v", err) + return + } +} + +// Delete 删除 +func (s *sSysCron) Delete(ctx context.Context, in *sysin.CronDeleteInp) (err error) { + var models *entity.SysCron + if err = dao.SysCron.Ctx(ctx).Where("id", in.Id).Scan(&models); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if models == nil { + err = gerror.New("定时任务不存在或已被删除") + return + } + + err = g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { + if _, err = dao.SysCron.Ctx(ctx).Where("id", in.Id).Delete(); err != nil { + return + } + return cron.Delete(models) + }) + return +} + +// Edit 修改/新增 +func (s *sSysCron) Edit(ctx context.Context, in *sysin.CronEditInp) (err error) { + if in.Name == "" { + err = gerror.New("标题不能为空") + return + } + + // 修改 + if in.Id > 0 { + if _, err = dao.SysCron.Ctx(ctx).Where("id", in.Id).Data(in).Update(); err != nil { + return + } + simple.SafeGo(ctx, func(ctx context.Context) { + _ = cron.RefreshStatus(&in.SysCron) + }) + return + } + + // 新增 + in.SysCron.Id, err = dao.SysCron.Ctx(ctx).Data(in).OmitEmptyData().InsertAndGetId() + if err != nil || in.SysCron.Id < 1 { + return + } + + if in.SysCron.Status == consts.StatusEnabled { + simple.SafeGo(ctx, func(ctx context.Context) { + _ = cron.Start(&in.SysCron) + }) + } + return +} + +// Status 更新状态 +func (s *sSysCron) Status(ctx context.Context, in *sysin.CronStatusInp) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + + var models *entity.SysCron + if err = dao.SysCron.Ctx(ctx).Where("id", in.Id).Scan(&models); err != nil { + return + } + + if models == nil { + err = gerror.New("定时任务不存在") + return + } + + _, err = dao.SysCron.Ctx(ctx).Where("id", in.Id).Data("status", in.Status).Update() + if err != nil { + return + } + + models.Status = in.Status + simple.SafeGo(ctx, func(ctx context.Context) { + _ = cron.RefreshStatus(models) + }) + return +} + +// MaxSort 最大排序 +func (s *sSysCron) MaxSort(ctx context.Context, in *sysin.CronMaxSortInp) (res *sysin.CronMaxSortModel, err error) { + if err = dao.SysCron.Ctx(ctx).Where("id", in.Id).Order("sort desc").Scan(&res); err != nil { + return + } + + if res == nil { + res = new(sysin.CronMaxSortModel) + } + + res.Sort = form.DefaultMaxSort(res.Sort) + return +} + +// View 获取指定信息 +func (s *sSysCron) View(ctx context.Context, in *sysin.CronViewInp) (res *sysin.CronViewModel, err error) { + if err = dao.SysCron.Ctx(ctx).Where("id", in.Id).Scan(&res); err != nil { + return + } + return +} + +// List 获取列表 +func (s *sSysCron) List(ctx context.Context, in *sysin.CronListInp) (list []*sysin.CronListModel, totalCount int, err error) { + mod := dao.SysCron.Ctx(ctx) + + if in.Name != "" { + mod = mod.WhereLike("name", "%"+in.Name+"%") + } + + if in.GroupId > 0 { + mod = mod.Where("group_id", in.GroupId) + } + + if in.Status > 0 { + mod = mod.Where("status", in.Status) + } + + totalCount, err = mod.Count() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if totalCount == 0 { + return + } + + if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + for _, v := range list { + v.GroupName, _ = s.GetName(ctx, v.GroupId) + } + return +} + +// GetName 获取分组名称 +func (s *sSysCron) GetName(ctx context.Context, id int64) (name string, err error) { + m := dao.SysCronGroup.Ctx(ctx).Fields(dao.SysCronGroup.Columns().Name).Where(dao.SysCronGroup.Columns().Id, id) + list, err := m.Value() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return name, err + } + return list.String(), nil +} + +// OnlineExec 在线执行 +func (s *sSysCron) OnlineExec(ctx context.Context, in *sysin.OnlineExecInp) (err error) { + var data *entity.SysCron + if err = dao.SysCron.Ctx(ctx).Where(dao.SysCron.Columns().Id, in.Id).Scan(&data); err != nil { + return + } + + if data == nil { + err = gerror.New("定时任务不存在") + return + } + return cron.Once(gctx.New(), data) +} + +// DispatchLog 查看指定任务的调度日志 +func (s *sSysCron) DispatchLog(ctx context.Context, in *sysin.DispatchLogInp) (res *sysin.DispatchLogModel, err error) { + var data *entity.SysCron + if err = dao.SysCron.Ctx(ctx).Where(dao.SysCron.Columns().Id, in.Id).Scan(&data); err != nil { + return + } + + if data == nil { + err = gerror.New("定时任务不存在") + return + } + + res = new(sysin.DispatchLogModel) + res.Log, err = cron.DispatchLog(data) + return +} diff --git a/server/internal/logic/sys/cron_group.go b/server/internal/logic/sys/cron_group.go new file mode 100644 index 0000000..12e0a78 --- /dev/null +++ b/server/internal/logic/sys/cron_group.go @@ -0,0 +1,161 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + + "github.com/gogf/gf/v2/errors/gerror" +) + +type sSysCronGroup struct{} + +func NewSysCronGroup() *sSysCronGroup { + return &sSysCronGroup{} +} + +func init() { + service.RegisterSysCronGroup(NewSysCronGroup()) +} + +// Delete 删除 +func (s *sSysCronGroup) Delete(ctx context.Context, in *sysin.CronGroupDeleteInp) (err error) { + _, err = dao.SysCronGroup.Ctx(ctx).Where("id", in.Id).Delete() + return +} + +// Edit 修改/新增 +func (s *sSysCronGroup) Edit(ctx context.Context, in *sysin.CronGroupEditInp) (err error) { + // 修改 + if in.Id > 0 { + if _, err = dao.SysCronGroup.Ctx(ctx).Fields(sysin.CronGroupUpdateFields{}).Where("id", in.Id).Data(in).Update(); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + } + return + } + + // 新增 + if _, err = dao.SysCronGroup.Ctx(ctx).Fields(sysin.CronGroupInsertFields{}).Data(in).OmitEmptyData().Insert(); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + } + return +} + +// Status 更新状态 +func (s *sSysCronGroup) Status(ctx context.Context, in *sysin.CronGroupStatusInp) (err error) { + if _, err = dao.SysCronGroup.Ctx(ctx).Where("id", in.Id).Data("status", in.Status).Update(); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + } + return +} + +// MaxSort 最大排序 +func (s *sSysCronGroup) MaxSort(ctx context.Context, in *sysin.CronGroupMaxSortInp) (res *sysin.CronGroupMaxSortModel, err error) { + if in.Id > 0 { + if err = dao.SysCronGroup.Ctx(ctx).Where("id", in.Id).Order("sort desc").Scan(&res); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + } + + if res == nil { + res = new(sysin.CronGroupMaxSortModel) + } + + res.Sort = form.DefaultMaxSort(res.Sort) + return +} + +// View 获取指定信息 +func (s *sSysCronGroup) View(ctx context.Context, in *sysin.CronGroupViewInp) (res *sysin.CronGroupViewModel, err error) { + if err = dao.SysCronGroup.Ctx(ctx).Where("id", in.Id).Scan(&res); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + } + return +} + +// List 获取列表 +func (s *sSysCronGroup) List(ctx context.Context, in *sysin.CronGroupListInp) (list []*sysin.CronGroupListModel, totalCount int, err error) { + mod := dao.SysCronGroup.Ctx(ctx) + + if in.Name != "" { + mod = mod.WhereLike("name", "%"+in.Name+"%") + } + + if in.Status > 0 { + mod = mod.Where("status", in.Status) + } + + totalCount, err = mod.Count() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if totalCount == 0 { + return + } + + if err = mod.Page(in.Page, in.PerPage).OrderDesc(dao.SysCronGroup.Columns().Id).Scan(&list); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + } + + for _, v := range list { + if v.Pid < 1 { + continue + } + name, err := dao.SysCronGroup.Ctx(ctx).Fields(dao.SysCronGroup.Columns().Name).WherePri(v.Pid).Value() + if err != nil { + return nil, 0, err + } + v.SupName = name.String() + } + return +} + +// Select 选项 +func (s *sSysCronGroup) Select(ctx context.Context, in *sysin.CronGroupSelectInp) (res *sysin.CronGroupSelectModel, err error) { + var ( + mod = dao.SysCronGroup.Ctx(ctx) + models []*entity.SysCronGroup + ) + + if err = mod.Order("pid asc,sort asc").Scan(&models); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + res = new(sysin.CronGroupSelectModel) + res.List = s.treeList(0, models) + return +} + +// treeList 树状列表 +func (s *sSysCronGroup) treeList(pid int64, nodes []*entity.SysCronGroup) (list []*sysin.CronGroupTree) { + list = make([]*sysin.CronGroupTree, 0) + for _, v := range nodes { + if v.Pid == pid { + item := new(sysin.CronGroupTree) + item.SysCronGroup = *v + item.Label = v.Name + item.Value = v.Id + item.Key = v.Id + + child := s.treeList(v.Id, nodes) + if len(child) > 0 { + item.Children = child + } + list = append(list, item) + } + } + return +} diff --git a/server/internal/logic/sys/curd_demo.go b/server/internal/logic/sys/curd_demo.go new file mode 100644 index 0000000..0e26596 --- /dev/null +++ b/server/internal/logic/sys/curd_demo.go @@ -0,0 +1,240 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2025 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.18.6 +package sys + +import ( + "context" + "fmt" + "hotgo/internal/dao" + "hotgo/internal/library/contexts" + "hotgo/internal/library/hgorm" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/library/hgorm/hook" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/convert" + "hotgo/utility/excel" + "hotgo/utility/validate" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/util/gconv" +) + +type sSysCurdDemo struct{} + +func NewSysCurdDemo() *sSysCurdDemo { + return &sSysCurdDemo{} +} + +func init() { + service.RegisterSysCurdDemo(NewSysCurdDemo()) +} + +// Model CURD列表ORM模型 +func (s *sSysCurdDemo) Model(ctx context.Context, option ...*handler.Option) *gdb.Model { + return handler.Model(dao.SysGenCurdDemo.Ctx(ctx), option...) +} + +// List 获取CURD列表列表 +func (s *sSysCurdDemo) List(ctx context.Context, in *sysin.CurdDemoListInp) (list []*sysin.CurdDemoListModel, totalCount int, err error) { + mod := s.Model(ctx) + + // 字段过滤 + mod = mod.FieldsPrefix(dao.SysGenCurdDemo.Table(), sysin.CurdDemoListModel{}) + mod = mod.Fields(hgorm.JoinFields(ctx, sysin.CurdDemoListModel{}, &dao.TestCategory, "testCategory")) + + // 关联表字段 + mod = mod.LeftJoinOnFields(dao.TestCategory.Table(), dao.SysGenCurdDemo.Columns().CategoryId, "=", dao.TestCategory.Columns().Id) + + // 查询ID + if in.Id > 0 { + mod = mod.Where(dao.SysGenCurdDemo.Columns().Id, in.Id) + } + + // 查询标题 + if in.Title != "" { + mod = mod.WhereLike(dao.SysGenCurdDemo.Columns().Title, "%"+in.Title+"%") + } + + // 查询描述 + if in.Description != "" { + mod = mod.WhereLike(dao.SysGenCurdDemo.Columns().Description, "%"+in.Description+"%") + } + + // 查询创建者 + if in.CreatedBy != "" { + ids, err := service.AdminMember().GetIdsByKeyword(ctx, in.CreatedBy) + if err != nil { + return nil, 0, err + } + mod = mod.WhereIn(dao.SysGenCurdDemo.Columns().CreatedBy, ids) + } + + // 查询删除者 + if in.DeletedBy != "" { + ids, err := service.AdminMember().GetIdsByKeyword(ctx, in.DeletedBy) + if err != nil { + return nil, 0, err + } + mod = mod.WhereIn(dao.SysGenCurdDemo.Columns().DeletedBy, ids) + } + + // 查询创建时间 + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween(dao.SysGenCurdDemo.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1]) + } + + // 查询关联分类 + if in.TestCategoryName != "" { + mod = mod.WherePrefix(dao.TestCategory.Table(), dao.TestCategory.Columns().Name, in.TestCategoryName) + } + + // 分页 + mod = mod.Page(in.Page, in.PerPage) + + // 排序 + mod = mod.OrderAsc(dao.SysGenCurdDemo.Table() + "." + dao.SysGenCurdDemo.Columns().Sort).OrderDesc(dao.SysGenCurdDemo.Table() + "." + dao.SysGenCurdDemo.Columns().Id) + + // 操作人摘要信息 + mod = mod.Hook(hook.MemberSummary) + + // 查询数据 + if err = mod.ScanAndCount(&list, &totalCount, false); err != nil { + err = gerror.Wrap(err, "获取CURD列表列表失败,请稍后重试!") + return + } + return +} + +// Export 导出CURD列表 +func (s *sSysCurdDemo) Export(ctx context.Context, in *sysin.CurdDemoListInp) (err error) { + list, totalCount, err := s.List(ctx, in) + if err != nil { + return + } + + // 字段的排序是依据tags的字段顺序,如果你不想使用默认的排序方式,可以直接定义 tags = []string{"字段名称", "字段名称2", ...} + tags, err := convert.GetEntityDescTags(sysin.CurdDemoExportModel{}) + if err != nil { + return + } + + var ( + fileName = "导出CURD列表-" + gctx.CtxId(ctx) + sheetName = fmt.Sprintf("索引条件共%v行,共%v页,当前导出是第%v页,本页共%v行", totalCount, form.CalPageCount(totalCount, in.PerPage), in.Page, len(list)) + exports []sysin.CurdDemoExportModel + ) + + if err = gconv.Scan(list, &exports); err != nil { + return + } + + err = excel.ExportByStructs(ctx, tags, exports, fileName, sheetName) + return +} + +// Edit 修改/新增CURD列表 +func (s *sSysCurdDemo) Edit(ctx context.Context, in *sysin.CurdDemoEditInp) (err error) { + return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { + + // 修改 + if in.Id > 0 { + in.UpdatedBy = contexts.GetUserId(ctx) + if _, err = s.Model(ctx). + Fields(sysin.CurdDemoUpdateFields{}). + WherePri(in.Id).Data(in).Update(); err != nil { + err = gerror.Wrap(err, "修改CURD列表失败,请稍后重试!") + } + return + } + + // 新增 + in.CreatedBy = contexts.GetUserId(ctx) + if _, err = s.Model(ctx, &handler.Option{FilterAuth: false}). + Fields(sysin.CurdDemoInsertFields{}). + Data(in).OmitEmptyData().Insert(); err != nil { + err = gerror.Wrap(err, "新增CURD列表失败,请稍后重试!") + } + return + }) +} + +// Delete 删除CURD列表 +func (s *sSysCurdDemo) Delete(ctx context.Context, in *sysin.CurdDemoDeleteInp) (err error) { + + if _, err = s.Model(ctx).WherePri(in.Id).Data(g.Map{ + dao.SysGenCurdDemo.Columns().DeletedBy: contexts.GetUserId(ctx), + dao.SysGenCurdDemo.Columns().DeletedAt: gtime.Now(), + }).Unscoped().Update(); err != nil { + err = gerror.Wrap(err, "删除CURD列表失败,请稍后重试!") + return + } + return +} + +// MaxSort 获取CURD列表最大排序 +func (s *sSysCurdDemo) MaxSort(ctx context.Context, in *sysin.CurdDemoMaxSortInp) (res *sysin.CurdDemoMaxSortModel, err error) { + if err = dao.SysGenCurdDemo.Ctx(ctx).Fields(dao.SysGenCurdDemo.Columns().Sort).OrderDesc(dao.SysGenCurdDemo.Columns().Sort).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取CURD列表最大排序,请稍后重试!") + return + } + + if res == nil { + res = new(sysin.CurdDemoMaxSortModel) + } + + res.Sort = form.DefaultMaxSort(res.Sort) + return +} + +// View 获取CURD列表指定信息 +func (s *sSysCurdDemo) View(ctx context.Context, in *sysin.CurdDemoViewInp) (res *sysin.CurdDemoViewModel, err error) { + if err = s.Model(ctx).WherePri(in.Id).Hook(hook.MemberSummary).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取CURD列表信息,请稍后重试!") + return + } + return +} + +// Status 更新CURD列表状态 +func (s *sSysCurdDemo) Status(ctx context.Context, in *sysin.CurdDemoStatusInp) (err error) { + if _, err = s.Model(ctx).WherePri(in.Id).Data(g.Map{ + dao.SysGenCurdDemo.Columns().Status: in.Status, + dao.SysGenCurdDemo.Columns().UpdatedBy: contexts.GetUserId(ctx), + }).Update(); err != nil { + err = gerror.Wrap(err, "更新CURD列表状态失败,请稍后重试!") + return + } + return +} + +// Switch 更新CURD列表开关 +func (s *sSysCurdDemo) Switch(ctx context.Context, in *sysin.CurdDemoSwitchInp) (err error) { + var fields = []string{ + dao.SysGenCurdDemo.Columns().Switch, + // ... + } + + if !validate.InSlice(fields, in.Key) { + err = gerror.New("开关键名不在白名单") + return + } + + if _, err = s.Model(ctx).WherePri(in.Id).Data(g.Map{ + in.Key: in.Value, + dao.SysGenCurdDemo.Columns().UpdatedBy: contexts.GetUserId(ctx), + }).Update(); err != nil { + err = gerror.Wrap(err, "更新CURD列表开关失败,请稍后重试!") + return + } + return +} diff --git a/server/internal/logic/sys/dict_data.go b/server/internal/logic/sys/dict_data.go new file mode 100644 index 0000000..fe5b9d9 --- /dev/null +++ b/server/internal/logic/sys/dict_data.go @@ -0,0 +1,178 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "errors" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/dict" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" +) + +type sSysDictData struct{} + +func NewSysDictData() *sSysDictData { + return &sSysDictData{} +} + +func init() { + service.RegisterSysDictData(NewSysDictData()) +} + +// Delete 删除 +func (s *sSysDictData) Delete(ctx context.Context, in *sysin.DictDataDeleteInp) error { + _, err := dao.SysDictData.Ctx(ctx).Where("id", in.Id).Delete() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + return nil +} + +// Edit 修改/新增 +func (s *sSysDictData) Edit(ctx context.Context, in *sysin.DictDataEditInp) (err error) { + // 修改 + if in.Id > 0 { + _, err = dao.SysDictData.Ctx(ctx).Fields(sysin.DictDataUpdateFields{}).WherePri(in.Id).Data(in).Update() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + return nil + } + + // 新增 + in.Type, err = s.GetType(ctx, in.TypeID) + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + + if in.Type == "" { + return gerror.Wrap(err, "类型选择无效,请检查") + } + + _, err = dao.SysDictData.Ctx(ctx).Fields(sysin.DictDataInsertFields{}).Data(in).OmitEmptyData().Insert() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + return nil +} + +// List 获取列表 +func (s *sSysDictData) List(ctx context.Context, in *sysin.DictDataListInp) (list []*sysin.DictDataListModel, totalCount int, err error) { + mod := dao.SysDictData.Ctx(ctx) + // 类型ID + if in.TypeID > 0 { + types, err := s.GetTypes(ctx, in.TypeID) + if err != nil { + return list, totalCount, err + } + mod = mod.WhereIn("type", types) + } + + if in.Type != "" { + mod = mod.Where("type", in.Type) + } + + if in.Value != "" { + mod = mod.Where("value", in.Value) + } + + if in.Label != "" { + mod = mod.WhereLike("label", "%"+in.Label+"%") + } + + if in.Status > 0 { + mod = mod.Where("status", in.Status) + } + + totalCount, err = mod.Count() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return list, totalCount, err + } + + if totalCount == 0 { + return list, totalCount, nil + } + + if err = mod.Page(in.Page, in.PerPage).Order("sort asc,id desc").Scan(&list); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return list, totalCount, err + } + + for _, v := range list { + v.TypeID, _ = s.GetId(ctx, v.Type) + } + return list, totalCount, err +} + +// GetId 获取指定类型的ID +func (s *sSysDictData) GetId(ctx context.Context, t string) (id int64, err error) { + m := dao.SysDictType.Ctx(ctx).Fields(dao.SysDictType.Columns().Id).Where(dao.SysDictType.Columns().Type, t).Where(dao.SysDictType.Columns().Status, consts.StatusEnabled) + val, err := m.Value() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return 0, err + } + return val.Int64(), nil +} + +// GetType 获取指定ID的类型标识 +func (s *sSysDictData) GetType(ctx context.Context, id int64) (types string, err error) { + m := dao.SysDictType.Ctx(ctx).Fields(dao.SysDictType.Columns().Type).Where(dao.SysDictType.Columns().Id, id).Where(dao.SysDictType.Columns().Status, consts.StatusEnabled) + val, err := m.Value() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return types, err + } + return val.String(), nil +} + +// GetTypes 获取指定ID的所有类型标识,包含下级 +func (s *sSysDictData) GetTypes(ctx context.Context, id int64) (types []string, err error) { + columns, err := dao.SysDictType.Ctx(ctx).Fields(dao.SysDictType.Columns().Type). + Where(dao.SysDictType.Columns().Id, id).WhereOr(dao.SysDictType.Columns().Pid, id).Where(dao.SysDictType.Columns().Status, consts.StatusEnabled). + Array() + types = g.NewVar(columns).Strings() + return +} + +// Select 获取列表 +func (s *sSysDictData) Select(ctx context.Context, in *sysin.DataSelectInp) (list sysin.DataSelectModel, err error) { + // 优先从内置字典中获取 + options, err := dict.GetOptions(ctx, in.Type) + if err == nil { + return options, nil + } + if !errors.Is(err, dict.NotExistKeyError) { + return nil, err + } + + mod := dao.SysDictData.Ctx(ctx).Where("type", in.Type) + if err = mod.Order("sort asc,id desc").Scan(&list); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + for k, v := range list { + list[k].Value = consts.ConvType(v.Value, v.ValueType) + list[k].Key = list[k].Value + } + + if len(list) == 0 { + list = make(sysin.DataSelectModel, 0) + } + return +} diff --git a/server/internal/logic/sys/dict_type.go b/server/internal/logic/sys/dict_type.go new file mode 100644 index 0000000..c45154d --- /dev/null +++ b/server/internal/logic/sys/dict_type.go @@ -0,0 +1,204 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/dict" + "hotgo/internal/library/hgorm" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" +) + +type sSysDictType struct{} + +func NewSysDictType() *sSysDictType { + return &sSysDictType{} +} + +func init() { + service.RegisterSysDictType(NewSysDictType()) +} + +// Tree 树 +func (s *sSysDictType) Tree(ctx context.Context) (list []*sysin.DictTypeTree, err error) { + var ( + mod = dao.SysDictType.Ctx(ctx) + models []*entity.SysDictType + ) + + if err = mod.Order("sort asc,id asc").Scan(&models); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + list = s.treeList(0, models) + return +} + +// Delete 删除 +func (s *sSysDictType) Delete(ctx context.Context, in *sysin.DictTypeDeleteInp) (err error) { + var models *entity.SysDictType + if err = dao.SysDictType.Ctx(ctx).Where("id", in.Id).Scan(&models); err != nil { + return + } + + if models == nil { + err = gerror.New("数据不存在或已删除!") + return + } + + exist, err := dao.SysDictData.Ctx(ctx).Where("type", models.Type).One() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + if !exist.IsEmpty() { + err = gerror.New("请先删除该字典类型下得所有字典数据!") + return + } + + pidExist, err := dao.SysDictType.Ctx(ctx).Where("pid", models.Id).One() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + + if !pidExist.IsEmpty() { + err = gerror.New("请先删除该字典类型下得所有子级类型!") + return + } + + _, err = dao.SysDictType.Ctx(ctx).Where("id", in.Id).Delete() + return +} + +// Edit 修改/新增 +func (s *sSysDictType) Edit(ctx context.Context, in *sysin.DictTypeEditInp) (err error) { + if err = hgorm.IsUnique(ctx, &dao.SysDictType, g.Map{dao.SysDictType.Columns().Name: in.Name}, "名称已存在", in.Id); err != nil { + return + } + + // 修改 + if in.Id > 0 { + if _, err = dao.SysDictType.Ctx(ctx).Fields(sysin.DictTypeUpdateFields{}).WherePri(in.Id).Data(in).Update(); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + } + return + } + + // 新增 + if _, err = dao.SysDictType.Ctx(ctx).Fields(sysin.DictTypeInsertFields{}).Data(in).OmitEmptyData().Insert(); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + } + return +} + +// TreeSelect 获取类型关系树选项 +func (s *sSysDictType) TreeSelect(ctx context.Context, in *sysin.DictTreeSelectInp) (list []*sysin.DictTypeTree, err error) { + var ( + mod = dao.SysDictType.Ctx(ctx) + models []*entity.SysDictType + ) + + if err = mod.Order("pid asc,sort asc").Scan(&models); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + list = s.treeList(0, models) + list = append(list, s.BuiltinSelect()...) + return +} + +// BuiltinSelect 内置字典选项 +func (s *sSysDictType) BuiltinSelect() (list []*sysin.DictTypeTree) { + top := &sysin.DictTypeTree{ + SysDictType: entity.SysDictType{ + Id: dict.BuiltinId, + Pid: 0, + }, + Label: "内置字典", + Value: dict.BuiltinId, + Key: dict.BuiltinId, + } + + enums := &sysin.DictTypeTree{ + SysDictType: entity.SysDictType{ + Id: dict.EnumsId, + Pid: dict.BuiltinId, + }, + Label: "枚举字典", + Value: dict.EnumsId, + Key: dict.EnumsId, + } + + for _, v := range dict.GetAllEnums() { + children := &sysin.DictTypeTree{ + SysDictType: entity.SysDictType{ + Id: v.Id, + Pid: dict.EnumsId, + }, + Label: v.Label, + Value: v.Id, + Key: v.Id, + } + enums.Children = append(enums.Children, children) + } + + fun := &sysin.DictTypeTree{ + SysDictType: entity.SysDictType{ + Id: dict.FuncId, + Pid: dict.BuiltinId, + }, + Label: "方法字典", + Value: dict.FuncId, + Key: dict.FuncId, + } + + for _, v := range dict.GetAllFunc() { + children := &sysin.DictTypeTree{ + SysDictType: entity.SysDictType{ + Id: v.Id, + Pid: dict.FuncId, + }, + Label: v.Label, + Value: v.Id, + Key: v.Id, + } + fun.Children = append(fun.Children, children) + } + + top.Children = append(top.Children, enums, fun) + list = append(list, top) + return +} + +// treeList 树状列表 +func (s *sSysDictType) treeList(pid int64, nodes []*entity.SysDictType) (list []*sysin.DictTypeTree) { + list = make([]*sysin.DictTypeTree, 0) + for _, v := range nodes { + if v.Pid == pid { + item := new(sysin.DictTypeTree) + item.SysDictType = *v + item.Label = v.Name + item.Value = v.Id + item.Key = v.Id + + child := s.treeList(v.Id, nodes) + if len(child) > 0 { + item.Children = child + } + list = append(list, item) + } + } + return +} diff --git a/server/internal/logic/sys/ems_log.go b/server/internal/logic/sys/ems_log.go new file mode 100644 index 0000000..633209b --- /dev/null +++ b/server/internal/logic/sys/ems_log.go @@ -0,0 +1,430 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "fmt" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/contexts" + "hotgo/internal/library/ems" + "hotgo/internal/library/location" + "hotgo/internal/model" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/charset" + "hotgo/utility/simple" + "hotgo/utility/useragent" + "hotgo/utility/validate" + "time" + + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/os/gview" + "github.com/gogf/gf/v2/text/gstr" + "github.com/gogf/gf/v2/util/grand" +) + +type sSysEmsLog struct{} + +func NewSysEmsLog() *sSysEmsLog { + return &sSysEmsLog{} +} + +func init() { + service.RegisterSysEmsLog(NewSysEmsLog()) +} + +// Delete 删除 +func (s *sSysEmsLog) Delete(ctx context.Context, in *sysin.EmsLogDeleteInp) (err error) { + _, err = dao.SysEmsLog.Ctx(ctx).Where("id", in.Id).Delete() + return +} + +// Edit 修改/新增 +func (s *sSysEmsLog) Edit(ctx context.Context, in *sysin.EmsLogEditInp) (err error) { + if in.Ip == "" { + err = gerror.New("ip不能为空") + return + } + + // 修改 + if in.Id > 0 { + _, err = dao.SysEmsLog.Ctx(ctx).Where("id", in.Id).Data(in).Update() + return + } + + // 新增 + _, err = dao.SysEmsLog.Ctx(ctx).Data(in).OmitEmptyData().Insert() + return +} + +// Status 更新部门状态 +func (s *sSysEmsLog) Status(ctx context.Context, in *sysin.EmsLogStatusInp) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + + // 修改 + _, err = dao.SysEmsLog.Ctx(ctx).Where("id", in.Id).Data("status", in.Status).Update() + return +} + +// View 获取指定字典类型信息 +func (s *sSysEmsLog) View(ctx context.Context, in *sysin.EmsLogViewInp) (res *sysin.EmsLogViewModel, err error) { + err = dao.SysEmsLog.Ctx(ctx).Where("id", in.Id).Scan(&res) + return +} + +// List 获取列表 +func (s *sSysEmsLog) List(ctx context.Context, in *sysin.EmsLogListInp) (list []*sysin.EmsLogListModel, totalCount int, err error) { + mod := dao.SysEmsLog.Ctx(ctx) + + if in.Status > 0 { + mod = mod.Where("status", in.Status) + } + + totalCount, err = mod.Count() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if totalCount == 0 { + return + } + + err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list) + return +} + +// Send 发送邮件 +func (s *sSysEmsLog) Send(ctx context.Context, in *sysin.SendEmsInp) (err error) { + var models *entity.SysEmsLog + if err = dao.SysEmsLog.Ctx(ctx). + Where("event", in.Event). + Where("email", in.Email). + OrderDesc(dao.SysEmsLog.Columns().Id). + Scan(&models); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + config, err := service.SysConfig().GetSmtp(ctx) + if err != nil { + return + } + + in.Template, err = s.GetTemplate(ctx, in.Event, config) + if err != nil { + return + } + + if err = s.AllowSend(ctx, models, config); err != nil { + return + } + + if consts.IsCodeEmsTemplate(in.Event) && in.Code == "" { + in.Code = grand.Digits(4) + } + + view, err := s.newView(ctx, in, config) + if err != nil { + return + } + + if in.TplData == nil { + in.TplData = make(g.Map) + } + + switch in.Event { + // 富文本 + case consts.EmsTemplateText: + if in.Content == "" { + err = gerror.New("富文本类型邮件内容不能为空") + return + } + in.TplData["content"] = in.Content + in.Content, err = view.Parse(ctx, in.Template, in.TplData) + if err != nil { + return err + } + // 验证码、重置密码类 + default: + in.Content, err = view.Parse(ctx, in.Template, in.TplData) + if err != nil { + return err + } + } + + subject, ok := consts.EmsSubjectMap[in.Event] + if !ok { + subject = simple.AppName(ctx) + } + + err = ems.Send(config, in.Email, subject, in.Content) + if err != nil { + return + } + + var data = new(entity.SysEmsLog) + data.Event = in.Event + data.Email = in.Email + data.Content = in.Content + data.Code = in.Code + data.Ip = location.GetClientIp(ghttp.RequestFromCtx(ctx)) + data.Status = consts.CodeStatusNotUsed + data.CreatedAt = gtime.Now() + data.UpdatedAt = gtime.Now() + + _, err = dao.SysEmsLog.Ctx(ctx).Data(data).OmitEmptyData().Insert() + return +} + +func (s *sSysEmsLog) newView(ctx context.Context, in *sysin.SendEmsInp, config *model.EmailConfig) (view *gview.View, err error) { + view = gview.New() + err = view.SetConfig(gview.Config{ + Delimiters: g.Cfg().MustGet(ctx, "viewer.delimiters").Strings(), + }) + if err != nil { + return + } + + // 富文本为自定义内容,可能不需要变量 + if in.Event == consts.EmsTemplateText { + return + } + + var ( + username string + user = contexts.GetUser(ctx) + request = ghttp.RequestFromCtx(ctx) + ip = location.GetClientIp(request) + ) + + loc, err := location.GetLocation(ctx, ip) + if err != nil { + return + } + + if loc == nil { + loc = new(location.IpLocationData) + } + + cityLabel, err := location.ParseRegion(ctx, loc.ProvinceCode, loc.CityCode, 0) + if err != nil { + return + } + + basic, err := service.SysConfig().GetBasic(ctx) + if err != nil { + return + } + + if basic == nil { + basic = new(model.BasicConfig) + basic.Name = simple.AppName(ctx) + basic.Domain = "https://hotgo.facms.cn" + basic.Logo = "https://gmycos.facms.cn/haoka/attachment/images/2023-02-04/cq9kf7s66jt7hkpvbh.png" + basic.SystemOpen = true + } + + if user != nil { + username = user.Username + } + + // 公共变量 + view.Assigns(gview.Params{ + "code": in.Code, // 验证码 + "expires": config.CodeExpire / 60, // 验证码有效期(分钟) + "username": username, // 发送者用户名 + "name": basic.Name, // 网站名称 + "logo": basic.Logo, // 网站logo + "domain": basic.Domain, // 网站域名 + "github": "https://github.com/bufanyun/hotgo", // github + "os": useragent.GetOs(request.Header.Get("User-Agent")), // 发送者操作系统 + "ip": gstr.HideStr(ip, 30, `*`), // 发送者IP + "cityLabel": cityLabel, // IP归属地 + }) + + // 重置密码 + if in.Event == consts.EmsTemplateResetPwd { + var ( + passwordResetLink string + resetToken = charset.RandomCreateBytes(32) + ) + if user != nil { + switch user.App { + // 后台用户 + case consts.AppAdmin: + _, err = dao.AdminMember.Ctx(ctx).Where(dao.AdminMember.Columns().Id, user.Id).Data(g.Map{dao.AdminMember.Columns().PasswordResetToken: resetToken}).Update() + if err != nil { + return + } + passwordResetLink = fmt.Sprintf("%s/admin/passwordReset?token=%s", basic.Domain, resetToken) + // 前台用户 + case consts.AppApi: + // ... + } + } + view.Assign("passwordResetLink", passwordResetLink) + } + return +} + +// GetTemplate 获取指定邮件模板 +func (s *sSysEmsLog) GetTemplate(ctx context.Context, template string, config *model.EmailConfig) (val string, err error) { + if template == "" { + err = gerror.New("模板不能为空") + return + } + if config == nil { + config, err = service.SysConfig().GetSmtp(ctx) + if err != nil { + return + } + } + + if len(config.Template) == 0 { + err = gerror.New("管理员还没有配置任何模板!") + return + } + + for _, v := range config.Template { + if v.Key == template { + return v.Value, nil + } + } + return +} + +// AllowSend 是否允许发送 +func (s *sSysEmsLog) AllowSend(ctx context.Context, models *entity.SysEmsLog, config *model.EmailConfig) (err error) { + if models == nil { + return + } + + // 富文本事件不限制 + if models.Event == consts.EmsTemplateText { + return + } + + if config == nil { + config, err = service.SysConfig().GetSmtp(ctx) + if err != nil { + return + } + } + + if gtime.Now().Before(models.CreatedAt.Add(time.Second * time.Duration(config.MinInterval))) { + err = gerror.New("发送频繁,请稍后再试!") + return + } + + if config.MaxIpLimit > 0 { + count, err := s.NowDayIpSendCount(ctx, models.Event) + if err != nil { + return err + } + + if count >= config.MaxIpLimit { + err = gerror.New("今天发送短信过多,请次日后再试!") + return err + } + } + return +} + +// NowDayIpSendCount 当天IP累计发送次数 +func (s *sSysEmsLog) NowDayIpSendCount(ctx context.Context, event string) (count int, err error) { + return dao.SysEmsLog.Ctx(ctx). + Where("ip", location.GetClientIp(ghttp.RequestFromCtx(ctx))). + Where("event", event). + WhereGTE("created_at", gtime.Now().Format("Y-m-d")). + Count() +} + +// VerifyCode 效验验证码 +func (s *sSysEmsLog) VerifyCode(ctx context.Context, in *sysin.VerifyEmsCodeInp) (err error) { + if in.Event == "" { + err = gerror.New("事件不能为空") + return + } + if in.Email == "" { + err = gerror.New("邮箱不能为空") + return + } + + if in.Event == consts.EmsTemplateResetPwd || in.Event == consts.EmsTemplateText { + err = gerror.Newf("事件类型无需验证:%v", in.Event) + return + } + + config, err := service.SysConfig().GetSmtp(ctx) + if err != nil { + return + } + + var models *entity.SysEmsLog + if err = dao.SysEmsLog.Ctx(ctx). + Where(dao.SysEmsLog.Columns().Event, in.Event). + Where(dao.SysEmsLog.Columns().Email, in.Email). + OrderDesc(dao.SysEmsLog.Columns().Id). + Scan(&models); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + + if models == nil { + err = gerror.New("验证码错误") + return + } + + if models.Times >= 10 { + err = gerror.New("验证码错误次数过多,请重新发送!") + return + } + + if in.Event != consts.EmsTemplateCode { + if models.Status == consts.CodeStatusUsed { + err = gerror.New("验证码已使用,请重新发送!") + return + } + } + + if gtime.Now().After(models.CreatedAt.Add(time.Second * time.Duration(config.CodeExpire))) { + err = gerror.New("验证码已过期,请重新发送") + return + } + + if models.Code != in.Code { + _, _ = dao.SysEmsLog.Ctx(ctx).Where(dao.SysEmsLog.Columns().Id, models.Id).Increment(dao.SysEmsLog.Columns().Times, 1) + err = gerror.New("验证码错误!") + return + } + + _, err = dao.SysEmsLog.Ctx(ctx).Where(dao.SysEmsLog.Columns().Id, models.Id).Data(g.Map{ + dao.SysEmsLog.Columns().Times: models.Times + 1, + dao.SysEmsLog.Columns().Status: consts.CodeStatusUsed, + dao.SysEmsLog.Columns().UpdatedAt: gtime.Now(), + }).Update() + return +} diff --git a/server/internal/logic/sys/gen_codes.go b/server/internal/logic/sys/gen_codes.go new file mode 100644 index 0000000..dd1ccfe --- /dev/null +++ b/server/internal/logic/sys/gen_codes.go @@ -0,0 +1,351 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "fmt" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/hggen" + "hotgo/internal/model" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/validate" + + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/text/gregex" + "github.com/gogf/gf/v2/text/gstr" +) + +type sSysGenCodes struct{} + +func NewSysGenCodes() *sSysGenCodes { + return &sSysGenCodes{} +} + +func init() { + service.RegisterSysGenCodes(NewSysGenCodes()) +} + +// Delete 删除 +func (s *sSysGenCodes) Delete(ctx context.Context, in *sysin.GenCodesDeleteInp) (err error) { + _, err = dao.SysGenCodes.Ctx(ctx).Where("id", in.Id).Delete() + return +} + +// Edit 修改/新增 +func (s *sSysGenCodes) Edit(ctx context.Context, in *sysin.GenCodesEditInp) (res *sysin.GenCodesEditModel, err error) { + if in.GenType == 0 { + err = gerror.New("生成类型不能为空") + return + } + if in.VarName == "" { + err = gerror.New("实体名称不能为空") + return + } + + if in.GenType == consts.GenCodesTypeCurd { + var temp *model.GenerateAppCrudTemplate + cfg := fmt.Sprintf("hggen.application.crud.templates.%v", in.GenTemplate) + if err = g.Cfg().MustGet(ctx, cfg).Scan(&temp); err != nil { + return + } + + if temp == nil { + err = gerror.Newf("选择的模板不存在:%v", cfg) + return + } + + if temp.IsAddon && in.AddonName == "" { + err = gerror.New("插件模板必须选择一个有效的插件") + return + } + } + + // 修改 + in.UpdatedAt = gtime.Now() + if in.Id > 0 { + _, err = dao.SysGenCodes.Ctx(ctx).Where("id", in.Id).Data(in).Update() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + return &sysin.GenCodesEditModel{SysGenCodes: in.SysGenCodes}, nil + } + + // 新增 + if in.Options.IsNil() { + in.Options = gjson.New(consts.NilJsonToString) + } + + in.MasterColumns = gjson.New("[]") + in.Status = consts.GenCodesStatusWait + in.CreatedAt = gtime.Now() + id, err := dao.SysGenCodes.Ctx(ctx).Data(in).OmitEmptyData().InsertAndGetId() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + in.Id = id + return &sysin.GenCodesEditModel{SysGenCodes: in.SysGenCodes}, nil +} + +// Status 更新部门状态 +func (s *sSysGenCodes) Status(ctx context.Context, in *sysin.GenCodesStatusInp) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + + _, err = dao.SysGenCodes.Ctx(ctx).Where("id", in.Id).Data("status", in.Status).Update() + return +} + +// MaxSort 最大排序 +func (s *sSysGenCodes) MaxSort(ctx context.Context, in *sysin.GenCodesMaxSortInp) (res *sysin.GenCodesMaxSortModel, err error) { + if in.Id > 0 { + if err = dao.SysGenCodes.Ctx(ctx).Where("id", in.Id).Order("sort desc").Scan(&res); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return nil, err + } + } + + if res == nil { + res = new(sysin.GenCodesMaxSortModel) + } + + res.Sort = form.DefaultMaxSort(res.Sort) + return +} + +// View 获取指定字典类型信息 +func (s *sSysGenCodes) View(ctx context.Context, in *sysin.GenCodesViewInp) (res *sysin.GenCodesViewModel, err error) { + err = dao.SysGenCodes.Ctx(ctx).Where("id", in.Id).Scan(&res) + return +} + +// List 获取列表 +func (s *sSysGenCodes) List(ctx context.Context, in *sysin.GenCodesListInp) (list []*sysin.GenCodesListModel, totalCount int, err error) { + mod := dao.SysGenCodes.Ctx(ctx) + + if in.GenType > 0 { + mod = mod.Where("gen_type", in.GenType) + } + + if in.VarName != "" { + mod = mod.Where("var_name", in.VarName) + } + + if in.Status > 0 { + mod = mod.Where("status", in.Status) + } + + totalCount, err = mod.Count() + if err != nil || totalCount == 0 { + return + } + + if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + typeSelect, err := hggen.GenTypeSelect(ctx) + if err != nil { + return + } + + getTpGroup := func(row *sysin.GenCodesListModel) string { + if row == nil { + return "" + } + + genType := int(row.GenType) + if genType == consts.GenCodesTypeTree { + genType = consts.GenCodesTypeCurd + } + + for _, v := range typeSelect { + if v.Value == genType { + for index, template := range v.Templates { + if index == row.GenTemplate { + return template.Label + } + } + } + } + return "" + } + + if len(list) > 0 { + for _, v := range list { + v.GenTemplateGroup = getTpGroup(v) + } + } + return +} + +// Selects 选项 +func (s *sSysGenCodes) Selects(ctx context.Context, in *sysin.GenCodesSelectsInp) (res *sysin.GenCodesSelectsModel, err error) { + return hggen.TableSelects(ctx, in) +} + +// TableSelect 表选项 +func (s *sSysGenCodes) TableSelect(ctx context.Context, in *sysin.GenCodesTableSelectInp) (res []*sysin.GenCodesTableSelectModel, err error) { + var ( + sql string + config = g.DB(in.Name).GetConfig() + disableTables = g.Cfg().MustGet(ctx, "hggen.disableTables").Strings() + lists []*sysin.GenCodesTableSelectModel + ) + + // 根据数据库类型使用不同的SQL + if config.Type == consts.DBPgsql { + // PostgreSQL: 使用pg_catalog查询表和注释 + sql = ` + SELECT + c.relname as value, + COALESCE(obj_description(c.oid), '') as label + FROM pg_class c + JOIN pg_namespace n ON c.relnamespace = n.oid + WHERE n.nspname = 'public' + AND c.relkind = 'r' + ORDER BY c.relname` + } else { + // MySQL: 使用information_schema.TABLES + sql = fmt.Sprintf("SELECT TABLE_NAME as value, TABLE_COMMENT as label FROM information_schema.TABLES WHERE TABLE_SCHEMA = '%s'", config.Name) + } + + if err = g.DB(in.Name).Ctx(ctx).Raw(sql).Scan(&lists); err != nil { + return + } + + patternStr := `addon_(\w+)_` + repStr := `` + + for _, v := range lists { + if gstr.InArray(disableTables, v.Value) { + continue + } + + newValue := v.Value + if config.Prefix != "" { + newValue = gstr.SubStrFromEx(v.Value, config.Prefix) + } + if newValue == "" { + err = gerror.Newf("表名[%v]前缀必须和配置中的前缀设置[%v] 保持一致", v.Value, config.Prefix) + return + } + + // 如果是插件模块,则移除掉插件表前缀 + bt, err := gregex.Replace(patternStr, []byte(repStr), []byte(newValue)) + if err != nil { + err = gerror.Newf("表名[%v] gregex.Replace err:%v", v.Value, err.Error()) + return nil, err + } + + row := v + row.DefTableComment = v.Label + row.DaoName = gstr.CaseCamel(newValue) + row.DefVarName = gstr.CaseCamel(string(bt)) + row.DefAlias = gstr.CaseCamelLower(newValue) + row.Name = fmt.Sprintf("%s (%s)", v.Value, v.Label) + row.Label = row.Name + res = append(res, row) + } + return +} + +// ColumnSelect 表字段选项 +func (s *sSysGenCodes) ColumnSelect(ctx context.Context, in *sysin.GenCodesColumnSelectInp) (res []*sysin.GenCodesColumnSelectModel, err error) { + var ( + sql string + config = g.DB(in.Name).GetConfig() + ) + + // 根据数据库类型使用不同的SQL + if config.Type == consts.DBPgsql { + // PostgreSQL: 使用pg_catalog查询列注释 + sql = ` + SELECT + a.attname as value, + COALESCE(col_description(a.attrelid, a.attnum), '') as label + FROM pg_attribute a + JOIN pg_class c ON a.attrelid = c.oid + JOIN pg_namespace n ON c.relnamespace = n.oid + WHERE n.nspname = 'public' + AND c.relname = '%s' + AND a.attnum > 0 + AND NOT a.attisdropped + ORDER BY a.attnum` + sql = fmt.Sprintf(sql, in.Table) + } else { + // MySQL: 使用information_schema.COLUMNS + sql = fmt.Sprintf("SELECT COLUMN_NAME as value, COLUMN_COMMENT as label FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s'", config.Name, in.Table) + } + + if err = g.DB(in.Name).Ctx(ctx).Raw(sql).Scan(&res); err != nil { + return + } + + if len(res) == 0 { + err = gerror.Newf("table does not exist:%v", in.Table) + return + } + + for k, v := range res { + res[k].Name = fmt.Sprintf("%s (%s)", v.Value, v.Label) + res[k].Label = res[k].Name + } + return +} + +// ColumnList 表字段列表 +func (s *sSysGenCodes) ColumnList(ctx context.Context, in *sysin.GenCodesColumnListInp) (res []*sysin.GenCodesColumnListModel, err error) { + return hggen.TableColumns(ctx, in) +} + +// Preview 生成预览 +func (s *sSysGenCodes) Preview(ctx context.Context, in *sysin.GenCodesPreviewInp) (res *sysin.GenCodesPreviewModel, err error) { + return hggen.Preview(ctx, in) +} + +// Build 提交生成 +func (s *sSysGenCodes) Build(ctx context.Context, in *sysin.GenCodesBuildInp) (err error) { + // 先保存配置 + ein := in.SysGenCodes + if _, err = s.Edit(ctx, &sysin.GenCodesEditInp{SysGenCodes: ein}); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + + if err = s.Status(ctx, &sysin.GenCodesStatusInp{Id: in.Id, Status: consts.GenCodesStatusOk}); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + + if err = hggen.Build(ctx, in); err != nil { + _ = s.Status(ctx, &sysin.GenCodesStatusInp{Id: in.Id, Status: consts.GenCodesStatusFail}) + return err + } + return +} diff --git a/server/internal/logic/sys/log.go b/server/internal/logic/sys/log.go new file mode 100644 index 0000000..147508e --- /dev/null +++ b/server/internal/logic/sys/log.go @@ -0,0 +1,452 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "fmt" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/global" + "hotgo/internal/library/contexts" + "hotgo/internal/library/dict" + "hotgo/internal/library/hgorm" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/library/hgorm/hook" + "hotgo/internal/library/location" + "hotgo/internal/library/queue" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/excel" + "hotgo/utility/simple" + "hotgo/utility/validate" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/text/gstr" + "github.com/gogf/gf/v2/util/gconv" + "github.com/gogf/gf/v2/util/gmode" +) + +type sSysLog struct{} + +func NewSysLog() *sSysLog { + return &sSysLog{} +} + +func init() { + service.RegisterSysLog(NewSysLog()) +} + +// Model 请求日志Orm模型 +func (s *sSysLog) Model(ctx context.Context, option ...*handler.Option) *gdb.Model { + return handler.Model(dao.SysLog.Ctx(ctx), option...) +} + +// Export 导出 +func (s *sSysLog) Export(ctx context.Context, in *sysin.LogListInp) (err error) { + // 导出格式 + type exportImage struct { + Id int64 `json:"id" description:""` + AppId string `json:"app_id" description:"应用id"` + Method string `json:"method" description:"提交类型"` + Module string `json:"module" description:"模块"` + Url string `json:"url" description:"提交url"` + Ip string `json:"ip" description:"ip地址"` + ErrorCode int `json:"error_code" description:"报错code"` + ErrorMsg string `json:"error_msg" description:"报错信息"` + ReqId string `json:"req_id" description:"对外id"` + TakeUpTime int64 `json:"take_up_time" description:"请求耗时"` + CreatedAt *gtime.Time `json:"created_at" description:"创建时间"` + MemberName string `json:"memberName"` + Region string `json:"region"` + } + + var ( + titleList = []string{"ID", "应用", "提交类型", "模块", "提交url", "ip地址", "报错code", "报错信息", "对外id", "请求耗时", "创建时间", "用户", "访问地"} + fileName = "访问日志导出-" + gctx.CtxId(ctx) + sheetName = simple.AppName(ctx) + exportList []exportImage + row exportImage + ) + + list, _, err := s.List(ctx, in) + if err != nil { + return err + } + + // 格式化格式 + for i := 0; i < len(list); i++ { + row.Id = list[i].Id + row.AppId = list[i].AppId + row.Module = list[i].Module + row.Method = list[i].Method + row.Url = list[i].Url + row.Ip = list[i].Ip + row.ReqId = list[i].ReqId + row.ErrorCode = list[i].ErrorCode + row.ErrorMsg = list[i].ErrorMsg + row.TakeUpTime = list[i].TakeUpTime + row.CreatedAt = list[i].CreatedAt + row.MemberName = list[i].MemberName + row.Region = list[i].Region + exportList = append(exportList, row) + } + + err = excel.ExportByStructs(ctx, titleList, exportList, fileName, sheetName) + return +} + +// RealWrite 真实写入 +func (s *sSysLog) RealWrite(ctx context.Context, log entity.SysLog) (err error) { + _, err = dao.SysLog.Ctx(ctx).FieldsEx(dao.SysLog.Columns().Id).Data(log).Unscoped().OmitEmptyData().Insert() + return +} + +// AutoLog 根据配置自动记录请求日志 +func (s *sSysLog) AutoLog(ctx context.Context) error { + return g.Try(ctx, func(ctx context.Context) { + var err error + defer func() { + if err != nil { + g.Log().Error(ctx, "autoLog err:%+v", err) + } + }() + + config, err := service.SysConfig().GetLoadLog(ctx) + if err != nil { + return + } + + if config == nil || !config.Switch { + return + } + + data := s.AnalysisLog(ctx) + if ok := validate.InSliceExistStr(config.Module, data.Module); !ok { + return + } + + if ok := validate.InSliceExistStr(config.SkipCode, gconv.String(data.ErrorCode)); ok { + return + } + + if config.Queue { + err = queue.Push(consts.QueueLogTopic, data) + return + } + + err = s.RealWrite(ctx, data) + }) +} + +// AnalysisLog 解析日志数据 +func (s *sSysLog) AnalysisLog(ctx context.Context) entity.SysLog { + var ( + mctx = contexts.Get(ctx) + response = mctx.Response + user = mctx.User + request = ghttp.RequestFromCtx(ctx) + module = mctx.Module + clientIp = location.GetClientIp(request) + postData = gjson.New(consts.NilJsonToString) + getData = gjson.New(request.URL.Query()) + headerData = gjson.New(consts.NilJsonToString) + errorData = gjson.New(consts.NilJsonToString) + data entity.SysLog + memberId int64 + errorCode int + errorMsg string + traceID string + timestamp int64 + appId string + takeUpTime int64 + ) + + // 响应数据 + if response != nil { + errorCode = response.Code + errorMsg = response.Message + traceID = response.TraceID + timestamp = response.Timestamp + if len(gconv.String(response.Error)) > 0 { + errorData = gjson.New(response.Error) + } + } + + if timestamp == 0 { + timestamp = gtime.Timestamp() + } + + // 请求头 + if reqHeadersBytes, _ := gjson.New(request.Header).MarshalJSON(); len(reqHeadersBytes) > 0 { + headerData = gjson.New(reqHeadersBytes) + } + + // post参数 + if body, ok := mctx.Data["request.body"].(*gjson.Json); ok { + postData = body + } + + // post表单 + postForm := gjson.New(gconv.String(request.PostForm)).Map() + if len(postForm) > 0 { + for k, v := range postForm { + postData.MustSet(k, v) + } + } + + if postData.IsNil() || len(postData.Map()) == 0 { + postData = gjson.New(consts.NilJsonToString) + } else { + // 隐藏明文显示的密码 + for k := range postData.Map() { + if gstr.ContainsI(k, "password") { + postData.MustSet(k, "******") + } + } + } + + // 当前登录用户 + if user != nil { + memberId = user.Id + appId = user.App + } + + ipData, err := location.GetLocation(ctx, clientIp) + if err != nil { + g.Log().Debugf(ctx, "location.GetLocation clientIp:%v, err:%+v", clientIp, err) + } + + if ipData == nil { + ipData = new(location.IpLocationData) + } + + // 请求耗时 + if tt, ok := mctx.Data["request.takeUpTime"].(int64); ok { + takeUpTime = tt + } + + headerData.MustAppend("Enter-Time", request.EnterTime.String()) + + data = entity.SysLog{ + AppId: appId, + MerchantId: 0, + MemberId: memberId, + Method: request.Method, + Module: module, + Url: request.URL.Path, + GetData: getData, + PostData: postData, + HeaderData: s.SimplifyHeaderParams(headerData), + Ip: clientIp, + ProvinceId: ipData.ProvinceCode, + CityId: ipData.CityCode, + ErrorCode: errorCode, + ErrorMsg: errorMsg, + ErrorData: errorData, + ReqId: traceID, + Timestamp: timestamp, + UserAgent: request.Header.Get("User-Agent"), + Status: consts.StatusEnabled, + TakeUpTime: takeUpTime, + UpdatedAt: gtime.Now(), + CreatedAt: request.EnterTime, + } + return data +} + +// SimplifyHeaderParams 过滤掉请求头中的大参数 +func (s *sSysLog) SimplifyHeaderParams(data *gjson.Json) *gjson.Json { + if data == nil || data.IsNil() { + return data + } + var filters = []string{"Accept", "Authorization", "Cookie"} + for _, filter := range filters { + v := data.Get(filter) + if len(v.String()) > 128 { + data.MustRemove(filter) + } + } + return data +} + +// View 获取指定请求日志信息 +func (s *sSysLog) View(ctx context.Context, in *sysin.LogViewInp) (res *sysin.LogViewModel, err error) { + mod := s.Model(ctx) + + count, err := service.SysLoginLog().Model(ctx). + LeftJoinOnFields(dao.SysLog.Table(), dao.SysLoginLog.Columns().ReqId, "=", dao.SysLog.Columns().ReqId). + WherePrefix(dao.SysLog.Table(), dao.SysLog.Columns().Id, in.Id).Count() + if err != nil { + return nil, err + } + + if count > 0 { + mod = dao.SysLog.Ctx(ctx) + } + + if err = mod.Hook(hook.CityLabel).WherePri(in.Id).Scan(&res); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if res == nil { + return + } + + routes := global.LoadHTTPRoutes(ghttp.RequestFromCtx(ctx)) + key := global.GenRouteKey(res.Method, res.Url) + route, ok := routes[key] + if ok { + res.Tags = route.Tags + res.Summary = route.Summary + res.Description = route.Description + } + + if simple.IsDemo(ctx) { + res.HeaderData = gjson.New(`{ + "none": [ + "` + consts.DemoTips + `" + ] + }`) + } + return +} + +// Delete 删除请求日志 +func (s *sSysLog) Delete(ctx context.Context, in *sysin.LogDeleteInp) (err error) { + _, err = s.Model(ctx).WherePri(in.Id).Delete() + return +} + +// List 请求日志列表 +func (s *sSysLog) List(ctx context.Context, in *sysin.LogListInp) (list []*sysin.LogListModel, totalCount int, err error) { + mod := s.Model(ctx).FieldsEx("get_data", "header_data", "post_data") + + // 访问路径 + if in.Url != "" { + mod = mod.WhereLike("url", "%"+in.Url+"%") + } + + // 模块 + if in.Module != "" { + mod = mod.Where("module", in.Module) + } + + // 链路ID + if in.ReqId != "" { + mod = mod.Where("req_id", in.ReqId) + } + + // 请求方式 + if in.Method != "" { + mod = mod.Where("method", in.Method) + } + + // 用户 + if in.MemberId > 0 { + mod = mod.Where("member_id", in.MemberId) + } + + // 操作人筛选 + if len(in.ComplexMemberId) == 2 && len(in.ComplexMemberId[0]) > 0 { + memberIds, err := service.AdminMember().GetComplexMemberIds(ctx, in.ComplexMemberId[0], in.ComplexMemberId[1]) + if err != nil { + return nil, 0, err + } + if len(memberIds) == 0 { + return nil, 0, nil + } + mod = mod.WhereIn("member_id", memberIds) + } + + // 访问IP + if in.Ip != "" { + mod = mod.Where("ip", in.Ip) + } + + // 日期范围 + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween("created_at", gtime.New(in.CreatedAt[0]), gtime.New(in.CreatedAt[1])) + } + + // 状态码 + if in.ErrorCode != "" { + mod = mod.Where("error_code", in.ErrorCode) + } + + // 请求耗时 + if dict.HasOptionKey(consts.HTTPHandlerTimeOptions, in.TakeUpTime) { + mod = mod.Where(gdb.Raw(fmt.Sprintf("(`take_up_time` %v)", in.TakeUpTime))) + } + + // 非生产环境,允许关键词查询日志 + // 生成环境使用需谨慎,日志量大易产生慢日志 + if !gmode.IsProduct() && in.Keyword != "" { + filterColumns := map[string]string{ + "get_data": "LIKE", + "post_data": "LIKE", + "header_data": "LIKE", + "error_data": "LIKE", + "error_msg": "LIKE", + } + mod = hgorm.FilterKeywordsWithOr(mod, filterColumns, in.Keyword) + } + + totalCount, err = mod.Count() + if err != nil || totalCount == 0 { + return + } + + if err = mod.Page(in.Page, in.PerPage).Hook(hook.CityLabel).Order("id desc").Scan(&list); err != nil { + return + } + + routes := global.LoadHTTPRoutes(ghttp.RequestFromCtx(ctx)) + for _, v := range list { + if v.AppId == consts.AppAdmin { + memberName, err := dao.AdminMember.Ctx(ctx).Fields(dao.AdminMember.Columns().RealName).WherePri(v.MemberId).Value() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return list, totalCount, err + } + v.MemberName = memberName.String() + } + + if v.MemberName == "" { + v.MemberName = "游客" + } + + // 截取请求url路径 + if gstr.Contains(v.Url, "?") { + v.Url = gstr.StrTillEx(v.Url, "?") + } + + key := global.GenRouteKey(v.Method, v.Url) + route, ok := routes[key] + if ok { + v.Tags = route.Tags + v.Summary = route.Summary + v.Description = route.Description + } + + if simple.IsDemo(ctx) { + v.HeaderData = gjson.New(`{ + "none": [ + "` + consts.DemoTips + `" + ] + }`) + } + } + return +} diff --git a/server/internal/logic/sys/login_log.go b/server/internal/logic/sys/login_log.go new file mode 100644 index 0000000..ea7eb7c --- /dev/null +++ b/server/internal/logic/sys/login_log.go @@ -0,0 +1,183 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "fmt" + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/util/gconv" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/library/hgorm/hook" + "hotgo/internal/library/location" + "hotgo/internal/library/queue" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/adminin" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/convert" + "hotgo/utility/excel" + "hotgo/utility/useragent" +) + +type sSysLoginLog struct{} + +func NewSysLoginLog() *sSysLoginLog { + return &sSysLoginLog{} +} + +func init() { + service.RegisterSysLoginLog(NewSysLoginLog()) +} + +// Model 登录日志Orm模型 +func (s *sSysLoginLog) Model(ctx context.Context, option ...*handler.Option) *gdb.Model { + return handler.Model(dao.SysLoginLog.Ctx(ctx), option...) +} + +// List 获取登录日志列表 +func (s *sSysLoginLog) List(ctx context.Context, in *sysin.LoginLogListInp) (list []*sysin.LoginLogListModel, totalCount int, err error) { + mod := s.Model(ctx) + + // 查询状态 + if in.Status > 0 { + mod = mod.Where(dao.SysLoginLog.Columns().Status, in.Status) + } + + // 查询登录时间 + if len(in.LoginAt) == 2 { + mod = mod.WhereBetween(dao.SysLoginLog.Columns().LoginAt, in.LoginAt[0], in.LoginAt[1]) + } + + // 查询IP地址 + if in.LoginIp != "" { + mod = mod.Where(dao.SysLoginLog.Columns().LoginIp, in.LoginIp) + } + + // 用户名 + if in.Username != "" { + mod = mod.Where(dao.SysLoginLog.Columns().Username, in.Username) + } + + totalCount, err = mod.Clone().Count() + if err != nil || totalCount == 0 { + return + } + + if err = mod.Fields(sysin.LoginLogListModel{}).Hook(hook.CityLabel).Page(in.Page, in.PerPage).OrderDesc(dao.SysLoginLog.Columns().Id).Scan(&list); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return list, totalCount, err + } + + for _, v := range list { + if v.Response.Contains("token") { + v.Response.Set("token", "******") + } + v.Os = useragent.GetOs(v.UserAgent) + v.Browser = useragent.GetBrowser(v.UserAgent) + v.SysLogId, err = dao.SysLog.Ctx(ctx).Fields(dao.SysLog.Columns().Id).Where(dao.SysLog.Columns().ReqId, v.ReqId).Value() + if err != nil { + return nil, 0, err + } + } + return +} + +// Export 导出登录日志 +func (s *sSysLoginLog) Export(ctx context.Context, in *sysin.LoginLogListInp) (err error) { + list, totalCount, err := s.List(ctx, in) + if err != nil { + return + } + + // 字段的排序是依据tags的字段顺序,如果你不想使用默认的排序方式,可以直接定义 tags = []string{"字段名称", "字段名称2", ...} + tags, err := convert.GetEntityDescTags(sysin.LoginLogExportModel{}) + if err != nil { + return + } + + var ( + fileName = "导出登录日志-" + gctx.CtxId(ctx) + sheetName = fmt.Sprintf("索引条件共%v行,共%v页,当前导出是第%v页,本页共%v行", totalCount, form.CalPageCount(totalCount, in.PerPage), in.Page, len(list)) + exports []sysin.LoginLogExportModel + ) + + if err = gconv.Scan(list, &exports); err != nil { + return + } + + err = excel.ExportByStructs(ctx, tags, exports, fileName, sheetName) + return +} + +// Delete 删除登录日志 +func (s *sSysLoginLog) Delete(ctx context.Context, in *sysin.LoginLogDeleteInp) (err error) { + _, err = s.Model(ctx).WherePri(in.Id).Delete() + return +} + +// Push 推送登录日志 +func (s *sSysLoginLog) Push(ctx context.Context, in *sysin.LoginLogPushInp) { + if in.Response == nil { + in.Response = new(adminin.LoginModel) + } + + r := ghttp.RequestFromCtx(ctx) + if r == nil { + g.Log().Warningf(ctx, "ctx not http request") + return + } + + clientIp := location.GetClientIp(r) + ipData, err := location.GetLocation(ctx, clientIp) + if err != nil { + g.Log().Debugf(ctx, "location.GetLocation clientIp:%v, err:%+v", clientIp, err) + } + + if ipData == nil { + ipData = new(location.IpLocationData) + } + + var models entity.SysLoginLog + models.ReqId = gctx.CtxId(ctx) + models.MemberId = in.Response.Id + models.Username = in.Response.Username + models.LoginAt = gtime.Now() + models.LoginIp = clientIp + models.UserAgent = r.UserAgent() + models.ProvinceId = ipData.ProvinceCode + models.CityId = ipData.CityCode + models.Status = consts.StatusEnabled + + if in.Err != nil { + models.Status = consts.StatusDisable + models.ErrMsg = in.Err.Error() + } + + models.Response = gjson.New(consts.NilJsonToString) + if in.Response != nil { + models.Response = gjson.New(in.Response) + } + + if err = queue.Push(consts.QueueLoginLogTopic, models); err != nil { + g.Log().Warningf(ctx, "push LoginLog err:%+v, models:%v", err, gjson.New(models).String()) + } +} + +// RealWrite 真实写入 +func (s *sSysLoginLog) RealWrite(ctx context.Context, models entity.SysLoginLog) (err error) { + _, err = dao.SysLoginLog.Ctx(ctx).Data(models).OmitEmptyData().Insert() + return +} diff --git a/server/internal/logic/sys/normal_tree_demo.go b/server/internal/logic/sys/normal_tree_demo.go new file mode 100644 index 0000000..b5772c8 --- /dev/null +++ b/server/internal/logic/sys/normal_tree_demo.go @@ -0,0 +1,176 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.15.7 +package sys + +import ( + "context" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/contexts" + "hotgo/internal/library/hgorm" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/library/hgorm/hook" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + + "hotgo/utility/tree" +) + +type sSysNormalTreeDemo struct{} + +func NewSysNormalTreeDemo() *sSysNormalTreeDemo { + return &sSysNormalTreeDemo{} +} + +func init() { + service.RegisterSysNormalTreeDemo(NewSysNormalTreeDemo()) +} + +// Model 普通树表ORM模型 +func (s *sSysNormalTreeDemo) Model(ctx context.Context, option ...*handler.Option) *gdb.Model { + return handler.Model(dao.SysGenTreeDemo.Ctx(ctx), option...) +} + +// List 获取普通树表列表 +func (s *sSysNormalTreeDemo) List(ctx context.Context, in *sysin.NormalTreeDemoListInp) (list []*sysin.NormalTreeDemoListModel, totalCount int, err error) { + mod := s.Model(ctx) + + // 字段过滤 + mod = mod.Fields(sysin.NormalTreeDemoListModel{}) + + // 查询标题 + if in.Title != "" { + mod = mod.WhereLike(dao.SysGenTreeDemo.Columns().Title, "%"+in.Title+"%") + } + + // 查询上级 + if in.Pid > 0 { + mod = mod.Where(dao.SysGenTreeDemo.Columns().Pid, in.Pid) + } + + // 查询测试分类 + if in.CategoryId > 0 { + mod = mod.Where(dao.SysGenTreeDemo.Columns().CategoryId, in.CategoryId) + } + + // 查询状态 + if in.Status > 0 { + mod = mod.Where(dao.SysGenTreeDemo.Columns().Status, in.Status) + } + + // 查询创建时间 + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween(dao.SysGenTreeDemo.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1]) + } + + // 树形列表判断是否需要分页 + if in.Pagination { + mod = mod.Page(in.Page, in.PerPage) + } + + // 排序 + mod = mod.OrderAsc(dao.SysGenTreeDemo.Columns().Sort).OrderDesc(dao.SysGenTreeDemo.Columns().Id) + + // 操作人摘要信息 + mod = mod.Hook(hook.MemberSummary) + + // 查询数据 + if err = mod.ScanAndCount(&list, &totalCount, false); err != nil { + err = gerror.Wrap(err, "获取普通树表列表失败,请稍后重试!") + return + } + return +} + +// Edit 修改/新增普通树表 +func (s *sSysNormalTreeDemo) Edit(ctx context.Context, in *sysin.NormalTreeDemoEditInp) (err error) { + return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { + in.Pid, in.Level, in.Tree, err = hgorm.AutoUpdateTree(ctx, &dao.SysGenTreeDemo, in.Id, in.Pid) + if err != nil { + return err + } + // 修改 + if in.Id > 0 { + in.UpdatedBy = contexts.GetUserId(ctx) + if _, err = s.Model(ctx). + Fields(sysin.NormalTreeDemoUpdateFields{}). + WherePri(in.Id).Data(in).Update(); err != nil { + err = gerror.Wrap(err, "修改普通树表失败,请稍后重试!") + } + return + } + + // 新增 + in.CreatedBy = contexts.GetUserId(ctx) + if _, err = s.Model(ctx, &handler.Option{FilterAuth: false}). + Fields(sysin.NormalTreeDemoInsertFields{}). + Data(in).OmitEmptyData().Insert(); err != nil { + err = gerror.Wrap(err, "新增普通树表失败,请稍后重试!") + } + return + }) +} + +// Delete 删除普通树表 +func (s *sSysNormalTreeDemo) Delete(ctx context.Context, in *sysin.NormalTreeDemoDeleteInp) (err error) { + count, err := dao.SysGenTreeDemo.Ctx(ctx).Where(dao.SysGenTreeDemo.Columns().Pid, in.Id).Count() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + if count > 0 { + return gerror.New("请先删除该普通树表下的所有下级!") + } + if _, err = s.Model(ctx).WherePri(in.Id).Delete(); err != nil { + err = gerror.Wrap(err, "删除普通树表失败,请稍后重试!") + return + } + return +} + +// MaxSort 获取普通树表最大排序 +func (s *sSysNormalTreeDemo) MaxSort(ctx context.Context, in *sysin.NormalTreeDemoMaxSortInp) (res *sysin.NormalTreeDemoMaxSortModel, err error) { + if err = dao.SysGenTreeDemo.Ctx(ctx).Fields(dao.SysGenTreeDemo.Columns().Sort).OrderDesc(dao.SysGenTreeDemo.Columns().Sort).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取普通树表最大排序,请稍后重试!") + return + } + + if res == nil { + res = new(sysin.NormalTreeDemoMaxSortModel) + } + + res.Sort = form.DefaultMaxSort(res.Sort) + return +} + +// View 获取普通树表指定信息 +func (s *sSysNormalTreeDemo) View(ctx context.Context, in *sysin.NormalTreeDemoViewInp) (res *sysin.NormalTreeDemoViewModel, err error) { + if err = s.Model(ctx).WherePri(in.Id).Hook(hook.MemberSummary).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取普通树表信息,请稍后重试!") + return + } + return +} + +// TreeOption 获取普通树表关系树选项 +func (s *sSysNormalTreeDemo) TreeOption(ctx context.Context) (nodes []tree.Node, err error) { + var models []*sysin.NormalTreeDemoTreeOption + if err = s.Model(ctx).Fields(sysin.NormalTreeDemoTreeOption{}).OrderAsc(dao.SysGenTreeDemo.Columns().Pid).OrderAsc(dao.SysGenTreeDemo.Columns().Sort).OrderDesc(dao.SysGenTreeDemo.Columns().Id).Scan(&models); err != nil { + err = gerror.Wrap(err, "获取普通树表关系树选项失败!") + return + } + nodes = make([]tree.Node, len(models)) + for i, v := range models { + nodes[i] = v + } + return tree.ListToTree(0, nodes) +} diff --git a/server/internal/logic/sys/option_tree_demo.go b/server/internal/logic/sys/option_tree_demo.go new file mode 100644 index 0000000..ded6f4a --- /dev/null +++ b/server/internal/logic/sys/option_tree_demo.go @@ -0,0 +1,177 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2025 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.17.8 +package sys + +import ( + "context" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/contexts" + "hotgo/internal/library/hgorm" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/library/hgorm/hook" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + + "hotgo/utility/tree" +) + +type sSysOptionTreeDemo struct{} + +func NewSysOptionTreeDemo() *sSysOptionTreeDemo { + return &sSysOptionTreeDemo{} +} + +func init() { + service.RegisterSysOptionTreeDemo(NewSysOptionTreeDemo()) +} + +// Model 选项树表ORM模型 +func (s *sSysOptionTreeDemo) Model(ctx context.Context, option ...*handler.Option) *gdb.Model { + return handler.Model(dao.SysGenTreeDemo.Ctx(ctx), option...) +} + +// List 获取选项树表列表 +func (s *sSysOptionTreeDemo) List(ctx context.Context, in *sysin.OptionTreeDemoListInp) (list []*sysin.OptionTreeDemoListModel, totalCount int, err error) { + mod := s.Model(ctx) + + // 字段过滤 + mod = mod.Fields(sysin.OptionTreeDemoListModel{}) + + // 查询标题 + if in.Title != "" { + mod = mod.WhereLike(dao.SysGenTreeDemo.Columns().Title, "%"+in.Title+"%") + } + + // 查询上级 + if in.Pid > 0 { + mod = mod.Where(dao.SysGenTreeDemo.Columns().Pid, in.Pid) + } + + // 查询测试分类 + if in.CategoryId > 0 { + mod = mod.Where(dao.SysGenTreeDemo.Columns().CategoryId, in.CategoryId) + } + + // 查询状态 + if in.Status > 0 { + mod = mod.Where(dao.SysGenTreeDemo.Columns().Status, in.Status) + } + + // 查询创建时间 + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween(dao.SysGenTreeDemo.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1]) + } + + // 树形列表判断是否需要分页 + if in.Pagination { + mod = mod.Page(in.Page, in.PerPage) + } + + // 排序 + mod = mod.OrderAsc(dao.SysGenTreeDemo.Columns().Sort).OrderDesc(dao.SysGenTreeDemo.Columns().Id) + + // 操作人摘要信息 + mod = mod.Hook(hook.MemberSummary) + + // 查询数据 + if err = mod.ScanAndCount(&list, &totalCount, false); err != nil { + err = gerror.Wrap(err, "获取选项树表列表失败,请稍后重试!") + return + } + return +} + +// Edit 修改/新增选项树表 +func (s *sSysOptionTreeDemo) Edit(ctx context.Context, in *sysin.OptionTreeDemoEditInp) (err error) { + return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { + in.Pid, in.Level, in.Tree, err = hgorm.AutoUpdateTree(ctx, &dao.SysGenTreeDemo, in.Id, in.Pid) + if err != nil { + return err + } + // 修改 + if in.Id > 0 { + in.UpdatedBy = contexts.GetUserId(ctx) + if _, err = s.Model(ctx). + Fields(sysin.OptionTreeDemoUpdateFields{}). + WherePri(in.Id).Data(in).Update(); err != nil { + err = gerror.Wrap(err, "修改选项树表失败,请稍后重试!") + } + return + } + + // 新增 + in.CreatedBy = contexts.GetUserId(ctx) + if _, err = s.Model(ctx, &handler.Option{FilterAuth: false}). + Fields(sysin.OptionTreeDemoInsertFields{}). + Data(in).OmitEmptyData().Insert(); err != nil { + err = gerror.Wrap(err, "新增选项树表失败,请稍后重试!") + } + return + }) +} + +// Delete 删除选项树表 +func (s *sSysOptionTreeDemo) Delete(ctx context.Context, in *sysin.OptionTreeDemoDeleteInp) (err error) { + count, err := dao.SysGenTreeDemo.Ctx(ctx).Where(dao.SysGenTreeDemo.Columns().Pid, in.Id).Count() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + if count > 0 { + return gerror.New("请先删除该选项树表下的所有下级!") + } + + if _, err = s.Model(ctx).WherePri(in.Id).Unscoped().Delete(); err != nil { + err = gerror.Wrap(err, "删除选项树表失败,请稍后重试!") + return + } + return +} + +// MaxSort 获取选项树表最大排序 +func (s *sSysOptionTreeDemo) MaxSort(ctx context.Context, in *sysin.OptionTreeDemoMaxSortInp) (res *sysin.OptionTreeDemoMaxSortModel, err error) { + if err = dao.SysGenTreeDemo.Ctx(ctx).Fields(dao.SysGenTreeDemo.Columns().Sort).OrderDesc(dao.SysGenTreeDemo.Columns().Sort).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取选项树表最大排序,请稍后重试!") + return + } + + if res == nil { + res = new(sysin.OptionTreeDemoMaxSortModel) + } + + res.Sort = form.DefaultMaxSort(res.Sort) + return +} + +// View 获取选项树表指定信息 +func (s *sSysOptionTreeDemo) View(ctx context.Context, in *sysin.OptionTreeDemoViewInp) (res *sysin.OptionTreeDemoViewModel, err error) { + if err = s.Model(ctx).WherePri(in.Id).Hook(hook.MemberSummary).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取选项树表信息,请稍后重试!") + return + } + return +} + +// TreeOption 获取选项树表关系树选项 +func (s *sSysOptionTreeDemo) TreeOption(ctx context.Context) (nodes []tree.Node, err error) { + var models []*sysin.OptionTreeDemoTreeOption + if err = s.Model(ctx).Fields(sysin.OptionTreeDemoTreeOption{}).OrderAsc(dao.SysGenTreeDemo.Columns().Pid).OrderAsc(dao.SysGenTreeDemo.Columns().Sort).OrderDesc(dao.SysGenTreeDemo.Columns().Id).Scan(&models); err != nil { + err = gerror.Wrap(err, "获取选项树表关系树选项失败!") + return + } + nodes = make([]tree.Node, len(models)) + for i, v := range models { + nodes[i] = v + } + return tree.ListToTree(0, nodes) +} diff --git a/server/internal/logic/sys/provinces.go b/server/internal/logic/sys/provinces.go new file mode 100644 index 0000000..82790f9 --- /dev/null +++ b/server/internal/logic/sys/provinces.go @@ -0,0 +1,257 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "fmt" + "hotgo/internal/dao" + "hotgo/internal/library/hgorm" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" +) + +type sSysProvinces struct{} + +func NewSysProvinces() *sSysProvinces { + return &sSysProvinces{} +} + +func init() { + service.RegisterSysProvinces(NewSysProvinces()) +} + +// Tree 关系树选项列表 +func (s *sSysProvinces) Tree(ctx context.Context) (list []*sysin.ProvincesTree, err error) { + var models []*entity.SysProvinces + if err = dao.SysProvinces.Ctx(ctx).Order("pid asc,id asc,sort asc").Scan(&models); err != nil { + err = gerror.Wrap(err, "获取省市区关系树选项列表失败!") + return + } + + list = s.treeList(0, models) + return +} + +// Delete 删除省市区数据 +func (s *sSysProvinces) Delete(ctx context.Context, in *sysin.ProvincesDeleteInp) (err error) { + var models *entity.SysProvinces + if err = dao.SysProvinces.Ctx(ctx).Where("id", in.Id).Scan(&models); err != nil { + err = gerror.Wrap(err, "获取省市区数据失败!") + return + } + + if models == nil { + err = gerror.New("数据不存在或已删除!") + return + } + + has, err := dao.SysProvinces.Ctx(ctx).Where("pid", models.Id).One() + if err != nil { + err = gerror.Wrap(err, "删除省市区数据时获取上级数据失败!") + return + } + + if !has.IsEmpty() { + err = gerror.New("请先删除该地区下得所有子级!") + return + } + + if _, err = dao.SysProvinces.Ctx(ctx).Where("id", in.Id).Delete(); err != nil { + err = gerror.Wrap(err, "删除省市区数据失败!") + return + } + return +} + +// Edit 修改/新增省市区数据 +func (s *sSysProvinces) Edit(ctx context.Context, in *sysin.ProvincesEditInp) (err error) { + // 关系树 + in.Pid, in.Level, in.Tree, err = hgorm.GenSubTree(ctx, &dao.SysProvinces, in.Pid) + if err != nil { + return + } + + models, err := s.View(ctx, &sysin.ProvincesViewInp{Id: in.Id}) + if err != nil { + return + } + + // 修改 + if models != nil { + if _, err = dao.SysProvinces.Ctx(ctx).Fields(sysin.ProvincesUpdateFields{}).WherePri(in.Id).Data(in).Update(); err != nil { + err = gerror.Wrap(err, "修改省市区数据失败!") + } + return + } + + // 新增 + if _, err = dao.SysProvinces.Ctx(ctx).Fields(sysin.ProvincesInsertFields{}).Data(in).OmitEmptyData().Insert(); err != nil { + err = gerror.Wrap(err, "新增省市区数据失败!") + } + return +} + +// Status 更新省市区状态 +func (s *sSysProvinces) Status(ctx context.Context, in *sysin.ProvincesStatusInp) (err error) { + if _, err = dao.SysProvinces.Ctx(ctx).Where("id", in.Id).Data("status", in.Status).Update(); err != nil { + err = gerror.Wrap(err, "更新省市区状态失败!") + } + return +} + +// MaxSort 最大排序 +func (s *sSysProvinces) MaxSort(ctx context.Context, in *sysin.ProvincesMaxSortInp) (res *sysin.ProvincesMaxSortModel, err error) { + if err = dao.SysProvinces.Ctx(ctx).Fields(dao.SysProvinces.Columns().Sort).OrderDesc(dao.SysProvinces.Columns().Sort).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取省市区最大排序失败!") + return + } + + if res == nil { + res = new(sysin.ProvincesMaxSortModel) + } + res.Sort = form.DefaultMaxSort(res.Sort) + return +} + +// View 获取省市区信息 +func (s *sSysProvinces) View(ctx context.Context, in *sysin.ProvincesViewInp) (res *sysin.ProvincesViewModel, err error) { + if err = dao.SysProvinces.Ctx(ctx).Where("id", in.Id).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取省市区信息失败!") + } + return +} + +// List 获取列表 +func (s *sSysProvinces) List(ctx context.Context, in *sysin.ProvincesListInp) (list []*sysin.ProvincesListModel, totalCount int, err error) { + mod := dao.SysProvinces.Ctx(ctx) + + if in.Title != "" { + mod = mod.WhereLike("title", "%"+in.Title+"%") + } + + if in.Status > 0 { + mod = mod.Where("status", in.Status) + } + + totalCount, err = mod.Count() + if err != nil { + err = gerror.Wrap(err, "获取省市区数据行失败!") + return + } + + if totalCount == 0 { + return + } + + if err = mod.Page(in.Page, in.PerPage).Order("id desc").Scan(&list); err != nil { + err = gerror.Wrap(err, "获取省市区列表失败!") + } + return +} + +// ChildrenList 获取省市区下级列表 +func (s *sSysProvinces) ChildrenList(ctx context.Context, in *sysin.ProvincesChildrenListInp) (list []*sysin.ProvincesChildrenListModel, totalCount int, err error) { + mod := dao.SysProvinces.Ctx(ctx) + + if in.Title != "" { + mod = mod.WhereLike("title", "%"+in.Title+"%") + } + + if in.Pid > 0 { + mod = mod.Where("pid", in.Pid) + } + + if in.Id > 0 { + mod = mod.Where("id", in.Id) + } + + totalCount, err = mod.Count() + if err != nil { + err = gerror.Wrap(err, "获取省市区下级数据行失败!") + return + } + + if totalCount == 0 { + return + } + + if err = mod.Page(in.Page, in.PerPage).Order("sort asc,id desc").Scan(&list); err != nil { + err = gerror.Wrap(err, "获取省市区下级列表失败!") + } + return +} + +// UniqueId 获取省市区下级列表 +func (s *sSysProvinces) UniqueId(ctx context.Context, in *sysin.ProvincesUniqueIdInp) (res *sysin.ProvincesUniqueIdModel, err error) { + res = new(sysin.ProvincesUniqueIdModel) + res.IsUnique = true + if in.NewId == 0 { + return + } + + if err = hgorm.IsUnique(ctx, &dao.SysProvinces, g.Map{dao.SysProvinces.Columns().Id: in.NewId}, "", in.OldId); err != nil { + res.IsUnique = false + return + } + return +} + +// Select 省市区选项 +func (s *sSysProvinces) Select(ctx context.Context, in *sysin.ProvincesSelectInp) (res *sysin.ProvincesSelectModel, err error) { + res = new(sysin.ProvincesSelectModel) + cols := dao.SysProvinces.Columns() + mod := dao.SysProvinces.Ctx(ctx).Fields(fmt.Sprintf("%s as value, %s as label, %s ", cols.Id, cols.Title, cols.Level)).Where(cols.Pid, in.Value) + + if err = mod.OrderAsc(cols.Sort).OrderAsc(cols.Id).Scan(&res.List); err != nil { + err = gerror.Wrap(err, "获取省市区选项失败!") + return + } + + for _, v := range res.List { + if in.DataType == "p" { + v.IsLeaf = true + continue + } + + if in.DataType == "pc" && v.Level >= 2 { + v.IsLeaf = true + continue + } + + if in.DataType == "pca" && v.Level >= 3 { + v.IsLeaf = true + continue + } + } + return +} + +// treeList 树状列表 +func (s *sSysProvinces) treeList(pid int64, nodes []*entity.SysProvinces) (list []*sysin.ProvincesTree) { + list = make([]*sysin.ProvincesTree, 0) + for _, v := range nodes { + if v.Pid == pid { + item := new(sysin.ProvincesTree) + item.SysProvinces = *v + item.Label = v.Title + item.Value = v.Id + item.Key = v.Id + + child := s.treeList(v.Id, nodes) + if len(child) > 0 { + item.Children = child + } + list = append(list, item) + } + } + return +} diff --git a/server/internal/logic/sys/serve_license.go b/server/internal/logic/sys/serve_license.go new file mode 100644 index 0000000..29245c7 --- /dev/null +++ b/server/internal/logic/sys/serve_license.go @@ -0,0 +1,193 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.7.6 +package sys + +import ( + "context" + "fmt" + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/util/gconv" + "hotgo/internal/dao" + "hotgo/internal/library/hgorm" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/convert" + "hotgo/utility/excel" +) + +type sSysServeLicense struct{} + +func NewSysServeLicense() *sSysServeLicense { + return &sSysServeLicense{} +} + +func init() { + service.RegisterSysServeLicense(NewSysServeLicense()) +} + +// Model 服务许可证ORM模型 +func (s *sSysServeLicense) Model(ctx context.Context, option ...*handler.Option) *gdb.Model { + return handler.Model(dao.SysServeLicense.Ctx(ctx), option...) +} + +// List 获取服务许可证列表 +func (s *sSysServeLicense) List(ctx context.Context, in *sysin.ServeLicenseListInp) (list []*sysin.ServeLicenseListModel, totalCount int, err error) { + mod := s.Model(ctx) + + // 查询许可ID + if in.Id > 0 { + mod = mod.Where(dao.SysServeLicense.Columns().Id, in.Id) + } + + // 查询分组 + if in.Group != "" { + mod = mod.Where(dao.SysServeLicense.Columns().Group, in.Group) + } + + // 查询许可名称 + if in.Name != "" { + mod = mod.WhereLike(dao.SysServeLicense.Columns().Name, "%"+in.Name+"%") + } + + // 查询应用ID + if in.Appid != "" { + mod = mod.Where(dao.SysServeLicense.Columns().Appid, in.Appid) + } + + // 查询授权结束时间 + if len(in.EndAt) == 2 { + mod = mod.WhereBetween(dao.SysServeLicense.Columns().EndAt, in.EndAt[0], in.EndAt[1]) + } + + // 查询状态 + if in.Status > 0 { + mod = mod.Where(dao.SysServeLicense.Columns().Status, in.Status) + } + + // 查询创建时间 + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween(dao.SysServeLicense.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1]) + } + + totalCount, err = mod.Clone().Count() + if err != nil { + err = gerror.Wrap(err, "获取服务许可证数据行失败,请稍后重试!") + return + } + + if totalCount == 0 { + return + } + + if err = mod.Fields(sysin.ServeLicenseListModel{}).Page(in.Page, in.PerPage).OrderDesc(dao.SysServeLicense.Columns().Id).Scan(&list); err != nil { + err = gerror.Wrap(err, "获取服务许可证列表失败,请稍后重试!") + return + } + + serv := service.TCPServer().Instance() + for _, v := range list { + v.Online = serv.GetAppIdOnline(v.Appid) + } + return +} + +// Export 导出服务许可证 +func (s *sSysServeLicense) Export(ctx context.Context, in *sysin.ServeLicenseListInp) (err error) { + list, totalCount, err := s.List(ctx, in) + if err != nil { + return + } + + // 字段的排序是依据tags的字段顺序,如果你不想使用默认的排序方式,可以直接定义 tags = []string{"字段名称", "字段名称2", ...} + tags, err := convert.GetEntityDescTags(sysin.ServeLicenseExportModel{}) + if err != nil { + return + } + + var ( + fileName = "导出服务许可证-" + gctx.CtxId(ctx) + sheetName = fmt.Sprintf("索引条件共%v行,共%v页,当前导出是第%v页,本页共%v行", totalCount, form.CalPageCount(totalCount, in.PerPage), in.Page, len(list)) + exports []sysin.ServeLicenseExportModel + ) + + if err = gconv.Scan(list, &exports); err != nil { + return + } + + err = excel.ExportByStructs(ctx, tags, exports, fileName, sheetName) + return +} + +// Edit 修改/新增服务许可证 +func (s *sSysServeLicense) Edit(ctx context.Context, in *sysin.ServeLicenseEditInp) (err error) { + // 验证'Appid'唯一 + if err = hgorm.IsUnique(ctx, &dao.SysServeLicense, g.Map{dao.SysServeLicense.Columns().Appid: in.Appid}, "应用ID已存在", in.Id); err != nil { + return + } + // 修改 + if in.Id > 0 { + if _, err = s.Model(ctx).Fields(sysin.ServeLicenseUpdateFields{}).WherePri(in.Id).Data(in).Update(); err != nil { + err = gerror.Wrap(err, "修改服务许可证失败,请稍后重试!") + } + return + } + + // 新增 + if _, err = s.Model(ctx, &handler.Option{FilterAuth: false}).Fields(sysin.ServeLicenseInsertFields{}).Data(in).OmitEmptyData().Insert(); err != nil { + err = gerror.Wrap(err, "新增服务许可证失败,请稍后重试!") + } + return +} + +// Delete 删除服务许可证 +func (s *sSysServeLicense) Delete(ctx context.Context, in *sysin.ServeLicenseDeleteInp) (err error) { + if _, err = s.Model(ctx).WherePri(in.Id).Delete(); err != nil { + err = gerror.Wrap(err, "删除服务许可证失败,请稍后重试!") + return + } + return +} + +// View 获取服务许可证指定信息 +func (s *sSysServeLicense) View(ctx context.Context, in *sysin.ServeLicenseViewInp) (res *sysin.ServeLicenseViewModel, err error) { + if err = s.Model(ctx).WherePri(in.Id).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取服务许可证信息,请稍后重试!") + return + } + return +} + +// Status 更新服务许可证状态 +func (s *sSysServeLicense) Status(ctx context.Context, in *sysin.ServeLicenseStatusInp) (err error) { + update := g.Map{ + dao.SysServeLicense.Columns().Status: in.Status, + } + + if _, err = s.Model(ctx).WherePri(in.Id).Data(update).Update(); err != nil { + err = gerror.Wrap(err, "更新服务许可证状态失败,请稍后重试!") + return + } + return +} + +// AssignRouter 分配服务许可证路由 +func (s *sSysServeLicense) AssignRouter(ctx context.Context, in *sysin.ServeLicenseAssignRouterInp) (err error) { + update := g.Map{ + dao.SysServeLicense.Columns().Routes: in.Routes, + } + + if _, err = s.Model(ctx).WherePri(in.Id).Data(update).Update(); err != nil { + err = gerror.Wrap(err, "分配服务许可证路由失败,请稍后重试!") + return + } + return +} diff --git a/server/internal/logic/sys/serve_log.go b/server/internal/logic/sys/serve_log.go new file mode 100644 index 0000000..74928a8 --- /dev/null +++ b/server/internal/logic/sys/serve_log.go @@ -0,0 +1,138 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "fmt" + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/util/gconv" + "github.com/gogf/gf/v2/util/gmode" + "hotgo/internal/dao" + "hotgo/internal/library/hgorm" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "hotgo/utility/convert" + "hotgo/utility/excel" +) + +type sSysServeLog struct{} + +func NewSysServeLog() *sSysServeLog { + return &sSysServeLog{} +} + +func init() { + service.RegisterSysServeLog(NewSysServeLog()) +} + +// Model 服务日志Orm模型 +func (s *sSysServeLog) Model(ctx context.Context) *gdb.Model { + return dao.SysServeLog.Ctx(ctx) +} + +// List 获取服务日志列表 +func (s *sSysServeLog) List(ctx context.Context, in *sysin.ServeLogListInp) (list []*sysin.ServeLogListModel, totalCount int, err error) { + mod := dao.SysServeLog.Ctx(ctx) + + // 查询链路ID + if in.TraceId != "" { + mod = mod.Where(dao.SysServeLog.Columns().TraceId, in.TraceId) + } + + // 非生产环境,允许关键词查询日志 + // 生成环境使用需谨慎,日志量大易产生慢日志 + if !gmode.IsProduct() && in.Content != "" { + mod = mod.WhereLike(dao.SysServeLog.Columns().Content, "%"+in.Content+"%") + } + + // 查询日志级别 + if in.LevelFormat != "" { + mod = mod.WhereLike(dao.SysServeLog.Columns().LevelFormat, in.LevelFormat) + } + + // 查询触发时间(ns) + if len(in.TriggerNs) == 2 { + mod = mod.WhereBetween(dao.SysServeLog.Columns().TriggerNs, in.TriggerNs[0], in.TriggerNs[1]) + } + + // 查询创建时间 + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween(dao.SysServeLog.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1]) + } + + // 关联表sysLog + mod = mod.LeftJoin(hgorm.GenJoinOnRelation( + dao.SysServeLog.Table(), dao.SysServeLog.Columns().TraceId, // 主表表名,关联条件 + dao.SysLog.Table(), "sysLog", dao.SysLog.Columns().ReqId, // 关联表表名,别名,关联条件 + )...) + + totalCount, err = mod.Clone().Count() + if err != nil || totalCount == 0 { + return + } + + // 关联表select + fields, err := hgorm.GenJoinSelect(ctx, sysin.ServeLogListModel{}, &dao.SysServeLog, []*hgorm.Join{ + {Dao: &dao.SysLog, Alias: "sysLog"}, + }) + + if err != nil { + return + } + + err = mod.Fields(fields).Handler(handler.FilterAuth).Page(in.Page, in.PerPage).OrderDesc(dao.SysServeLog.Columns().Id).Scan(&list) + return +} + +// Export 导出服务日志 +func (s *sSysServeLog) Export(ctx context.Context, in *sysin.ServeLogListInp) (err error) { + list, totalCount, err := s.List(ctx, in) + if err != nil { + return + } + + // 字段的排序是依据tags的字段顺序,如果你不想使用默认的排序方式,可以直接定义 tags = []string{"字段名称", "字段名称2", ...} + tags, err := convert.GetEntityDescTags(sysin.ServeLogExportModel{}) + if err != nil { + return + } + + var ( + fileName = "导出服务日志-" + gctx.CtxId(ctx) + sheetName = fmt.Sprintf("索引条件共%v行,共%v页,当前导出是第%v页,本页共%v行", totalCount, form.CalPageCount(totalCount, in.PerPage), in.Page, len(list)) + exports []sysin.ServeLogExportModel + ) + + if err = gconv.Scan(list, &exports); err != nil { + return err + } + + err = excel.ExportByStructs(ctx, tags, exports, fileName, sheetName) + return +} + +// Delete 删除服务日志 +func (s *sSysServeLog) Delete(ctx context.Context, in *sysin.ServeLogDeleteInp) (err error) { + _, err = dao.SysServeLog.Ctx(ctx).Where(dao.SysServeLog.Columns().Id, in.Id).Delete() + return +} + +// View 获取服务日志指定信息 +func (s *sSysServeLog) View(ctx context.Context, in *sysin.ServeLogViewInp) (res *sysin.ServeLogViewModel, err error) { + err = dao.SysServeLog.Ctx(ctx).Where(dao.SysServeLog.Columns().Id, in.Id).Scan(&res) + return +} + +// RealWrite 真实写入 +func (s *sSysServeLog) RealWrite(ctx context.Context, models entity.SysServeLog) (err error) { + _, err = dao.SysServeLog.Ctx(ctx).FieldsEx(dao.SysLog.Columns().Id).Data(models).OmitEmptyData().Insert() + return +} diff --git a/server/internal/logic/sys/sms_log.go b/server/internal/logic/sys/sms_log.go new file mode 100644 index 0000000..fd4b934 --- /dev/null +++ b/server/internal/logic/sys/sms_log.go @@ -0,0 +1,291 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/util/grand" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/location" + "hotgo/internal/library/sms" + "hotgo/internal/model" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + "time" +) + +type sSysSmsLog struct{} + +func NewSysSmsLog() *sSysSmsLog { + return &sSysSmsLog{} +} + +func init() { + service.RegisterSysSmsLog(NewSysSmsLog()) +} + +// Delete 删除 +func (s *sSysSmsLog) Delete(ctx context.Context, in *sysin.SmsLogDeleteInp) (err error) { + _, err = dao.SysSmsLog.Ctx(ctx).WherePri(in.Id).Delete() + return +} + +// View 获取指定字典类型信息 +func (s *sSysSmsLog) View(ctx context.Context, in *sysin.SmsLogViewInp) (res *sysin.SmsLogViewModel, err error) { + if err = dao.SysSmsLog.Ctx(ctx).WherePri(in.Id).Scan(&res); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + return +} + +// List 获取列表 +func (s *sSysSmsLog) List(ctx context.Context, in *sysin.SmsLogListInp) (list []*sysin.SmsLogListModel, totalCount int, err error) { + mod := dao.SysSmsLog.Ctx(ctx) + cols := dao.SysSmsLog.Columns() + + if in.Mobile != "" { + mod = mod.WhereLike(cols.Mobile, "%"+in.Mobile+"%") + } + + if in.Ip != "" { + mod = mod.Where(cols.Ip, in.Ip) + } + + if in.Event != "" { + mod = mod.Where(cols.Event, in.Event) + } + + if in.Status > 0 { + mod = mod.Where(cols.Status, in.Status) + } + + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween(cols.CreatedAt, in.CreatedAt[0], in.CreatedAt[1]) + } + + totalCount, err = mod.Count() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if totalCount == 0 { + return + } + + if err = mod.Page(in.Page, in.PerPage).OrderDesc(cols.Id).Scan(&list); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + return +} + +// SendCode 发送验证码 +func (s *sSysSmsLog) SendCode(ctx context.Context, in *sysin.SendCodeInp) (err error) { + if in.Event == "" { + err = gerror.New("事件不能为空") + return + } + + if in.Mobile == "" { + err = gerror.New("手机号不能为空") + return + } + + var models *entity.SysSmsLog + if err = dao.SysSmsLog.Ctx(ctx). + Where(dao.SysSmsLog.Columns().Event, in.Event). + Where(dao.SysSmsLog.Columns().Mobile, in.Mobile). + OrderDesc(dao.SysSmsLog.Columns().Id). + Scan(&models); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + config, err := service.SysConfig().GetSms(ctx) + if err != nil { + return + } + + if in.Template, err = s.GetTemplate(ctx, in.Event, config); err != nil { + return + } + + if err = s.AllowSend(ctx, models, config); err != nil { + return + } + + if in.Code == "" { + in.Code = grand.Digits(4) + } + + if err = sms.New(config.SmsDrive).SendCode(ctx, in); err != nil { + return + } + + var data = new(entity.SysSmsLog) + data.Event = in.Event + data.Mobile = in.Mobile + data.Code = in.Code + data.Ip = location.GetClientIp(ghttp.RequestFromCtx(ctx)) + data.Status = consts.CodeStatusNotUsed + data.CreatedAt = gtime.Now() + data.UpdatedAt = gtime.Now() + + _, err = dao.SysSmsLog.Ctx(ctx).Data(data).OmitEmptyData().Insert() + return +} + +// GetTemplate 获取指定短信模板 +func (s *sSysSmsLog) GetTemplate(ctx context.Context, template string, config *model.SmsConfig) (val string, err error) { + if template == "" { + err = gerror.New("模板不能为空") + return + } + if config == nil { + config, err = service.SysConfig().GetSms(ctx) + if err != nil { + return + } + } + + switch config.SmsDrive { + case consts.SmsDriveAliYun: + if len(config.AliYunTemplate) == 0 { + err = gerror.New("管理员还没有配置任何阿里云短信模板!") + return + } + + for _, v := range config.AliYunTemplate { + if v.Key == template { + return v.Value, nil + } + } + + case consts.SmsDriveTencent: + if len(config.TencentTemplate) == 0 { + err = gerror.New("管理员还没有配置任何腾讯云短信模板!") + return + } + + for _, v := range config.TencentTemplate { + if v.Key == template { + return v.Value, nil + } + } + default: + err = gerror.Newf("暂不支持短信驱动:%v", config.SmsDrive) + return + } + return +} + +// AllowSend 是否允许发送 +func (s *sSysSmsLog) AllowSend(ctx context.Context, models *entity.SysSmsLog, config *model.SmsConfig) (err error) { + if models == nil { + return + } + + if config == nil { + if config, err = service.SysConfig().GetSms(ctx); err != nil { + return + } + } + + if gtime.Now().Before(models.CreatedAt.Add(time.Second * time.Duration(config.SmsMinInterval))) { + err = gerror.New("发送频繁,请稍后再试!") + return + } + + if config.SmsMaxIpLimit > 0 { + count, err := s.NowDayIpSendCount(ctx, models.Event) + if err != nil { + return err + } + + if count >= config.SmsMaxIpLimit { + err = gerror.New("今天发送短信过多,请次日后再试!") + return err + } + } + return +} + +// NowDayIpSendCount 当天IP累计发送次数 +func (s *sSysSmsLog) NowDayIpSendCount(ctx context.Context, event string) (count int, err error) { + return dao.SysSmsLog.Ctx(ctx). + Where("ip", location.GetClientIp(ghttp.RequestFromCtx(ctx))). + Where("event", event). + WhereGTE("created_at", gtime.Now().Format("Y-m-d")). + Count() +} + +// VerifyCode 效验验证码 +func (s *sSysSmsLog) VerifyCode(ctx context.Context, in *sysin.VerifyCodeInp) (err error) { + if in.Event == "" { + err = gerror.New("事件不能为空") + return + } + + if in.Mobile == "" { + err = gerror.New("手机号不能为空") + return + } + + config, err := service.SysConfig().GetSms(ctx) + if err != nil { + return + } + + var models *entity.SysSmsLog + cols := dao.SysSmsLog.Columns() + if err = dao.SysSmsLog.Ctx(ctx).Where(cols.Event, in.Event).Where(cols.Mobile, in.Mobile).OrderDesc(cols.Id).Scan(&models); err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return + } + + if models == nil { + err = gerror.New("验证码错误") + return + } + + if models.Times >= 10 { + err = gerror.New("验证码错误次数过多,请重新发送!") + return + } + + if in.Event != consts.SmsTemplateCode { + if models.Status == consts.CodeStatusUsed { + err = gerror.New("验证码已使用,请重新发送!") + return + } + } + + if gtime.Now().After(models.CreatedAt.Add(time.Second * time.Duration(config.SmsCodeExpire))) { + err = gerror.New("验证码已过期,请重新发送") + return + } + + if models.Code != in.Code { + _, _ = dao.SysSmsLog.Ctx(ctx).WherePri(models.Id).Increment(cols.Times, 1) + err = gerror.New("验证码错误!") + return + } + + _, err = dao.SysSmsLog.Ctx(ctx).WherePri(models.Id).Data(g.Map{ + cols.Times: models.Times + 1, + cols.Status: consts.CodeStatusUsed, + cols.UpdatedAt: gtime.Now(), + }).Update() + return +} diff --git a/server/internal/logic/sys/test_category.go b/server/internal/logic/sys/test_category.go new file mode 100644 index 0000000..061a445 --- /dev/null +++ b/server/internal/logic/sys/test_category.go @@ -0,0 +1,167 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.15.7 +package sys + +import ( + "context" + "hotgo/internal/dao" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/sysin" + "hotgo/internal/service" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/util/gconv" + + "hotgo/internal/library/dict" + "hotgo/internal/model" +) + +type sSysTestCategory struct{} + +func NewSysTestCategory() *sSysTestCategory { + return &sSysTestCategory{} +} + +func init() { + service.RegisterSysTestCategory(NewSysTestCategory()) + dict.RegisterFunc("testCategoryOption", "测试分类选项", service.SysTestCategory().Option) +} + +// Model 测试分类ORM模型 +func (s *sSysTestCategory) Model(ctx context.Context, option ...*handler.Option) *gdb.Model { + return handler.Model(dao.TestCategory.Ctx(ctx), option...) +} + +// List 获取测试分类列表 +func (s *sSysTestCategory) List(ctx context.Context, in *sysin.TestCategoryListInp) (list []*sysin.TestCategoryListModel, totalCount int, err error) { + mod := s.Model(ctx) + + // 字段过滤 + mod = mod.Fields(sysin.TestCategoryListModel{}) + + // 查询分类ID + if in.Id > 0 { + mod = mod.Where(dao.TestCategory.Columns().Id, in.Id) + } + + // 查询分类名称 + if in.Name != "" { + mod = mod.WhereLike(dao.TestCategory.Columns().Name, "%"+in.Name+"%") + } + + // 查询状态 + if in.Status > 0 { + mod = mod.Where(dao.TestCategory.Columns().Status, in.Status) + } + + // 查询创建时间 + if len(in.CreatedAt) == 2 { + mod = mod.WhereBetween(dao.TestCategory.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1]) + } + + // 分页 + mod = mod.Page(in.Page, in.PerPage) + + // 排序 + mod = mod.OrderAsc(dao.TestCategory.Columns().Sort).OrderDesc(dao.TestCategory.Columns().Id) + + // 查询数据 + if err = mod.ScanAndCount(&list, &totalCount, false); err != nil { + err = gerror.Wrap(err, "获取测试分类列表失败,请稍后重试!") + return + } + return +} + +// Edit 修改/新增测试分类 +func (s *sSysTestCategory) Edit(ctx context.Context, in *sysin.TestCategoryEditInp) (err error) { + return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { + + // 修改 + if in.Id > 0 { + if _, err = s.Model(ctx). + Fields(sysin.TestCategoryUpdateFields{}). + WherePri(in.Id).Data(in).Update(); err != nil { + err = gerror.Wrap(err, "修改测试分类失败,请稍后重试!") + } + return + } + + // 新增 + if _, err = s.Model(ctx, &handler.Option{FilterAuth: false}). + Fields(sysin.TestCategoryInsertFields{}). + Data(in).OmitEmptyData().Insert(); err != nil { + err = gerror.Wrap(err, "新增测试分类失败,请稍后重试!") + } + return + }) +} + +// Delete 删除测试分类 +func (s *sSysTestCategory) Delete(ctx context.Context, in *sysin.TestCategoryDeleteInp) (err error) { + + if _, err = s.Model(ctx).WherePri(in.Id).Unscoped().Delete(); err != nil { + err = gerror.Wrap(err, "删除测试分类失败,请稍后重试!") + return + } + return +} + +// MaxSort 获取测试分类最大排序 +func (s *sSysTestCategory) MaxSort(ctx context.Context, in *sysin.TestCategoryMaxSortInp) (res *sysin.TestCategoryMaxSortModel, err error) { + if err = dao.TestCategory.Ctx(ctx).Fields(dao.TestCategory.Columns().Sort).OrderDesc(dao.TestCategory.Columns().Sort).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取测试分类最大排序,请稍后重试!") + return + } + + if res == nil { + res = new(sysin.TestCategoryMaxSortModel) + } + + res.Sort = form.DefaultMaxSort(res.Sort) + return +} + +// View 获取测试分类指定信息 +func (s *sSysTestCategory) View(ctx context.Context, in *sysin.TestCategoryViewInp) (res *sysin.TestCategoryViewModel, err error) { + if err = s.Model(ctx).WherePri(in.Id).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取测试分类信息,请稍后重试!") + return + } + return +} + +// Status 更新测试分类状态 +func (s *sSysTestCategory) Status(ctx context.Context, in *sysin.TestCategoryStatusInp) (err error) { + if _, err = s.Model(ctx).WherePri(in.Id).Data(g.Map{ + dao.TestCategory.Columns().Status: in.Status, + }).Update(); err != nil { + err = gerror.Wrap(err, "更新测试分类状态失败,请稍后重试!") + return + } + return +} + +// Option 获取测试分类选项 +func (s *sSysTestCategory) Option(ctx context.Context) (opts []*model.Option, err error) { + var models []*entity.TestCategory + if err = s.Model(ctx).Fields(dao.TestCategory.Columns().Id, dao.TestCategory.Columns().Name). + OrderAsc(dao.TestCategory.Columns().Sort).OrderDesc(dao.TestCategory.Columns().Id).Scan(&models); err != nil { + err = gerror.Wrap(err, "获取测试分类选项失败!") + return + } + + opts = make([]*model.Option, len(models)) + for k, v := range models { + opts[k] = dict.GenHashOption(v.Id, gconv.String(v.Name)) + } + return +} diff --git a/server/internal/logic/tcpclient/auth.go b/server/internal/logic/tcpclient/auth.go new file mode 100644 index 0000000..74ef557 --- /dev/null +++ b/server/internal/logic/tcpclient/auth.go @@ -0,0 +1,118 @@ +// Package tcpclient +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpclient + +import ( + "context" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gctx" + "hotgo/api/servmsg" + "hotgo/internal/library/network/tcp" + "hotgo/internal/model/input/servmsgin" + "hotgo/internal/service" + "hotgo/utility/simple" +) + +// tcp客户端 +type sAuthClient struct { + client *tcp.Client + summary *servmsgin.AuthSummaryModel +} + +func init() { + service.RegisterAuthClient(newAuthClient()) +} + +func newAuthClient() *sAuthClient { + return &sAuthClient{} +} + +// Instance 获取实例 +func (s *sAuthClient) Instance() *tcp.Client { + return s.client +} + +// Start 启动服务 +func (s *sAuthClient) Start(ctx context.Context) { + g.Log().Debug(ctx, "AuthClient start..") + + config, err := service.SysConfig().GetLoadTCP(ctx) + if err != nil { + g.Log().Errorf(ctx, "AuthClient start fail:%+v", err) + return + } + + if config.Client == nil || config.Client.Auth == nil { + g.Log().Errorf(ctx, "AuthClient config is invalid") + return + } + + // 创建客户端配置 + clientConfig := &tcp.ClientConfig{ + Addr: config.Client.Auth.Address, + AutoReconnect: true, + Auth: &tcp.AuthMeta{ + Name: config.Client.Auth.Name, + Extra: g.Map{ + "test": 13, + }, + Group: config.Client.Auth.Group, + AppId: config.Client.Auth.AppId, + SecretKey: config.Client.Auth.SecretKey, + }, + LoginEvent: s.onLoginEvent, + CloseEvent: s.onCloseEvent, + } + + simple.SafeGo(ctx, func(ctx context.Context) { + s.client = tcp.NewClient(clientConfig) + + // 注册路由 + s.client.RegisterRouter( + s.OnResponseAuthSummary, // 响应授权信息 + s.OnResponseExampleHello, // 一个tcp请求例子 + ) + + if err = s.client.Start(); err != nil { + g.Log().Errorf(ctx, "AuthClient Start fail:%+v", err) + return + } + }) +} + +// Stop 停止服务 +func (s *sAuthClient) Stop(ctx context.Context) { + if s.client != nil && !s.client.IsStop() { + s.client.Stop() + g.Log().Debug(ctx, "AuthClient stop..") + } +} + +// onLoginEvent 登录认证成功事件 +func (s *sAuthClient) onLoginEvent() { + ctx := gctx.New() + + // 获取授权信息 + _ = s.client.Send(ctx, &servmsg.AuthSummaryReq{}) + + // 测试例子,实际使用时可以注释掉 + s.testExample(ctx) + + g.Log().Debug(ctx, "AuthClient login succeed.") +} + +// onCloseEvent 连接关闭回调事件 +func (s *sAuthClient) onCloseEvent() { + g.Log().Debug(gctx.New(), "AuthClient closed.") +} + +// Summary 获取授权信息 +func (s *sAuthClient) Summary() *servmsgin.AuthSummaryModel { + if s.summary == nil { + s.summary = new(servmsgin.AuthSummaryModel) + } + return s.summary +} diff --git a/server/internal/logic/tcpclient/auth_handle.go b/server/internal/logic/tcpclient/auth_handle.go new file mode 100644 index 0000000..a74b14b --- /dev/null +++ b/server/internal/logic/tcpclient/auth_handle.go @@ -0,0 +1,54 @@ +// Package tcpclient +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpclient + +import ( + "context" + "github.com/gogf/gf/v2/frame/g" + "hotgo/api/servmsg" +) + +// OnResponseAuthSummary 响应授权信息 +func (s *sAuthClient) OnResponseAuthSummary(ctx context.Context, req *servmsg.AuthSummaryRes) { + if err := req.GetError(); err != nil { + g.Log().Warningf(ctx, "OnResponseAuthSummary GetError:%+v", err) + return + } + + // 拿到授权的数据,可以是一些动态的功能、路由、权限控制等 + s.summary = req.Data +} + +// OnResponseExampleHello 一个tcp请求例子 +func (s *sAuthClient) OnResponseExampleHello(ctx context.Context, req *servmsg.ExampleHelloRes) { + if err := req.GetError(); err != nil { + g.Log().Warningf(ctx, "OnResponseExampleHello GetError:%+v", err) + return + } + + g.Log().Infof(ctx, "OnResponseExampleHello data:%+v", req.Data) +} + +// testExample 测试例子 +func (s *sAuthClient) testExample(ctx context.Context) { + // 发起tcp请求 + // 异步执行,服务端返回消息后会转到`OnResponseExampleHello`中 + _ = s.client.Send(ctx, &servmsg.ExampleHelloReq{ + Name: "Tom", + }) + + // 发起rpc请求 + // 同步执行,阻塞等待服务端返回消息 + var req = &servmsg.ExampleRPCHelloReq{ + Name: "Tony", + } + var res *servmsg.ExampleRPCHelloRes + if err := s.client.RequestScan(ctx, req, &res); err != nil { + g.Log().Warningf(ctx, "client.Request ExampleRPCHelloReq err:%+v", err) + return + } + g.Log().Infof(ctx, "ExampleRPCHelloRes data:%+v", res.Data) +} diff --git a/server/internal/logic/tcpclient/client.go b/server/internal/logic/tcpclient/client.go new file mode 100644 index 0000000..311a066 --- /dev/null +++ b/server/internal/logic/tcpclient/client.go @@ -0,0 +1,6 @@ +// Package tcpclient +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpclient diff --git a/server/internal/logic/tcpclient/cron.go b/server/internal/logic/tcpclient/cron.go new file mode 100644 index 0000000..7acfcdb --- /dev/null +++ b/server/internal/logic/tcpclient/cron.go @@ -0,0 +1,102 @@ +// Package tcpclient +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpclient + +import ( + "context" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gctx" + "hotgo/internal/library/network/tcp" + "hotgo/internal/service" + "hotgo/utility/simple" +) + +// tcp客户端 +type sCronClient struct { + client *tcp.Client +} + +func init() { + service.RegisterCronClient(newCronClient()) +} + +func newCronClient() *sCronClient { + return &sCronClient{} +} + +// Instance 获取实例 +func (s *sCronClient) Instance() *tcp.Client { + return s.client +} + +// Start 启动服务 +func (s *sCronClient) Start(ctx context.Context) { + g.Log().Debug(ctx, "CronClient start..") + + config, err := service.SysConfig().GetLoadTCP(ctx) + if err != nil { + g.Log().Errorf(ctx, "CronClient start fail:%+v", err) + return + } + + if config == nil || config.Client == nil || config.Client.Cron == nil { + g.Log().Errorf(ctx, "CronClient config is invalid") + return + } + + // 创建客户端配置 + clientConfig := &tcp.ClientConfig{ + Addr: config.Client.Cron.Address, + AutoReconnect: true, + Auth: &tcp.AuthMeta{ + Name: config.Client.Cron.Name, + Group: config.Client.Cron.Group, + AppId: config.Client.Cron.AppId, + SecretKey: config.Client.Cron.SecretKey, + }, + LoginEvent: s.onLoginEvent, + CloseEvent: s.onCloseEvent, + } + + simple.SafeGo(ctx, func(ctx context.Context) { + s.client = tcp.NewClient(clientConfig) + + // 注册RPC路由 + s.client.RegisterRPCRouter( + s.OnCronDelete, // 删除任务 + s.OnCronEdit, // 编辑任务 + s.OnCronStatus, // 修改任务状态 + s.OnCronOnlineExec, // 执行一次任务 + s.OnCronDispatchLog, // 查看调度日志 + ) + + // 注册拦截器 + s.client.RegisterInterceptor(s.DefaultInterceptor) + + if err = s.client.Start(); err != nil { + g.Log().Errorf(ctx, "CronClient Start fail:%+v", err) + return + } + }) +} + +// Stop 停止服务 +func (s *sCronClient) Stop(ctx context.Context) { + if s.client != nil && !s.client.IsStop() { + s.client.Stop() + g.Log().Debug(ctx, "CronClient stop..") + } +} + +// onLoginEvent 登录认证成功事件 +func (s *sCronClient) onLoginEvent() { + g.Log().Debug(gctx.New(), "CronClient login succeed.") +} + +// onCloseEvent 连接关闭回调事件 +func (s *sCronClient) onCloseEvent() { + g.Log().Debug(gctx.New(), "CronClient closed.") +} diff --git a/server/internal/logic/tcpclient/cron_handle.go b/server/internal/logic/tcpclient/cron_handle.go new file mode 100644 index 0000000..ab62ce2 --- /dev/null +++ b/server/internal/logic/tcpclient/cron_handle.go @@ -0,0 +1,43 @@ +// Package tcpclient +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpclient + +import ( + "context" + "hotgo/api/servmsg" + "hotgo/internal/service" +) + +// OnCronDelete 删除任务 +func (s *sCronClient) OnCronDelete(ctx context.Context, req *servmsg.CronDeleteReq) (res *servmsg.CronDeleteRes, err error) { + err = service.SysCron().Delete(ctx, req.CronDeleteInp) + return +} + +// OnCronEdit 编辑任务 +func (s *sCronClient) OnCronEdit(ctx context.Context, req *servmsg.CronEditReq) (res *servmsg.CronEditRes, err error) { + err = service.SysCron().Edit(ctx, req.CronEditInp) + return +} + +// OnCronStatus 修改任务状态 +func (s *sCronClient) OnCronStatus(ctx context.Context, req *servmsg.CronStatusReq) (res *servmsg.CronStatusRes, err error) { + err = service.SysCron().Status(ctx, req.CronStatusInp) + return +} + +// OnCronOnlineExec 执行一次任务 +func (s *sCronClient) OnCronOnlineExec(ctx context.Context, req *servmsg.CronOnlineExecReq) (res *servmsg.CronOnlineExecRes, err error) { + err = service.SysCron().OnlineExec(ctx, req.OnlineExecInp) + return +} + +// OnCronDispatchLog 查看调度日志 +func (s *sCronClient) OnCronDispatchLog(ctx context.Context, req *servmsg.CronDispatchLogReq) (res *servmsg.CronDispatchLogRes, err error) { + res = new(servmsg.CronDispatchLogRes) + res.DispatchLogModel, err = service.SysCron().DispatchLog(ctx, req.DispatchLogInp) + return +} diff --git a/server/internal/logic/tcpclient/cron_interceptor.go b/server/internal/logic/tcpclient/cron_interceptor.go new file mode 100644 index 0000000..0dbe61a --- /dev/null +++ b/server/internal/logic/tcpclient/cron_interceptor.go @@ -0,0 +1,18 @@ +// Package tcpclient +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpclient + +import ( + "context" + "hotgo/internal/library/network/tcp" +) + +// DefaultInterceptor 默认拦截器 +func (s *sCronClient) DefaultInterceptor(ctx context.Context, msg *tcp.Message) (err error) { + //conn := tcp.ConnFromCtx(ctx) + //g.Log().Warningf(ctx, "DefaultInterceptor msg:%+v, conn:%+v", msg, gjson.New(conn).String()) + return +} diff --git a/server/internal/logic/tcpserver/auth_handle.go b/server/internal/logic/tcpserver/auth_handle.go new file mode 100644 index 0000000..45798bc --- /dev/null +++ b/server/internal/logic/tcpserver/auth_handle.go @@ -0,0 +1,80 @@ +// Package tcpserver +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpserver + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/api/servmsg" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/network/tcp" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/servmsgin" + "hotgo/internal/service" +) + +// OnAuthSummary 获取授权信息 +func (s *sTCPServer) OnAuthSummary(ctx context.Context, req *servmsg.AuthSummaryReq) { + var ( + conn = tcp.ConnFromCtx(ctx) + models *entity.SysServeLicense + res = new(servmsg.AuthSummaryRes) + ) + + if conn == nil { + g.Log().Warningf(ctx, "conn is nil.") + return + } + + if conn.Auth == nil { + res.SetError(gerror.New("登录信息获取失败,请重新登录")) + _ = conn.Send(ctx, res) + return + } + + if err := dao.SysServeLicense.Ctx(ctx).Where("appid = ?", conn.Auth.AppId).Scan(&models); err != nil { + res.SetError(err) + _ = conn.Send(ctx, res) + return + } + + if models == nil { + res.SetError(gerror.New("授权信息不存在")) + _ = conn.Send(ctx, res) + return + } + + if models.Status != consts.StatusEnabled { + res.SetError(gerror.New("授权已禁用,请联系管理员")) + _ = conn.Send(ctx, res) + return + } + + if models.Group != conn.Auth.Group { + res.SetError(gerror.New("你登录的授权分组未得到授权,请联系管理员")) + _ = conn.Send(ctx, res) + return + } + + if models.EndAt.Before(gtime.Now()) { + res.SetError(gerror.New("授权已过期,请联系管理员")) + _ = conn.Send(ctx, res) + return + } + + data := new(servmsgin.AuthSummaryModel) + data.EndAt = models.EndAt + data.Online = service.TCPServer().Instance().GetAppIdOnline(models.Appid) + + // 请填充你的授权数据 + // ... + + res.Data = data + _ = conn.Send(ctx, res) +} diff --git a/server/internal/logic/tcpserver/cron_handle.go b/server/internal/logic/tcpserver/cron_handle.go new file mode 100644 index 0000000..183f93f --- /dev/null +++ b/server/internal/logic/tcpserver/cron_handle.go @@ -0,0 +1,117 @@ +// Package tcpserver +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpserver + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "hotgo/api/servmsg" + "hotgo/internal/consts" + "hotgo/internal/library/cron" +) + +// CronDelete 删除任务 +func (s *sTCPServer) CronDelete(ctx context.Context, in *servmsg.CronDeleteReq) (err error) { + clients := s.serv.GetGroupClients(consts.LicenseGroupCron) + if len(clients) == 0 { + err = gerror.New("没有在线的定时任务服务") + return + } + + for _, client := range clients { + var res servmsg.CronDeleteRes + if err = s.serv.RequestScan(ctx, client, in, &res); err != nil { + return + } + + if err = res.GetError(); err != nil { + return + } + } + return +} + +// CronEdit 编辑任务 +func (s *sTCPServer) CronEdit(ctx context.Context, in *servmsg.CronEditReq) (err error) { + clients := s.serv.GetGroupClients(consts.LicenseGroupCron) + if len(clients) == 0 { + err = gerror.New("没有在线的定时任务服务") + return + } + + for _, client := range clients { + var res servmsg.CronEditRes + if err = s.serv.RequestScan(ctx, client, in, &res); err != nil { + return + } + + if err = res.GetError(); err != nil { + return + } + } + return +} + +// CronStatus 修改任务状态 +func (s *sTCPServer) CronStatus(ctx context.Context, in *servmsg.CronStatusReq) (err error) { + clients := s.serv.GetGroupClients(consts.LicenseGroupCron) + if len(clients) == 0 { + err = gerror.New("没有在线的定时任务服务") + return + } + + for _, client := range clients { + var res servmsg.CronStatusRes + if err = s.serv.RequestScan(ctx, client, in, &res); err != nil { + return + } + + if err = res.GetError(); err != nil { + return + } + } + return +} + +// CronOnlineExec 执行一次任务 +func (s *sTCPServer) CronOnlineExec(ctx context.Context, in *servmsg.CronOnlineExecReq) (err error) { + clients := s.serv.GetGroupClients(consts.LicenseGroupCron) + if len(clients) == 0 { + err = gerror.New("没有在线的定时任务服务") + return + } + + for _, client := range clients { + var res servmsg.CronOnlineExecRes + if err = s.serv.RequestScan(ctx, client, in, &res); err != nil { + return + } + + if err = res.GetError(); err != nil { + return + } + } + return +} + +// DispatchLog 查看调度日志 +func (s *sTCPServer) DispatchLog(ctx context.Context, in *servmsg.CronDispatchLogReq) (log *cron.Log, err error) { + clients := s.serv.GetGroupClients(consts.LicenseGroupCron) + if len(clients) == 0 { + err = gerror.New("没有在线的定时任务服务") + return + } + + var res servmsg.CronDispatchLogRes + if err = s.serv.RequestScan(ctx, clients[0], in, &res); err != nil { + return + } + + if err = res.GetError(); err != nil { + return + } + return res.Log, nil +} diff --git a/server/internal/logic/tcpserver/example_handle.go b/server/internal/logic/tcpserver/example_handle.go new file mode 100644 index 0000000..366be1a --- /dev/null +++ b/server/internal/logic/tcpserver/example_handle.go @@ -0,0 +1,54 @@ +// Package tcpserver +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpserver + +import ( + "context" + "fmt" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/api/servmsg" + "hotgo/internal/consts" + "hotgo/internal/library/network/tcp" + "hotgo/internal/model/input/servmsgin" +) + +// OnExampleHello 一个tcp请求例子 +func (s *sTCPServer) OnExampleHello(ctx context.Context, req *servmsg.ExampleHelloReq) { + var ( + conn = tcp.ConnFromCtx(ctx) + res = new(servmsg.ExampleHelloRes) + data = new(servmsgin.ExampleHelloModel) + ) + + if conn == nil { + g.Log().Warningf(ctx, "conn is nil.") + return + } + + if conn.Auth == nil { + res.SetError(gerror.New("连接未认证,请确认已登录成功!")) + _ = conn.Send(ctx, res) + return + } + + data.Desc = fmt.Sprintf("Hello %v, 你的APPID:%v,当前HotGo版本:%v,你成功请求了`servmsg.ExampleHelloReq`接口!", req.Name, conn.Auth.AppId, consts.VersionApp) + data.Timestamp = gtime.Now() + res.Data = data + _ = conn.Send(ctx, res) +} + +// OnExampleRPCHello 一个rpc请求例子 +func (s *sTCPServer) OnExampleRPCHello(ctx context.Context, req *servmsg.ExampleRPCHelloReq) (res *servmsg.ExampleRPCHelloRes, err error) { + var data = new(servmsgin.ExampleHelloModel) + data.Desc = fmt.Sprintf("Hello %v, 当前HotGo版本:%v,你成功请求了`servmsg.ExampleRPCHelloReq`接口!", req.Name, consts.VersionApp) + data.Timestamp = gtime.Now() + + res = new(servmsg.ExampleRPCHelloRes) + res.Data = data + return +} diff --git a/server/internal/logic/tcpserver/server.go b/server/internal/logic/tcpserver/server.go new file mode 100644 index 0000000..c0dd88b --- /dev/null +++ b/server/internal/logic/tcpserver/server.go @@ -0,0 +1,74 @@ +// Package tcpserver +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpserver + +import ( + "context" + "github.com/gogf/gf/v2/frame/g" + "hotgo/internal/library/network/tcp" + "hotgo/internal/service" + "hotgo/utility/simple" +) + +type sTCPServer struct { + serv *tcp.Server +} + +func init() { + service.RegisterTCPServer(newTCPServer()) +} + +func newTCPServer() *sTCPServer { + return &sTCPServer{} +} + +// Instance 获取实例 +func (s *sTCPServer) Instance() *tcp.Server { + return s.serv +} + +// Start 启动服务 +func (s *sTCPServer) Start(ctx context.Context) { + simple.SafeGo(ctx, func(ctx context.Context) { + g.Log().Debug(ctx, "TCPServer start..") + + s.serv = tcp.NewServer(&tcp.ServerConfig{ + Name: simple.AppName(ctx), + Addr: g.Cfg().MustGet(ctx, "tcp.server.address").String(), + }) + + // 注册路由 + s.serv.RegisterRouter( + s.onServerLogin, // 服务登录 + s.onServerHeartbeat, // 心跳 + s.OnAuthSummary, // 获取授权信息 + s.OnExampleHello, // 一个tcp请求例子 + ) + + // 注册RPC路由 + s.serv.RegisterRPCRouter( + s.OnExampleRPCHello, // 一个rpc请求例子 + ) + + // 注册拦截器 + s.serv.RegisterInterceptor(s.DefaultInterceptor, s.PreFilterInterceptor) + + // 服务监听 + if err := s.serv.Listen(); err != nil { + if !s.serv.IsClose() { + g.Log().Warningf(ctx, "TCPServer Listen err:%v", err) + } + } + }) +} + +// Stop 关闭服务 +func (s *sTCPServer) Stop(ctx context.Context) { + if s.serv != nil && !s.serv.IsClose() { + s.serv.Close() + g.Log().Debug(ctx, "TCPServer stop..") + } +} diff --git a/server/internal/logic/tcpserver/server_handle.go b/server/internal/logic/tcpserver/server_handle.go new file mode 100644 index 0000000..1c817b6 --- /dev/null +++ b/server/internal/logic/tcpserver/server_handle.go @@ -0,0 +1,167 @@ +// Package tcpserver +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpserver + +import ( + "context" + "fmt" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/text/gstr" + "hotgo/internal/consts" + "hotgo/internal/dao" + "hotgo/internal/library/network/tcp" + "hotgo/internal/model/entity" + "hotgo/utility/convert" + "hotgo/utility/encrypt" +) + +// onServerLogin 处理客户端登录 +func (s *sTCPServer) onServerLogin(ctx context.Context, req *tcp.ServerLoginReq) { + var ( + conn = tcp.ConnFromCtx(ctx) + models *entity.SysServeLicense + res = new(tcp.ServerLoginRes) + cols = dao.SysServeLicense.Columns() + ) + + if conn == nil { + g.Log().Warningf(ctx, "conn is nil.") + return + } + + if err := dao.SysServeLicense.Ctx(ctx).Where(cols.Appid, req.AppId).Scan(&models); err != nil { + return + } + if models == nil { + res.SetError(gerror.New("授权信息不存在")) + _ = conn.Send(ctx, res) + return + } + + // 验证签名 + sign := encrypt.Md5ToString(fmt.Sprintf("%v%v%v", models.Appid, req.Timestamp, models.SecretKey)) + if sign != req.Sign { + res.SetError(gerror.New("签名错误,请检查!")) + _ = conn.Send(ctx, res) + return + } + + if models.Status != consts.StatusEnabled { + res.SetError(gerror.New("授权已禁用,请联系管理员")) + _ = conn.Send(ctx, res) + return + } + + if models.Group != req.Group { + res.SetError(gerror.New("你登录的授权分组未得到授权,请联系管理员")) + _ = conn.Send(ctx, res) + return + } + + if models.EndAt.Before(gtime.Now()) { + res.SetError(gerror.New("授权已过期,请联系管理员")) + _ = conn.Send(ctx, res) + return + } + + ip := gstr.StrTillEx(conn.RemoteAddr().String(), ":") + if !convert.MatchIpStrategy(models.AllowedIps, ip) { + res.SetError(gerror.New("IP(" + ip + ")未授权,请联系管理员")) + _ = conn.Send(ctx, res) + return + } + + var routes []string + if err := models.Routes.Scan(&routes); err != nil { + res.SetError(gerror.New("授权路由解析失败,请联系管理员")) + _ = conn.Send(ctx, res) + return + } + + // 拿出当前登录应用的所有客户端 + clients := s.serv.GetAppIdClients(models.Appid) + + // 检查多地登录,如果连接超过上限,则断开当前许可证下的所有连接 + if len(clients)+1 > models.OnlineLimit { + for _, client := range clients { + client.Close() + } + res.SetError(gerror.New("授权登录端超出上限,请勿多地登录")) + _ = conn.Send(ctx, res) + return + } + + for _, client := range clients { + if client.Auth.Name == req.Name { + res.SetError(gerror.Newf("应用名称[%v]已存在登录用户,当前连接已被拒绝。", req.Name)) + _ = conn.Send(ctx, res) + return + } + } + + auth := &tcp.AuthMeta{ + Name: req.Name, + Extra: req.Extra, + Group: models.Group, + AppId: models.Appid, + SecretKey: models.SecretKey, + EndAt: models.EndAt, + Routes: routes, + } + s.serv.AuthClient(conn, auth) + + update := g.Map{ + cols.LoginTimes: models.LoginTimes + 1, + cols.LastLoginAt: gtime.Now(), + cols.LastActiveAt: gtime.Now(), + cols.RemoteAddr: conn.RemoteAddr().String(), + } + if _, err := dao.SysServeLicense.Ctx(ctx).Where(cols.Id, models.Id).Data(update).Update(); err != nil { + res.SetError(err) + _ = conn.Send(ctx, res) + return + } + + g.Log().Debugf(ctx, "onServerLogin succeed. appid:%v, group:%v, name:%v", auth.AppId, auth.Group, auth.Name) + _ = conn.Send(ctx, res) +} + +// onServerHeartbeat 处理客户端心跳 +func (s *sTCPServer) onServerHeartbeat(ctx context.Context, req *tcp.ServerHeartbeatReq) { + var ( + conn = tcp.ConnFromCtx(ctx) + res = new(tcp.ServerHeartbeatRes) + ) + + if conn == nil { + g.Log().Warningf(ctx, "conn is nil.") + return + } + + client := s.serv.GetClient(conn.Conn) + if client == nil { + res.SetError(gerror.New("登录异常,请重新登录")) + _ = conn.Send(ctx, res) + return + } + + // 更新心跳 + client.Heartbeat = gtime.Timestamp() + + // 更新活跃时间 + update := g.Map{ + dao.SysServeLicense.Columns().LastActiveAt: gtime.Now(), + } + if _, err := dao.SysServeLicense.Ctx(ctx).Where(dao.SysServeLicense.Columns().Appid, client.Auth.AppId).Data(update).Update(); err != nil { + res.SetError(err) + _ = conn.Send(ctx, res) + return + } + + _ = conn.Send(ctx, res) +} diff --git a/server/internal/logic/tcpserver/server_interceptor.go b/server/internal/logic/tcpserver/server_interceptor.go new file mode 100644 index 0000000..8b84084 --- /dev/null +++ b/server/internal/logic/tcpserver/server_interceptor.go @@ -0,0 +1,75 @@ +// Package tcpserver +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package tcpserver + +import ( + "context" + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/library/network/tcp" + "hotgo/utility/validate" +) + +// 免登录路由 +var noLoginRouter = map[string]struct{}{ + "ServerLoginReq": {}, // 服务登录 +} + +// 免验证路由 +var noVerifyRouter = map[string]struct{}{ + "ServerHeartbeatReq": {}, // 心跳 +} + +func (s *sTCPServer) isNoLoginRouter(router string) bool { + _, ok := noLoginRouter[router] + return ok +} + +func (s *sTCPServer) isNoVerifyRouter(router string) bool { + _, ok := noVerifyRouter[router] + return ok +} + +// DefaultInterceptor 默认拦截器 +func (s *sTCPServer) DefaultInterceptor(ctx context.Context, msg *tcp.Message) (err error) { + conn := tcp.ConnFromCtx(ctx) + // g.Log().Debugf(ctx, "DefaultInterceptor msg:%+v, conn:%+v", msg, gjson.New(conn).String()) + + // 免登录 + if s.isNoLoginRouter(msg.Router) { + return + } + + if conn.Auth == nil { + err = gerror.NewCode(gcode.CodeNotAuthorized, "未进行登录认证,请先登录") + return + } + + // 检查授权有效期 + if conn.Auth.EndAt.Before(gtime.Now()) { + err = gerror.NewCode(gcode.CodeNotAuthorized, "授权已过期") + return + } + + // 免验证 + if s.isNoVerifyRouter(msg.Router) { + return + } + + // 验证路由权限 + if len(conn.Auth.Routes) > 0 && !validate.InSlice(conn.Auth.Routes, msg.Router) { + err = gerror.NewCodef(gcode.CodeNotAuthorized, "没有授权路由访问权限:%v", msg.Router) + return + } + return +} + +// PreFilterInterceptor 预处理 +func (s *sTCPServer) PreFilterInterceptor(ctx context.Context, msg *tcp.Message) (err error) { + // g.Log().Debug(ctx, "PreFilterInterceptor...") + return +} diff --git a/server/internal/logic/view/view.go b/server/internal/logic/view/view.go new file mode 100644 index 0000000..f871050 --- /dev/null +++ b/server/internal/logic/view/view.go @@ -0,0 +1,131 @@ +// Package view +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package view + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gfile" + "github.com/gogf/gf/v2/os/gres" + "github.com/gogf/gf/v2/text/gstr" + "github.com/gogf/gf/v2/util/gconv" + "hotgo/internal/library/addons" + "hotgo/internal/library/contexts" + "hotgo/internal/model" + "hotgo/internal/service" + "hotgo/utility/charset" + "hotgo/utility/simple" +) + +type sView struct{} + +func init() { + service.RegisterView(New()) +} + +func New() *sView { + return &sView{} +} + +// GetBreadCrumb 前台系统-获取面包屑列表 +func (s *sView) GetBreadCrumb(ctx context.Context, in *model.ViewGetBreadCrumbInput) []model.ViewBreadCrumb { + breadcrumb := []model.ViewBreadCrumb{ + {Name: "首页", Url: "/"}, + } + return breadcrumb +} + +// GetTitle 前台系统-获取标题 +func (s *sView) GetTitle(ctx context.Context, in *model.ViewGetTitleInput) string { + return "title" +} + +// RenderTpl 渲染指定模板页面 +func (s *sView) RenderTpl(ctx context.Context, tpl string, data ...model.View) { + var ( + viewObj = model.View{} + request = g.RequestFromCtx(ctx) + ) + if len(data) > 0 { + viewObj = data[0] + } + if viewObj.Title == "" { + viewObj.Title = g.Cfg().MustGet(ctx, `setting.title`).String() + } else { + viewObj.Title = viewObj.Title + ` - ` + g.Cfg().MustGet(ctx, `setting.title`).String() + } + if viewObj.Keywords == "" { + viewObj.Keywords = g.Cfg().MustGet(ctx, `setting.keywords`).String() + } + if viewObj.Description == "" { + viewObj.Description = g.Cfg().MustGet(ctx, `setting.description`).String() + } + if viewObj.IpcCode == "" { + viewObj.IpcCode = g.Cfg().MustGet(ctx, `setting.icpCode`).String() + } + + if viewObj.GET == nil { + viewObj.GET = request.GetQueryMap() + } + + // 去掉空数据 + viewData := gconv.Map(viewObj) + for k, v := range viewData { + if g.IsEmpty(v) { + delete(viewData, k) + } + } + // 内置对象 + viewData["BuildIn"] = &viewBuildIn{httpRequest: request} + + // 插件模板,兼容从资源文件中读取 + if addonName := contexts.GetAddonName(ctx); len(addonName) > 0 { + basePath := addons.GetResourcePath(ctx) + if len(basePath) > 0 && !gstr.Contains(tpl, basePath) { + path := addons.ViewPath(addonName, basePath) + tpl = path + "/" + tpl + } + + content := "" + if !gres.IsEmpty() && gres.Contains(tpl) { + content = string(gres.GetContent(tpl)) + } else { + content = gfile.GetContents(tpl) + } + _ = request.Response.WriteTplContent(content, viewData) + return + } + + // 渲染模板 + _ = request.Response.WriteTpl(tpl, viewData) +} + +// Render 渲染默认模板页面 +func (s *sView) Render(ctx context.Context, data ...model.View) { + s.RenderTpl(ctx, g.Cfg().MustGet(ctx, "viewer.homeLayout").String(), data...) +} + +// Error 自定义错误页面 +func (s *sView) Error(ctx context.Context, err error) { + var ( + request = g.RequestFromCtx(ctx) + code = gerror.Code(err) + stack string + ) + + // 是否输出错误堆栈到页面 + if simple.Debug(ctx) { + stack = charset.SerializeStack(err) + } + + request.Response.ClearBuffer() + _ = request.Response.WriteTplContent(simple.DefaultErrorTplContent(ctx), g.Map{ + "code": code.Code(), + "message": code.Message(), + "stack": stack, + }) +} diff --git a/server/internal/logic/view/view_buildin.go b/server/internal/logic/view/view_buildin.go new file mode 100644 index 0000000..5f7337c --- /dev/null +++ b/server/internal/logic/view/view_buildin.go @@ -0,0 +1,54 @@ +// Package view +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package view + +import ( + "hotgo/internal/consts" + + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/text/gstr" + "github.com/gogf/gf/v2/util/gconv" + "github.com/gogf/gf/v2/util/gmode" +) + +// 视图自定义方法管理对象 +type viewBuildIn struct { + httpRequest *ghttp.Request +} + +// Page 创建分页HTML内容 +func (s *viewBuildIn) Page(total, size int) string { + page := s.httpRequest.GetPage(total, size) + page.LinkStyle = "page-link" + page.SpanStyle = "page-link" + page.PrevPageTag = "«" + page.NextPageTag = "»" + content := page.PrevPage() + page.PageBar() + page.NextPage() + content = gstr.ReplaceByMap(content, map[string]string{ + "": "/span>", + "": "/a>", + }) + return content +} + +// UrlPath 获取当前页面的Url Path. +func (s *viewBuildIn) UrlPath() string { + return s.httpRequest.URL.Path +} + +// Version 随机数 开发环境时间戳,线上为前端版本号 +func (s *viewBuildIn) Version() string { + var rand string + if gmode.IsDevelop() { + rand = gconv.String(gtime.TimestampMilli()) + } else { + rand = consts.VersionApp + } + return rand +} diff --git a/server/internal/model/.gitkeep b/server/internal/model/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/internal/model/config.go b/server/internal/model/config.go new file mode 100644 index 0000000..dc333e6 --- /dev/null +++ b/server/internal/model/config.go @@ -0,0 +1,188 @@ +// Package model +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package model + +// 后台配置. + +// BasicConfig 基础配置 +type BasicConfig struct { + CaptchaSwitch int `json:"basicCaptchaSwitch"` + CloseText string `json:"basicCloseText"` + Copyright string `json:"basicCopyright"` + IcpCode string `json:"basicIcpCode"` + Logo string `json:"basicLogo"` + Name string `json:"basicName"` + Domain string `json:"basicDomain"` + WsAddr string `json:"basicWsAddr"` + RegisterSwitch int `json:"basicRegisterSwitch"` + SystemOpen bool `json:"basicSystemOpen"` +} + +// EmailTemplate 邮件模板 +type EmailTemplate struct { + Key string `json:"key"` + Value string `json:"value"` +} + +// EmailConfig 邮箱配置 +type EmailConfig struct { + User string `json:"smtpUser"` + Password string `json:"smtpPass"` + Addr string `json:"smtpAddr"` + Host string `json:"smtpHost"` + Port int64 `json:"smtpPort"` + SendName string `json:"smtpSendName"` + AdminMailbox string `json:"smtpAdminMailbox"` + MinInterval int `json:"smtpMinInterval"` + MaxIpLimit int `json:"smtpMaxIpLimit"` + CodeExpire int `json:"smtpCodeExpire"` + Template []*EmailTemplate `json:"smtpTemplate"` +} + +// CashConfig 提现配置 +type CashConfig struct { + Switch bool `json:"cashSwitch"` + MinFee float64 `json:"cashMinFee"` + MinFeeRatio float64 `json:"cashMinFeeRatio"` + MinMoney float64 `json:"cashMinMoney"` + Tips string `json:"cashTips"` +} + +// UploadConfig 上传配置 +type UploadConfig struct { + // 通用配置 + Drive string `json:"uploadDrive"` + FileSize int64 `json:"uploadFileSize"` + FileType string `json:"uploadFileType"` + ImageSize int64 `json:"uploadImageSize"` + ImageType string `json:"uploadImageType"` + // 本地存储配置 + LocalPath string `json:"uploadLocalPath"` + // UCloud对象存储配置 + UCloudBucketHost string `json:"uploadUCloudBucketHost"` + UCloudBucketName string `json:"uploadUCloudBucketName"` + UCloudEndpoint string `json:"uploadUCloudEndpoint"` + UCloudFileHost string `json:"uploadUCloudFileHost"` + UCloudPath string `json:"uploadUCloudPath"` + UCloudPrivateKey string `json:"uploadUCloudPrivateKey"` + UCloudPublicKey string `json:"uploadUCloudPublicKey"` + // 腾讯云cos配置 + CosSecretId string `json:"uploadCosSecretId"` + CosSecretKey string `json:"uploadCosSecretKey"` + CosBucketURL string `json:"uploadCosBucketURL"` + CosPath string `json:"uploadCosPath"` + // 阿里云oss配置 + OssSecretId string `json:"uploadOssSecretId"` + OssSecretKey string `json:"uploadOssSecretKey"` + OssEndpoint string `json:"uploadOssEndpoint"` + OssBucketURL string `json:"uploadOssBucketURL"` + OssPath string `json:"uploadOssPath"` + OssBucket string `json:"uploadOssBucket"` + // 七牛云对象存储配置 + QiNiuAccessKey string `json:"uploadQiNiuAccessKey"` + QiNiuSecretKey string `json:"uploadQiNiuSecretKey"` + QiNiuDomain string `json:"uploadQiNiuDomain"` + QiNiuPath string `json:"uploadQiNiuPath"` + QiNiuBucket string `json:"uploadQiNiuBucket"` + // minio配置 + MinioAccessKey string `json:"uploadMinioAccessKey"` + MinioSecretKey string `json:"uploadMinioSecretKey"` + MinioEndpoint string `json:"uploadMinioEndpoint"` + MinioUseSSL int `json:"uploadMinioUseSSL"` + MinioPath string `json:"uploadMinioPath"` + MinioBucket string `json:"uploadMinioBucket"` + MinioDomain string `json:"uploadMinioDomain"` +} + +// GeoConfig 地理配置 +type GeoConfig struct { + GeoAmapWebKey string `json:"geoAmapWebKey"` +} + +// SmsTemplate 短信模板 +type SmsTemplate struct { + Key string `json:"key"` + Value string `json:"value"` +} + +// SmsConfig 短信配置 +type SmsConfig struct { + // 基础 + SmsDrive string `json:"smsDrive"` + SmsMinInterval int `json:"smsMinInterval"` + SmsMaxIpLimit int `json:"smsMaxIpLimit"` + SmsCodeExpire int `json:"smsCodeExpire"` + // 阿里云 + AliYunAccessKeyID string `json:"smsAliYunAccessKeyID"` + AliYunAccessKeySecret string `json:"smsAliYunAccessKeySecret"` + AliYunSign string `json:"smsAliYunSign"` + AliYunTemplate []*SmsTemplate `json:"smsAliYunTemplate"` + // 腾讯云 + TencentSecretId string `json:"smsTencentSecretId"` + TencentSecretKey string `json:"smsTencentSecretKey"` + TencentEndpoint string `json:"smsTencentEndpoint"` + TencentRegion string `json:"smsTencentRegion"` + TencentAppId string `json:"smsTencentAppId"` + TencentSign string `json:"smsTencentSign"` + TencentTemplate []*SmsTemplate `json:"smsTencentTemplate"` +} + +type PayConfig struct { + Debug bool `json:"payDebug"` + // 支付宝 + AliPayAppId string `json:"payAliPayAppId"` + AliPayPrivateKey string `json:"payAliPayPrivateKey"` + AliPayAppCertPublicKey string `json:"payAliPayAppCertPublicKey"` + AliPayRootCert string `json:"payAliPayRootCert"` + AliPayCertPublicKeyRSA2 string `json:"payAliPayCertPublicKeyRSA2"` + // 微信支付 + WxPayAppId string `json:"payWxPayAppId"` + WxPayMchId string `json:"payWxPayMchId"` + WxPaySerialNo string `json:"payWxPaySerialNo"` + WxPayAPIv3Key string `json:"payWxPayAPIv3Key"` + WxPayPrivateKey string `json:"payWxPayPrivateKey"` + // QQ支付 + QQPayAppId string `json:"payQQPayAppId"` + QQPayMchId string `json:"payQQPayMchId"` + QQPayApiKey string `json:"payQQPayApiKey"` +} + +// WechatOfficialAccountConfig 微信公众号配置 +type WechatOfficialAccountConfig struct { + OfficialAppID string `json:"officialAccountAppId"` // appid + OfficialAppSecret string `json:"officialAccountAppSecret"` // app secret + OfficialToken string `json:"officialAccountToken"` // token + OfficialEncodingAESKey string `json:"officialAccountEncodingAESKey"` // EncodingAESKey +} + +// WechatOpenPlatformConfig 微信开放平台配置 +type WechatOpenPlatformConfig struct { + OpenAppID string `json:"openPlatformAppId"` // appid + OpenAppSecret string `json:"openPlatformAppSecret"` // app secret + OpenToken string `json:"openPlatformToken"` // token + OpenEncodingAESKey string `json:"openPlatformEncodingAESKey"` // EncodingAESKey +} + +// WechatConfig 微信配置 +type WechatConfig struct { + *WechatOfficialAccountConfig + *WechatOpenPlatformConfig +} + +// LoginConfig 登录配置 +type LoginConfig struct { + RegisterSwitch int `json:"loginRegisterSwitch"` + CaptchaSwitch int `json:"loginCaptchaSwitch"` + CaptchaType int `json:"loginCaptchaType"` + Avatar string `json:"loginAvatar"` + RoleId int64 `json:"loginRoleId"` + DeptId int64 `json:"loginDeptId"` + PostIds []int64 `json:"loginPostIds"` + Protocol string `json:"loginProtocol"` + Policy string `json:"loginPolicy"` + AutoOpenId int `json:"loginAutoOpenId"` + ForceInvite int `json:"loginForceInvite"` +} diff --git a/server/internal/model/config_load.go b/server/internal/model/config_load.go new file mode 100644 index 0000000..facf90a --- /dev/null +++ b/server/internal/model/config_load.go @@ -0,0 +1,115 @@ +// Package model +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package model + +// 本地配置. + +// LogConfig 日志配置 +type LogConfig struct { + Switch bool `json:"switch"` + Queue bool `json:"queue"` + Module []string `json:"module"` + SkipCode []string `json:"skipCode"` +} + +// ServeLogConfig 服务日志配置 +type ServeLogConfig struct { + Switch bool `json:"switch"` + Queue bool `json:"queue"` + LevelFormat []string `json:"levelFormat"` +} + +// GenerateAppCrudTemplate curd模板 +type GenerateAppCrudTemplate struct { + Group string `json:"group"` + IsAddon bool `json:"isAddon"` + MasterPackage string `json:"masterPackage"` + TemplatePath string `json:"templatePath"` + ApiPath string `json:"apiPath"` + InputPath string `json:"inputPath"` + ControllerPath string `json:"controllerPath"` + LogicPath string `json:"logicPath"` + RouterPath string `json:"routerPath"` + SqlPath string `json:"sqlPath"` + WebApiPath string `json:"webApiPath"` + WebViewsPath string `json:"webViewsPath"` +} + +// GenerateAppQueueTemplate 消息队列模板 +type GenerateAppQueueTemplate struct { + Group string `json:"group"` + TemplatePath string `json:"templatePath"` +} + +// GenerateAppTreeTemplate 关系树列表模板 +type GenerateAppTreeTemplate struct { + Group string `json:"group"` + TemplatePath string `json:"templatePath"` +} + +// GenerateConfig 生成代码配置 +type GenerateConfig struct { + AllowedIPs []string `json:"allowedIPs"` + Application struct { + Crud struct { + Templates []*GenerateAppCrudTemplate `json:"templates"` + } `json:"crud"` + Queue struct { + Templates []*GenerateAppQueueTemplate `json:"templates"` + } `json:"queue"` + Tree struct { + Templates []*GenerateAppTreeTemplate `json:"templates"` + } `json:"tree"` + } `json:"application"` + Delimiters []string `json:"delimiters"` + DevPath string `json:"devPath"` + DisableTables []string `json:"disableTables"` + SelectDbs []string `json:"selectDbs"` + Addon *BuildAddonConfig `json:"addon"` +} + +// BuildAddonConfig 构建插件模块配置 +type BuildAddonConfig struct { + SrcPath string `json:"srcPath"` + WebApiPath string `json:"webApiPath"` + WebViewsPath string `json:"webViewsPath"` +} + +// TCPServerConfig tcp服务器配置 +type TCPServerConfig struct { + Address string `json:"address"` +} + +// TCPClientConfig tcp客户端配置 +type TCPClientConfig struct { + Cron *TCPClientConnConfig `json:"cron"` + Auth *TCPClientConnConfig `json:"auth"` +} + +// TCPClientConnConfig tcp客户端认证 +type TCPClientConnConfig struct { + Group string `json:"group"` + Name string `json:"name"` + Address string `json:"address"` + AppId string `json:"appId"` + SecretKey string `json:"secretKey"` +} + +// TCPConfig tcp服务器配置 +type TCPConfig struct { + Server *TCPServerConfig `json:"server"` + Client *TCPClientConfig `json:"client"` +} + +// TokenConfig 登录令牌配置 +type TokenConfig struct { + SecretKey string `json:"secretKey"` + Expires int64 `json:"expires"` + AutoRefresh bool `json:"autoRefresh"` + RefreshInterval int64 `json:"refreshInterval"` + MaxRefreshTimes int64 `json:"maxRefreshTimes"` + MultiLogin bool `json:"multiLogin"` +} diff --git a/server/internal/model/context.go b/server/internal/model/context.go new file mode 100644 index 0000000..03f5abd --- /dev/null +++ b/server/internal/model/context.go @@ -0,0 +1,37 @@ +// Package model +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package model + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// Context 请求上下文结构 +type Context struct { + Module string // 应用模块 admin|api|home|websocket + AddonName string // 插件名称 如果不是插件模块请求,可能为空 + User *Identity // 上下文用户信息 + Response *Response // 请求响应 + Data g.Map // 自定kv变量 业务模块根据需要设置,不固定 +} + +// Identity 通用身份模型 +type Identity struct { + Id int64 `json:"id" description:"用户ID"` + Pid int64 `json:"pid" description:"上级ID"` + DeptId int64 `json:"deptId" description:"部门ID"` + DeptType string `json:"deptType" description:"部门类型"` + RoleId int64 `json:"roleId" description:"角色ID"` + RoleKey string `json:"roleKey" description:"角色唯一标识符"` + Username string `json:"username" description:"用户名"` + RealName string `json:"realName" description:"姓名"` + Avatar string `json:"avatar" description:"头像"` + Email string `json:"email" description:"邮箱"` + Mobile string `json:"mobile" description:"手机号码"` + App string `json:"app" description:"登录应用"` + LoginAt *gtime.Time `json:"loginAt" description:"登录时间"` +} diff --git a/server/internal/model/dict.go b/server/internal/model/dict.go new file mode 100644 index 0000000..6d740d5 --- /dev/null +++ b/server/internal/model/dict.go @@ -0,0 +1,17 @@ +// Package model +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package model + +// Option 字典数据选项 +type Option struct { + Key interface{} `json:"key"` + Label string `json:"label" description:"字典标签"` + Value interface{} `json:"value" description:"字典键值"` + ValueType string `json:"valueType" description:"键值数据类型"` + Type string `json:"type" description:"字典类型"` + ListClass string `json:"listClass" description:"表格回显样式"` + Extra interface{} `json:"extra" description:"额外数据配置"` +} diff --git a/server/internal/model/do/.gitkeep b/server/internal/model/do/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/internal/model/do/addon_hgexample_table.go b/server/internal/model/do/addon_hgexample_table.go new file mode 100755 index 0000000..086c074 --- /dev/null +++ b/server/internal/model/do/addon_hgexample_table.go @@ -0,0 +1,53 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AddonHgexampleTable is the golang structure of table hg_addon_hgexample_table for DAO operations like Where/Data. +type AddonHgexampleTable struct { + g.Meta `orm:"table:hg_addon_hgexample_table, do:true"` + Id any // ID + Pid any // 上级ID + Level any // 树等级 + Tree any // 关系树 + CategoryId any // 分类ID + Flag *gjson.Json // 标签 + Title any // 标题 + Description any // 描述 + Content any // 内容 + Image any // 单图 + Images *gjson.Json // 多图 + Attachfile any // 附件 + Attachfiles *gjson.Json // 多附件 + Map *gjson.Json // 动态键值对 + Star any // 推荐星 + Price any // 价格 + Views any // 浏览次数 + ActivityAt *gtime.Time // 活动时间 + StartAt *gtime.Time // 开启时间 + EndAt *gtime.Time // 结束时间 + Switch any // 开关 + Sort any // 排序 + Avatar any // 头像 + Sex any // 性别 + Qq any // qq + Email any // 邮箱 + Mobile any // 手机号码 + Hobby *gjson.Json // 爱好 + Channel any // 渠道 + CityId any // 所在城市 + Remark any // 备注 + Status any // 状态 + CreatedBy any // 创建者 + UpdatedBy any // 更新者 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 + DeletedAt *gtime.Time // 删除时间 +} diff --git a/server/internal/model/do/addon_hgexample_tenant_order.go b/server/internal/model/do/addon_hgexample_tenant_order.go new file mode 100755 index 0000000..f0f6fb9 --- /dev/null +++ b/server/internal/model/do/addon_hgexample_tenant_order.go @@ -0,0 +1,26 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AddonHgexampleTenantOrder is the golang structure of table hg_addon_hgexample_tenant_order for DAO operations like Where/Data. +type AddonHgexampleTenantOrder struct { + g.Meta `orm:"table:hg_addon_hgexample_tenant_order, do:true"` + Id any // 主键 + TenantId any // 租户ID + MerchantId any // 商户ID + UserId any // 用户ID + ProductName any // 购买产品 + OrderSn any // 订单号 + Money any // 充值金额 + Remark any // 备注 + Status any // 订单状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 +} diff --git a/server/internal/model/do/admin_cash.go b/server/internal/model/do/admin_cash.go new file mode 100755 index 0000000..f57b1cb --- /dev/null +++ b/server/internal/model/do/admin_cash.go @@ -0,0 +1,25 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminCash is the golang structure of table hg_admin_cash for DAO operations like Where/Data. +type AdminCash struct { + g.Meta `orm:"table:hg_admin_cash, do:true"` + Id any // ID + MemberId any // 管理员ID + Money any // 提现金额 + Fee any // 手续费 + LastMoney any // 最终到账金额 + Ip any // 申请人IP + Status any // 状态码 + Msg any // 处理结果 + HandleAt *gtime.Time // 处理时间 + CreatedAt *gtime.Time // 申请时间 +} diff --git a/server/internal/model/do/admin_credits_log.go b/server/internal/model/do/admin_credits_log.go new file mode 100755 index 0000000..e7b5295 --- /dev/null +++ b/server/internal/model/do/admin_credits_log.go @@ -0,0 +1,30 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminCreditsLog is the golang structure of table hg_admin_credits_log for DAO operations like Where/Data. +type AdminCreditsLog struct { + g.Meta `orm:"table:hg_admin_credits_log, do:true"` + Id any // 变动ID + MemberId any // 管理员ID + AppId any // 应用id + AddonsName any // 插件名称 + CreditType any // 变动类型 + CreditGroup any // 变动组别 + BeforeNum any // 变动前 + Num any // 变动数据 + AfterNum any // 变动后 + Remark any // 备注 + Ip any // 操作人IP + MapId any // 关联ID + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 +} diff --git a/server/internal/model/do/admin_dept.go b/server/internal/model/do/admin_dept.go new file mode 100755 index 0000000..a3c29ba --- /dev/null +++ b/server/internal/model/do/admin_dept.go @@ -0,0 +1,29 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminDept is the golang structure of table hg_admin_dept for DAO operations like Where/Data. +type AdminDept struct { + g.Meta `orm:"table:hg_admin_dept, do:true"` + Id any // 部门ID + Pid any // 父部门ID + Name any // 部门名称 + Code any // 部门编码 + Type any // 部门类型 + Leader any // 负责人 + Phone any // 联系电话 + Email any // 邮箱 + Level any // 关系树等级 + Tree any // 关系树 + Sort any // 排序 + Status any // 部门状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/admin_member.go b/server/internal/model/do/admin_member.go new file mode 100755 index 0000000..7bfc722 --- /dev/null +++ b/server/internal/model/do/admin_member.go @@ -0,0 +1,44 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminMember is the golang structure of table hg_admin_member for DAO operations like Where/Data. +type AdminMember struct { + g.Meta `orm:"table:hg_admin_member, do:true"` + Id any // 管理员ID + DeptId any // 部门ID + RoleId any // 角色ID + RealName any // 真实姓名 + Username any // 帐号 + PasswordHash any // 密码 + Salt any // 密码盐 + PasswordResetToken any // 密码重置令牌 + Integral any // 积分 + Balance any // 余额 + Avatar any // 头像 + Sex any // 性别 + Qq any // qq + Email any // 邮箱 + Mobile any // 手机号码 + Birthday *gtime.Time // 生日 + CityId any // 城市编码 + Address any // 联系地址 + Pid any // 上级管理员ID + Level any // 关系树等级 + Tree any // 关系树 + InviteCode any // 邀请码 + Cash *gjson.Json // 提现配置 + LastActiveAt *gtime.Time // 最后活跃时间 + Remark any // 备注 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 +} diff --git a/server/internal/model/do/admin_member_post.go b/server/internal/model/do/admin_member_post.go new file mode 100755 index 0000000..79169c3 --- /dev/null +++ b/server/internal/model/do/admin_member_post.go @@ -0,0 +1,16 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// AdminMemberPost is the golang structure of table hg_admin_member_post for DAO operations like Where/Data. +type AdminMemberPost struct { + g.Meta `orm:"table:hg_admin_member_post, do:true"` + MemberId any // 管理员ID + PostId any // 岗位ID +} diff --git a/server/internal/model/do/admin_member_role.go b/server/internal/model/do/admin_member_role.go new file mode 100755 index 0000000..69fc2fe --- /dev/null +++ b/server/internal/model/do/admin_member_role.go @@ -0,0 +1,16 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// AdminMemberRole is the golang structure of table hg_admin_member_role for DAO operations like Where/Data. +type AdminMemberRole struct { + g.Meta `orm:"table:hg_admin_member_role, do:true"` + MemberId any // 管理员ID + RoleId any // 角色ID +} diff --git a/server/internal/model/do/admin_menu.go b/server/internal/model/do/admin_menu.go new file mode 100755 index 0000000..dd195a0 --- /dev/null +++ b/server/internal/model/do/admin_menu.go @@ -0,0 +1,41 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminMenu is the golang structure of table hg_admin_menu for DAO operations like Where/Data. +type AdminMenu struct { + g.Meta `orm:"table:hg_admin_menu, do:true"` + Id any // 菜单ID + Pid any // 父菜单ID + Level any // 关系树等级 + Tree any // 关系树 + Title any // 菜单名称 + Name any // 名称编码 + Path any // 路由地址 + Icon any // 菜单图标 + Type any // 菜单类型(1目录 2菜单 3按钮) + Redirect any // 重定向地址 + Permissions any // 菜单包含权限集合 + PermissionName any // 权限名称 + Component any // 组件路径 + AlwaysShow any // 取消自动计算根路由模式 + ActiveMenu any // 高亮菜单编码 + IsRoot any // 是否跟路由 + IsFrame any // 是否内嵌 + FrameSrc any // 内联外部地址 + KeepAlive any // 缓存该路由 + Hidden any // 是否隐藏 + Affix any // 是否固定 + Sort any // 排序 + Remark any // 备注 + Status any // 菜单状态 + UpdatedAt *gtime.Time // 更新时间 + CreatedAt *gtime.Time // 创建时间 +} diff --git a/server/internal/model/do/admin_notice.go b/server/internal/model/do/admin_notice.go new file mode 100755 index 0000000..3b0a783 --- /dev/null +++ b/server/internal/model/do/admin_notice.go @@ -0,0 +1,30 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminNotice is the golang structure of table hg_admin_notice for DAO operations like Where/Data. +type AdminNotice struct { + g.Meta `orm:"table:hg_admin_notice, do:true"` + Id any // 公告ID + Title any // 公告标题 + Type any // 公告类型 + Tag any // 标签 + Content any // 公告内容 + Receiver *gjson.Json // 接收者 + Remark any // 备注 + Sort any // 排序 + Status any // 公告状态 + CreatedBy any // 发送人 + UpdatedBy any // 修改人 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 + DeletedAt *gtime.Time // 删除时间 +} diff --git a/server/internal/model/do/admin_notice_read.go b/server/internal/model/do/admin_notice_read.go new file mode 100755 index 0000000..5bcc72b --- /dev/null +++ b/server/internal/model/do/admin_notice_read.go @@ -0,0 +1,21 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminNoticeRead is the golang structure of table hg_admin_notice_read for DAO operations like Where/Data. +type AdminNoticeRead struct { + g.Meta `orm:"table:hg_admin_notice_read, do:true"` + Id any // 记录ID + NoticeId any // 公告ID + MemberId any // 会员ID + Clicks any // 已读次数 + UpdatedAt *gtime.Time // 更新时间 + CreatedAt *gtime.Time // 阅读时间 +} diff --git a/server/internal/model/do/admin_oauth.go b/server/internal/model/do/admin_oauth.go new file mode 100755 index 0000000..6bcb161 --- /dev/null +++ b/server/internal/model/do/admin_oauth.go @@ -0,0 +1,30 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminOauth is the golang structure of table hg_admin_oauth for DAO operations like Where/Data. +type AdminOauth struct { + g.Meta `orm:"table:hg_admin_oauth, do:true"` + Id any // 主键 + MemberId any // 用户ID + Unionid any // 唯一ID + OauthClient any // 授权组别 + OauthOpenid any // 授权开放ID + Sex any // 性别 + Nickname any // 昵称 + HeadPortrait any // 头像 + Birthday *gtime.Time // 生日 + Country any // 国家 + Province any // 省 + City any // 市 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 +} diff --git a/server/internal/model/do/admin_order.go b/server/internal/model/do/admin_order.go new file mode 100755 index 0000000..2ea2842 --- /dev/null +++ b/server/internal/model/do/admin_order.go @@ -0,0 +1,27 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminOrder is the golang structure of table hg_admin_order for DAO operations like Where/Data. +type AdminOrder struct { + g.Meta `orm:"table:hg_admin_order, do:true"` + Id any // 主键 + MemberId any // 管理员id + OrderType any // 订单类型 + ProductId any // 产品id + OrderSn any // 关联订单号 + Money any // 充值金额 + Remark any // 备注 + RefundReason any // 退款原因 + RejectRefundReason any // 拒绝退款原因 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 +} diff --git a/server/internal/model/do/admin_post.go b/server/internal/model/do/admin_post.go new file mode 100755 index 0000000..7478892 --- /dev/null +++ b/server/internal/model/do/admin_post.go @@ -0,0 +1,23 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminPost is the golang structure of table hg_admin_post for DAO operations like Where/Data. +type AdminPost struct { + g.Meta `orm:"table:hg_admin_post, do:true"` + Id any // 岗位ID + Code any // 岗位编码 + Name any // 岗位名称 + Remark any // 备注 + Sort any // 排序 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/admin_role.go b/server/internal/model/do/admin_role.go new file mode 100755 index 0000000..8979f9e --- /dev/null +++ b/server/internal/model/do/admin_role.go @@ -0,0 +1,29 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminRole is the golang structure of table hg_admin_role for DAO operations like Where/Data. +type AdminRole struct { + g.Meta `orm:"table:hg_admin_role, do:true"` + Id any // 角色ID + Name any // 角色名称 + Key any // 角色权限字符串 + DataScope any // 数据范围 + CustomDept *gjson.Json // 自定义部门权限 + Pid any // 上级角色ID + Level any // 关系树等级 + Tree any // 关系树 + Remark any // 备注 + Sort any // 排序 + Status any // 角色状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/admin_role_casbin.go b/server/internal/model/do/admin_role_casbin.go new file mode 100755 index 0000000..7e42db7 --- /dev/null +++ b/server/internal/model/do/admin_role_casbin.go @@ -0,0 +1,22 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// AdminRoleCasbin is the golang structure of table hg_admin_role_casbin for DAO operations like Where/Data. +type AdminRoleCasbin struct { + g.Meta `orm:"table:hg_admin_role_casbin, do:true"` + Id any // + PType any // + V0 any // + V1 any // + V2 any // + V3 any // + V4 any // + V5 any // +} diff --git a/server/internal/model/do/admin_role_menu.go b/server/internal/model/do/admin_role_menu.go new file mode 100755 index 0000000..59317c7 --- /dev/null +++ b/server/internal/model/do/admin_role_menu.go @@ -0,0 +1,16 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// AdminRoleMenu is the golang structure of table hg_admin_role_menu for DAO operations like Where/Data. +type AdminRoleMenu struct { + g.Meta `orm:"table:hg_admin_role_menu, do:true"` + RoleId any // 角色ID + MenuId any // 菜单ID +} diff --git a/server/internal/model/do/pay_log.go b/server/internal/model/do/pay_log.go new file mode 100755 index 0000000..d61fe98 --- /dev/null +++ b/server/internal/model/do/pay_log.go @@ -0,0 +1,46 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// PayLog is the golang structure of table hg_pay_log for DAO operations like Where/Data. +type PayLog struct { + g.Meta `orm:"table:hg_pay_log, do:true"` + Id any // 主键 + MemberId any // 会员ID + AppId any // 应用ID + AddonsName any // 插件名称 + OrderSn any // 关联订单号 + OrderGroup any // 组别[默认统一支付类型] + Openid any // openid + MchId any // 商户支付账户 + Subject any // 订单标题 + Detail *gjson.Json // 支付商品详情 + AuthCode any // 刷卡码 + OutTradeNo any // 商户订单号 + TransactionId any // 交易号 + PayType any // 支付类型 + PayAmount any // 支付金额 + ActualAmount any // 实付金额 + PayStatus any // 支付状态 + PayAt *gtime.Time // 支付时间 + TradeType any // 交易类型 + RefundSn any // 退款单号 + IsRefund any // 是否退款 + Custom any // 自定义参数 + CreateIp any // 创建者IP + PayIp any // 支付者IP + NotifyUrl any // 支付通知回调地址 + ReturnUrl any // 买家付款成功跳转地址 + TraceIds *gjson.Json // 链路ID集合 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 +} diff --git a/server/internal/model/do/pay_refund.go b/server/internal/model/do/pay_refund.go new file mode 100755 index 0000000..e809dc9 --- /dev/null +++ b/server/internal/model/do/pay_refund.go @@ -0,0 +1,28 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// PayRefund is the golang structure of table hg_pay_refund for DAO operations like Where/Data. +type PayRefund struct { + g.Meta `orm:"table:hg_pay_refund, do:true"` + Id any // 主键ID + MemberId any // 会员ID + AppId any // 应用ID + OrderSn any // 业务订单号 + RefundTradeNo any // 退款交易号 + RefundMoney any // 退款金额 + RefundWay any // 退款方式 + Ip any // 申请者IP + Reason any // 申请退款原因 + Remark any // 退款备注 + Status any // 退款状态 + CreatedAt *gtime.Time // 申请时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_addons_config.go b/server/internal/model/do/sys_addons_config.go new file mode 100755 index 0000000..ac02fd8 --- /dev/null +++ b/server/internal/model/do/sys_addons_config.go @@ -0,0 +1,29 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysAddonsConfig is the golang structure of table hg_sys_addons_config for DAO operations like Where/Data. +type SysAddonsConfig struct { + g.Meta `orm:"table:hg_sys_addons_config, do:true"` + Id any // 配置ID + AddonName any // 插件名称 + Group any // 分组 + Name any // 参数名称 + Type any // 键值类型:string,int,uint,bool,TIMESTAMP,date + Key any // 参数键名 + Value any // 参数键值 + DefaultValue any // 默认值 + Sort any // 排序 + Tip any // 变量描述 + IsDefault any // 是否为系统默认 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_addons_install.go b/server/internal/model/do/sys_addons_install.go new file mode 100644 index 0000000..7af0467 --- /dev/null +++ b/server/internal/model/do/sys_addons_install.go @@ -0,0 +1,21 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysAddonsInstall is the golang structure of table hg_sys_addons_install for DAO operations like Where/Data. +type SysAddonsInstall struct { + g.Meta `orm:"table:hg_sys_addons_install, do:true"` + Id interface{} // 主键 + Name interface{} // 插件名称 + Version interface{} // 版本号 + Status interface{} // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_attachment.go b/server/internal/model/do/sys_attachment.go new file mode 100755 index 0000000..fb9389b --- /dev/null +++ b/server/internal/model/do/sys_attachment.go @@ -0,0 +1,32 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysAttachment is the golang structure of table hg_sys_attachment for DAO operations like Where/Data. +type SysAttachment struct { + g.Meta `orm:"table:hg_sys_attachment, do:true"` + Id any // 文件ID + AppId any // 应用ID + MemberId any // 管理员ID + CateId any // 上传分类 + Drive any // 上传驱动 + Name any // 文件原始名 + Kind any // 上传类型 + MimeType any // 扩展类型 + NaiveType any // NaiveUI类型 + Path any // 本地路径 + FileUrl any // url + Size any // 文件大小 + Ext any // 扩展名 + Md5 any // md5校验码 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 +} diff --git a/server/internal/model/do/sys_blacklist.go b/server/internal/model/do/sys_blacklist.go new file mode 100755 index 0000000..82974e6 --- /dev/null +++ b/server/internal/model/do/sys_blacklist.go @@ -0,0 +1,21 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysBlacklist is the golang structure of table hg_sys_blacklist for DAO operations like Where/Data. +type SysBlacklist struct { + g.Meta `orm:"table:hg_sys_blacklist, do:true"` + Id any // 黑名单ID + Ip any // IP地址 + Remark any // 备注 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_config.go b/server/internal/model/do/sys_config.go new file mode 100755 index 0000000..2282dd2 --- /dev/null +++ b/server/internal/model/do/sys_config.go @@ -0,0 +1,28 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysConfig is the golang structure of table hg_sys_config for DAO operations like Where/Data. +type SysConfig struct { + g.Meta `orm:"table:hg_sys_config, do:true"` + Id any // 配置ID + Group any // 配置分组 + Name any // 参数名称 + Type any // 键值类型:string,int,uint,bool,TIMESTAMP,date + Key any // 参数键名 + Value any // 参数键值 + DefaultValue any // 默认值 + Sort any // 排序 + Tip any // 变量描述 + IsDefault any // 是否为系统默认 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_cron.go b/server/internal/model/do/sys_cron.go new file mode 100755 index 0000000..85b7d0f --- /dev/null +++ b/server/internal/model/do/sys_cron.go @@ -0,0 +1,28 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysCron is the golang structure of table hg_sys_cron for DAO operations like Where/Data. +type SysCron struct { + g.Meta `orm:"table:hg_sys_cron, do:true"` + Id any // 任务ID + GroupId any // 分组ID + Title any // 任务标题 + Name any // 任务方法 + Params any // 函数参数 + Pattern any // 表达式 + Policy any // 策略 + Count any // 执行次数 + Sort any // 排序 + Remark any // 备注 + Status any // 任务状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_cron_group.go b/server/internal/model/do/sys_cron_group.go new file mode 100755 index 0000000..903924e --- /dev/null +++ b/server/internal/model/do/sys_cron_group.go @@ -0,0 +1,24 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysCronGroup is the golang structure of table hg_sys_cron_group for DAO operations like Where/Data. +type SysCronGroup struct { + g.Meta `orm:"table:hg_sys_cron_group, do:true"` + Id any // 任务分组ID + Pid any // 父类任务分组ID + Name any // 分组名称 + IsDefault any // 是否默认 + Sort any // 排序 + Remark any // 备注 + Status any // 分组状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_dict_data.go b/server/internal/model/do/sys_dict_data.go new file mode 100755 index 0000000..e502237 --- /dev/null +++ b/server/internal/model/do/sys_dict_data.go @@ -0,0 +1,27 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysDictData is the golang structure of table hg_sys_dict_data for DAO operations like Where/Data. +type SysDictData struct { + g.Meta `orm:"table:hg_sys_dict_data, do:true"` + Id any // 字典数据ID + Label any // 字典标签 + Value any // 字典键值 + ValueType any // 键值数据类型:string,int,uint,bool,TIMESTAMP,date + Type any // 字典类型 + ListClass any // 表格回显样式 + IsDefault any // 是否为系统默认 + Sort any // 字典排序 + Remark any // 备注 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_dict_type.go b/server/internal/model/do/sys_dict_type.go new file mode 100755 index 0000000..9533a9c --- /dev/null +++ b/server/internal/model/do/sys_dict_type.go @@ -0,0 +1,24 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysDictType is the golang structure of table hg_sys_dict_type for DAO operations like Where/Data. +type SysDictType struct { + g.Meta `orm:"table:hg_sys_dict_type, do:true"` + Id any // 字典类型ID + Pid any // 父类字典类型ID + Name any // 字典类型名称 + Type any // 字典类型 + Sort any // 排序 + Remark any // 备注 + Status any // 字典类型状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_ems_log.go b/server/internal/model/do/sys_ems_log.go new file mode 100755 index 0000000..dd72bfc --- /dev/null +++ b/server/internal/model/do/sys_ems_log.go @@ -0,0 +1,25 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysEmsLog is the golang structure of table hg_sys_ems_log for DAO operations like Where/Data. +type SysEmsLog struct { + g.Meta `orm:"table:hg_sys_ems_log, do:true"` + Id any // 主键 + Event any // 事件 + Email any // 邮箱地址,多个用;隔开 + Code any // 验证码 + Times any // 验证次数 + Content any // 邮件内容 + Ip any // ip地址 + Status any // 状态(1未验证,2已验证) + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_gen_codes.go b/server/internal/model/do/sys_gen_codes.go new file mode 100755 index 0000000..d6f75d5 --- /dev/null +++ b/server/internal/model/do/sys_gen_codes.go @@ -0,0 +1,30 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysGenCodes is the golang structure of table hg_sys_gen_codes for DAO operations like Where/Data. +type SysGenCodes struct { + g.Meta `orm:"table:hg_sys_gen_codes, do:true"` + Id any // 生成ID + GenType any // 生成类型 + GenTemplate any // 生成模板 + VarName any // 实体命名 + Options *gjson.Json // 配置选项 + DbName any // 数据库名称 + TableName any // 主表名称 + TableComment any // 主表注释 + DaoName any // 主表dao模型 + MasterColumns *gjson.Json // 主表字段 + AddonName any // 插件名称 + Status any // 生成状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_gen_curd_demo.go b/server/internal/model/do/sys_gen_curd_demo.go new file mode 100755 index 0000000..f180b81 --- /dev/null +++ b/server/internal/model/do/sys_gen_curd_demo.go @@ -0,0 +1,32 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysGenCurdDemo is the golang structure of table hg_sys_gen_curd_demo for DAO operations like Where/Data. +type SysGenCurdDemo struct { + g.Meta `orm:"table:hg_sys_gen_curd_demo, do:true"` + Id any // ID + CategoryId any // 分类ID + Title any // 标题 + Description any // 描述 + Content any // 内容 + Image any // 单图 + Attachfile any // 附件 + CityId any // 所在城市 + Switch any // 显示开关 + Sort any // 排序 + Status any // 状态 + CreatedBy any // 创建者 + UpdatedBy any // 更新者 + DeletedBy any // 删除者 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 + DeletedAt *gtime.Time // 删除时间 +} diff --git a/server/internal/model/do/sys_gen_tree_demo.go b/server/internal/model/do/sys_gen_tree_demo.go new file mode 100755 index 0000000..9bf07e3 --- /dev/null +++ b/server/internal/model/do/sys_gen_tree_demo.go @@ -0,0 +1,29 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysGenTreeDemo is the golang structure of table hg_sys_gen_tree_demo for DAO operations like Where/Data. +type SysGenTreeDemo struct { + g.Meta `orm:"table:hg_sys_gen_tree_demo, do:true"` + Id any // ID + Pid any // 上级ID + Level any // 关系树级别 + Tree any // 关系树 + CategoryId any // 分类ID + Title any // 标题 + Description any // 描述 + Sort any // 排序 + Status any // 状态 + CreatedBy any // 创建者 + UpdatedBy any // 更新者 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 + DeletedAt *gtime.Time // 删除时间 +} diff --git a/server/internal/model/do/sys_log.go b/server/internal/model/do/sys_log.go new file mode 100755 index 0000000..9a9bb31 --- /dev/null +++ b/server/internal/model/do/sys_log.go @@ -0,0 +1,39 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysLog is the golang structure of table hg_sys_log for DAO operations like Where/Data. +type SysLog struct { + g.Meta `orm:"table:hg_sys_log, do:true"` + Id any // 日志ID + ReqId any // 对外ID + AppId any // 应用ID + MerchantId any // 商户ID + MemberId any // 用户ID + Method any // 提交类型 + Module any // 访问模块 + Url any // 提交url + GetData *gjson.Json // get数据 + PostData *gjson.Json // post数据 + HeaderData *gjson.Json // header数据 + Ip any // IP地址 + ProvinceId any // 省编码 + CityId any // 市编码 + ErrorCode any // 报错code + ErrorMsg any // 对外错误提示 + ErrorData *gjson.Json // 报错日志 + UserAgent any // UA信息 + TakeUpTime any // 请求耗时 + Timestamp any // 响应时间 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 +} diff --git a/server/internal/model/do/sys_login_log.go b/server/internal/model/do/sys_login_log.go new file mode 100755 index 0000000..123d643 --- /dev/null +++ b/server/internal/model/do/sys_login_log.go @@ -0,0 +1,30 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysLoginLog is the golang structure of table hg_sys_login_log for DAO operations like Where/Data. +type SysLoginLog struct { + g.Meta `orm:"table:hg_sys_login_log, do:true"` + Id any // 日志ID + ReqId any // 请求ID + MemberId any // 用户ID + Username any // 用户名 + Response *gjson.Json // 响应数据 + LoginAt *gtime.Time // 登录时间 + LoginIp any // 登录IP + ProvinceId any // 省编码 + CityId any // 市编码 + UserAgent any // UA信息 + ErrMsg any // 错误提示 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 +} diff --git a/server/internal/model/do/sys_provinces.go b/server/internal/model/do/sys_provinces.go new file mode 100755 index 0000000..ad7e332 --- /dev/null +++ b/server/internal/model/do/sys_provinces.go @@ -0,0 +1,27 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysProvinces is the golang structure of table hg_sys_provinces for DAO operations like Where/Data. +type SysProvinces struct { + g.Meta `orm:"table:hg_sys_provinces, do:true"` + Id any // 省市区ID + Title any // 栏目名称 + Pinyin any // 拼音 + Lng any // 经度 + Lat any // 纬度 + Pid any // 父栏目 + Level any // 关系树等级 + Tree any // 关系 + Sort any // 排序 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/sys_serve_license.go b/server/internal/model/do/sys_serve_license.go new file mode 100755 index 0000000..f782fc5 --- /dev/null +++ b/server/internal/model/do/sys_serve_license.go @@ -0,0 +1,33 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysServeLicense is the golang structure of table hg_sys_serve_license for DAO operations like Where/Data. +type SysServeLicense struct { + g.Meta `orm:"table:hg_sys_serve_license, do:true"` + Id any // 许可ID + Group any // 分组 + Name any // 许可名称 + Appid any // 应用ID + SecretKey any // 应用秘钥 + RemoteAddr any // 最后连接地址 + OnlineLimit any // 在线限制 + LoginTimes any // 登录次数 + LastLoginAt *gtime.Time // 最后登录时间 + LastActiveAt *gtime.Time // 最后心跳 + Routes *gjson.Json // 路由表,空使用默认分组路由 + AllowedIps any // IP白名单 + EndAt *gtime.Time // 授权有效期 + Remark any // 备注 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 +} diff --git a/server/internal/model/do/sys_serve_log.go b/server/internal/model/do/sys_serve_log.go new file mode 100755 index 0000000..a73e713 --- /dev/null +++ b/server/internal/model/do/sys_serve_log.go @@ -0,0 +1,26 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysServeLog is the golang structure of table hg_sys_serve_log for DAO operations like Where/Data. +type SysServeLog struct { + g.Meta `orm:"table:hg_sys_serve_log, do:true"` + Id any // 日志ID + TraceId any // 链路ID + LevelFormat any // 日志级别 + Content any // 日志内容 + Stack *gjson.Json // 打印堆栈 + Line any // 调用行 + TriggerNs any // 触发时间(ns) + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 +} diff --git a/server/internal/model/do/sys_sms_log.go b/server/internal/model/do/sys_sms_log.go new file mode 100755 index 0000000..ffbd2f6 --- /dev/null +++ b/server/internal/model/do/sys_sms_log.go @@ -0,0 +1,24 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysSmsLog is the golang structure of table hg_sys_sms_log for DAO operations like Where/Data. +type SysSmsLog struct { + g.Meta `orm:"table:hg_sys_sms_log, do:true"` + Id any // 主键 + Event any // 事件 + Mobile any // 手机号 + Code any // 验证码或短信内容 + Times any // 验证次数 + Ip any // ip地址 + Status any // 状态(1未验证,2已验证) + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 更新时间 +} diff --git a/server/internal/model/do/test_category.go b/server/internal/model/do/test_category.go new file mode 100755 index 0000000..489cd03 --- /dev/null +++ b/server/internal/model/do/test_category.go @@ -0,0 +1,25 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package do + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// TestCategory is the golang structure of table hg_test_category for DAO operations like Where/Data. +type TestCategory struct { + g.Meta `orm:"table:hg_test_category, do:true"` + Id any // 分类ID + Name any // 分类名称 + ShortName any // 简称 + Description any // 描述 + Sort any // 排序 + Remark any // 备注 + Status any // 状态 + CreatedAt *gtime.Time // 创建时间 + UpdatedAt *gtime.Time // 修改时间 + DeletedAt *gtime.Time // 删除时间 +} diff --git a/server/internal/model/entity/.gitkeep b/server/internal/model/entity/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/internal/model/entity/addon_hgexample_table.go b/server/internal/model/entity/addon_hgexample_table.go new file mode 100755 index 0000000..dfc8b4d --- /dev/null +++ b/server/internal/model/entity/addon_hgexample_table.go @@ -0,0 +1,51 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/os/gtime" +) + +// AddonHgexampleTable is the golang structure for table addon_hgexample_table. +type AddonHgexampleTable struct { + Id int64 `json:"id" orm:"id" description:"ID"` + Pid int64 `json:"pid" orm:"pid" description:"上级ID"` + Level int `json:"level" orm:"level" description:"树等级"` + Tree string `json:"tree" orm:"tree" description:"关系树"` + CategoryId int64 `json:"categoryId" orm:"category_id" description:"分类ID"` + Flag *gjson.Json `json:"flag" orm:"flag" description:"标签"` + Title string `json:"title" orm:"title" description:"标题"` + Description string `json:"description" orm:"description" description:"描述"` + Content string `json:"content" orm:"content" description:"内容"` + Image string `json:"image" orm:"image" description:"单图"` + Images *gjson.Json `json:"images" orm:"images" description:"多图"` + Attachfile string `json:"attachfile" orm:"attachfile" description:"附件"` + Attachfiles *gjson.Json `json:"attachfiles" orm:"attachfiles" description:"多附件"` + Map *gjson.Json `json:"map" orm:"map" description:"动态键值对"` + Star float64 `json:"star" orm:"star" description:"推荐星"` + Price float64 `json:"price" orm:"price" description:"价格"` + Views int64 `json:"views" orm:"views" description:"浏览次数"` + ActivityAt *gtime.Time `json:"activityAt" orm:"activity_at" description:"活动时间"` + StartAt *gtime.Time `json:"startAt" orm:"start_at" description:"开启时间"` + EndAt *gtime.Time `json:"endAt" orm:"end_at" description:"结束时间"` + Switch int `json:"switch" orm:"switch" description:"开关"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Avatar string `json:"avatar" orm:"avatar" description:"头像"` + Sex int `json:"sex" orm:"sex" description:"性别"` + Qq string `json:"qq" orm:"qq" description:"qq"` + Email string `json:"email" orm:"email" description:"邮箱"` + Mobile string `json:"mobile" orm:"mobile" description:"手机号码"` + Hobby *gjson.Json `json:"hobby" orm:"hobby" description:"爱好"` + Channel int `json:"channel" orm:"channel" description:"渠道"` + CityId int64 `json:"cityId" orm:"city_id" description:"所在城市"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"` + UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` + DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间"` +} diff --git a/server/internal/model/entity/addon_hgexample_tenant_order.go b/server/internal/model/entity/addon_hgexample_tenant_order.go new file mode 100755 index 0000000..48fde1e --- /dev/null +++ b/server/internal/model/entity/addon_hgexample_tenant_order.go @@ -0,0 +1,24 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// AddonHgexampleTenantOrder is the golang structure for table addon_hgexample_tenant_order. +type AddonHgexampleTenantOrder struct { + Id int64 `json:"id" orm:"id" description:"主键"` + TenantId int64 `json:"tenantId" orm:"tenant_id" description:"租户ID"` + MerchantId int64 `json:"merchantId" orm:"merchant_id" description:"商户ID"` + UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` + ProductName string `json:"productName" orm:"product_name" description:"购买产品"` + OrderSn string `json:"orderSn" orm:"order_sn" description:"订单号"` + Money float64 `json:"money" orm:"money" description:"充值金额"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Status int `json:"status" orm:"status" description:"订单状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` +} diff --git a/server/internal/model/entity/admin_cash.go b/server/internal/model/entity/admin_cash.go new file mode 100755 index 0000000..c5c5b9c --- /dev/null +++ b/server/internal/model/entity/admin_cash.go @@ -0,0 +1,23 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminCash is the golang structure for table admin_cash. +type AdminCash struct { + Id int64 `json:"id" orm:"id" description:"ID"` + MemberId int64 `json:"memberId" orm:"member_id" description:"管理员ID"` + Money float64 `json:"money" orm:"money" description:"提现金额"` + Fee float64 `json:"fee" orm:"fee" description:"手续费"` + LastMoney float64 `json:"lastMoney" orm:"last_money" description:"最终到账金额"` + Ip string `json:"ip" orm:"ip" description:"申请人IP"` + Status int64 `json:"status" orm:"status" description:"状态码"` + Msg string `json:"msg" orm:"msg" description:"处理结果"` + HandleAt *gtime.Time `json:"handleAt" orm:"handle_at" description:"处理时间"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"申请时间"` +} diff --git a/server/internal/model/entity/admin_credits_log.go b/server/internal/model/entity/admin_credits_log.go new file mode 100755 index 0000000..1184611 --- /dev/null +++ b/server/internal/model/entity/admin_credits_log.go @@ -0,0 +1,28 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminCreditsLog is the golang structure for table admin_credits_log. +type AdminCreditsLog struct { + Id int64 `json:"id" orm:"id" description:"变动ID"` + MemberId int64 `json:"memberId" orm:"member_id" description:"管理员ID"` + AppId string `json:"appId" orm:"app_id" description:"应用id"` + AddonsName string `json:"addonsName" orm:"addons_name" description:"插件名称"` + CreditType string `json:"creditType" orm:"credit_type" description:"变动类型"` + CreditGroup string `json:"creditGroup" orm:"credit_group" description:"变动组别"` + BeforeNum float64 `json:"beforeNum" orm:"before_num" description:"变动前"` + Num float64 `json:"num" orm:"num" description:"变动数据"` + AfterNum float64 `json:"afterNum" orm:"after_num" description:"变动后"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Ip string `json:"ip" orm:"ip" description:"操作人IP"` + MapId int64 `json:"mapId" orm:"map_id" description:"关联ID"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` +} diff --git a/server/internal/model/entity/admin_dept.go b/server/internal/model/entity/admin_dept.go new file mode 100755 index 0000000..ea756cb --- /dev/null +++ b/server/internal/model/entity/admin_dept.go @@ -0,0 +1,27 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminDept is the golang structure for table admin_dept. +type AdminDept struct { + Id int64 `json:"id" orm:"id" description:"部门ID"` + Pid int64 `json:"pid" orm:"pid" description:"父部门ID"` + Name string `json:"name" orm:"name" description:"部门名称"` + Code string `json:"code" orm:"code" description:"部门编码"` + Type string `json:"type" orm:"type" description:"部门类型"` + Leader string `json:"leader" orm:"leader" description:"负责人"` + Phone string `json:"phone" orm:"phone" description:"联系电话"` + Email string `json:"email" orm:"email" description:"邮箱"` + Level int `json:"level" orm:"level" description:"关系树等级"` + Tree string `json:"tree" orm:"tree" description:"关系树"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Status int `json:"status" orm:"status" description:"部门状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/admin_member.go b/server/internal/model/entity/admin_member.go new file mode 100755 index 0000000..6ba5eff --- /dev/null +++ b/server/internal/model/entity/admin_member.go @@ -0,0 +1,42 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminMember is the golang structure for table admin_member. +type AdminMember struct { + Id int64 `json:"id" orm:"id" description:"管理员ID"` + DeptId int64 `json:"deptId" orm:"dept_id" description:"部门ID"` + RoleId int64 `json:"roleId" orm:"role_id" description:"角色ID"` + RealName string `json:"realName" orm:"real_name" description:"真实姓名"` + Username string `json:"username" orm:"username" description:"帐号"` + PasswordHash string `json:"passwordHash" orm:"password_hash" description:"密码"` + Salt string `json:"salt" orm:"salt" description:"密码盐"` + PasswordResetToken string `json:"passwordResetToken" orm:"password_reset_token" description:"密码重置令牌"` + Integral float64 `json:"integral" orm:"integral" description:"积分"` + Balance float64 `json:"balance" orm:"balance" description:"余额"` + Avatar string `json:"avatar" orm:"avatar" description:"头像"` + Sex int `json:"sex" orm:"sex" description:"性别"` + Qq string `json:"qq" orm:"qq" description:"qq"` + Email string `json:"email" orm:"email" description:"邮箱"` + Mobile string `json:"mobile" orm:"mobile" description:"手机号码"` + Birthday *gtime.Time `json:"birthday" orm:"birthday" description:"生日"` + CityId int64 `json:"cityId" orm:"city_id" description:"城市编码"` + Address string `json:"address" orm:"address" description:"联系地址"` + Pid int64 `json:"pid" orm:"pid" description:"上级管理员ID"` + Level int `json:"level" orm:"level" description:"关系树等级"` + Tree string `json:"tree" orm:"tree" description:"关系树"` + InviteCode string `json:"inviteCode" orm:"invite_code" description:"邀请码"` + Cash *gjson.Json `json:"cash" orm:"cash" description:"提现配置"` + LastActiveAt *gtime.Time `json:"lastActiveAt" orm:"last_active_at" description:"最后活跃时间"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` +} diff --git a/server/internal/model/entity/admin_member_post.go b/server/internal/model/entity/admin_member_post.go new file mode 100755 index 0000000..ab2b0d8 --- /dev/null +++ b/server/internal/model/entity/admin_member_post.go @@ -0,0 +1,11 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// AdminMemberPost is the golang structure for table admin_member_post. +type AdminMemberPost struct { + MemberId int64 `json:"memberId" orm:"member_id" description:"管理员ID"` + PostId int64 `json:"postId" orm:"post_id" description:"岗位ID"` +} diff --git a/server/internal/model/entity/admin_member_role.go b/server/internal/model/entity/admin_member_role.go new file mode 100755 index 0000000..b1f5c99 --- /dev/null +++ b/server/internal/model/entity/admin_member_role.go @@ -0,0 +1,11 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// AdminMemberRole is the golang structure for table admin_member_role. +type AdminMemberRole struct { + MemberId int64 `json:"memberId" orm:"member_id" description:"管理员ID"` + RoleId int64 `json:"roleId" orm:"role_id" description:"角色ID"` +} diff --git a/server/internal/model/entity/admin_menu.go b/server/internal/model/entity/admin_menu.go new file mode 100755 index 0000000..57a3d17 --- /dev/null +++ b/server/internal/model/entity/admin_menu.go @@ -0,0 +1,39 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminMenu is the golang structure for table admin_menu. +type AdminMenu struct { + Id int64 `json:"id" orm:"id" description:"菜单ID"` + Pid int64 `json:"pid" orm:"pid" description:"父菜单ID"` + Level int `json:"level" orm:"level" description:"关系树等级"` + Tree string `json:"tree" orm:"tree" description:"关系树"` + Title string `json:"title" orm:"title" description:"菜单名称"` + Name string `json:"name" orm:"name" description:"名称编码"` + Path string `json:"path" orm:"path" description:"路由地址"` + Icon string `json:"icon" orm:"icon" description:"菜单图标"` + Type int `json:"type" orm:"type" description:"菜单类型(1目录 2菜单 3按钮)"` + Redirect string `json:"redirect" orm:"redirect" description:"重定向地址"` + Permissions string `json:"permissions" orm:"permissions" description:"菜单包含权限集合"` + PermissionName string `json:"permissionName" orm:"permission_name" description:"权限名称"` + Component string `json:"component" orm:"component" description:"组件路径"` + AlwaysShow int `json:"alwaysShow" orm:"always_show" description:"取消自动计算根路由模式"` + ActiveMenu string `json:"activeMenu" orm:"active_menu" description:"高亮菜单编码"` + IsRoot int `json:"isRoot" orm:"is_root" description:"是否跟路由"` + IsFrame int `json:"isFrame" orm:"is_frame" description:"是否内嵌"` + FrameSrc string `json:"frameSrc" orm:"frame_src" description:"内联外部地址"` + KeepAlive int `json:"keepAlive" orm:"keep_alive" description:"缓存该路由"` + Hidden int `json:"hidden" orm:"hidden" description:"是否隐藏"` + Affix int `json:"affix" orm:"affix" description:"是否固定"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Status int `json:"status" orm:"status" description:"菜单状态"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` +} diff --git a/server/internal/model/entity/admin_notice.go b/server/internal/model/entity/admin_notice.go new file mode 100755 index 0000000..95f8ffd --- /dev/null +++ b/server/internal/model/entity/admin_notice.go @@ -0,0 +1,28 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminNotice is the golang structure for table admin_notice. +type AdminNotice struct { + Id int64 `json:"id" orm:"id" description:"公告ID"` + Title string `json:"title" orm:"title" description:"公告标题"` + Type int64 `json:"type" orm:"type" description:"公告类型"` + Tag int `json:"tag" orm:"tag" description:"标签"` + Content string `json:"content" orm:"content" description:"公告内容"` + Receiver *gjson.Json `json:"receiver" orm:"receiver" description:"接收者"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Status int `json:"status" orm:"status" description:"公告状态"` + CreatedBy int64 `json:"createdBy" orm:"created_by" description:"发送人"` + UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"修改人"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` + DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间"` +} diff --git a/server/internal/model/entity/admin_notice_read.go b/server/internal/model/entity/admin_notice_read.go new file mode 100755 index 0000000..717b399 --- /dev/null +++ b/server/internal/model/entity/admin_notice_read.go @@ -0,0 +1,19 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminNoticeRead is the golang structure for table admin_notice_read. +type AdminNoticeRead struct { + Id int64 `json:"id" orm:"id" description:"记录ID"` + NoticeId int64 `json:"noticeId" orm:"notice_id" description:"公告ID"` + MemberId int64 `json:"memberId" orm:"member_id" description:"会员ID"` + Clicks int `json:"clicks" orm:"clicks" description:"已读次数"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"阅读时间"` +} diff --git a/server/internal/model/entity/admin_oauth.go b/server/internal/model/entity/admin_oauth.go new file mode 100755 index 0000000..36071c3 --- /dev/null +++ b/server/internal/model/entity/admin_oauth.go @@ -0,0 +1,28 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminOauth is the golang structure for table admin_oauth. +type AdminOauth struct { + Id int64 `json:"id" orm:"id" description:"主键"` + MemberId int64 `json:"memberId" orm:"member_id" description:"用户ID"` + Unionid string `json:"unionid" orm:"unionid" description:"唯一ID"` + OauthClient string `json:"oauthClient" orm:"oauth_client" description:"授权组别"` + OauthOpenid string `json:"oauthOpenid" orm:"oauth_openid" description:"授权开放ID"` + Sex int `json:"sex" orm:"sex" description:"性别"` + Nickname string `json:"nickname" orm:"nickname" description:"昵称"` + HeadPortrait string `json:"headPortrait" orm:"head_portrait" description:"头像"` + Birthday *gtime.Time `json:"birthday" orm:"birthday" description:"生日"` + Country string `json:"country" orm:"country" description:"国家"` + Province string `json:"province" orm:"province" description:"省"` + City string `json:"city" orm:"city" description:"市"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` +} diff --git a/server/internal/model/entity/admin_order.go b/server/internal/model/entity/admin_order.go new file mode 100755 index 0000000..9d4cd59 --- /dev/null +++ b/server/internal/model/entity/admin_order.go @@ -0,0 +1,25 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminOrder is the golang structure for table admin_order. +type AdminOrder struct { + Id int64 `json:"id" orm:"id" description:"主键"` + MemberId int64 `json:"memberId" orm:"member_id" description:"管理员id"` + OrderType string `json:"orderType" orm:"order_type" description:"订单类型"` + ProductId int64 `json:"productId" orm:"product_id" description:"产品id"` + OrderSn string `json:"orderSn" orm:"order_sn" description:"关联订单号"` + Money float64 `json:"money" orm:"money" description:"充值金额"` + Remark string `json:"remark" orm:"remark" description:"备注"` + RefundReason string `json:"refundReason" orm:"refund_reason" description:"退款原因"` + RejectRefundReason string `json:"rejectRefundReason" orm:"reject_refund_reason" description:"拒绝退款原因"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` +} diff --git a/server/internal/model/entity/admin_post.go b/server/internal/model/entity/admin_post.go new file mode 100755 index 0000000..4f5e7ba --- /dev/null +++ b/server/internal/model/entity/admin_post.go @@ -0,0 +1,21 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminPost is the golang structure for table admin_post. +type AdminPost struct { + Id int64 `json:"id" orm:"id" description:"岗位ID"` + Code string `json:"code" orm:"code" description:"岗位编码"` + Name string `json:"name" orm:"name" description:"岗位名称"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/admin_role.go b/server/internal/model/entity/admin_role.go new file mode 100755 index 0000000..8b0e2ee --- /dev/null +++ b/server/internal/model/entity/admin_role.go @@ -0,0 +1,27 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/os/gtime" +) + +// AdminRole is the golang structure for table admin_role. +type AdminRole struct { + Id int64 `json:"id" orm:"id" description:"角色ID"` + Name string `json:"name" orm:"name" description:"角色名称"` + Key string `json:"key" orm:"key" description:"角色权限字符串"` + DataScope int `json:"dataScope" orm:"data_scope" description:"数据范围"` + CustomDept *gjson.Json `json:"customDept" orm:"custom_dept" description:"自定义部门权限"` + Pid int64 `json:"pid" orm:"pid" description:"上级角色ID"` + Level int `json:"level" orm:"level" description:"关系树等级"` + Tree string `json:"tree" orm:"tree" description:"关系树"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Status int `json:"status" orm:"status" description:"角色状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/admin_role_casbin.go b/server/internal/model/entity/admin_role_casbin.go new file mode 100755 index 0000000..751a0ae --- /dev/null +++ b/server/internal/model/entity/admin_role_casbin.go @@ -0,0 +1,17 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// AdminRoleCasbin is the golang structure for table admin_role_casbin. +type AdminRoleCasbin struct { + Id int64 `json:"id" orm:"id" description:""` + PType string `json:"pType" orm:"p_type" description:""` + V0 string `json:"v0" orm:"v0" description:""` + V1 string `json:"v1" orm:"v1" description:""` + V2 string `json:"v2" orm:"v2" description:""` + V3 string `json:"v3" orm:"v3" description:""` + V4 string `json:"v4" orm:"v4" description:""` + V5 string `json:"v5" orm:"v5" description:""` +} diff --git a/server/internal/model/entity/admin_role_menu.go b/server/internal/model/entity/admin_role_menu.go new file mode 100755 index 0000000..6bd9f40 --- /dev/null +++ b/server/internal/model/entity/admin_role_menu.go @@ -0,0 +1,11 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +// AdminRoleMenu is the golang structure for table admin_role_menu. +type AdminRoleMenu struct { + RoleId int64 `json:"roleId" orm:"role_id" description:"角色ID"` + MenuId int64 `json:"menuId" orm:"menu_id" description:"菜单ID"` +} diff --git a/server/internal/model/entity/pay_log.go b/server/internal/model/entity/pay_log.go new file mode 100755 index 0000000..34840fd --- /dev/null +++ b/server/internal/model/entity/pay_log.go @@ -0,0 +1,44 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/os/gtime" +) + +// PayLog is the golang structure for table pay_log. +type PayLog struct { + Id int64 `json:"id" orm:"id" description:"主键"` + MemberId int64 `json:"memberId" orm:"member_id" description:"会员ID"` + AppId string `json:"appId" orm:"app_id" description:"应用ID"` + AddonsName string `json:"addonsName" orm:"addons_name" description:"插件名称"` + OrderSn string `json:"orderSn" orm:"order_sn" description:"关联订单号"` + OrderGroup string `json:"orderGroup" orm:"order_group" description:"组别[默认统一支付类型]"` + Openid string `json:"openid" orm:"openid" description:"openid"` + MchId string `json:"mchId" orm:"mch_id" description:"商户支付账户"` + Subject string `json:"subject" orm:"subject" description:"订单标题"` + Detail *gjson.Json `json:"detail" orm:"detail" description:"支付商品详情"` + AuthCode string `json:"authCode" orm:"auth_code" description:"刷卡码"` + OutTradeNo string `json:"outTradeNo" orm:"out_trade_no" description:"商户订单号"` + TransactionId string `json:"transactionId" orm:"transaction_id" description:"交易号"` + PayType string `json:"payType" orm:"pay_type" description:"支付类型"` + PayAmount float64 `json:"payAmount" orm:"pay_amount" description:"支付金额"` + ActualAmount float64 `json:"actualAmount" orm:"actual_amount" description:"实付金额"` + PayStatus int `json:"payStatus" orm:"pay_status" description:"支付状态"` + PayAt *gtime.Time `json:"payAt" orm:"pay_at" description:"支付时间"` + TradeType string `json:"tradeType" orm:"trade_type" description:"交易类型"` + RefundSn string `json:"refundSn" orm:"refund_sn" description:"退款单号"` + IsRefund int `json:"isRefund" orm:"is_refund" description:"是否退款"` + Custom string `json:"custom" orm:"custom" description:"自定义参数"` + CreateIp string `json:"createIp" orm:"create_ip" description:"创建者IP"` + PayIp string `json:"payIp" orm:"pay_ip" description:"支付者IP"` + NotifyUrl string `json:"notifyUrl" orm:"notify_url" description:"支付通知回调地址"` + ReturnUrl string `json:"returnUrl" orm:"return_url" description:"买家付款成功跳转地址"` + TraceIds *gjson.Json `json:"traceIds" orm:"trace_ids" description:"链路ID集合"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` +} diff --git a/server/internal/model/entity/pay_refund.go b/server/internal/model/entity/pay_refund.go new file mode 100755 index 0000000..dad896f --- /dev/null +++ b/server/internal/model/entity/pay_refund.go @@ -0,0 +1,26 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// PayRefund is the golang structure for table pay_refund. +type PayRefund struct { + Id int64 `json:"id" orm:"id" description:"主键ID"` + MemberId int64 `json:"memberId" orm:"member_id" description:"会员ID"` + AppId string `json:"appId" orm:"app_id" description:"应用ID"` + OrderSn string `json:"orderSn" orm:"order_sn" description:"业务订单号"` + RefundTradeNo string `json:"refundTradeNo" orm:"refund_trade_no" description:"退款交易号"` + RefundMoney float64 `json:"refundMoney" orm:"refund_money" description:"退款金额"` + RefundWay int `json:"refundWay" orm:"refund_way" description:"退款方式"` + Ip string `json:"ip" orm:"ip" description:"申请者IP"` + Reason string `json:"reason" orm:"reason" description:"申请退款原因"` + Remark string `json:"remark" orm:"remark" description:"退款备注"` + Status int `json:"status" orm:"status" description:"退款状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"申请时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_addons_config.go b/server/internal/model/entity/sys_addons_config.go new file mode 100755 index 0000000..9699205 --- /dev/null +++ b/server/internal/model/entity/sys_addons_config.go @@ -0,0 +1,27 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysAddonsConfig is the golang structure for table sys_addons_config. +type SysAddonsConfig struct { + Id int64 `json:"id" orm:"id" description:"配置ID"` + AddonName string `json:"addonName" orm:"addon_name" description:"插件名称"` + Group string `json:"group" orm:"group" description:"分组"` + Name string `json:"name" orm:"name" description:"参数名称"` + Type string `json:"type" orm:"type" description:"键值类型:string,int,uint,bool,TIMESTAMP,date"` + Key string `json:"key" orm:"key" description:"参数键名"` + Value string `json:"value" orm:"value" description:"参数键值"` + DefaultValue string `json:"defaultValue" orm:"default_value" description:"默认值"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Tip string `json:"tip" orm:"tip" description:"变量描述"` + IsDefault int `json:"isDefault" orm:"is_default" description:"是否为系统默认"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_addons_install.go b/server/internal/model/entity/sys_addons_install.go new file mode 100644 index 0000000..ab03e1c --- /dev/null +++ b/server/internal/model/entity/sys_addons_install.go @@ -0,0 +1,19 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysAddonsInstall is the golang structure for table sys_addons_install. +type SysAddonsInstall struct { + Id int64 `json:"id" orm:"id" description:"主键"` + Name string `json:"name" orm:"name" description:"插件名称"` + Version string `json:"version" orm:"version" description:"版本号"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_attachment.go b/server/internal/model/entity/sys_attachment.go new file mode 100755 index 0000000..f4583ab --- /dev/null +++ b/server/internal/model/entity/sys_attachment.go @@ -0,0 +1,30 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysAttachment is the golang structure for table sys_attachment. +type SysAttachment struct { + Id int64 `json:"id" orm:"id" description:"文件ID"` + AppId string `json:"appId" orm:"app_id" description:"应用ID"` + MemberId int64 `json:"memberId" orm:"member_id" description:"管理员ID"` + CateId int64 `json:"cateId" orm:"cate_id" description:"上传分类"` + Drive string `json:"drive" orm:"drive" description:"上传驱动"` + Name string `json:"name" orm:"name" description:"文件原始名"` + Kind string `json:"kind" orm:"kind" description:"上传类型"` + MimeType string `json:"mimeType" orm:"mime_type" description:"扩展类型"` + NaiveType string `json:"naiveType" orm:"naive_type" description:"NaiveUI类型"` + Path string `json:"path" orm:"path" description:"本地路径"` + FileUrl string `json:"fileUrl" orm:"file_url" description:"url"` + Size int64 `json:"size" orm:"size" description:"文件大小"` + Ext string `json:"ext" orm:"ext" description:"扩展名"` + Md5 string `json:"md5" orm:"md5" description:"md5校验码"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` +} diff --git a/server/internal/model/entity/sys_blacklist.go b/server/internal/model/entity/sys_blacklist.go new file mode 100755 index 0000000..b386ac4 --- /dev/null +++ b/server/internal/model/entity/sys_blacklist.go @@ -0,0 +1,19 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysBlacklist is the golang structure for table sys_blacklist. +type SysBlacklist struct { + Id int64 `json:"id" orm:"id" description:"黑名单ID"` + Ip string `json:"ip" orm:"ip" description:"IP地址"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_config.go b/server/internal/model/entity/sys_config.go new file mode 100755 index 0000000..99b7d99 --- /dev/null +++ b/server/internal/model/entity/sys_config.go @@ -0,0 +1,26 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysConfig is the golang structure for table sys_config. +type SysConfig struct { + Id int64 `json:"id" orm:"id" description:"配置ID"` + Group string `json:"group" orm:"group" description:"配置分组"` + Name string `json:"name" orm:"name" description:"参数名称"` + Type string `json:"type" orm:"type" description:"键值类型:string,int,uint,bool,TIMESTAMP,date"` + Key string `json:"key" orm:"key" description:"参数键名"` + Value string `json:"value" orm:"value" description:"参数键值"` + DefaultValue string `json:"defaultValue" orm:"default_value" description:"默认值"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Tip string `json:"tip" orm:"tip" description:"变量描述"` + IsDefault int `json:"isDefault" orm:"is_default" description:"是否为系统默认"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_cron.go b/server/internal/model/entity/sys_cron.go new file mode 100755 index 0000000..d28429d --- /dev/null +++ b/server/internal/model/entity/sys_cron.go @@ -0,0 +1,26 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysCron is the golang structure for table sys_cron. +type SysCron struct { + Id int64 `json:"id" orm:"id" description:"任务ID"` + GroupId int64 `json:"groupId" orm:"group_id" description:"分组ID"` + Title string `json:"title" orm:"title" description:"任务标题"` + Name string `json:"name" orm:"name" description:"任务方法"` + Params string `json:"params" orm:"params" description:"函数参数"` + Pattern string `json:"pattern" orm:"pattern" description:"表达式"` + Policy int64 `json:"policy" orm:"policy" description:"策略"` + Count int64 `json:"count" orm:"count" description:"执行次数"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Status int `json:"status" orm:"status" description:"任务状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_cron_group.go b/server/internal/model/entity/sys_cron_group.go new file mode 100755 index 0000000..6dfb8a4 --- /dev/null +++ b/server/internal/model/entity/sys_cron_group.go @@ -0,0 +1,22 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysCronGroup is the golang structure for table sys_cron_group. +type SysCronGroup struct { + Id int64 `json:"id" orm:"id" description:"任务分组ID"` + Pid int64 `json:"pid" orm:"pid" description:"父类任务分组ID"` + Name string `json:"name" orm:"name" description:"分组名称"` + IsDefault int `json:"isDefault" orm:"is_default" description:"是否默认"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Status int `json:"status" orm:"status" description:"分组状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_dict_data.go b/server/internal/model/entity/sys_dict_data.go new file mode 100755 index 0000000..27ad437 --- /dev/null +++ b/server/internal/model/entity/sys_dict_data.go @@ -0,0 +1,25 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysDictData is the golang structure for table sys_dict_data. +type SysDictData struct { + Id int64 `json:"id" orm:"id" description:"字典数据ID"` + Label string `json:"label" orm:"label" description:"字典标签"` + Value string `json:"value" orm:"value" description:"字典键值"` + ValueType string `json:"valueType" orm:"value_type" description:"键值数据类型:string,int,uint,bool,TIMESTAMP,date"` + Type string `json:"type" orm:"type" description:"字典类型"` + ListClass string `json:"listClass" orm:"list_class" description:"表格回显样式"` + IsDefault int `json:"isDefault" orm:"is_default" description:"是否为系统默认"` + Sort int `json:"sort" orm:"sort" description:"字典排序"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_dict_type.go b/server/internal/model/entity/sys_dict_type.go new file mode 100755 index 0000000..99f230a --- /dev/null +++ b/server/internal/model/entity/sys_dict_type.go @@ -0,0 +1,22 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysDictType is the golang structure for table sys_dict_type. +type SysDictType struct { + Id int64 `json:"id" orm:"id" description:"字典类型ID"` + Pid int64 `json:"pid" orm:"pid" description:"父类字典类型ID"` + Name string `json:"name" orm:"name" description:"字典类型名称"` + Type string `json:"type" orm:"type" description:"字典类型"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Status int `json:"status" orm:"status" description:"字典类型状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_ems_log.go b/server/internal/model/entity/sys_ems_log.go new file mode 100755 index 0000000..d5f6d83 --- /dev/null +++ b/server/internal/model/entity/sys_ems_log.go @@ -0,0 +1,23 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysEmsLog is the golang structure for table sys_ems_log. +type SysEmsLog struct { + Id int64 `json:"id" orm:"id" description:"主键"` + Event string `json:"event" orm:"event" description:"事件"` + Email string `json:"email" orm:"email" description:"邮箱地址,多个用;隔开"` + Code string `json:"code" orm:"code" description:"验证码"` + Times int64 `json:"times" orm:"times" description:"验证次数"` + Content string `json:"content" orm:"content" description:"邮件内容"` + Ip string `json:"ip" orm:"ip" description:"ip地址"` + Status int `json:"status" orm:"status" description:"状态(1未验证,2已验证)"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_gen_codes.go b/server/internal/model/entity/sys_gen_codes.go new file mode 100755 index 0000000..6614dc5 --- /dev/null +++ b/server/internal/model/entity/sys_gen_codes.go @@ -0,0 +1,28 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysGenCodes is the golang structure for table sys_gen_codes. +type SysGenCodes struct { + Id int64 `json:"id" orm:"id" description:"生成ID"` + GenType int `json:"genType" orm:"gen_type" description:"生成类型"` + GenTemplate int `json:"genTemplate" orm:"gen_template" description:"生成模板"` + VarName string `json:"varName" orm:"var_name" description:"实体命名"` + Options *gjson.Json `json:"options" orm:"options" description:"配置选项"` + DbName string `json:"dbName" orm:"db_name" description:"数据库名称"` + TableName string `json:"tableName" orm:"table_name" description:"主表名称"` + TableComment string `json:"tableComment" orm:"table_comment" description:"主表注释"` + DaoName string `json:"daoName" orm:"dao_name" description:"主表dao模型"` + MasterColumns *gjson.Json `json:"masterColumns" orm:"master_columns" description:"主表字段"` + AddonName string `json:"addonName" orm:"addon_name" description:"插件名称"` + Status int `json:"status" orm:"status" description:"生成状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_gen_curd_demo.go b/server/internal/model/entity/sys_gen_curd_demo.go new file mode 100755 index 0000000..0b8fa54 --- /dev/null +++ b/server/internal/model/entity/sys_gen_curd_demo.go @@ -0,0 +1,30 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysGenCurdDemo is the golang structure for table sys_gen_curd_demo. +type SysGenCurdDemo struct { + Id int64 `json:"id" orm:"id" description:"ID"` + CategoryId int64 `json:"categoryId" orm:"category_id" description:"分类ID"` + Title string `json:"title" orm:"title" description:"标题"` + Description string `json:"description" orm:"description" description:"描述"` + Content string `json:"content" orm:"content" description:"内容"` + Image string `json:"image" orm:"image" description:"单图"` + Attachfile string `json:"attachfile" orm:"attachfile" description:"附件"` + CityId int64 `json:"cityId" orm:"city_id" description:"所在城市"` + Switch int `json:"switch" orm:"switch" description:"显示开关"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"` + UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"` + DeletedBy int64 `json:"deletedBy" orm:"deleted_by" description:"删除者"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` + DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间"` +} diff --git a/server/internal/model/entity/sys_gen_tree_demo.go b/server/internal/model/entity/sys_gen_tree_demo.go new file mode 100755 index 0000000..b8a6a80 --- /dev/null +++ b/server/internal/model/entity/sys_gen_tree_demo.go @@ -0,0 +1,27 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysGenTreeDemo is the golang structure for table sys_gen_tree_demo. +type SysGenTreeDemo struct { + Id int64 `json:"id" orm:"id" description:"ID"` + Pid int64 `json:"pid" orm:"pid" description:"上级ID"` + Level int `json:"level" orm:"level" description:"关系树级别"` + Tree string `json:"tree" orm:"tree" description:"关系树"` + CategoryId int64 `json:"categoryId" orm:"category_id" description:"分类ID"` + Title string `json:"title" orm:"title" description:"标题"` + Description string `json:"description" orm:"description" description:"描述"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"` + UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` + DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间"` +} diff --git a/server/internal/model/entity/sys_log.go b/server/internal/model/entity/sys_log.go new file mode 100755 index 0000000..9fbc859 --- /dev/null +++ b/server/internal/model/entity/sys_log.go @@ -0,0 +1,37 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysLog is the golang structure for table sys_log. +type SysLog struct { + Id int64 `json:"id" orm:"id" description:"日志ID"` + ReqId string `json:"reqId" orm:"req_id" description:"对外ID"` + AppId string `json:"appId" orm:"app_id" description:"应用ID"` + MerchantId int64 `json:"merchantId" orm:"merchant_id" description:"商户ID"` + MemberId int64 `json:"memberId" orm:"member_id" description:"用户ID"` + Method string `json:"method" orm:"method" description:"提交类型"` + Module string `json:"module" orm:"module" description:"访问模块"` + Url string `json:"url" orm:"url" description:"提交url"` + GetData *gjson.Json `json:"getData" orm:"get_data" description:"get数据"` + PostData *gjson.Json `json:"postData" orm:"post_data" description:"post数据"` + HeaderData *gjson.Json `json:"headerData" orm:"header_data" description:"header数据"` + Ip string `json:"ip" orm:"ip" description:"IP地址"` + ProvinceId int64 `json:"provinceId" orm:"province_id" description:"省编码"` + CityId int64 `json:"cityId" orm:"city_id" description:"市编码"` + ErrorCode int `json:"errorCode" orm:"error_code" description:"报错code"` + ErrorMsg string `json:"errorMsg" orm:"error_msg" description:"对外错误提示"` + ErrorData *gjson.Json `json:"errorData" orm:"error_data" description:"报错日志"` + UserAgent string `json:"userAgent" orm:"user_agent" description:"UA信息"` + TakeUpTime int64 `json:"takeUpTime" orm:"take_up_time" description:"请求耗时"` + Timestamp int64 `json:"timestamp" orm:"timestamp" description:"响应时间"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` +} diff --git a/server/internal/model/entity/sys_login_log.go b/server/internal/model/entity/sys_login_log.go new file mode 100755 index 0000000..73a42d9 --- /dev/null +++ b/server/internal/model/entity/sys_login_log.go @@ -0,0 +1,28 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysLoginLog is the golang structure for table sys_login_log. +type SysLoginLog struct { + Id int64 `json:"id" orm:"id" description:"日志ID"` + ReqId string `json:"reqId" orm:"req_id" description:"请求ID"` + MemberId int64 `json:"memberId" orm:"member_id" description:"用户ID"` + Username string `json:"username" orm:"username" description:"用户名"` + Response *gjson.Json `json:"response" orm:"response" description:"响应数据"` + LoginAt *gtime.Time `json:"loginAt" orm:"login_at" description:"登录时间"` + LoginIp string `json:"loginIp" orm:"login_ip" description:"登录IP"` + ProvinceId int64 `json:"provinceId" orm:"province_id" description:"省编码"` + CityId int64 `json:"cityId" orm:"city_id" description:"市编码"` + UserAgent string `json:"userAgent" orm:"user_agent" description:"UA信息"` + ErrMsg string `json:"errMsg" orm:"err_msg" description:"错误提示"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` +} diff --git a/server/internal/model/entity/sys_provinces.go b/server/internal/model/entity/sys_provinces.go new file mode 100755 index 0000000..c593a34 --- /dev/null +++ b/server/internal/model/entity/sys_provinces.go @@ -0,0 +1,25 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysProvinces is the golang structure for table sys_provinces. +type SysProvinces struct { + Id int64 `json:"id" orm:"id" description:"省市区ID"` + Title string `json:"title" orm:"title" description:"栏目名称"` + Pinyin string `json:"pinyin" orm:"pinyin" description:"拼音"` + Lng string `json:"lng" orm:"lng" description:"经度"` + Lat string `json:"lat" orm:"lat" description:"纬度"` + Pid int64 `json:"pid" orm:"pid" description:"父栏目"` + Level int `json:"level" orm:"level" description:"关系树等级"` + Tree string `json:"tree" orm:"tree" description:"关系"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/sys_serve_license.go b/server/internal/model/entity/sys_serve_license.go new file mode 100755 index 0000000..06d4fcb --- /dev/null +++ b/server/internal/model/entity/sys_serve_license.go @@ -0,0 +1,31 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysServeLicense is the golang structure for table sys_serve_license. +type SysServeLicense struct { + Id int64 `json:"id" orm:"id" description:"许可ID"` + Group string `json:"group" orm:"group" description:"分组"` + Name string `json:"name" orm:"name" description:"许可名称"` + Appid string `json:"appid" orm:"appid" description:"应用ID"` + SecretKey string `json:"secretKey" orm:"secret_key" description:"应用秘钥"` + RemoteAddr string `json:"remoteAddr" orm:"remote_addr" description:"最后连接地址"` + OnlineLimit int `json:"onlineLimit" orm:"online_limit" description:"在线限制"` + LoginTimes int64 `json:"loginTimes" orm:"login_times" description:"登录次数"` + LastLoginAt *gtime.Time `json:"lastLoginAt" orm:"last_login_at" description:"最后登录时间"` + LastActiveAt *gtime.Time `json:"lastActiveAt" orm:"last_active_at" description:"最后心跳"` + Routes *gjson.Json `json:"routes" orm:"routes" description:"路由表,空使用默认分组路由"` + AllowedIps string `json:"allowedIps" orm:"allowed_ips" description:"IP白名单"` + EndAt *gtime.Time `json:"endAt" orm:"end_at" description:"授权有效期"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` +} diff --git a/server/internal/model/entity/sys_serve_log.go b/server/internal/model/entity/sys_serve_log.go new file mode 100755 index 0000000..a4f7b7a --- /dev/null +++ b/server/internal/model/entity/sys_serve_log.go @@ -0,0 +1,24 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/os/gtime" +) + +// SysServeLog is the golang structure for table sys_serve_log. +type SysServeLog struct { + Id int64 `json:"id" orm:"id" description:"日志ID"` + TraceId string `json:"traceId" orm:"trace_id" description:"链路ID"` + LevelFormat string `json:"levelFormat" orm:"level_format" description:"日志级别"` + Content string `json:"content" orm:"content" description:"日志内容"` + Stack *gjson.Json `json:"stack" orm:"stack" description:"打印堆栈"` + Line string `json:"line" orm:"line" description:"调用行"` + TriggerNs int64 `json:"triggerNs" orm:"trigger_ns" description:"触发时间(ns)"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` +} diff --git a/server/internal/model/entity/sys_sms_log.go b/server/internal/model/entity/sys_sms_log.go new file mode 100755 index 0000000..992d02d --- /dev/null +++ b/server/internal/model/entity/sys_sms_log.go @@ -0,0 +1,22 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// SysSmsLog is the golang structure for table sys_sms_log. +type SysSmsLog struct { + Id int64 `json:"id" orm:"id" description:"主键"` + Event string `json:"event" orm:"event" description:"事件"` + Mobile string `json:"mobile" orm:"mobile" description:"手机号"` + Code string `json:"code" orm:"code" description:"验证码或短信内容"` + Times int64 `json:"times" orm:"times" description:"验证次数"` + Ip string `json:"ip" orm:"ip" description:"ip地址"` + Status int `json:"status" orm:"status" description:"状态(1未验证,2已验证)"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` +} diff --git a/server/internal/model/entity/test_category.go b/server/internal/model/entity/test_category.go new file mode 100755 index 0000000..50a47a7 --- /dev/null +++ b/server/internal/model/entity/test_category.go @@ -0,0 +1,23 @@ +// ================================================================================= +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// ================================================================================= + +package entity + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +// TestCategory is the golang structure for table test_category. +type TestCategory struct { + Id int64 `json:"id" orm:"id" description:"分类ID"` + Name string `json:"name" orm:"name" description:"分类名称"` + ShortName string `json:"shortName" orm:"short_name" description:"简称"` + Description string `json:"description" orm:"description" description:"描述"` + Sort int `json:"sort" orm:"sort" description:"排序"` + Remark string `json:"remark" orm:"remark" description:"备注"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` + DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间"` +} diff --git a/server/internal/model/gen_codes.go b/server/internal/model/gen_codes.go new file mode 100644 index 0000000..db2893b --- /dev/null +++ b/server/internal/model/gen_codes.go @@ -0,0 +1,41 @@ +// Package model +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package model + +// GenCodesColumn 生成表字段属性 +type GenCodesColumn struct { + // 表属性 + Id int64 `json:"id" dc:"序号"` + Name string `json:"name" dc:"字段列名"` + Dc string `json:"dc" dc:"字段描述"` + DataType string `json:"dataType" dc:"字段类型"` + SqlType string `json:"sqlType" dc:"物理类型"` + Length int64 `json:"length" dc:"字段长度"` + IsAllowNull string `json:"isAllowNull" dc:"是否允许为空"` + DefaultValue interface{} `json:"defaultValue" dc:"默认值"` + Index string `json:"index" dc:"索引"` + Extra string `json:"extra" dc:"额外选项"` + // 自定义生成属性 + // Alias string `json:"alias" dc:"字段别名"` + GoName string `json:"goName" dc:"Go属性"` + GoType string `json:"goType" dc:"Go类型"` + TsName string `json:"tsName" dc:"Ts属性"` + TsType string `json:"tsType" dc:"Ts类型"` + IsList bool `json:"isList" dc:"列表"` + IsExport bool `json:"isExport" dc:"导出"` + IsSort bool `json:"isSort" dc:"排序"` + IsQuery bool `json:"isQuery" dc:"查询"` + QueryWhere string `json:"queryWhere" dc:"查询条件"` + IsEdit bool `json:"isEdit" dc:"编辑"` + Required bool `json:"required" dc:"必填"` + Unique bool `json:"unique" dc:"唯一性"` + FormMode string `json:"formMode" dc:"表单组件"` + FormRole string `json:"formRole" dc:"表单验证"` + FormGridSpan int `json:"formGridSpan" dc:"栅格占位数量"` + DictType int64 `json:"dictType" dc:"字典类型ID"` + Align string `json:"align" dc:"排列方式"` + Width int64 `json:"width" dc:"列宽"` +} diff --git a/server/internal/model/input/adminin/cash.go b/server/internal/model/input/adminin/cash.go new file mode 100644 index 0000000..bb8dfee --- /dev/null +++ b/server/internal/model/input/adminin/cash.go @@ -0,0 +1,49 @@ +// Package adminin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package adminin + +import ( + "hotgo/internal/library/hgorm/hook" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" +) + +// CashViewInp 获取信息 +type CashViewInp struct { + Id int64 `json:"id" v:"required#提现ID不能为空" dc:"提现ID"` +} + +type CashViewModel struct { + entity.AdminCash + MemberCash +} + +// CashListInp 获取列表 +type CashListInp struct { + form.PageReq + form.StatusReq + MemberId int64 `json:"memberId"` + CreatedAt []int64 `json:"created_at"` + ComplexMemberId []string `json:"complexMemberId" dc:"申请人"` +} + +type CashListModel struct { + MemberBySumma *hook.MemberSumma `json:"memberBySumma" dc:"申请人信息"` + entity.AdminCash +} + +// CashApplyInp 申请提现 +type CashApplyInp struct { + Money float64 `json:"money" description:"提现金额"` + MemberId int64 +} + +// CashPaymentInp 提现打款处理 +type CashPaymentInp struct { + Id int64 `json:"id" description:"ID"` + Status int64 `json:"status" description:"状态码"` + Msg string `json:"msg" description:"处理结果"` +} diff --git a/server/internal/model/input/adminin/credits_log.go b/server/internal/model/input/adminin/credits_log.go new file mode 100644 index 0000000..bf69297 --- /dev/null +++ b/server/internal/model/input/adminin/credits_log.go @@ -0,0 +1,154 @@ +// Package adminin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.5.3 +// @AutoGenerate Date 2023-04-15 15:59:58 +package adminin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/internal/consts" + "hotgo/internal/library/contexts" + "hotgo/internal/library/hgorm/hook" + "hotgo/internal/library/location" + "hotgo/internal/model/input/form" + + "github.com/gogf/gf/v2/os/gtime" +) + +// CreditsLogSaveBalanceInp 更新余额 +type CreditsLogSaveBalanceInp struct { + MemberId int64 `json:"memberId" dc:"管理员ID"` + AppId string `json:"appId" dc:"应用id"` + AddonsName string `json:"addonsName" dc:"插件名称"` + CreditGroup string `json:"creditGroup" dc:"变动的组别"` + Num float64 `json:"num" dc:"变动数据"` + Ip string `json:"ip" dc:"操作人IP"` + MapId int64 `json:"mapId" dc:"关联ID"` + Remark string `json:"remark" dc:"备注"` +} + +func (in *CreditsLogSaveBalanceInp) Filter(ctx context.Context) (err error) { + if in.Num == 0 { + err = gerror.New("更新余额不能为0") + } + + if in.AppId == "" { + in.AppId = contexts.GetModule(ctx) + } + + if in.CreditGroup == "" { + if in.Num > 0 { + in.CreditGroup = consts.CreditGroupIncr + } else { + in.CreditGroup = consts.CreditGroupDecr + } + } + + if in.Ip == "" { + in.Ip = location.GetClientIp(ghttp.RequestFromCtx(ctx)) + } + return +} + +type CreditsLogSaveBalanceModel struct { +} + +// CreditsLogSaveIntegralInp 更新积分 +type CreditsLogSaveIntegralInp struct { + MemberId int64 `json:"memberId" dc:"管理员ID"` + AppId string `json:"appId" dc:"应用id"` + AddonsName string `json:"addonsName" dc:"插件名称"` + CreditGroup string `json:"creditGroup" dc:"变动的组别"` + Num float64 `json:"num" dc:"变动数据"` + Ip string `json:"ip" dc:"操作人IP"` + MapId int64 `json:"mapId" dc:"关联ID"` + Remark string `json:"remark" dc:"备注"` +} + +func (in *CreditsLogSaveIntegralInp) Filter(ctx context.Context) (err error) { + if in.Num == 0 { + err = gerror.New("更新积分不能为0") + } + + if in.AppId == "" { + in.AppId = contexts.GetModule(ctx) + } + + if in.CreditGroup == "" { + if in.Num > 0 { + in.CreditGroup = consts.CreditGroupIncr + } else { + in.CreditGroup = consts.CreditGroupDecr + } + } + + if in.Ip == "" { + in.Ip = location.GetClientIp(ghttp.RequestFromCtx(ctx)) + } + return +} + +type CreditsLogSaveIntegralModel struct { +} + +// CreditsLogListInp 获取资产变动列表 +type CreditsLogListInp struct { + form.PageReq + Id int64 `json:"id" dc:"变动ID"` + MemberId int64 `json:"memberId" dc:"管理员ID"` + AppId string `json:"appId" dc:"应用id"` + CreditType string `json:"creditType" dc:"变动类型"` + CreditGroup string `json:"creditGroup" dc:"变动的组别"` + Remark string `json:"remark" dc:"备注"` + Ip string `json:"ip" dc:"操作人IP"` + Status int `json:"status" dc:"状态"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` + ComplexMemberId []string `json:"complexMemberId" dc:"用户"` +} + +func (in *CreditsLogListInp) Filter(ctx context.Context) (err error) { + return +} + +type CreditsLogListModel struct { + Id int64 `json:"id" dc:"变动ID"` + MemberId int64 `json:"memberId" dc:"管理员ID"` + AppId string `json:"appId" dc:"应用id"` + AddonsName string `json:"addonsName" dc:"插件名称"` + CreditType string `json:"creditType" dc:"变动类型"` + CreditGroup string `json:"creditGroup" dc:"变动的组别"` + BeforeNum float64 `json:"beforeNum" dc:"变动前"` + Num float64 `json:"num" dc:"变动数据"` + AfterNum float64 `json:"afterNum" dc:"变动后"` + Remark string `json:"remark" dc:"备注"` + Ip string `json:"ip" dc:"操作人IP"` + MapId int64 `json:"mapId" dc:"关联ID"` + Status int `json:"status" dc:"状态"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"` + MemberBySumma *hook.MemberSumma `json:"memberBySumma" dc:"用户信息"` +} + +// CreditsLogExportModel 导出资产变动 +type CreditsLogExportModel struct { + Id int64 `json:"id" dc:"变动ID"` + MemberId int64 `json:"memberId" dc:"管理员ID"` + AppId string `json:"appId" dc:"应用id"` + AddonsName string `json:"addonsName" dc:"插件名称"` + CreditType string `json:"creditType" dc:"变动类型"` + CreditGroup string `json:"creditGroup" dc:"变动的组别"` + BeforeNum float64 `json:"beforeNum" dc:"变动前"` + Num float64 `json:"num" dc:"变动数据"` + AfterNum float64 `json:"afterNum" dc:"变动后"` + Remark string `json:"remark" dc:"备注"` + Ip string `json:"ip" dc:"操作人IP"` + MapId int64 `json:"mapId" dc:"关联ID"` + Status int `json:"status" dc:"状态"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"` +} diff --git a/server/internal/model/input/adminin/dept.go b/server/internal/model/input/adminin/dept.go new file mode 100644 index 0000000..966c0f7 --- /dev/null +++ b/server/internal/model/input/adminin/dept.go @@ -0,0 +1,175 @@ +// Package adminin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package adminin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/consts" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/tree" + "hotgo/utility/validate" +) + +// DeptMaxSortInp 最大排序 +type DeptMaxSortInp struct { + Id int64 `json:"id" dc:"部门ID"` +} + +type DeptMaxSortModel struct { + Sort int `json:"sort"` +} + +// DeptEditInp 修改/新增部门数据 +type DeptEditInp struct { + entity.AdminDept +} + +func (in *DeptEditInp) Filter(ctx context.Context) (err error) { + if in.Name == "" { + err = gerror.New("名称不能为空") + return + } + + if in.Id > 0 && in.Id == in.Pid { + err = gerror.New("上级部门不能是自己") + return + } + + return +} + +type DeptEditModel struct{} + +// DeptUpdateFields 修改数据字段过滤 +type DeptUpdateFields struct { + Id int64 `json:"id" description:"部门ID"` + Pid int64 `json:"pid" description:"父部门ID"` + Name string `json:"name" description:"部门名称"` + Code string `json:"code" description:"部门编码"` + Type string `json:"type" description:"部门类型"` + Leader string `json:"leader" description:"负责人"` + Phone string `json:"phone" description:"联系电话"` + Email string `json:"email" description:"邮箱"` + Level int `json:"level" description:"关系树等级"` + Tree string `json:"tree" description:"关系树"` + Sort int `json:"sort" description:"排序"` + Status int `json:"status" description:"部门状态"` +} + +// DeptInsertFields 新增数据字段过滤 +type DeptInsertFields struct { + Pid int64 `json:"pid" description:"父部门ID"` + Name string `json:"name" description:"部门名称"` + Code string `json:"code" description:"部门编码"` + Type string `json:"type" description:"部门类型"` + Leader string `json:"leader" description:"负责人"` + Phone string `json:"phone" description:"联系电话"` + Email string `json:"email" description:"邮箱"` + Level int `json:"level" description:"关系树等级"` + Tree string `json:"tree" description:"关系树"` + Sort int `json:"sort" description:"排序"` + Status int `json:"status" description:"部门状态"` +} + +// DeptDeleteInp 删除部门类型 +type DeptDeleteInp struct { + Id interface{} `json:"id" v:"required#部门ID不能为空" dc:"部门ID"` +} +type DeptDeleteModel struct{} + +// DeptViewInp 获取信息 +type DeptViewInp struct { + Id int64 `json:"id" v:"required#部门ID不能为空" dc:"部门ID"` +} + +type DeptViewModel struct { + entity.AdminDept +} + +// DeptListInp 获取列表 +type DeptListInp struct { + Name string `json:"name" dc:"部门名称"` + Code string `json:"code" dc:"部门编码"` + Leader string `json:"leader" dc:"负责人"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` +} + +func (in *DeptListInp) Filter(ctx context.Context) (err error) { + return +} + +// DeptTree 树 +type DeptTree struct { + entity.AdminDept + Label string `json:"label" dc:"标签"` + Value int64 `json:"value" dc:"键值"` + Children []*DeptTree `json:"children"` +} + +type DeptListModel struct { + List []*entity.AdminDept `json:"list"` + Ids []int64 `json:"ids"` +} + +// DeptStatusInp 更新部门状态 +type DeptStatusInp struct { + entity.AdminDept +} + +func (in *DeptStatusInp) Filter(ctx context.Context) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + + return +} + +type DeptStatusModel struct{} + +type DeptOptionInp struct { + form.PageReq +} + +type DeptOptionModel struct { + List []*DeptTree `json:"list"` +} + +// DeptTreeOption 关系树选项 +type DeptTreeOption struct { + Id int64 `json:"id" dc:"部门ID"` + Pid int64 `json:"pid" dc:"父部门ID"` + Name string `json:"name" dc:"部门名称"` + Children []tree.Node `json:"children" dc:"子节点"` +} + +// ID 获取节点ID +func (t *DeptTreeOption) ID() int64 { + return t.Id +} + +// PID 获取父级节点ID +func (t *DeptTreeOption) PID() int64 { + return t.Pid +} + +// SetChildren 设置子节点数据 +func (t *DeptTreeOption) SetChildren(children []tree.Node) { + t.Children = children +} diff --git a/server/internal/model/input/adminin/member.go b/server/internal/model/input/adminin/member.go new file mode 100644 index 0000000..72a512d --- /dev/null +++ b/server/internal/model/input/adminin/member.go @@ -0,0 +1,338 @@ +// Package adminin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package adminin + +import ( + "context" + "fmt" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/consts" + "hotgo/internal/library/contexts" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/validate" +) + +// MemberUpdateCashInp 更新会员提现信息 +type MemberUpdateCashInp struct { + Name string `json:"name" v:"required#支付宝姓名不能为空" dc:"支付宝姓名"` + PayeeCode string `json:"payeeCode" v:"required#支付宝收款码不能为空" dc:"支付宝收款码"` + Account string `json:"account" v:"required#支付宝账号不能为空" dc:"支付宝账号"` + Password string `json:"password" v:"required#密码不能为空" dc:"密码"` +} + +type MemberUpdateEmailInp struct { + Email string `json:"email" v:"required#换绑邮箱不能为空" dc:"换绑邮箱"` + Code string `json:"code" dc:"原邮箱验证码"` +} + +// MemberUpdateMobileInp 换绑手机号 +type MemberUpdateMobileInp struct { + Mobile string `json:"mobile" v:"required#换绑手机号不能为空" dc:"换绑手机号"` + Code string `json:"code" dc:"原号码短信验证码"` +} + +// GetIdByCodeInp 通过邀请码获取用户ID +type GetIdByCodeInp struct { + Code string `json:"code"` +} + +type GetIdByCodeModel struct { + Id int64 +} + +// MemberProfileInp 获取指定用户资料 +type MemberProfileInp struct { + Id int64 +} + +type MemberProfileModel struct { + PostGroup string `json:"postGroup" dc:"岗位名称"` + RoleGroup string `json:"roleGroup" dc:"角色名称"` + User *MemberViewModel `json:"member" dc:"用户基本信息"` + SysDept *DeptViewModel `json:"sysDept" dc:"部门信息"` + SysRoles []*RoleListModel `json:"sysRoles" dc:"角色列表"` + PostIds int64 `json:"postIds" dc:"当前岗位"` + RoleIds int64 `json:"roleIds" dc:"当前角色"` +} + +// MemberUpdateProfileInp 更新用户资料 +type MemberUpdateProfileInp struct { + Avatar string `json:"avatar" v:"required#头像不能为空" dc:"头像"` + RealName string `json:"realName" v:"required#真实姓名不能为空" dc:"真实姓名"` + Qq string `json:"qq" dc:"QQ"` + Birthday *gtime.Time `json:"birthday" dc:"生日"` + Sex int `json:"sex" dc:"性别"` + Address string `json:"address" dc:"联系地址"` + CityId int64 `json:"cityId" dc:"城市编码"` +} + +// MemberUpdatePwdInp 修改登录密码 +type MemberUpdatePwdInp struct { + Id int64 `json:"id" dc:"用户ID"` + OldPassword string `json:"oldPassword" v:"required#原密码不能为空" dc:"原密码"` + NewPassword string `json:"newPassword" v:"required|length:6,16#新密码不能为空#新密码需在6~16之间" dc:"新密码"` +} + +// MemberResetPwdInp 重置密码 +type MemberResetPwdInp struct { + Password string `json:"password" v:"required#密码不能为空" dc:"密码"` + Id int64 `json:"id" dc:"用户ID"` +} + +type LoginMemberInfoModel struct { + Id int64 `json:"id" dc:"用户ID"` + DeptName string `json:"deptName" dc:"所属部门"` + RoleName string `json:"roleName" dc:"所属角色"` + Permissions []string `json:"permissions" dc:"角色信息"` + DeptType string `json:"deptType" dc:"部门类型"` + DeptId int64 `json:"-" dc:"部门ID"` + RoleId int64 `json:"-" dc:"角色ID"` + Username string `json:"username" dc:"用户名"` + RealName string `json:"realName" dc:"姓名"` + Avatar string `json:"avatar" dc:"头像"` + Balance float64 `json:"balance" dc:"余额"` + Integral float64 `json:"integral" dc:"积分"` + Sex int `json:"sex" dc:"性别"` + Qq string `json:"qq" dc:"qq"` + Email string `json:"email" dc:"邮箱"` + Mobile string `json:"mobile" dc:"手机号码"` + Birthday *gtime.Time `json:"birthday" dc:"生日"` + CityId int64 `json:"cityId" dc:"城市编码"` + Address string `json:"address" dc:"联系地址"` + Cash *MemberCash `json:"cash" dc:"收款信息"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + OpenId string `json:"openId" dc:"本次登录的openId"` // 区别与绑定的微信openid + InviteCode string `json:"inviteCode" dc:"邀请码"` + *MemberLoginStatModel +} + +// MemberEditInp 修改用户 +type MemberEditInp struct { + Id int64 `json:"id" dc:"管理员ID"` + RoleId int64 `json:"roleId" v:"required#角色不能为空" dc:"角色ID"` + PostIds []int64 `json:"postIds" dc:"岗位ID"` + DeptId int64 `json:"deptId" v:"required#部门不能为空" dc:"部门ID"` + Username string `json:"username" v:"required#账号不能为空" dc:"帐号"` + PasswordHash string `json:"passwordHash" dc:"密码hash"` + Password string `json:"password" dc:"密码"` + RealName string `json:"realName" dc:"真实姓名"` + Avatar string `json:"avatar" dc:"头像"` + Sex int `json:"sex" dc:"性别"` + Qq string `json:"qq" dc:"qq"` + Email string `json:"email" dc:"邮箱"` + Birthday *gtime.Time `json:"birthday" dc:"生日"` + ProvinceId int `json:"provinceId" dc:"省"` + CityId int `json:"cityId" dc:"城市"` + AreaId int `json:"areaId" dc:"地区"` + Address string `json:"address" dc:"默认地址"` + Mobile string `json:"mobile" dc:"手机号码"` + Remark string `json:"remark" dc:"备注"` + Status int `json:"status" dc:"状态"` +} + +// MemberAddInp 新增用户 +type MemberAddInp struct { + *MemberEditInp + Salt string `json:"salt" dc:"密码盐"` + Pid int64 `json:"pid" dc:"上级ID"` + Level int `json:"level" dc:"等级"` + Tree string `json:"tree" dc:"关系树"` + InviteCode string `json:"inviteCode" dc:"邀请码"` +} + +func (in *MemberEditInp) Filter(ctx context.Context) (err error) { + if in.Id < 1 || in.Password != "" { + if err := g.Validator(). + Rules("length:6,16"). + Messages("新密码不能为空#新密码需在6~16之间"). + Data(in.Password).Run(ctx); err != nil { + return err.Current() + } + } + return +} + +type MemberEditModel struct{} + +// VerifyUniqueInp 验证管理员唯一属性 +type VerifyUniqueInp struct { + Id int64 + Where g.Map +} + +// MemberDeleteInp 删除用户 +type MemberDeleteInp struct { + Id interface{} `json:"id" v:"required#用户ID不能为空" dc:"用户ID"` +} + +type MemberDeleteModel struct{} + +// MemberViewInp 获取用户信息 +type MemberViewInp struct { + Id int64 `json:"id" dc:"用户ID"` +} + +type MemberViewModel struct { + entity.AdminMember + DeptName string `json:"deptName" dc:"所属部门"` + RoleName string `json:"roleName" dc:"所属角色"` +} + +// MemberListInp 获取用户列表 +type MemberListInp struct { + form.PageReq + form.StatusReq + Id int64 `json:"id" dc:"用户ID"` + Pid int64 `json:"pid" dc:"上级ID"` + RoleId int `json:"roleId" dc:"角色ID"` + DeptId int `json:"deptId" dc:"部门ID"` + Mobile int `json:"mobile" dc:"手机号"` + Username string `json:"username" dc:"用户名"` + RealName string `json:"realName" dc:"真实姓名"` + Name string `json:"name" dc:"岗位名称"` + Code string `json:"code" dc:"岗位编码"` + CreatedAt []int64 `json:"createdAt" dc:"创建时间"` +} + +type MemberListModel struct { + entity.AdminMember + DeptName string `json:"deptName" dc:"所属部门"` + RoleName string `json:"roleName" dc:"所属角色"` + PostIds []int64 `json:"postIds" dc:"岗位"` + DeptId int64 `json:"deptId" dc:"部门ID"` +} + +// MemberCash 用户提现配置 +type MemberCash struct { + Name string `json:"name" dc:"收款人姓名"` + Account string `json:"account" dc:"收款账户"` + PayeeCode string `json:"payeeCode" dc:"收款码"` +} + +// MemberStatusInp 更新状态 +type MemberStatusInp struct { + entity.AdminMember +} + +func (in *MemberStatusInp) Filter(ctx context.Context) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + return +} + +type MemberStatusModel struct{} + +// MemberSelectInp 获取可选的后台用户选项 +type MemberSelectInp struct { +} + +type MemberSelectModel struct { + Value int64 `json:"value" dc:"用户ID"` + Label string `json:"label" dc:"真实姓名"` + Username string `json:"username" dc:"用户名"` + Avatar string `json:"avatar" dc:"头像"` +} + +// MemberAddBalanceInp 增加余额 +type MemberAddBalanceInp struct { + Id int64 `json:"id" v:"required#用户ID不能为空" dc:"管理员ID"` + OperateMode int64 `json:"operateMode" v:"in:1,2#输入的操作方式是无效的" dc:"操作方式"` + Num float64 `json:"num" dc:"操作数量"` + AppId string `json:"appId"` + AddonsName string `json:"addonsName"` + SelfNum float64 `json:"selfNum"` + SelfCreditGroup string `json:"selfCreditGroup"` + OtherNum float64 `json:"otherNum"` + OtherCreditGroup string `json:"otherCreditGroup"` + Remark string `json:"remark"` +} + +func (in *MemberAddBalanceInp) Filter(ctx context.Context) (err error) { + if in.Num <= 0 { + err = gerror.New("操作数量必须大于0") + return + } + + if in.OperateMode == 1 { + // 加款 + in.SelfNum = -in.Num + in.SelfCreditGroup = consts.CreditGroupOpIncr + in.OtherNum = in.Num + in.OtherCreditGroup = consts.CreditGroupIncr + in.Remark = fmt.Sprintf("增加余额:%v", in.OtherNum) + } else { + // 扣款 + in.SelfNum = in.Num + in.SelfCreditGroup = consts.CreditGroupOpDecr + in.OtherNum = -in.Num + in.OtherCreditGroup = consts.CreditGroupDecr + in.Remark = fmt.Sprintf("扣除余额:%v", in.OtherNum) + } + + in.AppId = contexts.GetModule(ctx) + in.AddonsName = contexts.GetAddonName(ctx) + return +} + +type MemberAddBalanceModel struct{} + +// MemberAddIntegralInp 增加积分 +type MemberAddIntegralInp struct { + Id int64 `json:"id" v:"required#用户ID不能为空" dc:"管理员ID"` + OperateMode int64 `json:"operateMode" dc:"操作方式"` + Num float64 `json:"num" dc:"操作数量"` + AppId string `json:"appId"` + AddonsName string `json:"addonsName"` + SelfNum float64 `json:"selfNum"` + SelfCreditGroup string `json:"selfCreditGroup"` + OtherNum float64 `json:"otherNum"` + OtherCreditGroup string `json:"otherCreditGroup"` + Remark string `json:"remark"` +} + +func (in *MemberAddIntegralInp) Filter(ctx context.Context) (err error) { + if in.Num <= 0 { + err = gerror.New("操作数量必须大于0") + return + } + + if in.OperateMode == 1 { + // 加款 + in.SelfNum = -in.Num + in.SelfCreditGroup = consts.CreditGroupOpIncr + in.OtherNum = in.Num + in.OtherCreditGroup = consts.CreditGroupIncr + in.Remark = fmt.Sprintf("增加积分:%v", in.OtherNum) + } else { + // 扣款 + in.SelfNum = in.Num + in.SelfCreditGroup = consts.CreditGroupOpDecr + in.OtherNum = -in.Num + in.OtherCreditGroup = consts.CreditGroupDecr + in.Remark = fmt.Sprintf("扣除积分:%v", in.OtherNum) + } + + in.AppId = contexts.GetModule(ctx) + in.AddonsName = contexts.GetAddonName(ctx) + return +} + +type MemberAddIntegralModel struct{} diff --git a/server/internal/model/input/adminin/menu.go b/server/internal/model/input/adminin/menu.go new file mode 100644 index 0000000..71fa235 --- /dev/null +++ b/server/internal/model/input/adminin/menu.go @@ -0,0 +1,147 @@ +// Package adminin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package adminin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "hotgo/internal/model" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" +) + +// MenuEditInp 修改/新增菜单 +type MenuEditInp struct { + entity.AdminMenu +} + +func (in *MenuEditInp) Filter(ctx context.Context) (err error) { + if in.Title == "" { + err = gerror.New("菜单名称不能为空") + return + } + if in.Type != 3 && in.Path == "" { + err = gerror.New("路由地址不能为空") + return + } + if in.Name == "" { + err = gerror.New("路由别名不能为空") + return + } + return +} + +type MenuEditModel struct{} + +// MenuDeleteInp 删除菜单 +type MenuDeleteInp struct { + Id interface{} `json:"id" v:"required#菜单ID不能为空" dc:"菜单ID"` +} + +func (in *MenuDeleteInp) Filter(ctx context.Context) (err error) { + return +} + +type MenuDeleteModel struct{} + +// MenuListInp 获取菜单列表 +type MenuListInp struct { + form.PageReq + Pid int64 `json:"pid" dc:"父ID"` +} + +func (in *MenuListInp) Filter(ctx context.Context) (err error) { + return +} + +// MenuSearchListInp 查询菜单列表 +type MenuSearchListInp struct { + Name string `json:"name" dc:"菜单名称"` + form.StatusReq +} + +func (in *MenuSearchListInp) Filter(ctx context.Context) (err error) { + return +} + +type MenuSearchListModel []*model.TreeMenu + +// MenuTree 树 +type MenuTree struct { + entity.AdminMenu + Key int64 `json:"key" ` + Label string `json:"label" dc:"标签"` + Children []*MenuTree `json:"children"` +} + +type MenuListModel struct { + List []*MenuTree `json:"list"` +} + +// MenuRouteMeta 菜单路由 +type MenuRouteMeta struct { + // 解释参考:https://naive-ui-admin-docs.vercel.app/guide/router.html#%E5%A4%9A%E7%BA%A7%E8%B7%AF%E7%94%B1 + Title string `json:"title"` // 菜单名称 一般必填 + // Disabled bool `json:"disabled,omitempty"` // 禁用菜单 + Icon string `json:"icon,omitempty"` // 菜单图标 + KeepAlive bool `json:"keepAlive,omitempty"` // 缓存该路由 + Hidden bool `json:"hidden,omitempty"` // 隐藏菜单 + Sort int `json:"sort,omitempty"` // 排序越小越排前 + AlwaysShow bool `json:"alwaysShow,omitempty"` // 取消自动计算根路由模式 + ActiveMenu string `json:"activeMenu,omitempty"` // 当路由设置了该属性,则会高亮相对应的侧边栏。 + // 这在某些场景非常有用,比如:一个列表页路由为:/list/basic-list + // 点击进入详情页,这时候路由为/list/basic-info/1,但你想在侧边栏高亮列表的路由,就可以进行如下设置 + // 注意是配置高亮路由 `name`,不是path + IsRoot bool `json:"isRoot,omitempty"` // 是否跟路由 顶部混合菜单,必须传 true,否则左侧会显示异常(场景就是,分割菜单之后,当一级菜单没有子菜单) + FrameSrc string `json:"frameSrc,omitempty" ` // 内联外部地址 + Permissions string `json:"permissions,omitempty"` // 菜单包含权限集合,满足其中一个就会显示 + Affix bool `json:"affix,omitempty"` // 是否固定 设置为 true 之后 多页签不可删除 + Type int `json:"type"` // 菜单类型 +} + +type MenuRoute struct { + Name string `json:"name"` + Path string `json:"path"` + Redirect string `json:"redirect"` + Component string `json:"component"` + Meta *MenuRouteMeta `json:"meta"` + Children []*MenuRoute `json:"children,omitempty" dc:"子路由"` +} + +// MenuRouteSummary 菜单树结构 +type MenuRouteSummary struct { + entity.AdminMenu + Children []*MenuRouteSummary +} + +// DynamicMeta 动态路由元数据 +type DynamicMeta struct { + Title string `json:"title" description:"菜单标题"` + Icon string `json:"icon" description:"菜单图标"` + NoCache bool `json:"noCache" description:"是否缓存"` + Remark string `json:"remark" description:"备注"` +} + +// DynamicBase 动态路由 +type DynamicBase struct { + Id int64 `json:"id" description:"菜单ID"` + Pid int64 `json:"pid" description:"父ID"` + Name string `json:"name" description:"菜单名称"` + Code string `json:"code" description:"菜单编码"` + Path string `json:"path" description:"路由地址"` + Hidden bool `json:"hidden" description:"是否隐藏"` + Redirect string `json:"redirect" description:"重定向"` + Component string `json:"component" description:"组件路径"` + AlwaysShow bool `json:"alwaysShow" description:"暂时不知道干啥"` + IsFrame string `json:"isFrame" description:"是否为外链(0是 1否)"` + Meta *DynamicMeta `json:"meta" description:"配置数据集"` +} + +// DynamicMenu 动态路由菜单 +type DynamicMenu struct { + DynamicBase + Children []*DynamicBase `json:"children" description:"子菜单"` +} diff --git a/server/internal/model/input/adminin/notice.go b/server/internal/model/input/adminin/notice.go new file mode 100644 index 0000000..f44e522 --- /dev/null +++ b/server/internal/model/input/adminin/notice.go @@ -0,0 +1,139 @@ +// Package adminin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package adminin + +import ( + "context" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" +) + +// NoticeMaxSortInp 最大排序 +type NoticeMaxSortInp struct { + Id int64 +} + +type NoticeMaxSortModel struct { + Sort int `json:"sort" dc:"排序"` +} + +// NoticeEditInp 修改/新增 +type NoticeEditInp struct { + entity.AdminNotice + Receiver []int64 `json:"receiver" dc:"接收者"` + SenderAvatar string `json:"senderAvatar" dc:"发送者头像"` +} + +type NoticeEditModel struct{} + +// NoticeDeleteInp 删除字典类型 +type NoticeDeleteInp struct { + Id interface{} `json:"id" v:"required#公告ID不能为空" dc:"公告ID"` +} + +type NoticeDeleteModel struct{} + +// NoticeViewInp 获取信息 +type NoticeViewInp struct { + Id int64 `json:"id" v:"required#公告ID不能为空" dc:"公告ID"` +} + +type NoticeViewModel struct { + entity.AdminNotice +} + +// NoticeListInp 获取列表 +type NoticeListInp struct { + form.PageReq + form.StatusReq + Title string + Content string + Type int64 +} + +type NoticeListModel struct { + entity.AdminNotice + ReadCount float64 `json:"readCount" dc:"阅读次数"` + ReceiverGroup []form.AvatarGroup `json:"receiverGroup" dc:"接收人头像组"` +} + +// NoticeStatusInp 更新状态 +type NoticeStatusInp struct { + entity.AdminNotice +} + +type NoticeStatusModel struct{} + +// NoticeUpReadInp 更新已读 +type NoticeUpReadInp struct { + Id int64 `json:"id" v:"required#公告ID不能为空" dc:"公告ID"` +} + +// NoticeReadAllInp 全部已读 +type NoticeReadAllInp struct { + Type int64 `json:"type" v:"required#公告类型不能为空" dc:"公告类型"` +} + +// PullMessagesInp 获取列表 +type PullMessagesInp struct { + Limit int `json:"limit" dc:"拉取最大数量限制"` +} + +func (in *PullMessagesInp) Filter(ctx context.Context) (err error) { + if in.Limit == 0 { + in.Limit = 100 + } + return +} + +type PullMessagesRow struct { + Id int64 `json:"id" dc:"消息ID"` + Type int64 `json:"type" dc:"消息类型"` + Title string `json:"title" dc:"消息标题"` + Content string `json:"content" dc:"消息内容"` + Tag int64 `json:"tag" dc:"标签"` + Sort int64 `json:"sort" dc:"排序"` + CreatedBy int64 `json:"createdBy" dc:"发送人"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + SenderAvatar string `json:"senderAvatar" dc:"发送者头像"` + IsRead bool `json:"isRead" dc:"是否已读"` +} + +type PullMessagesModel struct { + List []*PullMessagesRow `json:"list" dc:"消息列表"` + *NoticeUnreadCountModel +} + +type NoticeUnreadCountInp struct { + MemberId int64 + MessageIds []int64 +} + +type NoticeUnreadCountModel struct { + NotifyCount int `json:"notifyCount" dc:"未读通知数量"` + NoticeCount int `json:"noticeCount" dc:"未读公告数量"` + LetterCount int `json:"letterCount" dc:"未读私信数量"` +} + +// NoticeMessageListInp 我的消息列表 +type NoticeMessageListInp struct { + form.PageReq + Type int64 `json:"type" v:"required#公告类型不能为空" dc:"公告类型"` +} + +type NoticeMessageListModel struct { + Id int64 `json:"id" dc:"消息ID"` + Type int64 `json:"type" dc:"消息类型"` + Title string `json:"title" dc:"消息标题"` + Content string `json:"content" dc:"消息内容"` + Tag int64 `json:"tag" dc:"标签"` + Sort int64 `json:"sort" dc:"排序"` + CreatedBy int64 `json:"createdBy" dc:"发送人"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + SenderAvatar string `json:"senderAvatar" dc:"发送者头像"` + IsRead bool `json:"isRead" dc:"是否已读"` +} diff --git a/server/internal/model/input/adminin/order.go b/server/internal/model/input/adminin/order.go new file mode 100644 index 0000000..bbc2763 --- /dev/null +++ b/server/internal/model/input/adminin/order.go @@ -0,0 +1,156 @@ +// Package adminin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package adminin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/consts" + "hotgo/internal/library/dict" + "hotgo/internal/library/hgorm/hook" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/payin" +) + +// OrderAcceptRefundInp 受理申请退款 +type OrderAcceptRefundInp struct { + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` + RejectRefundReason string `json:"rejectRefundReason" dc:"拒绝退款原因"` + Status int64 `json:"status" dc:"状态"` + Remark string `json:"remark" dc:"退款备注"` +} + +func (in *OrderAcceptRefundInp) Filter(ctx context.Context) (err error) { + if !dict.HasOptionKey(consts.OrderStatusOptions, in.Status) { + err = gerror.Newf("订单状态不正确") + return + } + + if in.Status == consts.OrderStatusReturnReject && in.Remark == "" { + in.Remark = "退款申请被拒绝" + } + return +} + +type OrderAcceptRefundModel struct { +} + +// OrderApplyRefundInp 申请退款 +type OrderApplyRefundInp struct { + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` + RefundReason string `json:"refundReason" v:"required#退款原因不能为空" dc:"退款原因"` +} + +func (in *OrderApplyRefundInp) Filter(ctx context.Context) (err error) { + return +} + +type OrderApplyRefundModel struct { +} + +// OrderCreateInp 创建充值订单 +type OrderCreateInp struct { + PayType string `json:"payType" dc:"支付方式"` + TradeType string `json:"tradeType" dc:"交易类型"` + OrderType string `json:"orderType" dc:"订单类型"` + ProductId int64 `json:"productId" dc:"产品id"` + Money float64 `json:"money" dc:"充值金额"` + Remark string `json:"remark" dc:"备注"` + ReturnUrl string `json:"returnUrl" dc:"买家付款成功跳转地址"` +} + +func (in *OrderCreateInp) Filter(ctx context.Context) (err error) { + return +} + +type OrderCreateModel struct { + Order *payin.CreateOrderModel `json:"order"` +} + +// OrderEditInp 修改/新增充值订单 +type OrderEditInp struct { + entity.AdminOrder +} + +func (in *OrderEditInp) Filter(ctx context.Context) (err error) { + return +} + +type OrderEditModel struct{} + +// OrderDeleteInp 删除充值订单 +type OrderDeleteInp struct { + Id interface{} `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *OrderDeleteInp) Filter(ctx context.Context) (err error) { + return +} + +type OrderDeleteModel struct{} + +// OrderViewInp 获取指定充值订单信息 +type OrderViewInp struct { + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *OrderViewInp) Filter(ctx context.Context) (err error) { + return +} + +type OrderViewModel struct { + entity.AdminOrder +} + +// OrderListInp 获取充值订单列表 +type OrderListInp struct { + form.PageReq + MemberId uint64 `json:"memberId" dc:"用户id"` + OrderSn string `json:"orderSn" dc:"业务订单号"` + Status int `json:"status" dc:"状态"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` + PayLogOutTradeNo string `json:"payLogOutTradeNo" dc:"商户订单号"` + ComplexMemberId []string `json:"complexMemberId" dc:"下单用户"` +} + +func (in *OrderListInp) Filter(ctx context.Context) (err error) { + return +} + +type OrderListModel struct { + entity.AdminOrder + OutTradeNo string `json:"payLogOutTradeNo" dc:"商户订单号"` + PayType string `json:"payLogPayType" dc:"支付类型"` + MemberBySumma *hook.MemberSumma `json:"memberBySumma" dc:"下单用户信息"` +} + +// OrderExportModel 导出充值订单 +type OrderExportModel struct { + Id int64 `json:"id" dc:"主键"` + MemberId uint64 `json:"memberId" dc:"用户id"` + OrderType string `json:"orderType" dc:"订单类型"` + ProductId int64 `json:"productId" dc:"产品id"` + OrderSn string `json:"orderSn" dc:"关联订单号"` + Money float64 `json:"money" dc:"充值金额"` + Remark string `json:"remark" dc:"备注"` + Status int `json:"status" dc:"状态"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"` +} + +// OrderStatusInp 更新充值订单状态 +type OrderStatusInp struct { + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` + Status int `json:"status" dc:"状态"` +} + +func (in *OrderStatusInp) Filter(ctx context.Context) (err error) { + return +} + +type OrderStatusModel struct{} diff --git a/server/internal/model/input/adminin/post.go b/server/internal/model/input/adminin/post.go new file mode 100644 index 0000000..34f2b88 --- /dev/null +++ b/server/internal/model/input/adminin/post.go @@ -0,0 +1,102 @@ +// Package adminin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package adminin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/consts" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/validate" +) + +// PostListInp 获取列表 +type PostListInp struct { + form.PageReq + form.StatusReq + Name string `json:"name" dc:"岗位名称"` + Code string `json:"code" dc:"岗位编码"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` +} + +func (in *PostListInp) Filter(ctx context.Context) (err error) { + return +} + +type PostListModel struct { + entity.AdminPost +} + +// PostViewInp 获取信息 +type PostViewInp struct { + Id string `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"` +} + +type PostViewModel struct { + entity.AdminPost +} + +// PostMaxSortInp 最大排序 +type PostMaxSortInp struct { + Id int64 `json:"id" description:"岗位ID"` +} + +type PostMaxSortModel struct { + Sort int `json:"sort" description:"排序"` +} + +// PostEditInp 修改/新增字典数据 +type PostEditInp struct { + entity.AdminPost +} + +func (in *PostEditInp) Filter(ctx context.Context) (err error) { + if in.Name == "" { + err = gerror.New("名称不能为空") + return + } + if in.Code == "" { + err = gerror.New("编码不能为空") + return + } + return +} + +type PostEditModel struct{} + +// PostDeleteInp 删除字典类型 +type PostDeleteInp struct { + Id interface{} `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"` +} + +type PostDeleteModel struct{} + +// PostStatusInp 更新状态 +type PostStatusInp struct { + entity.AdminPost +} + +func (in *PostStatusInp) Filter(ctx context.Context) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + return +} + +type PostStatusModel struct{} diff --git a/server/internal/model/input/adminin/role.go b/server/internal/model/input/adminin/role.go new file mode 100644 index 0000000..0cd324a --- /dev/null +++ b/server/internal/model/input/adminin/role.go @@ -0,0 +1,154 @@ +// Package adminin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package adminin + +import ( + "context" + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/errors/gerror" + "hotgo/internal/model" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" +) + +// GetPermissionsInp 获取指定角色的菜单权限 +type GetPermissionsInp struct { + RoleId int64 `json:"id"` +} + +type GetPermissionsModel struct { + MenuIds []int64 `json:"menuIds"` +} + +// UpdatePermissionsInp 更新指定角色的菜单权限 +type UpdatePermissionsInp struct { + RoleId int64 `json:"id"` + MenuIds []int64 `json:"menuIds"` +} + +// RoleDeleteInp 删除角色 +type RoleDeleteInp struct { + Id int64 `json:"id" v:"required"` +} + +func (in *RoleDeleteInp) Filter(ctx context.Context) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + return +} + +// RoleEditInp 获取列表 +type RoleEditInp struct { + entity.AdminRole +} + +func (in *RoleEditInp) Filter(ctx context.Context) (err error) { + if in.Name == "" { + err = gerror.New("名称不能为空") + return + } + + if in.Key == "" { + err = gerror.New("编码不能为空") + return + } + + if in.Id > 0 && in.Id == in.Pid { + err = gerror.New("上级角色不能是自己") + return + } + + return +} + +// RoleUpdateFields 修改数据字段过滤 +type RoleUpdateFields struct { + Id int64 `json:"id" description:"角色ID"` + Name string `json:"name" description:"角色名称"` + Key string `json:"key" description:"角色权限字符串"` + DataScope int `json:"dataScope" description:"数据范围"` + CustomDept *gjson.Json `json:"customDept" description:"自定义部门权限"` + Pid int64 `json:"pid" description:"上级角色ID"` + Level int `json:"level" description:"关系树等级"` + Tree string `json:"tree" description:"关系树"` + Remark string `json:"remark" description:"备注"` + Sort int `json:"sort" description:"排序"` + Status int `json:"status" description:"角色状态"` +} + +// RoleInsertFields 新增数据字段过滤 +type RoleInsertFields struct { + Name string `json:"name" description:"角色名称"` + Key string `json:"key" description:"角色权限字符串"` + DataScope int `json:"dataScope" description:"数据范围"` + CustomDept *gjson.Json `json:"customDept" description:"自定义部门权限"` + Pid int64 `json:"pid" description:"上级角色ID"` + Level int `json:"level" description:"关系树等级"` + Tree string `json:"tree" description:"关系树"` + Remark string `json:"remark" description:"备注"` + Sort int `json:"sort" description:"排序"` + Status int `json:"status" description:"角色状态"` +} + +// RoleListInp 获取列表 +type RoleListInp struct { + form.PageReq +} + +type RoleTree struct { + entity.AdminRole + Label string `json:"label" dc:"标签"` + Value int64 `json:"value" dc:"键值"` + Children []*RoleTree `json:"children" dc:"子级"` +} + +type RoleListModel struct { + List []*RoleTree `json:"list"` +} + +// RoleMemberListInp 查询列表 +type RoleMemberListInp struct { + form.PageReq + + form.StatusReq + Role int `json:"role" dc:"角色ID"` + DeptId int `json:"deptId" dc:"部门ID"` + Mobile int `json:"mobile" dc:"手机号"` + Username string `json:"username" dc:"用户名"` + RealName string `json:"realName" dc:"真实姓名"` + StartTime string `json:"start_time" dc:"开始时间"` + EndTime string `json:"end_time" dc:"结束时间"` + Name string `json:"name" dc:"岗位名称"` + Code string `json:"code" dc:"岗位编码"` +} + +type RoleMemberListModel []*MemberListModel + +// MenuRoleListInp 查询角色菜单列表 +type MenuRoleListInp struct { + RoleId int64 +} +type MenuRoleListModel struct { + Menus []*model.LabelTreeMenu `json:"menus" dc:"菜单列表"` + CheckedKeys []int64 `json:"checkedKeys" dc:"选择的菜单ID"` +} + +// DataScopeEditInp 获取数据权限选项 +type DataScopeEditInp struct { + Id int64 `json:"id" v:"required" dc:"角色ID"` + DataScope int `json:"dataScope" v:"required" dc:"数据范围"` + CustomDept []int64 `json:"customDept" dc:"自定义部门权限"` +} + +func (in *DataScopeEditInp) Filter(ctx context.Context) (err error) { + if in.Id <= 0 { + return gerror.New("角色ID不正确!") + } + return +} diff --git a/server/internal/model/input/adminin/site.go b/server/internal/model/input/adminin/site.go new file mode 100644 index 0000000..c21e87a --- /dev/null +++ b/server/internal/model/input/adminin/site.go @@ -0,0 +1,69 @@ +package adminin + +import ( + "context" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/utility/simple" +) + +// RegisterInp 账号注册 +type RegisterInp struct { + Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"` + Password string `json:"password" v:"required#密码不能为空" dc:"密码"` + Mobile string `json:"mobile" v:"required|phone-loose#手机号不能为空|手机号格式不正确" dc:"手机号"` + Code string `json:"code" v:"required#验证码不能为空" dc:"验证码"` + InviteCode string `json:"inviteCode" dc:"邀请码"` +} + +func (in *RegisterInp) Filter(ctx context.Context) (err error) { + // 解密密码 + password, err := simple.DecryptText(in.Password) + if err != nil { + return err + } + + if err = g.Validator().Data(password).Rules("password").Messages("密码长度在6~18之间").Run(ctx); err != nil { + return + } + + in.Password = password + return +} + +// LoginModel 统一登录响应 +type LoginModel struct { + Id int64 `json:"id" dc:"用户ID"` + Username string `json:"username" dc:"用户名"` + Token string `json:"token" dc:"登录token"` + Expires int64 `json:"expires" dc:"登录有效期"` +} + +// AccountLoginInp 账号登录 +type AccountLoginInp struct { + Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"` + Password string `json:"password" v:"required#密码不能为空" dc:"密码"` + Cid string `json:"cid" dc:"验证码ID"` + Code string `json:"code" dc:"验证码"` + IsLock bool `json:"isLock" dc:"是否为锁屏状态"` +} + +// MobileLoginInp 手机号登录 +type MobileLoginInp struct { + Mobile string `json:"mobile" v:"required|phone-loose#手机号不能为空|手机号格式不正确" dc:"手机号"` + Code string `json:"code" v:"required#验证码不能为空" dc:"验证码"` +} + +// MemberLoginPermissions 登录用户角色信息 +type MemberLoginPermissions []string + +// MemberLoginStatInp 用户登录统计 +type MemberLoginStatInp struct { + MemberId int64 +} + +type MemberLoginStatModel struct { + LoginCount int `json:"loginCount" dc:"登录次数"` + LastLoginAt *gtime.Time `json:"lastLoginAt" dc:"最后登录时间"` + LastLoginIp string `json:"lastLoginIp" dc:"最后登录IP"` +} diff --git a/server/internal/model/input/commonin/wechat.go b/server/internal/model/input/commonin/wechat.go new file mode 100644 index 0000000..4c5c0a7 --- /dev/null +++ b/server/internal/model/input/commonin/wechat.go @@ -0,0 +1,22 @@ +// Package commonin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package commonin + +// WechatAuthorizeInp 微信用户授权 +type WechatAuthorizeInp struct { + Type string `json:"type" v:"required#授权类型不能为空" dc:"授权类型"` + SyncRedirect string `json:"syncRedirect" v:"required#同步跳转地址不能为空" dc:"同步跳转地址"` +} + +type WechatAuthorizeModel struct{} + +// WechatAuthorizeCallInp 微信用户授权回调 +type WechatAuthorizeCallInp struct { + Code string `json:"code" dc:"code作为换取access_token的票据"` + State string `json:"state" dc:"state"` +} + +type WechatAuthorizeCallModel struct{} diff --git a/server/internal/model/input/form/base.go b/server/internal/model/input/form/base.go new file mode 100644 index 0000000..05ff217 --- /dev/null +++ b/server/internal/model/input/form/base.go @@ -0,0 +1,30 @@ +// Package form +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package form + +import "hotgo/internal/consts" + +// StatusReq 通用状态查询 +type StatusReq struct { + Status int `json:"status" v:"in:-1,0,1,2,3#输入的状态是无效的" dc:"状态"` +} + +// SwitchReq 更新开关状态 +type SwitchReq struct { + Key string `json:"key" v:"required#测试ID不能为空" dc:"开关字段"` + Value int `json:"value" v:"in:1,2#输入的开关值是无效的" dc:"更新值"` +} + +// AvatarGroup 头像组 +type AvatarGroup struct { + Name string `json:"name" dc:"姓名"` + Src string `json:"src" dc:"头像地址"` +} + +// DefaultMaxSort 默认最大排序 +func DefaultMaxSort(baseSort int) int { + return baseSort + consts.MaxSortIncr +} diff --git a/server/internal/model/input/form/page.go b/server/internal/model/input/form/page.go new file mode 100644 index 0000000..a46e09e --- /dev/null +++ b/server/internal/model/input/form/page.go @@ -0,0 +1,68 @@ +// Package form +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package form + +import ( + "hotgo/internal/consts" +) + +type ReqPageFunc interface { + GetPage() int + GetPerPage() int +} + +// PageReq 分页请求 +type PageReq struct { + Page int `json:"page" example:"10" d:"1" v:"page@min:1#页码最小值不能低于1" dc:"当前页码"` + PerPage int `json:"pageSize" example:"1" d:"10" v:"pageSize@min:1|max:200#每页数量最小值不能低于1|每页数量最大值不能大于200" dc:"每页数量"` + Pagination bool `json:"pagination" d:"true" dc:"是否需要进行分页"` +} + +// GetPage 获取当前页码 +func (req *PageReq) GetPage() int { + return req.Page +} + +// GetPerPage 获取每页数量 +func (req *PageReq) GetPerPage() int { + return req.PerPage +} + +// PageRes 分页响应 +type PageRes struct { + PageReq + PageCount int `json:"pageCount" example:"0" dc:"分页个数"` + TotalCount int `json:"totalCount" example:"0" dc:"数据总行数"` +} + +// Pack 打包分页数据 +func (res *PageRes) Pack(req ReqPageFunc, totalCount int) { + res.TotalCount = totalCount + res.PageCount = CalPageCount(totalCount, req.GetPerPage()) + res.Page = req.GetPage() + res.PerPage = req.GetPerPage() +} + +func CalPageCount(totalCount int, perPage int) int { + return (totalCount + perPage - 1) / perPage +} + +// CalPage 计算分页偏移量 +func CalPage(page, perPage int) (newPage, newPerPage int, offset int) { + if page <= 0 { + newPage = consts.DefaultPage + } else { + newPage = page + } + if perPage <= 0 { + newPerPage = consts.DefaultPageSize + } else { + newPerPage = perPage + } + + offset = (newPage - 1) * newPerPage + return +} diff --git a/server/internal/model/input/form/select.go b/server/internal/model/input/form/select.go new file mode 100644 index 0000000..8a9b9ad --- /dev/null +++ b/server/internal/model/input/form/select.go @@ -0,0 +1,30 @@ +// Package form +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package form + +import "github.com/gogf/gf/v2/util/gconv" + +// Selects 选项 +type Selects []*Select + +type Select struct { + Value interface{} `json:"value"` + Label string `json:"label"` + Name string `json:"name"` + Disabled bool `json:"disabled"` +} + +func (p Selects) Len() int { + return len(p) +} + +func (p Selects) Swap(i, j int) { + p[i], p[j] = p[j], p[i] +} + +func (p Selects) Less(i, j int) bool { + return gconv.Int64(p[j].Value) > gconv.Int64(p[i].Value) +} diff --git a/server/internal/model/input/form/sorter.go b/server/internal/model/input/form/sorter.go new file mode 100644 index 0000000..a7c17ef --- /dev/null +++ b/server/internal/model/input/form/sorter.go @@ -0,0 +1,20 @@ +// Package form +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package form + +// Sorter 排序器,兼容naiveUI +type Sorter struct { + ColumnKey string `json:"columnKey" dc:"排序字段"` + Order interface{} `json:"order" dc:"排序方式 descend|ascend|false"` +} + +type Sorters struct { + Sorters []*Sorter `json:"sorters" dc:"排序器"` +} + +func (s *Sorters) GetSorters() []*Sorter { + return s.Sorters +} diff --git a/server/internal/model/input/payin/general.go b/server/internal/model/input/payin/general.go new file mode 100644 index 0000000..9293fcd --- /dev/null +++ b/server/internal/model/input/payin/general.go @@ -0,0 +1,60 @@ +// Package payin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package payin + +import ( + "github.com/go-pay/gopay/wechat/v3" + "github.com/gogf/gf/v2/os/gtime" + officialJs "github.com/silenceper/wechat/v2/officialaccount/js" + "hotgo/internal/model/entity" +) + +// 和功能库[payment]包的通用输入/输出 + +// CreateOrderInp 统一创建订单入口 +type CreateOrderInp struct { + Pay *entity.PayLog +} + +type CreateOrderModel struct { + TradeType string `json:"tradeType" description:"交易类型"` + PayURL string `json:"payURL" description:"支付地址"` + OutTradeNo string `json:"outTradeNo" description:"商户订单号"` + JsApi *JSAPI `json:"jsApi" description:"jsapi支付参数"` +} + +type JSAPI struct { + Config *officialJs.Config `json:"config" description:"js初始化配置"` + Params *wechat.JSAPIPayParams `json:"params" description:"支付参数"` +} + +// NotifyInp 统一异步通知处理入口 +type NotifyInp struct { +} + +type NotifyModel struct { + OutTradeNo string `json:"outTradeNo" description:"商户订单号"` + TransactionId string `json:"transactionId" description:"交易号"` + PayAt *gtime.Time `json:"payAt" description:"支付时间"` + ActualAmount float64 `json:"actualAmount" description:"实付金额"` +} + +// NotifyCallFuncInp 异步通知回调,用于异步通知验签通过后回调到具体的业务中 +type NotifyCallFuncInp struct { + Pay *entity.PayLog +} + +// RefundInp 统一退款处理入口 +type RefundInp struct { + Pay *entity.PayLog + RefundMoney float64 `json:"refundMoney" dc:"退款金额"` + RefundSn string `json:"refundSn" dc:"退款单号"` + Reason string `json:"reason" dc:"申请退款原因"` + Remark string `json:"remark" dc:"退款备注"` +} + +type RefundModel struct { +} diff --git a/server/internal/model/input/payin/pay.go b/server/internal/model/input/payin/pay.go new file mode 100644 index 0000000..84bcee6 --- /dev/null +++ b/server/internal/model/input/payin/pay.go @@ -0,0 +1,198 @@ +// Package payin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package payin + +import ( + "context" + "github.com/gogf/gf/v2/encoding/gjson" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + + "github.com/gogf/gf/v2/os/gtime" +) + +// PayNotifyInp 异步通知 +type PayNotifyInp struct { + PayType string `json:"payType" description:"支付类型"` +} + +type PayNotifyModel struct { + PayType string `json:"payType" description:"支付类型"` + Code string `json:"code" description:"状态码"` + Message string `json:"message" description:"响应文本消息"` +} + +type PayNotifyUpdate struct { + TransactionId string `json:"transactionId" description:"交易号"` + PayStatus int `json:"payStatus" description:"支付状态"` + PayAt *gtime.Time `json:"payAt" description:"支付时间"` + PayIp string `json:"payIp" description:"支付者ip"` + TraceIds *gjson.Json `json:"traceIds" description:"链路id集合"` +} + +// PayCreateInp 创建支付订单和日志 +type PayCreateInp struct { + Subject string `json:"subject" description:"订单标题"` + Detail *gjson.Json `json:"detail" description:"支付商品详情"` + OrderSn string `json:"orderSn" description:"关联订单号"` + OrderGroup string `json:"orderGroup" description:"组别[默认统一支付类型]"` + Openid string `json:"openid" description:"openid"` + PayType string `json:"payType" description:"支付类型"` + TradeType string `json:"tradeType" description:"交易类型"` + PayAmount float64 `json:"payAmount" description:"支付金额"` + ReturnUrl string `json:"returnUrl" description:"买家付款成功跳转地址"` +} + +type PayCreateModel struct { + Order *CreateOrderModel +} + +// PayEditInp 修改/新增支付日志 +type PayEditInp struct { + entity.PayLog +} + +func (in *PayEditInp) Filter(ctx context.Context) (err error) { + return +} + +type PayEditModel struct{} + +// PayDeleteInp 删除支付日志 +type PayDeleteInp struct { + Id interface{} `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *PayDeleteInp) Filter(ctx context.Context) (err error) { + return +} + +type PayDeleteModel struct{} + +// PayViewInp 获取指定支付日志信息 +type PayViewInp struct { + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *PayViewInp) Filter(ctx context.Context) (err error) { + return +} + +type PayViewModel struct { + entity.PayLog +} + +// PayListInp 获取支付日志列表 +type PayListInp struct { + form.PageReq + Id int64 `json:"id" dc:"ID"` + Status int `json:"status" dc:"状态"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` +} + +func (in *PayListInp) Filter(ctx context.Context) (err error) { + return +} + +type PayListModel struct { + Id int64 `json:"id" description:"主键"` + MemberId uint64 `json:"memberId" description:"用户id"` + AppId string `json:"appId" description:"应用id"` + AddonsName string `json:"addonsName" description:"插件名称"` + OrderSn string `json:"orderSn" description:"关联订单号"` + OrderGroup string `json:"orderGroup" description:"组别[默认统一支付类型]"` + Openid string `json:"openid" description:"openid"` + MchId string `json:"mchId" description:"商户支付账户"` + Body string `json:"body" description:"创建支付报文"` + AuthCode string `json:"authCode" description:"刷卡码"` + OutTradeNo string `json:"outTradeNo" description:"商户订单号"` + TransactionId string `json:"transactionId" description:"交易号"` + PayType int `json:"payType" description:"支付类型"` + PayFee float64 `json:"payFee" description:"支付金额"` + PayStatus int `json:"payStatus" description:"支付状态"` + PayAt *gtime.Time `json:"payAt" description:"支付时间"` + TradeType string `json:"tradeType" description:"交易类型"` + RefundSn string `json:"refundSn" description:"退款编号"` + RefundFee float64 `json:"refundFee" description:"退款金额"` + RefundRemark string `json:"refundRemark" description:"退款备注"` + IsRefund int `json:"isRefund" description:"是否退款"` + CreateIp string `json:"createIp" description:"创建者ip"` + PayIp string `json:"payIp" description:"支付者ip"` + NotifyUrl string `json:"notifyUrl" description:"支付通知回调地址"` + ReturnUrl string `json:"returnUrl" description:"买家付款成功跳转地址"` + TraceIds *gjson.Json `json:"traceIds" description:"链路id集合"` + Status int `json:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" description:"修改时间"` +} + +// PayExportModel 导出支付日志 +type PayExportModel struct { + Id int64 `json:"id" description:"主键"` + MemberId uint64 `json:"memberId" description:"用户id"` + AppId string `json:"appId" description:"应用id"` + AddonsName string `json:"addonsName" description:"插件名称"` + OrderSn string `json:"orderSn" description:"关联订单号"` + OrderGroup string `json:"orderGroup" description:"组别[默认统一支付类型]"` + Openid string `json:"openid" description:"openid"` + MchId string `json:"mchId" description:"商户支付账户"` + Body string `json:"body" description:"创建支付报文"` + AuthCode string `json:"authCode" description:"刷卡码"` + OutTradeNo string `json:"outTradeNo" description:"商户订单号"` + TransactionId string `json:"transactionId" description:"交易号"` + PayType int `json:"payType" description:"支付类型"` + PayFee float64 `json:"payFee" description:"支付金额"` + PayStatus int `json:"payStatus" description:"支付状态"` + PayAt *gtime.Time `json:"payAt" description:"支付时间"` + TradeType string `json:"tradeType" description:"交易类型"` + RefundSn string `json:"refundSn" description:"退款编号"` + RefundFee float64 `json:"refundFee" description:"退款金额"` + RefundRemark string `json:"refundRemark" description:"退款备注"` + IsRefund int `json:"isRefund" description:"是否退款"` + CreateIp string `json:"createIp" description:"创建者ip"` + PayIp string `json:"payIp" description:"支付者ip"` + NotifyUrl string `json:"notifyUrl" description:"支付通知回调地址"` + ReturnUrl string `json:"returnUrl" description:"买家付款成功跳转地址"` + TraceIds *gjson.Json `json:"traceIds" description:"链路id集合"` + Status int `json:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" description:"修改时间"` +} + +// PayMaxSortInp 获取支付日志最大排序 +type PayMaxSortInp struct{} + +func (in *PayMaxSortInp) Filter(ctx context.Context) (err error) { + return +} + +type PayMaxSortModel struct { + Sort int `json:"sort" description:"排序"` +} + +// PayStatusInp 更新支付日志状态 +type PayStatusInp struct { + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` + Status int `json:"status" dc:"状态"` +} + +func (in *PayStatusInp) Filter(ctx context.Context) (err error) { + return +} + +type PayStatusModel struct{} + +// PaySwitchInp 更新支付日志开关状态 +type PaySwitchInp struct { + form.SwitchReq + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *PaySwitchInp) Filter(ctx context.Context) (err error) { + return +} + +type PaySwitchModel struct{} diff --git a/server/internal/model/input/payin/refund.go b/server/internal/model/input/payin/refund.go new file mode 100644 index 0000000..5219ce5 --- /dev/null +++ b/server/internal/model/input/payin/refund.go @@ -0,0 +1,59 @@ +// Package payin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.5.3 +// @AutoGenerate Date 2023-04-15 15:59:58 +package payin + +import ( + "context" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + + "github.com/gogf/gf/v2/os/gtime" +) + +// PayRefundInp 订单退款 +type PayRefundInp struct { + OrderSn string `json:"orderSn" dc:"业务订单号"` + RefundMoney float64 `json:"refundMoney" dc:"退款金额"` + Reason string `json:"reason" dc:"申请退款原因"` + Remark string `json:"remark" dc:"退款备注"` +} + +func (in *PayRefundInp) Filter(ctx context.Context) (err error) { + return +} + +type PayRefundModel struct { + entity.PayRefund +} + +// PayRefundListInp 获取资产变动列表 +type PayRefundListInp struct { + form.PageReq + Id int64 `json:"id" dc:"变动ID"` + MemberId int64 `json:"memberId" dc:"管理员ID"` + AppId string `json:"appId" dc:"应用id"` + CreditType string `json:"creditType" dc:"变动类型"` + CreditGroup string `json:"creditGroup" dc:"变动的组别"` + Remark string `json:"remark" dc:"备注"` + Ip string `json:"ip" dc:"操作人IP"` + Status int `json:"status" dc:"状态"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` +} + +func (in *PayRefundListInp) Filter(ctx context.Context) (err error) { + return +} + +type PayRefundListModel struct { + entity.PayRefund +} + +// PayRefundExportModel 导出资产变动 +type PayRefundExportModel struct { + entity.PayRefund +} diff --git a/server/internal/model/input/servmsgin/auth.go b/server/internal/model/input/servmsgin/auth.go new file mode 100644 index 0000000..5dab41f --- /dev/null +++ b/server/internal/model/input/servmsgin/auth.go @@ -0,0 +1,16 @@ +// Package servmsgin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package servmsgin + +import "github.com/gogf/gf/v2/os/gtime" + +// AuthSummaryModel 授权信息 +type AuthSummaryModel struct { + EndAt *gtime.Time `json:"end_at" description:"授权过期时间"` + Online int `json:"online" description:"在线人数"` + // 请填充你的授权数据 + // ... +} diff --git a/server/internal/model/input/servmsgin/example.go b/server/internal/model/input/servmsgin/example.go new file mode 100644 index 0000000..e91054d --- /dev/null +++ b/server/internal/model/input/servmsgin/example.go @@ -0,0 +1,14 @@ +// Package servmsgin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package servmsgin + +import "github.com/gogf/gf/v2/os/gtime" + +// ExampleHelloModel 授权信息 +type ExampleHelloModel struct { + Desc string `json:"desc" description:"描述信息"` + Timestamp *gtime.Time `json:"timestamp" description:"服务器时间"` +} diff --git a/server/internal/model/input/sysin/addons.go b/server/internal/model/input/sysin/addons.go new file mode 100644 index 0000000..1ed038e --- /dev/null +++ b/server/internal/model/input/sysin/addons.go @@ -0,0 +1,64 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/text/gregex" + "hotgo/internal/library/addons" + "hotgo/internal/model/input/form" +) + +// AddonsListInp 获取列表 +type AddonsListInp struct { + form.PageReq + Name string `json:"name" dc:"插件名称"` + Group int `json:"group" dc:"分组"` + Status int `json:"status" dc:"安装状态"` +} + +type AddonsListModel struct { + addons.Skeleton + GroupName string `json:"groupName" dc:"分组名称"` + InstallVersion string `json:"installVersion" dc:"安装版本"` + InstallStatus int `json:"installStatus" dc:"安装状态"` + CanSave bool `json:"canSave" dc:"是否可以更新"` +} + +// AddonsBuildInp 提交生成 +type AddonsBuildInp struct { + addons.Skeleton + Extend []string `json:"extend" dc:"扩展功能"` +} + +func (in *AddonsBuildInp) Filter(ctx context.Context) (err error) { + if in.Name == "" { + err = gerror.New("插件名称不能为空") + return + } + + if !gregex.IsMatchString(`^[a-zA-Z]{1}\w{1,23}$`, in.Name) { + err = gerror.New("插件名称格式不正确,字母开头,只能包含字母、数字和下划线,长度在2~24之间") + return + } + return +} + +// AddonsInstallInp 安装模块 +type AddonsInstallInp struct { + addons.Skeleton +} + +// AddonsUpgradeInp 更新模块 +type AddonsUpgradeInp struct { + addons.Skeleton +} + +// AddonsUnInstallInp 卸载模块 +type AddonsUnInstallInp struct { + addons.Skeleton +} diff --git a/server/internal/model/input/sysin/addons_config.go b/server/internal/model/input/sysin/addons_config.go new file mode 100644 index 0000000..79b33ac --- /dev/null +++ b/server/internal/model/input/sysin/addons_config.go @@ -0,0 +1,26 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// UpdateAddonsConfigInp 更新指定插件的配置 +type UpdateAddonsConfigInp struct { + AddonName string `json:"addonName"` + Group string `json:"group"` + List g.Map `json:"list"` +} + +// GetAddonsConfigInp 获取指定插件的配置 +type GetAddonsConfigInp struct { + AddonName string `json:"addonName"` + Group string `json:"group"` +} +type GetAddonsConfigModel struct { + List g.Map `json:"list"` +} diff --git a/server/internal/model/input/sysin/attachment.go b/server/internal/model/input/sysin/attachment.go new file mode 100644 index 0000000..05f3335 --- /dev/null +++ b/server/internal/model/input/sysin/attachment.go @@ -0,0 +1,106 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/library/storager" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/validate" +) + +// AttachmentDeleteInp 删除附件 +type AttachmentDeleteInp struct { + Id interface{} `json:"id" v:"required#附件ID不能为空" dc:"附件ID"` +} + +type AttachmentDeleteModel struct{} + +// AttachmentViewInp 获取附件信息 +type AttachmentViewInp struct { + Id int64 `json:"id" v:"required#附件ID不能为空" dc:"附件ID"` +} + +type AttachmentViewModel struct { + entity.SysAttachment +} + +// AttachmentClearKindInp 清空上传类型 +type AttachmentClearKindInp struct { + Kind string `json:"kind" v:"required#上传类型不能为空" dc:"上传类型"` +} + +func (in *AttachmentClearKindInp) Filter(ctx context.Context) (err error) { + if !validate.InSlice(storager.KindSlice, in.Kind) { + err = gerror.New("上传类型是无效的") + return + } + return +} + +// AttachmentListInp 获取附件列表 +type AttachmentListInp struct { + form.PageReq + form.StatusReq + MemberId int64 `json:"member_id" dc:"用户ID"` + Name string `json:"name" dc:"文件名称"` + Drive string `json:"drive" dc:"驱动"` + Kind string `json:"kind" dc:"上传类型"` + UpdatedAt []*gtime.Time `json:"updatedAt" dc:"更新时间"` +} + +type AttachmentListModel struct { + entity.SysAttachment + SizeFormat string `json:"sizeFormat" dc:"大小"` +} + +// AttachmentChooserListInp 获取附件列表 +type AttachmentChooserListInp struct { + form.PageReq + Drive string `json:"drive" dc:"驱动"` + Kind string `json:"kind" dc:"上传类型"` + UpdatedAt []int64 `json:"updatedAt" dc:"更新时间"` +} + +type AttachmentChooserListModel struct { + entity.SysAttachment + SizeFormat string `json:"sizeFormat" dc:"大小"` +} + +// AttachmentClearInp 清空分类 +type AttachmentClearInp struct { + Kind string `json:"kind" dc:"上传类型"` +} + +// CheckMultipartInp 检查文件分片 +type CheckMultipartInp struct { + *storager.CheckMultipartParams +} + +type CheckMultipartModel struct { + *storager.CheckMultipartModel +} + +// UploadPartInp 上传分片 +type UploadPartInp struct { + *storager.UploadPartParams +} + +type UploadPartModel struct { + *storager.UploadPartModel +} + +// ImageTransferStorageInp 图片链接转存 +type ImageTransferStorageInp struct { + Url string `json:"url" v:"required#图片链接不能为空" dc:"图片链接"` +} + +type ImageTransferStorageModel struct { + *AttachmentListModel +} diff --git a/server/internal/model/input/sysin/blacklist.go b/server/internal/model/input/sysin/blacklist.go new file mode 100644 index 0000000..73fd4de --- /dev/null +++ b/server/internal/model/input/sysin/blacklist.go @@ -0,0 +1,81 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "hotgo/internal/consts" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/validate" +) + +// BlacklistEditInp 修改/新增黑名单数据 +type BlacklistEditInp struct { + entity.SysBlacklist +} + +type BlacklistEditModel struct{} + +// BlacklistDeleteInp 删除黑名单类型 +type BlacklistDeleteInp struct { + Id interface{} `json:"id" v:"required#黑名单ID不能为空" dc:"黑名单ID"` +} + +type BlacklistDeleteModel struct{} + +// BlacklistViewInp 获取信息 +type BlacklistViewInp struct { + Id int64 `json:"id" v:"required#黑名单ID不能为空" dc:"黑名单ID"` +} + +type BlacklistViewModel struct { + entity.SysBlacklist +} + +// BlacklistListInp 获取列表 +type BlacklistListInp struct { + form.PageReq + + form.StatusReq + Ip string `json:"ip" dc:"IP"` + Remark string `json:"remark" dc:"备注"` + CreatedAt []int64 `json:"createdAt" dc:"创建时间"` +} + +func (in *BlacklistListInp) Filter(ctx context.Context) (err error) { + return +} + +type BlacklistListModel struct { + entity.SysBlacklist +} + +// BlacklistStatusInp 更新状态 +type BlacklistStatusInp struct { + entity.SysBlacklist +} + +func (in *BlacklistStatusInp) Filter(ctx context.Context) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + return +} + +type BlacklistStatusModel struct{} diff --git a/server/internal/model/input/sysin/config.go b/server/internal/model/input/sysin/config.go new file mode 100644 index 0000000..d659641 --- /dev/null +++ b/server/internal/model/input/sysin/config.go @@ -0,0 +1,25 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "github.com/gogf/gf/v2/frame/g" +) + +// UpdateConfigInp 更新指定分组的配置 +type UpdateConfigInp struct { + Group string `json:"group"` + List g.Map `json:"list"` +} + +// GetConfigInp 获取指定分组的配置 +type GetConfigInp struct { + Group string `json:"group"` +} + +type GetConfigModel struct { + List g.Map `json:"list"` +} diff --git a/server/internal/model/input/sysin/cron.go b/server/internal/model/input/sysin/cron.go new file mode 100644 index 0000000..754895f --- /dev/null +++ b/server/internal/model/input/sysin/cron.go @@ -0,0 +1,75 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "hotgo/internal/library/cron" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" +) + +// CronMaxSortInp 最大排序 +type CronMaxSortInp struct { + Id int64 +} + +type CronMaxSortModel struct { + Sort int +} + +// CronEditInp 修改/新增 +type CronEditInp struct { + entity.SysCron +} +type CronEditModel struct{} + +// CronDeleteInp 删除 +type CronDeleteInp struct { + Id interface{} +} +type CronDeleteModel struct{} + +// CronViewInp 获取信息 +type CronViewInp struct { + Id int64 +} + +type CronViewModel struct { + entity.SysCron +} + +// CronListInp 获取列表 +type CronListInp struct { + form.PageReq + form.StatusReq + GroupId int64 `json:"groupId" description:"分组ID"` + Name string `json:"name" description:"任务名称"` +} + +type CronListModel struct { + entity.SysCron + GroupName string `json:"groupName"` +} + +// CronStatusInp 更新状态 +type CronStatusInp struct { + entity.SysCron +} +type CronStatusModel struct{} + +// OnlineExecInp 在线执行 +type OnlineExecInp struct { + entity.SysCron +} +type OnlineExecModel struct{} + +// DispatchLogInp 查看指定任务的调度日志 +type DispatchLogInp struct { + entity.SysCron +} +type DispatchLogModel struct { + *cron.Log +} diff --git a/server/internal/model/input/sysin/cron_group.go b/server/internal/model/input/sysin/cron_group.go new file mode 100644 index 0000000..e5e61d3 --- /dev/null +++ b/server/internal/model/input/sysin/cron_group.go @@ -0,0 +1,134 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "hotgo/internal/consts" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/validate" +) + +// CronGroupMaxSortInp 最大排序 +type CronGroupMaxSortInp struct { + Id int64 +} + +type CronGroupMaxSortModel struct { + Sort int +} + +// CronGroupEditInp 修改/新增字典数据 +type CronGroupEditInp struct { + entity.SysCronGroup +} + +func (in *CronGroupEditInp) Filter(ctx context.Context) (err error) { + if in.Name == "" { + err = gerror.New("名称不能为空") + return + } + + if in.Id > 0 && in.Id == in.Pid { + err = gerror.New("上级分组不能是自己") + return + } + return +} + +type CronGroupEditModel struct{} + +// CronGroupUpdateFields 修改数据字段过滤 +type CronGroupUpdateFields struct { + Id int64 `json:"id" description:"任务分组ID"` + Pid int64 `json:"pid" description:"父类字典类型ID"` + Name string `json:"name" description:"字典类型名称"` + Type string `json:"type" description:"字典类型"` + Sort int `json:"sort" description:"排序"` + Remark string `json:"remark" description:"备注"` + Status int `json:"status" description:"字典类型状态"` +} + +// CronGroupInsertFields 新增数据字段过滤 +type CronGroupInsertFields struct { + Pid int64 `json:"pid" description:"父类任务分组ID"` + Name string `json:"name" description:"分组名称"` + IsDefault int `json:"isDefault" description:"是否默认"` + Sort int `json:"sort" description:"排序"` + Remark string `json:"remark" description:"备注"` + Status int `json:"status" description:"分组状态"` +} + +// CronGroupDeleteInp 删除字典类型 +type CronGroupDeleteInp struct { + Id interface{} +} +type CronGroupDeleteModel struct{} + +// CronGroupViewInp 获取信息 +type CronGroupViewInp struct { + Id int64 +} + +type CronGroupViewModel struct { + entity.SysCronGroup +} + +// CronGroupListInp 获取列表 +type CronGroupListInp struct { + form.PageReq + form.StatusReq + Name string +} + +type CronGroupListModel struct { + entity.SysCronGroup + SupName string `json:"supName" description:"上级分组名称"` +} + +// CronGroupStatusInp 更新状态 +type CronGroupStatusInp struct { + entity.SysCronGroup +} + +func (in *CronGroupStatusInp) Filter(ctx context.Context) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + return +} + +type CronGroupStatusModel struct{} + +// CronGroupSelectInp 选项 +type CronGroupSelectInp struct { +} + +type CronGroupSelectModel struct { + List []*CronGroupTree `json:"list"` +} + +type CronGroupTree struct { + entity.SysCronGroup + Disabled bool `json:"disabled" dc:"是否禁用"` + Label string `json:"label" dc:"标签"` + Value int64 `json:"value" dc:"键值"` + Key int64 `json:"key" dc:"键名"` + Children []*CronGroupTree `json:"children" dc:"子级"` +} diff --git a/server/internal/model/input/sysin/curd_demo.go b/server/internal/model/input/sysin/curd_demo.go new file mode 100644 index 0000000..9ea8076 --- /dev/null +++ b/server/internal/model/input/sysin/curd_demo.go @@ -0,0 +1,201 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2025 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.18.6 +package sysin + +import ( + "context" + "hotgo/internal/consts" + "hotgo/internal/library/hgorm/hook" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/validate" + + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// CurdDemoUpdateFields 修改CURD列表字段过滤 +type CurdDemoUpdateFields struct { + Title string `json:"title" dc:"标题"` + Description string `json:"description" dc:"描述"` + Content string `json:"content" dc:"内容"` + Image string `json:"image" dc:"单图"` + Attachfile string `json:"attachfile" dc:"附件"` + CityId int64 `json:"cityId" dc:"所在城市"` + Switch int `json:"switch" dc:"显示开关"` + Sort int `json:"sort" dc:"排序"` + UpdatedBy int64 `json:"updatedBy" dc:"更新者"` +} + +// CurdDemoInsertFields 新增CURD列表字段过滤 +type CurdDemoInsertFields struct { + Title string `json:"title" dc:"标题"` + Description string `json:"description" dc:"描述"` + Content string `json:"content" dc:"内容"` + Image string `json:"image" dc:"单图"` + Attachfile string `json:"attachfile" dc:"附件"` + CityId int64 `json:"cityId" dc:"所在城市"` + Switch int `json:"switch" dc:"显示开关"` + Sort int `json:"sort" dc:"排序"` + CreatedBy int64 `json:"createdBy" dc:"创建者"` +} + +// CurdDemoEditInp 修改/新增CURD列表 +type CurdDemoEditInp struct { + entity.SysGenCurdDemo +} + +func (in *CurdDemoEditInp) Filter(ctx context.Context) (err error) { + // 验证标题 + if err := g.Validator().Rules("required").Data(in.Title).Messages("标题不能为空").Run(ctx); err != nil { + return err.Current() + } + // 验证描述 + if err := g.Validator().Rules("required").Data(in.Description).Messages("描述不能为空").Run(ctx); err != nil { + return err.Current() + } + // 验证内容 + if err := g.Validator().Rules("required").Data(in.Content).Messages("内容不能为空").Run(ctx); err != nil { + return err.Current() + } + // 验证排序 + if err := g.Validator().Rules("required").Data(in.Sort).Messages("排序不能为空").Run(ctx); err != nil { + return err.Current() + } + return +} + +type CurdDemoEditModel struct{} + +// CurdDemoDeleteInp 删除CURD列表 +type CurdDemoDeleteInp struct { + Id interface{} `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *CurdDemoDeleteInp) Filter(ctx context.Context) (err error) { + return +} + +type CurdDemoDeleteModel struct{} + +// CurdDemoViewInp 获取指定CURD列表信息 +type CurdDemoViewInp struct { + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *CurdDemoViewInp) Filter(ctx context.Context) (err error) { + return +} + +type CurdDemoViewModel struct { + entity.SysGenCurdDemo + CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"` + UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者摘要信息"` + DeletedBySumma *hook.MemberSumma `json:"deletedBySumma" dc:"删除者摘要信息"` +} + +// CurdDemoListInp 获取CURD列表列表 +type CurdDemoListInp struct { + form.PageReq + Id int64 `json:"id" dc:"ID"` + Title string `json:"title" dc:"标题"` + Description string `json:"description" dc:"描述"` + CreatedBy string `json:"createdBy" dc:"创建者"` + DeletedBy string `json:"deletedBy" dc:"删除者"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` + TestCategoryName string `json:"testCategoryName" dc:"关联分类"` +} + +func (in *CurdDemoListInp) Filter(ctx context.Context) (err error) { + return +} + +type CurdDemoListModel struct { + Id int64 `json:"id" dc:"ID"` + Title string `json:"title" dc:"标题"` + Description string `json:"description" dc:"描述"` + Image string `json:"image" dc:"单图"` + Attachfile string `json:"attachfile" dc:"附件"` + Switch int `json:"switch" dc:"显示开关"` + Sort int `json:"sort" dc:"排序"` + CreatedBy int64 `json:"createdBy" dc:"创建者"` + CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"` + UpdatedBy int64 `json:"updatedBy" dc:"更新者"` + UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者摘要信息"` + DeletedBy int64 `json:"deletedBy" dc:"删除者"` + DeletedBySumma *hook.MemberSumma `json:"deletedBySumma" dc:"删除者摘要信息"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"` + TestCategoryName string `json:"testCategoryName" dc:"关联分类"` +} + +// CurdDemoExportModel 导出CURD列表 +type CurdDemoExportModel struct { + Id int64 `json:"id" dc:"ID"` + Title string `json:"title" dc:"标题"` + Description string `json:"description" dc:"描述"` + Image string `json:"image" dc:"单图"` + Attachfile string `json:"attachfile" dc:"附件"` + CityId int64 `json:"cityId" dc:"所在城市"` + Switch int `json:"switch" dc:"显示开关"` + Sort int `json:"sort" dc:"排序"` + CreatedBy int64 `json:"createdBy" dc:"创建者"` + UpdatedBy int64 `json:"updatedBy" dc:"更新者"` + DeletedBy int64 `json:"deletedBy" dc:"删除者"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + TestCategoryName string `json:"testCategoryName" dc:"关联分类"` +} + +// CurdDemoMaxSortInp 获取CURD列表最大排序 +type CurdDemoMaxSortInp struct{} + +func (in *CurdDemoMaxSortInp) Filter(ctx context.Context) (err error) { + return +} + +type CurdDemoMaxSortModel struct { + Sort int `json:"sort" description:"排序"` +} + +// CurdDemoStatusInp 更新CURD列表状态 +type CurdDemoStatusInp struct { + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` + Status int `json:"status" dc:"状态"` +} + +func (in *CurdDemoStatusInp) Filter(ctx context.Context) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + return +} + +type CurdDemoStatusModel struct{} + +// CurdDemoSwitchInp 更新CURD列表开关状态 +type CurdDemoSwitchInp struct { + form.SwitchReq + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *CurdDemoSwitchInp) Filter(ctx context.Context) (err error) { + return +} + +type CurdDemoSwitchModel struct{} diff --git a/server/internal/model/input/sysin/dict_data.go b/server/internal/model/input/sysin/dict_data.go new file mode 100644 index 0000000..5a2e833 --- /dev/null +++ b/server/internal/model/input/sysin/dict_data.go @@ -0,0 +1,92 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "hotgo/internal/model" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" +) + +// DictDataEditInp 修改/新增字典数据 +type DictDataEditInp struct { + entity.SysDictData + TypeID int64 `json:"typeID" dc:"字典类型ID"` +} + +func (in *DictDataEditInp) Filter(ctx context.Context) (err error) { + if in.Label == "" { + err = gerror.New("字典标签不能为空") + return + } + + if in.Id > 0 && in.TypeID <= 0 { + err = gerror.New("字典类型不能为空") + return + } + return +} + +type DictDataEditModel struct{} + +// DictDataUpdateFields 修改数据字段过滤 +type DictDataUpdateFields struct { + Id int64 `json:"id" description:"字典数据ID"` + Label string `json:"label" description:"字典标签"` + Value string `json:"value" description:"字典键值"` + ValueType string `json:"valueType" description:"键值数据类型:string,int,uint,bool,datetime,date"` + Type string `json:"type" description:"字典类型"` + ListClass string `json:"listClass" description:"表格回显样式"` + IsDefault int `json:"isDefault" description:"是否为系统默认"` + Sort int `json:"sort" description:"字典排序"` + Remark string `json:"remark" description:"备注"` + Status int `json:"status" description:"状态"` +} + +// DictDataInsertFields 新增数据字段过滤 +type DictDataInsertFields struct { + Label string `json:"label" description:"字典标签"` + Value string `json:"value" description:"字典键值"` + ValueType string `json:"valueType" description:"键值数据类型:string,int,uint,bool,datetime,date"` + Type string `json:"type" description:"字典类型"` + ListClass string `json:"listClass" description:"表格回显样式"` + IsDefault int `json:"isDefault" description:"是否为系统默认"` + Sort int `json:"sort" description:"字典排序"` + Remark string `json:"remark" description:"备注"` + Status int `json:"status" description:"状态"` +} + +// DictDataDeleteInp 删除字典数据 +type DictDataDeleteInp struct { + Id interface{} `json:"id" v:"required#字典数据ID不能为空" dc:"字典数据ID"` +} + +type DictDataDeleteModel struct{} + +// DictDataListInp 获取列表 +type DictDataListInp struct { + form.PageReq + form.StatusReq + TypeID int64 `json:"typeId" v:"required#字典类型ID不能为空" dc:"字典类型ID"` + Type string `json:"type" dc:"字典类型"` + Label string `json:"label" dc:"字典标签"` + Value string `json:"value" dc:"字典键值"` +} + +type DictDataListModel struct { + TypeID int64 `json:"typeId"` + Key string `json:"key"` + entity.SysDictData +} + +// DataSelectInp 获取指定字典选项 +type DataSelectInp struct { + Type string `in:"path" v:"required#字典类型不能为空" dc:"字典类型"` +} + +type DataSelectModel []*model.Option diff --git a/server/internal/model/input/sysin/dict_type.go b/server/internal/model/input/sysin/dict_type.go new file mode 100644 index 0000000..4e54da5 --- /dev/null +++ b/server/internal/model/input/sysin/dict_type.go @@ -0,0 +1,76 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "hotgo/internal/model/entity" +) + +// DictTypeEditInp 修改/新增字典数据 +type DictTypeEditInp struct { + entity.SysDictType +} + +func (in *DictTypeEditInp) Filter(ctx context.Context) (err error) { + if in.Name == "" { + err = gerror.New("名称不能为空") + return + } + + if in.Id > 0 && in.Id == in.Pid { + err = gerror.New("上级字典不能是自己") + return + } + return +} + +type DictTypeEditModel struct{} + +// DictTypeUpdateFields 修改数据字段过滤 +type DictTypeUpdateFields struct { + Id int64 `json:"id" description:"字典类型ID"` + Pid int64 `json:"pid" description:"父类字典类型ID"` + Name string `json:"name" description:"字典类型名称"` + Type string `json:"type" description:"字典类型"` + Sort int `json:"sort" description:"排序"` + Remark string `json:"remark" description:"备注"` + Status int `json:"status" description:"字典类型状态"` +} + +// DictTypeInsertFields 新增数据字段过滤 +type DictTypeInsertFields struct { + Pid int64 `json:"pid" description:"父类字典类型ID"` + Name string `json:"name" description:"字典类型名称"` + Type string `json:"type" description:"字典类型"` + Sort int `json:"sort" description:"排序"` + Remark string `json:"remark" description:"备注"` + Status int `json:"status" description:"字典类型状态"` +} + +// DictTypeDeleteInp 删除字典类型 +type DictTypeDeleteInp struct { + Id interface{} `json:"id" v:"required#字典类型ID不能为空" dc:"字典类型ID"` +} + +type DictTypeDeleteModel struct{} + +// DictTreeSelectInp 获取类型关系树选项 +type DictTreeSelectInp struct { +} + +type DictTreeSelectModel []g.Map + +type DictTypeTree struct { + entity.SysDictType + Disabled bool `json:"disabled" dc:"是否禁用"` + Label string `json:"label" dc:"标签"` + Value int64 `json:"value" dc:"键值"` + Key int64 `json:"key" dc:"键名"` + Children []*DictTypeTree `json:"children" dc:"子级"` +} diff --git a/server/internal/model/input/sysin/ems_log.go b/server/internal/model/input/sysin/ems_log.go new file mode 100644 index 0000000..83bd017 --- /dev/null +++ b/server/internal/model/input/sysin/ems_log.go @@ -0,0 +1,72 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "github.com/gogf/gf/v2/frame/g" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" +) + +// EmsLogEditInp 修改/新增数据 +type EmsLogEditInp struct { + entity.SysEmsLog +} + +type EmsLogEditModel struct{} + +// EmsLogDeleteInp 删除 +type EmsLogDeleteInp struct { + Id interface{} `json:"id" v:"required#邮件记录ID不能为空" dc:"邮件记录ID"` +} + +type EmsLogDeleteModel struct{} + +// EmsLogViewInp 获取信息 +type EmsLogViewInp struct { + Id int64 `json:"id" v:"required#邮件记录ID不能为空" dc:"邮件记录ID"` +} + +type EmsLogViewModel struct { + entity.SysEmsLog +} + +// EmsLogListInp 获取列表 +type EmsLogListInp struct { + form.PageReq + + form.StatusReq + Title string `json:"title"` + Content string `json:"content"` +} + +type EmsLogListModel struct { + entity.SysEmsLog +} + +// EmsLogStatusInp 更新状态 +type EmsLogStatusInp struct { + entity.SysSmsLog +} + +type EmsLogStatusModel struct{} + +// SendEmsInp 发送邮件 +type SendEmsInp struct { + Event string `json:"event" v:"required#邮件事件不能为空" description:"事件"` + Email string `json:"email" v:"required#邮箱地址不能为空" description:"邮箱地址"` + Code string `json:"code" description:"验证码或短信内容"` + Content string `json:"content" description:"邮件内容"` + Template string `json:"-" description:"发信模板"` + TplData g.Map `json:"-" description:"模板变量"` +} + +// VerifyEmsCodeInp 效验验证码 +type VerifyEmsCodeInp struct { + Event string `json:"event" v:"required#邮件事件不能为空" description:"事件"` + Email string `json:"email" v:"required#邮箱地址不能为空" description:"邮箱地址"` + Code string `json:"code" description:"验证码"` +} diff --git a/server/internal/model/input/sysin/gen_codes.go b/server/internal/model/input/sysin/gen_codes.go new file mode 100644 index 0000000..db60e9a --- /dev/null +++ b/server/internal/model/input/sysin/gen_codes.go @@ -0,0 +1,235 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/text/gregex" + "github.com/gogf/gf/v2/util/gconv" + "hotgo/internal/consts" + "hotgo/internal/model" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" +) + +// GenCodesMaxSortInp 最大排序 +type GenCodesMaxSortInp struct { + Id int64 `json:"id" dc:"生成代码ID"` +} + +type GenCodesMaxSortModel struct { + Sort int `json:"sort" dc:"排序"` +} + +// GenCodesEditInp 修改/新增数据 +type GenCodesEditInp struct { + entity.SysGenCodes +} + +func (in *GenCodesEditInp) Filter(ctx context.Context) (err error) { + return genFilter(ctx, in.SysGenCodes) +} + +type GenCodesEditModel struct { + entity.SysGenCodes +} + +// GenCodesDeleteInp 删除 +type GenCodesDeleteInp struct { + Id interface{} `json:"id" v:"required#生成代码ID不能为空" dc:"生成代码ID"` +} + +type GenCodesDeleteModel struct{} + +// GenCodesViewInp 获取信息 +type GenCodesViewInp struct { + Id int64 `json:"id" v:"required#生成代码ID不能为空" dc:"生成代码ID"` +} + +type GenCodesViewModel struct { + entity.SysGenCodes +} + +// GenCodesListInp 获取列表 +type GenCodesListInp struct { + form.PageReq + form.StatusReq + GenType int `json:"genType" dc:"生成类型"` + VarName string `json:"varName" dc:"实体"` +} + +type GenCodesListModel struct { + entity.SysGenCodes + GenTemplateGroup string `json:"genTemplateGroup" dc:"生成模板组名"` +} + +// GenCodesStatusInp 更新状态 +type GenCodesStatusInp struct { + Id int64 `json:"id" description:"生成ID"` + Status int `json:"status" description:"生成状态"` +} +type GenCodesStatusModel struct{} + +// GenCodesSelectsInp 选项 +type GenCodesSelectsInp struct { +} + +type GenCodesSelectsModel struct { + GenType GenTypeSelects `json:"genType" dc:"生成类型"` + Db form.Selects `json:"db" dc:"数据库选项"` + Status form.Selects `json:"status" dc:"生成状态"` + LinkMode form.Selects `json:"linkMode" dc:"关联表方式"` + BuildMeth form.Selects `json:"buildMeth" dc:"生成方式"` + // 字段表格选项 + FormMode form.Selects `json:"formMode" dc:"表单组件"` + FormRole form.Selects `json:"formRole" dc:"表单验证"` + DictMode []*DictTypeTree `json:"dictMode" dc:"字典类型"` + WhereMode form.Selects `json:"whereMode" dc:"查询条件"` + Addons form.Selects `json:"addons" dc:"插件选项"` + TableAlign form.Selects `json:"tableAlign" dc:"表格排列方式"` + TreeStyleType []*model.Option `json:"treeStyleType" dc:"树表样式选项"` +} + +type GenTypeSelects []*GenTypeSelect + +type GenTypeSelect struct { + Value int `json:"value"` + Label string `json:"label"` + Name string `json:"name"` + Templates GenTemplateSelects `json:"templates"` +} + +type GenTemplateSelects []*GenTemplateSelect + +type GenTemplateSelect struct { + Value interface{} `json:"value"` + Label string `json:"label"` + Name string `json:"name"` + IsAddon bool `json:"isAddon"` +} + +func (p GenTemplateSelects) Len() int { + return len(p) +} + +func (p GenTemplateSelects) Swap(i, j int) { + p[i], p[j] = p[j], p[i] +} + +func (p GenTemplateSelects) Less(i, j int) bool { + return gconv.Int64(p[j].Value) > gconv.Int64(p[i].Value) +} + +func (p GenTypeSelects) Len() int { + return len(p) +} + +func (p GenTypeSelects) Swap(i, j int) { + p[i], p[j] = p[j], p[i] +} + +func (p GenTypeSelects) Less(i, j int) bool { + return gconv.Int64(p[j].Value) > gconv.Int64(p[i].Value) +} + +// GenCodesTableSelectInp 数据库表选项 +type GenCodesTableSelectInp struct { + Name string `json:"name" dc:"数据库配置名称"` +} + +type GenCodesTableSelectModel struct { + Value string `json:"value"` + Label string `json:"label"` + Name string `json:"name"` + DaoName string `json:"daoName" dc:"orm模型名称"` + DefVarName string `json:"defVarName" dc:"默认实体名称"` + DefAlias string `json:"defAlias" dc:"默认关联表别名"` + DefTableComment string `json:"defTableComment" dc:"默认菜单名称"` +} + +// GenCodesColumnSelectInp 表字段选项 +type GenCodesColumnSelectInp struct { + Name string `json:"name" dc:"数据库配置名称"` + Table string `json:"table" dc:"表名称"` +} + +type GenCodesColumnSelectModel struct { + Value string `json:"value"` + Label string `json:"label"` + Name string `json:"name"` +} + +// GenCodesColumnListInp 表字段列表 +type GenCodesColumnListInp struct { + Name string `json:"name" dc:"数据库配置名称"` + Table string `json:"table" dc:"表名称"` + IsLink int64 `json:"isLink" dc:"是否是关联表"` + Alias string `json:"alias" dc:"关联表别名"` +} + +type GenCodesColumnListModel struct { + model.GenCodesColumn +} + +// GenCodesPreviewInp 生成预览 +type GenCodesPreviewInp struct { + entity.SysGenCodes +} + +func (in *GenCodesPreviewInp) Filter(ctx context.Context) (err error) { + return genFilter(ctx, in.SysGenCodes) +} + +// GenFile 生成文件配置 +type GenFile struct { + Content string `json:"content" dc:"页面内容"` + Path string `json:"path" dc:"生成路径"` + Meth int `json:"meth" dc:"生成方式"` + Required bool `json:"required" dc:"是否是必要构建文件"` +} + +type GenCodesPreviewModel struct { + Config *model.GenerateConfig `json:"config"` + Views map[string]*GenFile `json:"views" dc:"页面"` +} + +// GenCodesBuildInp 提交生成 +type GenCodesBuildInp struct { + entity.SysGenCodes +} + +func (in *GenCodesBuildInp) Filter(ctx context.Context) (err error) { + return genFilter(ctx, in.SysGenCodes) +} + +func genFilter(ctx context.Context, in entity.SysGenCodes) (err error) { + if in.VarName == "" { + err = gerror.New("实体命名不能为空") + return + } + + if !gregex.IsMatchString(`^[a-zA-Z]{1}\w{1,23}$`, in.VarName) { + err = gerror.New("实体命名格式不正确,字母开头,只能包含字母、数字和下划线,长度在2~24之间") + return + } + + if in.GenType == consts.GenCodesTypeCurd || in.GenType == consts.GenCodesTypeTree { + if in.DbName == "" { + err = gerror.New("数据库不能为空") + return + } + if in.TableName == "" { + err = gerror.New("数据库表不能为空") + return + } + if in.TableComment == "" { + err = gerror.New("菜单名称不能为空") + return + } + } + return +} diff --git a/server/internal/model/input/sysin/log.go b/server/internal/model/input/sysin/log.go new file mode 100644 index 0000000..6dd318e --- /dev/null +++ b/server/internal/model/input/sysin/log.go @@ -0,0 +1,58 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" +) + +// LogListInp 获取菜单列表 +type LogListInp struct { + form.PageReq + form.StatusReq + ReqId string `json:"reqId" dc:"对外ID"` + Module string `json:"module" dc:"应用端口"` + MemberId int `json:"memberId" dc:"用户ID"` + TakeUpTime string `json:"takeUpTime" dc:"请求耗时"` + Method string `json:"method" dc:"请求方式"` + Url string `json:"url" dc:"请求路径"` + Ip string `json:"ip" dc:"访问IP"` + ErrorCode string `json:"errorCode" dc:"状态码"` + CreatedAt []int64 `json:"createdAt" dc:"创建时间"` + Keyword string `json:"keyword" dc:"关键词"` + ComplexMemberId []string `json:"complexMemberId" dc:"操作人筛选"` +} + +type LogListModel struct { + entity.SysLog + MemberName string `json:"memberName"` + Region string `json:"region"` + CityLabel string `json:"cityLabel" dc:"城市标签"` + Tags string `json:"tags" dc:"接口所属的标签,用于接口分类"` + Summary string `json:"summary" dc:"接口/参数概要描述"` + Description string `json:"description" dc:"接口/参数详细描述"` +} + +// LogViewInp 获取信息 +type LogViewInp struct { + Id string `json:"id" v:"required#日志ID不能为空" description:"日志ID"` +} + +type LogViewModel struct { + entity.SysLog + CityLabel string `json:"cityLabel" dc:"城市标签"` + Tags string `json:"tags" dc:"接口所属的标签,用于接口分类"` + Summary string `json:"summary" dc:"接口/参数概要描述"` + Description string `json:"description" dc:"接口/参数详细描述"` +} + +// LogDeleteInp 删除 +type LogDeleteInp struct { + Id interface{} `json:"id" v:"required#日志ID不能为空" description:"日志ID"` +} + +type LogDeleteModel struct{} diff --git a/server/internal/model/input/sysin/login_log.go b/server/internal/model/input/sysin/login_log.go new file mode 100644 index 0000000..3ce7444 --- /dev/null +++ b/server/internal/model/input/sysin/login_log.go @@ -0,0 +1,79 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/adminin" + "hotgo/internal/model/input/form" +) + +// LoginLogDeleteInp 删除登录日志 +type LoginLogDeleteInp struct { + Id interface{} `json:"id" v:"required#日志ID不能为空" dc:"日志ID"` +} + +type LoginLogDeleteModel struct{} + +// LoginLogViewInp 获取指定登录日志信息 +type LoginLogViewInp struct { + Id int64 `json:"id" v:"required#日志ID不能为空" dc:"日志ID"` +} + +type LoginLogViewModel struct { + entity.SysLoginLog +} + +// LoginLogListInp 获取登录日志列表 +type LoginLogListInp struct { + form.PageReq + Username string `json:"username" dc:"用户名"` + Status int `json:"status" dc:"状态"` + LoginAt []*gtime.Time `json:"loginAt" dc:"登录时间"` + LoginIp string `json:"loginIp" dc:"登录IP"` +} + +type LoginLogListModel struct { + entity.SysLoginLog + Os string `json:"os"` + Browser string `json:"browser"` + CityLabel string `json:"cityLabel"` + SysLogId gdb.Value `json:"sysLogId"` +} + +func (in *LoginLogListInp) Filter(ctx context.Context) (err error) { + return +} + +// LoginLogExportModel 导出登录日志 +type LoginLogExportModel struct { + Id int64 `json:"id" orm:"id" description:"日志ID"` + ReqId string `json:"reqId" orm:"req_id" description:"请求ID"` + MemberId int64 `json:"memberId" orm:"member_id" description:"用户ID"` + Username string `json:"username" orm:"username" description:"用户名"` + Response *gjson.Json `json:"response" orm:"response" description:"响应数据"` + LoginAt *gtime.Time `json:"loginAt" orm:"login_at" description:"登录时间"` + LoginIp string `json:"loginIp" orm:"login_ip" description:"登录IP"` + ProvinceId int64 `json:"provinceId" orm:"province_id" description:"省编码"` + CityId int64 `json:"cityId" orm:"city_id" description:"市编码"` + UserAgent string `json:"userAgent" orm:"user_agent" description:"UA信息"` + ErrMsg string `json:"errMsg" orm:"err_msg" description:"错误提示"` + Status int `json:"status" orm:"status" description:"状态"` + CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"` + Os string `json:"os"` + Browser string `json:"browser"` +} + +// LoginLogPushInp 解推送登录日志 +type LoginLogPushInp struct { + Response *adminin.LoginModel + Err error +} diff --git a/server/internal/model/input/sysin/normal_tree_demo.go b/server/internal/model/input/sysin/normal_tree_demo.go new file mode 100644 index 0000000..dbb21d0 --- /dev/null +++ b/server/internal/model/input/sysin/normal_tree_demo.go @@ -0,0 +1,145 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.15.7 +package sysin + +import ( + "context" + "hotgo/internal/library/hgorm/hook" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/tree" + + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// NormalTreeDemoUpdateFields 修改普通树表字段过滤 +type NormalTreeDemoUpdateFields struct { + Title string `json:"title" dc:"标题"` + Pid int64 `json:"pid" dc:"上级"` + Level int `json:"level" dc:"关系树级别"` + Tree string `json:"tree" dc:"关系树"` + CategoryId int64 `json:"categoryId" dc:"测试分类"` + Description string `json:"description" dc:"描述"` + Sort int `json:"sort" dc:"排序"` + Status int `json:"status" dc:"状态"` + UpdatedBy int64 `json:"updatedBy" dc:"更新者"` +} + +// NormalTreeDemoInsertFields 新增普通树表字段过滤 +type NormalTreeDemoInsertFields struct { + Title string `json:"title" dc:"标题"` + Pid int64 `json:"pid" dc:"上级"` + Level int `json:"level" dc:"关系树级别"` + Tree string `json:"tree" dc:"关系树"` + CategoryId int64 `json:"categoryId" dc:"测试分类"` + Description string `json:"description" dc:"描述"` + Sort int `json:"sort" dc:"排序"` + Status int `json:"status" dc:"状态"` + CreatedBy int64 `json:"createdBy" dc:"创建者"` +} + +// NormalTreeDemoEditInp 修改/新增普通树表 +type NormalTreeDemoEditInp struct { + entity.SysGenTreeDemo +} + +func (in *NormalTreeDemoEditInp) Filter(ctx context.Context) (err error) { + // 验证标题 + if err := g.Validator().Rules("required").Data(in.Title).Messages("标题不能为空").Run(ctx); err != nil { + return err.Current() + } + + return +} + +type NormalTreeDemoEditModel struct{} + +// NormalTreeDemoDeleteInp 删除普通树表 +type NormalTreeDemoDeleteInp struct { + Id interface{} `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *NormalTreeDemoDeleteInp) Filter(ctx context.Context) (err error) { + return +} + +type NormalTreeDemoDeleteModel struct{} + +// NormalTreeDemoViewInp 获取指定普通树表信息 +type NormalTreeDemoViewInp struct { + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *NormalTreeDemoViewInp) Filter(ctx context.Context) (err error) { + return +} + +type NormalTreeDemoViewModel struct { + entity.SysGenTreeDemo + CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"` +} + +// NormalTreeDemoListInp 获取普通树表列表 +type NormalTreeDemoListInp struct { + form.PageReq + Title string `json:"title" dc:"标题"` + Pid int64 `json:"pid" dc:"上级"` + CategoryId int64 `json:"categoryId" dc:"测试分类"` + Status int `json:"status" dc:"状态"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` +} + +func (in *NormalTreeDemoListInp) Filter(ctx context.Context) (err error) { + return +} + +type NormalTreeDemoListModel struct { + Title string `json:"title" dc:"标题"` + Id int64 `json:"id" dc:"ID"` + Pid int64 `json:"pid" dc:"上级"` + CategoryId int64 `json:"categoryId" dc:"测试分类"` + Description string `json:"description" dc:"描述"` + Status int `json:"status" dc:"状态"` + CreatedBy int64 `json:"createdBy" dc:"创建者"` + CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` +} + +// NormalTreeDemoMaxSortInp 获取普通树表最大排序 +type NormalTreeDemoMaxSortInp struct{} + +func (in *NormalTreeDemoMaxSortInp) Filter(ctx context.Context) (err error) { + return +} + +type NormalTreeDemoMaxSortModel struct { + Sort int `json:"sort" description:"排序"` +} + +// NormalTreeDemoTreeOption 关系树选项 +type NormalTreeDemoTreeOption struct { + Title string `json:"title" dc:"标题"` + Id int64 `json:"id" dc:"ID"` + Pid int64 `json:"pid" dc:"上级"` + Children []tree.Node `json:"children" dc:"子节点"` +} + +// ID 获取节点ID +func (t *NormalTreeDemoTreeOption) ID() int64 { + return t.Id +} + +// PID 获取父级节点ID +func (t *NormalTreeDemoTreeOption) PID() int64 { + return t.Pid +} + +// SetChildren 设置子节点数据 +func (t *NormalTreeDemoTreeOption) SetChildren(children []tree.Node) { + t.Children = children +} diff --git a/server/internal/model/input/sysin/option_tree_demo.go b/server/internal/model/input/sysin/option_tree_demo.go new file mode 100644 index 0000000..eb09982 --- /dev/null +++ b/server/internal/model/input/sysin/option_tree_demo.go @@ -0,0 +1,144 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2025 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.17.8 +package sysin + +import ( + "context" + "hotgo/internal/library/hgorm/hook" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/tree" + + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// OptionTreeDemoUpdateFields 修改选项树表字段过滤 +type OptionTreeDemoUpdateFields struct { + Title string `json:"title" dc:"标题"` + Pid int64 `json:"pid" dc:"上级"` + Level int `json:"level" dc:"关系树级别"` + Tree string `json:"tree" dc:"关系树"` + CategoryId int64 `json:"categoryId" dc:"测试分类"` + Description string `json:"description" dc:"描述"` + Sort int `json:"sort" dc:"排序"` + Status int `json:"status" dc:"状态"` + UpdatedBy int64 `json:"updatedBy" dc:"更新者"` +} + +// OptionTreeDemoInsertFields 新增选项树表字段过滤 +type OptionTreeDemoInsertFields struct { + Title string `json:"title" dc:"标题"` + Pid int64 `json:"pid" dc:"上级"` + Level int `json:"level" dc:"关系树级别"` + Tree string `json:"tree" dc:"关系树"` + CategoryId int64 `json:"categoryId" dc:"测试分类"` + Description string `json:"description" dc:"描述"` + Sort int `json:"sort" dc:"排序"` + Status int `json:"status" dc:"状态"` + CreatedBy int64 `json:"createdBy" dc:"创建者"` +} + +// OptionTreeDemoEditInp 修改/新增选项树表 +type OptionTreeDemoEditInp struct { + entity.SysGenTreeDemo +} + +func (in *OptionTreeDemoEditInp) Filter(ctx context.Context) (err error) { + // 验证标题 + if err := g.Validator().Rules("required").Data(in.Title).Messages("标题不能为空").Run(ctx); err != nil { + return err.Current() + } + return +} + +type OptionTreeDemoEditModel struct{} + +// OptionTreeDemoDeleteInp 删除选项树表 +type OptionTreeDemoDeleteInp struct { + Id interface{} `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *OptionTreeDemoDeleteInp) Filter(ctx context.Context) (err error) { + return +} + +type OptionTreeDemoDeleteModel struct{} + +// OptionTreeDemoViewInp 获取指定选项树表信息 +type OptionTreeDemoViewInp struct { + Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"` +} + +func (in *OptionTreeDemoViewInp) Filter(ctx context.Context) (err error) { + return +} + +type OptionTreeDemoViewModel struct { + entity.SysGenTreeDemo + CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"` +} + +// OptionTreeDemoListInp 获取选项树表列表 +type OptionTreeDemoListInp struct { + form.PageReq + Title string `json:"title" dc:"标题"` + Pid int64 `json:"pid" dc:"上级"` + CategoryId int64 `json:"categoryId" dc:"测试分类"` + Status int `json:"status" dc:"状态"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` +} + +func (in *OptionTreeDemoListInp) Filter(ctx context.Context) (err error) { + return +} + +type OptionTreeDemoListModel struct { + Title string `json:"title" dc:"标题"` + Id int64 `json:"id" dc:"ID"` + Pid int64 `json:"pid" dc:"上级"` + CategoryId int64 `json:"categoryId" dc:"测试分类"` + Status int `json:"status" dc:"状态"` + CreatedBy int64 `json:"createdBy" dc:"创建者"` + CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` +} + +// OptionTreeDemoMaxSortInp 获取选项树表最大排序 +type OptionTreeDemoMaxSortInp struct{} + +func (in *OptionTreeDemoMaxSortInp) Filter(ctx context.Context) (err error) { + return +} + +type OptionTreeDemoMaxSortModel struct { + Sort int `json:"sort" description:"排序"` +} + +// OptionTreeDemoTreeOption 关系树选项 +type OptionTreeDemoTreeOption struct { + Title string `json:"title" dc:"标题"` + Id int64 `json:"id" dc:"ID"` + Pid int64 `json:"pid" dc:"上级"` + + Children []tree.Node `json:"children" dc:"子节点"` +} + +// ID 获取节点ID +func (t *OptionTreeDemoTreeOption) ID() int64 { + return t.Id +} + +// PID 获取父级节点ID +func (t *OptionTreeDemoTreeOption) PID() int64 { + return t.Pid +} + +// SetChildren 设置子节点数据 +func (t *OptionTreeDemoTreeOption) SetChildren(children []tree.Node) { + t.Children = children +} diff --git a/server/internal/model/input/sysin/provinces.go b/server/internal/model/input/sysin/provinces.go new file mode 100644 index 0000000..d8f0bc5 --- /dev/null +++ b/server/internal/model/input/sysin/provinces.go @@ -0,0 +1,182 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "hotgo/internal/consts" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/validate" +) + +// ProvincesMaxSortInp 最大排序 +type ProvincesMaxSortInp struct { +} + +type ProvincesMaxSortModel struct { + Sort int `json:"sort" dc:"排序"` +} + +// ProvincesEditInp 修改/新增字典数据 +type ProvincesEditInp struct { + entity.SysProvinces +} + +func (in *ProvincesEditInp) Filter(ctx context.Context) (err error) { + if in.Title == "" { + err = gerror.New("标题不能为空") + return + } + + if in.Id <= 0 { + err = gerror.New("地区Id必须大于0") + return + } + + return +} + +type ProvincesEditModel struct{} + +// ProvincesUpdateFields 修改数据字段过滤 +type ProvincesUpdateFields struct { + Id int64 `json:"id" description:"省市区ID"` + Title string `json:"title" description:"栏目名称"` + Pinyin string `json:"pinyin" description:"拼音"` + Lng string `json:"lng" description:"经度"` + Lat string `json:"lat" description:"纬度"` + Pid int64 `json:"pid" description:"父栏目"` + Level int `json:"level" description:"关系树等级"` + Tree string `json:"tree" description:"关系"` + Sort int `json:"sort" description:"排序"` + Status int `json:"status" description:"状态"` +} + +// ProvincesInsertFields 新增数据字段过滤 +type ProvincesInsertFields struct { + Id int64 `json:"id" description:"省市区ID"` + Title string `json:"title" description:"栏目名称"` + Pinyin string `json:"pinyin" description:"拼音"` + Lng string `json:"lng" description:"经度"` + Lat string `json:"lat" description:"纬度"` + Pid int64 `json:"pid" description:"父栏目"` + Level int `json:"level" description:"关系树等级"` + Tree string `json:"tree" description:"关系"` + Sort int `json:"sort" description:"排序"` + Status int `json:"status" description:"状态"` +} + +// ProvincesDeleteInp 删除字典类型 +type ProvincesDeleteInp struct { + Id interface{} `json:"id" v:"required#省市区ID不能为空" dc:"省市区ID"` +} + +type ProvincesDeleteModel struct{} + +// ProvincesViewInp 获取信息 +type ProvincesViewInp struct { + Id int64 +} + +type ProvincesViewModel struct { + Id int64 `json:"id" v:"required#省市区ID不能为空" dc:"省市区ID"` +} + +// ProvincesListInp 获取列表 +type ProvincesListInp struct { + form.PageReq + + form.StatusReq + Title string `json:"title"` + Content string `json:"content"` +} + +type ProvincesListModel struct { + entity.SysProvinces +} + +// ProvincesStatusInp 更新状态 +type ProvincesStatusInp struct { + entity.SysProvinces +} + +func (in *ProvincesStatusInp) Filter(ctx context.Context) (err error) { + if in.Id <= 0 { + err = gerror.New("ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + return +} + +type ProvincesStatusModel struct{} + +// ProvincesChildrenListInp 获取省市区下级列表 +type ProvincesChildrenListInp struct { + form.PageReq + form.StatusReq + Pid int64 `json:"pid" dc:"上级ID"` + Id int64 `json:"id" dc:"地区ID"` + Title string `json:"title" dc:"地区名称"` +} + +type ProvincesChildrenListModel struct { + entity.SysProvinces +} + +// ProvincesUniqueIdInp 获取省市区下级列表 +type ProvincesUniqueIdInp struct { + OldId int64 `json:"oldId" dc:"原始ID"` + NewId int64 `json:"newId" dc:"新的ID"` +} + +type ProvincesUniqueIdModel struct { + IsUnique bool `json:"unique" dc:"是否唯一"` +} + +type ProvincesSelectInp struct { + DataType string `json:"dataType" v:"required#数据类型不能为空" dc:"数据类型"` + Value int64 `json:"value" dc:"上级ID"` +} + +type ProvincesSelectModel struct { + List []*ProvincesSelectData `json:"list" dc:"数据列表"` +} + +type ProvincesSelectData struct { + Label string `json:"label" description:"地区名称"` + Value int64 `json:"value" description:"地区ID"` + Level int `json:"level" description:"地区等级"` + IsLeaf bool `json:"isLeaf" description:"是否是最后一个节点"` +} + +// ProvincesCityLabelInp 获取指定城市标签 +type ProvincesCityLabelInp struct { + Id int64 `json:"oldId" dc:"城市ID"` + Spilt string `json:"spilt" dc:"分隔符"` +} + +type ProvincesCityLabelModel string + +// ProvincesTree 树 +type ProvincesTree struct { + entity.SysProvinces + Key int64 `json:"key" dc:"key"` + Label string `json:"label" dc:"标签"` + Value int64 `json:"value" dc:"键值"` + Children []*ProvincesTree `json:"children"` +} diff --git a/server/internal/model/input/sysin/serve_license.go b/server/internal/model/input/sysin/serve_license.go new file mode 100644 index 0000000..17e51c0 --- /dev/null +++ b/server/internal/model/input/sysin/serve_license.go @@ -0,0 +1,190 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.7.6 +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/consts" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/validate" +) + +// ServeLicenseUpdateFields 修改服务许可证字段过滤 +type ServeLicenseUpdateFields struct { + Group string `json:"group" dc:"分组"` + Name string `json:"name" dc:"许可名称"` + Appid string `json:"appid" dc:"应用ID"` + SecretKey string `json:"secretKey" dc:"应用秘钥"` + OnlineLimit int `json:"onlineLimit" dc:"在线数量限制,默认1"` + // Routes *gjson.Json `json:"routes" dc:"路由表,空使用默认分组路由"` + AllowedIps string `json:"allowedIps" dc:"白名单,*代表所有,只有允许的IP才能连接到tcp服务"` + EndAt *gtime.Time `json:"endAt" dc:"授权结束时间"` + Remark string `json:"remark" dc:"备注"` + Status int `json:"status" dc:"状态"` +} + +// ServeLicenseInsertFields 新增服务许可证字段过滤 +type ServeLicenseInsertFields struct { + Group string `json:"group" dc:"分组"` + Name string `json:"name" dc:"许可名称"` + Appid string `json:"appid" dc:"应用ID"` + SecretKey string `json:"secretKey" dc:"应用秘钥"` + OnlineLimit int `json:"onlineLimit" dc:"在线数量限制,默认1"` + // Routes *gjson.Json `json:"routes" dc:"路由表,空使用默认分组路由"` + AllowedIps string `json:"allowedIps" dc:"白名单,*代表所有,只有允许的IP才能连接到tcp服务"` + EndAt *gtime.Time `json:"endAt" dc:"授权结束时间"` + Remark string `json:"remark" dc:"备注"` + Status int `json:"status" dc:"状态"` +} + +// ServeLicenseEditInp 修改/新增服务许可证 +type ServeLicenseEditInp struct { + entity.SysServeLicense +} + +func (in *ServeLicenseEditInp) Filter(ctx context.Context) (err error) { + // 验证分组 + if err := g.Validator().Rules("required").Data(in.Group).Messages("分组不能为空").Run(ctx); err != nil { + return err.Current() + } + + // 验证许可名称 + if err := g.Validator().Rules("required").Data(in.Name).Messages("许可名称不能为空").Run(ctx); err != nil { + return err.Current() + } + + // 验证应用ID + if err := g.Validator().Rules("required").Data(in.Appid).Messages("应用ID不能为空").Run(ctx); err != nil { + return err.Current() + } + + // 验证授权结束时间 + if err := g.Validator().Rules("required").Data(in.EndAt).Messages("授权结束时间不能为空").Run(ctx); err != nil { + return err.Current() + } + + return +} + +type ServeLicenseEditModel struct{} + +// ServeLicenseDeleteInp 删除服务许可证 +type ServeLicenseDeleteInp struct { + Id interface{} `json:"id" v:"required#许可ID不能为空" dc:"许可ID"` +} + +func (in *ServeLicenseDeleteInp) Filter(ctx context.Context) (err error) { + return +} + +type ServeLicenseDeleteModel struct{} + +// ServeLicenseViewInp 获取指定服务许可证信息 +type ServeLicenseViewInp struct { + Id int64 `json:"id" v:"required#许可ID不能为空" dc:"许可ID"` +} + +func (in *ServeLicenseViewInp) Filter(ctx context.Context) (err error) { + return +} + +type ServeLicenseViewModel struct { + entity.SysServeLicense +} + +// ServeLicenseListInp 获取服务许可证列表 +type ServeLicenseListInp struct { + form.PageReq + Id int64 `json:"id" dc:"许可ID"` + Group string `json:"group" dc:"分组"` + Name string `json:"name" dc:"许可名称"` + Appid string `json:"appid" dc:"应用ID"` + EndAt []*gtime.Time `json:"endAt" dc:"授权结束时间"` + Status int `json:"status" dc:"状态"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` +} + +func (in *ServeLicenseListInp) Filter(ctx context.Context) (err error) { + return +} + +type ServeLicenseListModel struct { + Id int64 `json:"id" dc:"许可ID"` + Group string `json:"group" dc:"分组"` + Name string `json:"name" dc:"许可名称"` + Appid string `json:"appid" dc:"应用ID"` + SecretKey string `json:"secretKey" dc:"应用秘钥"` + RemoteAddr string `json:"remoteAddr" dc:"最后连接地址"` + OnlineLimit int `json:"onlineLimit" dc:"在线数量限制,默认1"` + LoginTimes int64 `json:"loginTimes" dc:"登录次数"` + LastLoginAt *gtime.Time `json:"lastLoginAt" dc:"最后登录时间"` + LastActiveAt *gtime.Time `json:"lastActiveAt" dc:"最后活跃时间"` + EndAt *gtime.Time `json:"endAt" dc:"授权结束时间"` + Routes *gjson.Json `json:"routes" dc:"路由表,空使用默认分组路由"` + Status int `json:"status" dc:"状态"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"` + Online int `json:"online" dc:"在线"` +} + +// ServeLicenseExportModel 导出服务许可证 +type ServeLicenseExportModel struct { + Id int64 `json:"id" dc:"许可ID"` + Group string `json:"group" dc:"分组"` + Name string `json:"name" dc:"许可名称"` + Appid string `json:"appid" dc:"应用ID"` + SecretKey string `json:"secretKey" dc:"应用秘钥"` + RemoteAddr string `json:"remoteAddr" dc:"最后连接地址"` + OnlineLimit int `json:"onlineLimit" dc:"在线数量限制,默认1"` + LoginTimes int64 `json:"loginTimes" dc:"登录次数"` + LastLoginAt *gtime.Time `json:"lastLoginAt" dc:"最后登录时间"` + LastActiveAt *gtime.Time `json:"lastActiveAt" dc:"最后活跃时间"` + EndAt *gtime.Time `json:"endAt" dc:"授权结束时间"` + Status int `json:"status" dc:"状态"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"` +} + +// ServeLicenseStatusInp 更新服务许可证状态 +type ServeLicenseStatusInp struct { + Id int64 `json:"id" v:"required#许可ID不能为空" dc:"许可ID"` + Status int `json:"status" dc:"状态"` +} + +func (in *ServeLicenseStatusInp) Filter(ctx context.Context) (err error) { + if in.Id <= 0 { + err = gerror.New("许可ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + return +} + +type ServeLicenseStatusModel struct{} + +type ServeLicenseAssignRouterInp struct { + Id int64 `json:"id" v:"required#许可ID不能为空" dc:"许可ID"` + Routes *gjson.Json `json:"routes" dc:"路由表,空使用默认分组路由"` +} + +func (in *ServeLicenseAssignRouterInp) Filter(ctx context.Context) (err error) { + return +} diff --git a/server/internal/model/input/sysin/serve_log.go b/server/internal/model/input/sysin/serve_log.go new file mode 100644 index 0000000..b88630c --- /dev/null +++ b/server/internal/model/input/sysin/serve_log.go @@ -0,0 +1,69 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" +) + +// ServeLogDeleteInp 删除服务日志 +type ServeLogDeleteInp struct { + Id interface{} `json:"id" v:"required#日志ID不能为空" dc:"日志ID"` +} + +type ServeLogDeleteModel struct{} + +// ServeLogViewInp 获取指定服务日志信息 +type ServeLogViewInp struct { + Id int64 `json:"id" v:"required#日志ID不能为空" dc:"日志ID"` +} + +type ServeLogViewModel struct { + entity.SysServeLog +} + +// ServeLogListInp 获取服务日志列表 +type ServeLogListInp struct { + form.PageReq + TraceId string `json:"traceId" dc:"链路ID"` + LevelFormat string `json:"levelFormat" dc:"日志级别"` + Content string `json:"content" dc:"日志内容"` + TriggerNs []int64 `json:"triggerNs" dc:"触发时间(ns)"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` +} + +type ServeLogListModel struct { + Id int64 `json:"id" dc:"日志ID"` + TraceId string `json:"traceId" dc:"链路ID"` + LevelFormat string `json:"levelFormat" dc:"日志级别"` + Content string `json:"content" dc:"日志内容"` + Stack string `json:"stack" dc:"堆栈"` + Line string `json:"line" dc:"调用行"` + TriggerNs int64 `json:"triggerNs" dc:"触发时间(ns)"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"` + SysLogId int64 `json:"sysLogId" dc:"访问日志ID"` +} + +func (in *ServeLogListInp) Filter(ctx context.Context) (err error) { + return +} + +// ServeLogExportModel 导出服务日志 +type ServeLogExportModel struct { + Id int64 `json:"id" dc:"日志ID"` + Env string `json:"env" dc:"环境"` + TraceId string `json:"traceId" dc:"链路ID"` + LevelFormat string `json:"levelFormat" dc:"日志级别"` + Content string `json:"content" dc:"日志内容"` + Line string `json:"line" dc:"调用行"` + TriggerNs int64 `json:"triggerNs" dc:"触发时间(ns)"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` + UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"` +} diff --git a/server/internal/model/input/sysin/sms_log.go b/server/internal/model/input/sysin/sms_log.go new file mode 100644 index 0000000..52708bf --- /dev/null +++ b/server/internal/model/input/sysin/sms_log.go @@ -0,0 +1,84 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/consts" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" +) + +// SmsLogEditInp 修改/新增数据 +type SmsLogEditInp struct { + entity.SysSmsLog +} + +type SmsLogEditModel struct{} + +// SmsLogDeleteInp 删除 +type SmsLogDeleteInp struct { + Id interface{} `json:"id" v:"required#短信记录ID不能为空" dc:"短信记录ID"` +} + +type SmsLogDeleteModel struct{} + +// SmsLogViewInp 获取信息 +type SmsLogViewInp struct { + Id int64 `json:"id" v:"required#短信记录ID不能为空" dc:"短信记录ID"` +} + +type SmsLogViewModel struct { + entity.SysSmsLog +} + +// SmsLogListInp 获取列表 +type SmsLogListInp struct { + form.PageReq + form.StatusReq + Mobile string `json:"mobile" dc:"手机号"` + Ip string `json:"ip" dc:"IP"` + Event string `json:"event" dc:"事件"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` +} + +func (in *SmsLogListInp) Filter(ctx context.Context) (err error) { + if in.Event != "" { + if _, ok := consts.SmsTemplateEventMap[in.Event]; !ok { + err = gerror.Newf("无效的事件类型:%v", in.Event) + return + } + } + return +} + +type SmsLogListModel struct { + entity.SysSmsLog +} + +// SmsLogStatusInp 更新状态 +type SmsLogStatusInp struct { + entity.SysSmsLog +} + +type SmsLogStatusModel struct{} + +// SendCodeInp 发送验证码 +type SendCodeInp struct { + Event string `json:"event" description:"事件"` // 必填 + Mobile string `json:"mobile" description:"手机号"` // 必填 + Code string `json:"code" description:"验证码或短信内容"` + Template string `json:"-" description:"发信模板 "` +} + +// VerifyCodeInp 效验验证码 +type VerifyCodeInp struct { + Event string `json:"event" description:"事件"` // 必填 + Mobile string `json:"mobile" description:"手机号"` // 必填 + Code string `json:"code" description:"验证码或短信内容"` // 必填 +} diff --git a/server/internal/model/input/sysin/test_category.go b/server/internal/model/input/sysin/test_category.go new file mode 100644 index 0000000..5f77439 --- /dev/null +++ b/server/internal/model/input/sysin/test_category.go @@ -0,0 +1,143 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.15.7 +package sysin + +import ( + "context" + "hotgo/internal/consts" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/validate" + + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" +) + +// TestCategoryUpdateFields 修改测试分类字段过滤 +type TestCategoryUpdateFields struct { + Name string `json:"name" dc:"分类名称"` + ShortName string `json:"shortName" dc:"简称"` + Description string `json:"description" dc:"描述"` + Sort int `json:"sort" dc:"排序"` + Status int `json:"status" dc:"状态"` + Remark string `json:"remark" dc:"备注"` +} + +// TestCategoryInsertFields 新增测试分类字段过滤 +type TestCategoryInsertFields struct { + Name string `json:"name" dc:"分类名称"` + ShortName string `json:"shortName" dc:"简称"` + Description string `json:"description" dc:"描述"` + Sort int `json:"sort" dc:"排序"` + Status int `json:"status" dc:"状态"` + Remark string `json:"remark" dc:"备注"` +} + +// TestCategoryEditInp 修改/新增测试分类 +type TestCategoryEditInp struct { + entity.TestCategory +} + +func (in *TestCategoryEditInp) Filter(ctx context.Context) (err error) { + // 验证分类名称 + if err := g.Validator().Rules("required").Data(in.Name).Messages("分类名称不能为空").Run(ctx); err != nil { + return err.Current() + } + + // 验证排序 + if err := g.Validator().Rules("required").Data(in.Sort).Messages("排序不能为空").Run(ctx); err != nil { + return err.Current() + } + + return +} + +type TestCategoryEditModel struct{} + +// TestCategoryDeleteInp 删除测试分类 +type TestCategoryDeleteInp struct { + Id interface{} `json:"id" v:"required#分类ID不能为空" dc:"分类ID"` +} + +func (in *TestCategoryDeleteInp) Filter(ctx context.Context) (err error) { + return +} + +type TestCategoryDeleteModel struct{} + +// TestCategoryViewInp 获取指定测试分类信息 +type TestCategoryViewInp struct { + Id int64 `json:"id" v:"required#分类ID不能为空" dc:"分类ID"` +} + +func (in *TestCategoryViewInp) Filter(ctx context.Context) (err error) { + return +} + +type TestCategoryViewModel struct { + entity.TestCategory +} + +// TestCategoryListInp 获取测试分类列表 +type TestCategoryListInp struct { + form.PageReq + Id int64 `json:"id" dc:"分类ID"` + Name string `json:"name" dc:"分类名称"` + Status int `json:"status" dc:"状态"` + CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"` +} + +func (in *TestCategoryListInp) Filter(ctx context.Context) (err error) { + return +} + +type TestCategoryListModel struct { + Id int64 `json:"id" dc:"分类ID"` + Name string `json:"name" dc:"分类名称"` + ShortName string `json:"shortName" dc:"简称"` + Description string `json:"description" dc:"描述"` + Status int `json:"status" dc:"状态"` + CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"` +} + +// TestCategoryMaxSortInp 获取测试分类最大排序 +type TestCategoryMaxSortInp struct{} + +func (in *TestCategoryMaxSortInp) Filter(ctx context.Context) (err error) { + return +} + +type TestCategoryMaxSortModel struct { + Sort int `json:"sort" description:"排序"` +} + +// TestCategoryStatusInp 更新测试分类状态 +type TestCategoryStatusInp struct { + Id int64 `json:"id" v:"required#分类ID不能为空" dc:"分类ID"` + Status int `json:"status" dc:"状态"` +} + +func (in *TestCategoryStatusInp) Filter(ctx context.Context) (err error) { + if in.Id <= 0 { + err = gerror.New("分类ID不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + return +} + +type TestCategoryStatusModel struct{} diff --git a/server/internal/model/input/websocketin/send.go b/server/internal/model/input/websocketin/send.go new file mode 100644 index 0000000..9a43844 --- /dev/null +++ b/server/internal/model/input/websocketin/send.go @@ -0,0 +1,16 @@ +// Package websocketin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package websocketin + +import ( + "hotgo/internal/websocket" +) + +// SendToTagInp 发送标签消息 +type SendToTagInp struct { + Tag string `json:"tag" v:"required#tag不能为空" description:"标签"` + Response websocket.WResponse `json:"response" v:"required#response不能为空" description:"响应内容"` +} diff --git a/server/internal/model/monitor.go b/server/internal/model/monitor.go new file mode 100644 index 0000000..b9cb02d --- /dev/null +++ b/server/internal/model/monitor.go @@ -0,0 +1,37 @@ +// Package model +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package model + +import ( + "github.com/gogf/gf/v2/os/gtime" +) + +type MonitorData struct { + // STartTime 启动时间 + STartTime int64 + // 内网IP + IntranetIP string + // 公网IP + PublicIP string + // NetIO 网络流量统计 + NetIO []*NetIOCounters + // LoadAvg 负载统计 + LoadAvg []*LoadAvgStats +} + +type NetIOCounters struct { + Time *gtime.Time `json:"time"` + BytesSent uint64 `json:"bytesSent"` // number of bytes sent + BytesRecv uint64 `json:"bytesRecv"` // number of bytes received + Down float64 `json:"down"` + UP float64 `json:"up"` +} + +type LoadAvgStats struct { + Time *gtime.Time `json:"time"` + Avg float64 `json:"avg"` + Ratio float64 `json:"ratio"` +} diff --git a/server/internal/model/response.go b/server/internal/model/response.go new file mode 100644 index 0000000..5f1a76c --- /dev/null +++ b/server/internal/model/response.go @@ -0,0 +1,16 @@ +// Package model +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package model + +// Response HTTP响应 +type Response struct { + Code int `json:"code" example:"0" description:"状态码"` + Message string `json:"message,omitempty" example:"操作成功" description:"提示消息"` + Data interface{} `json:"data,omitempty" description:"数据集"` + Error interface{} `json:"error,omitempty" description:"错误信息"` + Timestamp int64 `json:"timestamp" example:"1640966400" description:"服务器时间戳"` + TraceID string `json:"traceID" v:"0" example:"d0bb93048bc5c9164cdee845dcb7f820" description:"链路ID"` +} diff --git a/server/internal/model/tree.go b/server/internal/model/tree.go new file mode 100644 index 0000000..32128f6 --- /dev/null +++ b/server/internal/model/tree.go @@ -0,0 +1,30 @@ +// Package model +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package model + +import "hotgo/internal/model/entity" + +// DefaultTree 默认树表字段 +type DefaultTree struct { + Id int64 `json:"id" description:"ID"` + Pid int64 `json:"pid" description:"父ID"` + Level int `json:"level" description:"关系树等级"` + Tree string `json:"tree" description:"关系树"` +} + +// TreeMenu 菜单树 +type TreeMenu struct { + entity.AdminMenu + Children []*TreeMenu `json:"children"` +} + +// LabelTreeMenu 菜单kv树 +type LabelTreeMenu struct { + entity.AdminMenu + Key int64 `json:"key" description:"键名"` + Label string `json:"label" description:"键标签"` + Children []*LabelTreeMenu `json:"children"` +} diff --git a/server/internal/model/view.go b/server/internal/model/view.go new file mode 100644 index 0000000..8e83fc2 --- /dev/null +++ b/server/internal/model/view.go @@ -0,0 +1,41 @@ +// Package model +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package model + +// View 视图渲染内容对象 +type View struct { + Title string // 页面标题 + Keywords string // 页面Keywords + Description string // 页面Description + IpcCode string // ICP备案号 + Error string // 错误信息 + MainTpl string // 自定义MainTpl展示模板文件 + Redirect string // 引导页面跳转 + ContentType string // 内容模型 + BreadCrumb []ViewBreadCrumb // 面包屑 + GET map[string]interface{} // GET参数 + Data interface{} // 页面参数 +} + +// ViewBreadCrumb 视图面包屑结构 +type ViewBreadCrumb struct { + Name string // 显示名称 + Url string // 链接地址,当为空时表示被选中 +} + +// ViewGetBreadCrumbInput 获取面包屑请求 +type ViewGetBreadCrumbInput struct { + ContentId uint // (可选)内容ID + ContentType string // (可选)内容类型 + CategoryId uint // (可选)栏目ID +} + +// ViewGetTitleInput 获取title请求 +type ViewGetTitleInput struct { + ContentType string // (可选)内容类型 + CategoryId uint // (可选)栏目ID + CurrentName string // (可选)当前名称 +} diff --git a/server/internal/queues/login_log.go b/server/internal/queues/login_log.go new file mode 100644 index 0000000..c0ca742 --- /dev/null +++ b/server/internal/queues/login_log.go @@ -0,0 +1,38 @@ +// Package queues +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package queues + +import ( + "context" + "encoding/json" + "hotgo/internal/consts" + "hotgo/internal/library/queue" + "hotgo/internal/model/entity" + "hotgo/internal/service" +) + +func init() { + queue.RegisterConsumer(LoginLog) +} + +// LoginLog 登录日志 +var LoginLog = &qLoginLog{} + +type qLoginLog struct{} + +// GetTopic 主题 +func (q *qLoginLog) GetTopic() string { + return consts.QueueLoginLogTopic +} + +// Handle 处理消息 +func (q *qLoginLog) Handle(ctx context.Context, mqMsg queue.MqMsg) (err error) { + var data entity.SysLoginLog + if err = json.Unmarshal(mqMsg.Body, &data); err != nil { + return err + } + return service.SysLoginLog().RealWrite(ctx, data) +} diff --git a/server/internal/queues/serve_log.go b/server/internal/queues/serve_log.go new file mode 100644 index 0000000..2fb7867 --- /dev/null +++ b/server/internal/queues/serve_log.go @@ -0,0 +1,45 @@ +// Package queues +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package queues + +import ( + "context" + "encoding/json" + "github.com/gogf/gf/v2/frame/g" + "hotgo/internal/consts" + "hotgo/internal/library/queue" + "hotgo/internal/model/entity" + "hotgo/internal/service" +) + +func init() { + queue.RegisterConsumer(ServeLog) +} + +// ServeLog 登录日志 +var ServeLog = &qServeLog{} + +type qServeLog struct{} + +// GetTopic 主题 +func (q *qServeLog) GetTopic() string { + return consts.QueueServeLogTopic +} + +// Handle 处理消息 +func (q *qServeLog) Handle(ctx context.Context, mqMsg queue.MqMsg) error { + var data entity.SysServeLog + if err := json.Unmarshal(mqMsg.Body, &data); err != nil { + g.Dump("ServeLog Handle Unmarshal err:", err) + return nil + } + + if err := service.SysServeLog().RealWrite(ctx, data); err != nil { + g.Dump("ServeLog Handle Write err:", err) + return nil + } + return nil +} diff --git a/server/internal/queues/sys_log.go b/server/internal/queues/sys_log.go new file mode 100644 index 0000000..1db0736 --- /dev/null +++ b/server/internal/queues/sys_log.go @@ -0,0 +1,38 @@ +// Package queues +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package queues + +import ( + "context" + "encoding/json" + "hotgo/internal/consts" + "hotgo/internal/library/queue" + "hotgo/internal/model/entity" + "hotgo/internal/service" +) + +func init() { + queue.RegisterConsumer(SysLog) +} + +// SysLog 系统日志 +var SysLog = &qSysLog{} + +type qSysLog struct{} + +// GetTopic 主题 +func (q *qSysLog) GetTopic() string { + return consts.QueueLogTopic +} + +// Handle 处理消息 +func (q *qSysLog) Handle(ctx context.Context, mqMsg queue.MqMsg) (err error) { + var data entity.SysLog + if err = json.Unmarshal(mqMsg.Body, &data); err != nil { + return err + } + return service.SysLog().RealWrite(ctx, data) +} diff --git a/server/internal/router/admin.go b/server/internal/router/admin.go new file mode 100644 index 0000000..5cd8a67 --- /dev/null +++ b/server/internal/router/admin.go @@ -0,0 +1,73 @@ +// Package router +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package router + +import ( + "context" + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/internal/consts" + "hotgo/internal/controller/admin/admin" + "hotgo/internal/controller/admin/common" + "hotgo/internal/controller/admin/pay" + "hotgo/internal/controller/admin/sys" + "hotgo/internal/router/genrouter" + "hotgo/internal/service" + "hotgo/utility/simple" +) + +func Admin(ctx context.Context, group *ghttp.RouterGroup) { + // 兼容后台登录入口 + group.ALL("/login", func(r *ghttp.Request) { + r.Response.RedirectTo("/admin") + }) + + group.Group(simple.RouterPrefix(ctx, consts.AppAdmin), func(group *ghttp.RouterGroup) { + group.Bind( + common.Site, // 基础 + ) + group.Middleware(service.Middleware().AdminAuth) + group.Bind( + common.Console, // 控制台 + common.Ems, // 邮件 + common.Sms, // 短信 + common.Upload, // 上传 + common.Wechat, // 微信授权 + sys.Config, // 配置 + sys.DictType, // 字典类型 + sys.DictData, // 字典数据 + sys.Attachment, // 附件 + sys.Provinces, // 省市区 + sys.Cron, // 定时任务 + sys.CronGroup, // 定时任务分组 + sys.Blacklist, // 黑名单 + sys.Log, // 访问日志 + sys.LoginLog, // 登录日志 + sys.ServeLog, // 服务日志 + sys.SmsLog, // 短信记录 + sys.ServeLicense, // 服务许可证 + admin.Member, // 用户 + admin.Monitor, // 监控 + admin.Role, // 路由 + admin.Dept, // 部门 + admin.Menu, // 菜单 + admin.Notice, // 公告 + admin.Post, // 岗位 + admin.Order, // 充值订单 + admin.CreditsLog, // 资金变动 + admin.Cash, // 提现 + pay.Refund, // 交易退款 + ) + + group.Middleware(service.Middleware().Develop) + group.Bind( + sys.GenCodes, // 生成代码 + sys.Addons, // 插件管理 + ) + }) + + // 注册生成路由 + genrouter.Register(ctx, group) +} diff --git a/server/internal/router/api.go b/server/internal/router/api.go new file mode 100644 index 0000000..27b2980 --- /dev/null +++ b/server/internal/router/api.go @@ -0,0 +1,30 @@ +// Package router +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package router + +import ( + "context" + "hotgo/internal/consts" + "hotgo/internal/controller/api/member" + "hotgo/internal/controller/api/pay" + "hotgo/internal/service" + "hotgo/utility/simple" + + "github.com/gogf/gf/v2/net/ghttp" +) + +// Api 前台路由 +func Api(ctx context.Context, group *ghttp.RouterGroup) { + group.Group(simple.RouterPrefix(ctx, consts.AppApi), func(group *ghttp.RouterGroup) { + group.Bind( + pay.NewV1(), // 支付异步通知 + ) + group.Middleware(service.Middleware().ApiAuth) + group.Bind( + member.NewV1(), // 管理员 + ) + }) +} diff --git a/server/internal/router/genrouter/curd_demo.go b/server/internal/router/genrouter/curd_demo.go new file mode 100644 index 0000000..c2faeaf --- /dev/null +++ b/server/internal/router/genrouter/curd_demo.go @@ -0,0 +1,13 @@ +// Package genrouter +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2025 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.18.6 +package genrouter + +import "hotgo/internal/controller/admin/sys" + +func init() { + LoginRequiredRouter = append(LoginRequiredRouter, sys.CurdDemo) // CURD列表 +} diff --git a/server/internal/router/genrouter/init.go b/server/internal/router/genrouter/init.go new file mode 100644 index 0000000..520437a --- /dev/null +++ b/server/internal/router/genrouter/init.go @@ -0,0 +1,32 @@ +// Package genrouter +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package genrouter + +import ( + "context" + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/internal/consts" + "hotgo/internal/service" + "hotgo/utility/simple" +) + +var ( + NoLoginRouter []interface{} // 无需登录 + LoginRequiredRouter []interface{} // 需要登录 +) + +// Register 注册通过代码生成的后台路由 +func Register(ctx context.Context, group *ghttp.RouterGroup) { + group.Group(simple.RouterPrefix(ctx, consts.AppAdmin), func(group *ghttp.RouterGroup) { + if len(NoLoginRouter) > 0 { + group.Bind(NoLoginRouter...) + } + group.Middleware(service.Middleware().AdminAuth) + if len(LoginRequiredRouter) > 0 { + group.Bind(LoginRequiredRouter...) + } + }) +} diff --git a/server/internal/router/genrouter/normal_tree_demo.go b/server/internal/router/genrouter/normal_tree_demo.go new file mode 100644 index 0000000..2565f6d --- /dev/null +++ b/server/internal/router/genrouter/normal_tree_demo.go @@ -0,0 +1,13 @@ +// Package genrouter +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.15.7 +package genrouter + +import "hotgo/internal/controller/admin/sys" + +func init() { + LoginRequiredRouter = append(LoginRequiredRouter, sys.NormalTreeDemo) // 普通树表 +} diff --git a/server/internal/router/genrouter/option_tree_demo.go b/server/internal/router/genrouter/option_tree_demo.go new file mode 100644 index 0000000..cda296e --- /dev/null +++ b/server/internal/router/genrouter/option_tree_demo.go @@ -0,0 +1,13 @@ +// Package genrouter +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2025 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.17.8 +package genrouter + +import "hotgo/internal/controller/admin/sys" + +func init() { + LoginRequiredRouter = append(LoginRequiredRouter, sys.OptionTreeDemo) // 选项树表 +} diff --git a/server/internal/router/genrouter/test_category.go b/server/internal/router/genrouter/test_category.go new file mode 100644 index 0000000..696e952 --- /dev/null +++ b/server/internal/router/genrouter/test_category.go @@ -0,0 +1,13 @@ +// Package genrouter +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version 2.15.7 +package genrouter + +import "hotgo/internal/controller/admin/sys" + +func init() { + LoginRequiredRouter = append(LoginRequiredRouter, sys.TestCategory) // 测试分类 +} diff --git a/server/internal/router/home.go b/server/internal/router/home.go new file mode 100644 index 0000000..be5c9de --- /dev/null +++ b/server/internal/router/home.go @@ -0,0 +1,33 @@ +// Package router +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package router + +import ( + "context" + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/internal/consts" + "hotgo/internal/controller/home/base" + "hotgo/internal/service" + "hotgo/utility/simple" +) + +// Home 前台页面路由 +func Home(ctx context.Context, group *ghttp.RouterGroup) { + group.Group("/", func(group *ghttp.RouterGroup) { + group.Middleware(service.Middleware().HomeAuth) + // 允许通过根地址访问的路由可以加到这里,访问地址:http://127.0.0.1:8000 + group.Bind( + base.Site, // 基础 + ) + + // 默认访问地址:http://127.0.0.1:8000/home + group.Group(simple.RouterPrefix(ctx, consts.AppHome), func(group *ghttp.RouterGroup) { + group.Bind( + base.Site, // 基础 + ) + }) + }) +} diff --git a/server/internal/router/websocket.go b/server/internal/router/websocket.go new file mode 100644 index 0000000..fefe892 --- /dev/null +++ b/server/internal/router/websocket.go @@ -0,0 +1,46 @@ +// Package router +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package router + +import ( + "context" + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/internal/consts" + controller "hotgo/internal/controller/websocket" + "hotgo/internal/controller/websocket/handler/admin" + "hotgo/internal/controller/websocket/handler/common" + "hotgo/internal/service" + "hotgo/internal/websocket" + "hotgo/utility/simple" +) + +// WebSocket ws路由配置 +func WebSocket(ctx context.Context, group *ghttp.RouterGroup) { + group.Group(simple.RouterPrefix(ctx, consts.AppWebSocket), func(group *ghttp.RouterGroup) { + group.Middleware() + group.Bind( + controller.Send, // 通过http发送ws消息。方便测试没有放权限中间件,实际使用时请自行调整 + ) + + // ws连接中间件 + group.Middleware(service.Middleware().WebSocketAuth) + + // ws + group.GET("/", websocket.WsPage) + }) + + // 启动websocket监听 + websocket.Start() + + // 注册消息路由 + websocket.RegisterMsg(websocket.EventHandlers{ + "ping": common.Site.Ping, // 心跳 + "join": common.Site.Join, // 加入组 + "quit": common.Site.Quit, // 退出组 + "admin/monitor/trends": admin.Monitor.Trends, // 后台监控,动态数据 + "admin/monitor/runInfo": admin.Monitor.RunInfo, // 后台监控,运行信息 + }) +} diff --git a/server/internal/service/.gitkeep b/server/internal/service/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/internal/service/admin.go b/server/internal/service/admin.go new file mode 100644 index 0000000..d1b2c25 --- /dev/null +++ b/server/internal/service/admin.go @@ -0,0 +1,404 @@ +// ================================================================================ +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import ( + "context" + "hotgo/api/admin/role" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/model" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/adminin" + "hotgo/internal/model/input/form" + "hotgo/internal/model/input/payin" + "hotgo/utility/tree" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/database/gredis" +) + +type ( + IAdminCash interface { + // View 获取指定提现信息 + View(ctx context.Context, in *adminin.CashViewInp) (res *adminin.CashViewModel, err error) + // List 获取列表 + List(ctx context.Context, in *adminin.CashListInp) (list []*adminin.CashListModel, totalCount int, err error) + // Apply 申请提现 + Apply(ctx context.Context, in *adminin.CashApplyInp) (err error) + // Payment 提现打款处理 + Payment(ctx context.Context, in *adminin.CashPaymentInp) (err error) + } + IAdminCreditsLog interface { + // Model 资产变动ORM模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // SaveBalance 更新余额 + SaveBalance(ctx context.Context, in *adminin.CreditsLogSaveBalanceInp) (res *adminin.CreditsLogSaveBalanceModel, err error) + // SaveIntegral 更新积分 + SaveIntegral(ctx context.Context, in *adminin.CreditsLogSaveIntegralInp) (res *adminin.CreditsLogSaveIntegralModel, err error) + // List 获取资产变动列表 + List(ctx context.Context, in *adminin.CreditsLogListInp) (list []*adminin.CreditsLogListModel, totalCount int, err error) + // Export 导出资产变动 + Export(ctx context.Context, in *adminin.CreditsLogListInp) (err error) + } + IAdminDept interface { + // Model 部门ORM模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // Delete 删除 + Delete(ctx context.Context, in *adminin.DeptDeleteInp) (err error) + // VerifyUnique 验证部门唯一属性 + VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error) + // Edit 修改/新增 + Edit(ctx context.Context, in *adminin.DeptEditInp) (err error) + // MaxSort 最大排序 + MaxSort(ctx context.Context, in *adminin.DeptMaxSortInp) (res *adminin.DeptMaxSortModel, err error) + // View 获取指定部门信息 + View(ctx context.Context, in *adminin.DeptViewInp) (res *adminin.DeptViewModel, err error) + // List 获取列表 + List(ctx context.Context, in *adminin.DeptListInp) (res *adminin.DeptListModel, err error) + // GetName 获取部门名称 + GetName(ctx context.Context, id int64) (name string, err error) + // VerifyDeptId 验证部门ID + VerifyDeptId(ctx context.Context, id int64) (err error) + // Option 获取当前登录用户可选的部门选项 + Option(ctx context.Context, in *adminin.DeptOptionInp) (res *adminin.DeptOptionModel, totalCount int, err error) + // TreeOption 获取部门关系树选项 + TreeOption(ctx context.Context) (nodes []tree.Node, err error) + } + IAdminMember interface { + // AddBalance 增加余额 + AddBalance(ctx context.Context, in *adminin.MemberAddBalanceInp) (err error) + // AddIntegral 增加积分 + AddIntegral(ctx context.Context, in *adminin.MemberAddIntegralInp) (err error) + // UpdateCash 修改提现信息 + UpdateCash(ctx context.Context, in *adminin.MemberUpdateCashInp) (err error) + // UpdateEmail 换绑邮箱 + UpdateEmail(ctx context.Context, in *adminin.MemberUpdateEmailInp) (err error) + // UpdateMobile 换绑手机号 + UpdateMobile(ctx context.Context, in *adminin.MemberUpdateMobileInp) (err error) + // UpdateProfile 更新用户资料 + UpdateProfile(ctx context.Context, in *adminin.MemberUpdateProfileInp) (err error) + // UpdatePwd 修改登录密码 + UpdatePwd(ctx context.Context, in *adminin.MemberUpdatePwdInp) (err error) + // ResetPwd 重置密码 + ResetPwd(ctx context.Context, in *adminin.MemberResetPwdInp) (err error) + // VerifyUnique 验证管理员唯一属性 + VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error) + // Delete 删除用户 + Delete(ctx context.Context, in *adminin.MemberDeleteInp) (err error) + // Edit 修改/新增用户 + Edit(ctx context.Context, in *adminin.MemberEditInp) (err error) + // View 获取用户信息 + View(ctx context.Context, in *adminin.MemberViewInp) (res *adminin.MemberViewModel, err error) + // List 获取用户列表 + List(ctx context.Context, in *adminin.MemberListInp) (list []*adminin.MemberListModel, totalCount int, err error) + // Status 更新状态 + Status(ctx context.Context, in *adminin.MemberStatusInp) (err error) + // GenTree 生成关系树 + GenTree(ctx context.Context, pid int64) (level int, newTree string, err error) + // LoginMemberInfo 获取登录用户信息 + LoginMemberInfo(ctx context.Context) (res *adminin.LoginMemberInfoModel, err error) + // MemberLoginStat 用户登录统计 + MemberLoginStat(ctx context.Context, in *adminin.MemberLoginStatInp) (res *adminin.MemberLoginStatModel, err error) + // GetIdByCode 通过邀请码获取用户ID + GetIdByCode(ctx context.Context, in *adminin.GetIdByCodeInp) (res *adminin.GetIdByCodeModel, err error) + // Select 获取可选的用户选项 + Select(ctx context.Context, in *adminin.MemberSelectInp) (res []*adminin.MemberSelectModel, err error) + // GetLowerIds 获取指定用户的所有下级ID集合 + GetLowerIds(ctx context.Context, memberId int64) (ids []int64, err error) + // GetComplexMemberIds 组合查找符合条件的用户ID + GetComplexMemberIds(ctx context.Context, memberIdx string, opt string) (ids []int64, err error) + // GetIdsByKeyword 根据关键词查找符合条件的用户ID + GetIdsByKeyword(ctx context.Context, ks string) (res []int64, err error) + // VerifySuperId 验证是否为超管 + VerifySuperId(ctx context.Context, verifyId int64) bool + // LoadSuperAdmin 加载超管数据 + LoadSuperAdmin(ctx context.Context) + // ClusterSyncSuperAdmin 集群同步 + ClusterSyncSuperAdmin(ctx context.Context, message *gredis.Message) + // FilterAuthModel 过滤用户操作权限 + // 非超管用户只能操作自己的下级角色用户,并且需要满足自身角色的数据权限设置 + FilterAuthModel(ctx context.Context, memberId int64) *gdb.Model + } + IAdminMemberPost interface { + // UpdatePostIds 更新用户岗位 + UpdatePostIds(ctx context.Context, memberId int64, postIds []int64) (err error) + } + IAdminMenu interface { + // Model Orm模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // Delete 删除 + Delete(ctx context.Context, in *adminin.MenuDeleteInp) (err error) + // VerifyUnique 验证菜单唯一属性 + VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error) + // Edit 修改/新增 + Edit(ctx context.Context, in *adminin.MenuEditInp) (err error) + // List 获取菜单列表 + List(ctx context.Context, in *adminin.MenuListInp) (res *adminin.MenuListModel, err error) + // GetMenuList 获取菜单列表 + GetMenuList(ctx context.Context, memberId int64) (res *role.DynamicRes, err error) + // LoginPermissions 获取登录成功后的细粒度权限 + LoginPermissions(ctx context.Context, memberId int64) (lists adminin.MemberLoginPermissions, err error) + // GetFastList 获取菜单列表 + GetFastList(ctx context.Context) (res map[int64]*entity.AdminMenu, err error) + } + IAdminMonitor interface { + // StartMonitor 启动服务监控 + StartMonitor(ctx context.Context) + // GetMeta 获取监控元数据 + GetMeta(ctx context.Context) *model.MonitorData + } + IAdminNotice interface { + // Model Orm模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // Delete 删除 + Delete(ctx context.Context, in *adminin.NoticeDeleteInp) (err error) + // Edit 修改/新增 + Edit(ctx context.Context, in *adminin.NoticeEditInp) (err error) + // Status 更新部门状态 + Status(ctx context.Context, in *adminin.NoticeStatusInp) (err error) + // MaxSort 最大排序 + MaxSort(ctx context.Context, in *adminin.NoticeMaxSortInp) (res *adminin.NoticeMaxSortModel, err error) + // View 获取指定字典类型信息 + View(ctx context.Context, in *adminin.NoticeViewInp) (res *adminin.NoticeViewModel, err error) + // api列表 不需要登陆 + ApiList(ctx context.Context, in *adminin.NoticeListInp) (list []*adminin.NoticeViewModel, totalCount int, err error) + // List 获取列表 + List(ctx context.Context, in *adminin.NoticeListInp) (list []*adminin.NoticeListModel, totalCount int, err error) + // PullMessages 拉取未读消息列表 + PullMessages(ctx context.Context, in *adminin.PullMessagesInp) (res *adminin.PullMessagesModel, err error) + // UnreadCount 获取所有类型消息的未读数量 + UnreadCount(ctx context.Context, in *adminin.NoticeUnreadCountInp) (res *adminin.NoticeUnreadCountModel, err error) + // UpRead 更新已读 + UpRead(ctx context.Context, in *adminin.NoticeUpReadInp) (err error) + // ReadAll 已读全部 + ReadAll(ctx context.Context, in *adminin.NoticeReadAllInp) (err error) + // MessageList 我的消息列表 + MessageList(ctx context.Context, in *adminin.NoticeMessageListInp) (list []*adminin.NoticeMessageListModel, totalCount int, err error) + } + IAdminOrder interface { + // Model 充值订单ORM模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // AcceptRefund 受理申请退款 + AcceptRefund(ctx context.Context, in *adminin.OrderAcceptRefundInp) (err error) + // ApplyRefund 申请退款 + ApplyRefund(ctx context.Context, in *adminin.OrderApplyRefundInp) (err error) + // PayNotify 支付成功通知 + PayNotify(ctx context.Context, in *payin.NotifyCallFuncInp) (err error) + // Create 创建充值订单 + Create(ctx context.Context, in *adminin.OrderCreateInp) (res *adminin.OrderCreateModel, err error) + // List 获取充值订单列表 + List(ctx context.Context, in *adminin.OrderListInp) (list []*adminin.OrderListModel, totalCount int, err error) + // Export 导出充值订单 + Export(ctx context.Context, in *adminin.OrderListInp) (err error) + // Edit 修改/新增充值订单 + Edit(ctx context.Context, in *adminin.OrderEditInp) (err error) + // Delete 删除充值订单 + Delete(ctx context.Context, in *adminin.OrderDeleteInp) (err error) + // View 获取充值订单指定信息 + View(ctx context.Context, in *adminin.OrderViewInp) (res *adminin.OrderViewModel, err error) + // Status 更新充值订单状态 + Status(ctx context.Context, in *adminin.OrderStatusInp) (err error) + } + IAdminPost interface { + // Delete 删除 + Delete(ctx context.Context, in *adminin.PostDeleteInp) (err error) + // VerifyUnique 验证部门唯一属性 + VerifyUnique(ctx context.Context, in *adminin.VerifyUniqueInp) (err error) + // Edit 修改/新增 + Edit(ctx context.Context, in *adminin.PostEditInp) (err error) + // MaxSort 最大排序 + MaxSort(ctx context.Context, in *adminin.PostMaxSortInp) (res *adminin.PostMaxSortModel, err error) + // View 获取指定岗位信息 + View(ctx context.Context, in *adminin.PostViewInp) (res *adminin.PostViewModel, err error) + // List 获取列表 + List(ctx context.Context, in *adminin.PostListInp) (list []*adminin.PostListModel, totalCount int, err error) + // Option 岗位选项 + Option(ctx context.Context) (opts []*model.Option, err error) + // GetMemberByStartName 获取指定用户的第一岗位 + GetMemberByStartName(ctx context.Context, memberId int64) (name string, err error) + // Status 更新状态 + Status(ctx context.Context, in *adminin.PostStatusInp) (err error) + } + IAdminRole interface { + // Verify 验证权限 + Verify(ctx context.Context, path string, method string) bool + // List 获取列表 + List(ctx context.Context, in *adminin.RoleListInp) (res *adminin.RoleListModel, totalCount int, err error) + // GetName 获取指定角色的名称 + GetName(ctx context.Context, id int64) (name string, err error) + // GetMemberList 获取指定用户的岗位列表 + GetMemberList(ctx context.Context, id int64) (list []*adminin.RoleListModel, err error) + // GetPermissions 更改角色菜单权限 + GetPermissions(ctx context.Context, in *adminin.GetPermissionsInp) (res *adminin.GetPermissionsModel, err error) + // UpdatePermissions 更改角色菜单权限 + UpdatePermissions(ctx context.Context, in *adminin.UpdatePermissionsInp) (err error) + Edit(ctx context.Context, in *adminin.RoleEditInp) (err error) + Delete(ctx context.Context, in *adminin.RoleDeleteInp) (err error) + DataScopeSelect() (res form.Selects) + DataScopeEdit(ctx context.Context, in *adminin.DataScopeEditInp) (err error) + // VerifyRoleId 验证角色ID + VerifyRoleId(ctx context.Context, id int64) (err error) + // GetSubRoleIds 获取所有下级角色ID + GetSubRoleIds(ctx context.Context, roleId int64, isSuper bool) (ids []int64, err error) + } + IAdminSite interface { + // Register 账号注册 + Register(ctx context.Context, in *adminin.RegisterInp) (err error) + // AccountLogin 账号登录 + AccountLogin(ctx context.Context, in *adminin.AccountLoginInp) (res *adminin.LoginModel, err error) + // MobileLogin 手机号登录 + MobileLogin(ctx context.Context, in *adminin.MobileLoginInp) (res *adminin.LoginModel, err error) + // BindUserContext 绑定用户上下文 + BindUserContext(ctx context.Context, claims *model.Identity) (err error) + } +) + +var ( + localAdminCash IAdminCash + localAdminCreditsLog IAdminCreditsLog + localAdminDept IAdminDept + localAdminMember IAdminMember + localAdminMemberPost IAdminMemberPost + localAdminMenu IAdminMenu + localAdminMonitor IAdminMonitor + localAdminNotice IAdminNotice + localAdminOrder IAdminOrder + localAdminPost IAdminPost + localAdminRole IAdminRole + localAdminSite IAdminSite +) + +func AdminCash() IAdminCash { + if localAdminCash == nil { + panic("implement not found for interface IAdminCash, forgot register?") + } + return localAdminCash +} + +func RegisterAdminCash(i IAdminCash) { + localAdminCash = i +} + +func AdminCreditsLog() IAdminCreditsLog { + if localAdminCreditsLog == nil { + panic("implement not found for interface IAdminCreditsLog, forgot register?") + } + return localAdminCreditsLog +} + +func RegisterAdminCreditsLog(i IAdminCreditsLog) { + localAdminCreditsLog = i +} + +func AdminDept() IAdminDept { + if localAdminDept == nil { + panic("implement not found for interface IAdminDept, forgot register?") + } + return localAdminDept +} + +func RegisterAdminDept(i IAdminDept) { + localAdminDept = i +} + +func AdminMember() IAdminMember { + if localAdminMember == nil { + panic("implement not found for interface IAdminMember, forgot register?") + } + return localAdminMember +} + +func RegisterAdminMember(i IAdminMember) { + localAdminMember = i +} + +func AdminMemberPost() IAdminMemberPost { + if localAdminMemberPost == nil { + panic("implement not found for interface IAdminMemberPost, forgot register?") + } + return localAdminMemberPost +} + +func RegisterAdminMemberPost(i IAdminMemberPost) { + localAdminMemberPost = i +} + +func AdminMenu() IAdminMenu { + if localAdminMenu == nil { + panic("implement not found for interface IAdminMenu, forgot register?") + } + return localAdminMenu +} + +func RegisterAdminMenu(i IAdminMenu) { + localAdminMenu = i +} + +func AdminMonitor() IAdminMonitor { + if localAdminMonitor == nil { + panic("implement not found for interface IAdminMonitor, forgot register?") + } + return localAdminMonitor +} + +func RegisterAdminMonitor(i IAdminMonitor) { + localAdminMonitor = i +} + +func AdminNotice() IAdminNotice { + if localAdminNotice == nil { + panic("implement not found for interface IAdminNotice, forgot register?") + } + return localAdminNotice +} + +func RegisterAdminNotice(i IAdminNotice) { + localAdminNotice = i +} + +func AdminOrder() IAdminOrder { + if localAdminOrder == nil { + panic("implement not found for interface IAdminOrder, forgot register?") + } + return localAdminOrder +} + +func RegisterAdminOrder(i IAdminOrder) { + localAdminOrder = i +} + +func AdminPost() IAdminPost { + if localAdminPost == nil { + panic("implement not found for interface IAdminPost, forgot register?") + } + return localAdminPost +} + +func RegisterAdminPost(i IAdminPost) { + localAdminPost = i +} + +func AdminRole() IAdminRole { + if localAdminRole == nil { + panic("implement not found for interface IAdminRole, forgot register?") + } + return localAdminRole +} + +func RegisterAdminRole(i IAdminRole) { + localAdminRole = i +} + +func AdminSite() IAdminSite { + if localAdminSite == nil { + panic("implement not found for interface IAdminSite, forgot register?") + } + return localAdminSite +} + +func RegisterAdminSite(i IAdminSite) { + localAdminSite = i +} diff --git a/server/internal/service/common.go b/server/internal/service/common.go new file mode 100644 index 0000000..ca788c1 --- /dev/null +++ b/server/internal/service/common.go @@ -0,0 +1,64 @@ +// ================================================================================ +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import ( + "context" + "hotgo/internal/model/input/commonin" + "hotgo/internal/model/input/sysin" + + "github.com/gogf/gf/v2/net/ghttp" +) + +type ( + ICommonUpload interface { + // UploadFile 上传文件 + UploadFile(ctx context.Context, uploadType string, file *ghttp.UploadFile) (res *sysin.AttachmentListModel, err error) + // CheckMultipart 检查文件分片 + CheckMultipart(ctx context.Context, in *sysin.CheckMultipartInp) (res *sysin.CheckMultipartModel, err error) + // UploadPart 上传分片 + UploadPart(ctx context.Context, in *sysin.UploadPartInp) (res *sysin.UploadPartModel, err error) + // ImageTransferStorage 图片链接转存 + ImageTransferStorage(ctx context.Context, in *sysin.ImageTransferStorageInp) (res *sysin.ImageTransferStorageModel, err error) + } + ICommonWechat interface { + // Authorize 微信用户授权 + Authorize(ctx context.Context, in *commonin.WechatAuthorizeInp) (res *commonin.WechatAuthorizeModel, err error) + AuthorizeCall(ctx context.Context, in *commonin.WechatAuthorizeCallInp) (res *commonin.WechatAuthorizeCallModel, err error) + // GetOpenId 从缓存中获取临时openid + GetOpenId(ctx context.Context) (openId string, err error) + GetCacheKey(typ string, ak string) string + // CleanTempMap 清理临时map + CleanTempMap(ctx context.Context) + } +) + +var ( + localCommonUpload ICommonUpload + localCommonWechat ICommonWechat +) + +func CommonUpload() ICommonUpload { + if localCommonUpload == nil { + panic("implement not found for interface ICommonUpload, forgot register?") + } + return localCommonUpload +} + +func RegisterCommonUpload(i ICommonUpload) { + localCommonUpload = i +} + +func CommonWechat() ICommonWechat { + if localCommonWechat == nil { + panic("implement not found for interface ICommonWechat, forgot register?") + } + return localCommonWechat +} + +func RegisterCommonWechat(i ICommonWechat) { + localCommonWechat = i +} diff --git a/server/internal/service/hook.go b/server/internal/service/hook.go new file mode 100644 index 0000000..22fc52a --- /dev/null +++ b/server/internal/service/hook.go @@ -0,0 +1,32 @@ +// ================================================================================ +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import ( + "github.com/gogf/gf/v2/net/ghttp" +) + +type ( + IHook interface { + BeforeServe(r *ghttp.Request) + AfterOutput(r *ghttp.Request) + } +) + +var ( + localHook IHook +) + +func Hook() IHook { + if localHook == nil { + panic("implement not found for interface IHook, forgot register?") + } + return localHook +} + +func RegisterHook(i IHook) { + localHook = i +} diff --git a/server/internal/service/middleware.go b/server/internal/service/middleware.go new file mode 100644 index 0000000..7a15a58 --- /dev/null +++ b/server/internal/service/middleware.go @@ -0,0 +1,63 @@ +// ================================================================================ +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import ( + "context" + + "github.com/gogf/gf/v2/net/ghttp" +) + +type ( + IMiddleware interface { + // AdminAuth 后台鉴权中间件 + AdminAuth(r *ghttp.Request) + // ApiAuth API鉴权中间件 + ApiAuth(r *ghttp.Request) + // HomeAuth 前台页面鉴权中间件 + HomeAuth(r *ghttp.Request) + // Ctx 初始化请求上下文 + Ctx(r *ghttp.Request) + // CORS allows Cross-origin resource sharing. + CORS(r *ghttp.Request) + // DemoLimit 演示系统操作限制 + DemoLimit(r *ghttp.Request) + // Addon 插件中间件 + Addon(r *ghttp.Request) + // DeliverUserContext 将用户信息传递到上下文中 + DeliverUserContext(r *ghttp.Request) (err error) + // IsExceptAuth 是否是不需要验证权限的路由地址 + IsExceptAuth(ctx context.Context, appName string, path string) bool + // IsExceptLogin 是否是不需要登录的路由地址 + IsExceptLogin(ctx context.Context, appName string, path string) bool + // Blacklist IP黑名单限制中间件 + Blacklist(r *ghttp.Request) + // Develop 开发工具白名单过滤 + Develop(r *ghttp.Request) + // PreFilter 请求输入预处理 + // api使用gf规范路由并且XxxReq结构体实现了validate.Filter接口即可 + PreFilter(r *ghttp.Request) + // ResponseHandler HTTP响应预处理 + ResponseHandler(r *ghttp.Request) + // WebSocketAuth websocket鉴权中间件 + WebSocketAuth(r *ghttp.Request) + } +) + +var ( + localMiddleware IMiddleware +) + +func Middleware() IMiddleware { + if localMiddleware == nil { + panic("implement not found for interface IMiddleware, forgot register?") + } + return localMiddleware +} + +func RegisterMiddleware(i IMiddleware) { + localMiddleware = i +} diff --git a/server/internal/service/pay.go b/server/internal/service/pay.go new file mode 100644 index 0000000..43e529e --- /dev/null +++ b/server/internal/service/pay.go @@ -0,0 +1,78 @@ +// ================================================================================ +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import ( + "context" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/model/input/payin" + + "github.com/gogf/gf/v2/database/gdb" +) + +type ( + IPay interface { + // Create 创建支付订单和日志 + Create(ctx context.Context, in payin.PayCreateInp) (res *payin.PayCreateModel, err error) + // GenNotifyURL 生成支付通知地址 + GenNotifyURL(ctx context.Context, in payin.PayCreateInp) (notifyURL string, err error) + // RegisterNotifyCall 注册支付成功回调方法 + RegisterNotifyCall() + // Notify 异步通知 + Notify(ctx context.Context, in *payin.PayNotifyInp) (res *payin.PayNotifyModel, err error) + // Model 支付日志ORM模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // List 获取支付日志列表 + List(ctx context.Context, in payin.PayListInp) (list []*payin.PayListModel, totalCount int, err error) + // Export 导出支付日志 + Export(ctx context.Context, in payin.PayListInp) (err error) + // Edit 修改/新增支付日志 + Edit(ctx context.Context, in payin.PayEditInp) (err error) + // Delete 删除支付日志 + Delete(ctx context.Context, in payin.PayDeleteInp) (err error) + // View 获取支付日志指定信息 + View(ctx context.Context, in payin.PayViewInp) (res *payin.PayViewModel, err error) + // Status 更新支付日志状态 + Status(ctx context.Context, in payin.PayStatusInp) (err error) + } + IPayRefund interface { + // Model 交易退款ORM模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // Refund 订单退款 + Refund(ctx context.Context, in *payin.PayRefundInp) (res *payin.PayRefundModel, err error) + // List 获取交易退款列表 + List(ctx context.Context, in *payin.PayRefundListInp) (list []*payin.PayRefundListModel, totalCount int, err error) + // Export 导出交易退款 + Export(ctx context.Context, in *payin.PayRefundListInp) (err error) + } +) + +var ( + localPay IPay + localPayRefund IPayRefund +) + +func Pay() IPay { + if localPay == nil { + panic("implement not found for interface IPay, forgot register?") + } + return localPay +} + +func RegisterPay(i IPay) { + localPay = i +} + +func PayRefund() IPayRefund { + if localPayRefund == nil { + panic("implement not found for interface IPayRefund, forgot register?") + } + return localPayRefund +} + +func RegisterPayRefund(i IPayRefund) { + localPayRefund = i +} diff --git a/server/internal/service/sys.go b/server/internal/service/sys.go new file mode 100644 index 0000000..1b94874 --- /dev/null +++ b/server/internal/service/sys.go @@ -0,0 +1,661 @@ +// ================================================================================ +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import ( + "context" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/model" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/sysin" + "hotgo/utility/tree" + + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/database/gredis" + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/net/ghttp" +) + +type ( + ISysAddons interface { + // List 获取列表 + List(ctx context.Context, in *sysin.AddonsListInp) (list []*sysin.AddonsListModel, totalCount int, err error) + // Build 提交生成 + Build(ctx context.Context, in *sysin.AddonsBuildInp) (err error) + // Install 安装模块 + Install(ctx context.Context, in *sysin.AddonsInstallInp) (err error) + // Upgrade 更新模块 + Upgrade(ctx context.Context, in *sysin.AddonsUpgradeInp) (err error) + // UnInstall 卸载模块 + UnInstall(ctx context.Context, in *sysin.AddonsUnInstallInp) (err error) + } + ISysAddonsConfig interface { + // GetConfigByGroup 获取指定分组的配置 + GetConfigByGroup(ctx context.Context, in *sysin.GetAddonsConfigInp) (res *sysin.GetAddonsConfigModel, err error) + // ConversionType 转换类型 + ConversionType(ctx context.Context, models *entity.SysAddonsConfig) (value interface{}, err error) + // UpdateConfigByGroup 更新指定分组的配置 + UpdateConfigByGroup(ctx context.Context, in *sysin.UpdateAddonsConfigInp) (err error) + } + ISysAttachment interface { + // Model ORM模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // Delete 删除附件 + Delete(ctx context.Context, in *sysin.AttachmentDeleteInp) (err error) + // View 获取附件信息 + View(ctx context.Context, in *sysin.AttachmentViewInp) (res *sysin.AttachmentViewModel, err error) + // List 获取附件列表 + List(ctx context.Context, in *sysin.AttachmentListInp) (list []*sysin.AttachmentListModel, totalCount int, err error) + // ClearKind 清空上传类型 + ClearKind(ctx context.Context, in *sysin.AttachmentClearKindInp) (err error) + // AttachmentKindOption 上传类型选项 + AttachmentKindOption(ctx context.Context) (opts []*model.Option, err error) + } + ISysBlacklist interface { + // Delete 删除 + Delete(ctx context.Context, in *sysin.BlacklistDeleteInp) (err error) + // Edit 修改/新增 + Edit(ctx context.Context, in *sysin.BlacklistEditInp) (err error) + // Status 更新状态 + Status(ctx context.Context, in *sysin.BlacklistStatusInp) (err error) + // View 获取指定信息 + View(ctx context.Context, in *sysin.BlacklistViewInp) (res *sysin.BlacklistViewModel, err error) + // List 获取列表 + List(ctx context.Context, in *sysin.BlacklistListInp) (list []*sysin.BlacklistListModel, totalCount int, err error) + // VariableLoad 变化加载 + VariableLoad(ctx context.Context, err error) + // Load 加载黑名单 + Load(ctx context.Context) + // VerifyRequest 验证请求的访问IP是否在黑名单,如果存在则返回错误 + VerifyRequest(r *ghttp.Request) (err error) + // ClusterSync 集群同步 + ClusterSync(ctx context.Context, message *gredis.Message) + } + ISysConfig interface { + // InitConfig 初始化系统配置 + InitConfig(ctx context.Context) + // LoadConfig 加载系统配置 + LoadConfig(ctx context.Context) (err error) + // GetLogin 获取登录配置 + GetLogin(ctx context.Context) (conf *model.LoginConfig, err error) + // GetWechat 获取微信配置 + GetWechat(ctx context.Context) (conf *model.WechatConfig, err error) + // GetPay 获取支付配置 + GetPay(ctx context.Context) (conf *model.PayConfig, err error) + // GetSms 获取短信配置 + GetSms(ctx context.Context) (conf *model.SmsConfig, err error) + // GetGeo 获取地理配置 + GetGeo(ctx context.Context) (conf *model.GeoConfig, err error) + // GetUpload 获取上传配置 + GetUpload(ctx context.Context) (conf *model.UploadConfig, err error) + // GetSmtp 获取邮件配置 + GetSmtp(ctx context.Context) (conf *model.EmailConfig, err error) + // GetBasic 获取基础配置 + GetBasic(ctx context.Context) (conf *model.BasicConfig, err error) + // GetLoadTCP 获取本地tcp配置 + GetLoadTCP(ctx context.Context) (conf *model.TCPConfig, err error) + // GetLoadGenerate 获取本地生成配置 + GetLoadGenerate(ctx context.Context) (conf *model.GenerateConfig, err error) + // GetLoadToken 获取本地token配置 + GetLoadToken(ctx context.Context) (conf *model.TokenConfig, err error) + // GetLoadLog 获取本地日志配置 + GetLoadLog(ctx context.Context) (conf *model.LogConfig, err error) + // GetLoadServeLog 获取本地服务日志配置 + GetLoadServeLog(ctx context.Context) (conf *model.ServeLogConfig, err error) + // GetConfigByGroup 获取指定分组的配置 + GetConfigByGroup(ctx context.Context, in *sysin.GetConfigInp) (res *sysin.GetConfigModel, err error) + // ConversionType 转换类型 + ConversionType(ctx context.Context, models *entity.SysConfig) (value interface{}, err error) + // UpdateConfigByGroup 更新指定分组的配置 + UpdateConfigByGroup(ctx context.Context, in *sysin.UpdateConfigInp) (err error) + // ClusterSync 集群同步 + ClusterSync(ctx context.Context, message *gredis.Message) + } + ISysCron interface { + StartCron(ctx context.Context) + // Delete 删除 + Delete(ctx context.Context, in *sysin.CronDeleteInp) (err error) + // Edit 修改/新增 + Edit(ctx context.Context, in *sysin.CronEditInp) (err error) + // Status 更新状态 + Status(ctx context.Context, in *sysin.CronStatusInp) (err error) + // MaxSort 最大排序 + MaxSort(ctx context.Context, in *sysin.CronMaxSortInp) (res *sysin.CronMaxSortModel, err error) + // View 获取指定信息 + View(ctx context.Context, in *sysin.CronViewInp) (res *sysin.CronViewModel, err error) + // List 获取列表 + List(ctx context.Context, in *sysin.CronListInp) (list []*sysin.CronListModel, totalCount int, err error) + // GetName 获取分组名称 + GetName(ctx context.Context, id int64) (name string, err error) + // OnlineExec 在线执行 + OnlineExec(ctx context.Context, in *sysin.OnlineExecInp) (err error) + // DispatchLog 查看指定任务的调度日志 + DispatchLog(ctx context.Context, in *sysin.DispatchLogInp) (res *sysin.DispatchLogModel, err error) + } + ISysCronGroup interface { + // Delete 删除 + Delete(ctx context.Context, in *sysin.CronGroupDeleteInp) (err error) + // Edit 修改/新增 + Edit(ctx context.Context, in *sysin.CronGroupEditInp) (err error) + // Status 更新状态 + Status(ctx context.Context, in *sysin.CronGroupStatusInp) (err error) + // MaxSort 最大排序 + MaxSort(ctx context.Context, in *sysin.CronGroupMaxSortInp) (res *sysin.CronGroupMaxSortModel, err error) + // View 获取指定信息 + View(ctx context.Context, in *sysin.CronGroupViewInp) (res *sysin.CronGroupViewModel, err error) + // List 获取列表 + List(ctx context.Context, in *sysin.CronGroupListInp) (list []*sysin.CronGroupListModel, totalCount int, err error) + // Select 选项 + Select(ctx context.Context, in *sysin.CronGroupSelectInp) (res *sysin.CronGroupSelectModel, err error) + } + ISysCurdDemo interface { + // Model CURD列表ORM模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // List 获取CURD列表列表 + List(ctx context.Context, in *sysin.CurdDemoListInp) (list []*sysin.CurdDemoListModel, totalCount int, err error) + // Export 导出CURD列表 + Export(ctx context.Context, in *sysin.CurdDemoListInp) (err error) + // Edit 修改/新增CURD列表 + Edit(ctx context.Context, in *sysin.CurdDemoEditInp) (err error) + // Delete 删除CURD列表 + Delete(ctx context.Context, in *sysin.CurdDemoDeleteInp) (err error) + // MaxSort 获取CURD列表最大排序 + MaxSort(ctx context.Context, in *sysin.CurdDemoMaxSortInp) (res *sysin.CurdDemoMaxSortModel, err error) + // View 获取CURD列表指定信息 + View(ctx context.Context, in *sysin.CurdDemoViewInp) (res *sysin.CurdDemoViewModel, err error) + // Status 更新CURD列表状态 + Status(ctx context.Context, in *sysin.CurdDemoStatusInp) (err error) + // Switch 更新CURD列表开关 + Switch(ctx context.Context, in *sysin.CurdDemoSwitchInp) (err error) + } + ISysDictData interface { + // Delete 删除 + Delete(ctx context.Context, in *sysin.DictDataDeleteInp) error + // Edit 修改/新增 + Edit(ctx context.Context, in *sysin.DictDataEditInp) (err error) + // List 获取列表 + List(ctx context.Context, in *sysin.DictDataListInp) (list []*sysin.DictDataListModel, totalCount int, err error) + // GetId 获取指定类型的ID + GetId(ctx context.Context, t string) (id int64, err error) + // GetType 获取指定ID的类型标识 + GetType(ctx context.Context, id int64) (types string, err error) + // GetTypes 获取指定ID的所有类型标识,包含下级 + GetTypes(ctx context.Context, id int64) (types []string, err error) + // Select 获取列表 + Select(ctx context.Context, in *sysin.DataSelectInp) (list sysin.DataSelectModel, err error) + } + ISysDictType interface { + // Tree 树 + Tree(ctx context.Context) (list []*sysin.DictTypeTree, err error) + // Delete 删除 + Delete(ctx context.Context, in *sysin.DictTypeDeleteInp) (err error) + // Edit 修改/新增 + Edit(ctx context.Context, in *sysin.DictTypeEditInp) (err error) + // TreeSelect 获取类型关系树选项 + TreeSelect(ctx context.Context, in *sysin.DictTreeSelectInp) (list []*sysin.DictTypeTree, err error) + // BuiltinSelect 内置字典选项 + BuiltinSelect() (list []*sysin.DictTypeTree) + } + ISysEmsLog interface { + // Delete 删除 + Delete(ctx context.Context, in *sysin.EmsLogDeleteInp) (err error) + // Edit 修改/新增 + Edit(ctx context.Context, in *sysin.EmsLogEditInp) (err error) + // Status 更新部门状态 + Status(ctx context.Context, in *sysin.EmsLogStatusInp) (err error) + // View 获取指定字典类型信息 + View(ctx context.Context, in *sysin.EmsLogViewInp) (res *sysin.EmsLogViewModel, err error) + // List 获取列表 + List(ctx context.Context, in *sysin.EmsLogListInp) (list []*sysin.EmsLogListModel, totalCount int, err error) + // Send 发送邮件 + Send(ctx context.Context, in *sysin.SendEmsInp) (err error) + // GetTemplate 获取指定邮件模板 + GetTemplate(ctx context.Context, template string, config *model.EmailConfig) (val string, err error) + // AllowSend 是否允许发送 + AllowSend(ctx context.Context, models *entity.SysEmsLog, config *model.EmailConfig) (err error) + // NowDayIpSendCount 当天IP累计发送次数 + NowDayIpSendCount(ctx context.Context, event string) (count int, err error) + // VerifyCode 效验验证码 + VerifyCode(ctx context.Context, in *sysin.VerifyEmsCodeInp) (err error) + } + ISysGenCodes interface { + // Delete 删除 + Delete(ctx context.Context, in *sysin.GenCodesDeleteInp) (err error) + // Edit 修改/新增 + Edit(ctx context.Context, in *sysin.GenCodesEditInp) (res *sysin.GenCodesEditModel, err error) + // Status 更新部门状态 + Status(ctx context.Context, in *sysin.GenCodesStatusInp) (err error) + // MaxSort 最大排序 + MaxSort(ctx context.Context, in *sysin.GenCodesMaxSortInp) (res *sysin.GenCodesMaxSortModel, err error) + // View 获取指定字典类型信息 + View(ctx context.Context, in *sysin.GenCodesViewInp) (res *sysin.GenCodesViewModel, err error) + // List 获取列表 + List(ctx context.Context, in *sysin.GenCodesListInp) (list []*sysin.GenCodesListModel, totalCount int, err error) + // Selects 选项 + Selects(ctx context.Context, in *sysin.GenCodesSelectsInp) (res *sysin.GenCodesSelectsModel, err error) + // TableSelect 表选项 + TableSelect(ctx context.Context, in *sysin.GenCodesTableSelectInp) (res []*sysin.GenCodesTableSelectModel, err error) + // ColumnSelect 表字段选项 + ColumnSelect(ctx context.Context, in *sysin.GenCodesColumnSelectInp) (res []*sysin.GenCodesColumnSelectModel, err error) + // ColumnList 表字段列表 + ColumnList(ctx context.Context, in *sysin.GenCodesColumnListInp) (res []*sysin.GenCodesColumnListModel, err error) + // Preview 生成预览 + Preview(ctx context.Context, in *sysin.GenCodesPreviewInp) (res *sysin.GenCodesPreviewModel, err error) + // Build 提交生成 + Build(ctx context.Context, in *sysin.GenCodesBuildInp) (err error) + } + ISysLog interface { + // Model 请求日志Orm模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // Export 导出 + Export(ctx context.Context, in *sysin.LogListInp) (err error) + // RealWrite 真实写入 + RealWrite(ctx context.Context, log entity.SysLog) (err error) + // AutoLog 根据配置自动记录请求日志 + AutoLog(ctx context.Context) error + // AnalysisLog 解析日志数据 + AnalysisLog(ctx context.Context) entity.SysLog + // SimplifyHeaderParams 过滤掉请求头中的大参数 + SimplifyHeaderParams(data *gjson.Json) *gjson.Json + // View 获取指定请求日志信息 + View(ctx context.Context, in *sysin.LogViewInp) (res *sysin.LogViewModel, err error) + // Delete 删除请求日志 + Delete(ctx context.Context, in *sysin.LogDeleteInp) (err error) + // List 请求日志列表 + List(ctx context.Context, in *sysin.LogListInp) (list []*sysin.LogListModel, totalCount int, err error) + } + ISysLoginLog interface { + // Model 登录日志Orm模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // List 获取登录日志列表 + List(ctx context.Context, in *sysin.LoginLogListInp) (list []*sysin.LoginLogListModel, totalCount int, err error) + // Export 导出登录日志 + Export(ctx context.Context, in *sysin.LoginLogListInp) (err error) + // Delete 删除登录日志 + Delete(ctx context.Context, in *sysin.LoginLogDeleteInp) (err error) + // Push 推送登录日志 + Push(ctx context.Context, in *sysin.LoginLogPushInp) + // RealWrite 真实写入 + RealWrite(ctx context.Context, models entity.SysLoginLog) (err error) + } + ISysNormalTreeDemo interface { + // Model 普通树表ORM模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // List 获取普通树表列表 + List(ctx context.Context, in *sysin.NormalTreeDemoListInp) (list []*sysin.NormalTreeDemoListModel, totalCount int, err error) + // Edit 修改/新增普通树表 + Edit(ctx context.Context, in *sysin.NormalTreeDemoEditInp) (err error) + // Delete 删除普通树表 + Delete(ctx context.Context, in *sysin.NormalTreeDemoDeleteInp) (err error) + // MaxSort 获取普通树表最大排序 + MaxSort(ctx context.Context, in *sysin.NormalTreeDemoMaxSortInp) (res *sysin.NormalTreeDemoMaxSortModel, err error) + // View 获取普通树表指定信息 + View(ctx context.Context, in *sysin.NormalTreeDemoViewInp) (res *sysin.NormalTreeDemoViewModel, err error) + // TreeOption 获取普通树表关系树选项 + TreeOption(ctx context.Context) (nodes []tree.Node, err error) + } + ISysOptionTreeDemo interface { + // Model 选项树表ORM模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // List 获取选项树表列表 + List(ctx context.Context, in *sysin.OptionTreeDemoListInp) (list []*sysin.OptionTreeDemoListModel, totalCount int, err error) + // Edit 修改/新增选项树表 + Edit(ctx context.Context, in *sysin.OptionTreeDemoEditInp) (err error) + // Delete 删除选项树表 + Delete(ctx context.Context, in *sysin.OptionTreeDemoDeleteInp) (err error) + // MaxSort 获取选项树表最大排序 + MaxSort(ctx context.Context, in *sysin.OptionTreeDemoMaxSortInp) (res *sysin.OptionTreeDemoMaxSortModel, err error) + // View 获取选项树表指定信息 + View(ctx context.Context, in *sysin.OptionTreeDemoViewInp) (res *sysin.OptionTreeDemoViewModel, err error) + // TreeOption 获取选项树表关系树选项 + TreeOption(ctx context.Context) (nodes []tree.Node, err error) + } + ISysProvinces interface { + // Tree 关系树选项列表 + Tree(ctx context.Context) (list []*sysin.ProvincesTree, err error) + // Delete 删除省市区数据 + Delete(ctx context.Context, in *sysin.ProvincesDeleteInp) (err error) + // Edit 修改/新增省市区数据 + Edit(ctx context.Context, in *sysin.ProvincesEditInp) (err error) + // Status 更新省市区状态 + Status(ctx context.Context, in *sysin.ProvincesStatusInp) (err error) + // MaxSort 最大排序 + MaxSort(ctx context.Context, in *sysin.ProvincesMaxSortInp) (res *sysin.ProvincesMaxSortModel, err error) + // View 获取省市区信息 + View(ctx context.Context, in *sysin.ProvincesViewInp) (res *sysin.ProvincesViewModel, err error) + // List 获取列表 + List(ctx context.Context, in *sysin.ProvincesListInp) (list []*sysin.ProvincesListModel, totalCount int, err error) + // ChildrenList 获取省市区下级列表 + ChildrenList(ctx context.Context, in *sysin.ProvincesChildrenListInp) (list []*sysin.ProvincesChildrenListModel, totalCount int, err error) + // UniqueId 获取省市区下级列表 + UniqueId(ctx context.Context, in *sysin.ProvincesUniqueIdInp) (res *sysin.ProvincesUniqueIdModel, err error) + // Select 省市区选项 + Select(ctx context.Context, in *sysin.ProvincesSelectInp) (res *sysin.ProvincesSelectModel, err error) + } + ISysServeLicense interface { + // Model 服务许可证ORM模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // List 获取服务许可证列表 + List(ctx context.Context, in *sysin.ServeLicenseListInp) (list []*sysin.ServeLicenseListModel, totalCount int, err error) + // Export 导出服务许可证 + Export(ctx context.Context, in *sysin.ServeLicenseListInp) (err error) + // Edit 修改/新增服务许可证 + Edit(ctx context.Context, in *sysin.ServeLicenseEditInp) (err error) + // Delete 删除服务许可证 + Delete(ctx context.Context, in *sysin.ServeLicenseDeleteInp) (err error) + // View 获取服务许可证指定信息 + View(ctx context.Context, in *sysin.ServeLicenseViewInp) (res *sysin.ServeLicenseViewModel, err error) + // Status 更新服务许可证状态 + Status(ctx context.Context, in *sysin.ServeLicenseStatusInp) (err error) + // AssignRouter 分配服务许可证路由 + AssignRouter(ctx context.Context, in *sysin.ServeLicenseAssignRouterInp) (err error) + } + ISysServeLog interface { + // Model 服务日志Orm模型 + Model(ctx context.Context) *gdb.Model + // List 获取服务日志列表 + List(ctx context.Context, in *sysin.ServeLogListInp) (list []*sysin.ServeLogListModel, totalCount int, err error) + // Export 导出服务日志 + Export(ctx context.Context, in *sysin.ServeLogListInp) (err error) + // Delete 删除服务日志 + Delete(ctx context.Context, in *sysin.ServeLogDeleteInp) (err error) + // View 获取服务日志指定信息 + View(ctx context.Context, in *sysin.ServeLogViewInp) (res *sysin.ServeLogViewModel, err error) + // RealWrite 真实写入 + RealWrite(ctx context.Context, models entity.SysServeLog) (err error) + } + ISysSmsLog interface { + // Delete 删除 + Delete(ctx context.Context, in *sysin.SmsLogDeleteInp) (err error) + // View 获取指定字典类型信息 + View(ctx context.Context, in *sysin.SmsLogViewInp) (res *sysin.SmsLogViewModel, err error) + // List 获取列表 + List(ctx context.Context, in *sysin.SmsLogListInp) (list []*sysin.SmsLogListModel, totalCount int, err error) + // SendCode 发送验证码 + SendCode(ctx context.Context, in *sysin.SendCodeInp) (err error) + // GetTemplate 获取指定短信模板 + GetTemplate(ctx context.Context, template string, config *model.SmsConfig) (val string, err error) + // AllowSend 是否允许发送 + AllowSend(ctx context.Context, models *entity.SysSmsLog, config *model.SmsConfig) (err error) + // NowDayIpSendCount 当天IP累计发送次数 + NowDayIpSendCount(ctx context.Context, event string) (count int, err error) + // VerifyCode 效验验证码 + VerifyCode(ctx context.Context, in *sysin.VerifyCodeInp) (err error) + } + ISysTestCategory interface { + // Model 测试分类ORM模型 + Model(ctx context.Context, option ...*handler.Option) *gdb.Model + // List 获取测试分类列表 + List(ctx context.Context, in *sysin.TestCategoryListInp) (list []*sysin.TestCategoryListModel, totalCount int, err error) + // Edit 修改/新增测试分类 + Edit(ctx context.Context, in *sysin.TestCategoryEditInp) (err error) + // Delete 删除测试分类 + Delete(ctx context.Context, in *sysin.TestCategoryDeleteInp) (err error) + // MaxSort 获取测试分类最大排序 + MaxSort(ctx context.Context, in *sysin.TestCategoryMaxSortInp) (res *sysin.TestCategoryMaxSortModel, err error) + // View 获取测试分类指定信息 + View(ctx context.Context, in *sysin.TestCategoryViewInp) (res *sysin.TestCategoryViewModel, err error) + // Status 更新测试分类状态 + Status(ctx context.Context, in *sysin.TestCategoryStatusInp) (err error) + // Option 获取测试分类选项 + Option(ctx context.Context) (opts []*model.Option, err error) + } +) + +var ( + localSysAddons ISysAddons + localSysAddonsConfig ISysAddonsConfig + localSysAttachment ISysAttachment + localSysBlacklist ISysBlacklist + localSysConfig ISysConfig + localSysCron ISysCron + localSysCronGroup ISysCronGroup + localSysCurdDemo ISysCurdDemo + localSysDictData ISysDictData + localSysDictType ISysDictType + localSysEmsLog ISysEmsLog + localSysGenCodes ISysGenCodes + localSysLog ISysLog + localSysLoginLog ISysLoginLog + localSysNormalTreeDemo ISysNormalTreeDemo + localSysOptionTreeDemo ISysOptionTreeDemo + localSysProvinces ISysProvinces + localSysServeLicense ISysServeLicense + localSysServeLog ISysServeLog + localSysSmsLog ISysSmsLog + localSysTestCategory ISysTestCategory +) + +func SysAddons() ISysAddons { + if localSysAddons == nil { + panic("implement not found for interface ISysAddons, forgot register?") + } + return localSysAddons +} + +func RegisterSysAddons(i ISysAddons) { + localSysAddons = i +} + +func SysAddonsConfig() ISysAddonsConfig { + if localSysAddonsConfig == nil { + panic("implement not found for interface ISysAddonsConfig, forgot register?") + } + return localSysAddonsConfig +} + +func RegisterSysAddonsConfig(i ISysAddonsConfig) { + localSysAddonsConfig = i +} + +func SysAttachment() ISysAttachment { + if localSysAttachment == nil { + panic("implement not found for interface ISysAttachment, forgot register?") + } + return localSysAttachment +} + +func RegisterSysAttachment(i ISysAttachment) { + localSysAttachment = i +} + +func SysBlacklist() ISysBlacklist { + if localSysBlacklist == nil { + panic("implement not found for interface ISysBlacklist, forgot register?") + } + return localSysBlacklist +} + +func RegisterSysBlacklist(i ISysBlacklist) { + localSysBlacklist = i +} + +func SysConfig() ISysConfig { + if localSysConfig == nil { + panic("implement not found for interface ISysConfig, forgot register?") + } + return localSysConfig +} + +func RegisterSysConfig(i ISysConfig) { + localSysConfig = i +} + +func SysCron() ISysCron { + if localSysCron == nil { + panic("implement not found for interface ISysCron, forgot register?") + } + return localSysCron +} + +func RegisterSysCron(i ISysCron) { + localSysCron = i +} + +func SysCronGroup() ISysCronGroup { + if localSysCronGroup == nil { + panic("implement not found for interface ISysCronGroup, forgot register?") + } + return localSysCronGroup +} + +func RegisterSysCronGroup(i ISysCronGroup) { + localSysCronGroup = i +} + +func SysCurdDemo() ISysCurdDemo { + if localSysCurdDemo == nil { + panic("implement not found for interface ISysCurdDemo, forgot register?") + } + return localSysCurdDemo +} + +func RegisterSysCurdDemo(i ISysCurdDemo) { + localSysCurdDemo = i +} + +func SysDictData() ISysDictData { + if localSysDictData == nil { + panic("implement not found for interface ISysDictData, forgot register?") + } + return localSysDictData +} + +func RegisterSysDictData(i ISysDictData) { + localSysDictData = i +} + +func SysDictType() ISysDictType { + if localSysDictType == nil { + panic("implement not found for interface ISysDictType, forgot register?") + } + return localSysDictType +} + +func RegisterSysDictType(i ISysDictType) { + localSysDictType = i +} + +func SysEmsLog() ISysEmsLog { + if localSysEmsLog == nil { + panic("implement not found for interface ISysEmsLog, forgot register?") + } + return localSysEmsLog +} + +func RegisterSysEmsLog(i ISysEmsLog) { + localSysEmsLog = i +} + +func SysGenCodes() ISysGenCodes { + if localSysGenCodes == nil { + panic("implement not found for interface ISysGenCodes, forgot register?") + } + return localSysGenCodes +} + +func RegisterSysGenCodes(i ISysGenCodes) { + localSysGenCodes = i +} + +func SysLog() ISysLog { + if localSysLog == nil { + panic("implement not found for interface ISysLog, forgot register?") + } + return localSysLog +} + +func RegisterSysLog(i ISysLog) { + localSysLog = i +} + +func SysLoginLog() ISysLoginLog { + if localSysLoginLog == nil { + panic("implement not found for interface ISysLoginLog, forgot register?") + } + return localSysLoginLog +} + +func RegisterSysLoginLog(i ISysLoginLog) { + localSysLoginLog = i +} + +func SysNormalTreeDemo() ISysNormalTreeDemo { + if localSysNormalTreeDemo == nil { + panic("implement not found for interface ISysNormalTreeDemo, forgot register?") + } + return localSysNormalTreeDemo +} + +func RegisterSysNormalTreeDemo(i ISysNormalTreeDemo) { + localSysNormalTreeDemo = i +} + +func SysOptionTreeDemo() ISysOptionTreeDemo { + if localSysOptionTreeDemo == nil { + panic("implement not found for interface ISysOptionTreeDemo, forgot register?") + } + return localSysOptionTreeDemo +} + +func RegisterSysOptionTreeDemo(i ISysOptionTreeDemo) { + localSysOptionTreeDemo = i +} + +func SysProvinces() ISysProvinces { + if localSysProvinces == nil { + panic("implement not found for interface ISysProvinces, forgot register?") + } + return localSysProvinces +} + +func RegisterSysProvinces(i ISysProvinces) { + localSysProvinces = i +} + +func SysServeLicense() ISysServeLicense { + if localSysServeLicense == nil { + panic("implement not found for interface ISysServeLicense, forgot register?") + } + return localSysServeLicense +} + +func RegisterSysServeLicense(i ISysServeLicense) { + localSysServeLicense = i +} + +func SysServeLog() ISysServeLog { + if localSysServeLog == nil { + panic("implement not found for interface ISysServeLog, forgot register?") + } + return localSysServeLog +} + +func RegisterSysServeLog(i ISysServeLog) { + localSysServeLog = i +} + +func SysSmsLog() ISysSmsLog { + if localSysSmsLog == nil { + panic("implement not found for interface ISysSmsLog, forgot register?") + } + return localSysSmsLog +} + +func RegisterSysSmsLog(i ISysSmsLog) { + localSysSmsLog = i +} + +func SysTestCategory() ISysTestCategory { + if localSysTestCategory == nil { + panic("implement not found for interface ISysTestCategory, forgot register?") + } + return localSysTestCategory +} + +func RegisterSysTestCategory(i ISysTestCategory) { + localSysTestCategory = i +} diff --git a/server/internal/service/tcpclient.go b/server/internal/service/tcpclient.go new file mode 100644 index 0000000..d0911b5 --- /dev/null +++ b/server/internal/service/tcpclient.go @@ -0,0 +1,77 @@ +// ================================================================================ +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import ( + "context" + "hotgo/api/servmsg" + "hotgo/internal/library/network/tcp" + "hotgo/internal/model/input/servmsgin" +) + +type ( + IAuthClient interface { + // Instance 获取实例 + Instance() *tcp.Client + // Start 启动服务 + Start(ctx context.Context) + // Stop 停止服务 + Stop(ctx context.Context) + // Summary 获取授权信息 + Summary() *servmsgin.AuthSummaryModel + // OnResponseAuthSummary 响应授权信息 + OnResponseAuthSummary(ctx context.Context, req *servmsg.AuthSummaryRes) + // OnResponseExampleHello 一个tcp请求例子 + OnResponseExampleHello(ctx context.Context, req *servmsg.ExampleHelloRes) + } + ICronClient interface { + // Instance 获取实例 + Instance() *tcp.Client + // Start 启动服务 + Start(ctx context.Context) + // Stop 停止服务 + Stop(ctx context.Context) + // OnCronDelete 删除任务 + OnCronDelete(ctx context.Context, req *servmsg.CronDeleteReq) (res *servmsg.CronDeleteRes, err error) + // OnCronEdit 编辑任务 + OnCronEdit(ctx context.Context, req *servmsg.CronEditReq) (res *servmsg.CronEditRes, err error) + // OnCronStatus 修改任务状态 + OnCronStatus(ctx context.Context, req *servmsg.CronStatusReq) (res *servmsg.CronStatusRes, err error) + // OnCronOnlineExec 执行一次任务 + OnCronOnlineExec(ctx context.Context, req *servmsg.CronOnlineExecReq) (res *servmsg.CronOnlineExecRes, err error) + // OnCronDispatchLog 查看调度日志 + OnCronDispatchLog(ctx context.Context, req *servmsg.CronDispatchLogReq) (res *servmsg.CronDispatchLogRes, err error) + // DefaultInterceptor 默认拦截器 + DefaultInterceptor(ctx context.Context, msg *tcp.Message) (err error) + } +) + +var ( + localAuthClient IAuthClient + localCronClient ICronClient +) + +func AuthClient() IAuthClient { + if localAuthClient == nil { + panic("implement not found for interface IAuthClient, forgot register?") + } + return localAuthClient +} + +func RegisterAuthClient(i IAuthClient) { + localAuthClient = i +} + +func CronClient() ICronClient { + if localCronClient == nil { + panic("implement not found for interface ICronClient, forgot register?") + } + return localCronClient +} + +func RegisterCronClient(i ICronClient) { + localCronClient = i +} diff --git a/server/internal/service/tcpserver.go b/server/internal/service/tcpserver.go new file mode 100644 index 0000000..a6c0767 --- /dev/null +++ b/server/internal/service/tcpserver.go @@ -0,0 +1,59 @@ +// ================================================================================ +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import ( + "context" + "hotgo/api/servmsg" + "hotgo/internal/library/cron" + "hotgo/internal/library/network/tcp" +) + +type ( + ITCPServer interface { + // OnAuthSummary 获取授权信息 + OnAuthSummary(ctx context.Context, req *servmsg.AuthSummaryReq) + // CronDelete 删除任务 + CronDelete(ctx context.Context, in *servmsg.CronDeleteReq) (err error) + // CronEdit 编辑任务 + CronEdit(ctx context.Context, in *servmsg.CronEditReq) (err error) + // CronStatus 修改任务状态 + CronStatus(ctx context.Context, in *servmsg.CronStatusReq) (err error) + // CronOnlineExec 执行一次任务 + CronOnlineExec(ctx context.Context, in *servmsg.CronOnlineExecReq) (err error) + // DispatchLog 查看调度日志 + DispatchLog(ctx context.Context, in *servmsg.CronDispatchLogReq) (log *cron.Log, err error) + // OnExampleHello 一个tcp请求例子 + OnExampleHello(ctx context.Context, req *servmsg.ExampleHelloReq) + // OnExampleRPCHello 一个rpc请求例子 + OnExampleRPCHello(ctx context.Context, req *servmsg.ExampleRPCHelloReq) (res *servmsg.ExampleRPCHelloRes, err error) + // Instance 获取实例 + Instance() *tcp.Server + // Start 启动服务 + Start(ctx context.Context) + // Stop 关闭服务 + Stop(ctx context.Context) + // DefaultInterceptor 默认拦截器 + DefaultInterceptor(ctx context.Context, msg *tcp.Message) (err error) + // PreFilterInterceptor 预处理 + PreFilterInterceptor(ctx context.Context, msg *tcp.Message) (err error) + } +) + +var ( + localTCPServer ITCPServer +) + +func TCPServer() ITCPServer { + if localTCPServer == nil { + panic("implement not found for interface ITCPServer, forgot register?") + } + return localTCPServer +} + +func RegisterTCPServer(i ITCPServer) { + localTCPServer = i +} diff --git a/server/internal/service/view.go b/server/internal/service/view.go new file mode 100644 index 0000000..ecf67b7 --- /dev/null +++ b/server/internal/service/view.go @@ -0,0 +1,41 @@ +// ================================================================================ +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import ( + "context" + "hotgo/internal/model" +) + +type ( + IView interface { + // GetBreadCrumb 前台系统-获取面包屑列表 + GetBreadCrumb(ctx context.Context, in *model.ViewGetBreadCrumbInput) []model.ViewBreadCrumb + // GetTitle 前台系统-获取标题 + GetTitle(ctx context.Context, in *model.ViewGetTitleInput) string + // RenderTpl 渲染指定模板页面 + RenderTpl(ctx context.Context, tpl string, data ...model.View) + // Render 渲染默认模板页面 + Render(ctx context.Context, data ...model.View) + // Error 自定义错误页面 + Error(ctx context.Context, err error) + } +) + +var ( + localView IView +) + +func View() IView { + if localView == nil { + panic("implement not found for interface IView, forgot register?") + } + return localView +} + +func RegisterView(i IView) { + localView = i +} diff --git a/server/internal/websocket/client.go b/server/internal/websocket/client.go new file mode 100644 index 0000000..5bfb159 --- /dev/null +++ b/server/internal/websocket/client.go @@ -0,0 +1,199 @@ +// Package websocket +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package websocket + +import ( + "context" + "github.com/gogf/gf/v2/container/garray" + "github.com/gogf/gf/v2/errors/gcode" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/util/guid" + "github.com/gorilla/websocket" + "hotgo/internal/library/contexts" + "hotgo/internal/library/location" + "hotgo/internal/model" + "runtime/debug" +) + +const ( + // 用户连接超时时间 + heartbeatExpirationTime = 5 * 60 +) + +// 用户登录 +type login struct { + UserId int64 + Client *Client +} + +// GetKey 读取客户端数据 +func (l *login) GetKey() string { + return GetUserKey(l.UserId) +} + +// Client 客户端连接 +type Client struct { + Addr string // 客户端地址 + ID string // 连接唯一标识 + Socket *websocket.Conn // 用户连接 + Send chan *WResponse // 待发送的数据 + SendClose bool // 发送是否关闭 + closeSignal chan struct{} // 关闭信号 + FirstTime uint64 // 首次连接时间 + HeartbeatTime uint64 // 用户上次心跳时间 + Tags garray.StrArray // 标签 + User *model.Identity // 用户信息 + context context.Context // Custom context for internal usage purpose. + IP string // 客户端IP + UserAgent string // 用户代理 +} + +// NewClient 初始化 +func NewClient(r *ghttp.Request, socket *websocket.Conn, firstTime uint64) (client *Client) { + client = &Client{ + Addr: socket.RemoteAddr().String(), + ID: guid.S(), + Socket: socket, + Send: make(chan *WResponse, 100), + SendClose: false, + closeSignal: make(chan struct{}, 1), + FirstTime: firstTime, + HeartbeatTime: firstTime, + User: contexts.GetUser(r.Context()), + IP: location.GetClientIp(r), + UserAgent: r.UserAgent(), + } + return +} + +// 读取客户端数据 +func (c *Client) read() { + defer func() { + if r := recover(); r != nil { + g.Log().Warningf(mctx, "client read err: %+v, stack:%+v, user:%+v", r, string(debug.Stack()), c.User) + } + }() + + defer c.close() + + for { + _, message, err := c.Socket.ReadMessage() + if err != nil { + return + } + // 处理消息 + handlerMsg(c, message) + } +} + +// 向客户端写数据 +func (c *Client) write() { + defer func() { + if r := recover(); r != nil { + g.Log().Warningf(mctx, "client write err: %+v, stack:%+v, user:%+v", r, string(debug.Stack()), c.User) + } + }() + defer func() { + clientManager.Unregister <- c + _ = c.Socket.Close() + }() + for { + select { + case <-c.closeSignal: + g.Log().Infof(mctx, "websocket client quit, user:%+v", c.User) + return + case message, ok := <-c.Send: + if !ok { + // 发送数据错误 关闭连接 + g.Log().Warningf(mctx, "client write message, user:%+v", c.User) + return + } + _ = c.Socket.WriteJSON(message) + } + } +} + +// SendMsg 发送数据 +func (c *Client) SendMsg(msg *WResponse) { + if c == nil || c.SendClose { + return + } + defer func() { + if r := recover(); r != nil { + g.Log().Infof(mctx, "SendMsg err:%+v, stack:%+v", r, string(debug.Stack())) + } + }() + c.Send <- msg +} + +// Context is alias for function GetCtx. +func (c *Client) Context() context.Context { + if c.context == nil { + c.context = gctx.New() + } + return c.context +} + +// Heartbeat 心跳更新 +func (c *Client) Heartbeat(currentTime uint64) { + c.HeartbeatTime = currentTime +} + +// IsHeartbeatTimeout 心跳是否超时 +func (c *Client) IsHeartbeatTimeout(currentTime uint64) (timeout bool) { + if c.HeartbeatTime+heartbeatExpirationTime <= currentTime { + timeout = true + } + return +} + +// 关闭客户端 +func (c *Client) close() { + if c.SendClose { + return + } + c.SendClose = true + c.closeSignal <- struct{}{} +} + +// Close 关闭指定客户端连接 +func Close(client *Client) { + client.close() +} + +// SendSuccess 发送成功消息 +func SendSuccess(client *Client, event string, data ...interface{}) { + d := interface{}(nil) + if len(data) > 0 { + d = data[0] + } + client.SendMsg(&WResponse{ + Event: event, + Data: d, + Code: gcode.CodeOK.Code(), + Timestamp: gtime.Now().Unix(), + }) + before(client) +} + +// SendError 发送错误消息 +func SendError(client *Client, event string, err error) { + client.SendMsg(&WResponse{ + Event: event, + Code: gcode.CodeNil.Code(), + ErrorMsg: err.Error(), + Timestamp: gtime.Now().Unix(), + }) + before(client) +} + +// before +func before(client *Client) { + client.Heartbeat(uint64(gtime.Now().Unix())) +} diff --git a/server/internal/websocket/client_manager.go b/server/internal/websocket/client_manager.go new file mode 100644 index 0000000..868b1fa --- /dev/null +++ b/server/internal/websocket/client_manager.go @@ -0,0 +1,335 @@ +// Package websocket +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package websocket + +import ( + "context" + "fmt" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gcron" + "github.com/gogf/gf/v2/os/gtime" + "runtime/debug" + "sync" +) + +// ClientManager 客户端管理 +type ClientManager struct { + Clients map[*Client]bool // 全部的连接 + ClientsLock sync.RWMutex // 读写锁 + Users map[string][]*Client // 登录的用户 + UserLock sync.RWMutex // 读写锁 + Register chan *Client // 连接连接处理 + Login chan *login // 用户登录处理 + Unregister chan *Client // 断开连接处理程序 + Broadcast chan *WResponse // 广播 向全部成员发送数据 + ClientBroadcast chan *ClientWResponse // 广播 向某个客户端发送数据 + TagBroadcast chan *TagWResponse // 广播 向某个标签成员发送数据 + UserBroadcast chan *UserWResponse // 广播 向某个用户的所有链接发送数据 + closeSignal chan struct{} // 关闭信号 +} + +func NewClientManager() (clientManager *ClientManager) { + clientManager = &ClientManager{ + Clients: make(map[*Client]bool), + Users: make(map[string][]*Client), + Register: make(chan *Client, 1000), + Unregister: make(chan *Client, 1000), + Broadcast: make(chan *WResponse, 1000), + TagBroadcast: make(chan *TagWResponse, 1000), + UserBroadcast: make(chan *UserWResponse, 1000), + closeSignal: make(chan struct{}, 1), + } + return +} + +func Manager() *ClientManager { + return clientManager +} + +// GetUserKey 获取用户key +func GetUserKey(userId int64) (key string) { + key = fmt.Sprintf("%s_%d", "ws", userId) + return +} + +// InClient 客户端是否存在 +func (manager *ClientManager) InClient(client *Client) (ok bool) { + manager.ClientsLock.RLock() + defer manager.ClientsLock.RUnlock() + _, ok = manager.Clients[client] + return +} + +// GetClients 获取所有客户端 +func (manager *ClientManager) GetClients() (clients map[*Client]bool) { + clients = make(map[*Client]bool) + manager.ClientsRange(func(client *Client, value bool) (result bool) { + clients[client] = value + return true + }) + return +} + +// ClientsRange 遍历 +func (manager *ClientManager) ClientsRange(f func(client *Client, value bool) (result bool)) { + manager.ClientsLock.RLock() + defer manager.ClientsLock.RUnlock() + for key, value := range manager.Clients { + if !f(key, value) { + return + } + } +} + +// GetClientsLen 获取客户端总数 +func (manager *ClientManager) GetClientsLen() (clientsLen int) { + clientsLen = len(manager.Clients) + return +} + +// AddClients 添加客户端 +func (manager *ClientManager) AddClients(client *Client) { + manager.ClientsLock.Lock() + defer manager.ClientsLock.Unlock() + manager.Clients[client] = true +} + +// DelClients 删除客户端 +func (manager *ClientManager) DelClients(client *Client) { + manager.ClientsLock.Lock() + defer manager.ClientsLock.Unlock() + delete(manager.Clients, client) +} + +// GetClient 通过socket ID获取客户端的连接 +func (manager *ClientManager) GetClient(id string) (client *Client) { + for c := range manager.Clients { + if c.ID == id { + return c + } + } + return +} + +// GetUserClient 获取用户的连接 +func (manager *ClientManager) GetUserClient(userId int64) (clients []*Client) { + manager.UserLock.RLock() + defer manager.UserLock.RUnlock() + userKey := GetUserKey(userId) + if value, ok := manager.Users[userKey]; ok { + clients = value + } + return +} + +// AddUsers 添加用户 +func (manager *ClientManager) AddUsers(key string, client *Client) { + manager.UserLock.Lock() + defer manager.UserLock.Unlock() + manager.Users[key] = append(manager.Users[key], client) +} + +// DelUsers 删除用户 +func (manager *ClientManager) DelUsers(client *Client) (result bool) { + manager.UserLock.Lock() + defer manager.UserLock.Unlock() + key := GetUserKey(client.User.Id) + if clients, ok := manager.Users[key]; ok { + for _, value := range clients { + // 判断是否为相同的用户 + if value.Addr != client.Addr { + return + } + delete(manager.Users, key) + result = true + } + } + return +} + +// GetUsersLen 已登录用户数 +func (manager *ClientManager) GetUsersLen() (userLen int) { + userLen = len(manager.Users) + return +} + +// EventRegister 用户建立连接事件 +func (manager *ClientManager) EventRegister(client *Client) { + if client == nil { + g.Log().Warningf(mctx, "EventRegister client == nil.") + return + } + manager.AddClients(client) + + var userId int64 + if client.User != nil { + userId = client.User.Id + } + // 用户登录 + manager.EventLogin(&login{ + UserId: userId, + Client: client, + }) + // 发送当前客户端标识 + // SendSuccess(client, "connected", g.Map{"id": client.ID, "userInfo": client.User}) +} + +// EventLogin 用户登录事件 +func (manager *ClientManager) EventLogin(login *login) { + client := login.Client + if manager.InClient(client) { + userKey := login.GetKey() + manager.AddUsers(userKey, login.Client) + } +} + +// EventUnregister 用户断开连接事件 +func (manager *ClientManager) EventUnregister(client *Client) { + manager.DelClients(client) + // 删除用户连接 + deleteResult := manager.DelUsers(client) + if !deleteResult { + // 不是当前连接的客户端 + return + } + + client.close() +} + +// ClearTimeoutConnections 定时清理超时连接 +func (manager *ClientManager) clearTimeoutConnections() { + currentTime := uint64(gtime.Now().Unix()) + clients := clientManager.GetClients() + for client := range clients { + if client.IsHeartbeatTimeout(currentTime) { + _ = client.Socket.Close() + } + } +} + +// WebsocketPing 心跳处理 +func (manager *ClientManager) ping() { + defer func() { + if r := recover(); r != nil { + g.Log().Warningf(mctx, "websocket gcron ping recover:%+v, stack:%+v", r, string(debug.Stack())) + return + } + }() + + // 定时任务,发送心跳包 + // gcron.Add(ctx, "0 */1 * * * *", func(ctx context.Context) { + // res := &WResponse{ + // Event: "ping", + // Timestamp: gtime.Now().Unix(), + // } + // SendToAll(res) + // }) + + // 定时任务,清理超时连接 + _, _ = gcron.Add(mctx, "*/30 * * * * *", func(ctx context.Context) { + manager.clearTimeoutConnections() + }) +} + +// 管道处理程序 +func (manager *ClientManager) start() { + defer func() { + if r := recover(); r != nil { + g.Log().Warningf(mctx, "websocket start recover:%+v, stack:%+v", r, string(debug.Stack())) + return + } + }() + for { + select { + case conn := <-manager.Register: + // 建立连接事件 + manager.EventRegister(conn) + case login := <-manager.Login: + // 用户登录 + manager.EventLogin(login) + + case conn := <-manager.Unregister: + // 断开连接事件 + manager.EventUnregister(conn) + + case message := <-manager.Broadcast: + // 全部客户端广播事件 + clients := manager.GetClients() + for conn := range clients { + conn.SendMsg(message) + } + case message := <-manager.TagBroadcast: + // 标签广播事件 + clients := manager.GetClients() + for conn := range clients { + if conn.Tags.Contains(message.Tag) { + if message.WResponse.Timestamp == 0 { + message.WResponse.Timestamp = gtime.Now().Timestamp() + } + conn.SendMsg(message.WResponse) + } + } + case message := <-manager.UserBroadcast: + // 用户广播事件 + clients := manager.GetClients() + + for conn := range clients { + if conn.User.Id == message.UserID { + if message.WResponse.Timestamp == 0 { + message.WResponse.Timestamp = gtime.Now().Timestamp() + } + conn.SendMsg(message.WResponse) + } + } + case message := <-manager.ClientBroadcast: + // 单个客户端广播事件 + clients := manager.GetClients() + for conn := range clients { + if conn.ID == message.ID { + if message.WResponse.Timestamp == 0 { + message.WResponse.Timestamp = gtime.Now().Timestamp() + } + conn.SendMsg(message.WResponse) + } + } + case <-manager.closeSignal: + g.Log().Debug(mctx, "websocket closeSignal quit..") + return + } + } +} + +// SendToAll 发送全部客户端 +func SendToAll(response *WResponse) { + clientManager.Broadcast <- response +} + +// SendToClientID 发送单个客户端 +func SendToClientID(id string, response *WResponse) { + clientRes := &ClientWResponse{ + ID: id, + WResponse: response, + } + clientManager.ClientBroadcast <- clientRes +} + +// SendToUser 发送单个用户 +func SendToUser(userID int64, response *WResponse) { + userRes := &UserWResponse{ + UserID: userID, + WResponse: response, + } + clientManager.UserBroadcast <- userRes +} + +// SendToTag 发送某个标签 +func SendToTag(tag string, response *WResponse) { + tagRes := &TagWResponse{ + Tag: tag, + WResponse: response, + } + clientManager.TagBroadcast <- tagRes +} diff --git a/server/internal/websocket/init.go b/server/internal/websocket/init.go new file mode 100644 index 0000000..1383834 --- /dev/null +++ b/server/internal/websocket/init.go @@ -0,0 +1,56 @@ +// Package websocket +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package websocket + +import ( + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/os/grpool" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gorilla/websocket" + "net/http" +) + +var ( + mctx = gctx.GetInitCtx() // 上下文 + clientManager = NewClientManager() // 客户端管理 + routers = make(map[string]EventHandler) // 消息路由 + msgGo = grpool.New(20) // 消息处理协程池 +) + +// Start 启动 +func Start() { + go clientManager.start() + go clientManager.ping() + g.Log().Debug(mctx, "start websocket..") +} + +// Stop 关闭 +func Stop() { + clientManager.closeSignal <- struct{}{} +} + +// WsPage ws入口 +func WsPage(r *ghttp.Request) { + upGrader := websocket.Upgrader{ + ReadBufferSize: 1024, + WriteBufferSize: 1024, + CheckOrigin: func(r *http.Request) bool { + return true + }, + } + conn, err := upGrader.Upgrade(r.Response.Writer, r.Request, nil) + if err != nil { + return + } + currentTime := uint64(gtime.Now().Unix()) + client := NewClient(r, conn, currentTime) + go client.read() + go client.write() + // 用户连接事件 + clientManager.Register <- client +} diff --git a/server/internal/websocket/model.go b/server/internal/websocket/model.go new file mode 100644 index 0000000..3399ad7 --- /dev/null +++ b/server/internal/websocket/model.go @@ -0,0 +1,43 @@ +// Package websocket +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package websocket + +import "github.com/gogf/gf/v2/frame/g" + +// WRequest 输入对象 +type WRequest struct { + Event string `json:"event"` // 事件名称 + Data g.Map `json:"data"` // 数据 +} + +// WResponse 输出对象 +type WResponse struct { + Event string `json:"event"` // 事件名称 + Data interface{} `json:"data,omitempty"` // 数据 + Code int `json:"code"` // 状态码 + ErrorMsg string `json:"errorMsg,omitempty"` // 错误消息 + Timestamp int64 `json:"timestamp"` // 服务器时间 +} + +type TagWResponse struct { + Tag string + WResponse *WResponse +} + +type UserWResponse struct { + UserID int64 + WResponse *WResponse +} + +type ClientWResponse struct { + ID string + WResponse *WResponse +} + +// EventHandler 消息处理器 +type EventHandler func(client *Client, req *WRequest) + +type EventHandlers map[string]EventHandler diff --git a/server/internal/websocket/router.go b/server/internal/websocket/router.go new file mode 100644 index 0000000..6414491 --- /dev/null +++ b/server/internal/websocket/router.go @@ -0,0 +1,64 @@ +// Package websocket +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package websocket + +import ( + "context" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/util/gconv" + "runtime/debug" +) + +// handlerMsg 处理消息 +func handlerMsg(client *Client, message []byte) { + defer func() { + if r := recover(); r != nil { + g.Log().Warningf(mctx, "handlerMsg recover, err:%+v, stack:%+v", r, string(debug.Stack())) + } + }() + + var request *WRequest + if err := gconv.Struct(message, &request); err != nil { + g.Log().Warningf(mctx, "handlerMsg 数据解析失败,err:%+v, message:%+v", err, string(message)) + return + } + + if request.Event == "" { + g.Log().Warning(mctx, "handlerMsg request.Event is null") + return + } + + fun, ok := routers[request.Event] + if !ok { + g.Log().Warningf(mctx, "handlerMsg function id %v: not registered", request.Event) + return + } + + err := msgGo.AddWithRecover(mctx, + func(ctx context.Context) { + fun(client, request) + }, + func(ctx context.Context, err error) { + g.Log().Warningf(mctx, "handlerMsg msgGo exec err:%+v", err) + }, + ) + + if err != nil { + g.Log().Warningf(mctx, "handlerMsg msgGo Add err:%+v", err) + return + } +} + +// RegisterMsg 注册消息 +func RegisterMsg(handlers EventHandlers) { + for id, f := range handlers { + if _, ok := routers[id]; ok { + g.Log().Fatalf(mctx, "RegisterMsg function id %v: already registered", id) + return + } + routers[id] = f + } +} diff --git a/server/main.go b/server/main.go new file mode 100644 index 0000000..22299b7 --- /dev/null +++ b/server/main.go @@ -0,0 +1,25 @@ +// Package main +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2023 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package main + +import ( + _ "hotgo/internal/packed" + + _ "github.com/gogf/gf/contrib/drivers/mysql/v2" + _ "github.com/gogf/gf/contrib/drivers/pgsql/v2" + _ "github.com/gogf/gf/contrib/nosql/redis/v2" + "github.com/gogf/gf/v2/os/gctx" + _ "hotgo/addons/modules" + "hotgo/internal/cmd" + "hotgo/internal/global" + _ "hotgo/internal/logic" +) + +func main() { + var ctx = gctx.GetInitCtx() + global.Init(ctx) + cmd.Main.Run(ctx) +} diff --git a/server/manifest/config/casbin.conf b/server/manifest/config/casbin.conf new file mode 100644 index 0000000..04d4cc2 --- /dev/null +++ b/server/manifest/config/casbin.conf @@ -0,0 +1,15 @@ +[request_definition] +r = sub, obj, act + +[policy_definition] +p = sub, obj, act + +[role_definition] +g = _, _ + +[policy_effect] +e = some(where (p.eft == allow)) + +[matchers] +# 支持通配符匹配路由和请求方式 +m = g(r.sub, p.sub) && keyMatch(r.obj, p.obj) && regexMatch(r.act, p.act) \ No newline at end of file diff --git a/server/manifest/config/config.example.yaml b/server/manifest/config/config.example.yaml new file mode 100644 index 0000000..b965641 --- /dev/null +++ b/server/manifest/config/config.example.yaml @@ -0,0 +1,303 @@ +# hotgo系统配置 +system: + # 应用名称 + appName: "hotgo" + # debug开关,开启后接口出现错误时会向前端输出堆栈信息,可选:false|true,默认为true + debug: true + # gf运行模式,可选:not-set|develop|testing|staging|product。product模式下后台【开发工具】菜单自动隐藏 + mode: "develop" + # IP归属地解析方法,可选:cz88|whois,默认为whois + ipMethod: "whois" + # 是否为演示系统,可选:false|true + isDemo: false + # 是否为集群部署,可选:false|true 默认为false。开启集群必须配置redis,通过redis发布订阅进行集群之间的数据同步 + isCluster: false + # 全局请求日志 + log: + switch: true # 日志开关,可选:false|true,默认为true + queue: true # 是否启用队列,启用时需要配置队列信息,可选:false|true,默认为true + module: [ "admin", "api", "default" ] # 需要记录的模块 + skipCode: [ ] # 不记录的状态码,如: ["0", "-1"] + # 系统日志,用于在后台统计异常日志 + serveLog: + switch: true # 日志开关,可选:false|true,默认为true + queue: true # 是否启用队列,启用时需要配置队列信息,可选:false|true,默认为true + levelFormat: [ "WARN", "ERRO", "FATA", "PANI" ] # 需要记录的等级 + # 国际化 + i18n: + switch: true # 国际化开关,可选:false|true,默认为true + defaultLanguage: "zh-CN" # 默认使用语言,可选:zh-CN|zh-TW|en,默认为zh-CN + # 插件资源目录,用于静态文件和模版文件的路径,默认为resource + addonsResourcePath: "resource" + + +# 统一默认日志配置 +defaultLogger: &defaultLogger + level: "all" + flags: 42 + file: "{Y-m-d}.log" # 日志文件格式。默认为"{Y-m-d}.log" + stdoutColorDisabled: false # 关闭终端的颜色打印。可选:false|true,默认false + writerColorEnable: false # 日志文件是否带上颜色。可选:false|true,默认false,表示不带颜色 + rotateExpire: "7d" # 日志保留天数 + rotateBackupLimit: 2 # 最大备份数量 + rotateBackupCompress: 2 # 日志文件压缩级别,0-9,9最高 + + +# gf配置,配置参考:https://goframe.org/pages/viewpage.action?pageId=44449486 +server: + address: ":8000" # 本地监听地址。默认":8000",多个地址以","号分隔。例如:"192.168.2.3:8000,10.0.3.10:8001" + openapiPath: "/api.json" # OpenAPI接口文档地址 + swaggerPath: "/swagger" # 内置SwaggerUI展示地址 + serverRoot: "resource/public" # 静态文件服务的目录根路径,配置时自动开启静态文件服务。 + DumpRouterMap: false # 是否在Server启动时打印所有的路由列表。 + logPath: "logs/server" # 服务日志保存路径 + ErrorStack: true # 当Server捕获到异常时是否记录堆栈信息到日志中。默认为true + ErrorLogEnabled: true # 是否记录异常日志信息到日志中。默认为true + errorLogPattern: "error/{Y-m-d}.log" # 异常错误日志文件格式。默认为"error-{Ymd}.log" + accessLogEnabled: true # 是否记录访问日志。默认为false + accessLogPattern: "access/{Y-m-d}.log" # 访问日志文件格式。默认为"access-{Ymd}.log" + maxHeaderBytes: "100KB" # 请求头大小限制,请求头包括客户端提交的Cookie数据,默认设置为100KB + clientMaxBodySize: "200MB" # 客户端提交的Body大小限制,同时也影响文件上传大小,默认设置为200MB + serverAgent: "HG HTTP Server" # 服务端Agent信息。默认为"HG HTTP Server" + # PProf配置 + pprofEnabled: true # 是否开启PProf性能调试特性。默认为false + pprofPattern: "/pprof" # 开启PProf时有效,表示PProf特性的页面访问路径,对当前Server绑定的所有域名有效。 + # 服务日志配置 + logger: + path: "logs/server" # 日志文件路径。默认为空,表示关闭,仅输出到终端 + <<: *defaultLogger + + +# tcp服务 +tcp: + # 服务器 + server: + address: ":8099" + # 客户端 + client: + # 定时任务 + cron: + group: "cron" # 分组名称 + name: "cron1" # 客户端名称 + address: "127.0.0.1:8099" # 服务器地址 + appId: "1002" # 应用名称 + secretKey: "hotgo" # 密钥 + # 系统授权 + auth: + group: "auth" # 分组名称 + name: "auth1" # 客户端名称 + address: "127.0.0.1:8099" # 服务器地址 + appId: "mengshuai" # 应用名称 + secretKey: "123456" # 密钥 + + +# 日志配置 +logger: + # 全局日志:g.Log() + path: "logs/logger" # 日志文件路径。默认为空,表示关闭,仅输出到终端 + <<: *defaultLogger + # 定时任务:g.Log("cron") + cron: + path: "logs/cron" # 日志文件路径。默认为空,表示关闭,仅输出到终端 + <<: *defaultLogger + # 消息队列:g.Log("cron") + queue: + path: "logs/queue" # 日志文件路径。默认为空,表示关闭,仅输出到终端 + <<: *defaultLogger + # tcp服务器:g.Log("tcpServer") + tcpServer: + path: "logs/tcpServer" # 日志文件路径。默认为空,表示关闭,仅输出到终端 + <<: *defaultLogger + # tcp客户端:g.Log("tcpClient") + tcpClient: + path: "logs/tcpClient" # 日志文件路径。默认为空,表示关闭,仅输出到终端 + <<: *defaultLogger + + +# Viewer. 配置参考:https://goframe.org/pages/viewpage.action?pageId=1114335 +viewer: + paths: "resource/template" + defaultFile: "index.html" + delimiters: [ "@{", "}" ] + homeLayout: "home/index.html" + + +# 内容设置 +setting: + title: "HotGo" + keywords: "中后台解决方案,gf框架,vue3" + description: "hotgo 是一个基于 goframe2,vue3,vite2,TypeScript,uniapp 的中后台解决方案,它可以帮助你快速搭建企业级中后台项目,相信不管是从新技术使用还是其他方面,都能帮助到你,持续更新中。" + + +# 路由配置 +router: + # 后台 + admin: + # 前缀 + prefix: "/admin" + # 不需要验证登录的路由地址 + exceptLogin: [ + "/sms/send", # 短信验证码 + "/wechat/authorizeCall", # 微信用户授权回调 + ] + # 不需要验证权限的路由地址 + exceptAuth: [ + "/member/info", # 登录用户信息 + "/role/dynamic", # 获取动态路由 + "/notice/pullMessages", # 拉取我的消息 + "/notice/readAll", # 设置全部已读公告 + "/notice/upRead", # 已读指定公告 + "/dictData/option", # 单个数据字典 + "/dictData/options", # 多个数据字典 + "/provinces/select", # 动态省市区选项 + "/provinces/cityLabel", # 动态解析省市区名称 + "/member/option", # 用户选项 + ] + # 接口 + api: + # 前缀 + prefix: "/api" + # 不需要验证登录的路由地址 + exceptLogin: [ ] + # websocket + websocket: + # 前缀 + prefix: "/socket" + # 不需要验证登录的路由地址 + exceptLogin: [ ] + # 前台页面 + home: + # 前缀 + prefix: "/home" + # 不需要验证登录的路由地址 + exceptLogin: [ ] + + +# 缓存驱动 +cache: + adapter: "file" # 缓存驱动方式,支持:memory|redis|file,不填默认memory + fileDir: "./storage/cache" # 文件缓存路径,adapter=file时必填 + + +# 登录令牌 +token: + secretKey: "hotgo123" # 令牌加密秘钥,考虑安全问题生产环境中请修改默认值 + expires: 604800 # 令牌有效期,单位:秒。默认7天 + autoRefresh: true # 是否开启自动刷新过期时间, false|true 默认为true + refreshInterval: 86400 # 刷新间隔,单位:秒。必须小于expires,否则无法触发。默认1天内只允许刷新一次 + maxRefreshTimes: 30 # 最大允许刷新次数,-1不限制。默认30次 + multiLogin: true # 是否允许多端登录, false|true 默认为true + + +# 消息队列 +queue: + switch: true # 队列开关,可选:true|false,默认为true + driver: "disk" # 队列驱动,可选:disk|redis|rocketmq|kafka,默认为disk + groupName: "hotgo" # mq群组名称 + # 磁盘队列 + disk: + path: "./storage/diskqueue" # 数据存放路径 + batchSize: 100 # 每100条消息同步一次,batchSize和batchTime满足其一就会同步一次 + batchTime: 1 # 每1秒消息同步一次 + segmentSize: 10485760 # 每个topic分片数据文件最大字节,默认10M + segmentLimit: 3000 # 每个topic最大分片数据文件数量,超出部分将会丢弃 + # redis,默认使用全局redis运行队列 + redis: + timeout: 0 # 队列超时时间以秒为单位,0表示永不超时。如果队列在设定的超时时间内没有被消费,则会被销毁 + rocketmq: + nameSrvAdders: ["127.0.0.1:9876"] # nameSrvAdder+端口,支持多个 + accessKey: "" # 选填。如果开启了acl控制就必填 + secretKey: "" # 选填。如果开启了acl控制就必填 + brokerAddr: "127.0.0.1:10911" # brokerAddr+端口,选填。用于消费者订阅主题前会检查主题是否存在,不存在会自动创建。你也可以在rocketmq控制台手动创建主题 + retry: 0 # 重试次数 + logLevel: "info" # rocketmq日志输出级别,可选:all|close|debug|info|warn|error|fatal + kafka: + address: "127.0.0.1:9092" # kafka地址+端口 + version: "2.0.0.0" # kafka专属配置,默认2.0.0.0 + randClient: true # 开启随机生成clientID,可以实现启动多实例同时一起消费相同topic,加速消费能力的特性,默认为true + multiConsumer: true # 是否支持创建多个消费者 + + +# Redis. 配置参考:https://goframe.org/pages/viewpage.action?pageId=1114217 +redis: + default: + address: "127.0.0.1:6379" + db: "2" + pass: "" + idleTimeout: "20" + + +# Database. 配置参考:https://goframe.org/pages/viewpage.action?pageId=1114245 +database: + logger: + path: "logs/database" # 日志文件路径。默认为空,表示关闭,仅输出到终端 + <<: *defaultLogger + stdout: true + default: + link: "mysql:hotgo:hg123456.@tcp(127.0.0.1:3306)/hotgo?loc=Local&parseTime=true&charset=utf8mb4" + debug: true + Prefix: "hg_" + + +# 链路追踪 +jaeger: + switch: false # 链路追踪开关,可选:true|false,默认为false + endpoint: "127.0.0.1:6831" # jaeger-agent上报地址 + + +# 生成代码 +hggen: + allowedIPs: [ "127.0.0.1", "*" ] # 白名单,*代表所有,只有允许的IP后台才能使用生成代码功能 + selectDbs: [ "default" ] # 可选生成表的数据库配置名称,支持多库 + disableTables: [ "hg_sys_gen_codes","hg_admin_role_casbin" ] # 禁用的表,禁用以后将不会在选择表中看到 + delimiters: [ "@{", "}" ] # 模板引擎变量分隔符号 + # 生成应用模型,所有生成模板允许自定义,可以参考default模板进行改造 + application: + # CRUD和关系树列表模板 + crud: + templates: + # 默认的主包模板 + - group: "default" # 分组名称 + isAddon: false # 是否为插件模板 false|true + masterPackage: "sys" # 主包名称,需和controllerPath、logicPath、inputPath保持关联 + templatePath: "./resource/generate/default/curd" # 模板路径 + apiPath: "./api/admin" # goApi生成路径 + controllerPath: "./internal/controller/admin/sys" # 控制器生成路径 + logicPath: "./internal/logic/sys" # 主要业务生成路径 + inputPath: "./internal/model/input/sysin" # 表单过滤器生成路径 + routerPath: "./internal/router/genrouter" # 生成路由表路径 + sqlPath: "./storage/data/generate" # 生成sql语句路径 + webApiPath: "../web/src/api" # webApi生成路径 + webViewsPath: "../web/src/views" # web页面生成路径 + + # 默认的插件包模板,{$name}会自动替换成实际的插件名称 + - group: "addon" # 分组名称 + isAddon: true # 是否为插件模板 false|true + masterPackage: "sys" # 主包名称,需和controllerPath、logicPath、inputPath保持关联 + templatePath: "./resource/generate/default/curd" # 模板路径 + apiPath: "./addons/{$name}/api/admin" # goApi生成路径 + controllerPath: "./addons/{$name}/controller/admin/sys" # 控制器生成路径 + logicPath: "./addons/{$name}/logic/sys" # 主要业务生成路径 + inputPath: "./addons/{$name}/model/input/sysin" # 表单过滤器生成路径 + routerPath: "./addons/{$name}/router/genrouter" # 生成路由表路径 + sqlPath: "./storage/data/generate/addons" # 生成sql语句路径 + webApiPath: "../web/src/api/addons/{$name}" # webApi生成路径 + webViewsPath: "../web/src/views/addons/{$name}" # web页面生成路径 + + # 消息队列模板 + queue: + templates: + - group: "default" + templatePath: "./resource/generate/default/queue" + + # 定时任务模板 + cron: + templates: + - group: "default" + templatePath: "./resource/generate/default/cron" + + # 生成插件模块,通过后台创建新插件时使用的模板,允许自定义,可以参考default模板进行改造 + addon: + srcPath: "./resource/generate/default/addon" # 生成模板路径 + webApiPath: "../web/src/api/addons/{$name}" # webApi生成路径 + webViewsPath: "../web/src/views/addons/{$name}" # web页面生成路径 \ No newline at end of file diff --git a/server/manifest/deploy/kustomize/base/deployment.yaml b/server/manifest/deploy/kustomize/base/deployment.yaml new file mode 100644 index 0000000..28f1d69 --- /dev/null +++ b/server/manifest/deploy/kustomize/base/deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: template-single + labels: + app: template-single +spec: + replicas: 1 + selector: + matchLabels: + app: template-single + template: + metadata: + labels: + app: template-single + spec: + containers: + - name : main + image: template-single + imagePullPolicy: Always + diff --git a/server/manifest/deploy/kustomize/base/kustomization.yaml b/server/manifest/deploy/kustomize/base/kustomization.yaml new file mode 100644 index 0000000..302d92d --- /dev/null +++ b/server/manifest/deploy/kustomize/base/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- deployment.yaml +- service.yaml + + + diff --git a/server/manifest/deploy/kustomize/base/service.yaml b/server/manifest/deploy/kustomize/base/service.yaml new file mode 100644 index 0000000..608771c --- /dev/null +++ b/server/manifest/deploy/kustomize/base/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: template-single +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 8000 + selector: + app: template-single + diff --git a/server/manifest/deploy/kustomize/overlays/develop/configmap.yaml b/server/manifest/deploy/kustomize/overlays/develop/configmap.yaml new file mode 100644 index 0000000..3b1d0af --- /dev/null +++ b/server/manifest/deploy/kustomize/overlays/develop/configmap.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: template-single-configmap +data: + config.yaml: | + server: + address: ":8000" + openapiPath: "/api.json" + swaggerPath: "/swagger" + + logger: + level : "all" + stdout: true diff --git a/server/manifest/deploy/kustomize/overlays/develop/deployment.yaml b/server/manifest/deploy/kustomize/overlays/develop/deployment.yaml new file mode 100644 index 0000000..04e4851 --- /dev/null +++ b/server/manifest/deploy/kustomize/overlays/develop/deployment.yaml @@ -0,0 +1,10 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: template-single +spec: + template: + spec: + containers: + - name : main + image: template-single:develop \ No newline at end of file diff --git a/server/manifest/deploy/kustomize/overlays/develop/kustomization.yaml b/server/manifest/deploy/kustomize/overlays/develop/kustomization.yaml new file mode 100644 index 0000000..4731c47 --- /dev/null +++ b/server/manifest/deploy/kustomize/overlays/develop/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- ../../base +- configmap.yaml + +patchesStrategicMerge: +- deployment.yaml + +namespace: default + + + diff --git a/server/manifest/docker/Dockerfile b/server/manifest/docker/Dockerfile new file mode 100644 index 0000000..f36b107 --- /dev/null +++ b/server/manifest/docker/Dockerfile @@ -0,0 +1,23 @@ +FROM loads/alpine:3.8 + +############################################################################### +# INSTALLATION +############################################################################### + +ENV WORKDIR /app +ADD hack $WORKDIR/hack/ +ADD manifest/config $WORKDIR/manifest/config/ +ADD resource $WORKDIR/resource/ +ADD ./temp/linux_amd64/hotgo $WORKDIR/hotgo +ADD ./manifest/docker/entrypoint.sh $WORKDIR/entrypoint.sh +RUN chmod +x $WORKDIR/hotgo +RUN chmod +x $WORKDIR/entrypoint.sh + + +############################################################################### +# START +############################################################################### + +WORKDIR $WORKDIR +CMD ./entrypoint.sh + diff --git a/server/manifest/docker/docker.sh b/server/manifest/docker/docker.sh new file mode 100644 index 0000000..ff393f9 --- /dev/null +++ b/server/manifest/docker/docker.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# This shell is executed before docker build. + + + + + diff --git a/server/manifest/docker/entrypoint.sh b/server/manifest/docker/entrypoint.sh new file mode 100644 index 0000000..e8f6e9b --- /dev/null +++ b/server/manifest/docker/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +cd /app && ./hotgo & +echo "hotgo start all server.." +tail -f /dev/null \ No newline at end of file diff --git a/server/manifest/i18n/en.json b/server/manifest/i18n/en.json new file mode 100644 index 0000000..b378789 --- /dev/null +++ b/server/manifest/i18n/en.json @@ -0,0 +1,5 @@ +{ + "你好,美丽世界": "Hello, Beautiful World", + "剩余%v余额": "Remaining %v Balance", + "HotGo管理系统": "HotGo Admin" +} \ No newline at end of file diff --git a/server/manifest/i18n/zh-CN.json b/server/manifest/i18n/zh-CN.json new file mode 100644 index 0000000..ce909ae --- /dev/null +++ b/server/manifest/i18n/zh-CN.json @@ -0,0 +1,3 @@ +{ + "剩余%v余额": "剩余%v余额" +} \ No newline at end of file diff --git a/server/manifest/i18n/zh-TW.json b/server/manifest/i18n/zh-TW.json new file mode 100644 index 0000000..84834a2 --- /dev/null +++ b/server/manifest/i18n/zh-TW.json @@ -0,0 +1,5 @@ +{ + "你好,美丽世界": "你好,美麗世界", + "剩余%v余额": "剩餘%v餘額", + "HotGo管理系统": "HotGo管理系統" +} \ No newline at end of file diff --git a/server/resource/addons/.gitkeep b/server/resource/addons/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/resource/addons/hgexample/public/default b/server/resource/addons/hgexample/public/default new file mode 100644 index 0000000..06d8da4 --- /dev/null +++ b/server/resource/addons/hgexample/public/default @@ -0,0 +1 @@ +Hello!这是创建插件 [功能案例] 时默认生成的一个静态目录文件,用于测试,当你看到这个提示时,说明已经联调成功啦! diff --git a/server/resource/addons/hgexample/template/home/index.html b/server/resource/addons/hgexample/template/home/index.html new file mode 100644 index 0000000..c4754c0 --- /dev/null +++ b/server/resource/addons/hgexample/template/home/index.html @@ -0,0 +1,32 @@ + + + + + + + + + @{.Title} + + + + +
+

Hello,@{.Data.name}!!

+

@{.Data.module}

+

服务器时间:@{.Data.time}

+
+ + + + \ No newline at end of file diff --git a/server/resource/generate/default/addon/README.MD.template b/server/resource/generate/default/addon/README.MD.template new file mode 100644 index 0000000..233a822 --- /dev/null +++ b/server/resource/generate/default/addon/README.MD.template @@ -0,0 +1,39 @@ +## @{.label} + +### 简介 + +@{.brief} + + +### 使用说明 + +@{.description} + + +### 迁移或安装 + +1、安装 HotGo (@{.hgVersion}及以上) + +项目介绍:https://github.com/bufanyun/hotgo + +2、将当前插件项目拷贝进 HotGo 根目录的 server/addons 目录下 + +3、在 HotGo 根目录的 server/addons/modules 目录下创建go文件:@{.name}.go,内容如下: +```go +package modules + +import _ "hotgo/addons/@{.name}" +``` + +4、HotGo 后台进入 开发工具->插件管理->找到 @{.label} (@{.name}) 进行安装 + +5、重启服务即可生效 + + +### 常用命令行 + +```shell +# 接口维护-gen service +gf gen service -s=addons/@{.name}/logic -d=addons/@{.name}/service + +``` diff --git a/server/resource/generate/default/addon/api/admin/config/config.go.template b/server/resource/generate/default/addon/api/admin/config/config.go.template new file mode 100644 index 0000000..9d83426 --- /dev/null +++ b/server/resource/generate/default/addon/api/admin/config/config.go.template @@ -0,0 +1,30 @@ +// Package config +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package config + +import ( + "github.com/gogf/gf/v2/frame/g" + "hotgo/addons/@{.name}/model/input/sysin" +) + +// GetReq 获取指定分组的配置 +type GetReq struct { + g.Meta `path:"/config/get" method:"get" tags:"@{.label}" summary:"获取指定分组的配置"` + sysin.GetConfigInp +} + +type GetRes struct { + *sysin.GetConfigModel +} + +// UpdateReq 获取指定分组的配置 +type UpdateReq struct { + g.Meta `path:"/config/update" method:"post" tags:"@{.label}" summary:"获取指定分组的配置"` + sysin.UpdateConfigInp +} + +type UpdateRes struct { +} diff --git a/server/resource/generate/default/addon/api/admin/index/index.go.template b/server/resource/generate/default/addon/api/admin/index/index.go.template new file mode 100644 index 0000000..d96ba73 --- /dev/null +++ b/server/resource/generate/default/addon/api/admin/index/index.go.template @@ -0,0 +1,21 @@ +// Package index +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package index + +import ( + "github.com/gogf/gf/v2/frame/g" + "hotgo/addons/@{.name}/model/input/sysin" +) + +// TestReq 测试 +type TestReq struct { + g.Meta `path:"/index/test" method:"get" tags:"@{.label}" summary:"测试后台API"` + sysin.IndexTestInp +} + +type TestRes struct { + *sysin.IndexTestModel +} diff --git a/server/resource/generate/default/addon/api/api/index/index.go.template b/server/resource/generate/default/addon/api/api/index/index.go.template new file mode 100644 index 0000000..82b75f5 --- /dev/null +++ b/server/resource/generate/default/addon/api/api/index/index.go.template @@ -0,0 +1,21 @@ +// Package index +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package index + +import ( + "github.com/gogf/gf/v2/frame/g" + "hotgo/addons/@{.name}/model/input/sysin" +) + +// TestReq 测试 +type TestReq struct { + g.Meta `path:"/index/test" method:"get" tags:"@{.label}" summary:"测试前台API"` + sysin.IndexTestInp +} + +type TestRes struct { + *sysin.IndexTestModel +} diff --git a/server/resource/generate/default/addon/api/home/index/index.go.template b/server/resource/generate/default/addon/api/home/index/index.go.template new file mode 100644 index 0000000..3d6e2e4 --- /dev/null +++ b/server/resource/generate/default/addon/api/home/index/index.go.template @@ -0,0 +1,21 @@ +// Package index +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package index + +import ( + "github.com/gogf/gf/v2/frame/g" + "hotgo/addons/@{.name}/model/input/sysin" +) + +// TestReq 测试 +type TestReq struct { + g.Meta `path:"/index/test" method:"get" summary:"@{.label}" tags:"测试首页"` + sysin.IndexTestInp +} + +type TestRes struct { + g.Meta `mime:"text/html" type:"string" example:""` +} diff --git a/server/resource/generate/default/addon/api/websocket/index/index.go.template b/server/resource/generate/default/addon/api/websocket/index/index.go.template new file mode 100644 index 0000000..e1f238c --- /dev/null +++ b/server/resource/generate/default/addon/api/websocket/index/index.go.template @@ -0,0 +1,21 @@ +// Package index +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package index + +import ( + "github.com/gogf/gf/v2/frame/g" + "hotgo/addons/@{.name}/model/input/sysin" +) + +// TestReq 测试 +type TestReq struct { + g.Meta `path:"/index/test" method:"get" tags:"@{.label}" summary:"测试websocket"` + sysin.IndexTestInp +} + +type TestRes struct { + *sysin.IndexTestModel +} diff --git a/server/resource/generate/default/addon/consts/consts.go.template b/server/resource/generate/default/addon/consts/consts.go.template new file mode 100644 index 0000000..4306296 --- /dev/null +++ b/server/resource/generate/default/addon/consts/consts.go.template @@ -0,0 +1,9 @@ +// Package consts +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package consts + +// 常量枚举. +// 插件中的常量枚举可以统一在这目录下 diff --git a/server/resource/generate/default/addon/controller/admin/sys/config.go.template b/server/resource/generate/default/addon/controller/admin/sys/config.go.template new file mode 100644 index 0000000..66a3650 --- /dev/null +++ b/server/resource/generate/default/addon/controller/admin/sys/config.go.template @@ -0,0 +1,33 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "hotgo/addons/@{.name}/api/admin/config" + "hotgo/addons/@{.name}/service" +) + +var ( + Config = cConfig{} +) + +type cConfig struct{} + +// GetConfig 获取指定分组的配置 +func (c *cConfig) GetConfig(ctx context.Context, req *config.GetReq) (res *config.GetRes, err error) { + data, err := service.SysConfig().GetConfigByGroup(ctx, &req.GetConfigInp) + + res = new(config.GetRes) + res.GetConfigModel = data + return +} + +// UpdateConfig 更新指定分组的配置 +func (c *cConfig) UpdateConfig(ctx context.Context, req *config.UpdateReq) (res *config.UpdateRes, err error) { + err = service.SysConfig().UpdateConfigByGroup(ctx, &req.UpdateConfigInp) + return +} diff --git a/server/resource/generate/default/addon/controller/admin/sys/index.go.template b/server/resource/generate/default/addon/controller/admin/sys/index.go.template new file mode 100644 index 0000000..445acc5 --- /dev/null +++ b/server/resource/generate/default/addon/controller/admin/sys/index.go.template @@ -0,0 +1,30 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "hotgo/addons/@{.name}/api/admin/index" + "hotgo/addons/@{.name}/service" +) + +var ( + Index = cIndex{} +) + +type cIndex struct{} + +// Test 测试 +func (c *cIndex) Test(ctx context.Context, req *index.TestReq) (res *index.TestRes, err error) { + data, err := service.SysIndex().Test(ctx, &req.IndexTestInp) + if err != nil { + return + } + + res = new(index.TestRes) + res.IndexTestModel = data + return +} diff --git a/server/resource/generate/default/addon/controller/api/index.go.template b/server/resource/generate/default/addon/controller/api/index.go.template new file mode 100644 index 0000000..19ab770 --- /dev/null +++ b/server/resource/generate/default/addon/controller/api/index.go.template @@ -0,0 +1,31 @@ +// Package api +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package api + +import ( + "context" + "hotgo/addons/@{.name}/api/api/index" + "hotgo/addons/@{.name}/service" +) + +var ( + Index = cIndex{} +) + +type cIndex struct{} + +// Test 测试 +func (c *cIndex) Test(ctx context.Context, req *index.TestReq) (res *index.TestRes, err error) { + data, err := service.SysIndex().Test(ctx, &req.IndexTestInp) + if err != nil { + return + } + + res = new(index.TestRes) + res.IndexTestModel = data + return +} + diff --git a/server/resource/generate/default/addon/controller/home/index.go.template b/server/resource/generate/default/addon/controller/home/index.go.template new file mode 100644 index 0000000..d120075 --- /dev/null +++ b/server/resource/generate/default/addon/controller/home/index.go.template @@ -0,0 +1,34 @@ +// Package home +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package home + +import ( + "context" + "github.com/gogf/gf/v2/frame/g" + "hotgo/addons/@{.name}/api/home/index" + "hotgo/addons/@{.name}/service" + "hotgo/internal/model" + isc "hotgo/internal/service" +) + +// Index 基础 +var Index = cIndex{} + +type cIndex struct{} + +func (a *cIndex) Index(ctx context.Context, req *index.TestReq) (res *index.TestRes, err error) { + data, err := service.SysIndex().Test(ctx, &req.IndexTestInp) + if err != nil { + return + } + + isc.View().RenderTpl(ctx, "home/index.html", model.View{Data: g.Map{ + "name": data.Name, + "module": data.Module, + "time": data.Time, + }}) + return +} diff --git a/server/resource/generate/default/addon/controller/websocket/index.go.template b/server/resource/generate/default/addon/controller/websocket/index.go.template new file mode 100644 index 0000000..46f85a7 --- /dev/null +++ b/server/resource/generate/default/addon/controller/websocket/index.go.template @@ -0,0 +1,30 @@ +// Package websocket +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package websocket + +import ( + "context" + "hotgo/addons/@{.name}/api/websocket/index" + "hotgo/addons/@{.name}/service" +) + +var ( + Index = cIndex{} +) + +type cIndex struct{} + +// Test 测试 +func (c *cIndex) Test(ctx context.Context, req *index.TestReq) (res *index.TestRes, err error) { + data, err := service.SysIndex().Test(ctx, &req.IndexTestInp) + if err != nil { + return + } + + res = new(index.TestRes) + res.IndexTestModel = data + return +} diff --git a/server/resource/generate/default/addon/crons/crons.go.template b/server/resource/generate/default/addon/crons/crons.go.template new file mode 100644 index 0000000..fd6a45f --- /dev/null +++ b/server/resource/generate/default/addon/crons/crons.go.template @@ -0,0 +1,9 @@ +// Package crons +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package crons + +// 定时任务. +// 插件中的定时任务可以统一在这里注册和处理 diff --git a/server/resource/generate/default/addon/global/global.go.template b/server/resource/generate/default/addon/global/global.go.template new file mode 100644 index 0000000..4dbc10a --- /dev/null +++ b/server/resource/generate/default/addon/global/global.go.template @@ -0,0 +1,12 @@ +// Package global +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package global + +import "hotgo/internal/library/addons" + +var ( + skeleton *addons.Skeleton // 插件架子 +) diff --git a/server/resource/generate/default/addon/global/init.go.template b/server/resource/generate/default/addon/global/init.go.template new file mode 100644 index 0000000..1cebca1 --- /dev/null +++ b/server/resource/generate/default/addon/global/init.go.template @@ -0,0 +1,22 @@ +// Package global +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package global + +import ( + "context" + "hotgo/internal/library/addons" +) + +func Init(ctx context.Context, sk *addons.Skeleton) { + skeleton = sk +} + +func GetSkeleton() *addons.Skeleton { + if skeleton == nil { + panic("addon skeleton not initialized.") + } + return skeleton +} diff --git a/server/resource/generate/default/addon/logic/.gitkeep b/server/resource/generate/default/addon/logic/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/resource/generate/default/addon/logic/logic.go.template b/server/resource/generate/default/addon/logic/logic.go.template new file mode 100644 index 0000000..3aaeccf --- /dev/null +++ b/server/resource/generate/default/addon/logic/logic.go.template @@ -0,0 +1,9 @@ +// ========================================================================== +// Code generated by GoFrame CLI tool. DO NOT EDIT. +// ========================================================================== + +package logic + +import ( + _ "hotgo/addons/@{.name}/logic/sys" +) diff --git a/server/resource/generate/default/addon/logic/sys/config.go.template b/server/resource/generate/default/addon/logic/sys/config.go.template new file mode 100644 index 0000000..154f236 --- /dev/null +++ b/server/resource/generate/default/addon/logic/sys/config.go.template @@ -0,0 +1,59 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "github.com/gogf/gf/v2/util/gconv" + "hotgo/addons/@{.name}/global" + "hotgo/addons/@{.name}/model" + "hotgo/addons/@{.name}/model/input/sysin" + "hotgo/addons/@{.name}/service" + isc "hotgo/internal/service" +) + +type sSysConfig struct{} + +func NewSysConfig() *sSysConfig { + return &sSysConfig{} +} + +func init() { + service.RegisterSysConfig(NewSysConfig()) +} + +// GetBasic 获取基础配置 +func (s *sSysConfig) GetBasic(ctx context.Context) (conf *model.BasicConfig, err error) { + var in sysin.GetConfigInp + in.GetAddonsConfigInp.AddonName = global.GetSkeleton().Name + in.GetAddonsConfigInp.Group = "basic" + models, err := isc.SysAddonsConfig().GetConfigByGroup(ctx, &in.GetAddonsConfigInp) + if err != nil { + return + } + + err = gconv.Struct(models.List, &conf) + return +} + +// GetConfigByGroup 获取指定分组配置 +func (s *sSysConfig) GetConfigByGroup(ctx context.Context, in *sysin.GetConfigInp) (res *sysin.GetConfigModel, err error) { + in.GetAddonsConfigInp.AddonName = global.GetSkeleton().Name + models, err := isc.SysAddonsConfig().GetConfigByGroup(ctx, &in.GetAddonsConfigInp) + if err != nil { + return + } + + res = new(sysin.GetConfigModel) + res.List = models.List + return +} + +// UpdateConfigByGroup 更新指定分组的配置 +func (s *sSysConfig) UpdateConfigByGroup(ctx context.Context, in *sysin.UpdateConfigInp) error { + in.UpdateAddonsConfigInp.AddonName = global.GetSkeleton().Name + return isc.SysAddonsConfig().UpdateConfigByGroup(ctx, &in.UpdateAddonsConfigInp) +} diff --git a/server/resource/generate/default/addon/logic/sys/index.go.template b/server/resource/generate/default/addon/logic/sys/index.go.template new file mode 100644 index 0000000..90af426 --- /dev/null +++ b/server/resource/generate/default/addon/logic/sys/index.go.template @@ -0,0 +1,35 @@ +// Package sys +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sys + +import ( + "context" + "fmt" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/addons/@{.name}/global" + "hotgo/addons/@{.name}/model/input/sysin" + "hotgo/addons/@{.name}/service" + "hotgo/internal/library/contexts" +) + +type sSysIndex struct{} + +func NewSysIndex() *sSysIndex { + return &sSysIndex{} +} + +func init() { + service.RegisterSysIndex(NewSysIndex()) +} + +// Test 测试 +func (s *sSysIndex) Test(ctx context.Context, in *sysin.IndexTestInp) (res *sysin.IndexTestModel, err error) { + res = new(sysin.IndexTestModel) + res.Name = in.Name + res.Module = fmt.Sprintf("当前插件模块是:%s,当前应用模块是:%s", global.GetSkeleton().Name, contexts.Get(ctx).Module) + res.Time = gtime.Now() + return +} diff --git a/server/resource/generate/default/addon/main.go.template b/server/resource/generate/default/addon/main.go.template new file mode 100644 index 0000000..3bffaa9 --- /dev/null +++ b/server/resource/generate/default/addon/main.go.template @@ -0,0 +1,96 @@ +// Package @{.name} +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package @{.name} + +import ( + "context" + "github.com/gogf/gf/v2/net/ghttp" + "github.com/gogf/gf/v2/os/gctx" + _ "hotgo/addons/@{.name}/crons" + "hotgo/addons/@{.name}/global" + _ "hotgo/addons/@{.name}/logic" + _ "hotgo/addons/@{.name}/queues" + "hotgo/addons/@{.name}/router" + "hotgo/internal/library/addons" + "hotgo/internal/service" + "sync" +) + +type module struct { + skeleton *addons.Skeleton + ctx context.Context + sync.Mutex +} + +func init() { + newModule() +} + +func newModule() { + m := &module{ + skeleton: &addons.Skeleton{ + Label: `@{.label}`, + Name: `@{.name}`, + Group: @{.group}, + Logo: "", + Brief: `@{.brief}`, + Description: `@{.description}`, + Author: `@{.author}`, + Version: `@{.version}`, // 当该版本号高于已安装的版本号时,会提示可以更新 + }, + ctx: gctx.New(), + } + addons.RegisterModule(m) +} + +// Start 启动模块 +func (m *module) Start(option *addons.Option) (err error) { + // 初始化模块 + global.Init(m.ctx, m.skeleton) + + // 注册插件路由 + option.Server.Group("/", func(group *ghttp.RouterGroup) { + group.Middleware(service.Middleware().Addon) + router.Admin(m.ctx, group) + router.Api(m.ctx, group) + router.Home(m.ctx, group) + router.WebSocket(m.ctx, group) + }) + return +} + +// Stop 停止模块 +func (m *module) Stop() (err error) { + return +} + +// Ctx 上下文 +func (m *module) Ctx() context.Context { + return m.ctx +} + +// GetSkeleton 获取模块 +func (m *module) GetSkeleton() *addons.Skeleton { + return m.skeleton +} + +// Install 安装模块 +func (m *module) Install(ctx context.Context) (err error) { + // ... + return +} + +// Upgrade 更新模块 +func (m *module) Upgrade(ctx context.Context) (err error) { + // ... + return +} + +// UnInstall 卸载模块 +func (m *module) UnInstall(ctx context.Context) (err error) { + // ... + return +} diff --git a/server/resource/generate/default/addon/model/config.go.template b/server/resource/generate/default/addon/model/config.go.template new file mode 100644 index 0000000..7ad8505 --- /dev/null +++ b/server/resource/generate/default/addon/model/config.go.template @@ -0,0 +1,11 @@ +// Package model +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package model + +// BasicConfig 基础配置 +type BasicConfig struct { + Test string `json:"basicTest"` +} diff --git a/server/resource/generate/default/addon/model/input/sysin/config.go.template b/server/resource/generate/default/addon/model/input/sysin/config.go.template new file mode 100644 index 0000000..de3b02c --- /dev/null +++ b/server/resource/generate/default/addon/model/input/sysin/config.go.template @@ -0,0 +1,24 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package sysin + +import ( + "github.com/gogf/gf/v2/frame/g" + "hotgo/internal/model/input/sysin" +) + +// UpdateConfigInp 更新指定配置 +type UpdateConfigInp struct { + sysin.UpdateAddonsConfigInp +} + +type GetConfigInp struct { + sysin.GetAddonsConfigInp +} + +type GetConfigModel struct { + List g.Map `json:"list"` +} diff --git a/server/resource/generate/default/addon/model/input/sysin/index.go.template b/server/resource/generate/default/addon/model/input/sysin/index.go.template new file mode 100644 index 0000000..01d3bdc --- /dev/null +++ b/server/resource/generate/default/addon/model/input/sysin/index.go.template @@ -0,0 +1,27 @@ +// Package sysin +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// +package sysin + +import ( + "context" + "github.com/gogf/gf/v2/os/gtime" +) + +// IndexTestInp 测试 +type IndexTestInp struct { + Name string `json:"name" d:"HotGo" dc:"名称"` +} + +func (in *IndexTestInp) Filter(ctx context.Context) (err error) { + return +} + +type IndexTestModel struct { + Name string `json:"name" dc:"名称"` + Module string `json:"module" dc:"当前插件模块"` + Time *gtime.Time `json:"time" dc:"当前时间"` +} diff --git a/server/resource/generate/default/addon/queues/queues.go.template b/server/resource/generate/default/addon/queues/queues.go.template new file mode 100644 index 0000000..4d0559c --- /dev/null +++ b/server/resource/generate/default/addon/queues/queues.go.template @@ -0,0 +1,9 @@ +// Package queues +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package queues + +// 消息队列. +// 插件中的消息队列消费者可以统一在这里注册和处理 diff --git a/server/resource/generate/default/addon/resource/public/.gitkeep b/server/resource/generate/default/addon/resource/public/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/resource/generate/default/addon/resource/public/default.template b/server/resource/generate/default/addon/resource/public/default.template new file mode 100644 index 0000000..3571c82 --- /dev/null +++ b/server/resource/generate/default/addon/resource/public/default.template @@ -0,0 +1 @@ +Hello!这是创建插件 [@{.label}] 时默认生成的一个静态目录文件,用于测试,当你看到这个提示时,说明已经联调成功啦! diff --git a/server/resource/generate/default/addon/resource/template/home/index.html b/server/resource/generate/default/addon/resource/template/home/index.html new file mode 100644 index 0000000..3502f4a --- /dev/null +++ b/server/resource/generate/default/addon/resource/template/home/index.html @@ -0,0 +1,30 @@ + + + + + + + + + @{.Title} + + + + +
+

Hello,@{.Data.name}!!

+

@{.Data.module}

+

服务器时间:@{.Data.time}

+
+ + + \ No newline at end of file diff --git a/server/resource/generate/default/addon/router/admin.go.template b/server/resource/generate/default/addon/router/admin.go.template new file mode 100644 index 0000000..4080b50 --- /dev/null +++ b/server/resource/generate/default/addon/router/admin.go.template @@ -0,0 +1,34 @@ +// Package router +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package router + +import ( + "context" + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/addons/@{.name}/controller/admin/sys" + "hotgo/addons/@{.name}/global" + "hotgo/addons/@{.name}/router/genrouter" + "hotgo/internal/consts" + "hotgo/internal/library/addons" + "hotgo/internal/service" +) + +// Admin 后台路由 +func Admin(ctx context.Context, group *ghttp.RouterGroup) { + prefix := addons.RouterPrefix(ctx, consts.AppAdmin, global.GetSkeleton().Name) + group.Group(prefix, func(group *ghttp.RouterGroup) { + group.Bind( + sys.Index, + ) + group.Middleware(service.Middleware().AdminAuth) + group.Bind( + sys.Config, + ) + }) + + // 注册生成路由 + genrouter.Register(ctx, group) +} diff --git a/server/resource/generate/default/addon/router/api.go.template b/server/resource/generate/default/addon/router/api.go.template new file mode 100644 index 0000000..8c5f64c --- /dev/null +++ b/server/resource/generate/default/addon/router/api.go.template @@ -0,0 +1,32 @@ +// Package router +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package router + +import ( + "context" + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/addons/@{.name}/controller/api" + "hotgo/addons/@{.name}/global" + "hotgo/internal/consts" + "hotgo/internal/library/addons" + "hotgo/internal/service" +) + +// Api 前台路由 +func Api(ctx context.Context, group *ghttp.RouterGroup) { + prefix := addons.RouterPrefix(ctx, consts.AppApi, global.GetSkeleton().Name) + group.Group(prefix, func(group *ghttp.RouterGroup) { + group.Bind( + // 无需验证的路由 + api.Index, + ) + group.Middleware(service.Middleware().ApiAuth) + group.Bind( + // 需要验证的路由 + // ... + ) + }) +} diff --git a/server/resource/generate/default/addon/router/genrouter/init.go.template b/server/resource/generate/default/addon/router/genrouter/init.go.template new file mode 100644 index 0000000..d9ba8eb --- /dev/null +++ b/server/resource/generate/default/addon/router/genrouter/init.go.template @@ -0,0 +1,34 @@ +// Package genrouter +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package genrouter + +import ( + "context" + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/addons/@{.name}/global" + "hotgo/internal/consts" + "hotgo/internal/library/addons" + "hotgo/internal/service" +) + +var ( + NoLoginRouter []interface{} // 无需登录 + LoginRequiredRouter []interface{} // 需要登录 +) + +// Register 注册通过代码生成的后台路由 +func Register(ctx context.Context, group *ghttp.RouterGroup) { + prefix := addons.RouterPrefix(ctx, consts.AppAdmin, global.GetSkeleton().Name) + group.Group(prefix, func(group *ghttp.RouterGroup) { + if len(NoLoginRouter) > 0 { + group.Bind(NoLoginRouter...) + } + group.Middleware(service.Middleware().AdminAuth) + if len(LoginRequiredRouter) > 0 { + group.Bind(LoginRequiredRouter...) + } + }) +} diff --git a/server/resource/generate/default/addon/router/home.go.template b/server/resource/generate/default/addon/router/home.go.template new file mode 100644 index 0000000..51e3645 --- /dev/null +++ b/server/resource/generate/default/addon/router/home.go.template @@ -0,0 +1,25 @@ +// Package router +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package router + +import ( + "context" + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/addons/@{.name}/controller/home" + "hotgo/addons/@{.name}/global" + "hotgo/internal/consts" + "hotgo/internal/library/addons" +) + +// Home 前台页面路由 +func Home(ctx context.Context, group *ghttp.RouterGroup) { + prefix := addons.RouterPrefix(ctx, consts.AppHome, global.GetSkeleton().Name) + group.Group(prefix, func(group *ghttp.RouterGroup) { + group.Bind( + home.Index, + ) + }) +} diff --git a/server/resource/generate/default/addon/router/websocket.go.template b/server/resource/generate/default/addon/router/websocket.go.template new file mode 100644 index 0000000..e10a90e --- /dev/null +++ b/server/resource/generate/default/addon/router/websocket.go.template @@ -0,0 +1,39 @@ +// Package router +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) 2024 HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +package router + +import ( + "context" + "github.com/gogf/gf/v2/net/ghttp" + "hotgo/addons/@{.name}/controller/websocket" + "hotgo/addons/@{.name}/global" + "hotgo/internal/consts" + "hotgo/internal/library/addons" + "hotgo/internal/service" + ws "hotgo/internal/websocket" +) + +// WebSocket ws路由配置 +func WebSocket(ctx context.Context, group *ghttp.RouterGroup) { + prefix := addons.RouterPrefix(ctx, consts.AppWebSocket, global.GetSkeleton().Name) + group.Group(prefix, func(group *ghttp.RouterGroup) { + group.Bind( + // 无需验证的路由 + websocket.Index, + ) + // ws连接中间件 + group.Middleware(service.Middleware().WebSocketAuth) + group.Bind( + // 需要验证的路由 + // .. + ) + }) + + // 注册消息路由 + ws.RegisterMsg(ws.EventHandlers{ + // ... + }) +} diff --git a/server/resource/generate/default/addon/service/.gitkeep b/server/resource/generate/default/addon/service/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/resource/generate/default/addon/service/sys.go.template b/server/resource/generate/default/addon/service/sys.go.template new file mode 100644 index 0000000..6266b34 --- /dev/null +++ b/server/resource/generate/default/addon/service/sys.go.template @@ -0,0 +1,50 @@ +// ================================================================================ +// Code generated by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import ( + "context" + "hotgo/addons/@{.name}/model" + "hotgo/addons/@{.name}/model/input/sysin" +) + +type ( + ISysConfig interface { + GetBasic(ctx context.Context) (conf *model.BasicConfig, err error) + GetConfigByGroup(ctx context.Context, in *sysin.GetConfigInp) (res *sysin.GetConfigModel, err error) + UpdateConfigByGroup(ctx context.Context, in *sysin.UpdateConfigInp) error + } + ISysIndex interface { + Test(ctx context.Context, in *sysin.IndexTestInp) (res *sysin.IndexTestModel, err error) + } +) + +var ( + localSysConfig ISysConfig + localSysIndex ISysIndex +) + +func SysConfig() ISysConfig { + if localSysConfig == nil { + panic("implement not found for interface ISysConfig, forgot register?") + } + return localSysConfig +} + +func RegisterSysConfig(i ISysConfig) { + localSysConfig = i +} + +func SysIndex() ISysIndex { + if localSysIndex == nil { + panic("implement not found for interface ISysIndex, forgot register?") + } + return localSysIndex +} + +func RegisterSysIndex(i ISysIndex) { + localSysIndex = i +} diff --git a/server/resource/generate/default/curd/api.go.template b/server/resource/generate/default/curd/api.go.template new file mode 100644 index 0000000..efa1744 --- /dev/null +++ b/server/resource/generate/default/curd/api.go.template @@ -0,0 +1,101 @@ +// Package @{.varName | ToLower} +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) @{NowYear} HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version @{.hgVersion} +// +package @{.varName | ToLower} + +import ( + "github.com/gogf/gf/v2/frame/g" + "@{.importInput}" + "hotgo/internal/model/input/form" + @{ if eq .options.Step.IsTreeTable true }"hotgo/utility/tree"@{end} +) + +// ListReq 查询@{.tableComment}列表 +type ListReq struct { + g.Meta `path:"/@{.varName | LcFirst}/list" method:"get" tags:"@{.tableComment}" summary:"获取@{.tableComment}列表"` + @{.templateGroup}in.@{.varName}ListInp +} + +type ListRes struct { + form.PageRes + List []*@{.templateGroup}in.@{.varName}ListModel `json:"list" dc:"数据列表"` +} +@{ if eq .options.Step.HasExport true } +// ExportReq 导出@{.tableComment}列表 +type ExportReq struct { + g.Meta `path:"/@{.varName | LcFirst}/export" method:"get" tags:"@{.tableComment}" summary:"导出@{.tableComment}列表"` + @{.templateGroup}in.@{.varName}ListInp +} + +type ExportRes struct{} +@{end} +@{ if or (eq .options.Step.HasView true) (eq .options.Step.HasEdit true) } +// ViewReq 获取@{.tableComment}指定信息 +type ViewReq struct { + g.Meta `path:"/@{.varName | LcFirst}/view" method:"get" tags:"@{.tableComment}" summary:"获取@{.tableComment}指定信息"` + @{.templateGroup}in.@{.varName}ViewInp +} + +type ViewRes struct { + *@{.templateGroup}in.@{.varName}ViewModel +} +@{end} +@{ if eq .options.Step.HasEdit true } +// EditReq 修改/新增@{.tableComment} +type EditReq struct { + g.Meta `path:"/@{.varName | LcFirst}/edit" method:"post" tags:"@{.tableComment}" summary:"修改/新增@{.tableComment}"` + @{.templateGroup}in.@{.varName}EditInp +} + +type EditRes struct{} +@{end} +@{ if eq .options.Step.HasDel true } +// DeleteReq 删除@{.tableComment} +type DeleteReq struct { + g.Meta `path:"/@{.varName | LcFirst}/delete" method:"post" tags:"@{.tableComment}" summary:"删除@{.tableComment}"` + @{.templateGroup}in.@{.varName}DeleteInp +} + +type DeleteRes struct{} +@{end} +@{ if and (eq .options.Step.HasEdit true) (eq .options.Step.HasMaxSort true) } +// MaxSortReq 获取@{.tableComment}最大排序 +type MaxSortReq struct { + g.Meta `path:"/@{.varName | LcFirst}/maxSort" method:"get" tags:"@{.tableComment}" summary:"获取@{.tableComment}最大排序"` + @{.templateGroup}in.@{.varName}MaxSortInp +} + +type MaxSortRes struct { + *@{.templateGroup}in.@{.varName}MaxSortModel +} +@{end} +@{ if eq .options.Step.HasStatus true } +// StatusReq 更新@{.tableComment}状态 +type StatusReq struct { + g.Meta `path:"/@{.varName | LcFirst}/status" method:"post" tags:"@{.tableComment}" summary:"更新@{.tableComment}状态"` + @{.templateGroup}in.@{.varName}StatusInp +} + +type StatusRes struct{} +@{end} +@{ if eq .options.Step.HasSwitch true } +// SwitchReq 更新@{.tableComment}开关状态 +type SwitchReq struct { + g.Meta `path:"/@{.varName | LcFirst}/switch" method:"post" tags:"@{.tableComment}" summary:"更新@{.tableComment}状态"` + @{.templateGroup}in.@{.varName}SwitchInp +} + +type SwitchRes struct{} +@{end} +@{ if eq .options.Step.IsTreeTable true } +// TreeOptionReq 获取@{.tableComment}关系树选项 +type TreeOptionReq struct { + g.Meta `path:"/@{.varName | LcFirst}/treeOption" method:"get" tags:"@{.tableComment}" summary:"获取@{.tableComment}关系树选项"` +} + +type TreeOptionRes []tree.Node +@{end} \ No newline at end of file diff --git a/server/resource/generate/default/curd/controller.go.template b/server/resource/generate/default/curd/controller.go.template new file mode 100644 index 0000000..13cfef7 --- /dev/null +++ b/server/resource/generate/default/curd/controller.go.template @@ -0,0 +1,118 @@ +// Package @{.templateGroup} +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) @{NowYear} HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version @{.hgVersion} +// +package @{.templateGroup} + +import ( + "context" + "@{.importApi}" + "hotgo/internal/model/input/form" + "@{.importInput}" + "@{.importService}" + "hotgo/utility/validate" +) + +var ( + @{.varName} = c@{.varName}{} +) + +type c@{.varName} struct{} + +// List 查看@{.tableComment}列表 +func (c *c@{.varName}) List(ctx context.Context, req *@{.varName | ToLower}.ListReq) (res *@{.varName | ToLower}.ListRes, err error) { + list, totalCount, err := service.@{.servFunName}().List(ctx, &req.@{.varName}ListInp) + if err != nil { + return + } + + if list == nil { + list = []*@{.templateGroup}in.@{.varName}ListModel{} + } + + res = new(@{.varName | ToLower}.ListRes) + res.List = list + res.PageRes.Pack(req, totalCount) + return +} +@{ if eq .options.Step.HasExport true } +// Export 导出@{.tableComment}列表 +func (c *c@{.varName}) Export(ctx context.Context, req *@{.varName | ToLower}.ExportReq) (res *@{.varName | ToLower}.ExportRes, err error) { + err = service.@{.servFunName}().Export(ctx, &req.@{.varName}ListInp) + return +} +@{end} +@{ if eq .options.Step.HasEdit true } +// Edit 更新@{.tableComment} +func (c *c@{.varName}) Edit(ctx context.Context, req *@{.varName | ToLower}.EditReq) (res *@{.varName | ToLower}.EditRes, err error) { + err = service.@{.servFunName}().Edit(ctx, &req.@{.varName}EditInp) + return +} +@{end} +@{ if and (eq .options.Step.HasEdit true) (eq .options.Step.HasMaxSort true) } +// MaxSort 获取@{.tableComment}最大排序 +func (c *c@{.varName}) MaxSort(ctx context.Context, req *@{.varName | ToLower}.MaxSortReq) (res *@{.varName | ToLower}.MaxSortRes, err error) { + data, err := service.@{.servFunName}().MaxSort(ctx, &req.@{.varName}MaxSortInp) + if err != nil { + return + } + + res = new(@{.varName | ToLower}.MaxSortRes) + res.@{.varName}MaxSortModel = data + return +} +@{end} +@{ if or (eq .options.Step.HasView true) (eq .options.Step.HasEdit true) } +// View 获取指定@{.tableComment}信息 +func (c *c@{.varName}) View(ctx context.Context, req *@{.varName | ToLower}.ViewReq) (res *@{.varName | ToLower}.ViewRes, err error) { + data, err := service.@{.servFunName}().View(ctx, &req.@{.varName}ViewInp) + if err != nil { + return + } + + res = new(@{.varName | ToLower}.ViewRes) + res.@{.varName}ViewModel = data + return +} +@{end} +@{ if eq .options.Step.HasDel true } +// Delete 删除@{.tableComment} +func (c *c@{.varName}) Delete(ctx context.Context, req *@{.varName | ToLower}.DeleteReq) (res *@{.varName | ToLower}.DeleteRes, err error) { + err = service.@{.servFunName}().Delete(ctx, &req.@{.varName}DeleteInp) + return +} +@{end} +@{ if eq .options.Step.HasStatus true } +// Status 更新@{.tableComment}状态 +func (c *c@{.varName}) Status(ctx context.Context, req *@{.varName | ToLower}.StatusReq) (res *@{.varName | ToLower}.StatusRes, err error) { + err = service.@{.servFunName}().Status(ctx, &req.@{.varName}StatusInp) + return +} +@{end} +@{ if eq .options.Step.HasSwitch true } +// Switch 更新@{.tableComment}开关状态 +func (c *c@{.varName}) Switch(ctx context.Context, req *@{.varName | ToLower}.SwitchReq) (res *@{.varName | ToLower}.SwitchRes, err error) { + err = service.@{.servFunName}().Switch(ctx, &req.@{.varName}SwitchInp) + return +} +@{end} +@{ if eq .options.Step.IsTreeTable true } +// TreeOption 获取@{.tableComment}关系树选项 +func (c *c@{.varName}) TreeOption(ctx context.Context, req *@{.varName | ToLower}.TreeOptionReq) (res *@{.varName | ToLower}.TreeOptionRes, err error) { + data, err := service.@{.servFunName}().TreeOption(ctx) + if err != nil { + return nil, err + } + + if len(data) > 0 { + res = (*@{.varName | ToLower}.TreeOptionRes)(&data) + } else { + temp := make(@{.varName | ToLower}.TreeOptionRes, 0) + res = &temp + } + return +} +@{end} diff --git a/server/resource/generate/default/curd/input.go.template b/server/resource/generate/default/curd/input.go.template new file mode 100644 index 0000000..263095b --- /dev/null +++ b/server/resource/generate/default/curd/input.go.template @@ -0,0 +1,167 @@ +// Package @{.templateGroup}in +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) @{NowYear} HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version @{.hgVersion} +// +package @{.templateGroup}in + +import ( + "context" + "errors" + "github.com/gogf/gf/v2/encoding/gjson" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gtime" + "hotgo/internal/consts" + "hotgo/internal/model/entity" + "hotgo/internal/model/input/form" + "hotgo/utility/validate" + @{ if eq .options.Step.HasHookMemberSummary true }"hotgo/internal/library/hgorm/hook"@{end} + @{ if eq .options.Step.IsTreeTable true }"hotgo/utility/tree"@{end} +) +@{ if eq .options.Step.HasEdit true } +// @{.varName}UpdateFields 修改@{.tableComment}字段过滤 +type @{.varName}UpdateFields struct { +@{.updateFieldsColumns} +} + +// @{.varName}InsertFields 新增@{.tableComment}字段过滤 +type @{.varName}InsertFields struct { +@{.insertFieldsColumns} +} + +// @{.varName}EditInp 修改/新增@{.tableComment} +type @{.varName}EditInp struct { + entity.@{.daoName} +} + +func (in *@{.varName}EditInp) Filter(ctx context.Context) (err error) { +@{.editInpValidator} + return +} + +type @{.varName}EditModel struct{} +@{end} +@{ if eq .options.Step.HasDel true } +// @{.varName}DeleteInp 删除@{.tableComment} +type @{.varName}DeleteInp struct { + @{.pk.GoName} interface{} `json:"@{.pk.TsName}" v:"required#@{.pk.Dc}不能为空" dc:"@{.pk.Dc}"` +} + +func (in *@{.varName}DeleteInp) Filter(ctx context.Context) (err error) { + return +} + +type @{.varName}DeleteModel struct{} +@{end} +@{ if or (eq .options.Step.HasView true) (eq .options.Step.HasEdit true) } +// @{.varName}ViewInp 获取指定@{.tableComment}信息 +type @{.varName}ViewInp struct { + @{.pk.GoName} @{.pk.GoType} `json:"@{.pk.TsName}" v:"required#@{.pk.Dc}不能为空" dc:"@{.pk.Dc}"` +} + +func (in *@{.varName}ViewInp) Filter(ctx context.Context) (err error) { + return +} + +type @{.varName}ViewModel struct { +@{.viewModelColumns} +}@{end} + +// @{.varName}ListInp 获取@{.tableComment}列表 +type @{.varName}ListInp struct { + form.PageReq +@{.listInpColumns} +} + +func (in *@{.varName}ListInp) Filter(ctx context.Context) (err error) { + return +} + +type @{.varName}ListModel struct { +@{.listModelColumns} +} + +@{ if eq .options.Step.HasExport true } +// @{.varName}ExportModel 导出@{.tableComment} +type @{.varName}ExportModel struct { +@{.exportModelColumns} +}@{end} +@{ if and (eq .options.Step.HasEdit true) (eq .options.Step.HasMaxSort true) } +// @{.varName}MaxSortInp 获取@{.tableComment}最大排序 +type @{.varName}MaxSortInp struct{} + +func (in *@{.varName}MaxSortInp) Filter(ctx context.Context) (err error) { + return +} + +type @{.varName}MaxSortModel struct { + Sort int `json:"sort" description:"排序"` +} +@{end} +@{ if eq .options.Step.HasStatus true } +// @{.varName}StatusInp 更新@{.tableComment}状态 +type @{.varName}StatusInp struct { + @{.pk.GoName} @{.pk.GoType} `json:"@{.pk.TsName}" v:"required#@{.pk.Dc}不能为空" dc:"@{.pk.Dc}"` + Status int `json:"status" dc:"状态"` +} + +func (in *@{.varName}StatusInp) Filter(ctx context.Context) (err error) { + if in.@{.pk.GoName} <= 0 { + err = gerror.New("@{.pk.Dc}不能为空") + return + } + + if in.Status <= 0 { + err = gerror.New("状态不能为空") + return + } + + if !validate.InSlice(consts.StatusSlice, in.Status) { + err = gerror.New("状态不正确") + return + } + return +} + +type @{.varName}StatusModel struct{} +@{end} +@{ if eq .options.Step.HasSwitch true } +// @{.varName}SwitchInp 更新@{.tableComment}开关状态 +type @{.varName}SwitchInp struct { + form.SwitchReq + @{.pk.GoName} @{.pk.GoType} `json:"@{.pk.TsName}" v:"required#@{.pk.Dc}不能为空" dc:"@{.pk.Dc}"` +} + +func (in *@{.varName}SwitchInp) Filter(ctx context.Context) (err error) { + return +} + +type @{.varName}SwitchModel struct{} +@{end} + +@{ if eq .options.Step.IsTreeTable true } +// @{.varName}TreeOption 关系树选项 +type @{.varName}TreeOption struct { +@{.treeOptionFields} + Children []tree.Node `json:"children" dc:"子节点"` +} + +// ID 获取节点ID +func (t *@{.varName}TreeOption) ID() int64 { + return t.@{.pk.GoName} +} + +// PID 获取父级节点ID +func (t *@{.varName}TreeOption) PID() int64 { + return t.Pid +} + +// SetChildren 设置子节点数据 +func (t *@{.varName}TreeOption) SetChildren(children []tree.Node) { + t.Children = children +} +@{end} + diff --git a/server/resource/generate/default/curd/logic.go.template b/server/resource/generate/default/curd/logic.go.template new file mode 100644 index 0000000..b9dc63a --- /dev/null +++ b/server/resource/generate/default/curd/logic.go.template @@ -0,0 +1,256 @@ +// Package @{.templateGroup} +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) @{NowYear} HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version @{.hgVersion} +// +package @{.templateGroup} + +import ( + "context" + "fmt" + "github.com/gogf/gf/v2/database/gdb" + "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/frame/g" + "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/os/gtime" + "github.com/gogf/gf/v2/util/gconv" + "hotgo/internal/dao" + "hotgo/internal/consts" + "hotgo/internal/library/contexts" + "hotgo/internal/library/hgorm" + "hotgo/internal/library/hgorm/handler" + "hotgo/internal/library/hgorm/hook" + "@{.importInput}" + "hotgo/internal/model/input/form" + "@{.importService}" + "hotgo/utility/convert" + "hotgo/utility/excel" + "hotgo/utility/validate" + @{ if eq .options.Step.IsAddon true }isc "hotgo/internal/service"@{end} + @{ if eq .options.Step.IsTreeTable true }"hotgo/utility/tree"@{end} + @{ if eq .options.Step.HasFuncDict true }"hotgo/internal/library/dict"@{end} + @{ if and (eq .options.Step.HasFuncDict true) (eq .options.Step.IsAddon false) }"hotgo/internal/model"@{end} + @{ if and (eq .options.Step.HasFuncDict true) (eq .options.Step.IsAddon true) }imodel "hotgo/internal/model"@{end} +) + +type s@{.servFunName} struct{} + +func New@{.servFunName}() *s@{.servFunName} { + return &s@{.servFunName}{} +} + +func init() { + service.Register@{.servFunName}(New@{.servFunName}()) + @{ if eq .options.Step.HasFuncDict true }dict.RegisterFunc("@{.varName | LcFirst}Option", "@{.tableComment}选项", service.@{.servFunName}().Option)@{end}} + +// Model @{.tableComment}ORM模型 +func (s *s@{.servFunName}) Model(ctx context.Context, option ...*handler.Option) *gdb.Model { + return handler.Model(dao.@{.daoName}.Ctx(ctx), option...) +} + +// List 获取@{.tableComment}列表 +func (s *s@{.servFunName}) List(ctx context.Context, in *@{.templateGroup}in.@{.varName}ListInp) (list []*@{.templateGroup}in.@{.varName}ListModel, totalCount int, err error) { + mod := s.Model(ctx@{ if eq .options.Step.HasNotFilterAuth true } ,&handler.Option{FilterAuth: false}@{end}) + + // 字段过滤 + @{.listFields} + + @{ if ne .listJoin "" } + // 关联表字段 + @{.listJoin} + @{end} + +@{.listWhere} + +@{ if eq .options.Step.IsTreeTable true } + // 树形列表判断是否需要分页 + if in.Pagination { + mod = mod.Page(in.Page, in.PerPage) + } +@{end} + +@{ if eq .options.Step.IsTreeTable false } + // 分页 + mod = mod.Page(in.Page, in.PerPage) +@{end} + + // 排序 + mod = mod.@{.listOrder} + +@{ if eq .options.Step.HasHookMemberSummary true } + // 操作人摘要信息 + mod = mod.Hook(hook.MemberSummary) +@{end} + + // 查询数据 + if err = mod.ScanAndCount(&list, &totalCount, false);err != nil { + err = gerror.Wrap(err, "获取@{.tableComment}列表失败,请稍后重试!") + return + } + return +} + +@{ if eq .options.Step.HasExport true } +// Export 导出@{.tableComment} +func (s *s@{.servFunName}) Export(ctx context.Context, in *@{.templateGroup}in.@{.varName}ListInp) (err error) { + list, totalCount, err := s.List(ctx, in) + if err != nil { + return + } + + // 字段的排序是依据tags的字段顺序,如果你不想使用默认的排序方式,可以直接定义 tags = []string{"字段名称", "字段名称2", ...} + tags, err := convert.GetEntityDescTags(@{.templateGroup}in.@{.varName}ExportModel{}) + if err != nil { + return + } + + var ( + fileName = "导出@{.tableComment}-" + gctx.CtxId(ctx) + sheetName = fmt.Sprintf("索引条件共%v行,共%v页,当前导出是第%v页,本页共%v行", totalCount, form.CalPageCount(totalCount, in.PerPage), in.Page, len(list)) + exports []@{.templateGroup}in.@{.varName}ExportModel + ) + + if err = gconv.Scan(list, &exports);err != nil { + return + } + + err = excel.ExportByStructs(ctx, tags, exports, fileName, sheetName) + return +}@{end} + +@{ if eq .options.Step.HasEdit true } +// Edit 修改/新增@{.tableComment} +func (s *s@{.servFunName}) Edit(ctx context.Context, in *@{.templateGroup}in.@{.varName}EditInp) (err error) { +@{.edit.unique}@{.edit.validation} return g.DB().Transaction(ctx, func(ctx context.Context, tx gdb.TX) (err error) { + @{ if eq .options.Step.IsTreeTable true }in.Pid, in.Level, in.Tree, err = hgorm.AutoUpdateTree(ctx, &dao.@{.daoName}, in.@{.pk.GoName}, in.Pid) + if err != nil { + return err + }@{end} + // 修改 + if in.@{.pk.GoName} > 0 { + @{.edit.update} + } + + // 新增 + @{.edit.insert} + return + }) +} +@{end} + +@{ if eq .options.Step.HasDel true } +// Delete 删除@{.tableComment} +func (s *s@{.servFunName}) Delete(ctx context.Context, in *@{.templateGroup}in.@{.varName}DeleteInp) (err error) { + @{ if eq .options.Step.IsTreeTable true }count, err := dao.@{.daoName}.Ctx(ctx).Where(dao.@{.daoName}.Columns().Pid, in.@{.pk.GoName}).Count() + if err != nil { + err = gerror.Wrap(err, consts.ErrorORM) + return err + } + if count > 0 { + return gerror.New("请先删除该@{.tableComment}下的所有下级!") + }@{end} + @{ if eq .deletedUpdate "" } + if _, err = s.Model(ctx@{ if eq .options.Step.HasNotFilterAuth true } ,&handler.Option{FilterAuth: false}@{end}).WherePri(in.@{.pk.GoName}).Unscoped().Delete();err != nil { + err = gerror.Wrap(err, "删除@{.tableComment}失败,请稍后重试!") + return + }@{else} + if _, err = s.Model(ctx@{ if eq .options.Step.HasNotFilterAuth true } ,&handler.Option{FilterAuth: false}@{end}).WherePri(in.@{.pk.GoName}).Data(@{.deletedUpdate}).Unscoped().Update();err != nil { + err = gerror.Wrap(err, "删除@{.tableComment}失败,请稍后重试!") + return + }@{end} + return +}@{end} + +@{ if and (eq .options.Step.HasEdit true) (eq .options.Step.HasMaxSort true) } +// MaxSort 获取@{.tableComment}最大排序 +func (s *s@{.servFunName}) MaxSort(ctx context.Context, in *@{.templateGroup}in.@{.varName}MaxSortInp) (res *@{.templateGroup}in.@{.varName}MaxSortModel, err error) { + if err = dao.@{.daoName}.Ctx(ctx).Fields(dao.@{.daoName}.Columns().Sort).OrderDesc(dao.@{.daoName}.Columns().Sort).Scan(&res); err != nil { + err = gerror.Wrap(err, "获取@{.tableComment}最大排序,请稍后重试!") + return + } + + if res == nil { + res = new(@{.templateGroup}in.@{.varName}MaxSortModel) + } + + res.Sort = form.DefaultMaxSort(res.Sort) + return +} +@{end} + +@{ if or (eq .options.Step.HasView true) (eq .options.Step.HasEdit true) } +// View 获取@{.tableComment}指定信息 +func (s *s@{.servFunName}) View(ctx context.Context, in *@{.templateGroup}in.@{.varName}ViewInp) (res *@{.templateGroup}in.@{.varName}ViewModel, err error) { + if err = s.Model(ctx@{ if eq .options.Step.HasNotFilterAuth true } ,&handler.Option{FilterAuth: false}@{end}).WherePri(in.@{.pk.GoName})@{ if eq .options.Step.HasHookMemberSummary true }.Hook(hook.MemberSummary)@{end}.Scan(&res);err != nil { + err = gerror.Wrap(err, "获取@{.tableComment}信息,请稍后重试!") + return + } + return +}@{end} + +@{ if eq .options.Step.HasStatus true } +// Status 更新@{.tableComment}状态 +func (s *s@{.servFunName}) Status(ctx context.Context, in *@{.templateGroup}in.@{.varName}StatusInp) (err error) { + if _, err = s.Model(ctx@{ if eq .options.Step.HasNotFilterAuth true } ,&handler.Option{FilterAuth: false}@{end}).WherePri(in.@{.pk.GoName}).Data(@{.statusUpdate}).Update();err != nil { + err = gerror.Wrap(err, "更新@{.tableComment}状态失败,请稍后重试!") + return + } + return +} +@{end} + +@{ if eq .options.Step.HasSwitch true } +// Switch 更新@{.tableComment}开关 +func (s *s@{.servFunName}) Switch(ctx context.Context, in *@{.templateGroup}in.@{.varName}SwitchInp) (err error) { + var fields = []string{ +@{.switchFields} // ... + } + + if !validate.InSlice(fields, in.Key) { + err = gerror.New("开关键名不在白名单") + return + } + + if _, err = s.Model(ctx@{ if eq .options.Step.HasNotFilterAuth true } ,&handler.Option{FilterAuth: false}@{end}).WherePri(in.@{.pk.GoName}).Data(@{.switchUpdate}).Update();err != nil { + err = gerror.Wrap(err, "更新@{.tableComment}开关失败,请稍后重试!") + return + } + return +} +@{end} + +@{ if eq .options.Step.IsTreeTable true } +// TreeOption 获取@{.tableComment}关系树选项 +func (s *s@{.servFunName}) TreeOption(ctx context.Context) (nodes []tree.Node, err error) { + var models []*@{.templateGroup}in.@{.varName}TreeOption + if err = s.Model(ctx@{ if eq .options.Step.HasNotFilterAuth true } ,&handler.Option{FilterAuth: false}@{end}).Fields(@{.templateGroup}in.@{.varName}TreeOption{}).OrderAsc(dao.@{.daoName}.Columns().Pid).@{.listOrder}.Scan(&models); err != nil { + err = gerror.Wrap(err, "获取@{.tableComment}关系树选项失败!") + return + } + nodes = make([]tree.Node, len(models)) + for i, v := range models { + nodes[i] = v + } + return tree.ListToTree(0, nodes) +} +@{end} + +@{ if eq .options.Step.HasFuncDict true } +// Option 获取@{.tableComment}选项 +func (s *s@{.servFunName}) Option(ctx context.Context) (opts []*@{ if eq .options.Step.IsAddon false }model@{end}@{ if eq .options.Step.IsAddon true }imodel@{end}.Option, err error) { + var models []*entity.@{.daoName} + if err = s.Model(ctx@{ if eq .options.Step.HasNotFilterAuth true } ,&handler.Option{FilterAuth: false}@{end}).Fields(dao.@{.daoName}.Columns().@{.options.FuncDict.Value.GoName},dao.@{.daoName}.Columns().@{.options.FuncDict.Label.GoName}). + @{.listOrder}.Scan(&models); err != nil { + err = gerror.Wrap(err, "获取@{.tableComment}选项失败!") + return + } + + opts = make([]*@{ if eq .options.Step.IsAddon false }model@{end}@{ if eq .options.Step.IsAddon true }imodel@{end}.Option, len(models)) + for k, v := range models { + opts[k] = dict.GenHashOption(v.@{.options.FuncDict.Value.GoName}, gconv.String(v.@{.options.FuncDict.Label.GoName})) + } + return +} +@{end} \ No newline at end of file diff --git a/server/resource/generate/default/curd/router.go.template b/server/resource/generate/default/curd/router.go.template new file mode 100644 index 0000000..4aeb9aa --- /dev/null +++ b/server/resource/generate/default/curd/router.go.template @@ -0,0 +1,14 @@ +// Package genrouter +// @Link https://github.com/bufanyun/hotgo +// @Copyright Copyright (c) @{NowYear} HotGo CLI +// @Author Ms <133814250@qq.com> +// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE +// @AutoGenerate Version @{.hgVersion} +// +package genrouter + +import "@{.importController}" + +func init() { + LoginRequiredRouter = append(LoginRequiredRouter, @{.templateGroup}.@{.varName}) // @{.tableComment} +} diff --git a/server/resource/generate/default/curd/source.sql.template b/server/resource/generate/default/curd/source.sql.template new file mode 100644 index 0000000..3321af3 --- /dev/null +++ b/server/resource/generate/default/curd/source.sql.template @@ -0,0 +1,74 @@ +-- hotgo自动生成菜单权限SQL 通常情况下只在首次生成代码时自动执行一次 +-- 如需再次执行请先手动删除生成的菜单权限和SQL文件:@{.generatePath} +-- Version: @{.hgVersion} +-- Date: @{.nowTime} +-- Link https://github.com/bufanyun/hotgo + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; + +-- +-- 数据库: `@{.dbName}` +-- + +-- -------------------------------------------------------- + +-- +-- 插入表中的数据 `@{.menuTable}` +-- + + +SET @now := now(); + + +-- 菜单目录 +INSERT INTO `@{.menuTable}` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, '@{.options.Menu.Pid}', '@{.tableComment}', '@{.varName | LcFirst}', '/@{.varName | LcFirst}', '@{.options.Menu.Icon}', '1', '@{.pageRedirect}', '', '', '@{.mainComponent}', '1', '', '0', '0', '', '0', '0', '0', '@{.dirLevel}', '@{.dirTree}', '@{.options.Menu.Sort}', '', '1', @now, @now); + + +SET @dirId = LAST_INSERT_ID(); + + +-- 菜单页面 +-- 列表 +INSERT INTO `@{.menuTable}` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @dirId, '@{.tableComment}列表', '@{.varName | LcFirst}Index', 'index', '', '2', '', '/@{.apiPrefix}/list', '', '/@{.componentPrefix}/index', '1', '@{.varName | LcFirst}', '0', '0', '', '0', '1', '0', '@{.listLevel}', CONCAT('@{.dirTree}tr_', @dirId,' '), '10', '', '1', @now, @now); + + +SET @listId = LAST_INSERT_ID(); +@{ if or (eq .options.Step.HasView true) (eq .options.Step.HasEdit true) } +-- 详情 +INSERT INTO `@{.menuTable}` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '@{.tableComment}详情', '@{.varName | LcFirst}View', '', '', '3', '', '/@{.apiPrefix}/view', '', '', '1', '', '0', '0', '', '0', '1', '0', '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), '10', '', '1', @now, @now); +@{end} + +-- 菜单按钮 +@{ if eq .options.Step.HasEdit true } +-- 编辑 +INSERT INTO `@{.menuTable}` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '编辑/新增@{.tableComment}', '@{.varName | LcFirst}Edit', '', '', '3', '', '/@{.apiPrefix}/edit', '', '', '1', '', '0', '0', '', '0', '1', '0', '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), '20', '', '1', @now, @now); +@{end} + +SET @editId = LAST_INSERT_ID(); +@{ if and (eq .options.Step.HasEdit true) (eq .options.Step.HasMaxSort true) } +-- 获取最大排序 +INSERT INTO `@{.menuTable}` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @editId, '获取@{.tableComment}最大排序', '@{.varName | LcFirst}MaxSort', '', '', '3', '', '/@{.apiPrefix}/maxSort', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.sortLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId, ' tr_', @editId,' '), '30', '', '1', @now, @now); +@{end} +@{ if eq .options.Step.HasDel true } +-- 删除 +INSERT INTO `@{.menuTable}` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '删除@{.tableComment}', '@{.varName | LcFirst}Delete', '', '', '3', '', '/@{.apiPrefix}/delete', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), '40', '', '1', @now, @now); +@{end} +@{ if eq .options.Step.HasStatus true } +-- 更新状态 +INSERT INTO `@{.menuTable}` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '修改@{.tableComment}状态', '@{.varName | LcFirst}Status', '', '', '3', '', '/@{.apiPrefix}/status', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), '50', '', '1', @now, @now); +@{end} +@{ if eq .options.Step.HasSwitch true } +-- 操作开关 +INSERT INTO `@{.menuTable}` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '操作@{.tableComment}开关', '@{.varName | LcFirst}Switch', '', '', '3', '', '/@{.apiPrefix}/switch', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), '60', '', '1', @now, @now); +@{end} +@{ if eq .options.Step.HasExport true } +-- 导出 +INSERT INTO `@{.menuTable}` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '导出@{.tableComment}', '@{.varName | LcFirst}Export', '', '', '3', '', '/@{.apiPrefix}/export', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), '70', '', '1', @now, @now); +@{end} +@{ if eq .options.Step.IsTreeTable true } +-- 关系树选项 +INSERT INTO `@{.menuTable}` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '获取@{.tableComment}关系树选项', '@{.varName | LcFirst}TreeOption', '', '', '3', '', '/@{.apiPrefix}/treeOption', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.btnLevel}', CONCAT('@{.dirTree}tr_', @dirId, ' tr_', @listId,' '), '70', '', '1', @now, @now); +@{end} +COMMIT; \ No newline at end of file diff --git a/server/resource/generate/default/curd/source_pgsql.sql.template b/server/resource/generate/default/curd/source_pgsql.sql.template new file mode 100644 index 0000000..116e51e --- /dev/null +++ b/server/resource/generate/default/curd/source_pgsql.sql.template @@ -0,0 +1,84 @@ +-- hotgo自动生成菜单权限SQL 通常情况下只在首次生成代码时自动执行一次 +-- 如需再次执行请先手动删除生成的菜单权限和SQL文件:@{.generatePath} +-- Version: @{.hgVersion} +-- Date: @{.nowTime} +-- Link https://github.com/bufanyun/hotgo + +-- +-- 数据库: "@{.dbName}" +-- + +-- -------------------------------------------------------- + +-- +-- 插入表中的数据 "@{.menuTable}" +-- + +DO $$ +DECLARE + dir_id bigint; + list_id bigint; + edit_id bigint; +BEGIN + -- 菜单目录 + INSERT INTO "@{.menuTable}" ("pid", "title", "name", "path", "icon", "type", "redirect", "permissions", "permission_name", "component", "always_show", "active_menu", "is_root", "is_frame", "frame_src", "keep_alive", "hidden", "affix", "level", "tree", "sort", "remark", "status", "created_at", "updated_at") + VALUES ('@{.options.Menu.Pid}', '@{.tableComment}', '@{.varName | LcFirst}', '/@{.varName | LcFirst}', '@{.options.Menu.Icon}', '1', '@{.pageRedirect}', '', '', '@{.mainComponent}', '1', '', '0', '0', '', '0', '0', '0', '@{.dirLevel}', '@{.dirTree}', '@{.options.Menu.Sort}', '', '1', now(), now()) + RETURNING id INTO dir_id; + + -- 菜单页面 + -- 列表 + INSERT INTO "@{.menuTable}" ("pid", "title", "name", "path", "icon", "type", "redirect", "permissions", "permission_name", "component", "always_show", "active_menu", "is_root", "is_frame", "frame_src", "keep_alive", "hidden", "affix", "level", "tree", "sort", "remark", "status", "created_at", "updated_at") + VALUES (dir_id, '@{.tableComment}列表', '@{.varName | LcFirst}Index', 'index', '', '2', '', '/@{.apiPrefix}/list', '', '/@{.componentPrefix}/index', '1', '@{.varName | LcFirst}', '0', '0', '', '0', '1', '0', '@{.listLevel}', '@{.dirTree}tr_' || dir_id || ' ', '10', '', '1', now(), now()) + RETURNING id INTO list_id; +@{ if or (eq .options.Step.HasView true) (eq .options.Step.HasEdit true) } + + -- 详情 + INSERT INTO "@{.menuTable}" ("pid", "title", "name", "path", "icon", "type", "redirect", "permissions", "permission_name", "component", "always_show", "active_menu", "is_root", "is_frame", "frame_src", "keep_alive", "hidden", "affix", "level", "tree", "sort", "remark", "status", "created_at", "updated_at") + VALUES (list_id, '@{.tableComment}详情', '@{.varName | LcFirst}View', '', '', '3', '', '/@{.apiPrefix}/view', '', '', '1', '', '0', '0', '', '0', '1', '0', '@{.btnLevel}', '@{.dirTree}tr_' || dir_id || ' tr_' || list_id || ' ', '10', '', '1', now(), now()); +@{end} + + -- 菜单按钮 +@{ if eq .options.Step.HasEdit true } + -- 编辑 + INSERT INTO "@{.menuTable}" ("pid", "title", "name", "path", "icon", "type", "redirect", "permissions", "permission_name", "component", "always_show", "active_menu", "is_root", "is_frame", "frame_src", "keep_alive", "hidden", "affix", "level", "tree", "sort", "remark", "status", "created_at", "updated_at") + VALUES (list_id, '编辑/新增@{.tableComment}', '@{.varName | LcFirst}Edit', '', '', '3', '', '/@{.apiPrefix}/edit', '', '', '1', '', '0', '0', '', '0', '1', '0', '@{.btnLevel}', '@{.dirTree}tr_' || dir_id || ' tr_' || list_id || ' ', '20', '', '1', now(), now()) + RETURNING id INTO edit_id; +@{end} +@{ if and (eq .options.Step.HasEdit true) (eq .options.Step.HasMaxSort true) } + + -- 获取最大排序 + INSERT INTO "@{.menuTable}" ("pid", "title", "name", "path", "icon", "type", "redirect", "permissions", "permission_name", "component", "always_show", "active_menu", "is_root", "is_frame", "frame_src", "keep_alive", "hidden", "affix", "level", "tree", "sort", "remark", "status", "created_at", "updated_at") + VALUES (edit_id, '获取@{.tableComment}最大排序', '@{.varName | LcFirst}MaxSort', '', '', '3', '', '/@{.apiPrefix}/maxSort', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.sortLevel}', '@{.dirTree}tr_' || dir_id || ' tr_' || list_id || ' tr_' || edit_id || ' ', '30', '', '1', now(), now()); +@{end} +@{ if eq .options.Step.HasDel true } + + -- 删除 + INSERT INTO "@{.menuTable}" ("pid", "title", "name", "path", "icon", "type", "redirect", "permissions", "permission_name", "component", "always_show", "active_menu", "is_root", "is_frame", "frame_src", "keep_alive", "hidden", "affix", "level", "tree", "sort", "remark", "status", "created_at", "updated_at") + VALUES (list_id, '删除@{.tableComment}', '@{.varName | LcFirst}Delete', '', '', '3', '', '/@{.apiPrefix}/delete', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.btnLevel}', '@{.dirTree}tr_' || dir_id || ' tr_' || list_id || ' ', '40', '', '1', now(), now()); +@{end} +@{ if eq .options.Step.HasStatus true } + + -- 更新状态 + INSERT INTO "@{.menuTable}" ("pid", "title", "name", "path", "icon", "type", "redirect", "permissions", "permission_name", "component", "always_show", "active_menu", "is_root", "is_frame", "frame_src", "keep_alive", "hidden", "affix", "level", "tree", "sort", "remark", "status", "created_at", "updated_at") + VALUES (list_id, '修改@{.tableComment}状态', '@{.varName | LcFirst}Status', '', '', '3', '', '/@{.apiPrefix}/status', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.btnLevel}', '@{.dirTree}tr_' || dir_id || ' tr_' || list_id || ' ', '50', '', '1', now(), now()); +@{end} +@{ if eq .options.Step.HasSwitch true } + + -- 操作开关 + INSERT INTO "@{.menuTable}" ("pid", "title", "name", "path", "icon", "type", "redirect", "permissions", "permission_name", "component", "always_show", "active_menu", "is_root", "is_frame", "frame_src", "keep_alive", "hidden", "affix", "level", "tree", "sort", "remark", "status", "created_at", "updated_at") + VALUES (list_id, '操作@{.tableComment}开关', '@{.varName | LcFirst}Switch', '', '', '3', '', '/@{.apiPrefix}/switch', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.btnLevel}', '@{.dirTree}tr_' || dir_id || ' tr_' || list_id || ' ', '60', '', '1', now(), now()); +@{end} +@{ if eq .options.Step.HasExport true } + + -- 导出 + INSERT INTO "@{.menuTable}" ("pid", "title", "name", "path", "icon", "type", "redirect", "permissions", "permission_name", "component", "always_show", "active_menu", "is_root", "is_frame", "frame_src", "keep_alive", "hidden", "affix", "level", "tree", "sort", "remark", "status", "created_at", "updated_at") + VALUES (list_id, '导出@{.tableComment}', '@{.varName | LcFirst}Export', '', '', '3', '', '/@{.apiPrefix}/export', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.btnLevel}', '@{.dirTree}tr_' || dir_id || ' tr_' || list_id || ' ', '70', '', '1', now(), now()); +@{end} +@{ if eq .options.Step.IsTreeTable true } + + -- 关系树选项 + INSERT INTO "@{.menuTable}" ("pid", "title", "name", "path", "icon", "type", "redirect", "permissions", "permission_name", "component", "always_show", "active_menu", "is_root", "is_frame", "frame_src", "keep_alive", "hidden", "affix", "level", "tree", "sort", "remark", "status", "created_at", "updated_at") + VALUES (list_id, '获取@{.tableComment}关系树选项', '@{.varName | LcFirst}TreeOption', '', '', '3', '', '/@{.apiPrefix}/treeOption', '', '', '1', '', '0', '0', '', '0', '0', '0', '@{.btnLevel}', '@{.dirTree}tr_' || dir_id || ' tr_' || list_id || ' ', '70', '', '1', now(), now()); +@{end} +END $$; + diff --git a/server/resource/generate/default/curd/web.api.ts.template b/server/resource/generate/default/curd/web.api.ts.template new file mode 100644 index 0000000..a15c322 --- /dev/null +++ b/server/resource/generate/default/curd/web.api.ts.template @@ -0,0 +1,84 @@ +import { http, jumpExport } from '@/utils/http/axios'; + +// 获取@{.tableComment}列表 +export function List(params) { + return http.request({ + url: '/@{.apiPrefix}/list', + method: 'get', + params, + }); +} +@{ if eq .options.Step.HasDel true } +// 删除/批量删除@{.tableComment} +export function Delete(params) { + return http.request({ + url: '/@{.apiPrefix}/delete', + method: 'POST', + params, + }); +} +@{end} +@{ if eq .options.Step.HasEdit true } +// 添加/编辑@{.tableComment} +export function Edit(params) { + return http.request({ + url: '/@{.apiPrefix}/edit', + method: 'POST', + params, + }); +} +@{end} +@{ if eq .options.Step.HasStatus true } +// 修改@{.tableComment}状态 +export function Status(params) { + return http.request({ + url: '/@{.apiPrefix}/status', + method: 'POST', + params, + }); +} +@{end} +@{ if eq .options.Step.HasSwitch true } +// 操作@{.tableComment}开关 +export function Switch(params) { + return http.request({ + url: '/@{.apiPrefix}/switch', + method: 'POST', + params, + }); +} +@{end} +@{ if or (eq .options.Step.HasView true) (eq .options.Step.HasEdit true) } +// 获取@{.tableComment}指定详情 +export function View(params) { + return http.request({ + url: '/@{.apiPrefix}/view', + method: 'GET', + params, + }); +} +@{end} +@{ if eq .options.Step.HasMaxSort true } +// 获取@{.tableComment}最大排序 +export function MaxSort() { + return http.request({ + url: '/@{.apiPrefix}/maxSort', + method: 'GET', + }); +} +@{end} +@{ if eq .options.Step.HasExport true } +// 导出@{.tableComment} +export function Export(params) { + jumpExport('/@{.apiPrefix}/export', params); +} +@{end} +@{ if eq .options.Step.IsTreeTable true } +// 获取@{.tableComment}关系树选项 +export function TreeOption() { + return http.request({ + url: '/@{.apiPrefix}/treeOption', + method: 'GET', + }); +} +@{end} \ No newline at end of file diff --git a/server/resource/generate/default/curd/web.edit.vue.template b/server/resource/generate/default/curd/web.edit.vue.template new file mode 100644 index 0000000..00249fa --- /dev/null +++ b/server/resource/generate/default/curd/web.edit.vue.template @@ -0,0 +1,127 @@ + + + + + + diff --git a/server/resource/generate/default/curd/web.index.vue.template b/server/resource/generate/default/curd/web.index.vue.template new file mode 100644 index 0000000..b9c5296 --- /dev/null +++ b/server/resource/generate/default/curd/web.index.vue.template @@ -0,0 +1,528 @@ + + + + + diff --git a/server/resource/generate/default/curd/web.model.ts.template b/server/resource/generate/default/curd/web.model.ts.template new file mode 100644 index 0000000..c4276bc --- /dev/null +++ b/server/resource/generate/default/curd/web.model.ts.template @@ -0,0 +1,52 @@ +@{.import} + +@{.const} + +export class State { +@{range .stateItems} public @{.Name} = @{if and .DataType (or (eq .DataType "varchar") (eq .DataType "char") (eq .DataType "bpchar") (eq .DataType "text") (eq .DataType "json") (eq .DataType "jsonb") (eq .DataType "date") (eq .DataType "time") (eq .DataType "timetz") (eq .DataType "datetime") (eq .DataType "timestamp") (eq .DataType "timestamptz") (eq .DataType "TIMESTAMP") (eq .DataType "interval") (eq .DataType "uuid") (eq .DataType "bytea") (eq .DataType "inet") (eq .DataType "cidr") (eq .DataType "macaddr") (eq .DataType "macaddr8") (eq .DataType "bit") (eq .DataType "varbit") (eq .DataType "point") (eq .DataType "line") (eq .DataType "lseg") (eq .DataType "box") (eq .DataType "path") (eq .DataType "polygon") (eq .DataType "circle") (eq .DataType "money")) (ne .DefaultValue "null")}'@{.DefaultValue}'@{else}@{.DefaultValue}@{end}; // @{.Dc} +@{end} + constructor(state?: Partial) { + if (state) { + Object.assign(this, state); + } + } +} + +export function newState(state: State | Record | null): State { + if (state !== null) { + if (state instanceof State) { + return cloneDeep(state); + } + return new State(state); + } + return new State(); +} + +// 表单验证规则 +@{ if eq .options.Step.HasRules true }@{.rules}@{end} + +// 表格搜索表单 +@{ if eq .options.Step.HasSearchForm true }@{.formSchema}@{end} + +// 表格列 +@{.columns} + +@{ if eq .dictOptions.Has true } +// 加载字典数据选项 +export function loadOptions() { + dict.loadOptions(@{ToTSArray .options.DictOps.Types}); +} +@{end} + +@{ if eq .options.Step.IsTreeTable true } +// 关系树选项 +export const treeOption = ref([]); + +// 加载关系树选项 +export function loadTreeOption() { + TreeOption().then((res) => { + treeOption.value = res; + }); +} +@{end} + diff --git a/server/resource/generate/default/curd/web.view.vue.template b/server/resource/generate/default/curd/web.view.vue.template new file mode 100644 index 0000000..477c460 --- /dev/null +++ b/server/resource/generate/default/curd/web.view.vue.template @@ -0,0 +1,63 @@ + + + + + + diff --git a/server/resource/i18n/.gitkeep b/server/resource/i18n/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/resource/public/.gitignore b/server/resource/public/.gitignore new file mode 100644 index 0000000..06afa25 --- /dev/null +++ b/server/resource/public/.gitignore @@ -0,0 +1,3 @@ +attachment/ +admin/ +.well-known/pki-validation \ No newline at end of file diff --git a/server/resource/public/favicon.ico b/server/resource/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..f51c4eed214d40ee4bf0c2f67bd712ac23888fe7 GIT binary patch literal 8175 zcmbt(cT`i`w{8%Wq8RB-iHh{9bVPEL0|*Exy$Bpcgb-suK!OHhp-5M0ib6!1NC^m` z89_*ZBS`N>Ac=xB-JxzF<>uV`-tWD4$NS@sd-on|j6KF)d+znkHP@Wqw-#rDGY>gp zV`*&(;o*Tmc(^x&!-kleJ6fD~c5pN~9(Y|dI3ytO_?^>QI>%Ka!VtFtk6YVV9k;n` zVRihD!5LMJ=WVP72)AfATTb<{r_Pb^1m*geY|}85AX{J3LWHjARdA2YquW?3Q0;y%g8D!DXXZe>FFC7 z8X23I|7l@qbG9 zk^82wsJNu`ZP~l`wROb$hQ_Amb~2@-v+M8A-9y78qhsR}lT%b0{oD72#UD${jP;Gp zt?eD~_wGNqcp$w0a@l_X`%kz;xVZN5@$vHU|AUKXUnIBjitz0}ar%Jh`78W>p<*Y` zJP;7S@U)<&O;ADC5s_VB-j>|enC53VW5AzmKtr~HxxQ?KnRp6YThRGeyL%O*pg8-+y14hW-Dug04ir8!NSA4Lu87&5{78=lek;ezxEV`n`#|Y1q`9 z^#I{UfU~a*^EB8$zoIx3a;SOnam=v^FlK-MEQ09Xp8leqpudX-(&>wzex*;zVRGit zov?Vgw4MOPlI{v3=y+kwSYK}mUyN&+UtIdTq?## zemoIlo(RTd1gq6YJXvV+mN8h9kZqjN6uP}|*DBkdrDft?p&1!0ohy;Q=2&T8=<`k# zCEs8n?$#q0Cw}FR{r_q%$etcMlcAN%BU+UeH#JbDq>mp-`RYj9v$jFG_gNT)L%~5K z-R<|Ra;!fs{XQJH==%sRuAeGqo3wDumu?joBMv6e+&VZA5k$MS=BZJp#QZt<`SI6a zC^fmdmX++wFw1z0X;~K3B>dF?D3v1>o7gYmh`A&m0dSfF;TvL=wrDU7#-u1_5C#Xb ziro7H%xK$XhV-HjG*S0BkXU(Ll%X3jo~qDjd(LLkalOAkNoHy+$j9C9Y3?cJZB}MD z2a<+=4`+(}+7_(kKpy_ZlmwJ1=yW`BE{QFdo`^d_aw_s!ZjlD!i3~Avj0PhxJ?0eC z0e_*nrUh>Uh8ZT%!6;-@nYY0U>c_JV^|g|o*_AB(8zgKfUpN4({&YS}UXgZ7^b-Rv zK0rUjFYwJ6F14WZx$&%02kyp#M?LZ-!5G?lN6^$p$mUbD;I1jBQu}=QA=kwS?cQT|#`^lf3*cVZ-XC9?jtq@C zA|GC=2pkwL#5Ay_UNe%gHr7SLda6|&^iM5{3E!XQ&#I4DT%6lcsd=K_OERVsM8GcZ zA*MF<7_S$@Es@yMxXBVDw;UZJ5PKutTVI;lW#<$jo_Gh##?3UEc@v9C!)Av^j0js* zVBVepyB|)}N(VCBS;Uq@SZUVl7%i+JK#@iDr{LQ>(-I2oD&{7q@Z!Q^=Sd9trnenb zb(W6|QCOQSuQ*P!Ll=|qK}k;0r*_W3=ew9TvH?smV~d3T%`la^E(~h==L2m z$%IZ5Xk6*j@I4vZzG|-^#`2i!wt<`B!&$pKu){N$yBr8bvcB4VZaLrkV^Q|ph%~Mg zeekb!BWmF%k2uqfgOBp%)1-J(+lHyQ$}4YwP}zj!EED6bqgCMwhc5U|^oX5@zq5?9 zcS(#n)aWFlMw;__RIKXV9hyPt9{oy>4F<1ogyW?!Qk2}TI8*CVia9}OtL{Y19K?AQ~WC3Yrms2qw$cPs!MyXrF5DNQO&QK ztrc+J16#eN>imxC;T+=Pw~8Fflg;ld3Y1Vr+Pd3l4SALq6>%U07^u|1Ji5bBZR9S?7SW-KFwlAu_50WRi%(bley-=ctV)#2Tu@~lDw3;YN?K|+VlOL&?9rp zxSGX|b1?@U#3p8Y^}pc`m^zi)9jk+hV|5S8$d6lW&N%qmOm~< z$DM6q$&Ju6r9{HYw;6NSSJe2fkqDK~Z^gu~>ZQ)u= zsvALRMhKfNPwlqvP95w~pEjm7)sgC&5(Dd-iA@jk<&u$)y_FtfylL6W9tt-s`6dbL zjFOjjdc%m4ieXQ^;ZeO!#A@{X6$|nE{}gZa-)$Voqa56=bLQJOSjjidct9!lj7#8) zy{pTz{SR+dRV?bvEx`{k&!YT88J5e+smTBsPE{1urR$^Ou&V~cA z8fBw75Fm`uSw5GD1DsOtQRk+6JoQ^4;F`k~`7$3-HID zK6z1U%wEaVK(w;KYv>a6O*)?+hTeHIDcjG|D5W7jWTHy5({E8i#WmZ>N!Us=c9;}k zZ`^07S?>C(P-V2(KD<~;rk><;yuMqT}Bhn6iO;e=_|THxl=(*}eG+jH|ihZF8}^zK^gGz%O!c3M}XY zaHom>6-QxU-VC1~`SQ@q;qZ!-Y|!Y>O&QU9M#QC`ThT`D-oee&!T3t}fBpm2mno~j zfhY!UPjDdbBLO4_;^=#9d~g0zC{y+|?>!Z{R^x@O6r;TtjQF6J$?QihR`W5F{+gRpb4#L*rYD)*J>rrS8_Rqw;C)c1;ahT z9_!)PW4D;bRT%S5c^IQVAwqeu>eeP0k<2%a)i3QRM_64M4j9oZLu;ZU&KWGbYp*ef z*@B7OfpQ=N@cEap_X~M@#y{qcY{8NuhcUyHxg%H?I&y6vOsK6KlS3I;aurj0N_|U2 zMb~*NbzK|?zo&w#(qHqT-FvRJC8$*>l^lo!Tci?Ab$sNn)nXlluRAjAa~{jwQQ&5dH`b4CkZomX9C?6p!?;w0 z7P__M7^_BCAM8Ipq2^Mfe=>7rr1()g6&P8((tWw$LY5Ix`c#X0qO$6ZQM#(3^o5ka zUZN~abTY1Zo%*h-?1Vboymh3GUig^LbbrF;O3$h<|TTP>4|) zTV4;-XIBDfitG3|>|j-Kl(Z>9`J1O4$n3xUle(hZx@z6%@(2XdeT z8~hPOa3jxXAm$jWa@dOXxjd}w{zgrr+-SDLb zX_&p#JIK#EuFiDZbqleSdceHVj|kZGkMF_c2*=W9B;`e}#7X7$i&&kBRS++fz1%-3mF~<^%UrU!-DbEO38fV$^{5)RAO(%R*ck8RR{J6Y)BWms6 zNjWZ?yRP(q`LcyN_7M7P4#X5|IpBEiTlStf?y#wZ{L2*Xd~DyI`tAQZJ?N+q2jaBM zff%%c#`yWsUt~C_rk%nJ86!w$FgB>@_Ws0NRC{4`wr!pmxeUm0Z%8|zDP?^RnDCwb zL*VIwGIZ$4{T~wN_H2J>KKBD!Gy^eeLn&$tSm=u@?FOvnEMT(JA|+2c@^0e!ZWCW%`*=7 z|F!=I+o*=2;6+G4V^5TUQma0Sb>q1VdY!lAqDB7pu`5+YwxQQHUVOcFh&<660DS(7@9Z(JaCiMy4Fwte%OA_&|a+s45^W6re|s1 zy3}8>+(d3g$5VVonWi9W{-f0&&5Xkz4nOdRK4MDIeZ|544wK%r_YDWSEUV-D$=OdP zzhWLPPo0aj-e_^bgr(3@9(A!*3p%sj3mrY%6#)=2IEm+1dd?i$#r!-`*`v`fmHed| zV>H@M&aFC}b;(Sv{^UnBXPrSzQs(O&_lbeBi~&r5$5^|n+Tf!+Pc?CWz)~l(QaM1W zSUiK2mjNHp;(B<#p%a?qx%gPyOe$soC$x!kf-h9bi6wMWkwdwpU~0{C8zRt{WLIX@`_e)kpJ!+BB<e(nGJR{jRfy0tboLqS-JwxF+$P$=EC9{;Vsx%5S6 zf*^VOl7x(9#O)UTo*>#(gT4v)YRfiOf>v7PN)_*} zy)*jVskdag!k%^XsrhI848P4b3-QZ5zF%6IN4NGwgJE_2t2ioQD)7_ppSkJj@aw%! zu4AUw`(FtwE))PxowlW(AZ@-#Eue`jcy--}NcyxcMA(5W>RT)V_k733cQ>eF&EIMW zYhD!GeBfir#EOZ0Q^{P=ZeRL4&$j52;AZ<$q-J(u$+Cf)sv_}w>ej0b&#zN6R;Q#S z*FPV6JNQ9$&-ZZSv<|S6+8CCyKGFO@*hmfV1Vh$b8ti(eFsjpx4uMi^edktS4RzX;s>3J;p%Zn3meBG8;7sC#S1V$?b7B zh3`%zInT=RYUsv(m)`jN&bseRX5r6{_PN8P9+#S(JB6>8rb+v8Sv%zR~^loiY492R}^=dD2ASaJhxG}`G zi@CxeqjmljoJTL!W{!$WW}5F^0oej2c5pIGsLtEL79dQIdacsEz%1I@SsQ@WlBHfX zNrVb|VQAZsZt}(FN1-%bwvay8(+;ds_CedX z0in5u^|F-{O;2VqwVh6rXQ$`D2CuInlJ|PNg}TU7`h$bRt0bjeRWOw%=@(l``F$&} z%~bJ1zu5CdBWtSeRg1$2m)&~147!4Ygh|$-p$h$UxXSm<0>=otsmsN#gI+nO`vG?& z>&vfByC(qcnVDrBlUl(<1x(R1@Y>9@wWn&6b~OhwPt%_2+4f~saUi##P)ygh-&lC7 z+>)6Pcw(>{i2uxBVIMYzYOhnh;R5hgKc^U=+(5?IHY=lX`Jn|p#) zo2hbkq(-Lrn%l-COy*;B79+j|8?*|Tp1|f`%`qAK zDCX6Wv?Xljj26H+F5CXTwWeR`);`u;^2)cPNopUkfaox_PL1bP>DC#hTvPkpF;WhX zj~6>=-K{N>+A$VFrs@FLt@4priK;30o9C{2-^JWL5?1DDeX8EJqG;DrZ9OwTQK^5K zmn|H}O4Nr=av&o(E!nDTzg$d%GC zX9hoo1DS}|4BSoxb=I#gI{=hAF>E*>QKqTx?t!Q&u7gR0m-{_ly@fRtH`9B1J!uFh z7_2n5=-teL{IRUQMG#~n=xF{h8*o;tW1u{T{@r@v_u&A0m-UK1y{IhXkyvG$7C9*! z-Q2>IcGp5r)peJM>Yw4tiwiP0q|THSJWh6sW90>zd1n6ln3tRBO-#w~b}7Em+A-}5 zus>4mkWRo{lAfI}Ip*XbT4{JIkKcC~9UhIeZf!v2NSfs5yd|Te{i1ju)_QrL7a!D_ z`caznH(~n#>vgL?bP~Q@UMq>Ob6DL13TZQg)5*4W$c|a)P!-dy#On}y(UOsQ#0yjV z=cUtp2-(r>^KHE`E*LUfxQrX~m%%sd$dAfYLkbR3(bspA31i^9YCR}lZqM3ah8-Cx zgC*AL()gYf?9(^LU0|~_#+$zY4n!utq_Hs0sPI(RIwANyVRdywYr$I8=$iVq^;g%O z^J^Y`a>zocrIz=6Lx$vY2@qN2LWOo|-D2_CsAAct>)_UGk3Vy`-1iSId|D;)5-=CH zY3EDHKRHG?F}#W5|6>@fpNe#CZA4{no7~7LH4lx(MV)<8J?+`1G1SogxQm+*tO@)a zNE;Cj*uW0Xnn#vnmBFX$+d`gTixP8!A#@_i-{=pH_F}=qE`wMk{-{z_RGhCx| z%WE6QO2Gv{Cp`zI{t@7{foB0U6}QR) z#@l`Q*@r;o3t%KL{b~2=U8{IgW$LuU`=#CJce=KELuc!9JmX8>dRvBEh)bj_11glYR^)p8xWYpHeigW7{{49h|$XiyMYKrCw1z~dwreX20q_jovRD7 zFZOICA!CbW=ru$nO+3&sPw+DN^X2rhfZsl1nvYTi3>~f2vPuyy_^crto#y6P$JC)) zzb?N?QeRgX6jFI}|Nm(~DttQyM3-TFKe4szb39Gp6c}t8s}HPL7mGLH#Jp!`-7n-k ziTXA*!FtmkG9G{r=0j`z{IqkIi3P0MVKPgz`&oG;E7Ml-fX4LgmjE*te_wm8${~)a zTkM6wyX8AbXvMKoB@2r`bnH9VNw|l-iOsw4J?Y)dpPzSL9V7o%iirR6Zee1Qs^%9u zi8`d`f93qO6G=VbBQc+xHZzZVS3d~QeeM+7YlSaHjhBosm>myw6A4++Rw;ZMu*n#y zd2tJ!*x47JXBC?dHK1OSmnV+eV1aF!mUFhy{c59ut1A~qfYHnr))+h(8Yioq^oyh( z6-8(c+GP>qxEl(Ro|rJFCaxeM*+w0YKPKkMFb$24@80V_Df3`%f886G#$4^%nddR_ zgzjj2SaR#(I_~+3Fjm!%p=}2yL@^R5>@z^@>@h$dPeThZ&4*0g?!7j^zg?a^J{tbf zl5C9<8n^$@-1ub1lbAJ9-4&^djEW;H$Gv{#Ieich{+0xi)10~by2sZr^EdRD;cdM3 z4yMCF8rb%DHqea>$jb6`??_BAtyz)qlCqD7X_woccE`+zYyuNEuh&FGKPpV>9FFP6 zAiA^F`4dxqk=g2fm~^px>c%V6x2`?2qNVTS-83W)3E#9=*Dvr=#gr{znj62|*k>dJ p^Kb!-Q7&s`bkz$j{5owmc}Xg7TEtlz|2h%+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 + + + + + + + 验证码邮件 + + + + + + + +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ logo +
+

+ 这是你发送的验证码吗? +

+
+

+ @{.os}
+ @{.cityLabel} (estimated)
+ IP 地址: @{.ip} +

+
+

+ 如果是,请输入验证码: +

+
+

+ @{.code} +

+
+

+ 该验证码@{.expires}分钟内有效,请不要告诉于他人! +

+
+ +
+
+ + \ No newline at end of file diff --git a/server/resource/template/email/resetPwd.html b/server/resource/template/email/resetPwd.html new file mode 100644 index 0000000..a192e68 --- /dev/null +++ b/server/resource/template/email/resetPwd.html @@ -0,0 +1,301 @@ + + + + + + + + 密码重置邮件 + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ logo +
+

+ Hi, @{.username}! +

+

+ 忘记密码请求 +

+
+

+ 你好像忘记了你的账户密码。你可以通过点击下面的按钮更改密码: +

+
+ + + + + + +
+ + 重置密码 + +
+
+

+ Ms and the @{.name} Team. +

+
+

+ 如果你在点击密码重置按钮时遇到麻烦,请将下面的URL复制并粘贴到你的浏览器中: +

+
+

+ @{.passwordResetLink} +

+
+ +
+
+ + \ No newline at end of file diff --git a/server/resource/template/email/text.html b/server/resource/template/email/text.html new file mode 100644 index 0000000..5e1563d --- /dev/null +++ b/server/resource/template/email/text.html @@ -0,0 +1,12 @@ + + + + + + + + + +@{.content} + + \ No newline at end of file diff --git a/server/resource/template/error/default.html b/server/resource/template/error/default.html new file mode 100644 index 0000000..f21f4f2 --- /dev/null +++ b/server/resource/template/error/default.html @@ -0,0 +1,94 @@ + + + + + + 错误页面 + + + +@{ if eq .code 404 } +
+

@{.code} 页面未找到

+

抱歉,我们无法找到要求的页面。

+ 返回 +
+@{ else if eq .code 403 } +
+

@{.code} 禁止访问

+

抱歉,您无权访问此页面。

+ 返回 +
+@{ else if eq .code 500 } +
+

@{.code} 内部服务器错误

+

哎呀,服务器出了点问题。

+ 返回 +
+@{else} +
+

错误码 [ @{.code} ]

+

@{.message}

+ @{ if ne .stack "" } +
@{.stack}
+ @{end} + 返回 +
+@{end} + + \ No newline at end of file diff --git a/server/resource/template/home/index.html b/server/resource/template/home/index.html new file mode 100644 index 0000000..59ec6db --- /dev/null +++ b/server/resource/template/home/index.html @@ -0,0 +1,29 @@ + + + + + + + + + @{.Title} + + + + +
+

Hello,@{.Data.name}!!

+

当前版本:@{.Data.version}

+
+ + + \ No newline at end of file diff --git a/server/storage/cert/.gitkeep b/server/storage/cert/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/storage/cert/pay/.gitkeep b/server/storage/cert/pay/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/storage/cert/ssl/.gitkeep b/server/storage/cert/ssl/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/storage/data/.gitkeep b/server/storage/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/storage/data/generate/.gitkeep b/server/storage/data/generate/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/storage/data/generate/addons/.gitkeep b/server/storage/data/generate/addons/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server/storage/data/generate/addons/tenant_order_menu.sql b/server/storage/data/generate/addons/tenant_order_menu.sql new file mode 100644 index 0000000..2a2389e --- /dev/null +++ b/server/storage/data/generate/addons/tenant_order_menu.sql @@ -0,0 +1,62 @@ +-- hotgo自动生成菜单权限SQL 通常情况下只在首次生成代码时自动执行一次 +-- 如需再次执行请先手动删除生成的菜单权限和SQL文件:/Users/mengshuai/Desktop/gosrc/hotgo_dev/server/storage/data/generate/addons/tenant_order_menu.sql +-- Version: 2.13.1 +-- Date: 2024-04-13 23:37:27 +-- Link https://github.com/bufanyun/hotgo + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; + +-- +-- 数据库: `hotgo` +-- + +-- -------------------------------------------------------- + +-- +-- 插入表中的数据 `hg_admin_menu` +-- + + +SET @now := now(); + + +-- 菜单目录 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, '2228', '多租户功能演示', 'tenantOrder', '/tenantOrder', '', '1', '/addons/hgexample/tenantOrder/index', '', '', 'ParentLayout', '1', '', '0', '0', '', '0', '0', '0', '3', 'tr_2227 tr_2228 ', '200', '', '1', @now, @now); + + +SET @dirId = LAST_INSERT_ID(); + + +-- 菜单页面 +-- 列表 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @dirId, '多租户功能演示列表', 'tenantOrderIndex', 'index', '', '2', '', '/hgexample/tenantOrder/list', '', '/addons/hgexample/tenantOrder/index', '1', 'tenantOrder', '0', '0', '', '0', '1', '0', '4', CONCAT('tr_2227 tr_2228 tr_', @dirId,' '), '10', '', '1', @now, @now); + + +SET @listId = LAST_INSERT_ID(); + +-- 详情 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '多租户功能演示详情', 'tenantOrderView', '', '', '3', '', '/hgexample/tenantOrder/view', '', '', '1', '', '0', '0', '', '0', '1', '0', '5', CONCAT('tr_2227 tr_2228 tr_', @dirId, ' tr_', @listId,' '), '10', '', '1', @now, @now); + + +-- 菜单按钮 + +-- 编辑 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '编辑/新增多租户功能演示', 'tenantOrderEdit', '', '', '3', '', '/hgexample/tenantOrder/edit', '', '', '1', '', '0', '0', '', '0', '1', '0', '5', CONCAT('tr_2227 tr_2228 tr_', @dirId, ' tr_', @listId,' '), '20', '', '1', @now, @now); + + +SET @editId = LAST_INSERT_ID(); + + +-- 删除 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '删除多租户功能演示', 'tenantOrderDelete', '', '', '3', '', '/hgexample/tenantOrder/delete', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2227 tr_2228 tr_', @dirId, ' tr_', @listId,' '), '40', '', '1', @now, @now); + + + + +-- 导出 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '导出多租户功能演示', 'tenantOrderExport', '', '', '3', '', '/hgexample/tenantOrder/export', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2227 tr_2228 tr_', @dirId, ' tr_', @listId,' '), '70', '', '1', @now, @now); + + +COMMIT; \ No newline at end of file diff --git a/server/storage/data/generate/curd_demo_menu.sql b/server/storage/data/generate/curd_demo_menu.sql new file mode 100644 index 0000000..9429e4d --- /dev/null +++ b/server/storage/data/generate/curd_demo_menu.sql @@ -0,0 +1,71 @@ +-- hotgo自动生成菜单权限SQL 通常情况下只在首次生成代码时自动执行一次 +-- 如需再次执行请先手动删除生成的菜单权限和SQL文件:C:\Users\Administrator\Desktop\gosrc\hotgo_dev\server\storage\data\generate\curd_demo_menu.sql +-- Version: 2.13.1 +-- Date: 2024-04-08 10:13:25 +-- Link https://github.com/bufanyun/hotgo + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; + +-- +-- 数据库: `hotgo` +-- + +-- -------------------------------------------------------- + +-- +-- 插入表中的数据 `hg_admin_menu` +-- + + +SET @now := now(); + + +-- 菜单目录 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, '2366', 'CURD列表', 'curdDemo', '/curdDemo', '', '1', '/develop/generateDemo/curdDemo/index', '', '', 'ParentLayout', '1', '', '0', '0', '', '0', '0', '0', '3', 'tr_2097 tr_2366 ', '10', '', '1', @now, @now); + + +SET @dirId = LAST_INSERT_ID(); + + +-- 菜单页面 +-- 列表 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @dirId, 'CURD列表列表', 'curdDemoIndex', 'index', '', '2', '', '/curdDemo/list', '', '/curdDemo/index', '1', 'curdDemo', '0', '0', '', '0', '1', '0', '4', CONCAT('tr_2097 tr_2366 tr_', @dirId,' '), '10', '', '1', @now, @now); + + +SET @listId = LAST_INSERT_ID(); + +-- 详情 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, 'CURD列表详情', 'curdDemoView', '', '', '3', '', '/curdDemo/view', '', '', '1', '', '0', '0', '', '0', '1', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '10', '', '1', @now, @now); + + +-- 菜单按钮 + +-- 编辑 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '编辑/新增CURD列表', 'curdDemoEdit', '', '', '3', '', '/curdDemo/edit', '', '', '1', '', '0', '0', '', '0', '1', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '20', '', '1', @now, @now); + + +SET @editId = LAST_INSERT_ID(); + +-- 获取最大排序 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @editId, '获取CURD列表最大排序', 'curdDemoMaxSort', '', '', '3', '', '/curdDemo/maxSort', '', '', '1', '', '0', '0', '', '0', '0', '0', '6', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId, ' tr_', @editId,' '), '30', '', '1', @now, @now); + + +-- 删除 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '删除CURD列表', 'curdDemoDelete', '', '', '3', '', '/curdDemo/delete', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '40', '', '1', @now, @now); + + +-- 更新状态 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '修改CURD列表状态', 'curdDemoStatus', '', '', '3', '', '/curdDemo/status', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '50', '', '1', @now, @now); + + +-- 操作开关 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '操作CURD列表开关', 'curdDemoSwitch', '', '', '3', '', '/curdDemo/switch', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '60', '', '1', @now, @now); + + +-- 导出 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '导出CURD列表', 'curdDemoExport', '', '', '3', '', '/curdDemo/export', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '70', '', '1', @now, @now); + + +COMMIT; \ No newline at end of file diff --git a/server/storage/data/generate/normal_tree_demo_menu.sql b/server/storage/data/generate/normal_tree_demo_menu.sql new file mode 100644 index 0000000..3f97ddf --- /dev/null +++ b/server/storage/data/generate/normal_tree_demo_menu.sql @@ -0,0 +1,71 @@ +-- hotgo自动生成菜单权限SQL 通常情况下只在首次生成代码时自动执行一次 +-- 如需再次执行请先手动删除生成的菜单权限和SQL文件:C:\Users\Administrator\Desktop\gosrc\hotgo_dev\server\storage\data\generate\normal_tree_demo_menu.sql +-- Version: 2.13.1 +-- Date: 2024-04-09 17:05:12 +-- Link https://github.com/bufanyun/hotgo + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; + +-- +-- 数据库: `hotgo` +-- + +-- -------------------------------------------------------- + +-- +-- 插入表中的数据 `hg_admin_menu` +-- + + +SET @now := now(); + + +-- 菜单目录 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, '2366', '普通树表', 'normalTreeDemo', '/normalTreeDemo', '', '1', '/develop/generateDemo/normalTreeDemo/index', '', '', 'ParentLayout', '1', '', '0', '0', '', '0', '0', '0', '3', 'tr_2097 tr_2366 ', '200', '', '1', @now, @now); + + +SET @dirId = LAST_INSERT_ID(); + + +-- 菜单页面 +-- 列表 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @dirId, '普通树表列表', 'normalTreeDemoIndex', 'index', '', '2', '', '/normalTreeDemo/list', '', '/normalTreeDemo/index', '1', 'normalTreeDemo', '0', '0', '', '0', '1', '0', '4', CONCAT('tr_2097 tr_2366 tr_', @dirId,' '), '10', '', '1', @now, @now); + + +SET @listId = LAST_INSERT_ID(); + +-- 详情 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '普通树表详情', 'normalTreeDemoView', '', '', '3', '', '/normalTreeDemo/view', '', '', '1', '', '0', '0', '', '0', '1', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '10', '', '1', @now, @now); + + +-- 菜单按钮 + +-- 编辑 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '编辑/新增普通树表', 'normalTreeDemoEdit', '', '', '3', '', '/normalTreeDemo/edit', '', '', '1', '', '0', '0', '', '0', '1', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '20', '', '1', @now, @now); + + +SET @editId = LAST_INSERT_ID(); + +-- 获取最大排序 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @editId, '获取普通树表最大排序', 'normalTreeDemoMaxSort', '', '', '3', '', '/normalTreeDemo/maxSort', '', '', '1', '', '0', '0', '', '0', '0', '0', '6', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId, ' tr_', @editId,' '), '30', '', '1', @now, @now); + + +-- 删除 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '删除普通树表', 'normalTreeDemoDelete', '', '', '3', '', '/normalTreeDemo/delete', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '40', '', '1', @now, @now); + + +-- 更新状态 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '修改普通树表状态', 'normalTreeDemoStatus', '', '', '3', '', '/normalTreeDemo/status', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '50', '', '1', @now, @now); + + + +-- 导出 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '导出普通树表', 'normalTreeDemoExport', '', '', '3', '', '/normalTreeDemo/export', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '70', '', '1', @now, @now); + + +-- 关系树选项 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '获取普通树表关系树选项', 'normalTreeDemoTreeOption', '', '', '3', '', '/normalTreeDemo/treeOption', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '70', '', '1', @now, @now); + +COMMIT; \ No newline at end of file diff --git a/server/storage/data/generate/option_tree_demo_menu.sql b/server/storage/data/generate/option_tree_demo_menu.sql new file mode 100644 index 0000000..2ad40c8 --- /dev/null +++ b/server/storage/data/generate/option_tree_demo_menu.sql @@ -0,0 +1,71 @@ +-- hotgo自动生成菜单权限SQL 通常情况下只在首次生成代码时自动执行一次 +-- 如需再次执行请先手动删除生成的菜单权限和SQL文件:C:\Users\Administrator\Desktop\gosrc\hotgo_dev\server\storage\data\generate\option_tree_demo_menu.sql +-- Version: 2.13.1 +-- Date: 2024-04-09 17:22:28 +-- Link https://github.com/bufanyun/hotgo + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; + +-- +-- 数据库: `hotgo` +-- + +-- -------------------------------------------------------- + +-- +-- 插入表中的数据 `hg_admin_menu` +-- + + +SET @now := now(); + + +-- 菜单目录 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, '2366', '选项树表', 'optionTreeDemo', '/optionTreeDemo', '', '1', '/develop/generateDemo/optionTreeDemo/index', '', '', 'ParentLayout', '1', '', '0', '0', '', '0', '0', '0', '3', 'tr_2097 tr_2366 ', '300', '', '1', @now, @now); + + +SET @dirId = LAST_INSERT_ID(); + + +-- 菜单页面 +-- 列表 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @dirId, '选项树表列表', 'optionTreeDemoIndex', 'index', '', '2', '', '/optionTreeDemo/list', '', '/optionTreeDemo/index', '1', 'optionTreeDemo', '0', '0', '', '0', '1', '0', '4', CONCAT('tr_2097 tr_2366 tr_', @dirId,' '), '10', '', '1', @now, @now); + + +SET @listId = LAST_INSERT_ID(); + +-- 详情 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '选项树表详情', 'optionTreeDemoView', '', '', '3', '', '/optionTreeDemo/view', '', '', '1', '', '0', '0', '', '0', '1', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '10', '', '1', @now, @now); + + +-- 菜单按钮 + +-- 编辑 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '编辑/新增选项树表', 'optionTreeDemoEdit', '', '', '3', '', '/optionTreeDemo/edit', '', '', '1', '', '0', '0', '', '0', '1', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '20', '', '1', @now, @now); + + +SET @editId = LAST_INSERT_ID(); + +-- 获取最大排序 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @editId, '获取选项树表最大排序', 'optionTreeDemoMaxSort', '', '', '3', '', '/optionTreeDemo/maxSort', '', '', '1', '', '0', '0', '', '0', '0', '0', '6', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId, ' tr_', @editId,' '), '30', '', '1', @now, @now); + + +-- 删除 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '删除选项树表', 'optionTreeDemoDelete', '', '', '3', '', '/optionTreeDemo/delete', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '40', '', '1', @now, @now); + + +-- 更新状态 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '修改选项树表状态', 'optionTreeDemoStatus', '', '', '3', '', '/optionTreeDemo/status', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '50', '', '1', @now, @now); + + + +-- 导出 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '导出选项树表', 'optionTreeDemoExport', '', '', '3', '', '/optionTreeDemo/export', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '70', '', '1', @now, @now); + + +-- 关系树选项 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '获取选项树表关系树选项', 'optionTreeDemoTreeOption', '', '', '3', '', '/optionTreeDemo/treeOption', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '70', '', '1', @now, @now); + +COMMIT; \ No newline at end of file diff --git a/server/storage/data/generate/test_category_menu.sql b/server/storage/data/generate/test_category_menu.sql new file mode 100644 index 0000000..53e13c4 --- /dev/null +++ b/server/storage/data/generate/test_category_menu.sql @@ -0,0 +1,62 @@ +-- hotgo自动生成菜单权限SQL 通常情况下只在首次生成代码时自动执行一次 +-- 如需再次执行请先手动删除生成的菜单权限和SQL文件:C:\Users\Administrator\Desktop\gosrc\hotgo_dev\server\storage\data\generate\test_category_menu.sql +-- Version: 2.13.1 +-- Date: 2024-04-08 23:26:32 +-- Link https://github.com/bufanyun/hotgo + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; + +-- +-- 数据库: `hotgo` +-- + +-- -------------------------------------------------------- + +-- +-- 插入表中的数据 `hg_admin_menu` +-- + + +SET @now := now(); + + +-- 菜单目录 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, '2366', '测试分类', 'testCategory', '/testCategory', '', '1', '/develop/generateDemo/testCategory/index', '', '', 'ParentLayout', '1', '', '0', '0', '', '0', '0', '0', '3', 'tr_2097 tr_2366 ', '1000', '', '1', @now, @now); + + +SET @dirId = LAST_INSERT_ID(); + + +-- 菜单页面 +-- 列表 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @dirId, '测试分类列表', 'testCategoryIndex', 'index', '', '2', '', '/testCategory/list', '', '/testCategory/index', '1', 'testCategory', '0', '0', '', '0', '1', '0', '4', CONCAT('tr_2097 tr_2366 tr_', @dirId,' '), '10', '', '1', @now, @now); + + +SET @listId = LAST_INSERT_ID(); + +-- 详情 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '测试分类详情', 'testCategoryView', '', '', '3', '', '/testCategory/view', '', '', '1', '', '0', '0', '', '0', '1', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '10', '', '1', @now, @now); + + +-- 菜单按钮 + +-- 编辑 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '编辑/新增测试分类', 'testCategoryEdit', '', '', '3', '', '/testCategory/edit', '', '', '1', '', '0', '0', '', '0', '1', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '20', '', '1', @now, @now); + + +SET @editId = LAST_INSERT_ID(); + +-- 获取最大排序 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @editId, '获取测试分类最大排序', 'testCategoryMaxSort', '', '', '3', '', '/testCategory/maxSort', '', '', '1', '', '0', '0', '', '0', '0', '0', '6', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId, ' tr_', @editId,' '), '30', '', '1', @now, @now); + + +-- 删除 +INSERT INTO `hg_admin_menu` (`id`, `pid`, `title`, `name`, `path`, `icon`, `type`, `redirect`, `permissions`, `permission_name`, `component`, `always_show`, `active_menu`, `is_root`, `is_frame`, `frame_src`, `keep_alive`, `hidden`, `affix`, `level`, `tree`, `sort`, `remark`, `status`, `created_at`, `updated_at`) VALUES (NULL, @listId, '删除测试分类', 'testCategoryDelete', '', '', '3', '', '/testCategory/delete', '', '', '1', '', '0', '0', '', '0', '0', '0', '5', CONCAT('tr_2097 tr_2366 tr_', @dirId, ' tr_', @listId,' '), '40', '', '1', @now, @now); + + + + + +COMMIT; \ No newline at end of file diff --git a/server/storage/data/hotgo-pg.sql b/server/storage/data/hotgo-pg.sql new file mode 100644 index 0000000..bf34441 --- /dev/null +++ b/server/storage/data/hotgo-pg.sql @@ -0,0 +1,7066 @@ +-- ========================================== +-- HotGo PostgreSQL 18 Database Schema +-- ========================================== + + +-- 设置时区 +SET TIMEZONE = 'UTC'; + +-- 创建扩展 +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; +CREATE EXTENSION IF NOT EXISTS "pgcrypto"; + +-- hg_addon_hgexample_table + +CREATE TABLE IF NOT EXISTS hg_addon_hgexample_table ( + id BIGSERIAL PRIMARY KEY, + pid BIGINT NOT NULL DEFAULT 0, + level INTEGER NOT NULL DEFAULT 1, + tree TEXT, + category_id BIGINT, + flag JSONB, + title VARCHAR(255) NOT NULL, + description VARCHAR(255), + content TEXT, + image VARCHAR(255), + images JSONB, + attachfile VARCHAR(255), + attachfiles JSONB, + map JSONB, + star NUMERIC(5,1) DEFAULT 0.0, + price NUMERIC(10,2) NOT NULL DEFAULT 0.00, + views BIGINT, + activity_at DATE, + start_at TIMESTAMP, + end_at TIMESTAMP, + switch SMALLINT, + sort INTEGER, + avatar VARCHAR(255) DEFAULT '', + sex SMALLINT, + qq VARCHAR(20) DEFAULT '', + email VARCHAR(60) DEFAULT '', + mobile VARCHAR(20) DEFAULT '', + hobby JSONB, + channel INTEGER DEFAULT 1, + city_id BIGINT DEFAULT 0, + remark VARCHAR(255), + status SMALLINT DEFAULT 1, + created_by BIGINT DEFAULT 0, + updated_by BIGINT DEFAULT 0, + created_at TIMESTAMP, + updated_at TIMESTAMP, + deleted_at TIMESTAMP +); + +COMMENT ON TABLE hg_addon_hgexample_table IS '插件_案例_表格'; +COMMENT ON COLUMN hg_addon_hgexample_table.id IS 'ID'; +COMMENT ON COLUMN hg_addon_hgexample_table.pid IS '上级ID'; +COMMENT ON COLUMN hg_addon_hgexample_table.level IS '树等级'; +COMMENT ON COLUMN hg_addon_hgexample_table.tree IS '关系树'; +COMMENT ON COLUMN hg_addon_hgexample_table.category_id IS '分类ID'; +COMMENT ON COLUMN hg_addon_hgexample_table.flag IS '标签'; +COMMENT ON COLUMN hg_addon_hgexample_table.title IS '标题'; +COMMENT ON COLUMN hg_addon_hgexample_table.description IS '描述'; +COMMENT ON COLUMN hg_addon_hgexample_table.content IS '内容'; +COMMENT ON COLUMN hg_addon_hgexample_table.image IS '单图'; +COMMENT ON COLUMN hg_addon_hgexample_table.images IS '多图'; +COMMENT ON COLUMN hg_addon_hgexample_table.attachfile IS '附件'; +COMMENT ON COLUMN hg_addon_hgexample_table.attachfiles IS '多附件'; +COMMENT ON COLUMN hg_addon_hgexample_table.map IS '动态键值对'; +COMMENT ON COLUMN hg_addon_hgexample_table.star IS '推荐星'; +COMMENT ON COLUMN hg_addon_hgexample_table.price IS '价格'; +COMMENT ON COLUMN hg_addon_hgexample_table.views IS '浏览次数'; +COMMENT ON COLUMN hg_addon_hgexample_table.activity_at IS '活动时间'; +COMMENT ON COLUMN hg_addon_hgexample_table.start_at IS '开启时间'; +COMMENT ON COLUMN hg_addon_hgexample_table.end_at IS '结束时间'; +COMMENT ON COLUMN hg_addon_hgexample_table.switch IS '开关'; +COMMENT ON COLUMN hg_addon_hgexample_table.sort IS '排序'; +COMMENT ON COLUMN hg_addon_hgexample_table.avatar IS '头像'; +COMMENT ON COLUMN hg_addon_hgexample_table.sex IS '性别'; +COMMENT ON COLUMN hg_addon_hgexample_table.qq IS 'qq'; +COMMENT ON COLUMN hg_addon_hgexample_table.email IS '邮箱'; +COMMENT ON COLUMN hg_addon_hgexample_table.mobile IS '手机号码'; +COMMENT ON COLUMN hg_addon_hgexample_table.hobby IS '爱好'; +COMMENT ON COLUMN hg_addon_hgexample_table.channel IS '渠道'; +COMMENT ON COLUMN hg_addon_hgexample_table.city_id IS '所在城市'; +COMMENT ON COLUMN hg_addon_hgexample_table.remark IS '备注'; +COMMENT ON COLUMN hg_addon_hgexample_table.status IS '状态'; +COMMENT ON COLUMN hg_addon_hgexample_table.created_by IS '创建者'; +COMMENT ON COLUMN hg_addon_hgexample_table.updated_by IS '更新者'; +COMMENT ON COLUMN hg_addon_hgexample_table.created_at IS '创建时间'; +COMMENT ON COLUMN hg_addon_hgexample_table.updated_at IS '修改时间'; +COMMENT ON COLUMN hg_addon_hgexample_table.deleted_at IS '删除时间'; + +-- 创建 hg_addon_hgexample_tenant_order 表 + +CREATE TABLE IF NOT EXISTS hg_addon_hgexample_tenant_order ( + id BIGSERIAL PRIMARY KEY, + tenant_id BIGINT, + merchant_id BIGINT NOT NULL, + user_id BIGINT NOT NULL, + product_name VARCHAR(255), + order_sn VARCHAR(64), + money NUMERIC(10,2) NOT NULL, + remark VARCHAR(255), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_addon_hgexample_tenant_order IS '多租户_充值订单'; +COMMENT ON COLUMN hg_addon_hgexample_tenant_order.id IS '主键'; +COMMENT ON COLUMN hg_addon_hgexample_tenant_order.tenant_id IS '租户ID'; +COMMENT ON COLUMN hg_addon_hgexample_tenant_order.merchant_id IS '商户ID'; +COMMENT ON COLUMN hg_addon_hgexample_tenant_order.user_id IS '用户ID'; +COMMENT ON COLUMN hg_addon_hgexample_tenant_order.product_name IS '购买产品'; +COMMENT ON COLUMN hg_addon_hgexample_tenant_order.order_sn IS '订单号'; +COMMENT ON COLUMN hg_addon_hgexample_tenant_order.money IS '充值金额'; +COMMENT ON COLUMN hg_addon_hgexample_tenant_order.remark IS '备注'; +COMMENT ON COLUMN hg_addon_hgexample_tenant_order.status IS '订单状态'; +COMMENT ON COLUMN hg_addon_hgexample_tenant_order.created_at IS '创建时间'; +COMMENT ON COLUMN hg_addon_hgexample_tenant_order.updated_at IS '修改时间'; + +-- hg_admin_cash + +CREATE TABLE IF NOT EXISTS hg_admin_cash ( + id BIGSERIAL PRIMARY KEY, + member_id BIGINT NOT NULL, + money NUMERIC(10,2) NOT NULL, + fee NUMERIC(10,2) NOT NULL, + last_money NUMERIC(10,2) NOT NULL, + ip VARCHAR(128) NOT NULL, + status BIGINT NOT NULL, + msg VARCHAR(128) NOT NULL, + handle_at TIMESTAMP, + created_at TIMESTAMP NOT NULL +); + +COMMENT ON TABLE hg_admin_cash IS '管理员_提现记录表'; +COMMENT ON COLUMN hg_admin_cash.id IS 'ID'; +COMMENT ON COLUMN hg_admin_cash.member_id IS '管理员ID'; +COMMENT ON COLUMN hg_admin_cash.money IS '提现金额'; +COMMENT ON COLUMN hg_admin_cash.fee IS '手续费'; +COMMENT ON COLUMN hg_admin_cash.last_money IS '最终到账金额'; +COMMENT ON COLUMN hg_admin_cash.ip IS '申请人IP'; +COMMENT ON COLUMN hg_admin_cash.status IS '状态码'; +COMMENT ON COLUMN hg_admin_cash.msg IS '处理结果'; +COMMENT ON COLUMN hg_admin_cash.handle_at IS '处理时间'; +COMMENT ON COLUMN hg_admin_cash.created_at IS '申请时间'; + +-- hg_admin_credits_log + +CREATE TABLE IF NOT EXISTS hg_admin_credits_log ( + id BIGSERIAL PRIMARY KEY, + member_id BIGINT DEFAULT 0, + app_id VARCHAR(64), + addons_name VARCHAR(100) DEFAULT '', + credit_type VARCHAR(32) NOT NULL DEFAULT '', + credit_group VARCHAR(32), + before_num NUMERIC(10,2) DEFAULT 0.00, + num NUMERIC(10,2) DEFAULT 0.00, + after_num NUMERIC(10,2) DEFAULT 0.00, + remark VARCHAR(255), + ip VARCHAR(20), + map_id BIGINT DEFAULT 0, + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_admin_credits_log IS '管理员_资产变动表'; +COMMENT ON COLUMN hg_admin_credits_log.id IS '变动ID'; +COMMENT ON COLUMN hg_admin_credits_log.member_id IS '管理员ID'; +COMMENT ON COLUMN hg_admin_credits_log.app_id IS '应用id'; +COMMENT ON COLUMN hg_admin_credits_log.addons_name IS '插件名称'; +COMMENT ON COLUMN hg_admin_credits_log.credit_type IS '变动类型'; +COMMENT ON COLUMN hg_admin_credits_log.credit_group IS '变动组别'; +COMMENT ON COLUMN hg_admin_credits_log.before_num IS '变动前'; +COMMENT ON COLUMN hg_admin_credits_log.num IS '变动数据'; +COMMENT ON COLUMN hg_admin_credits_log.after_num IS '变动后'; +COMMENT ON COLUMN hg_admin_credits_log.remark IS '备注'; +COMMENT ON COLUMN hg_admin_credits_log.ip IS '操作人IP'; +COMMENT ON COLUMN hg_admin_credits_log.map_id IS '关联ID'; +COMMENT ON COLUMN hg_admin_credits_log.status IS '状态'; +COMMENT ON COLUMN hg_admin_credits_log.created_at IS '创建时间'; +COMMENT ON COLUMN hg_admin_credits_log.updated_at IS '修改时间'; + +-- hg_admin_dept + +CREATE TABLE IF NOT EXISTS hg_admin_dept ( + id BIGSERIAL PRIMARY KEY, + pid BIGINT DEFAULT 0, + name VARCHAR(32), + code VARCHAR(255), + type VARCHAR(10), + leader VARCHAR(32), + phone VARCHAR(11), + email VARCHAR(64), + level INTEGER NOT NULL, + tree TEXT, + sort INTEGER DEFAULT 0, + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_admin_dept IS '管理员_部门'; +COMMENT ON COLUMN hg_admin_dept.id IS '部门ID'; +COMMENT ON COLUMN hg_admin_dept.pid IS '父部门ID'; +COMMENT ON COLUMN hg_admin_dept.name IS '部门名称'; +COMMENT ON COLUMN hg_admin_dept.code IS '部门编码'; +COMMENT ON COLUMN hg_admin_dept.type IS '部门类型'; +COMMENT ON COLUMN hg_admin_dept.leader IS '负责人'; +COMMENT ON COLUMN hg_admin_dept.phone IS '联系电话'; +COMMENT ON COLUMN hg_admin_dept.email IS '邮箱'; +COMMENT ON COLUMN hg_admin_dept.level IS '关系树等级'; +COMMENT ON COLUMN hg_admin_dept.tree IS '关系树'; +COMMENT ON COLUMN hg_admin_dept.sort IS '排序'; +COMMENT ON COLUMN hg_admin_dept.status IS '部门状态'; +COMMENT ON COLUMN hg_admin_dept.created_at IS '创建时间'; +COMMENT ON COLUMN hg_admin_dept.updated_at IS '更新时间'; + +-- hg_admin_member + +CREATE TABLE IF NOT EXISTS hg_admin_member ( + id BIGSERIAL PRIMARY KEY, + dept_id BIGINT DEFAULT 0, + role_id BIGINT DEFAULT 10, + real_name VARCHAR(32) DEFAULT '', + username VARCHAR(20) NOT NULL DEFAULT '', + password_hash VARCHAR(32) NOT NULL DEFAULT '', + salt VARCHAR(16) NOT NULL, + password_reset_token VARCHAR(150) DEFAULT '', + integral NUMERIC(10,2) DEFAULT 0.00, + balance NUMERIC(10,2) DEFAULT 0.00, + avatar VARCHAR(150) DEFAULT '', + sex SMALLINT DEFAULT 1, + qq VARCHAR(20) DEFAULT '', + email VARCHAR(60) DEFAULT '', + mobile VARCHAR(20) DEFAULT '', + birthday DATE, + city_id BIGINT DEFAULT 0, + address VARCHAR(100) DEFAULT '', + pid BIGINT NOT NULL, + level INTEGER DEFAULT 1, + tree TEXT, + invite_code VARCHAR(12), + cash JSONB, + last_active_at TIMESTAMP, + remark VARCHAR(255), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_admin_member IS '管理员_用户表'; +COMMENT ON COLUMN hg_admin_member.id IS '管理员ID'; +COMMENT ON COLUMN hg_admin_member.dept_id IS '部门ID'; +COMMENT ON COLUMN hg_admin_member.role_id IS '角色ID'; +COMMENT ON COLUMN hg_admin_member.real_name IS '真实姓名'; +COMMENT ON COLUMN hg_admin_member.username IS '帐号'; +COMMENT ON COLUMN hg_admin_member.password_hash IS '密码'; +COMMENT ON COLUMN hg_admin_member.salt IS '密码盐'; +COMMENT ON COLUMN hg_admin_member.password_reset_token IS '密码重置令牌'; +COMMENT ON COLUMN hg_admin_member.integral IS '积分'; +COMMENT ON COLUMN hg_admin_member.balance IS '余额'; +COMMENT ON COLUMN hg_admin_member.avatar IS '头像'; +COMMENT ON COLUMN hg_admin_member.sex IS '性别'; +COMMENT ON COLUMN hg_admin_member.qq IS 'qq'; +COMMENT ON COLUMN hg_admin_member.email IS '邮箱'; +COMMENT ON COLUMN hg_admin_member.mobile IS '手机号码'; +COMMENT ON COLUMN hg_admin_member.birthday IS '生日'; +COMMENT ON COLUMN hg_admin_member.city_id IS '城市编码'; +COMMENT ON COLUMN hg_admin_member.address IS '联系地址'; +COMMENT ON COLUMN hg_admin_member.pid IS '上级管理员ID'; +COMMENT ON COLUMN hg_admin_member.level IS '关系树等级'; +COMMENT ON COLUMN hg_admin_member.tree IS '关系树'; +COMMENT ON COLUMN hg_admin_member.invite_code IS '邀请码'; +COMMENT ON COLUMN hg_admin_member.cash IS '提现配置'; +COMMENT ON COLUMN hg_admin_member.last_active_at IS '最后活跃时间'; +COMMENT ON COLUMN hg_admin_member.remark IS '备注'; +COMMENT ON COLUMN hg_admin_member.status IS '状态'; +COMMENT ON COLUMN hg_admin_member.created_at IS '创建时间'; +COMMENT ON COLUMN hg_admin_member.updated_at IS '修改时间'; + +-- hg_admin_member_post + +CREATE TABLE IF NOT EXISTS hg_admin_member_post ( + member_id BIGINT NOT NULL, + post_id BIGINT NOT NULL, + PRIMARY KEY (member_id, post_id) +); + +COMMENT ON TABLE hg_admin_member_post IS '管理员_用户岗位关联'; +COMMENT ON COLUMN hg_admin_member_post.member_id IS '管理员ID'; +COMMENT ON COLUMN hg_admin_member_post.post_id IS '岗位ID'; + +-- hg_admin_member_role + +CREATE TABLE IF NOT EXISTS hg_admin_member_role ( + member_id BIGINT NOT NULL, + role_id BIGINT NOT NULL, + PRIMARY KEY (member_id, role_id) +); + +COMMENT ON TABLE hg_admin_member_role IS '管理员_用户角色关联'; +COMMENT ON COLUMN hg_admin_member_role.member_id IS '管理员ID'; +COMMENT ON COLUMN hg_admin_member_role.role_id IS '角色ID'; + +-- hg_admin_menu + +CREATE TABLE IF NOT EXISTS hg_admin_menu ( + id BIGSERIAL PRIMARY KEY, + pid BIGINT DEFAULT 0, + level INTEGER NOT NULL DEFAULT 1, + tree TEXT, + title VARCHAR(64) NOT NULL, + name VARCHAR(128) NOT NULL, + path VARCHAR(200), + icon VARCHAR(128), + type SMALLINT NOT NULL DEFAULT 1, + redirect VARCHAR(255), + permissions VARCHAR(512), + permission_name VARCHAR(64), + component VARCHAR(255), + always_show SMALLINT DEFAULT 0, + active_menu VARCHAR(255), + is_root SMALLINT DEFAULT 0, + is_frame SMALLINT DEFAULT 1, + frame_src VARCHAR(512), + keep_alive SMALLINT DEFAULT 0, + hidden SMALLINT DEFAULT 0, + affix SMALLINT DEFAULT 0, + sort INTEGER DEFAULT 0, + remark VARCHAR(255), + status SMALLINT DEFAULT 1, + updated_at TIMESTAMP, + created_at TIMESTAMP +); + +COMMENT ON TABLE hg_admin_menu IS '管理员_菜单权限'; +COMMENT ON COLUMN hg_admin_menu.id IS '菜单ID'; +COMMENT ON COLUMN hg_admin_menu.pid IS '父菜单ID'; +COMMENT ON COLUMN hg_admin_menu.level IS '关系树等级'; +COMMENT ON COLUMN hg_admin_menu.tree IS '关系树'; +COMMENT ON COLUMN hg_admin_menu.title IS '菜单名称'; +COMMENT ON COLUMN hg_admin_menu.name IS '名称编码'; +COMMENT ON COLUMN hg_admin_menu.path IS '路由地址'; +COMMENT ON COLUMN hg_admin_menu.icon IS '菜单图标'; +COMMENT ON COLUMN hg_admin_menu.type IS '菜单类型(1目录 2菜单 3按钮)'; +COMMENT ON COLUMN hg_admin_menu.redirect IS '重定向地址'; +COMMENT ON COLUMN hg_admin_menu.permissions IS '菜单包含权限集合'; +COMMENT ON COLUMN hg_admin_menu.permission_name IS '权限名称'; +COMMENT ON COLUMN hg_admin_menu.component IS '组件路径'; +COMMENT ON COLUMN hg_admin_menu.always_show IS '取消自动计算根路由模式'; +COMMENT ON COLUMN hg_admin_menu.active_menu IS '高亮菜单编码'; +COMMENT ON COLUMN hg_admin_menu.is_root IS '是否跟路由'; +COMMENT ON COLUMN hg_admin_menu.is_frame IS '是否内嵌'; +COMMENT ON COLUMN hg_admin_menu.frame_src IS '内联外部地址'; +COMMENT ON COLUMN hg_admin_menu.keep_alive IS '缓存该路由'; +COMMENT ON COLUMN hg_admin_menu.hidden IS '是否隐藏'; +COMMENT ON COLUMN hg_admin_menu.affix IS '是否固定'; +COMMENT ON COLUMN hg_admin_menu.sort IS '排序'; +COMMENT ON COLUMN hg_admin_menu.remark IS '备注'; +COMMENT ON COLUMN hg_admin_menu.status IS '菜单状态'; +COMMENT ON COLUMN hg_admin_menu.updated_at IS '更新时间'; +COMMENT ON COLUMN hg_admin_menu.created_at IS '创建时间'; + +-- hg_admin_notice + +CREATE TABLE IF NOT EXISTS hg_admin_notice ( + id BIGSERIAL PRIMARY KEY, + title VARCHAR(64) NOT NULL, + type BIGINT NOT NULL, + tag INTEGER, + content TEXT NOT NULL, + receiver JSONB, + remark VARCHAR(255), + sort INTEGER NOT NULL DEFAULT 0, + status SMALLINT DEFAULT 1, + created_by BIGINT, + updated_by BIGINT DEFAULT 0, + created_at TIMESTAMP, + updated_at TIMESTAMP, + deleted_at TIMESTAMP +); + +COMMENT ON TABLE hg_admin_notice IS '管理员_通知公告'; +COMMENT ON COLUMN hg_admin_notice.id IS '公告ID'; +COMMENT ON COLUMN hg_admin_notice.title IS '公告标题'; +COMMENT ON COLUMN hg_admin_notice.type IS '公告类型'; +COMMENT ON COLUMN hg_admin_notice.tag IS '标签'; +COMMENT ON COLUMN hg_admin_notice.content IS '公告内容'; +COMMENT ON COLUMN hg_admin_notice.receiver IS '接收者'; +COMMENT ON COLUMN hg_admin_notice.remark IS '备注'; +COMMENT ON COLUMN hg_admin_notice.sort IS '排序'; +COMMENT ON COLUMN hg_admin_notice.status IS '公告状态'; +COMMENT ON COLUMN hg_admin_notice.created_by IS '发送人'; +COMMENT ON COLUMN hg_admin_notice.updated_by IS '修改人'; +COMMENT ON COLUMN hg_admin_notice.created_at IS '创建时间'; +COMMENT ON COLUMN hg_admin_notice.updated_at IS '更新时间'; +COMMENT ON COLUMN hg_admin_notice.deleted_at IS '删除时间'; + +-- hg_admin_notice_read + +CREATE TABLE IF NOT EXISTS hg_admin_notice_read ( + id BIGSERIAL PRIMARY KEY, + notice_id BIGINT NOT NULL, + member_id BIGINT NOT NULL, + clicks INTEGER DEFAULT 1, + updated_at TIMESTAMP, + created_at TIMESTAMP +); + +COMMENT ON TABLE hg_admin_notice_read IS '管理员_公告已读记录'; +COMMENT ON COLUMN hg_admin_notice_read.id IS '记录ID'; +COMMENT ON COLUMN hg_admin_notice_read.notice_id IS '公告ID'; +COMMENT ON COLUMN hg_admin_notice_read.member_id IS '会员ID'; +COMMENT ON COLUMN hg_admin_notice_read.clicks IS '已读次数'; +COMMENT ON COLUMN hg_admin_notice_read.updated_at IS '更新时间'; +COMMENT ON COLUMN hg_admin_notice_read.created_at IS '阅读时间'; + +-- hg_admin_oauth + +CREATE TABLE IF NOT EXISTS hg_admin_oauth ( + id BIGSERIAL PRIMARY KEY, + member_id BIGINT DEFAULT 0, + unionid VARCHAR(64) DEFAULT '', + oauth_client VARCHAR(32), + oauth_openid VARCHAR(128), + sex SMALLINT DEFAULT 1, + nickname VARCHAR(255), + head_portrait VARCHAR(512), + birthday DATE, + country VARCHAR(100) DEFAULT '', + province VARCHAR(100) DEFAULT '', + city VARCHAR(100) DEFAULT '', + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_admin_oauth IS '管理员_第三方登录'; +COMMENT ON COLUMN hg_admin_oauth.id IS '主键'; +COMMENT ON COLUMN hg_admin_oauth.member_id IS '用户ID'; +COMMENT ON COLUMN hg_admin_oauth.unionid IS '唯一ID'; +COMMENT ON COLUMN hg_admin_oauth.oauth_client IS '授权组别'; +COMMENT ON COLUMN hg_admin_oauth.oauth_openid IS '授权开放ID'; +COMMENT ON COLUMN hg_admin_oauth.sex IS '性别'; +COMMENT ON COLUMN hg_admin_oauth.nickname IS '昵称'; +COMMENT ON COLUMN hg_admin_oauth.head_portrait IS '头像'; +COMMENT ON COLUMN hg_admin_oauth.birthday IS '生日'; +COMMENT ON COLUMN hg_admin_oauth.country IS '国家'; +COMMENT ON COLUMN hg_admin_oauth.province IS '省'; +COMMENT ON COLUMN hg_admin_oauth.city IS '市'; +COMMENT ON COLUMN hg_admin_oauth.status IS '状态'; +COMMENT ON COLUMN hg_admin_oauth.created_at IS '创建时间'; +COMMENT ON COLUMN hg_admin_oauth.updated_at IS '修改时间'; + +-- hg_admin_order + +CREATE TABLE IF NOT EXISTS hg_admin_order ( + id BIGSERIAL PRIMARY KEY, + member_id BIGINT DEFAULT 0, + order_type VARCHAR(32) NOT NULL, + product_id BIGINT, + order_sn VARCHAR(64) DEFAULT '', + money NUMERIC(10,2) NOT NULL, + remark VARCHAR(255), + refund_reason VARCHAR(255), + reject_refund_reason VARCHAR(255), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_admin_order IS '管理员_充值订单'; +COMMENT ON COLUMN hg_admin_order.id IS '主键'; +COMMENT ON COLUMN hg_admin_order.member_id IS '管理员id'; +COMMENT ON COLUMN hg_admin_order.order_type IS '订单类型'; +COMMENT ON COLUMN hg_admin_order.product_id IS '产品id'; +COMMENT ON COLUMN hg_admin_order.order_sn IS '关联订单号'; +COMMENT ON COLUMN hg_admin_order.money IS '充值金额'; +COMMENT ON COLUMN hg_admin_order.remark IS '备注'; +COMMENT ON COLUMN hg_admin_order.refund_reason IS '退款原因'; +COMMENT ON COLUMN hg_admin_order.reject_refund_reason IS '拒绝退款原因'; +COMMENT ON COLUMN hg_admin_order.status IS '状态'; +COMMENT ON COLUMN hg_admin_order.created_at IS '创建时间'; +COMMENT ON COLUMN hg_admin_order.updated_at IS '修改时间'; + +-- hg_admin_post + +CREATE TABLE IF NOT EXISTS hg_admin_post ( + id BIGSERIAL PRIMARY KEY, + code VARCHAR(64) NOT NULL, + name VARCHAR(50) NOT NULL, + remark VARCHAR(500), + sort INTEGER NOT NULL, + status SMALLINT NOT NULL, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_admin_post IS '管理员_岗位'; +COMMENT ON COLUMN hg_admin_post.id IS '岗位ID'; +COMMENT ON COLUMN hg_admin_post.code IS '岗位编码'; +COMMENT ON COLUMN hg_admin_post.name IS '岗位名称'; +COMMENT ON COLUMN hg_admin_post.remark IS '备注'; +COMMENT ON COLUMN hg_admin_post.sort IS '排序'; +COMMENT ON COLUMN hg_admin_post.status IS '状态'; +COMMENT ON COLUMN hg_admin_post.created_at IS '创建时间'; +COMMENT ON COLUMN hg_admin_post.updated_at IS '更新时间'; + +-- hg_admin_role + +CREATE TABLE IF NOT EXISTS hg_admin_role ( + id BIGSERIAL PRIMARY KEY, + name VARCHAR(32) NOT NULL, + key VARCHAR(128) NOT NULL, + data_scope SMALLINT DEFAULT 1, + custom_dept JSONB, + pid BIGINT DEFAULT 0, + level INTEGER NOT NULL DEFAULT 1, + tree TEXT, + remark VARCHAR(255), + sort INTEGER NOT NULL DEFAULT 0, + status SMALLINT NOT NULL DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_admin_role IS '管理员_角色信息'; +COMMENT ON COLUMN hg_admin_role.id IS '角色ID'; +COMMENT ON COLUMN hg_admin_role.name IS '角色名称'; +COMMENT ON COLUMN hg_admin_role.key IS '角色权限字符串'; +COMMENT ON COLUMN hg_admin_role.data_scope IS '数据范围'; +COMMENT ON COLUMN hg_admin_role.custom_dept IS '自定义部门权限'; +COMMENT ON COLUMN hg_admin_role.pid IS '上级角色ID'; +COMMENT ON COLUMN hg_admin_role.level IS '关系树等级'; +COMMENT ON COLUMN hg_admin_role.tree IS '关系树'; +COMMENT ON COLUMN hg_admin_role.remark IS '备注'; +COMMENT ON COLUMN hg_admin_role.sort IS '排序'; +COMMENT ON COLUMN hg_admin_role.status IS '角色状态'; +COMMENT ON COLUMN hg_admin_role.created_at IS '创建时间'; +COMMENT ON COLUMN hg_admin_role.updated_at IS '更新时间'; + +-- hg_admin_role_casbin + +CREATE TABLE IF NOT EXISTS hg_admin_role_casbin ( + id BIGSERIAL PRIMARY KEY, + p_type VARCHAR(64), + v0 VARCHAR(256), + v1 VARCHAR(256), + v2 VARCHAR(256), + v3 VARCHAR(256), + v4 VARCHAR(256), + v5 VARCHAR(256) +); + +COMMENT ON TABLE hg_admin_role_casbin IS '管理员_casbin权限表'; + +-- hg_admin_role_menu + +CREATE TABLE IF NOT EXISTS hg_admin_role_menu ( + role_id BIGINT NOT NULL, + menu_id BIGINT NOT NULL, + PRIMARY KEY (role_id, menu_id) +); + +COMMENT ON TABLE hg_admin_role_menu IS '管理员_角色菜单关联'; +COMMENT ON COLUMN hg_admin_role_menu.role_id IS '角色ID'; +COMMENT ON COLUMN hg_admin_role_menu.menu_id IS '菜单ID'; + +-- hg_pay_log + +CREATE TABLE IF NOT EXISTS hg_pay_log ( + id BIGSERIAL PRIMARY KEY, + member_id BIGINT DEFAULT 0, + app_id VARCHAR(50), + addons_name VARCHAR(100) DEFAULT '', + order_sn VARCHAR(64) DEFAULT '', + order_group VARCHAR(32) DEFAULT '', + openid VARCHAR(50) DEFAULT '', + mch_id VARCHAR(20) DEFAULT '', + subject VARCHAR(255), + detail JSONB, + auth_code VARCHAR(50) DEFAULT '', + out_trade_no VARCHAR(128) DEFAULT '', + transaction_id VARCHAR(128), + pay_type VARCHAR(32) NOT NULL, + pay_amount NUMERIC(10,2) NOT NULL DEFAULT 0.00, + actual_amount NUMERIC(10,2), + pay_status SMALLINT DEFAULT 0, + pay_at TIMESTAMP, + trade_type VARCHAR(16) DEFAULT '', + refund_sn VARCHAR(128), + is_refund SMALLINT DEFAULT 0, + custom TEXT, + create_ip VARCHAR(128), + pay_ip VARCHAR(128), + notify_url VARCHAR(255), + return_url VARCHAR(255), + trace_ids JSONB, + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_pay_log IS '支付_支付日志'; +COMMENT ON COLUMN hg_pay_log.id IS '主键'; +COMMENT ON COLUMN hg_pay_log.member_id IS '会员ID'; +COMMENT ON COLUMN hg_pay_log.app_id IS '应用ID'; +COMMENT ON COLUMN hg_pay_log.addons_name IS '插件名称'; +COMMENT ON COLUMN hg_pay_log.order_sn IS '关联订单号'; +COMMENT ON COLUMN hg_pay_log.order_group IS '组别[默认统一支付类型]'; +COMMENT ON COLUMN hg_pay_log.openid IS 'openid'; +COMMENT ON COLUMN hg_pay_log.mch_id IS '商户支付账户'; +COMMENT ON COLUMN hg_pay_log.subject IS '订单标题'; +COMMENT ON COLUMN hg_pay_log.detail IS '支付商品详情'; +COMMENT ON COLUMN hg_pay_log.auth_code IS '刷卡码'; +COMMENT ON COLUMN hg_pay_log.out_trade_no IS '商户订单号'; +COMMENT ON COLUMN hg_pay_log.transaction_id IS '交易号'; +COMMENT ON COLUMN hg_pay_log.pay_type IS '支付类型'; +COMMENT ON COLUMN hg_pay_log.pay_amount IS '支付金额'; +COMMENT ON COLUMN hg_pay_log.actual_amount IS '实付金额'; +COMMENT ON COLUMN hg_pay_log.pay_status IS '支付状态'; +COMMENT ON COLUMN hg_pay_log.pay_at IS '支付时间'; +COMMENT ON COLUMN hg_pay_log.trade_type IS '交易类型'; +COMMENT ON COLUMN hg_pay_log.refund_sn IS '退款单号'; +COMMENT ON COLUMN hg_pay_log.is_refund IS '是否退款'; +COMMENT ON COLUMN hg_pay_log.custom IS '自定义参数'; +COMMENT ON COLUMN hg_pay_log.create_ip IS '创建者IP'; +COMMENT ON COLUMN hg_pay_log.pay_ip IS '支付者IP'; +COMMENT ON COLUMN hg_pay_log.notify_url IS '支付通知回调地址'; +COMMENT ON COLUMN hg_pay_log.return_url IS '买家付款成功跳转地址'; +COMMENT ON COLUMN hg_pay_log.trace_ids IS '链路ID集合'; +COMMENT ON COLUMN hg_pay_log.status IS '状态'; +COMMENT ON COLUMN hg_pay_log.created_at IS '创建时间'; +COMMENT ON COLUMN hg_pay_log.updated_at IS '修改时间'; + +-- hg_pay_refund + +CREATE TABLE IF NOT EXISTS hg_pay_refund ( + id BIGSERIAL PRIMARY KEY, + member_id BIGINT DEFAULT 0, + app_id VARCHAR(32), + order_sn VARCHAR(64), + refund_trade_no VARCHAR(128), + refund_money NUMERIC(10,2), + refund_way SMALLINT DEFAULT 1, + ip VARCHAR(30), + reason VARCHAR(255), + remark VARCHAR(255), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_pay_refund IS '支付_退款记录'; +COMMENT ON COLUMN hg_pay_refund.id IS '主键ID'; +COMMENT ON COLUMN hg_pay_refund.member_id IS '会员ID'; +COMMENT ON COLUMN hg_pay_refund.app_id IS '应用ID'; +COMMENT ON COLUMN hg_pay_refund.order_sn IS '业务订单号'; +COMMENT ON COLUMN hg_pay_refund.refund_trade_no IS '退款交易号'; +COMMENT ON COLUMN hg_pay_refund.refund_money IS '退款金额'; +COMMENT ON COLUMN hg_pay_refund.refund_way IS '退款方式'; +COMMENT ON COLUMN hg_pay_refund.ip IS '申请者IP'; +COMMENT ON COLUMN hg_pay_refund.reason IS '申请退款原因'; +COMMENT ON COLUMN hg_pay_refund.remark IS '退款备注'; +COMMENT ON COLUMN hg_pay_refund.status IS '退款状态'; +COMMENT ON COLUMN hg_pay_refund.created_at IS '申请时间'; +COMMENT ON COLUMN hg_pay_refund.updated_at IS '更新时间'; + +-- hg_sys_addons_config + +CREATE TABLE IF NOT EXISTS hg_sys_addons_config ( + id BIGSERIAL PRIMARY KEY, + addon_name VARCHAR(128) NOT NULL, + "group" VARCHAR(128) NOT NULL, + name VARCHAR(100) DEFAULT '', + type VARCHAR(32) NOT NULL, + key VARCHAR(100) DEFAULT '', + value VARCHAR(500) DEFAULT '', + default_value VARCHAR(500) NOT NULL, + sort INTEGER NOT NULL DEFAULT 0, + tip VARCHAR(500), + is_default SMALLINT DEFAULT 0, + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_addons_config IS '系统_插件配置'; +COMMENT ON COLUMN hg_sys_addons_config.id IS '配置ID'; +COMMENT ON COLUMN hg_sys_addons_config.addon_name IS '插件名称'; +COMMENT ON COLUMN hg_sys_addons_config.group IS '分组'; +COMMENT ON COLUMN hg_sys_addons_config.name IS '参数名称'; +COMMENT ON COLUMN hg_sys_addons_config.type IS '键值类型:string,int,uint,bool,TIMESTAMP,date'; +COMMENT ON COLUMN hg_sys_addons_config.key IS '参数键名'; +COMMENT ON COLUMN hg_sys_addons_config.value IS '参数键值'; +COMMENT ON COLUMN hg_sys_addons_config.default_value IS '默认值'; +COMMENT ON COLUMN hg_sys_addons_config.sort IS '排序'; +COMMENT ON COLUMN hg_sys_addons_config.tip IS '变量描述'; +COMMENT ON COLUMN hg_sys_addons_config.is_default IS '是否为系统默认'; +COMMENT ON COLUMN hg_sys_addons_config.status IS '状态'; +COMMENT ON COLUMN hg_sys_addons_config.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_addons_config.updated_at IS '更新时间'; + +-- hg_sys_addons_install + +CREATE TABLE IF NOT EXISTS hg_sys_addons_install ( + id BIGSERIAL PRIMARY KEY, + name VARCHAR(255) NOT NULL, + version VARCHAR(128) NOT NULL DEFAULT '', + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_addons_install IS '系统_插件安装记录'; +COMMENT ON COLUMN hg_sys_addons_install.id IS '主键'; +COMMENT ON COLUMN hg_sys_addons_install.name IS '插件名称'; +COMMENT ON COLUMN hg_sys_addons_install.version IS '版本号'; +COMMENT ON COLUMN hg_sys_addons_install.status IS '状态'; +COMMENT ON COLUMN hg_sys_addons_install.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_addons_install.updated_at IS '更新时间'; + +-- hg_sys_attachment + +CREATE TABLE IF NOT EXISTS hg_sys_attachment ( + id BIGSERIAL PRIMARY KEY, + app_id VARCHAR(64) NOT NULL, + member_id BIGINT DEFAULT 0, + cate_id BIGINT DEFAULT 0, + drive VARCHAR(64), + name VARCHAR(1000), + kind VARCHAR(16), + mime_type VARCHAR(128) NOT NULL DEFAULT '', + naive_type VARCHAR(32), + path VARCHAR(1000), + file_url VARCHAR(1000), + size BIGINT DEFAULT 0, + ext VARCHAR(50), + md5 VARCHAR(32), + status SMALLINT NOT NULL DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_attachment IS '系统_附件管理'; +COMMENT ON COLUMN hg_sys_attachment.id IS '文件ID'; +COMMENT ON COLUMN hg_sys_attachment.app_id IS '应用ID'; +COMMENT ON COLUMN hg_sys_attachment.member_id IS '管理员ID'; +COMMENT ON COLUMN hg_sys_attachment.cate_id IS '上传分类'; +COMMENT ON COLUMN hg_sys_attachment.drive IS '上传驱动'; +COMMENT ON COLUMN hg_sys_attachment.name IS '文件原始名'; +COMMENT ON COLUMN hg_sys_attachment.kind IS '上传类型'; +COMMENT ON COLUMN hg_sys_attachment.mime_type IS '扩展类型'; +COMMENT ON COLUMN hg_sys_attachment.naive_type IS 'NaiveUI类型'; +COMMENT ON COLUMN hg_sys_attachment.path IS '本地路径'; +COMMENT ON COLUMN hg_sys_attachment.file_url IS 'url'; +COMMENT ON COLUMN hg_sys_attachment.size IS '文件大小'; +COMMENT ON COLUMN hg_sys_attachment.ext IS '扩展名'; +COMMENT ON COLUMN hg_sys_attachment.md5 IS 'md5校验码'; +COMMENT ON COLUMN hg_sys_attachment.status IS '状态'; +COMMENT ON COLUMN hg_sys_attachment.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_attachment.updated_at IS '修改时间'; + +-- hg_sys_blacklist + +CREATE TABLE IF NOT EXISTS hg_sys_blacklist ( + id BIGSERIAL PRIMARY KEY, + ip VARCHAR(100) DEFAULT '', + remark VARCHAR(500), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_blacklist IS '系统_访问黑名单'; +COMMENT ON COLUMN hg_sys_blacklist.id IS '黑名单ID'; +COMMENT ON COLUMN hg_sys_blacklist.ip IS 'IP地址'; +COMMENT ON COLUMN hg_sys_blacklist.remark IS '备注'; +COMMENT ON COLUMN hg_sys_blacklist.status IS '状态'; +COMMENT ON COLUMN hg_sys_blacklist.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_blacklist.updated_at IS '更新时间'; + +-- hg_sys_config + +CREATE TABLE IF NOT EXISTS hg_sys_config ( + id BIGSERIAL PRIMARY KEY, + "group" VARCHAR(128) NOT NULL, + name VARCHAR(100) DEFAULT '', + type VARCHAR(32) NOT NULL, + key VARCHAR(100) DEFAULT '', + value TEXT, + default_value VARCHAR(500) NOT NULL, + sort INTEGER NOT NULL DEFAULT 0, + tip VARCHAR(500), + is_default SMALLINT DEFAULT 0, + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_config IS '系统_配置'; +COMMENT ON COLUMN hg_sys_config.id IS '配置ID'; +COMMENT ON COLUMN hg_sys_config.group IS '配置分组'; +COMMENT ON COLUMN hg_sys_config.name IS '参数名称'; +COMMENT ON COLUMN hg_sys_config.type IS '键值类型:string,int,uint,bool,TIMESTAMP,date'; +COMMENT ON COLUMN hg_sys_config.key IS '参数键名'; +COMMENT ON COLUMN hg_sys_config.value IS '参数键值'; +COMMENT ON COLUMN hg_sys_config.default_value IS '默认值'; +COMMENT ON COLUMN hg_sys_config.sort IS '排序'; +COMMENT ON COLUMN hg_sys_config.tip IS '变量描述'; +COMMENT ON COLUMN hg_sys_config.is_default IS '是否为系统默认'; +COMMENT ON COLUMN hg_sys_config.status IS '状态'; +COMMENT ON COLUMN hg_sys_config.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_config.updated_at IS '更新时间'; + +-- hg_sys_cron + +CREATE TABLE IF NOT EXISTS hg_sys_cron ( + id BIGSERIAL PRIMARY KEY, + "group_id" BIGINT NOT NULL, + title VARCHAR(128) NOT NULL, + name VARCHAR(100), + params VARCHAR(255), + pattern VARCHAR(64) NOT NULL, + policy BIGINT NOT NULL DEFAULT 1, + count BIGINT NOT NULL DEFAULT 0, + sort INTEGER DEFAULT 0, + remark VARCHAR(500), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_cron IS '系统_定时任务'; +COMMENT ON COLUMN hg_sys_cron.id IS '任务ID'; +COMMENT ON COLUMN hg_sys_cron.group_id IS '分组ID'; +COMMENT ON COLUMN hg_sys_cron.title IS '任务标题'; +COMMENT ON COLUMN hg_sys_cron.name IS '任务方法'; +COMMENT ON COLUMN hg_sys_cron.params IS '函数参数'; +COMMENT ON COLUMN hg_sys_cron.pattern IS '表达式'; +COMMENT ON COLUMN hg_sys_cron.policy IS '策略'; +COMMENT ON COLUMN hg_sys_cron.count IS '执行次数'; +COMMENT ON COLUMN hg_sys_cron.sort IS '排序'; +COMMENT ON COLUMN hg_sys_cron.remark IS '备注'; +COMMENT ON COLUMN hg_sys_cron.status IS '任务状态'; +COMMENT ON COLUMN hg_sys_cron.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_cron.updated_at IS '更新时间'; + +-- hg_sys_cron_group + +CREATE TABLE IF NOT EXISTS hg_sys_cron_group ( + id BIGSERIAL PRIMARY KEY, + pid BIGINT NOT NULL DEFAULT 0, + name VARCHAR(100) DEFAULT '', + is_default SMALLINT DEFAULT 0, + sort INTEGER DEFAULT 0, + remark VARCHAR(500), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_cron_group IS '系统_定时任务分组'; +COMMENT ON COLUMN hg_sys_cron_group.id IS '任务分组ID'; +COMMENT ON COLUMN hg_sys_cron_group.pid IS '父类任务分组ID'; +COMMENT ON COLUMN hg_sys_cron_group.name IS '分组名称'; +COMMENT ON COLUMN hg_sys_cron_group.is_default IS '是否默认'; +COMMENT ON COLUMN hg_sys_cron_group.sort IS '排序'; +COMMENT ON COLUMN hg_sys_cron_group.remark IS '备注'; +COMMENT ON COLUMN hg_sys_cron_group.status IS '分组状态'; +COMMENT ON COLUMN hg_sys_cron_group.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_cron_group.updated_at IS '更新时间'; + +-- hg_sys_dict_data + +CREATE TABLE IF NOT EXISTS hg_sys_dict_data ( + id BIGSERIAL PRIMARY KEY, + label VARCHAR(100), + value VARCHAR(100), + value_type VARCHAR(255) NOT NULL DEFAULT 'string', + type VARCHAR(100), + list_class VARCHAR(100), + is_default SMALLINT DEFAULT 2, + sort INTEGER DEFAULT 0, + remark VARCHAR(500), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_dict_data IS '系统_字典数据'; +COMMENT ON COLUMN hg_sys_dict_data.id IS '字典数据ID'; +COMMENT ON COLUMN hg_sys_dict_data.label IS '字典标签'; +COMMENT ON COLUMN hg_sys_dict_data.value IS '字典键值'; +COMMENT ON COLUMN hg_sys_dict_data.value_type IS '键值数据类型:string,int,uint,bool,TIMESTAMP,date'; +COMMENT ON COLUMN hg_sys_dict_data.type IS '字典类型'; +COMMENT ON COLUMN hg_sys_dict_data.list_class IS '表格回显样式'; +COMMENT ON COLUMN hg_sys_dict_data.is_default IS '是否为系统默认'; +COMMENT ON COLUMN hg_sys_dict_data.sort IS '字典排序'; +COMMENT ON COLUMN hg_sys_dict_data.remark IS '备注'; +COMMENT ON COLUMN hg_sys_dict_data.status IS '状态'; +COMMENT ON COLUMN hg_sys_dict_data.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_dict_data.updated_at IS '更新时间'; + +-- hg_sys_dict_type + +CREATE TABLE IF NOT EXISTS hg_sys_dict_type ( + id BIGSERIAL PRIMARY KEY, + pid BIGINT NOT NULL DEFAULT 0, + name VARCHAR(100) DEFAULT '', + type VARCHAR(100) DEFAULT '', + sort INTEGER DEFAULT 0, + remark VARCHAR(500), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_dict_type IS '系统_字典类型'; +COMMENT ON COLUMN hg_sys_dict_type.id IS '字典类型ID'; +COMMENT ON COLUMN hg_sys_dict_type.pid IS '父类字典类型ID'; +COMMENT ON COLUMN hg_sys_dict_type.name IS '字典类型名称'; +COMMENT ON COLUMN hg_sys_dict_type.type IS '字典类型'; +COMMENT ON COLUMN hg_sys_dict_type.sort IS '排序'; +COMMENT ON COLUMN hg_sys_dict_type.remark IS '备注'; +COMMENT ON COLUMN hg_sys_dict_type.status IS '字典类型状态'; +COMMENT ON COLUMN hg_sys_dict_type.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_dict_type.updated_at IS '更新时间'; + +-- hg_sys_ems_log + +CREATE TABLE IF NOT EXISTS hg_sys_ems_log ( + id BIGSERIAL PRIMARY KEY, + event VARCHAR(64) NOT NULL, + email VARCHAR(512) NOT NULL, + code VARCHAR(256) DEFAULT '', + times BIGINT NOT NULL, + content TEXT, + ip VARCHAR(128), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_ems_log IS '系统_邮件发送记录'; +COMMENT ON COLUMN hg_sys_ems_log.id IS '主键'; +COMMENT ON COLUMN hg_sys_ems_log.event IS '事件'; +COMMENT ON COLUMN hg_sys_ems_log.email IS '邮箱地址,多个用;隔开'; +COMMENT ON COLUMN hg_sys_ems_log.code IS '验证码'; +COMMENT ON COLUMN hg_sys_ems_log.times IS '验证次数'; +COMMENT ON COLUMN hg_sys_ems_log.content IS '邮件内容'; +COMMENT ON COLUMN hg_sys_ems_log.ip IS 'ip地址'; +COMMENT ON COLUMN hg_sys_ems_log.status IS '状态(1未验证,2已验证)'; +COMMENT ON COLUMN hg_sys_ems_log.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_ems_log.updated_at IS '更新时间'; + +-- hg_sys_gen_codes + +CREATE TABLE IF NOT EXISTS hg_sys_gen_codes ( + id BIGSERIAL PRIMARY KEY, + gen_type INTEGER NOT NULL, + gen_template INTEGER DEFAULT 0, + var_name VARCHAR(255) NOT NULL, + options JSONB, + db_name VARCHAR(128), + table_name VARCHAR(255) NOT NULL, + table_comment VARCHAR(255), + dao_name VARCHAR(255), + master_columns JSONB, + addon_name VARCHAR(128), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_gen_codes IS '系统_代码生成记录'; +COMMENT ON COLUMN hg_sys_gen_codes.id IS '生成ID'; +COMMENT ON COLUMN hg_sys_gen_codes.gen_type IS '生成类型'; +COMMENT ON COLUMN hg_sys_gen_codes.gen_template IS '生成模板'; +COMMENT ON COLUMN hg_sys_gen_codes.var_name IS '实体命名'; +COMMENT ON COLUMN hg_sys_gen_codes.options IS '配置选项'; +COMMENT ON COLUMN hg_sys_gen_codes.db_name IS '数据库名称'; +COMMENT ON COLUMN hg_sys_gen_codes.table_name IS '主表名称'; +COMMENT ON COLUMN hg_sys_gen_codes.table_comment IS '主表注释'; +COMMENT ON COLUMN hg_sys_gen_codes.dao_name IS '主表dao模型'; +COMMENT ON COLUMN hg_sys_gen_codes.master_columns IS '主表字段'; +COMMENT ON COLUMN hg_sys_gen_codes.addon_name IS '插件名称'; +COMMENT ON COLUMN hg_sys_gen_codes.status IS '生成状态'; +COMMENT ON COLUMN hg_sys_gen_codes.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_gen_codes.updated_at IS '更新时间'; + +-- hg_sys_gen_curd_demo + +CREATE TABLE IF NOT EXISTS hg_sys_gen_curd_demo ( + id BIGSERIAL PRIMARY KEY, + category_id BIGINT DEFAULT 0, + title VARCHAR(64) NOT NULL, + description VARCHAR(255) DEFAULT '', + content TEXT, + image VARCHAR(255), + attachfile VARCHAR(255), + city_id BIGINT DEFAULT 0, + switch SMALLINT DEFAULT 1, + sort INTEGER, + status SMALLINT DEFAULT 1, + created_by BIGINT DEFAULT 0, + updated_by BIGINT DEFAULT 0, + deleted_by BIGINT DEFAULT 0, + created_at TIMESTAMP, + updated_at TIMESTAMP, + deleted_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_gen_curd_demo IS '系统_生成curd演示'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.id IS 'ID'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.category_id IS '分类ID'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.title IS '标题'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.description IS '描述'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.content IS '内容'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.image IS '单图'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.attachfile IS '附件'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.city_id IS '所在城市'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.switch IS '显示开关'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.sort IS '排序'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.status IS '状态'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.created_by IS '创建者'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.updated_by IS '更新者'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.deleted_by IS '删除者'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.updated_at IS '修改时间'; +COMMENT ON COLUMN hg_sys_gen_curd_demo.deleted_at IS '删除时间'; + +-- hg_sys_gen_tree_demo + +CREATE TABLE IF NOT EXISTS hg_sys_gen_tree_demo ( + id BIGSERIAL PRIMARY KEY, + pid BIGINT, + level INTEGER DEFAULT 1, + tree VARCHAR(512), + category_id BIGINT DEFAULT 0, + title VARCHAR(64) NOT NULL, + description VARCHAR(255), + sort INTEGER, + status SMALLINT DEFAULT 1, + created_by BIGINT DEFAULT 0, + updated_by BIGINT DEFAULT 0, + created_at TIMESTAMP, + updated_at TIMESTAMP, + deleted_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_gen_tree_demo IS '系统_生成树表演示'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.id IS 'ID'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.pid IS '上级ID'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.level IS '关系树级别'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.tree IS '关系树'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.category_id IS '分类ID'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.title IS '标题'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.description IS '描述'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.sort IS '排序'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.status IS '状态'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.created_by IS '创建者'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.updated_by IS '更新者'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.updated_at IS '修改时间'; +COMMENT ON COLUMN hg_sys_gen_tree_demo.deleted_at IS '删除时间'; + +-- hg_sys_log + +CREATE TABLE IF NOT EXISTS hg_sys_log ( + id BIGSERIAL PRIMARY KEY, + req_id VARCHAR(50), + app_id VARCHAR(50) DEFAULT '', + merchant_id BIGINT DEFAULT 0, + member_id BIGINT DEFAULT 0, + method VARCHAR(20), + module VARCHAR(50), + url VARCHAR(1000), + get_data JSONB, + post_data JSONB, + header_data JSONB, + ip VARCHAR(128), + province_id BIGINT NOT NULL DEFAULT 0, + city_id BIGINT NOT NULL DEFAULT 0, + error_code INTEGER DEFAULT 0, + error_msg TEXT, + error_data JSONB, + user_agent VARCHAR(512), + take_up_time BIGINT DEFAULT 0, + timestamp BIGINT DEFAULT 0, + status SMALLINT NOT NULL DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_log IS '系统_全局日志'; +COMMENT ON COLUMN hg_sys_log.id IS '日志ID'; +COMMENT ON COLUMN hg_sys_log.req_id IS '对外ID'; +COMMENT ON COLUMN hg_sys_log.app_id IS '应用ID'; +COMMENT ON COLUMN hg_sys_log.merchant_id IS '商户ID'; +COMMENT ON COLUMN hg_sys_log.member_id IS '用户ID'; +COMMENT ON COLUMN hg_sys_log.method IS '提交类型'; +COMMENT ON COLUMN hg_sys_log.module IS '访问模块'; +COMMENT ON COLUMN hg_sys_log.url IS '提交url'; +COMMENT ON COLUMN hg_sys_log.get_data IS 'get数据'; +COMMENT ON COLUMN hg_sys_log.post_data IS 'post数据'; +COMMENT ON COLUMN hg_sys_log.header_data IS 'header数据'; +COMMENT ON COLUMN hg_sys_log.ip IS 'IP地址'; +COMMENT ON COLUMN hg_sys_log.province_id IS '省编码'; +COMMENT ON COLUMN hg_sys_log.city_id IS '市编码'; +COMMENT ON COLUMN hg_sys_log.error_code IS '报错code'; +COMMENT ON COLUMN hg_sys_log.error_msg IS '对外错误提示'; +COMMENT ON COLUMN hg_sys_log.error_data IS '报错日志'; +COMMENT ON COLUMN hg_sys_log.user_agent IS 'UA信息'; +COMMENT ON COLUMN hg_sys_log.take_up_time IS '请求耗时'; +COMMENT ON COLUMN hg_sys_log.timestamp IS '响应时间'; +COMMENT ON COLUMN hg_sys_log.status IS '状态'; +COMMENT ON COLUMN hg_sys_log.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_log.updated_at IS '修改时间'; + +-- hg_sys_login_log + +CREATE TABLE IF NOT EXISTS hg_sys_login_log ( + id BIGSERIAL PRIMARY KEY, + req_id VARCHAR(50), + member_id BIGINT DEFAULT 0, + username VARCHAR(64), + response JSONB, + login_at TIMESTAMP, + login_ip VARCHAR(128), + province_id BIGINT, + city_id BIGINT, + user_agent VARCHAR(512), + err_msg VARCHAR(1000), + status SMALLINT NOT NULL DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_login_log IS '系统_登录日志'; +COMMENT ON COLUMN hg_sys_login_log.id IS '日志ID'; +COMMENT ON COLUMN hg_sys_login_log.req_id IS '请求ID'; +COMMENT ON COLUMN hg_sys_login_log.member_id IS '用户ID'; +COMMENT ON COLUMN hg_sys_login_log.username IS '用户名'; +COMMENT ON COLUMN hg_sys_login_log.response IS '响应数据'; +COMMENT ON COLUMN hg_sys_login_log.login_at IS '登录时间'; +COMMENT ON COLUMN hg_sys_login_log.login_ip IS '登录IP'; +COMMENT ON COLUMN hg_sys_login_log.province_id IS '省编码'; +COMMENT ON COLUMN hg_sys_login_log.city_id IS '市编码'; +COMMENT ON COLUMN hg_sys_login_log.user_agent IS 'UA信息'; +COMMENT ON COLUMN hg_sys_login_log.err_msg IS '错误提示'; +COMMENT ON COLUMN hg_sys_login_log.status IS '状态'; +COMMENT ON COLUMN hg_sys_login_log.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_login_log.updated_at IS '修改时间'; + +-- hg_sys_provinces + +CREATE TABLE IF NOT EXISTS hg_sys_provinces ( + id BIGSERIAL PRIMARY KEY, + title VARCHAR(50) NOT NULL DEFAULT '', + pinyin VARCHAR(100) DEFAULT '', + lng VARCHAR(20) DEFAULT '', + lat VARCHAR(20) DEFAULT '', + pid BIGINT NOT NULL DEFAULT 0, + level INTEGER NOT NULL DEFAULT 1, + tree TEXT, + sort INTEGER DEFAULT 0, + status SMALLINT NOT NULL DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_provinces IS '系统_省市区编码'; +COMMENT ON COLUMN hg_sys_provinces.id IS '省市区ID'; +COMMENT ON COLUMN hg_sys_provinces.title IS '栏目名称'; +COMMENT ON COLUMN hg_sys_provinces.pinyin IS '拼音'; +COMMENT ON COLUMN hg_sys_provinces.lng IS '经度'; +COMMENT ON COLUMN hg_sys_provinces.lat IS '纬度'; +COMMENT ON COLUMN hg_sys_provinces.pid IS '父栏目'; +COMMENT ON COLUMN hg_sys_provinces.level IS '关系树等级'; +COMMENT ON COLUMN hg_sys_provinces.tree IS '关系'; +COMMENT ON COLUMN hg_sys_provinces.sort IS '排序'; +COMMENT ON COLUMN hg_sys_provinces.status IS '状态'; +COMMENT ON COLUMN hg_sys_provinces.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_provinces.updated_at IS '更新时间'; + +CREATE TABLE IF NOT EXISTS hg_sys_serve_license ( + id BIGSERIAL PRIMARY KEY, + "group" VARCHAR(50) NOT NULL, + name VARCHAR(128) NOT NULL, + appid VARCHAR(64) NOT NULL, + secret_key VARCHAR(255), + remote_addr VARCHAR(64), + online_limit INTEGER DEFAULT 1, + login_times BIGINT, + last_login_at TIMESTAMP, + last_active_at TIMESTAMP, + routes JSONB, + allowed_ips VARCHAR(512), + end_at TIMESTAMP NOT NULL, + remark VARCHAR(512), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_serve_license IS '系统_服务许可证'; +COMMENT ON COLUMN hg_sys_serve_license.id IS '许可ID'; +COMMENT ON COLUMN hg_sys_serve_license."group" IS '分组'; +COMMENT ON COLUMN hg_sys_serve_license.name IS '许可名称'; +COMMENT ON COLUMN hg_sys_serve_license.appid IS '应用ID'; +COMMENT ON COLUMN hg_sys_serve_license.secret_key IS '应用秘钥'; +COMMENT ON COLUMN hg_sys_serve_license.remote_addr IS '最后连接地址'; +COMMENT ON COLUMN hg_sys_serve_license.online_limit IS '在线限制'; +COMMENT ON COLUMN hg_sys_serve_license.login_times IS '登录次数'; +COMMENT ON COLUMN hg_sys_serve_license.last_login_at IS '最后登录时间'; +COMMENT ON COLUMN hg_sys_serve_license.last_active_at IS '最后心跳'; +COMMENT ON COLUMN hg_sys_serve_license.routes IS '路由表,空使用默认分组路由'; +COMMENT ON COLUMN hg_sys_serve_license.allowed_ips IS 'IP白名单'; +COMMENT ON COLUMN hg_sys_serve_license.end_at IS '授权有效期'; +COMMENT ON COLUMN hg_sys_serve_license.remark IS '备注'; +COMMENT ON COLUMN hg_sys_serve_license.status IS '状态'; +COMMENT ON COLUMN hg_sys_serve_license.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_serve_license.updated_at IS '修改时间'; + +CREATE TABLE IF NOT EXISTS hg_sys_serve_log ( + id BIGSERIAL PRIMARY KEY, + trace_id VARCHAR(50), + level_format VARCHAR(32), + content TEXT, + stack JSONB, + line VARCHAR(255) NOT NULL, + trigger_ns BIGINT, + status SMALLINT NOT NULL DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_serve_log IS '系统_服务日志'; +COMMENT ON COLUMN hg_sys_serve_log.id IS '日志ID'; +COMMENT ON COLUMN hg_sys_serve_log.trace_id IS '链路ID'; +COMMENT ON COLUMN hg_sys_serve_log.level_format IS '日志级别'; +COMMENT ON COLUMN hg_sys_serve_log.content IS '日志内容'; +COMMENT ON COLUMN hg_sys_serve_log.stack IS '打印堆栈'; +COMMENT ON COLUMN hg_sys_serve_log.line IS '调用行'; +COMMENT ON COLUMN hg_sys_serve_log.trigger_ns IS '触发时间(ns)'; +COMMENT ON COLUMN hg_sys_serve_log.status IS '状态'; +COMMENT ON COLUMN hg_sys_serve_log.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_serve_log.updated_at IS '修改时间'; + +CREATE TABLE IF NOT EXISTS hg_sys_sms_log ( + id BIGSERIAL PRIMARY KEY, + event VARCHAR(64) NOT NULL, + mobile VARCHAR(20) NOT NULL DEFAULT '', + code VARCHAR(256) DEFAULT '', + times BIGINT NOT NULL, + ip VARCHAR(128), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP +); + +COMMENT ON TABLE hg_sys_sms_log IS '系统_短信发送记录'; +COMMENT ON COLUMN hg_sys_sms_log.id IS '主键'; +COMMENT ON COLUMN hg_sys_sms_log.event IS '事件'; +COMMENT ON COLUMN hg_sys_sms_log.mobile IS '手机号'; +COMMENT ON COLUMN hg_sys_sms_log.code IS '验证码或短信内容'; +COMMENT ON COLUMN hg_sys_sms_log.times IS '验证次数'; +COMMENT ON COLUMN hg_sys_sms_log.ip IS 'ip地址'; +COMMENT ON COLUMN hg_sys_sms_log.status IS '状态(1未验证,2已验证)'; +COMMENT ON COLUMN hg_sys_sms_log.created_at IS '创建时间'; +COMMENT ON COLUMN hg_sys_sms_log.updated_at IS '更新时间'; + +-- 设置自增序列起始值 +ALTER SEQUENCE hg_sys_sms_log_id_seq RESTART WITH 2; + +CREATE TABLE IF NOT EXISTS hg_test_category ( + id BIGSERIAL PRIMARY KEY, + name VARCHAR(255) NOT NULL, + short_name VARCHAR(128), + description VARCHAR(255), + sort INTEGER NOT NULL, + remark VARCHAR(255), + status SMALLINT DEFAULT 1, + created_at TIMESTAMP, + updated_at TIMESTAMP, + deleted_at TIMESTAMP +); + +COMMENT ON TABLE hg_test_category IS '测试分类'; +COMMENT ON COLUMN hg_test_category.id IS '分类ID'; +COMMENT ON COLUMN hg_test_category.name IS '分类名称'; +COMMENT ON COLUMN hg_test_category.short_name IS '简称'; +COMMENT ON COLUMN hg_test_category.description IS '描述'; +COMMENT ON COLUMN hg_test_category.sort IS '排序'; +COMMENT ON COLUMN hg_test_category.remark IS '备注'; +COMMENT ON COLUMN hg_test_category.status IS '状态'; +COMMENT ON COLUMN hg_test_category.created_at IS '创建时间'; +COMMENT ON COLUMN hg_test_category.updated_at IS '修改时间'; +COMMENT ON COLUMN hg_test_category.deleted_at IS '删除时间'; + +-- 设置自增序列起始值 +ALTER SEQUENCE hg_test_category_id_seq RESTART WITH 5; + +INSERT INTO hg_addon_hgexample_table ( + id, pid, level, tree, category_id, flag, title, description, content, + image, images, attachfile, attachfiles, map, star, price, views, + activity_at, start_at, end_at, switch, sort, avatar, sex, qq, email, + mobile, hobby, channel, city_id, remark, status, created_by, updated_by, + created_at, updated_at, deleted_at +) VALUES + (1, 0, 1, NULL, 1, '[1, 2]', '测试标题', '描述', '

这是内容............

', + 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqamvhlq4w3ki6bl.webp', + '["https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqap5l9brk2lkavu.jpg", "https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqaqua7fw8ukbbp5.jpg"]', + 'http://localhost:8000/attachment/2023-07-18/cu54ama4z54oejf5xx.mp3', + '["https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqawg96ba4cuezvv.xlsx", "https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqaup19k9oznyixz.doc"]', + '{"key": "qwe", "value": "123"}', 3.0, 88.00, 10, + '2022-12-23', '2022-12-01 00:00:00', '2022-12-31 23:59:59', + 1, 20, '', 15, '133814250', '133814250@qq.com', + '15303830571', '[3, 2, 1]', 1, 140406, '备注!', 1, 1, 1, + '2022-12-15 19:30:14', '2023-07-18 20:05:45', NULL), + (2, 0, 1, NULL, 0, '[1]', '测试2', '描述', '

不知道写点啥!


', + 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqbmxmtaq06gbnqa.jpeg', + '["https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqborf529kf4cxbm.jpeg"]', + 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqawg96ba4cuezvv.xlsx', + '["https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqaup19k9oznyixz.doc"]', + '{}', 2.5, 10.00, 0, + '2023-02-18', NULL, NULL, + 0, 30, '', 0, '', '1561561@qq.com', + '15303830571', '[2, 1]', 3, 140214, '', 1, 1, 1, + '2023-02-06 14:17:11', '2023-11-13 17:18:18', NULL), + (3, 1, 2, 'tr_1 ', 0, '[1]', 'AAA', '', '', + 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqamvhlq4w3ki6bl.webp', + '["https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqborf529kf4cxbm.jpeg"]', + '', '{}', '{}', 1.0, 10.00, 0, + '2023-11-13', NULL, NULL, + 1, 40, '', 0, '13311', '1331@qq.cc', + '15303830571', '{}', 0, 0, '', 1, 1, 1, + '2023-11-13 17:34:42', '2023-11-13 17:55:26', NULL), + (4, 1, 2, 'tr_1 ', 0, '[1]', 'BBB', '', '', + 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqamvhlq4w3ki6bl.webp', + '["https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqborf529kf4cxbm.jpeg"]', + '', '{}', '{}', 2.5, 10.00, 0, + '2023-11-13', NULL, NULL, + 0, 50, '', 0, '12212', '165165@q.cc', + '15303830561', '{}', 0, 0, '', 1, 1, 1, + '2023-11-13 17:43:58', '2023-11-13 17:43:58', NULL), + (5, 3, 3, 'tr_1 tr_3', 0, '[1]', 'A1', '', '', + 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqamvhlq4w3ki6bl.webp', + '["https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqborf529kf4cxbm.jpeg"]', + '', '{}', '{}', 1.0, 10.00, 0, + '2023-11-13', NULL, NULL, + 1, 60, '', 0, '10121212', '122112@qq.cc', + '15303830571', '{}', 3, 0, '', 1, 1, 1, + '2023-11-13 17:45:22', '2024-07-21 21:55:01', NULL); + +-- 插入 hg_addon_hgexample_tenant_order 表数据 +INSERT INTO hg_addon_hgexample_tenant_order ( + id, tenant_id, merchant_id, user_id, product_name, order_sn, money, remark, status, created_at, updated_at +) VALUES + (1, 8, 11, 12, '羊毛混纺大衣', '20230502074731zsv1Vh', 99.90, '', 1, '2024-04-10 00:00:00', '2024-04-19 00:00:00'); + +-- 插入 hg_admin_cash 表数据 +INSERT INTO hg_admin_cash ( + id, member_id, money, fee, last_money, ip, status, msg, handle_at, created_at +) VALUES + (1, 1, 100.00, 3.00, 97.00, '127.0.0.1', 2, '', '2023-05-29 14:17:17', '2023-05-29 14:16:57'); + +-- 插入 hg_admin_credits_log 表数据 +INSERT INTO hg_admin_credits_log ( + id, member_id, app_id, addons_name, credit_type, credit_group, + before_num, num, after_num, remark, ip, map_id, status, + created_at, updated_at +) VALUES + (1, 1, 'admin', '', 'balance', 'apply_cash', + 99391.78, -100.00, 99291.78, '后台申请提现', '127.0.0.1', 1, 0, + '2023-05-29 14:16:57', '2023-05-29 14:16:57'), + (2, 1, 'admin', '', 'balance', 'op_incr', + 99291.78, -1.00, 99290.78, '为后台用户:8 操作增加余额:1', '127.0.0.1', 0, 0, + '2023-07-06 17:17:39', '2023-07-06 17:17:39'), + (3, 8, 'admin', '', 'balance', 'incr', + 3.22, 1.00, 4.22, '后台用户:1 为你操作增加余额:1', '127.0.0.1', 0, 0, + '2023-07-06 17:17:39', '2023-07-06 17:17:39'), + (4, 1, 'admin', '', 'balance', 'op_incr', + 99290.78, -1.00, 99289.78, '为后台用户:13 操作增加余额:1', '::1', 0, 1, + '2024-07-21 21:49:40', '2024-07-21 21:49:40'), + (5, 13, 'admin', '', 'balance', 'incr', + 0.00, 1.00, 1.00, '后台用户:1 为你操作增加余额:1', '::1', 0, 1, + '2024-07-21 21:49:40', '2024-07-21 21:49:40'), + (6, 1, 'admin', '', 'integral', 'op_incr', + 89.00, -1.00, 88.00, '为后台用户:12 操作增加积分:1', '::1', 0, 1, + '2024-07-21 21:49:46', '2024-07-21 21:49:46'), + (7, 12, 'admin', '', 'integral', 'incr', + 0.00, 1.00, 1.00, '后台用户:1 为你操作增加积分:1', '::1', 0, 1, + '2024-07-21 21:49:46', '2024-07-21 21:49:46'); + +-- 插入 hg_admin_dept 表数据 +INSERT INTO hg_admin_dept ( + id, pid, name, code, type, leader, phone, email, level, tree, sort, status, created_at, updated_at +) VALUES + (100, 0, 'hotgo', 'hotgo', 'company', 'mengshuai', '15303830571', '133814250@qq.com', 1, '', 10, 1, '2022-01-04 09:54:52', '2024-04-24 23:14:24'), + (101, 100, '深圳总公司', 'shenzhen', 'company', 'hotgo', '15888888888', 'hotgo@qq.com', 2, 'tr_100 ', 20, 1, '2022-01-04 17:54:52', '2023-08-02 14:03:23'), + (102, 100, '租户', 'tenant', 'tenant', 'hotgo', '15888888888', 'hotgo@qq.com', 2, 'tr_100 ', 1000, 1, '2022-01-04 01:54:52', '2024-04-13 22:24:58'), + (103, 101, '研发部门', 'science', 'company', 'hotgo', '15888888888', 'hotgo@qq.com', 3, 'tr_100 tr_101 ', 40, 1, '2022-01-04 17:54:52', '2024-04-12 09:29:37'), + (105, 101, '测试部门', 'test', 'company', 'hotgo', '15888888888', 'hotgo@qq.com', 3, 'tr_100 tr_101 ', 50, 1, '2022-01-04 17:54:52', '2024-04-12 09:29:41'), + (106, 101, '财务部门', 'finance', 'company', 'hotgo', '15888888888', 'hotgo@qq.com', 3, 'tr_100 tr_101 ', 60, 1, '2022-01-04 17:54:52', '2024-04-12 09:29:45'), + (107, 101, '运维部门', 'maintain', 'company', 'hotgo', '15888888888', 'hotgo@qq.com', 3, 'tr_100 tr_101 ', 70, 1, '2022-01-04 09:54:52', '2024-04-12 09:29:49'), + (110, 111, '用户', 'user', 'user', 'hotgo', '15888888888', 'hotgo@qq.com', 4, 'tr_100 tr_102 tr_111 ', 10, 1, '2024-04-12 09:18:44', '2024-04-13 22:25:07'), + (111, 102, '商户', 'merchant', 'merchant', 'hotgo', '15888888888', 'hotgo@qq.com', 3, 'tr_100 tr_102 ', 2000, 1, '2024-04-12 09:31:58', '2024-04-14 22:00:20'); + +-- 插入 hg_admin_member 表数据 +INSERT INTO hg_admin_member ( + id, dept_id, role_id, real_name, username, password_hash, salt, password_reset_token, + integral, balance, avatar, sex, qq, email, mobile, birthday, city_id, address, + pid, level, tree, invite_code, cash, last_active_at, remark, status, + created_at, updated_at +) VALUES + (1, 100, 1, '孟帅', 'admin', 'a7c588fffeb2c1d99b29879d7fe97c78', '6541561', '', + 88.00, 99289.78, 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdq8er9nfkchdopav.png', + 1, '133814250', '133814250@qq.com', '15303830571', '2016-04-16', 410172, '莲花街001号', + 0, 1, '', '111', + '{"name": "孟帅", "account": "15303830571", "payeeCode": "https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdq8mqal5isvcb58g.jpg"}', + '2024-08-27 19:02:49', NULL, 1, + '2021-02-12 17:59:45', '2024-08-27 19:02:49'), + + (3, 100, 2, '测试管理员', 'test', 'a7c588fffeb2c1d99b29879d7fe97c78', '6541561', '', + 0.00, 4.00, '', 1, '', 'c@qq.cc', '15303888888', '2016-04-13', 371100, '大潮街道666号', + 1, 2, 'tr_1 ', '222', NULL, + '2024-04-24 11:47:48', '', 1, + '2022-02-11 17:59:45', '2024-04-24 11:47:48'), + + (8, 102, 200, '阿萌', 'ameng', '382df3b083a27886edb94e669a857c33', 'hfuUEb', '', + 11.00, 4.22, '', 2, '', '', '', NULL, 0, '', + 1, 2, 'tr_1 ', '333', NULL, + '2024-04-16 18:56:00', '', 1, + '2023-02-03 17:34:31', '2024-04-16 18:56:00'), + + (9, 100, 206, '黄敏', 'test_finance', '151f5f6bb8b223fc7b589a32effb6f91', 'FhShzw', '', + 0.00, 0.00, 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdq8er9nfkchdopav.png', + 1, '', '', '', NULL, 0, '', + 1, 2, 'tr_1 ', '5jZUI3uWLfcj', NULL, + NULL, '', 1, + '2023-08-02 11:30:45', '2023-08-02 11:31:09'), + + (11, 111, 209, '刘芳', 'abai', '5787c7a121190011fac8376b1d3e0396', 'puUFvx', '', + 0.00, 0.00, 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdq8er9nfkchdopav.png', + 1, '', '', '', NULL, 0, '', + 8, 3, 'tr_1 tr_8 ', 'SH5akjqInb2p', NULL, + '2024-04-16 18:56:02', '', 1, + '2023-08-02 14:24:50', '2024-04-16 18:56:02'), + + (12, 110, 210, '李明', 'asong', '18d1e667e2e756c03186ff6d33b18fd4', 'ONYhgf', '', + 1.00, 0.00, 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdq8er9nfkchdopav.png', + 1, '', '', '', NULL, 0, '', + 11, 4, 'tr_1 tr_8 tr_11 ', 'pHffclXhgeg9', NULL, + '2024-04-23 18:05:03', '', 1, + '2023-08-02 14:50:49', '2024-07-21 21:49:46'), + + (13, 110, 210, '', 'user123', 'a67ec13a65125a6b2566c4229c6c496a', 'auQwMY', '', + 0.00, 1.00, 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdq8er9nfkchdopav.png', + 1, '', '', '', NULL, 0, '', + 1, 2, 'tr_1 ', 'bpZPxskFMBra', NULL, + '2024-04-12 11:52:31', '', 1, + '2024-04-12 10:50:46', '2024-07-21 21:49:40'); + +-- +-- 转存表中的数据 `hg_admin_member_post` +-- + +INSERT INTO hg_admin_member_post (member_id, post_id) VALUES + (3, 4), + (8, 2), + (9, 4), + (10, 4), + (11, 4); + +-- +-- 转存表中的数据 `hg_admin_member_role` +-- + +INSERT INTO hg_admin_member_role (member_id, role_id) VALUES + (1, 1), + (2, 2); + +-- 插入 hg_admin_menu 表数据 +INSERT INTO hg_admin_menu ( + id, pid, level, tree, title, name, path, icon, type, redirect, + permissions, permission_name, component, always_show, active_menu, + is_root, is_frame, frame_src, keep_alive, hidden, affix, sort, + remark, status, updated_at, created_at +) VALUES + (2047, 0, 1, '', 'Dashboard', 'Dashboard', '/dashboard', 'DashboardOutlined', 1, '/dashboard/console', + 'dashboard', '控制台', 'LAYOUT', 0, '', + 0, 1, '', 0, 0, 0, 10, + '这是一个备注..', 1, '2023-11-13 15:16:58', '2022-07-17 11:40:03'), + + (2048, 2047, 2, 'tr_2047 ', '主控台', 'dashboard_console', 'console', '', 2, '', + '/console/stat', '主控台', '/dashboard/console/console', 0, '', + 0, 1, '', 0, 0, 0, 20, + '', 1, '2023-11-13 15:16:58', '2022-07-17 11:45:09'), + + (2050, 2047, 2, 'tr_2047 ', '工作台', 'dashboard_workplace', 'workplace', '', 2, '', + 'dashboard_workplace', '工作台', '/dashboard/workplace/workplace', 0, '', + 0, 1, '', 0, 0, 0, 40, + '', 1, '2023-11-13 15:16:58', '2022-07-17 11:45:09'), + + (2061, 0, 1, '', '组织管理', 'Org', '/org', 'AppstoreOutlined', 1, '/org/user', + '', '', 'LAYOUT', 1, '', + 0, 0, '', 0, 0, 0, 20, + '', 1, '2023-11-13 15:16:58', '2022-09-16 06:08:19'), + + (2062, 2061, 2, 'tr_2061 ', '后台用户', 'user', 'user', '', 2, '', + '/dept/list,/post/list,/role/list,/member/list,/dept/option', '', '/org/user/user', 0, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-09-16 06:09:25'), + + (2063, 2061, 2, 'tr_2061 ', '部门管理', 'org_dept', 'dept', '', 2, '', + '', '', '/org/dept/dept', 0, '', + 0, 0, '', 1, 0, 0, 20, + '', 1, '2023-11-13 15:16:58', '2022-09-16 14:10:12'), + + (2064, 2061, 2, 'tr_2061 ', '岗位管理', 'org_post', 'post', '', 2, '', + '/post/list', '', '/org/post/post', 0, '', + 0, 0, '', 1, 0, 0, 30, + '', 1, '2023-11-13 15:16:58', '2022-09-16 14:11:05'), + + (2065, 0, 1, '', '权限管理', 'Permission', '/permission', 'SafetyCertificateOutlined', 1, '/permission/menu', + '', '', 'LAYOUT', 1, '', + 0, 0, '', 0, 0, 0, 40, + '', 1, '2023-11-13 15:16:58', '2022-09-15 22:08:19'), + + (2066, 2065, 2, 'tr_2065 ', '菜单权限', 'permission_menu', 'menu', '', 2, '', + '/menu/list', '', '/permission/menu/menu', 0, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-09-16 06:09:25'), + + (2067, 2065, 2, 'tr_2065 ', '角色权限', 'permission_role', 'role', '', 2, '', + '/role/list,/role/dataScope/select,/role/getPermissions', '', '/permission/role/role', 0, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-09-15 22:09:25'), + + (2068, 0, 1, '', '系统设置', 'System', '/system', 'SettingOutlined', 1, '/system/config', + '', '', 'LAYOUT', 1, '', + 0, 0, '', 0, 0, 0, 120, + '', 1, '2023-11-17 15:53:10', '2022-09-15 09:17:57'), + + (2069, 2068, 2, 'tr_2068 ', '配置管理', 'system_config', 'config', '', 2, '', + '', '', '/system/config/system', 0, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-09-16 01:19:01'), + + (2070, 2068, 2, 'tr_2068 ', '字典管理', 'system_dict', 'dict', '', 2, '', + '', '', '/system/dict/index', 1, '', + 0, 0, '', 0, 0, 0, 20, + '', 1, '2023-11-13 15:16:58', '2022-09-16 17:33:05'), + + (2071, 2068, 2, 'tr_2068 ', '定时任务', 'system_cron', 'cron', '', 2, '', + '', '', '/system/cron/index', 1, '', + 0, 0, '', 0, 0, 0, 30, + '', 1, '2023-11-13 15:16:58', '2022-09-16 17:33:34'), + + (2072, 2068, 2, 'tr_2068 ', '黑名单', 'system_blacklist', 'blacklist', '', 2, '', + '', '', '/system/blacklist/index', 1, '', + 0, 0, '', 0, 0, 0, 40, + '', 1, '2023-11-13 15:16:58', '2022-09-16 17:34:01'), + + (2073, 2219, 3, 'tr_2093 tr_2219 ', '个人设置', 'home_account', 'account', '', 2, '', + '', '', '/home/account/account', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-17 15:27:49', '2022-09-16 17:34:35'), + + (2074, 2093, 2, 'tr_2093 ', '日志管理', 'Logs', '/log', '', 1, '/apply/log/log', + '', '', 'ParentLayout', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2024-04-12 13:41:45', '2022-09-16 01:38:32'), + + (2075, 2074, 3, 'tr_2093 tr_2074 ', '全局日志', 'log', 'log', '', 2, '', + '/log/list', '', '/log/log/index', 2, '', + 2, 2, '', 1, 2, 2, 10, + '', 1, '2024-04-24 11:03:39', '2022-09-09 17:39:16'), + + (2076, 2074, 3, 'tr_2093 tr_2074 ', '登录日志', 'login_log', 'login-log', '', 2, '', + '', '', '/log/login-log/index', 2, '', + 2, 2, '', 1, 2, 2, 20, + '', 1, '2024-04-24 11:03:42', '2022-09-15 20:04:20'), + + (2077, 2074, 3, 'tr_2093 tr_2074 ', '全局日志详情', 'log_view', 'view/:id?', '', 2, '', + '/log/view', '', '/log/log/view', 0, 'log', + 0, 0, '', 0, 1, 0, 15, + '', 1, '2023-11-17 15:27:32', '2022-09-14 20:07:04'), + + (2082, 2076, 4, 'tr_2093 tr_2074 tr_2076 ', '登录日志详情', 'loginLogView', 'view/:id?', '', 3, '', + '/loginLog/view', '', '/log/login-log/view', 0, 'login_log', + 0, 0, '', 0, 1, 0, 62, + '', 1, '2023-11-17 15:27:32', '2022-09-14 20:07:04'), + + (2083, 2076, 4, 'tr_2093 tr_2074 tr_2076 ', '登录日志列表', 'login_log_index', 'index', '', 3, '', + '/loginLog/list', '', '/log/login-log/index', 0, 'login_log', + 0, 0, '', 0, 1, 0, 61, + '', 1, '2023-11-17 15:27:32', '2022-09-15 04:38:33'), + + (2084, 2074, 3, 'tr_2093 tr_2074 ', '短信记录', 'sms_log', 'sms', '', 1, '', + '/smsLog/list', '', '/log/sms-log/index', 0, '', + 0, 0, '', 0, 0, 0, 70, + '', 1, '2023-11-17 15:27:32', '2022-09-17 19:13:51'), + + (2087, 2074, 3, 'tr_2093 tr_2074 ', '服务日志', 'monitor_serve_log', 'serve_log', '', 2, '', + '', '', '/monitor/serve-log/index', 1, '', + 0, 0, '', 0, 0, 0, 30, + '', 1, '2023-11-17 15:27:32', '2022-09-18 20:59:28'), + + (2088, 2087, 4, 'tr_2093 tr_2074 tr_2087 ', '服务日志详情', 'monitor_serve_log_view', 'view/:id?', '', 3, '', + '/serveLog/view', '', '/monitor/serve-log/view', 0, 'monitor_serve_log', + 0, 0, '', 0, 1, 0, 62, + '', 1, '2023-11-17 15:27:32', '2022-09-14 20:07:04'), + + (2089, 2087, 4, 'tr_2093 tr_2074 tr_2087 ', '服务日志列表', 'monitor_serve_log_index', 'index', '', 3, '', + '/serveLog/list', '', '/monitor/serve-log/index', 0, 'monitor_serve_log', + 0, 0, '', 0, 1, 0, 61, + '', 1, '2023-11-17 15:27:32', '2022-09-15 04:38:33'), + + (2090, 0, 1, '', '系统监控', 'Monitors', '/monitor', 'FundProjectionScreenOutlined', 1, '', + '', '', 'LAYOUT', 1, '', + 0, 0, '', 0, 0, 0, 110, + '', 1, '2023-11-17 15:34:42', '2022-09-15 17:38:32'), + + (2091, 2090, 2, 'tr_2090 ', '在线用户', 'monitor_online', 'online', '', 2, '', + '/monitor/userOnlineList', '', '/monitor/online/index', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-09-18 21:23:36'), + + (2092, 2090, 2, 'tr_2090 ', '服务监控', 'monitor_serve_monitor', 'serve_monitor', '', 2, '', + '', '', '/monitor/serve-monitor/index', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-09-18 21:23:36'), + + (2093, 0, 1, '', '系统应用', 'Applys', '/apply', 'CodeSandboxOutlined', 1, '/apply/log/log', + '', '', 'LAYOUT', 1, '', + 0, 0, '', 0, 0, 0, 100, + '', 1, '2024-04-12 15:39:05', '2022-09-18 21:29:53'), + + (2094, 2093, 2, 'tr_2093 ', '通知公告', 'apply_notice', 'notice', '', 2, '', + '/notice/list', '', '/apply/notice/index', 1, '', + 0, 0, '', 0, 0, 0, 300, + '', 1, '2023-11-17 15:28:00', '2022-09-18 21:30:19'), + + (2095, 2093, 2, 'tr_2093 ', '附件管理', 'apply_attachment', 'attachment', '', 2, '', + '/attachment/list', '', '/apply/attachment/index', 1, '', + 0, 0, '', 0, 0, 0, 200, + '', 1, '2023-11-17 15:27:58', '2022-09-18 21:30:40'), + + (2096, 2093, 2, 'tr_2093 ', '地区编码', 'apply_provinces', 'provinces', '', 2, '', + '/provinces/list,/provinces/tree,/provinces/childrenList,/provinces/uniqueId', '', '/apply/provinces/index', 1, '', + 0, 0, '', 0, 0, 0, 100, + '', 1, '2023-11-17 15:27:55', '2022-09-18 21:31:01'), + + (2097, 0, 1, '', '开发工具', 'Develops', '/develop', 'CodeOutlined', 1, '/develop/code', + '', '', 'LAYOUT', 1, '', + 0, 0, '', 0, 0, 0, 210, + '', 1, '2023-11-17 15:39:06', '2022-09-18 21:32:27'), + + (2098, 2097, 2, 'tr_2097 ', '代码生成', 'develop_code', 'code', '', 2, '', + '/genCodes/list,/genCodes/selects,/genCodes/tableSelect', '', '/develop/code/index', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-09-18 21:32:46'), + + (2099, 2120, 2, 'tr_2120 ', 'API文档', 'apidocs', 'apidocs', '', 2, '', + '', '', 'IFRAME', 2, '', + 2, 1, 'https://hotgo.facms.cn/swagger', 2, 2, 2, 1000, + '', 1, '2024-04-16 12:44:58', '2022-09-18 21:34:09'), + + (2100, 2120, 2, 'tr_2120 ', '使用文档', 'https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN', '/hotgo', '', 1, '', + '', '', 'LAYOUT', 0, '', + 2, 2, '', 2, 2, 2, 1100, + '', 1, '2024-04-16 12:45:11', '2022-09-18 21:35:17'), + + (2102, 0, 1, '', '关于', 'about', '/about', 'ProjectOutlined', 1, '/about/index', + '', '', 'LAYOUT', 1, '', + 1, 0, '', 0, 0, 0, 9000, + '', 1, '2023-12-29 17:59:18', '2022-09-18 13:37:04'), + + (2103, 2102, 2, 'tr_2102 ', '关于详情', 'about_index', 'index', '', 2, '', + '', '', '/about/index', 1, 'about', + 0, 0, '', 0, 1, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-09-18 13:38:00'), + + (2109, 2062, 3, 'tr_2061 tr_2062 ', '编辑用户', 'org_user_edit', '', '', 3, '', + '/member/edit,/member/view', '', '/', 1, '', + 0, 0, '', 0, 1, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-11-22 23:49:17'), + + (2110, 2062, 3, 'tr_2061 tr_2062 ', '删除用户', 'org_user_delete', 'user', '', 3, '', + '/member/delete', '', '/', 1, '', + 0, 0, '', 0, 1, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-11-23 21:34:51'), + + (2111, 2062, 3, 'tr_2061 tr_2062 ', '修改用户状态', 'org_user_status', 'user', '', 3, '', + '/member/status', '', '/', 1, '', + 0, 0, '', 0, 1, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-11-23 21:35:48'), + + (2112, 2063, 3, 'tr_2061 tr_2063 ', '编辑部门', 'dept_edit', 'dept', '', 3, '', + '/dept/edit', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-11-23 21:57:15'), + + (2113, 2063, 3, 'tr_2061 tr_2063 ', '删除部门', 'dept_delete', 'dept', '', 3, '', + '/dept/delete', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-11-23 21:57:51'), + + (2114, 2063, 3, 'tr_2061 tr_2063 ', '修改部门状态', 'dept_status', 'dept', '', 3, '', + '/dept/status', '', '/', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-11-23 21:58:40'), + + (2115, 2064, 3, 'tr_2061 tr_2064 ', '编辑岗位', 'post_edit', 'post', '', 3, '', + '/post/edit', '', '/', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-11-23 21:59:30'), + + (2116, 2064, 3, 'tr_2061 tr_2064 ', '删除岗位', 'post_delete', 'post', '', 3, '', + '/post/delete', '', '/', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-11-23 22:00:13'), + + (2117, 2064, 3, 'tr_2061 tr_2064 ', '修改岗位状态', 'post_status', 'post', '', 3, '', + '/post/status', '', '/', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-11-23 22:00:54'), + + (2118, 2095, 3, 'tr_2093 tr_2095 ', '上传附件', 'uploadFile', 'attachment', '', 3, '', + '/upload/file', '', '/', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2022-11-23 22:14:19'), + + (2120, 0, 1, '', '文档中心', 'doc', 'doc', 'FileTextOutlined', 1, '/doc/apidocs', + '', '', 'LAYOUT', 0, '', + 2, 2, '', 2, 2, 2, 300, + '', 1, '2024-04-16 12:45:41', '2022-11-24 00:08:19'), + + (2122, 2228, 3, 'tr_2227 tr_2228 ', '表格例子', 'hgexample_table_index', 'hgexample_table', '', 2, '', + '/hgexample/table/list', '', '/addons/hgexample/table/index', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2024-04-13 23:54:36', '2022-12-23 15:07:28'), + + (2124, 2228, 3, 'tr_2227 tr_2228 ', '表格详情', 'table_view', 'view/:id?', '', 2, '', + '/hgexample/table/view', '', '/addons/hgexample/table/view', 0, 'table_index', + 0, 0, '', 0, 1, 0, 11, + '', 1, '2024-04-13 10:23:05', '2022-09-14 20:07:04'), + + (2125, 2097, 2, 'tr_2097 ', '生成配置', 'develop_code_deploy', 'deploy/:id?', '', 2, '', + '', '', '/develop/code/deploy', 0, 'develop_code', + 0, 0, '', 0, 1, 0, 20, + '', 1, '2023-11-13 15:16:58', '2022-12-31 17:16:26'), + + (2207, 2076, 4, 'tr_2093 tr_2074 tr_2076 ', '删除登录日志', 'loginLogDelete', '', '', 3, '', + '/loginLog/delete', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-17 15:27:32', '2023-01-19 21:06:45'), + + (2208, 2076, 4, 'tr_2093 tr_2074 tr_2076 ', '导出登录日志', 'loginLogExport', '', '', 3, '', + '/loginLog/export', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-17 15:27:32', '2023-01-19 21:06:45'), + + (2209, 2087, 4, 'tr_2093 tr_2074 tr_2087 ', '删除服务日志', 'serveLogDelete', '', '', 3, '', + '/serveLog/delete', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-17 15:27:32', '2023-01-20 18:37:50'), + + (2210, 2087, 4, 'tr_2093 tr_2074 tr_2087 ', '导出服务日志', 'serveLogExport', '', '', 3, '', + '/serveLog/export', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-17 15:27:32', '2023-01-20 18:37:50'), + + (2211, 2094, 3, 'tr_2093 tr_2094 ', '获取公告最大排序', 'noticeMaxSort', '', '', 3, '', + '/notice/maxSort', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-01-18 15:19:43'), + + (2212, 2094, 3, 'tr_2093 tr_2094 ', '删除公告', 'noticeDelete', '', '', 3, '', + '/notice/delete', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-01-18 15:19:43'), + + (2213, 2094, 3, 'tr_2093 tr_2094 ', '修改公告状态', 'noticeStatus', '', '', 3, '', + '/notice/status', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-01-18 15:19:43'), + + (2214, 2094, 3, 'tr_2093 tr_2094 ', '操作公告开关', 'noticeSwitch', '', '', 3, '', + '/notice/switch', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-01-18 15:19:43'), + + (2215, 2094, 3, 'tr_2093 tr_2094 ', '发送/编辑通知', 'noticeEditNotify', '', '', 3, '', + '/notice/editNotify', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-01-18 15:19:43'), + + (2216, 2094, 3, 'tr_2093 tr_2094 ', '发送/编辑公告', 'noticeEditNotice', '', '', 3, '', + '/notice/editNotice', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-01-18 15:19:43'), + + (2217, 2094, 3, 'tr_2093 tr_2094 ', '发送/编辑私信', 'noticeEditLetter', '', '', 3, '', + '/notice/editLetter', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-01-18 15:19:43'), + + (2218, 2094, 3, 'tr_2093 tr_2094 ', '编辑公告', 'noticeEdit', '', '', 3, '', + '/notice/edit', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-01-18 15:19:43'), + + (2219, 2093, 2, 'tr_2093 ', '个人中心', 'home', '/home', 'UserOutlined', 1, '', + '', '', 'ParentLayout', 1, '', + 0, 2, '', 0, 1, 0, 3000, + '', 1, '2023-11-17 15:33:52', '2023-02-01 14:59:40'), + + (2220, 2219, 3, 'tr_2093 tr_2219 ', '我的消息', 'home_message', 'message', '', 2, '', + '/notice/messageList', '', '/home/message/message', 1, '', + 0, 2, '', 0, 0, 0, 20, + '', 1, '2023-11-17 15:27:49', '2023-02-01 15:05:17'), + + (2221, 2122, 4, 'tr_2227 tr_2228 tr_2122 ', '获取最大排序', 'testMaxSort', '/test/maxSort', '', 3, '', + '/hgexample/table/maxSort', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2024-04-13 23:54:11', '2023-02-06 14:29:42'), + + (2222, 2122, 4, 'tr_2227 tr_2228 tr_2122 ', '导出测试', 'testExport', '', '', 3, '', + '/hgexample/table/export', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2024-04-13 23:54:16', '2023-01-20 18:37:50'), + + (2223, 2122, 4, 'tr_2227 tr_2228 tr_2122 ', '删除测试', 'testDelete', '', '', 3, '', + '/hgexample/table/delete', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2024-04-13 23:54:20', '2023-01-18 15:19:43'), + + (2224, 2122, 4, 'tr_2227 tr_2228 tr_2122 ', '修改测试状态', 'testStatus', '', '', 3, '', + '/hgexample/table/status', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2024-04-13 23:54:23', '2023-01-18 15:19:43'), + + (2225, 2122, 4, 'tr_2227 tr_2228 tr_2122 ', '操作测试开关', 'testSwitch', '', '', 3, '', + '/hgexample/table/switch', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2024-04-13 23:54:26', '2023-01-18 15:19:43'), + + (2226, 2122, 4, 'tr_2227 tr_2228 tr_2122 ', '编辑测试', 'testEdit', '', '', 3, '', + '/hgexample/table/edit', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2024-04-13 23:54:30', '2023-01-18 15:19:43'), + + (2227, 0, 1, '', '插件应用', 'addons', '/addons', 'AppstoreOutlined', 1, '/addons/hgexample/hgexample_portal', + '', '', 'LAYOUT', 1, '', + 0, 2, '', 0, 0, 0, 130, + '', 1, '2023-11-13 15:16:58', '2023-02-17 13:44:27'), + + (2228, 2227, 2, 'tr_2227 ', '功能案例', 'hgexample', '/hgexample', '', 1, '', + '', '', '/hgexample', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-02-17 13:44:27'), + + (2229, 2097, 2, 'tr_2097 ', '插件管理', 'develop_addons', 'addons', '', 2, '', + '/addons/selects,/addons/list', '', '/develop/addons/index', 1, '', + 0, 0, '', 0, 0, 0, 20, + '', 1, '2023-11-13 15:16:58', '2022-09-18 21:32:46'), + + (2230, 2228, 3, 'tr_2227 tr_2228 ', '应用入口', 'hgexample_portal', 'hgexample_portal', '', 2, '', + '', '', '/addons/hgexample/portal/index', 1, '', + 0, 0, '', 0, 0, 0, 5, + '', 1, '2023-11-13 15:16:58', '2022-09-14 20:07:04'), + + (2231, 2228, 3, 'tr_2227 tr_2228 ', '插件配置', 'hgexample_config', 'hgexample_config', '', 2, '', + '/hgexample/config/get,/hgexample/config/update', '', '/addons/hgexample/config/system', 1, '', + 0, 0, '', 0, 0, 0, 8, + '', 1, '2024-04-13 23:53:06', '2022-09-14 20:07:04'), + + (2232, 2237, 3, 'tr_2093 tr_2237 ', '在线充值', 'asset_recharge', 'recharge', '', 2, '', + '/order/create,/order/option', '', '/asset/recharge/recharge', 1, '', + 0, 2, '', 0, 0, 0, 20, + '', 1, '2024-04-12 13:53:42', '2023-02-01 15:05:17'), + + (2235, 2236, 4, 'tr_2093 tr_2237 tr_2236 ', '资金变动导出', 'creditsLogExport', '', '', 3, '', + '/creditsLog/export', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2024-04-12 13:52:59', '2023-04-15 15:59:58'), + + (2236, 2237, 3, 'tr_2093 tr_2237 ', '资金变动', 'creditsLogIndex', 'creditsLogIndex', '', 2, '', + '/creditsLog/list,/creditsLog/option', '', '/asset/creditsLog/index', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2024-04-12 13:53:36', NULL), + + (2237, 2093, 2, 'tr_2093 ', '资金管理', 'asset', '/asset', '', 1, '/apply/asset/creditsLogIndex', + '', '', 'ParentLayout', 1, '', + 0, 2, '', 0, 0, 0, 20, + '', 1, '2024-04-12 13:53:54', '2023-04-18 22:16:20'), + + (2240, 2232, 4, 'tr_2093 tr_2237 tr_2232 ', '充值记录', 'asset_recharge_log', '', '', 3, '', + '/order/list', '', '', 1, '', + 0, 2, '', 0, 0, 0, 40, + '', 1, '2023-11-17 15:28:23', '2023-04-18 23:26:01'), + + (2241, 2232, 4, 'tr_2093 tr_2237 tr_2232 ', '受理退款', 'asset_recharge_accept_refund', '', '', 3, '', + '/order/acceptRefund', '', '', 1, '', + 0, 2, '', 0, 0, 0, 40, + '', 1, '2023-11-17 15:28:23', '2023-04-18 23:26:01'), + + (2242, 2232, 4, 'tr_2093 tr_2237 tr_2232 ', '申请退款', 'asset_recharge_apply_refund', '', '', 3, '', + '/order/applyRefund', '', '', 1, '', + 0, 2, '', 0, 0, 0, 40, + '', 1, '2023-11-17 15:28:23', '2023-04-18 23:26:01'), + + (2243, 2232, 4, 'tr_2093 tr_2237 tr_2232 ', '删除关闭订单', 'asset_recharge_order_delete', '', '', 3, '', + '/order/delete', '', '', 1, '', + 0, 2, '', 0, 0, 0, 40, + '', 1, '2023-11-17 15:28:23', '2023-04-18 23:26:01'), + + (2244, 2237, 3, 'tr_2093 tr_2237 ', '提现管理', 'asset_cash', '/cash', '', 2, '', + '/cash/list,/cash/apply,/config/getCash', '', '/asset/cash/index', 1, '', + 0, 0, '', 0, 0, 0, 30, + '', 1, '2024-04-12 13:53:45', '2022-11-29 12:30:00'), + + (2245, 2244, 4, 'tr_2093 tr_2237 tr_2244 ', '申请提现', 'cash_apply', '', '', 3, '', + '/cash/apply', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-17 15:28:23', '2023-04-26 21:37:56'), + + (2246, 2244, 4, 'tr_2093 tr_2237 tr_2244 ', '提现打款处理', 'cash_payment', '', '', 3, '', + '/cash/payment,/cash/view', '', '', 1, '', + 0, 2, '', 0, 0, 0, 20, + '', 1, '2023-11-17 15:28:23', '2023-04-26 21:38:25'), + + (2247, 2062, 3, 'tr_2061 tr_2062 ', '变更余额', 'org_user_add_balance', '', '', 3, '', + '/member/addBalance', '', '', 1, '', + 0, 2, '', 0, 0, 0, 40, + '', 1, '2023-11-13 15:16:58', '2023-04-27 22:31:02'), + + (2248, 2062, 3, 'tr_2061 tr_2062 ', '变更积分', 'org_user_add_integral', '', '', 3, '', + '/member/addIntegral', '', '', 1, '', + 0, 2, '', 0, 0, 0, 50, + '', 1, '2023-11-13 15:16:58', '2023-04-27 22:31:43'), + + (2249, 2062, 3, 'tr_2061 tr_2062 ', '重置登录密码', 'member_reset_pwd', '', '', 3, '', + '/member/resetPwd', '', '', 1, '', + 0, 2, '', 0, 0, 0, 60, + '', 1, '2023-11-13 15:16:58', '2023-04-27 22:50:27'), + + (2250, 2062, 3, 'tr_2061 tr_2062 ', '用户列表', 'member_list', '', '', 3, '', + '/dept/list,/post/list,/role/list,/member/list,/dept/option', '', '', 1, '', + 0, 2, '', 0, 0, 0, 0, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:06:17'), + + (2251, 2069, 3, 'tr_2068 tr_2069 ', '查看配置', 'config_get', '', '', 3, '', + '/config/get', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:18:44'), + + (2252, 2069, 3, 'tr_2068 tr_2069 ', '更新配置', 'config_update', '', '', 3, '', + '/config/update', '', '', 1, '', + 0, 2, '', 0, 0, 0, 20, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:19:14'), + + (2253, 2070, 3, 'tr_2068 tr_2070 ', '查看字典列表', 'dict_data_list', '', '', 3, '', + '/dictType/tree,/dictData/list,/config/typeSelect', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:21:47'), + + (2254, 2070, 3, 'tr_2068 tr_2070 ', '编辑字典', 'dict_data_edit', '', '', 3, '', + '/dictData/edit', '', '', 1, '', + 0, 2, '', 0, 0, 0, 20, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:22:15'), + + (2255, 2070, 3, 'tr_2068 tr_2070 ', '删除字典', 'dict_data_delete', '', '', 3, '', + '/dictData/delete', '', '', 1, '', + 0, 2, '', 0, 0, 0, 30, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:22:15'), + + (2256, 2070, 3, 'tr_2068 tr_2070 ', '编辑字典类型', 'dict_type_edit', '', '', 3, '', + '/dictType/edit', '', '', 1, '', + 0, 2, '', 0, 0, 0, 40, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:22:15'), + + (2257, 2070, 3, 'tr_2068 tr_2070 ', '删除字典类型', 'dict_type_delete', '', '', 3, '', + '/dictType/delete', '', '', 1, '', + 0, 2, '', 0, 0, 0, 60, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:22:15'), + + (2258, 2071, 3, 'tr_2068 tr_2071 ', '任务列表', '/cron/list', '', '', 3, '', + '/cron/list', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:25:46'), + + (2259, 2071, 3, 'tr_2068 tr_2071 ', '任务分组列表', '/cronGroup/list', '', '', 3, '', + '/cronGroup/select,/cronGroup/list', '', '', 1, '', + 0, 2, '', 0, 0, 0, 20, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:26:40'), + + (2260, 2071, 3, 'tr_2068 tr_2071 ', '编辑任务', '/cron/edit', '', '', 3, '', + '/cron/edit', '', '', 1, '', + 0, 2, '', 0, 0, 0, 30, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:27:07'), + + (2261, 2071, 3, 'tr_2068 tr_2071 ', '删除任务', '/cron/delete', '', '', 3, '', + '/cron/delete', '', '', 1, '', + 0, 2, '', 0, 0, 0, 40, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:27:59'), + + (2262, 2071, 3, 'tr_2068 tr_2071 ', '修改任务状态', '/cron/status', '', '', 3, '', + '/cron/status', '', '', 1, '', + 0, 2, '', 0, 0, 0, 60, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:28:16'), + + (2263, 2071, 3, 'tr_2068 tr_2071 ', '在线执行', '/cron/onlineExec', '', '', 3, '', + '/cron/onlineExec', '', '', 1, '', + 0, 2, '', 0, 0, 0, 70, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:28:32'), + + (2264, 2071, 3, 'tr_2068 tr_2071 ', '编辑任务分组', '/cronGroup/edit', '', '', 3, '', + '/cronGroup/edit', '', '', 1, '', + 0, 2, '', 0, 0, 0, 80, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:28:55'), + + (2265, 2071, 3, 'tr_2068 tr_2071 ', '删除任务分组', '/cronGroup/delete', '', '', 3, '', + '/cronGroup/delete', '', '', 1, '', + 0, 2, '', 0, 0, 0, 90, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:29:14'), + + (2266, 2072, 3, 'tr_2068 tr_2072 ', '黑名单列表', '/blacklist/list', '', '', 3, '', + '/blacklist/list', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:29:59'), + + (2267, 2072, 3, 'tr_2068 tr_2072 ', '编辑黑名单策略', '/blacklist/edit', '', '', 3, '', + '/blacklist/edit', '', '', 1, '', + 0, 2, '', 0, 0, 0, 20, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:30:25'), + + (2268, 2072, 3, 'tr_2068 tr_2072 ', '修改策略状态', '/blacklist/status', '', '', 3, '', + '/blacklist/status', '', '', 1, '', + 0, 2, '', 0, 0, 0, 30, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:31:07'), + + (2269, 2072, 3, 'tr_2068 tr_2072 ', '删除策略', '/blacklist/delete', '', '', 3, '', + '/blacklist/delete', '', '', 1, '', + 0, 2, '', 0, 0, 0, 40, + '', 1, '2023-11-13 15:16:58', '2023-04-27 23:31:21'), + + (2270, 2073, 4, 'tr_2093 tr_2219 tr_2073 ', '修改登录密码', '/member/updatePwd', '', '', 3, '', + '/member/updatePwd', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-17 15:27:49', '2023-04-28 16:40:34'), + + (2271, 2073, 4, 'tr_2093 tr_2219 tr_2073 ', '换绑手机号', '/member/updateMobile', '', '', 3, '', + '/member/updateMobile', '', '', 1, '', + 0, 2, '', 0, 0, 0, 20, + '', 1, '2023-11-17 15:27:49', '2023-04-28 16:40:52'), + + (2272, 2073, 4, 'tr_2093 tr_2219 tr_2073 ', '换绑邮箱', '/member/updateEmail', '', '', 3, '', + '/member/updateEmail', '', '', 1, '', + 0, 2, '', 0, 0, 0, 30, + '', 1, '2023-11-17 15:27:49', '2023-04-28 16:41:11'), + + (2273, 2090, 2, 'tr_2090 ', '在线服务', 'monitor_netconn', 'netconn', '', 1, '', + '', '', '/monitor/netconn/index', 1, '', + 0, 0, '', 0, 0, 0, 20, + '', 1, '2023-11-13 15:16:58', '2022-09-18 21:23:36'), + + (2275, 2273, 3, 'tr_2090 tr_2273 ', '服务许可证列表', 'serveLicenseIndex', 'serveLicenseIndex', '', 3, '', + '/serveLicense/list', '', '/serveLicense/index', 1, 'monitor_netconn', + 0, 0, '', 0, 1, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-07-15 09:36:38'), + + (2277, 2275, 4, 'tr_2090 tr_2273 tr_2275 ', '编辑/新增服务许可证', 'serveLicenseEdit', '', '', 3, '', + '/serveLicense/edit', '', '', 1, '', + 0, 0, '', 0, 1, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-07-15 09:36:38'), + + (2278, 2275, 4, 'tr_2090 tr_2273 tr_2275 ', '删除服务许可证', 'serveLicenseDelete', '', '', 3, '', + '/serveLicense/delete', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-07-15 09:36:38'), + + (2279, 2275, 4, 'tr_2090 tr_2273 tr_2275 ', '修改服务许可证状态', 'serveLicenseStatus', '', '', 3, '', + '/serveLicense/status', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-07-15 09:36:38'), + + (2280, 2275, 4, 'tr_2090 tr_2273 tr_2275 ', '导出服务许可证', 'serveLicenseExport', '', '', 3, '', + '/serveLicense/export', '', '', 1, '', + 0, 0, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-07-15 09:36:38'), + + (2281, 2275, 4, 'tr_2090 tr_2273 tr_2275 ', '分配许可证路由', 'serveLicenseAssignRouter', '', '', 3, '', + '/serveLicense/assignRouter', '', '', 1, '', + 0, 0, '', 0, 1, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-07-15 09:36:38'), + + (2282, 2073, 4, 'tr_2093 tr_2219 tr_2073 ', '更新基本设置', 'memberUpdateProfile', '', '', 3, '', + '/member/updateProfile', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-17 15:27:49', '2023-08-02 14:52:48'), + + (2283, 2073, 4, 'tr_2093 tr_2219 tr_2073 ', '更新提现设置', 'memberUpdateCash', '', '', 3, '', + '/member/updateCash', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-17 15:27:49', '2023-08-02 14:53:34'), + + (2292, 2067, 3, 'tr_2065 tr_2067 ', '更新菜单权限', 'updatePermissions', '', '', 3, '', + '/role/updatePermissions', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 14:45:56'), + + (2293, 2067, 3, 'tr_2065 tr_2067 ', '更新数据权限', 'dataScopeEdit', '', '', 3, '', + '/role/dataScope/edit', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 14:51:29'), + + (2294, 2067, 3, 'tr_2065 tr_2067 ', '添加/编辑角色', 'roleEdit', '', '', 3, '', + '/role/edit', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 14:52:08'), + + (2295, 2067, 3, 'tr_2065 tr_2067 ', '删除角色', 'roleDelete', '', '', 3, '', + '/role/delete', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 14:52:34'), + + (2296, 2066, 3, 'tr_2065 tr_2066 ', '添加/编辑菜单', 'menuEdit', '', '', 3, '', + '/menu/edit', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 14:53:24'), + + (2297, 2066, 3, 'tr_2065 tr_2066 ', '删除菜单', 'menuDelete', '', '', 3, '', + '/menu/delete', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 14:53:52'), + + (2298, 2075, 4, 'tr_2093 tr_2074 tr_2075 ', '删除全局日志', 'logDelete', '', '', 3, '', + '/log/delete', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-17 15:27:32', '2023-08-11 14:54:37'), + + (2299, 2084, 4, 'tr_2093 tr_2074 tr_2084 ', '删除短信记录', 'smsLogDelete', '', '', 3, '', + '/smsLog/delete', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-17 15:27:32', '2023-08-11 14:56:47'), + + (2300, 2091, 3, 'tr_2090 tr_2091 ', '强制退出用户', 'monitorUserOffline', '', '', 3, '', + '/monitor/userOffline', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 14:57:52'), + + (2301, 2096, 3, 'tr_2093 tr_2096 ', '添加/编辑省市区', 'provincesEdit', '', '', 3, '', + '/provinces/edit', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 15:00:13'), + + (2302, 2096, 3, 'tr_2093 tr_2096 ', '删除省市区', 'provincesDelete', '', '', 3, '', + '/provinces/delete', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 15:00:45'), + + (2305, 2098, 3, 'tr_2097 tr_2098 ', '查看生成配置', 'genCodesView', '', '', 3, '', + '/genCodes/view', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 15:21:28'), + + (2306, 2098, 3, 'tr_2097 tr_2098 ', '预览代码', 'genCodesPreview', '', '', 3, '', + '/genCodes/preview', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 15:22:18'), + + (2307, 2098, 3, 'tr_2097 tr_2098 ', '提交生成', 'genCodesBuild', '', '', 3, '', + '/genCodes/build', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 15:22:48'), + + (2308, 2098, 3, 'tr_2097 tr_2098 ', '保存生成配置', 'genCodesEdit', '', '', 3, '', + '/genCodes/edit', '', '', 1, '', + 0, 2, '', 0, 0, 0, 10, + '', 1, '2023-11-13 15:16:58', '2023-08-11 15:23:16'), + (2309, 2229, 3, 'tr_2097 tr_2229 ', '更新插件配置', 'addonsUpgrade', '', '', 3, '', '/addons/upgrade', '', '', 1, '', 0, 2, '', 0, 0, 0, 10, '', 1, '2023-11-13 15:16:58', '2023-08-11 15:24:11'), + (2310, 2229, 3, 'tr_2097 tr_2229 ', '卸载插件', 'addonsUninstall', '', '', 3, '', '/addons/uninstall', '', '', 1, '', 0, 2, '', 0, 0, 0, 10, '', 1, '2023-11-13 15:16:58', '2023-08-11 15:24:32'), + (2319, 2228, 3, 'tr_2227 tr_2228 ', '树表例子', '/addons/hgexample/table/tree', '/addons/hgexample/table/tree', '', 2, '', '/hgexample/table/tree,/hgexample/treeTable/select', '', '/addons/hgexample/treeTable/index', 1, '', 0, 2, '', 0, 0, 0, 15, '', 1, '2024-04-13 23:55:01', '2023-11-13 16:46:58'), + (2338, 2228, 3, 'tr_2227 tr_2228 ', '组件示例', 'hgexample_comp', 'hgexample_comp', '', 2, '', '/hgexample/comp/importExcel', '', '/addons/hgexample/comp/index', 1, '', 0, 0, '', 0, 0, 0, 1000, '', 1, '2024-04-13 23:55:45', '2022-09-14 20:07:04'), + (2366, 2097, 2, 'tr_2097 ', '生成演示', 'generateDemo', 'generateDemo', '', 2, '', '', '', 'ParentLayout', 1, '', 0, 2, '', 0, 0, 0, 1000, '', 1, '2024-04-08 10:10:51', '2024-04-08 10:10:51'), + (2367, 2366, 3, 'tr_2097 tr_2366 ', 'CURD列表', 'curdDemo', '/curdDemo', '', 1, '/develop/generateDemo/curdDemo/index', '', '', 'ParentLayout', 1, '', 0, 0, '', 0, 0, 0, 10, '', 1, '2024-04-08 10:13:26', '2024-04-08 10:13:26'), + (2368, 2367, 4, 'tr_2097 tr_2366 tr_2367 ', 'CUDR列表列表', 'curdDemoIndex', 'index', '', 2, '', '/curdDemo/list', '', '/curdDemo/index', 1, 'curdDemo', 0, 0, '', 0, 1, 0, 10, '', 1, '2024-04-08 10:13:26', '2024-04-08 10:13:26'), + (2369, 2368, 5, 'tr_2097 tr_2366 tr_2367 tr_2368 ', 'CUDR列表详情', 'curdDemoView', '', '', 3, '', '/curdDemo/view', '', '', 1, '', 0, 0, '', 0, 1, 0, 10, '', 1, '2024-04-08 10:13:26', '2024-04-08 10:13:26'), + (2370, 2368, 5, 'tr_2097 tr_2366 tr_2367 tr_2368 ', '编辑/新增CUDR列表', 'curdDemoEdit', '', '', 3, '', '/curdDemo/edit', '', '', 1, '', 0, 0, '', 0, 1, 0, 20, '', 1, '2024-04-08 10:13:26', '2024-04-08 10:13:26'), + (2371, 2370, 6, 'tr_2097 tr_2366 tr_2367 tr_2368 tr_2370 ', '获取CUDR列表最大排序', 'curdDemoMaxSort', '', '', 3, '', '/curdDemo/maxSort', '', '', 1, '', 0, 0, '', 0, 0, 0, 30, '', 1, '2024-04-08 10:13:26', '2024-04-08 10:13:26'), + (2372, 2368, 5, 'tr_2097 tr_2366 tr_2367 tr_2368 ', '删除CUDR列表', 'curdDemoDelete', '', '', 3, '', '/curdDemo/delete', '', '', 1, '', 0, 0, '', 0, 0, 0, 40, '', 1, '2024-04-08 10:13:26', '2024-04-08 10:13:26'), + (2373, 2368, 5, 'tr_2097 tr_2366 tr_2367 tr_2368 ', '修改CUDR列表状态', 'curdDemoStatus', '', '', 3, '', '/curdDemo/status', '', '', 1, '', 0, 0, '', 0, 0, 0, 50, '', 1, '2024-04-08 10:13:26', '2024-04-08 10:13:26'), + (2374, 2368, 5, 'tr_2097 tr_2366 tr_2367 tr_2368 ', '操作CUDR列表开关', 'curdDemoSwitch', '', '', 3, '', '/curdDemo/switch', '', '', 1, '', 0, 0, '', 0, 0, 0, 60, '', 1, '2024-04-08 10:13:26', '2024-04-08 10:13:26'), + (2375, 2368, 5, 'tr_2097 tr_2366 tr_2367 tr_2368 ', '导出CUDR列表', 'curdDemoExport', '', '', 3, '', '/curdDemo/export', '', '', 1, '', 0, 0, '', 0, 0, 0, 70, '', 1, '2024-04-08 10:13:26', '2024-04-08 10:13:26'), + (2376, 2366, 3, 'tr_2097 tr_2366 ', '测试分类', 'testCategory', '/testCategory', '', 1, '/develop/generateDemo/testCategory/index', '', '', 'ParentLayout', 1, '', 0, 0, '', 0, 0, 0, 1000, '', 1, '2024-04-08 23:26:32', '2024-04-08 23:26:32'), + (2377, 2376, 4, 'tr_2097 tr_2366 tr_2376 ', '测试分类列表', 'testCategoryIndex', 'index', '', 2, '', '/testCategory/list', '', '/testCategory/index', 1, 'testCategory', 0, 0, '', 0, 1, 0, 10, '', 1, '2024-04-08 23:26:32', '2024-04-08 23:26:32'), + (2378, 2377, 5, 'tr_2097 tr_2366 tr_2376 tr_2377 ', '测试分类详情', 'testCategoryView', '', '', 3, '', '/testCategory/view', '', '', 1, '', 0, 0, '', 0, 1, 0, 10, '', 1, '2024-04-08 23:26:32', '2024-04-08 23:26:32'), + (2379, 2377, 5, 'tr_2097 tr_2366 tr_2376 tr_2377 ', '编辑/新增测试分类', 'testCategoryEdit', '', '', 3, '', '/testCategory/edit', '', '', 1, '', 0, 0, '', 0, 1, 0, 20, '', 1, '2024-04-08 23:26:32', '2024-04-08 23:26:32'), + (2380, 2379, 6, 'tr_2097 tr_2366 tr_2376 tr_2377 tr_2379 ', '获取测试分类最大排序', 'testCategoryMaxSort', '', '', 3, '', '/testCategory/maxSort', '', '', 1, '', 0, 0, '', 0, 0, 0, 30, '', 1, '2024-04-08 23:26:32', '2024-04-08 23:26:32'), + (2381, 2377, 5, 'tr_2097 tr_2366 tr_2376 tr_2377 ', '删除测试分类', 'testCategoryDelete', '', '', 3, '', '/testCategory/delete', '', '', 1, '', 0, 0, '', 0, 0, 0, 40, '', 1, '2024-04-08 23:26:32', '2024-04-08 23:26:32'), + (2382, 2377, 5, 'tr_2097 tr_2366 tr_2376 tr_2377 ', '修改测试分类状态', 'testCategoryStatus', '', '', 3, '', '/testCategory/status', '', '', 1, '', 0, 0, '', 0, 0, 0, 40, '', 1, '2024-04-08 23:26:32', '2024-04-08 23:26:32'), + (2383, 2366, 3, 'tr_2097 tr_2366 ', '普通树表', 'normalTreeDemo', '/normalTreeDemo', '', 1, '/develop/generateDemo/normalTreeDemo/index', '', '', 'ParentLayout', 1, '', 0, 0, '', 0, 0, 0, 200, '', 1, '2024-04-09 17:05:13', '2024-04-09 17:05:13'), + (2384, 2383, 4, 'tr_2097 tr_2366 tr_2383 ', '普通树表列表', 'normalTreeDemoIndex', 'index', '', 2, '', '/normalTreeDemo/list', '', '/normalTreeDemo/index', 1, 'normalTreeDemo', 0, 0, '', 0, 1, 0, 10, '', 1, '2024-04-09 17:05:13', '2024-04-09 17:05:13'), + (2385, 2384, 5, 'tr_2097 tr_2366 tr_2383 tr_2384 ', '普通树表详情', 'normalTreeDemoView', '', '', 3, '', '/normalTreeDemo/view', '', '', 1, '', 0, 0, '', 0, 1, 0, 10, '', 1, '2024-04-09 17:05:13', '2024-04-09 17:05:13'), + (2386, 2384, 5, 'tr_2097 tr_2366 tr_2383 tr_2384 ', '编辑/新增普通树表', 'normalTreeDemoEdit', '', '', 3, '', '/normalTreeDemo/edit', '', '', 1, '', 0, 0, '', 0, 1, 0, 20, '', 1, '2024-04-09 17:05:13', '2024-04-09 17:05:13'), + (2387, 2386, 6, 'tr_2097 tr_2366 tr_2383 tr_2384 tr_2386 ', '获取普通树表最大排序', 'normalTreeDemoMaxSort', '', '', 3, '', '/normalTreeDemo/maxSort', '', '', 1, '', 0, 0, '', 0, 0, 0, 30, '', 1, '2024-04-09 17:05:13', '2024-04-09 17:05:13'), + (2388, 2384, 5, 'tr_2097 tr_2366 tr_2383 tr_2384 ', '删除普通树表', 'normalTreeDemoDelete', '', '', 3, '', '/normalTreeDemo/delete', '', '', 1, '', 0, 0, '', 0, 0, 0, 40, '', 1, '2024-04-09 17:05:13', '2024-04-09 17:05:13'), + (2389, 2384, 5, 'tr_2097 tr_2366 tr_2383 tr_2384 ', '修改普通树表状态', 'normalTreeDemoStatus', '', '', 3, '', '/normalTreeDemo/status', '', '', 1, '', 0, 0, '', 0, 0, 0, 50, '', 1, '2024-04-09 17:05:13', '2024-04-09 17:05:13'), + (2390, 2384, 5, 'tr_2097 tr_2366 tr_2383 tr_2384 ', '导出普通树表', 'normalTreeDemoExport', '', '', 3, '', '/normalTreeDemo/export', '', '', 1, '', 0, 0, '', 0, 0, 0, 70, '', 1, '2024-04-09 17:05:13', '2024-04-09 17:05:13'), + (2391, 2384, 5, 'tr_2097 tr_2366 tr_2383 tr_2384 ', '获取普通树表关系树选项', 'normalTreeDemoTreeOption', '', '', 3, '', '/normalTreeDemo/treeOption', '', '', 1, '', 0, 0, '', 0, 0, 0, 70, '', 1, '2024-04-09 17:05:13', '2024-04-09 17:05:13'), + (2401, 2366, 3, 'tr_2097 tr_2366 ', '选项树表', 'optionTreeDemo', '/optionTreeDemo', '', 1, '/develop/generateDemo/optionTreeDemo/index', '', '', 'ParentLayout', 1, '', 0, 0, '', 0, 0, 0, 300, '', 1, '2024-04-09 17:22:29', '2024-04-09 17:22:29'), + (2402, 2401, 4, 'tr_2097 tr_2366 tr_2401 ', '选项树表列表', 'optionTreeDemoIndex', 'index', '', 2, '', '/optionTreeDemo/list', '', '/optionTreeDemo/index', 1, 'optionTreeDemo', 0, 0, '', 0, 1, 0, 10, '', 1, '2024-04-09 17:22:29', '2024-04-09 17:22:29'), + (2403, 2402, 5, 'tr_2097 tr_2366 tr_2401 tr_2402 ', '选项树表详情', 'optionTreeDemoView', '', '', 3, '', '/optionTreeDemo/view', '', '', 1, '', 0, 0, '', 0, 1, 0, 10, '', 1, '2024-04-09 17:22:29', '2024-04-09 17:22:29'), + (2404, 2402, 5, 'tr_2097 tr_2366 tr_2401 tr_2402 ', '编辑/新增选项树表', 'optionTreeDemoEdit', '', '', 3, '', '/optionTreeDemo/edit', '', '', 1, '', 0, 0, '', 0, 1, 0, 20, '', 1, '2024-04-09 17:22:29', '2024-04-09 17:22:29'), + (2405, 2404, 6, 'tr_2097 tr_2366 tr_2401 tr_2402 tr_2404 ', '获取选项树表最大排序', 'optionTreeDemoMaxSort', '', '', 3, '', '/optionTreeDemo/maxSort', '', '', 1, '', 0, 0, '', 0, 0, 0, 30, '', 1, '2024-04-09 17:22:29', '2024-04-09 17:22:29'), + (2406, 2402, 5, 'tr_2097 tr_2366 tr_2401 tr_2402 ', '删除选项树表', 'optionTreeDemoDelete', '', '', 3, '', '/optionTreeDemo/delete', '', '', 1, '', 0, 0, '', 0, 0, 0, 40, '', 1, '2024-04-09 17:22:29', '2024-04-09 17:22:29'), + (2407, 2402, 5, 'tr_2097 tr_2366 tr_2401 tr_2402 ', '修改选项树表状态', 'optionTreeDemoStatus', '', '', 3, '', '/optionTreeDemo/status', '', '', 1, '', 0, 0, '', 0, 0, 0, 50, '', 1, '2024-04-09 17:22:29', '2024-04-09 17:22:29'), + (2408, 2402, 5, 'tr_2097 tr_2366 tr_2401 tr_2402 ', '导出选项树表', 'optionTreeDemoExport', '', '', 3, '', '/optionTreeDemo/export', '', '', 1, '', 0, 0, '', 0, 0, 0, 70, '', 1, '2024-04-09 17:22:29', '2024-04-09 17:22:29'), + (2409, 2402, 5, 'tr_2097 tr_2366 tr_2401 tr_2402 ', '获取选项树表关系树选项', 'optionTreeDemoTreeOption', '', '', 3, '', '/optionTreeDemo/treeOption', '', '', 1, '', 0, 0, '', 0, 0, 0, 70, '', 1, '2024-04-09 17:22:29', '2024-04-09 17:22:29'), + (2417, 2228, 3, 'tr_2227 tr_2228 ', '多租户功能演示', 'tenantOrder', '/tenantOrder', '', 1, '/addons/hgexample/tenantOrder/index', '', '', 'ParentLayout', 1, '', 0, 0, '', 0, 0, 0, 200, '', 1, '2024-04-13 23:37:30', '2024-04-13 23:37:30'), + (2418, 2417, 4, 'tr_2227 tr_2228 tr_2417 ', '多租户功能演示列表', 'tenantOrderIndex', 'index', '', 2, '', '/hgexample/tenantOrder/list', '', '/addons/hgexample/tenantOrder/index', 1, 'tenantOrder', 0, 0, '', 0, 1, 0, 10, '', 1, '2024-04-13 23:37:30', '2024-04-13 23:37:30'), + (2419, 2418, 5, 'tr_2227 tr_2228 tr_2417 tr_2418 ', '多租户功能演示详情', 'tenantOrderView', '', '', 3, '', '/hgexample/tenantOrder/view', '', '', 1, '', 0, 0, '', 0, 1, 0, 10, '', 1, '2024-04-13 23:37:30', '2024-04-13 23:37:30'), + (2420, 2418, 5, 'tr_2227 tr_2228 tr_2417 tr_2418 ', '编辑/新增多租户功能演示', 'tenantOrderEdit', '', '', 3, '', '/hgexample/tenantOrder/edit', '', '', 1, '', 0, 0, '', 0, 1, 0, 20, '', 1, '2024-04-13 23:37:30', '2024-04-13 23:37:30'), + (2421, 2418, 5, 'tr_2227 tr_2228 tr_2417 tr_2418 ', '删除多租户功能演示', 'tenantOrderDelete', '', '', 3, '', '/hgexample/tenantOrder/delete', '', '', 1, '', 0, 0, '', 0, 0, 0, 40, '', 1, '2024-04-13 23:37:30', '2024-04-13 23:37:30'), + (2422, 2418, 5, 'tr_2227 tr_2228 tr_2417 tr_2418 ', '导出多租户功能演示', 'tenantOrderExport', '', '', 3, '', '/hgexample/tenantOrder/export', '', '', 1, '', 0, 0, '', 0, 0, 0, 70, '', 1, '2024-04-13 23:37:30', '2024-04-13 23:37:30'); + +-- -------------------------------------------------------- + +-- 插入 hg_admin_notice 表数据 +INSERT INTO hg_admin_notice ( + id, title, type, tag, content, receiver, remark, sort, status, + created_by, updated_by, created_at, updated_at, deleted_at +) VALUES + (29, '2023年春季学期开学工作通知!', 1, 1, + '1.学生:2月11日、2月12日报到,2月13日起安排考试。\n\n2.教职工:2月10日(周五)起正式上班(2月11日、2月12日正常上班)。\n\n3.校内进行的各类社会服务项目,主办部门、单位须关注参与人员的健康状况,如有异常第一时间报告。感染后仍在康复期内的师生,不参加剧烈活动。开学后两周内,原则上不组织各类竞技性较强的体育比赛等活动。\n\n4.全校师生员工要牢固树立健康第一的观念,切实增强个人责任感和防护意识,掌握防护技能,坚持戴口罩、勤洗手等良好卫生习惯,加强身体锻炼,保持健康生活方式,提升健康素养和自我防护能力,当好自身健康第一责任人。符合条件的师生,积极有序接种第二剂次加强针疫苗。', + NULL, '', 10, 1, 1, 1, '2023-02-09 12:25:39', '2023-02-09 12:48:08', NULL), + + (30, '国务院办公厅关于2023年部分节假日安排的通知', 1, 3, + '新华社北京12月8日电 国务院办公厅关于2023年部分节假日安排的通知,全文如下:\n\n  各省、自治区、直辖市人民政府,国务院\n\n  各部委、各直属机构:\n\n  经国务院批准,现将2023年元旦、春节、清明节、劳动节、端午节、中秋节和国庆节放假调休日期的具体安排通知如下。\n\n  一、元旦:2022年12月31日至2023年1月2日放假调休,共3天。\n\n  二、春节:1月21日至27日放假调休,共7天。1月28日(星期六)、1月29日(星期日)上班。\n\n  三、清明节:4月5日放假,共1天。\n\n  四、劳动节:4月29日至5月3日放假调休,共5天。4月23日(星期日)、5月6日(星期六)上班。\n\n  五、端午节:6月22日至24日放假调休,共3天。6月25日(星期日)上班。\n\n  六、中秋节、国庆节:9月29日至10月6日放假调休,共8天。10月7日(星期六)、10月8日(星期日)上班。\n\n  节假日期间,各地区、各部门要妥善安排好值班和安全、保卫、疫情防控等工作,遇有重大突发事件,要按规定及时报告并妥善处置,确保人民群众祥和平安度过节日假期。', + NULL, '', 20, 1, 1, 1, '2023-02-09 12:32:32', '2023-02-09 12:48:28', NULL), + + (31, 'hotgo新版本发布啦!', 2, 4, + '


本次更新内容如下:

1. 优化角色权限

2. 优化代码生成

3. ....

', + NULL, '', 30, 1, 1, 0, '2023-02-09 12:45:17', '2023-02-09 12:45:17', '2023-06-09 18:04:30'), + + (32, '新的好友', 3, 5, + '

哈喽,你好呀!

', + '[1, 3, 8]', '', 40, 1, 1, 3, '2023-02-09 12:45:54', '2023-08-11 15:19:04', NULL); + +-- +-- 转存表中的数据 `hg_admin_notice_read` +-- + +INSERT INTO hg_admin_notice_read (id, notice_id, member_id, clicks, updated_at, created_at) VALUES + (1, 31, 1, 2, '2023-04-26 22:44:51', '2023-04-25 22:59:16'), + (2, 30, 1, 23, '2024-07-21 10:34:04', '2023-04-25 23:01:27'), + (3, 32, 3, 0, '2023-04-28 16:48:41', '2023-04-28 16:48:41'), + (4, 29, 3, 4, '2023-08-11 14:42:22', '2023-04-28 16:48:47'), + (5, 30, 3, 3, '2023-08-11 15:24:45', '2023-04-28 16:48:47'), + (6, 29, 1, 1, '2023-08-11 16:07:58', '2023-06-09 20:26:43'), + (7, 29, 11, 7, '2023-08-02 14:54:26', '2023-08-02 14:54:16'), + (8, 30, 8, 0, '2023-08-02 14:59:21', '2023-08-02 14:59:21'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_admin_post` +-- + +INSERT INTO hg_admin_post (id, code, name, remark, sort, status, created_at, updated_at) VALUES + (1, 'ceo', '董事长', '', 1, 1, '2022-01-04 17:54:52', '2023-07-06 15:17:48'), + (2, 'se', '项目经理', '', 2, 1, '2022-01-04 17:54:52', '2023-01-18 00:00:00'), + (3, 'hr', '人力资源', '', 3, 1, '2022-01-04 17:54:52', '2023-02-26 00:32:40'), + (4, 'user', '普通员工', '', 4, 1, '2022-01-04 17:54:52', '2022-05-15 22:33:09'), + (6, 'test', '测试', '测试..', 5, 1, '2022-08-14 11:41:22', '2023-04-27 23:17:27'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_admin_role` +-- + +INSERT INTO hg_admin_role (id, name, key, data_scope, custom_dept, pid, level, tree, remark, sort, status, created_at, updated_at) VALUES + (1, '超级管理员', 'super', 1, '[]', 0, 1, NULL, '超级管理员,拥有全部权限', 100, 1, '2022-01-04 17:54:52', '2023-01-12 00:00:00'), + (2, '管理员', 'manage', 3, '[]', 1, 2, 'tr_1 ', '普通管理员,拥有常规的后台管理权限', 200, 1, '2022-01-04 17:54:52', '2023-04-27 00:00:00'), + (200, '租户', 'tenant', 7, '[]', 2, 3, 'tr_1 tr_2 ', '多租户系统中顶层实体客户、组织或实体', 1000, 1, '2023-01-12 00:00:00', '2023-08-11 15:55:46'), + (206, '财务部', 'finance', 2, '[]', 2, 3, 'tr_1 tr_2 ', '', 300, 1, '2023-01-24 20:22:10', '2023-08-11 15:55:46'), + (207, '商务部', 'business', 2, '[]', 2, 3, 'tr_1 tr_2 ', '', 400, 1, '2023-01-24 20:23:27', '2023-08-11 15:55:46'), + (208, '技术部', 'science', 2, '[]', 2, 3, 'tr_1 tr_2 ', '', 500, 1, '2023-01-24 20:23:54', '2023-08-11 15:55:46'), + (209, '商家', 'merchant', 7, '[]', 200, 4, 'tr_1 tr_2 tr_200 ', '租户内部实体,可独立经营但受租户的监管和管理', 2000, 1, '2024-04-12 10:14:21', '2024-04-13 22:24:31'), + (210, '用户', 'user', 5, '[]', 209, 5, 'tr_1 tr_2 tr_200 tr_209 ', '真正使用系统产品的终端用户', 10, 1, '2024-04-12 10:18:45', '2024-04-13 22:24:40'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_admin_role_menu` +-- + +INSERT INTO hg_admin_role_menu (role_id, menu_id) VALUES + (1, 2051), + (1, 2052), + (1, 2053), + (2, 2047), + (2, 2048), + (2, 2049), + (2, 2050), + (2, 2061), + (2, 2062), + (2, 2063), + (2, 2064), + (2, 2065), + (2, 2066), + (2, 2067), + (2, 2068), + (2, 2069), + (2, 2070), + (2, 2071), + (2, 2072), + (2, 2073), + (2, 2074), + (2, 2075), + (2, 2076), + (2, 2077), + (2, 2078), + (2, 2082), + (2, 2083), + (2, 2084), + (2, 2085), + (2, 2086), + (2, 2087), + (2, 2088), + (2, 2089), + (2, 2090), + (2, 2091), + (2, 2092), + (2, 2093), + (2, 2094), + (2, 2095), + (2, 2096), + (2, 2099), + (2, 2100), + (2, 2101), + (2, 2102), + (2, 2103), + (2, 2109), + (2, 2110), + (2, 2111), + (2, 2112), + (2, 2113), + (2, 2114), + (2, 2115), + (2, 2116), + (2, 2117), + (2, 2118), + (2, 2120), + (2, 2121), + (2, 2122), + (2, 2124), + (2, 2198), + (2, 2199), + (2, 2200), + (2, 2201), + (2, 2202), + (2, 2203), + (2, 2204), + (2, 2205), + (2, 2206), + (2, 2207), + (2, 2208), + (2, 2209), + (2, 2210), + (2, 2211), + (2, 2212), + (2, 2213), + (2, 2214), + (2, 2215), + (2, 2216), + (2, 2217), + (2, 2218), + (2, 2219), + (2, 2220), + (2, 2221), + (2, 2222), + (2, 2223), + (2, 2224), + (2, 2225), + (2, 2226), + (2, 2227), + (2, 2228), + (2, 2230), + (2, 2231), + (2, 2232), + (2, 2235), + (2, 2236), + (2, 2237), + (2, 2240), + (2, 2241), + (2, 2242), + (2, 2243), + (2, 2244), + (2, 2245), + (2, 2246), + (2, 2247), + (2, 2248), + (2, 2249), + (2, 2250), + (2, 2251), + (2, 2252), + (2, 2253), + (2, 2254), + (2, 2255), + (2, 2256), + (2, 2257), + (2, 2258), + (2, 2259), + (2, 2260), + (2, 2261), + (2, 2262), + (2, 2263), + (2, 2264), + (2, 2265), + (2, 2266), + (2, 2267), + (2, 2268), + (2, 2269), + (2, 2270), + (2, 2271), + (2, 2272), + (2, 2273), + (2, 2275), + (2, 2277), + (2, 2278), + (2, 2279), + (2, 2280), + (2, 2281), + (2, 2282), + (2, 2283), + (2, 2292), + (2, 2293), + (2, 2294), + (2, 2295), + (2, 2296), + (2, 2297), + (2, 2298), + (2, 2299), + (2, 2300), + (2, 2301), + (2, 2302), + (2, 2319), + (2, 2338), + (2, 2417), + (2, 2418), + (2, 2419), + (2, 2420), + (2, 2421), + (2, 2422), + (100, 2047), + (100, 2048), + (100, 2049), + (100, 2050), + (100, 2061), + (100, 2062), + (100, 2063), + (100, 2064), + (100, 2068), + (100, 2069), + (100, 2070), + (100, 2071), + (100, 2072), + (100, 2073), + (100, 2109), + (100, 2110), + (100, 2111), + (100, 2112), + (100, 2113), + (100, 2114), + (100, 2115), + (100, 2116), + (100, 2117), + (100, 2121), + (100, 2122), + (100, 2124), + (200, 2047), + (200, 2048), + (200, 2050), + (200, 2073), + (200, 2074), + (200, 2075), + (200, 2076), + (200, 2077), + (200, 2082), + (200, 2083), + (200, 2093), + (200, 2095), + (200, 2099), + (200, 2100), + (200, 2102), + (200, 2103), + (200, 2118), + (200, 2120), + (200, 2122), + (200, 2124), + (200, 2207), + (200, 2208), + (200, 2219), + (200, 2220), + (200, 2221), + (200, 2222), + (200, 2223), + (200, 2224), + (200, 2225), + (200, 2226), + (200, 2227), + (200, 2228), + (200, 2230), + (200, 2231), + (200, 2232), + (200, 2235), + (200, 2236), + (200, 2237), + (200, 2240), + (200, 2241), + (200, 2242), + (200, 2243), + (200, 2244), + (200, 2245), + (200, 2270), + (200, 2271), + (200, 2272), + (200, 2282), + (200, 2283), + (200, 2298), + (200, 2319), + (200, 2338), + (200, 2417), + (200, 2418), + (200, 2419), + (200, 2420), + (200, 2421), + (200, 2422), + (201, 2047), + (201, 2048), + (201, 2050), + (201, 2073), + (201, 2074), + (201, 2075), + (201, 2076), + (201, 2077), + (201, 2082), + (201, 2083), + (201, 2093), + (201, 2095), + (201, 2099), + (201, 2100), + (201, 2102), + (201, 2103), + (201, 2118), + (201, 2120), + (201, 2207), + (201, 2208), + (201, 2219), + (201, 2220), + (201, 2232), + (201, 2235), + (201, 2236), + (201, 2237), + (201, 2240), + (201, 2241), + (201, 2242), + (201, 2243), + (201, 2244), + (201, 2245), + (201, 2270), + (201, 2271), + (201, 2272), + (201, 2282), + (201, 2283), + (201, 2298), + (202, 2047), + (202, 2048), + (202, 2049), + (202, 2050), + (202, 2073), + (202, 2074), + (202, 2075), + (202, 2076), + (202, 2077), + (202, 2082), + (202, 2083), + (202, 2099), + (202, 2100), + (202, 2102), + (202, 2103), + (202, 2120), + (202, 2207), + (202, 2208), + (202, 2219), + (202, 2220), + (202, 2270), + (202, 2271), + (202, 2272), + (202, 2282), + (202, 2283), + (206, 2047), + (206, 2048), + (206, 2049), + (206, 2050), + (206, 2061), + (206, 2062), + (206, 2063), + (206, 2064), + (206, 2065), + (206, 2066), + (206, 2067), + (206, 2068), + (206, 2069), + (206, 2070), + (206, 2071), + (206, 2072), + (206, 2074), + (206, 2075), + (206, 2076), + (206, 2077), + (206, 2078), + (206, 2082), + (206, 2083), + (206, 2084), + (206, 2086), + (206, 2087), + (206, 2088), + (206, 2089), + (206, 2090), + (206, 2091), + (206, 2092), + (206, 2093), + (206, 2094), + (206, 2095), + (206, 2096), + (206, 2109), + (206, 2110), + (206, 2111), + (206, 2112), + (206, 2113), + (206, 2114), + (206, 2115), + (206, 2116), + (206, 2117), + (206, 2118), + (206, 2121), + (206, 2122), + (206, 2124), + (206, 2207), + (206, 2208), + (206, 2209), + (206, 2210), + (206, 2211), + (206, 2212), + (206, 2213), + (206, 2214), + (206, 2215), + (206, 2216), + (206, 2217), + (206, 2218), + (206, 2221), + (206, 2222), + (206, 2223), + (206, 2224), + (206, 2225), + (206, 2226), + (207, 2047), + (207, 2048), + (207, 2049), + (207, 2050), + (208, 2047), + (208, 2048), + (208, 2049), + (208, 2050), + (208, 2062), + (208, 2109), + (208, 2110), + (208, 2111), + (208, 2247), + (208, 2250), + (209, 2047), + (209, 2048), + (209, 2050), + (209, 2073), + (209, 2074), + (209, 2075), + (209, 2076), + (209, 2077), + (209, 2082), + (209, 2083), + (209, 2093), + (209, 2095), + (209, 2099), + (209, 2100), + (209, 2102), + (209, 2103), + (209, 2118), + (209, 2120), + (209, 2122), + (209, 2124), + (209, 2207), + (209, 2208), + (209, 2219), + (209, 2220), + (209, 2221), + (209, 2222), + (209, 2223), + (209, 2224), + (209, 2225), + (209, 2226), + (209, 2227), + (209, 2228), + (209, 2230), + (209, 2231), + (209, 2232), + (209, 2235), + (209, 2236), + (209, 2237), + (209, 2240), + (209, 2241), + (209, 2242), + (209, 2243), + (209, 2244), + (209, 2245), + (209, 2270), + (209, 2271), + (209, 2272), + (209, 2282), + (209, 2283), + (209, 2298), + (209, 2319), + (209, 2338), + (209, 2417), + (209, 2418), + (209, 2419), + (209, 2420), + (209, 2421), + (209, 2422), + (210, 2047), + (210, 2048), + (210, 2050), + (210, 2073), + (210, 2074), + (210, 2075), + (210, 2076), + (210, 2077), + (210, 2082), + (210, 2083), + (210, 2093), + (210, 2095), + (210, 2099), + (210, 2100), + (210, 2102), + (210, 2103), + (210, 2118), + (210, 2120), + (210, 2122), + (210, 2124), + (210, 2207), + (210, 2208), + (210, 2219), + (210, 2220), + (210, 2221), + (210, 2222), + (210, 2223), + (210, 2224), + (210, 2225), + (210, 2226), + (210, 2227), + (210, 2228), + (210, 2230), + (210, 2231), + (210, 2232), + (210, 2235), + (210, 2236), + (210, 2237), + (210, 2240), + (210, 2241), + (210, 2242), + (210, 2243), + (210, 2244), + (210, 2245), + (210, 2270), + (210, 2271), + (210, 2272), + (210, 2282), + (210, 2283), + (210, 2298), + (210, 2319), + (210, 2338), + (210, 2417), + (210, 2418), + (210, 2419), + (210, 2420), + (210, 2421), + (210, 2422); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_addons_config` +-- + +INSERT INTO hg_sys_addons_config (id, addon_name, "group", name, type, key, value, default_value, sort, tip, is_default, status, created_at, updated_at) VALUES + (1, 'hgexample', 'basic', '测试参数', 'string', 'basicTest', 'HotGo', 'HotGo', 10, '测试参数,可以按需添加配置自定义参数', 0, 1, '2023-02-14 10:56:01', '2024-07-21 21:54:49'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_blacklist` +-- + +INSERT INTO hg_sys_blacklist (id, ip, remark, status, created_at, updated_at) VALUES + (1, '39.162.138.4', '', 2, '2022-10-01 22:02:09', '2022-10-01 22:39:23'), + (2, '29.162.138.91', '', 2, '2022-10-01 22:02:09', '2022-10-01 22:39:23'), + (3, '19.162.138.94', '指定IP', 1, '2022-10-01 14:02:09', '2023-01-20 23:11:43'), + (5, '19.162.138.91,19.162.138.96', '多个IP', 1, '2022-10-01 14:02:09', '2023-01-20 23:11:36'), + (6, '19.160.138.0/24', 'IP段', 1, '2022-10-01 14:02:09', '2023-01-20 23:11:30'), + (7, '29.160.138.0-29.160.138.5', 'IP范围', 1, '2022-10-01 14:02:09', '2023-04-27 23:30:46'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_config` +-- + +INSERT INTO hg_sys_config (id, "group", name, type, key, value, default_value, sort, tip, is_default, status, created_at, updated_at) VALUES + (1, 'theme', '默认主题', 'string', 'themeDarkTheme', 'dark', 'dark', 50, '', 1, 1, '2021-01-30 13:27:43', '2022-09-05 20:29:05'), + (2, 'theme', '默认系统主题', 'string', 'themeAppTheme', '#2d8cf0', '#2d8cf0', 60, '', 1, 1, '2021-01-30 13:27:43', '2022-09-05 20:29:05'), + (3, 'theme', '默认侧边栏风格', 'string', 'themeNavTheme', 'light', 'dark', 70, '', 1, 1, '2021-01-30 13:27:43', '2022-09-05 20:29:05'), + (6, 'basic', '网站名称', 'string', 'basicName', 'HotGo', 'HotGo!', 10, '', 1, 1, '2021-01-30 13:27:43', '2024-04-21 22:58:30'), + (7, 'basic', '网站logo', 'string', 'basicLogo', 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdq8er9nfkchdopav.png', '', 20, '首页使用', 1, 1, '2021-01-30 13:27:43', '2024-04-21 22:58:30'), + (8, 'basic', '网站备案号', 'string', 'basicIcpCode', '豫ICP备16035288号', '', 30, '', 1, 1, '2021-01-30 13:27:43', '2024-04-21 22:58:30'), + (9, 'basic', '网站开启访问', 'bool', 'basicSystemOpen', '1', 'true', 50, '', 1, 1, '2021-01-30 13:27:43', '2024-04-21 22:58:30'), + (10, 'basic', '网站关闭提示', 'string', 'basicCloseText', '网站维护中,暂时无法访问!本网站正在进行系统维护和技术升级,网站暂时无法访问,敬请谅解!', '网站维护中,暂时无法访问!本网站正在进行系统维护和技术升级,网站暂时无法访问,敬请谅解!', 60, '', 1, 1, '2021-01-30 13:27:43', '2024-04-21 22:58:29'), + (11, 'basic', '版权所有', 'string', 'basicCopyright', '© 2019 - 2023 HotGo All Rights Reserved.', '© 2021 - 2023 HotGo All Rights Reserved.', 40, '', 1, 1, '2021-01-30 13:27:43', '2024-04-21 22:58:30'), + (12, 'smtp', 'SMTP服务器', 'string', 'smtpHost', 'smtpdm.aliyun.com', 'smtpdm.aliyun.com', 50, '错误的配置发送邮件会导致服务器超时', 1, 1, '2021-01-30 13:27:43', '2023-02-04 16:59:13'), + (13, 'smtp', 'SMTP端口', 'int', 'smtpPort', '25', '25', 100, '(不加密默认25,SSL默认465,TLS默认587)', 1, 1, '2021-01-30 13:27:43', '2023-02-04 16:59:13'), + (14, 'smtp', 'SMTP用户名', 'string', 'smtpUser', 'ali@mail.qvnidaye.com', '', 110, '填写完整用户名', 1, 1, '2021-01-30 13:27:43', '2023-02-04 16:59:13'), + (15, 'smtp', 'SMTP密码', 'string', 'smtpPass', '', '', 120, '填写您的密码', 1, 1, '2021-01-30 13:27:43', '2023-02-04 16:59:13'), + (16, 'smtp', '发件人名称', 'string', 'smtpSendName', 'HotGo', 'HotGo', 130, '', 1, 1, '2021-01-30 13:27:43', '2023-02-04 16:59:13'), + (17, 'smtp', '管理员邮箱', 'string', 'smtpAdminMailbox', '133814250@qq.com', '133814250@qq.com', 140, '', 1, 1, '2021-01-30 13:27:43', '2023-02-04 16:59:13'), + (28, 'upload', '上传驱动', 'string', 'uploadDrive', 'local', '', 300, 'local:本地;ucloud:ucloud;腾讯云:cos', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (29, 'upload', '上传图片大小限制', 'int', 'uploadImageSize', '1', '2', 310, '单位:MB', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (30, 'upload', '上传图片类型限制', 'string', 'uploadImageType', 'jpg,jpeg,gif,npm,png,svg', 'jpg,jpeg,gif,npm,png,svg', 320, '图片上传后缀类型限制', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (31, 'upload', '上传文件大小限制', 'int', 'uploadFileSize', '1000', '10', 330, '单位:MB', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (32, 'upload', '上传文件类型限制', 'string', 'uploadFileType', 'doc,docx,pdf,zip,tar,xls,xlsx,rar,jpg,jpeg,gif,npm,png,svg', 'doc,docx,zip,xls,xlsx,rar,jpg,jpeg,gif,npm,png,svg', 340, '文件上传后缀类型限制', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (33, 'upload', '本地存储路径', 'string', 'uploadLocalPath', 'attachment/', 'attachment/', 350, '对外访问的相对路径', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (34, 'upload', 'UCloud存储路径', 'string', 'uploadUCloudPath', 'hotgo/attachment/', 'hotgo/attachment/', 360, 'UC对象存储中的相对路径', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (35, 'upload', 'UCloud公钥', 'string', 'uploadUCloudPublicKey', '', '', 370, '获取地址:https://console.ucloud.cn/ufile/token', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (36, 'upload', 'UCloud私钥', 'string', 'uploadUCloudPrivateKey', '', '', 380, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (37, 'upload', 'UCloud地域API', 'string', 'uploadUCloudBucketHost', 'api.ucloud.cn', 'api.ucloud.cn', 390, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (38, 'upload', 'UCloud存储桶名称', 'string', 'uploadUCloudBucketName', 'bufanyun', '', 400, '存储空间名称', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (39, 'upload', 'UCloud存储桶地域host', 'string', 'uploadUCloudFileHost', 'cn-bj.ufileos.com', 'cn-bj.ufileos.com', 410, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (40, 'upload', 'UCloud访问域名', 'string', 'uploadUCloudEndpoint', 'https://gmycos.facms.cn', '', 420, '格式,http://abc.com 或 https://abc.com,不可为空', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (41, 'geo', '高德Web服务key', 'string', 'geoAmapWebKey', '', '', 500, '申请地址:https://console.amap.com/dev/key/app', 1, 1, '2021-01-30 13:27:43', '2022-12-07 15:48:43'), + (42, 'sms', '短信驱动,aliyun:阿里云;tencent:腾讯云', 'string', 'smsDrive', 'tencent', '', 600, '', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (43, 'sms', '阿里云AccessKeyID', 'string', 'smsAliYunAccessKeyID', '', '', 610, '应用key和密钥你可以通过 https://ram.console.aliyun.com/manage/ak 获取', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (44, 'sms', '阿里云AccessKeySecret', 'string', 'smsAliYunAccessKeySecret', '', '', 620, '', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (45, 'sms', '阿里云短信签名', 'string', 'smsAliYunSign', '', '', 630, '申请地址:https://dysms.console.aliyun.com/domestic/text/sign', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (46, 'sms', '阿里云短信模板', 'string', 'smsAliYunTemplate', '[{"key":"login","value":"SMS_198921686"},{"key":"register","value":"SMS_198921686"},{"key":"code","value":"SMS_198921686"},{"key":"resetPwd","value":"SMS_198921686"},{"key":"bind","value":"SMS_198921686"},{"key":"cash","value":"SMS_198921686"}]', '', 640, '', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (47, 'sms', '最小发送间隔', 'int', 'smsMinInterval', '60', '', 600, '同号码', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (48, 'sms', 'IP最大发送次数', 'int', 'smsMaxIpLimit', '10', '', 610, '同IP每天最大允许发送次数', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (49, 'sms', '验证码有效期', 'int', 'smsCodeExpire', '600', '', 610, '单位:秒', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (50, 'smtp', '邮件模板', 'string', 'smtpTemplate', '[{"key":"text","value":"./resource/template/email/text.html"},{"key":"login","value":"./resource/template/email/code.html"},{"key":"register","value":"./resource/template/email/code.html"},{"key":"code","value":"./resource/template/email/code.html"},{"key":"resetPwd","value":"./resource/template/email/resetPwd.html"},{"key":"bind","value":"./resource/template/email/code.html"},{"key":"cash","value":"./resource/template/email/code.html"}]', '', 190, '', 1, 1, '2021-01-30 13:27:43', '2023-02-04 16:59:13'), + (51, 'smtp', '最小发送间隔', 'int', 'smtpMinInterval', '60', '', 150, '同地址', 1, 1, '2021-01-30 13:27:43', '2023-02-04 16:59:13'), + (52, 'smtp', 'IP最大发送次数', 'int', 'smtpMaxIpLimit', '10', '', 160, '同IP每天最大允许发送次数', 1, 1, '2021-01-30 13:27:43', '2023-02-04 16:59:13'), + (53, 'smtp', '验证码有效期', 'int', 'smtpCodeExpire', '600', '', 170, '单位:秒', 1, 1, '2021-01-30 13:27:43', '2023-02-04 16:59:13'), + (54, 'basic', '网站域名', 'string', 'basicDomain', 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', 45, '', 1, 1, '2021-01-30 13:27:43', '2024-04-21 22:58:30'), + (55, 'basic', 'websocket地址', 'string', 'basicWsAddr', 'ws://127.0.0.1:8000/socket', 'ws://127.0.0.1:8000/socket', 48, '', 1, 1, '2021-01-30 13:27:43', '2024-04-21 22:58:30'), + (56, 'upload', 'COS存储路径', 'string', 'uploadCosPath', 'hotgo/attachment/', 'hotgo/attachment/', 450, 'COS对象存储中的相对路径', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (57, 'upload', 'COS秘钥ID', 'string', 'uploadCosSecretId', '', '', 460, '子账号密钥获取可参考 https://cloud.tencent.com/document/product/598/37140', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (58, 'upload', 'COS秘钥', 'string', 'uploadCosSecretKey', '', '', 470, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (59, 'upload', 'COS访问域名', 'string', 'uploadCosBucketURL', '', 'https://xxx-1253625515.cos.ap-beijing.myqcloud.com', 480, '控制台查看地址:https://console.cloud.tencent.com/cos/bucket', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (60, 'upload', 'OSS存储路径', 'string', 'uploadOssPath', 'hotgo/attachment/', 'hotgo/attachment/', 500, 'OSS对象存储中的相对路径', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (61, 'upload', 'OSS秘钥ID', 'string', 'uploadOssSecretId', '', '', 510, '阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (62, 'upload', 'OSS秘钥', 'string', 'uploadOssSecretKey', '', '', 520, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (63, 'upload', 'Bucket 域名', 'string', 'uploadOssBucketURL', 'http://bufanyunoss.oss-cn-qingdao.aliyuncs.com', 'https://xxx.oss-cn-qingdao.aliyuncs.com', 530, 'Bucket 域名', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (64, 'upload', 'OSSEndpoint', 'string', 'uploadOssEndpoint', 'http://oss-cn-qingdao.aliyuncs.com', 'https://oss-cn-qingdao.aliyuncs.com', 540, 'Endpoint(地域节点)', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (65, 'upload', 'OSS存储空间名称', 'string', 'uploadOssBucket', '', '', 550, '存储空间名称,例如examplebucket', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (66, 'upload', '七牛云AccessKey', 'string', 'uploadQiNiuAccessKey', '', '', 600, '创建地址:https://portal.qiniu.com/user/key', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (67, 'upload', '七牛云SecretKey', 'string', 'uploadQiNiuSecretKey', '', '', 610, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (68, 'upload', '七牛云储存路径', 'string', 'uploadQiNiuPath', 'hotgo/attachment/', 'hotgo/attachment/', 620, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (69, 'upload', '七牛云存储空间名称', 'string', 'uploadQiNiuBucket', '', 'bufanyun', 630, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (70, 'upload', '七牛云访问域名', 'string', 'uploadQiNiuDomain', '', '', 640, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (78, 'sms', '腾讯云SecretId', 'string', 'smsTencentSecretId', '', '', 650, '获取地址:https://console.cloud.tencent.com/cam/capi', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (79, 'sms', '腾讯云SecretKey', 'string', 'smsTencentSecretKey', '', '', 660, '', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (80, 'sms', '腾讯云短信应用ID', 'string', 'smsTencentAppId', '', '', 670, '查看地址:https://console.cloud.tencent.com/smsv2/app-manage', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (81, 'sms', '腾讯云短信签名', 'string', 'smsTencentSign', '', '', 680, '查看地址:https://console.cloud.tencent.com/smsv2/csms-sign', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (82, 'sms', '腾讯云接入地域域名', 'string', 'smsTencentEndpoint', 'sms.tencentcloudapi.com', 'sms.tencentcloudapi.com', 690, '默认就近地域接入域名为 sms.tencentcloudapi.com ,也支持指定地域域名访问,例如广州地域的域名为 sms.ap-guangzhou.tencentcloudapi.com', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (83, 'sms', '腾讯云地域信息', 'string', 'smsTencentRegion', 'ap-guangzhou', 'ap-guangzhou', 695, '支持的地域列表参考 https://cloud.tencent.com/document/api/382/52071#.E5.9C.B0.E5.9F.9F.E5.88.97.E8.A1.A8', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (84, 'sms', '腾讯云短信模板', 'string', 'smsTencentTemplate', '[{"key":"login","value":"1758990"},{"key":"register","value":"1758990"},{"key":"code","value":"1758990"},{"key":"resetPwd","value":"1758990"},{"key":"bind","value":"1758990"},{"key":"cash","value":"1758990"}]', '', 698, '', 1, 1, '2021-01-30 13:27:43', '2023-04-10 13:55:32'), + (85, 'pay', 'Debug开关', 'bool', 'payDebug', '1', 'true', 800, '输出请求日志', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (86, 'pay', '支付宝应用ID', 'string', 'payAliPayAppId', '', '', 810, '', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (87, 'pay', '支付宝PrivateKey', 'string', 'payAliPayPrivateKey', 'storage/cert/pay/alipay/alipayPrivateKey', '', 820, '应用私钥,支持PKCS1和PKCS8', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (88, 'pay', '支付宝AppCertPublicKey', 'string', 'payAliPayAppCertPublicKey', 'storage/cert/pay/alipay/appCertPublicKey.crt', '', 830, 'appCertPublicKey.crt证书内容', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (89, 'pay', '支付宝RootCert', 'string', 'payAliPayRootCert', 'storage/cert/pay/alipay/alipayRootCert.crt', '', 840, 'alipayRootCert.crt证书内容', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (90, 'pay', '支付宝PublicKeyRSA2', 'string', 'payAliPayCertPublicKeyRSA2', 'storage/cert/pay/alipay/alipayCertPublicKey_RSA2.crt', '', 850, 'alipayCertPublicKey_RSA2.crt证书内容', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (91, 'pay', '微信支付应用ID', 'string', 'payWxPayAppId', '', '', 860, '', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (92, 'pay', '微信支付商户ID', 'string', 'payWxPayMchId', '', '', 870, '商户ID 或者服务商模式的 sp_mchid', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (93, 'pay', '微信支付证书序列号', 'string', 'payWxPaySerialNo', '', '', 880, '商户证书的证书序列号', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (94, 'pay', '微信支付APIv3Key', 'string', 'payWxPayAPIv3Key', '', '', 890, '商户平台获取', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (95, 'pay', '微信支付私钥', 'string', 'payWxPayPrivateKey', '', '', 900, 'apiclient_key.pem 读取后的内容', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (96, 'pay', 'QQ支付应用ID', 'string', 'payQQPayAppId', '', '', 910, '', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (97, 'pay', 'QQ支付商户ID', 'string', 'payQQPayMchId', '', '', 920, '', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (98, 'pay', 'QQ支付ApiKey', 'string', 'payQQPayApiKey', '', '', 930, 'API秘钥值', 1, 1, '2021-01-30 13:27:43', '2023-08-05 14:00:56'), + (99, 'cash', '提现开关', 'int', 'cashSwitch', '1', '1', 200, '', 1, 1, '2021-09-29 23:51:21', '2022-12-21 21:58:52'), + (100, 'cash', '提现最低手续费(元)', 'int', 'cashMinFee', '3', '3', 210, '', 1, 1, '2021-09-29 23:51:21', '2022-12-21 21:58:52'), + (101, 'cash', '提现最低手续费比率', 'string', 'cashMinFeeRatio', '0.03', '0.03', 220, '', 1, 1, '2021-01-30 13:27:43', '2022-12-21 21:58:52'), + (102, 'cash', '提现最低金额', 'int', 'cashMinMoney', '100', '', 230, '', 1, 1, '2021-01-30 13:27:43', '2022-12-21 21:58:52'), + (103, 'cash', '提现提示信息', 'string', 'cashTips', '

温馨提示:请保证支付宝信息姓名、账号、收款码信息一致且无误,否则导致不到账后果自负。

\n\n

提现条件:满100元后可申请提现。

\n

提现手续费:固定3元/次,提现金额超过100元按3%收取,封顶135元/次。

', '', 240, '', 1, 1, '2021-01-30 13:27:43', '2022-12-21 21:58:52'), + (104, 'wechat', '公众号AppId', 'string', 'officialAccountAppId', '', '', 1000, '请填写微信公众平台后台的AppId', 1, 1, '2021-01-30 13:27:43', '2023-07-26 16:06:53'), + (105, 'wechat', '公众号AppSecret', 'string', 'officialAccountAppSecret', '', '', 1010, '请填写微信公众平台后台的AppSecret', 1, 1, '2021-01-30 13:27:43', '2023-07-26 16:06:53'), + (106, 'wechat', '公众号token', 'string', 'officialAccountToken', '', '', 1020, '', 1, 1, '2021-01-30 13:27:43', '2023-07-26 16:06:53'), + (107, 'wechat', '公众号EncodingAESKey', 'string', 'officialAccountEncodingAESKey', '', '', 1030, '与公众平台接入设置值一致,必须为英文或者数字,长度为43个字符. 请妥善保管,EncodingAESKey 泄露将可能被窃取或篡改平台的操作数据', 1, 1, '2021-01-30 13:27:43', '2023-07-26 16:06:53'), + (108, 'wechat', '开放平台AppId', 'string', 'openPlatformAppId', '', '', 1040, '请填写微信开放平台平台后台的AppId', 1, 1, '2021-01-30 13:27:43', '2023-07-26 16:06:53'), + (109, 'wechat', '开放平台AppSecret', 'string', 'openPlatformAppSecret', '', '', 1050, '请填写微信开放平台平台后台的AppSecret', 1, 1, '2021-01-30 13:27:43', '2023-07-26 16:06:53'), + (110, 'wechat', '开放平台EncodingAESKey', 'string', 'openPlatformEncodingAESKey', '', '', 1060, '与开放平台接入设置值一致,必须为英文或者数字,长度为43个字符. 请妥善保管,EncodingAESKey 泄露将可能被窃取或篡改平台的操作数据', 1, 1, '2021-01-30 13:27:43', '2023-07-26 16:06:53'), + (111, 'wechat', '开放平台token', 'string', 'openPlatformToken', '', '', 1070, '', 1, 1, '2021-01-30 13:27:43', '2023-07-26 16:06:53'), + (112, 'login', '注册开关', 'int', 'loginRegisterSwitch', '1', '1', 1100, '', 1, 1, '2021-09-29 23:51:21', '2024-08-27 19:02:48'), + (113, 'login', '验证码开关', 'int', 'loginCaptchaSwitch', '1', '1', 1110, '', 1, 1, '2021-09-29 23:51:21', '2024-08-27 19:02:48'), + (114, 'login', '用户协议', 'string', 'loginProtocol', '

用户协议..

', '', 1120, '', 1, 1, '2021-09-29 23:51:21', '2024-08-27 19:02:48'), + (115, 'login', '隐私权政策', 'string', 'loginPolicy', '

隐私权政策..

', '', 1130, '', 1, 1, '2021-09-29 23:51:21', '2024-08-27 19:02:48'), + (116, 'login', '默认注册角色', 'int64', 'loginRoleId', '210', '', 1140, '', 1, 1, '2021-09-29 23:51:21', '2024-08-27 19:02:49'), + (117, 'login', '默认注册部门', 'int64', 'loginDeptId', '110', '', 1150, '', 1, 1, '2021-09-29 23:51:21', '2024-08-27 19:02:48'), + (118, 'login', '默认注册岗位', '[]int64', 'loginPostIds', '[4]', '', 1160, '', 1, 1, '2021-09-29 23:51:21', '2024-08-27 19:02:48'), + (119, 'login', '默认注册头像', 'string', 'loginAvatar', 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdq8er9nfkchdopav.png', '', 1170, '', 1, 1, '2021-09-29 23:51:21', '2024-08-27 19:02:48'), + (120, 'login', '强制邀请', 'int', 'loginForceInvite', '2', '1', 1190, '', 1, 1, '2021-09-29 23:51:21', '2024-08-27 19:02:49'), + (121, 'login', '自动获取openId', 'int', 'loginAutoOpenId', '2', '1', 1195, '', 1, 1, '2021-09-29 23:51:21', '2024-08-27 19:02:48'), + (122, 'upload', 'minio AccessKey', 'string', 'uploadMinioAccessKey', '', '', 650, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (123, 'upload', 'minio SecretKey', 'string', 'uploadMinioSecretKey', '', '', 650, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (124, 'upload', 'minio地域节点', 'string', 'uploadMinioEndpoint', '', '', 650, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (125, 'upload', 'minio是否启用SSL', 'int', 'uploadMinioUseSSL', '1', '', 650, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (126, 'upload', 'minio存储路径', 'string', 'uploadMinioPath', 'hotgo/attachment/', '', 650, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (127, 'upload', 'minio桶名称', 'string', 'uploadMinioBucket', '', '', 650, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'), + (128, 'upload', 'minio对外访问域名', 'string', 'uploadMinioDomain', '', '', 650, '', 1, 1, '2021-01-30 13:27:43', '2024-02-28 16:56:35'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_cron` +-- + +INSERT INTO hg_sys_cron (id, group_id, title, name, params, pattern, policy, count, sort, remark, status, created_at, updated_at) VALUES + (1, 1, '测试任务', 'test', '', '* * * * * *', 1, 3, 10, '测试无参数任务', 2, '2022-10-01 22:02:09', '2023-11-25 14:33:05'), + (2, 1, '测试带参数', 'test2', 'hotGo,3,欢迎使用hotGo!', '* * * * * *', 1, 0, 10, '测试有参数任务', 2, '2022-10-01 06:02:09', '2023-11-17 18:38:49'), + (3, 1, '测试带参数-多任务', 'test2', 'hotGo,3,这是同一个执行方法开多个定时任务的实例!', '* * * * * *', 1, 1, 10, '相同的执行方法,可以开启多个任务', 2, '2023-11-17 16:12:26', '2023-11-20 10:11:47'), + (4, 1, '测试带参数-错误', 'test2', '666', '* * * * * *', 1, 1, 10, '参入一个错误的参数格式,来模拟执行出错示例', 2, '2023-11-17 18:23:39', '2023-11-17 18:39:59'), + (10, 1, '关闭过期订单', 'close_order', '', '0 */10 * * * *', 1, 1, 100, '取消过期订单,10分钟运行一次', 2, '2023-04-22 21:58:47', '2023-11-18 11:54:07'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_cron_group` +-- + +INSERT INTO hg_sys_cron_group (id, pid, name, is_default, sort, remark, status, created_at, updated_at) VALUES + (1, 0, '系统默认', 1, 0, '这是系统默认的任务分组,无法删除!', 1, '2021-02-25 17:38:07', '2021-02-25 19:32:57'), + (2, 0, '测试', 0, 0, '这是测试任务分组', 1, NULL, '2023-05-29 14:59:39'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_dict_data` +-- + +INSERT INTO hg_sys_dict_data (id, label, value, value_type, type, list_class, is_default, sort, remark, status, created_at, updated_at) VALUES + (1, '男', '1', 'int', 'sys_user_sex', 'success', 1, 10, '性别男', 1, '2021-01-30 13:27:43', '2023-04-27 23:24:58'), + (2, '女', '2', 'int', 'sys_user_sex', 'warning', 1, 20, '性别女', 1, '2021-01-30 13:27:43', '2023-01-06 09:45:21'), + (3, '保密', '3', 'int', 'sys_user_sex', 'error', 1, 30, '性别保密', 1, '2021-01-30 13:27:43', '2023-01-06 09:45:18'), + (6, '正常', '1', 'int', 'sys_normal_disable', 'success', 1, 10, '正常状态', 1, '2021-01-30 13:27:43', '2023-01-18 09:52:44'), + (7, '停用', '2', 'int', 'sys_normal_disable', 'warning', 1, 20, '停用状态', 1, '2021-01-30 13:27:43', '2023-01-18 09:52:48'), + (8, '正常', '1', 'int', 'sys_job_status', 'primary', 1, 10, '正常状态', 1, '2021-01-30 13:27:43', '2023-01-18 09:53:48'), + (9, '暂停', '2', 'int', 'sys_job_status', 'error', 1, 20, '停用状态', 1, '2021-01-30 13:27:43', '2023-01-18 09:53:53'), + (10, '默认', 'DEFAULT', 'string', 'sys_job_group', '', 1, 10, '默认分组', 1, '2021-01-30 13:27:43', NULL), + (11, '系统', 'SYSTEM', 'string', 'sys_job_group', '', 1, 20, '系统分组', 1, '2021-01-30 13:27:43', NULL), + (14, '通知', '1', 'int', 'sys_notice_type', 'warning', 1, 10, '通知', 1, '2021-01-30 13:27:43', '2023-01-05 20:06:47'), + (15, '公告', '2', 'int', 'sys_notice_type', 'error', 1, 20, '公告', 1, '2021-01-30 13:27:43', '2023-01-26 12:08:52'), + (18, '新增', '1', 'int', 'sys_oper_type', 'info', 0, 10, '新增操作', 1, '2021-01-30 13:27:43', NULL), + (19, '修改', '2', 'int', 'sys_oper_type', 'info', 0, 20, '修改操作', 1, '2021-01-30 13:27:43', NULL), + (20, '删除', '3', 'int', 'sys_oper_type', 'error', 0, 30, '删除操作', 1, '2021-01-30 13:27:43', NULL), + (21, '授权', '4', 'int', 'sys_oper_type', 'primary', 0, 40, '授权操作', 1, '2021-01-30 13:27:43', NULL), + (22, '导出', '5', 'int', 'sys_oper_type', 'warning', 0, 50, '导出操作', 1, '2021-01-30 13:27:43', NULL), + (23, '导入', '6', 'int', 'sys_oper_type', 'warning', 0, 60, '导入操作', 1, '2021-01-30 13:27:43', NULL), + (24, '强退', '7', 'int', 'sys_oper_type', 'error', 0, 70, '强退操作', 1, '2021-01-30 13:27:43', NULL), + (25, '生成代码', '8', 'int', 'sys_oper_type', 'warning', 0, 80, '生成操作', 1, '2021-01-30 13:27:43', NULL), + (26, '清空数据', '9', 'int', 'sys_oper_type', 'error', 0, 90, '清空操作', 1, '2021-01-30 13:27:43', NULL), + (28, '校验', '11', 'int', 'sys_oper_type', NULL, 0, 110, '校验', 1, '2021-10-04 22:40:50', '2021-10-04 22:50:02'), + (80, '查询', '10', 'int', 'sys_oper_type', NULL, 0, 100, '查询', 1, '2021-10-04 22:37:38', '2021-10-04 22:49:32'), + (88, 'GET', 'GET', 'string', 'sys_oper_method', '', 0, 10, '', 1, '2022-01-25 10:16:46', '2022-01-25 10:16:46'), + (89, 'POST', 'POST', 'string', 'sys_oper_method', '', 0, 20, '', 1, '2022-01-25 10:16:54', '2022-01-25 10:16:54'), + (90, '请求失败', '-1', 'int', 'req_code', 'warning', 0, 20, '通用错误码', 1, '2022-01-25 10:23:34', '2023-01-06 09:58:17'), + (91, '请求成功', '0', 'int', 'req_code', 'success', 0, 10, '通用成功码', 1, '2022-01-25 10:23:54', '2023-01-06 09:58:14'), + (92, '内部发生错误', '50', 'int', 'req_code', 'error', 0, 30, '内部错误', 1, '2022-01-25 10:24:06', '2023-01-06 09:56:31'), + (95, '不允许的操作', '59', 'int', 'req_code', 'error', 0, 60, '当前操作的给定参数无效', 1, '2022-01-25 10:24:38', '2023-01-06 09:56:00'), + (103, '没有授权登录', '61', 'int', 'req_code', 'warning', 0, 140, '未授权', 1, '2022-01-25 10:26:12', '2023-01-06 09:55:50'), + (109, '业务验证失败', '300', 'int', 'req_code', 'warning', 0, 200, '业务验证失败', 1, '2022-01-25 10:27:51', '2023-01-06 09:56:51'), + (110, '大于50ms', '50', 'int64', 'req_take_up_time', 'success', 0, 10, '', 1, '2022-01-25 15:51:45', '2023-01-06 09:59:50'), + (111, '大于100ms', '100', 'int64', 'req_take_up_time', 'success', 0, 20, '', 1, '2022-01-25 15:51:57', '2023-01-06 09:59:53'), + (112, '大于200ms', '200', 'int64', 'req_take_up_time', 'info', 0, 30, '', 1, '2022-01-25 15:52:21', '2023-01-06 09:59:57'), + (113, '大于500ms', '500', 'int64', 'req_take_up_time', 'warning', 0, 40, '', 1, '2022-01-25 15:52:32', '2023-01-06 10:00:02'), + (114, '大于1000ms', '1000', 'int64', 'req_take_up_time', 'error', 0, 50, '', 1, '2022-01-25 15:52:57', '2023-01-06 10:00:06'), + (115, '大于5000ms', '5000', 'int64', 'req_take_up_time', 'error', 0, 60, '', 1, '2022-01-24 23:54:15', '2023-01-06 10:00:10'), + (116, '开启', '1', 'int', 'sys_switch', 'info', 1, 10, '系统开关开启', 1, '2021-01-30 13:27:43', '2022-12-27 00:00:00'), + (117, '关闭', '2', 'int', 'sys_switch', 'warning', 1, 20, '系统开关关闭', 1, '2021-01-30 13:27:43', '2022-12-27 00:00:00'), + (118, 'PC端', '1', 'int', 'sys_user_channel', 'info', 0, 80, '用户来源', 1, '2021-01-30 13:27:43', '2023-01-05 17:01:21'), + (119, '移动端', '2', 'int', 'sys_user_channel', 'success', 0, 80, '用户来源', 1, '2021-01-30 13:27:43', '2023-01-05 16:52:48'), + (120, '微信', '3', 'int', 'sys_user_channel', 'warning', 0, 80, '用户来源', 1, '2021-01-30 13:27:43', '2023-01-05 16:52:43'), + (121, '抖音', '4', 'int', 'sys_user_channel', 'error', 0, 80, '用户来源', 1, '2021-01-30 13:27:43', '2023-01-05 16:52:39'), + (122, '音乐', '1', 'int', 'sys_user_hobby', 'error', 0, 80, '爱好类型', 1, '2021-01-30 13:27:43', '2023-01-06 09:45:11'), + (123, '读书', '2', 'int', 'sys_user_hobby', 'info', 0, 80, '爱好类型', 1, '2021-01-30 13:27:43', '2023-01-06 09:45:08'), + (124, '游泳', '3', 'int', 'sys_user_hobby', 'warning', 0, 80, '爱好类型', 1, '2021-01-30 13:27:43', '2023-01-06 09:45:05'), + (125, '本地存储', 'local', 'string', 'config_upload_drive', 'info', 1, 10, '', 1, '2022-12-30 17:57:50', '2023-01-06 10:02:31'), + (126, 'ucloud', 'ucloud', 'string', 'config_upload_drive', 'success', 1, 20, '', 1, '2022-12-30 17:58:26', '2022-12-30 17:58:26'), + (127, 'DEBU', 'DEBU', 'string', 'sys_log_type', 'default', 0, 10, '', 1, '2023-01-20 16:56:23', '2023-01-20 16:56:23'), + (128, 'INFO', 'INFO', 'string', 'sys_log_type', 'info', 0, 20, '', 1, '2023-01-20 16:56:34', '2023-01-20 16:56:34'), + (129, 'WARN', 'WARN', 'string', 'sys_log_type', 'warning', 0, 30, '', 1, '2023-01-20 16:56:47', '2023-01-20 16:56:47'), + (130, 'ERRO', 'ERRO', 'string', 'sys_log_type', 'error', 0, 50, '', 1, '2023-01-20 16:57:01', '2023-01-20 16:57:01'), + (131, 'PANI', 'PANI', 'string', 'sys_log_type', 'error', 0, 60, '', 1, '2023-01-20 16:57:23', '2023-01-20 16:57:23'), + (132, 'FATA', 'FATA', 'string', 'sys_log_type', 'error', 0, 70, '', 1, '2023-01-20 16:57:37', '2023-01-20 16:57:37'), + (133, '阿里云', 'aliyun', 'string', 'config_sms_drive', 'success', 0, 10, '', 1, '2023-01-21 10:27:59', '2023-01-21 10:27:59'), + (134, '腾讯云', 'tencent', 'string', 'config_sms_drive', 'info', 0, 20, '', 1, '2023-01-21 10:28:23', '2023-01-21 10:28:23'), + (135, '通用验证码', 'code', 'string', 'config_sms_template', 'info', 0, 10, '', 1, '2023-01-21 10:28:39', '2023-01-21 20:40:09'), + (136, '登录', 'login', 'string', 'config_sms_template', 'success', 0, 20, '', 1, '2023-01-21 10:28:48', '2023-01-21 10:28:48'), + (137, '注册', 'register', 'string', 'config_sms_template', 'warning', 0, 30, '', 1, '2023-01-21 10:28:58', '2023-01-21 10:28:58'), + (138, '重置密码', 'resetPwd', 'string', 'config_sms_template', 'error', 0, 40, '', 1, '2023-01-21 10:29:10', '2023-01-21 10:29:10'), + (139, '绑定手机号', 'bind', 'string', 'config_sms_template', 'info', 0, 50, '', 1, '2023-01-21 10:29:22', '2023-01-21 10:29:22'), + (140, '申请提现', 'cash', 'string', 'config_sms_template', 'primary', 0, 60, '', 1, '2023-01-21 10:29:36', '2023-01-21 10:29:40'), + (141, '私信', '3', 'int', 'sys_notice_type', 'info', 0, 30, '', 1, '2023-01-26 12:08:42', '2023-01-26 12:08:42'), + (142, '一般', '1', 'int', 'sys_notice_tag', 'info', 0, 10, '', 1, '2023-01-26 12:13:04', '2023-01-26 12:16:07'), + (143, '重要', '2', 'int', 'sys_notice_tag', 'error', 0, 20, '', 1, '2023-01-26 12:13:36', '2023-01-26 12:13:36'), + (144, '提醒', '3', 'int', 'sys_notice_tag', 'warning', 0, 30, '', 1, '2023-01-26 12:13:52', '2023-01-26 12:13:52'), + (145, '注意', '4', 'int', 'sys_notice_tag', 'success', 0, 40, '', 1, '2023-01-26 12:14:12', '2023-01-26 12:14:12'), + (146, '调试', '5', 'int', 'sys_notice_tag', 'default', 0, 50, '', 1, '2023-01-26 12:15:59', '2023-01-26 12:15:59'), + (147, '通用验证码', 'code', 'string', 'config_ems_template', 'info', 0, 10, '', 1, '2023-01-21 10:28:39', '2023-01-21 20:40:09'), + (148, '登录', 'login', 'string', 'config_ems_template', 'success', 0, 20, '', 1, '2023-01-21 10:28:48', '2023-01-21 10:28:48'), + (149, '注册', 'register', 'string', 'config_ems_template', 'warning', 0, 30, '', 1, '2023-01-21 10:28:58', '2023-01-21 10:28:58'), + (150, '重置密码', 'resetPwd', 'string', 'config_ems_template', 'error', 0, 40, '', 1, '2023-01-21 10:29:10', '2023-01-21 10:29:10'), + (151, '绑定手机号', 'bind', 'string', 'config_ems_template', 'info', 0, 50, '', 1, '2023-01-21 10:29:22', '2023-01-21 10:29:22'), + (152, '申请提现', 'cash', 'string', 'config_ems_template', 'primary', 0, 60, '', 1, '2023-01-21 10:29:36', '2023-01-21 10:29:40'), + (153, '富文本', 'text', 'string', 'config_ems_template', 'default', 0, 0, '自定义编辑邮件内容时使用', 1, '2023-01-21 10:29:36', '2023-05-29 14:30:49'), + (154, '腾讯云', 'cos', 'string', 'config_upload_drive', 'info', 1, 30, '', 1, '2022-12-30 17:58:26', '2022-12-30 17:58:26'), + (155, '阿里云', 'oss', 'string', 'config_upload_drive', 'info', 1, 40, '', 1, '2022-12-30 17:58:26', '2022-12-30 17:58:26'), + (156, '七牛云', 'qiniu', 'string', 'config_upload_drive', 'success', 1, 50, '', 1, '2022-12-30 17:58:26', '2022-12-30 17:58:26'), + (157, 'minio', 'minio', 'string', 'config_upload_drive', 'default', 0, 60, '', 1, '2023-11-11 16:45:12', '2023-11-11 16:45:12'), + (158, '目录', '1', 'int', 'sys_menu_types', 'success', 1, 10, '', 1, '2021-01-30 13:27:43', '2023-04-27 23:24:58'), + (159, '菜单', '2', 'int', 'sys_menu_types', 'primary', 1, 20, '', 1, '2021-01-30 13:27:43', '2023-04-27 23:24:58'), + (160, '按钮', '3', 'int', 'sys_menu_types', 'info', 1, 30, '', 1, '2021-01-30 13:27:43', '2023-04-27 23:24:58'), + (161, '主目录', 'LAYOUT', 'string', 'sys_menu_component', 'default', 0, 10, '', 1, '2024-04-16 13:35:49', '2024-04-16 13:35:49'), + (162, '子目录', 'ParentLayout', 'string', 'sys_menu_component', 'default', 0, 20, '', 1, '2024-04-16 13:36:04', '2024-04-16 13:36:04'), + (163, '内嵌链接', 'IFRAME', 'string', 'sys_menu_component', 'default', 0, 30, '', 1, '2024-04-16 13:36:30', '2024-04-16 13:36:30'), + (164, '登录成功', '1', 'int', 'sys_login_status', 'success', 0, 10, '', 1, '2024-04-16 15:21:41', '2024-04-16 15:21:41'), + (165, '登录失败', '2', 'int', 'sys_login_status', 'warning', 0, 20, '', 1, '2024-04-16 15:22:02', '2024-04-16 15:22:02'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_dict_type` +-- + +INSERT INTO hg_sys_dict_type (id, pid, name, type, sort, remark, status, created_at, updated_at) VALUES + (1, 27, '用户性别', 'sys_user_sex', 0, '用户性别列表', 1, '2021-01-30 13:27:43', '2021-03-24 11:38:47'), + (2, 28, '菜单类型', 'sys_menu_types', 80, '', 1, '2021-01-30 13:27:43', '2023-02-26 00:46:18'), + (3, 28, '系统状态', 'sys_normal_disable', 10, '系统状态列表', 1, '2021-01-30 13:27:43', NULL), + (4, 26, '任务状态', 'sys_job_status', 0, '任务状态列表', 1, '2021-01-30 13:27:43', NULL), + (5, 26, '任务分组', 'sys_job_group', 0, '任务分组列表', 1, '2021-01-30 13:27:43', NULL), + (7, 29, '通知类型', 'sys_notice_type', 0, '通知类型列表', 1, '2021-01-30 13:27:43', NULL), + (9, 28, '操作类型', 'sys_oper_type', 100, '', 1, '2021-01-30 13:27:43', '2023-02-26 00:48:01'), + (22, 25, '请求方式', 'sys_oper_method', 0, '', 1, '2022-01-24 11:33:16', '2022-01-24 11:33:16'), + (23, 25, '请求状态码', 'req_code', 0, '', 1, '2022-01-25 10:22:40', '2022-01-25 10:22:40'), + (24, 25, '请求耗时', 'req_take_up_time', 0, '', 1, '2022-01-25 15:51:19', '2022-01-25 15:51:19'), + (25, 0, '请求枚举', 'req', 40, '', 1, '2022-01-24 11:33:16', '2022-01-24 11:33:16'), + (26, 0, '任务枚举', 'job', 30, '', 1, '2022-01-24 11:33:16', '2022-01-24 11:33:16'), + (27, 0, '组织枚举', 'org', 20, '', 1, '2022-01-24 11:33:16', '2023-04-27 23:24:53'), + (28, 0, '系统枚举', 'sys', 10, '', 1, '2022-01-24 11:33:16', '2023-02-26 00:33:13'), + (29, 0, '通知枚举', 'notice', 50, '', 1, '2022-01-24 11:33:16', '2022-01-24 11:33:16'), + (30, 27, '用户爱好', 'sys_user_hobby', 0, NULL, 1, '2021-03-01 11:41:07', '2021-03-01 11:41:07'), + (31, 27, '用户渠道', 'sys_user_channel', 0, NULL, 1, '2021-03-01 11:41:07', '2021-03-01 11:41:07'), + (32, 0, '配置枚举', 'config', 60, '', 1, '2022-12-30 17:55:42', '2023-05-29 14:47:01'), + (33, 32, '上传驱动', 'config_upload_drive', 10, '', 1, '2022-12-30 17:57:18', '2022-12-30 17:57:18'), + (34, 28, '日志类型', 'sys_log_type', 200, '', 1, '2023-01-20 16:39:52', '2023-02-24 17:40:45'), + (35, 32, '短信驱动', 'config_sms_drive', 20, '', 1, '2023-01-21 10:27:01', '2023-01-21 10:27:01'), + (36, 32, '短信模板', 'config_sms_template', 30, '', 1, '2023-01-21 10:27:41', '2023-01-21 10:27:41'), + (37, 29, '通知标签', 'sys_notice_tag', 20, '', 1, '2023-01-26 12:09:46', '2023-01-26 12:09:46'), + (38, 32, '邮件模板', 'config_ems_template', 40, '', 1, '2023-02-04 12:53:07', '2023-02-04 12:53:07'), + (40, 28, '系统开关', 'sys_switch', 20, '', 1, '2024-04-16 09:50:58', '2024-04-16 09:50:58'), + (41, 28, '菜单组件', 'sys_menu_component', 90, '', 1, '2024-04-16 13:35:29', '2024-04-16 13:35:29'), + (42, 28, '登录状态', 'sys_login_status', 300, '', 1, '2024-04-16 15:21:23', '2024-04-16 15:21:23'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_ems_log` +-- + +INSERT INTO hg_sys_ems_log (id, event, email, code, times, content, ip, status, created_at, updated_at) VALUES + (4, 'bind', '133814250@qq.com', '8793', 1, '\r\n\r\n\r\n \r\n \r\n \r\n \r\n 验证码邮件\r\n \r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 这是你发送的验证码吗?\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Windows 10
\r\n 保留地址 (estimated)
\r\n IP 地址: 127**.0.1\r\n

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 如果是,请输入验证码:\r\n

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 8793\r\n

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 该验证码10分钟内有效,请不要告诉于他人!\r\n

\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n', '39.165.245.100', 2, '2023-02-04 16:49:39', '2023-02-04 16:56:24'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_gen_codes` +-- + +INSERT INTO hg_sys_gen_codes (id, gen_type, gen_template, var_name, options, db_name, table_name, table_comment, dao_name, master_columns, addon_name, status, created_at, updated_at) VALUES + (1, 10, 0, 'CurdDemo', '{"join": [{"uuid": "pgJsFoqfaGjqgKjy", "alias": "testCategory", "field": "id", "columns": [{"dc": "分类ID", "id": 1, "name": "id", "extra": "auto_increment", "index": "PRI", "goName": "TestCategoryId", "goType": "int64", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "testCategoryId", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": 0, "formMode": "", "formRole": "", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "NO", "defaultValue": 0}, {"dc": "关联分类", "id": 2, "name": "name", "align": "left", "extra": "", "index": "", "width": 100, "goName": "TestCategoryName", "goType": "string", "isEdit": false, "isList": true, "isSort": false, "length": 255, "tsName": "testCategoryName", "tsType": "string", "unique": false, "isQuery": true, "sqlType": "varchar(255)", "dataType": "varchar", "dictType": 0, "formMode": "", "formRole": "", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "NO", "defaultValue": ""}, {"dc": "分类简称", "id": 3, "name": "short_name", "align": "left", "extra": "", "index": "", "width": null, "goName": "TestCategoryShortName", "goType": "string", "isEdit": false, "isList": false, "isSort": false, "length": 128, "tsName": "testCategoryShortName", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "varchar(128)", "dataType": "varchar", "dictType": 0, "formMode": "", "formRole": "", "isExport": false, "required": false, "queryWhere": "LIKE %...%", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "描述", "id": 3, "name": "description", "extra": "", "index": "", "goName": "TestCategoryDescription", "goType": "string", "isEdit": false, "isList": false, "isSort": false, "length": 255, "tsName": "testCategoryDescription", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "varchar(255)", "dataType": "varchar", "dictType": 0, "formMode": "", "formRole": "", "isExport": false, "required": false, "queryWhere": "LIKE", "isAllowNull": "YES", "defaultValue": ""}, {"dc": "排序", "id": 4, "name": "sort", "extra": "", "index": "", "goName": "TestCategorySort", "goType": "int", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "testCategorySort", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "int(11)", "dataType": "int", "dictType": 0, "formMode": "", "formRole": "", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "NO", "defaultValue": 0}, {"dc": "备注", "id": 5, "name": "remark", "extra": "", "index": "", "goName": "TestCategoryRemark", "goType": "string", "isEdit": false, "isList": false, "isSort": false, "length": 255, "tsName": "testCategoryRemark", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "varchar(255)", "dataType": "varchar", "dictType": 0, "formMode": "", "formRole": "", "isExport": false, "required": false, "queryWhere": "LIKE", "isAllowNull": "YES", "defaultValue": ""}, {"dc": "状态", "id": 6, "name": "status", "extra": "", "index": "", "goName": "TestCategoryStatus", "goType": "int", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "testCategoryStatus", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "SMALLINT(1)", "dataType": "SMALLINT", "dictType": 0, "formMode": "", "formRole": "", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 1}, {"dc": "创建时间", "id": 7, "name": "created_at", "extra": "", "index": "", "goName": "TestCategoryCreatedAt", "goType": "*gtime.Time", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "testCategoryCreatedAt", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": 0, "formMode": "", "formRole": "", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": ""}, {"dc": "修改时间", "id": 8, "name": "updated_at", "extra": "", "index": "", "goName": "TestCategoryUpdatedAt", "goType": "*gtime.Time", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "testCategoryUpdatedAt", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": 0, "formMode": "", "formRole": "", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": ""}, {"dc": "删除时间", "id": 9, "name": "deleted_at", "extra": "", "index": "", "goName": "TestCategoryDeletedAt", "goType": "*gtime.Time", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "testCategoryDeletedAt", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": 0, "formMode": "", "formRole": "", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": ""}], "daoName": "TestCategory", "linkMode": 1, "linkTable": "hg_test_category", "masterField": "category_id"}], "menu": {"pid": 2366, "icon": "", "sort": 10}, "tree": {"styleType": 1, "titleColumn": null}, "autoOps": ["genMenuPermissions", "runDao", "runService", "forcedCover"], "headOps": ["add", "batchDel", "export"], "funcDict": {"labelColumn": "title", "valueColumn": "id"}, "columnOps": ["edit", "del", "switch", "check", "status"], "presetStep": {"formGridCols": 2}}', 'default', 'hg_sys_gen_curd_demo', 'CURD列表', 'SysGenCurdDemo', '[{"dc": "ID", "id": 1, "name": "id", "align": "left", "extra": "auto_increment", "index": "PRI", "width": 50, "goName": "Id", "goType": "int64", "isEdit": false, "isList": true, "isSort": true, "length": 0, "tsName": "id", "tsType": "number", "unique": false, "isQuery": true, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "Input", "formRole": "none", "isExport": true, "required": true, "queryWhere": "=", "isAllowNull": "NO", "defaultValue": 0, "formGridSpan": 1}, {"dc": "测试分类", "id": 2, "name": "category_id", "align": "left", "extra": "", "index": "", "width": 100, "goName": "CategoryId", "goType": "int64", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "categoryId", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": -300004223237244, "formMode": "Select", "formRole": "none", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "NO", "defaultValue": 0, "formGridSpan": 1}, {"dc": "标题", "id": 3, "name": "title", "align": "left", "extra": "", "index": "", "width": 150, "goName": "Title", "goType": "string", "isEdit": true, "isList": true, "isSort": false, "length": 64, "tsName": "title", "tsType": "string", "unique": false, "isQuery": true, "sqlType": "varchar(64)", "dataType": "varchar", "dictType": null, "formMode": "Input", "formRole": "none", "isExport": true, "required": true, "queryWhere": "LIKE %...%", "isAllowNull": "NO", "defaultValue": "", "formGridSpan": 1}, {"dc": "描述", "id": 4, "name": "description", "align": "left", "extra": "", "index": "", "width": 300, "goName": "Description", "goType": "string", "isEdit": true, "isList": true, "isSort": false, "length": 255, "tsName": "description", "tsType": "string", "unique": false, "isQuery": true, "sqlType": "varchar(255)", "dataType": "varchar", "dictType": null, "formMode": "InputTextarea", "formRole": "none", "isExport": true, "required": true, "queryWhere": "LIKE %...%", "isAllowNull": "NO", "defaultValue": "", "formGridSpan": 2}, {"dc": "内容", "id": 5, "name": "content", "align": "left", "extra": "", "index": "", "width": null, "goName": "Content", "goType": "string", "isEdit": true, "isList": false, "isSort": false, "length": 65535, "tsName": "content", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "text", "dataType": "text", "dictType": null, "formMode": "InputEditor", "formRole": "none", "isExport": false, "required": true, "queryWhere": "LIKE %...%", "isAllowNull": "NO", "defaultValue": "", "formGridSpan": 2}, {"dc": "单图", "id": 6, "name": "image", "align": "left", "extra": "", "index": "", "width": 100, "goName": "Image", "goType": "string", "isEdit": true, "isList": true, "isSort": false, "length": 255, "tsName": "image", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "varchar(255)", "dataType": "varchar", "dictType": null, "formMode": "UploadImage", "formRole": "none", "isExport": true, "required": false, "queryWhere": "LIKE", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "附件", "id": 7, "name": "attachfile", "align": "left", "extra": "", "index": "", "width": 100, "goName": "Attachfile", "goType": "string", "isEdit": true, "isList": true, "isSort": false, "length": 255, "tsName": "attachfile", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "varchar(255)", "dataType": "varchar", "dictType": null, "formMode": "UploadFile", "formRole": "none", "isExport": true, "required": false, "queryWhere": "LIKE", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "所在城市", "id": 8, "name": "city_id", "align": "left", "extra": "", "index": "", "width": null, "goName": "CityId", "goType": "int64", "isEdit": true, "isList": false, "isSort": false, "length": 0, "tsName": "cityId", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "CitySelector", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 1}, {"dc": "显示开关", "id": 9, "name": "switch", "align": "left", "extra": "", "index": "", "width": 150, "goName": "Switch", "goType": "int", "isEdit": true, "isList": true, "isSort": false, "length": 0, "tsName": "switch", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "int(11)", "dataType": "int", "dictType": null, "formMode": "Switch", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 1, "formGridSpan": 1}, {"dc": "排序", "id": 10, "name": "sort", "align": "left", "extra": "", "index": "", "width": 100, "goName": "Sort", "goType": "int", "isEdit": true, "isList": true, "isSort": true, "length": 0, "tsName": "sort", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "int(11)", "dataType": "int", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": true, "queryWhere": "=", "isAllowNull": "NO", "defaultValue": 0, "formGridSpan": 1}, {"dc": "状态", "id": 11, "name": "status", "align": "left", "extra": "", "index": "", "width": 100, "goName": "Status", "goType": "int", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "status", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "SMALLINT(1)", "dataType": "SMALLINT", "dictType": 3, "formMode": "Select", "formRole": "none", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 1, "formGridSpan": 1}, {"dc": "创建者", "id": 12, "name": "created_by", "align": "left", "extra": "", "index": "", "width": 150, "goName": "CreatedBy", "goType": "int64", "isEdit": false, "isList": true, "isSort": false, "length": 0, "tsName": "createdBy", "tsType": "number", "unique": false, "isQuery": true, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 1}, {"dc": "更新者", "id": 13, "name": "updated_by", "align": "left", "extra": "", "index": "", "width": 150, "goName": "UpdatedBy", "goType": "int64", "isEdit": false, "isList": true, "isSort": false, "length": 0, "tsName": "updatedBy", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 1}, {"dc": "删除者", "id": 14, "name": "deleted_by", "align": "left", "extra": "", "index": "", "width": null, "goName": "DeletedBy", "goType": "int64", "isEdit": false, "isList": true, "isSort": false, "length": 0, "tsName": "deletedBy", "tsType": "number", "unique": false, "isQuery": true, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 1}, {"dc": "创建时间", "id": 14, "name": "created_at", "align": "left", "extra": "", "index": "", "width": 180, "goName": "CreatedAt", "goType": "*gtime.Time", "isEdit": false, "isList": true, "isSort": false, "length": 0, "tsName": "createdAt", "tsType": "string", "unique": false, "isQuery": true, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "TimeRange", "formRole": "none", "isExport": true, "required": false, "queryWhere": "BETWEEN", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "修改时间", "id": 15, "name": "updated_at", "align": "left", "extra": "", "index": "", "width": 180, "goName": "UpdatedAt", "goType": "*gtime.Time", "isEdit": false, "isList": true, "isSort": false, "length": 0, "tsName": "updatedAt", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "Time", "formRole": "none", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "删除时间", "id": 16, "name": "deleted_at", "align": "left", "extra": "", "index": "", "width": null, "goName": "DeletedAt", "goType": "*gtime.Time", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "deletedAt", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "Time", "formRole": "none", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}]', '', 1, '2023-01-18 11:51:22', '2024-08-27 18:45:04'), + (8, 10, 0, 'TestCategory', '{"join": [], "menu": {"pid": 2366, "icon": "", "sort": 1000}, "tree": {"styleType": 1, "titleColumn": null}, "autoOps": ["genMenuPermissions", "runService", "genFuncDict", "forcedCover"], "headOps": ["add", "batchDel"], "funcDict": {"labelColumn": "name", "valueColumn": "id"}, "columnOps": ["edit", "del", "check", "status"], "presetStep": {"formGridCols": 2}}', 'default', 'hg_test_category', '测试分类', 'TestCategory', '[{"dc": "分类ID", "id": 1, "name": "id", "align": "left", "extra": "auto_increment", "index": "PRI", "width": 80, "goName": "Id", "goType": "int64", "isEdit": false, "isList": true, "isSort": true, "length": 0, "tsName": "id", "tsType": "number", "unique": false, "isQuery": true, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": true, "queryWhere": "=", "isAllowNull": "NO", "defaultValue": 0, "formGridSpan": 2}, {"dc": "分类名称", "id": 2, "name": "name", "align": "left", "extra": "", "index": "", "width": null, "goName": "Name", "goType": "string", "isEdit": true, "isList": true, "isSort": false, "length": 255, "tsName": "name", "tsType": "string", "unique": false, "isQuery": true, "sqlType": "varchar(255)", "dataType": "varchar", "dictType": null, "formMode": "Input", "formRole": "none", "isExport": true, "required": true, "queryWhere": "LIKE %...%", "isAllowNull": "NO", "defaultValue": "", "formGridSpan": 2}, {"dc": "简称", "id": 3, "name": "short_name", "align": "left", "extra": "", "index": "", "width": 80, "goName": "ShortName", "goType": "string", "isEdit": true, "isList": true, "isSort": false, "length": 128, "tsName": "shortName", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "varchar(128)", "dataType": "varchar", "dictType": null, "formMode": "Input", "formRole": "none", "isExport": true, "required": false, "queryWhere": "LIKE", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 2}, {"dc": "描述", "id": 3, "name": "description", "align": "left", "extra": "", "index": "", "width": 300, "goName": "Description", "goType": "string", "isEdit": true, "isList": true, "isSort": false, "length": 255, "tsName": "description", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "varchar(255)", "dataType": "varchar", "dictType": null, "formMode": "InputTextarea", "formRole": "none", "isExport": true, "required": false, "queryWhere": "LIKE", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 2}, {"dc": "排序", "id": 4, "name": "sort", "align": "left", "extra": "", "index": "", "width": null, "goName": "Sort", "goType": "int", "isEdit": true, "isList": false, "isSort": true, "length": 0, "tsName": "sort", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "int(11)", "dataType": "int", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": true, "queryWhere": "=", "isAllowNull": "NO", "defaultValue": 0, "formGridSpan": 1}, {"dc": "状态", "id": 6, "name": "status", "align": "left", "extra": "", "index": "", "width": null, "goName": "Status", "goType": "int", "isEdit": true, "isList": true, "isSort": false, "length": 0, "tsName": "status", "tsType": "number", "unique": false, "isQuery": true, "sqlType": "SMALLINT(1)", "dataType": "SMALLINT", "dictType": 3, "formMode": "Select", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 1, "formGridSpan": 1}, {"dc": "备注", "id": 5, "name": "remark", "align": "left", "extra": "", "index": "", "width": null, "goName": "Remark", "goType": "string", "isEdit": true, "isList": false, "isSort": false, "length": 255, "tsName": "remark", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "varchar(255)", "dataType": "varchar", "dictType": null, "formMode": "InputTextarea", "formRole": "none", "isExport": true, "required": false, "queryWhere": "LIKE", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 2}, {"dc": "创建时间", "id": 7, "name": "created_at", "align": "left", "extra": "", "index": "", "width": 180, "goName": "CreatedAt", "goType": "*gtime.Time", "isEdit": false, "isList": true, "isSort": false, "length": 0, "tsName": "createdAt", "tsType": "string", "unique": false, "isQuery": true, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "TimeRange", "formRole": "none", "isExport": true, "required": false, "queryWhere": "BETWEEN", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "修改时间", "id": 8, "name": "updated_at", "align": "left", "extra": "", "index": "", "width": null, "goName": "UpdatedAt", "goType": "*gtime.Time", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "updatedAt", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "Time", "formRole": "none", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "删除时间", "id": 9, "name": "deleted_at", "align": "left", "extra": "", "index": "", "width": null, "goName": "DeletedAt", "goType": "*gtime.Time", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "deletedAt", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "Time", "formRole": "none", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}]', 'hgexample', 1, '2024-04-08 15:18:07', '2024-07-20 21:41:45'), + (9, 11, 0, 'NormalTreeDemo', '{"join": [], "menu": {"pid": 2366, "icon": "", "sort": 200}, "tree": {"styleType": 1, "titleColumn": "title"}, "autoOps": ["genMenuPermissions", "runDao", "runService", "forcedCover"], "headOps": ["add", "batchDel"], "funcDict": {"labelColumn": null, "valueColumn": null}, "columnOps": ["edit", "del", "check"], "presetStep": {"formGridCols": 2}}', 'default', 'hg_sys_gen_tree_demo', '普通树表', 'SysGenTreeDemo', '[{"dc": "标题", "id": 6, "name": "title", "align": "left", "extra": "", "index": "", "width": 200, "goName": "Title", "goType": "string", "isEdit": true, "isList": true, "isSort": false, "length": 64, "tsName": "title", "tsType": "string", "unique": false, "isQuery": true, "sqlType": "varchar(64)", "dataType": "varchar", "dictType": null, "formMode": "Input", "formRole": "none", "isExport": true, "required": true, "queryWhere": "LIKE %...%", "isAllowNull": "NO", "defaultValue": "", "formGridSpan": 2}, {"dc": "ID", "id": 1, "name": "id", "align": "left", "extra": "auto_increment", "index": "PRI", "width": 100, "goName": "Id", "goType": "int64", "isEdit": false, "isList": false, "isSort": true, "length": 0, "tsName": "id", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": true, "queryWhere": "=", "isAllowNull": "NO", "defaultValue": 0, "formGridSpan": 1}, {"dc": "上级", "id": 2, "name": "pid", "align": "left", "extra": "", "index": "", "width": 100, "goName": "Pid", "goType": "int64", "isEdit": true, "isList": false, "isSort": false, "length": 0, "tsName": "pid", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 2}, {"dc": "关系树级别", "id": 3, "name": "level", "align": "left", "extra": "", "index": "", "width": null, "goName": "Level", "goType": "int", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "level", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "int(11)", "dataType": "int", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 1, "formGridSpan": 1}, {"dc": "关系树", "id": 4, "name": "tree", "align": "left", "extra": "", "index": "", "width": null, "goName": "Tree", "goType": "string", "isEdit": false, "isList": false, "isSort": false, "length": 4294967295, "tsName": "tree", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "longtext", "dataType": "longtext", "dictType": null, "formMode": "InputEditor", "formRole": "none", "isExport": false, "required": false, "queryWhere": "LIKE %...%", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "测试分类", "id": 5, "name": "category_id", "align": "left", "extra": "", "index": "", "width": 100, "goName": "CategoryId", "goType": "int64", "isEdit": true, "isList": true, "isSort": false, "length": 0, "tsName": "categoryId", "tsType": "number", "unique": false, "isQuery": true, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": -300004223237244, "formMode": "Select", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 2}, {"dc": "描述", "id": 7, "name": "description", "align": "left", "extra": "", "index": "", "width": 300, "goName": "Description", "goType": "string", "isEdit": true, "isList": true, "isSort": false, "length": 255, "tsName": "description", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "varchar(255)", "dataType": "varchar", "dictType": null, "formMode": "Input", "formRole": "none", "isExport": true, "required": false, "queryWhere": "LIKE", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 2}, {"dc": "排序", "id": 8, "name": "sort", "align": "left", "extra": "", "index": "", "width": 100, "goName": "Sort", "goType": "int", "isEdit": true, "isList": false, "isSort": true, "length": 0, "tsName": "sort", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "int(11)", "dataType": "int", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 1}, {"dc": "状态", "id": 9, "name": "status", "align": "left", "extra": "", "index": "", "width": 150, "goName": "Status", "goType": "int", "isEdit": true, "isList": true, "isSort": false, "length": 0, "tsName": "status", "tsType": "number", "unique": false, "isQuery": true, "sqlType": "SMALLINT(1)", "dataType": "SMALLINT", "dictType": 3, "formMode": "Select", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 1, "formGridSpan": 1}, {"dc": "创建者", "id": 10, "name": "created_by", "align": "left", "extra": "", "index": "", "width": 100, "goName": "CreatedBy", "goType": "int64", "isEdit": false, "isList": true, "isSort": false, "length": 0, "tsName": "createdBy", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 1}, {"dc": "更新者", "id": 11, "name": "updated_by", "align": "left", "extra": "", "index": "", "width": 100, "goName": "UpdatedBy", "goType": "int64", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "updatedBy", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 1}, {"dc": "创建时间", "id": 12, "name": "created_at", "align": "left", "extra": "", "index": "", "width": 180, "goName": "CreatedAt", "goType": "*gtime.Time", "isEdit": false, "isList": true, "isSort": false, "length": 0, "tsName": "createdAt", "tsType": "string", "unique": false, "isQuery": true, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "TimeRange", "formRole": "none", "isExport": true, "required": false, "queryWhere": "BETWEEN", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "修改时间", "id": 13, "name": "updated_at", "align": "left", "extra": "", "index": "", "width": 180, "goName": "UpdatedAt", "goType": "*gtime.Time", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "updatedAt", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "Time", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "删除时间", "id": 14, "name": "deleted_at", "align": "left", "extra": "", "index": "", "width": null, "goName": "DeletedAt", "goType": "*gtime.Time", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "deletedAt", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "Time", "formRole": "none", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}]', '', 1, '2024-04-09 16:06:13', '2024-07-25 16:34:59'), + (10, 11, 0, 'OptionTreeDemo', '{"join": [], "menu": {"pid": 2366, "icon": "", "sort": 300}, "tree": {"styleType": 2, "titleColumn": "title"}, "autoOps": ["genMenuPermissions", "runDao", "runService", "forcedCover"], "headOps": ["add", "batchDel"], "funcDict": {"labelColumn": null, "valueColumn": null}, "columnOps": ["edit", "del", "check"], "presetStep": {"formGridCols": 2}}', 'default', 'hg_sys_gen_tree_demo', '选项树表', 'SysGenTreeDemo', '[{"dc": "标题", "id": 6, "name": "title", "align": "left", "extra": "", "index": "", "width": 100, "goName": "Title", "goType": "string", "isEdit": true, "isList": true, "isSort": false, "length": 64, "tsName": "title", "tsType": "string", "unique": false, "isQuery": true, "sqlType": "varchar(64)", "dataType": "varchar", "dictType": null, "formMode": "Input", "formRole": "none", "isExport": true, "required": true, "queryWhere": "LIKE %...%", "isAllowNull": "NO", "defaultValue": "", "formGridSpan": 2}, {"dc": "ID", "id": 1, "name": "id", "align": "left", "extra": "auto_increment", "index": "PRI", "width": 100, "goName": "Id", "goType": "int64", "isEdit": false, "isList": false, "isSort": true, "length": 0, "tsName": "id", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": true, "queryWhere": "=", "isAllowNull": "NO", "defaultValue": 0, "formGridSpan": 1}, {"dc": "上级", "id": 2, "name": "pid", "align": "left", "extra": "", "index": "", "width": 100, "goName": "Pid", "goType": "int64", "isEdit": true, "isList": false, "isSort": false, "length": 0, "tsName": "pid", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 2}, {"dc": "关系树级别", "id": 3, "name": "level", "align": "left", "extra": "", "index": "", "width": null, "goName": "Level", "goType": "int", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "level", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "int(11)", "dataType": "int", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 1, "formGridSpan": 1}, {"dc": "关系树", "id": 4, "name": "tree", "align": "left", "extra": "", "index": "", "width": null, "goName": "Tree", "goType": "string", "isEdit": false, "isList": false, "isSort": false, "length": 4294967295, "tsName": "tree", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "longtext", "dataType": "longtext", "dictType": 3, "formMode": "SelectMultiple", "formRole": "none", "isExport": false, "required": false, "queryWhere": "LIKE %...%", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "测试分类", "id": 5, "name": "category_id", "align": "left", "extra": "", "index": "", "width": 100, "goName": "CategoryId", "goType": "int64", "isEdit": true, "isList": true, "isSort": false, "length": 0, "tsName": "categoryId", "tsType": "number", "unique": false, "isQuery": true, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": -300004223237244, "formMode": "Select", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 2}, {"dc": "描述", "id": 7, "name": "description", "align": "left", "extra": "", "index": "", "width": 300, "goName": "Description", "goType": "string", "isEdit": true, "isList": false, "isSort": false, "length": 255, "tsName": "description", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "varchar(255)", "dataType": "varchar", "dictType": null, "formMode": "Input", "formRole": "none", "isExport": false, "required": false, "queryWhere": "LIKE", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 2}, {"dc": "排序", "id": 8, "name": "sort", "align": "left", "extra": "", "index": "", "width": 100, "goName": "Sort", "goType": "int", "isEdit": true, "isList": false, "isSort": true, "length": 0, "tsName": "sort", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "int(11)", "dataType": "int", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 1}, {"dc": "状态", "id": 9, "name": "status", "align": "left", "extra": "", "index": "", "width": 150, "goName": "Status", "goType": "int", "isEdit": true, "isList": true, "isSort": false, "length": 0, "tsName": "status", "tsType": "number", "unique": false, "isQuery": true, "sqlType": "SMALLINT(1)", "dataType": "SMALLINT", "dictType": 3, "formMode": "Select", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 1, "formGridSpan": 1}, {"dc": "创建者", "id": 10, "name": "created_by", "align": "left", "extra": "", "index": "", "width": 100, "goName": "CreatedBy", "goType": "int64", "isEdit": false, "isList": true, "isSort": false, "length": 0, "tsName": "createdBy", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 1}, {"dc": "更新者", "id": 11, "name": "updated_by", "align": "left", "extra": "", "index": "", "width": 100, "goName": "UpdatedBy", "goType": "int64", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "updatedBy", "tsType": "number", "unique": false, "isQuery": false, "sqlType": "bigint(20)", "dataType": "bigint", "dictType": null, "formMode": "InputNumber", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": 0, "formGridSpan": 1}, {"dc": "创建时间", "id": 12, "name": "created_at", "align": "left", "extra": "", "index": "", "width": 180, "goName": "CreatedAt", "goType": "*gtime.Time", "isEdit": false, "isList": true, "isSort": false, "length": 0, "tsName": "createdAt", "tsType": "string", "unique": false, "isQuery": true, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "TimeRange", "formRole": "none", "isExport": true, "required": false, "queryWhere": "BETWEEN", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "修改时间", "id": 13, "name": "updated_at", "align": "left", "extra": "", "index": "", "width": 180, "goName": "UpdatedAt", "goType": "*gtime.Time", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "updatedAt", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "Time", "formRole": "none", "isExport": true, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}, {"dc": "删除时间", "id": 14, "name": "deleted_at", "align": "left", "extra": "", "index": "", "width": null, "goName": "DeletedAt", "goType": "*gtime.Time", "isEdit": false, "isList": false, "isSort": false, "length": 0, "tsName": "deletedAt", "tsType": "string", "unique": false, "isQuery": false, "sqlType": "TIMESTAMP", "dataType": "TIMESTAMP", "dictType": null, "formMode": "Time", "formRole": "none", "isExport": false, "required": false, "queryWhere": "=", "isAllowNull": "YES", "defaultValue": "", "formGridSpan": 1}]', '', 1, '2024-04-09 17:20:33', '2024-07-25 16:35:34'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_gen_curd_demo` +-- + +INSERT INTO hg_sys_gen_curd_demo (id, category_id, title, description, content, image, attachfile, city_id, switch, sort, status, created_by, updated_by, deleted_by, created_at, updated_at, deleted_at) VALUES + (1, 1, '测试标题', '这是一个CRUD生成演示,关联测试分类', '

不知道写点啥!



', 'https://gmycos.facms.cn/hotgo/attachment/2023-02-09/cqdqamvhlq4w3ki6bl.webp', '["http://localhost:8000/attachment/2024-07-25/d2yh86z5wxgoyuuyv7.png","http://localhost:8000/attachment/2024-07-25/d2yh88mewqkovxgk0l.png"]', 120102, 1, 10, 1, 1, 1, NULL, '2022-12-15 19:30:14', '2024-07-25 16:28:31', NULL); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_gen_tree_demo` +-- + +INSERT INTO hg_sys_gen_tree_demo (id, pid, level, tree, category_id, title, description, sort, status, created_by, updated_by, created_at, updated_at, deleted_at) VALUES + (1, 0, 1, NULL, 1, '道生一', '这是一个普通树形表格的生成演示。', 10, 1, 1, 1, '2022-12-15 19:30:14', '2024-07-20 23:38:07', NULL), + (14, 1, 2, 'tr_1 ', 1, '一生二', '', 20, 1, 1, 1, '2024-04-09 17:07:55', '2024-07-21 00:20:15', NULL), + (15, 14, 3, 'tr_1 tr_14 ', 2, '二生三', '', 30, 1, 1, 1, '2024-04-09 17:08:03', '2024-07-21 00:17:21', NULL), + (16, 15, 4, 'tr_1 tr_14 tr_15 ', 4, '三生万物', '', 40, 1, 1, 1, '2024-04-09 17:13:54', '2024-07-21 00:17:24', NULL), + (17, 0, 1, '', 1, '一帆风顺', '', 50, 1, 1, 1, '2024-04-09 17:24:58', '2024-07-21 00:18:13', NULL), + (19, 17, 2, 'tr_17 ', 1, '二龙戏珠', '', 60, 1, 1, 1, '2024-04-09 17:27:40', '2024-07-21 00:17:30', NULL), + (20, 19, 3, 'tr_17 tr_19 ', 1, '三心二意', '', 70, 1, 1, 1, '2024-04-09 17:27:44', '2024-07-21 00:17:33', NULL); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 `hg_sys_provinces` +-- + +INSERT INTO hg_sys_provinces (id, title, pinyin, lng, lat, pid, level, tree, sort, status, created_at, updated_at) VALUES + (810000, '香港特别行政区', 'X', '114.18612410257', '22.29358599328', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810100, '九龙', 'J', '101.51341566718', '29.006431902925', 810000, 2, 'tr_0 tr_810000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810101, '观塘区', 'G', '114.23743100142', '22.316803500017', 810100, 3, 'tr_0 tr_810000 tr_810100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810102, '黄大仙区', 'H', '114.2055528338', '22.344516581114', 810100, 3, 'tr_0 tr_810000 tr_810100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810103, '九龙城区', 'J', '114.19855413557', '22.325722838593', 810100, 3, 'tr_0 tr_810000 tr_810100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810104, '深水埗区', 'S', '114.17556515012', '22.334814518942', 810100, 3, 'tr_0 tr_810000 tr_810100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810105, '油尖旺区', 'Y', '114.17854456', '22.306583887776', 810100, 3, 'tr_0 tr_810000 tr_810100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810200, '香港岛', 'X', '114.1838696432', '22.272099587606', 810000, 2, 'tr_0 tr_810000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810201, '东区', 'D', '114.03675495515', '32.983906128946', 810200, 3, 'tr_0 tr_810000 tr_810200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810202, '南区', 'N', '114.18612410257', '22.29358599328', 810200, 3, 'tr_0 tr_810000 tr_810200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810203, '湾仔区', 'W', '114.1838696432', '22.272099587606', 810200, 3, 'tr_0 tr_810000 tr_810200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810204, '中西区', 'Z', '114.15949141031', '22.291342714292', 810200, 3, 'tr_0 tr_810000 tr_810200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810300, '新界', 'X', '114.18612410257', '22.29358599328', 810000, 2, 'tr_0 tr_810000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810301, '北区', 'B', '114.56208137457', '38.029818054403', 810300, 3, 'tr_0 tr_810000 tr_810300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810302, '大埔区', 'D', '114.14670082713', '22.427434108219', 810300, 3, 'tr_0 tr_810000 tr_810300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810303, '葵青区', 'K', '114.14347453324', '22.36661881253', 810300, 3, 'tr_0 tr_810000 tr_810300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810304, '离岛区', 'L', '113.95154733906', '22.286066480198', 810300, 3, 'tr_0 tr_810000 tr_810300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810305, '荃湾区', 'Q', '114.126440954', '22.378243962528', 810300, 3, 'tr_0 tr_810000 tr_810300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810306, '沙田区', 'S', '114.19855144065', '22.388522255034', 810300, 3, 'tr_0 tr_810000 tr_810300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810307, '屯门区', 'T', '113.98745602385', '22.393584799271', 810300, 3, 'tr_0 tr_810000 tr_810300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810308, '西贡区', 'X', '114.28352485373', '22.385077305939', 810300, 3, 'tr_0 tr_810000 tr_810300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (810309, '元朗区', 'Y', '114.03850969037', '22.448564780865', 810300, 3, 'tr_0 tr_810000 tr_810300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (820000, '澳门特别行政区', 'A', '113.55751910182', '22.204117988443', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (820100, '离岛', 'L', '113.55751910182', '22.204117988443', 820000, 2, 'tr_0 tr_820000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (820101, '嘉模堂区', 'J', '113.56551473951', '22.163142309955', 820100, 3, 'tr_0 tr_820000 tr_820100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (820102, '路氹填海区', 'L', '113.95154733906', '22.286066480198', 820100, 3, 'tr_0 tr_820000 tr_820100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (820103, '圣方济各堂区', 'S', '113.95154733906', '22.286066480198', 820100, 3, 'tr_0 tr_820000 tr_820100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (820200, '澳门半岛', 'A', '113.56643233517', '22.195004159218', 820000, 2, 'tr_0 tr_820000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (820201, '大堂区', 'D', '113.55648488269', '22.18919700752', 820200, 3, 'tr_0 tr_820000 tr_820200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (820202, '风顺堂区', 'F', '113.54545108595', '22.192783044934', 820200, 3, 'tr_0 tr_820000 tr_820200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (820203, '花地玛堂区', 'H', '113.55751029843', '22.212783524768', 820200, 3, 'tr_0 tr_820000 tr_820200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (820204, '花王堂区', 'H', '113.5544936987', '22.206635725923', 820200, 3, 'tr_0 tr_820000 tr_820200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (820205, '望德堂区', 'W', '113.5615137766', '22.202511136588', 820200, 3, 'tr_0 tr_820000 tr_820200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830000, '台湾省', 'T', '121.97387097872', '24.086956718805', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830100, '台北市', 'T', '121.5201088108', '25.063029935612', 830000, 2, 'tr_0 tr_830000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830101, '中正区', 'Z', '121.5201088108', '25.063029935612', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830102, '大同区', 'D', '124.81937675979', '46.045583951311', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830103, '中山区', 'Z', '121.65154739367', '38.924511115496', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830104, '万华区', 'W', '121.5201088108', '25.063029935612', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830105, '信义区', 'X', '121.5201088108', '25.063029935612', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830106, '松山区', 'S', '118.9394138505', '42.292481572694', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830107, '大安区', 'D', '104.78041635328', '29.369928541322', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830108, '南港区', 'N', '121.5201088108', '25.063029935612', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830109, '北投区', 'B', '121.5201088108', '25.063029935612', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830110, '内湖区', 'N', '121.5201088108', '25.063029935612', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830111, '士林区', 'S', '121.5201088108', '25.063029935612', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830112, '文山区', 'W', '121.5201088108', '25.063029935612', 830100, 3, 'tr_0 tr_830000 tr_830100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830200, '新北市', 'X', '121.97387097872', '24.086956718805', 830000, 2, 'tr_0 tr_830000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830201, '板桥区', 'B', '121.46374631322', '25.009264935203', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830202, '土城区', 'T', '121.45638215646', '24.969575575642', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830203, '新庄区', 'X', '121.44987794847', '25.035900513246', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830204, '新店区', 'X', '121.54851057293', '24.931579077246', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830205, '深坑区', 'S', '121.63248449446', '25.000182732355', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830206, '石碇区', 'S', '121.64666268478', '24.953083429509', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830207, '坪林区', 'P', '121.73478767877', '24.915696554977', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830208, '乌来区', 'W', '121.53050817209', '24.786532168822', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830209, '五股区', 'W', '121.44461965429', '25.100233770435', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830210, '八里区', 'B', '121.40465098523', '25.130119585774', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830211, '林口区', 'L', '121.35894397022', '25.103036147515', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830212, '淡水区', 'D', '121.47260573633', '25.187238161176', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830213, '中和区', 'Z', '119.97751429276', '31.836323947624', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830214, '永和区', 'Y', '121.52736966421', '25.010500528231', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830215, '三重区', 'S', '121.49687574316', '25.069790814298', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830216, '芦洲区', 'L', '121.47982274435', '25.091134839883', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830217, '泰山区', 'T', '117.14141108582', '36.199444601195', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830218, '树林区', 'S', '121.412622083', '24.984757647837', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830219, '莺歌区', 'Y', '121.35899891418', '24.958676651245', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830220, '三峡区', 'S', '121.42609502893', '24.87480469353', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830221, '汐止区', 'X', '121.66100298061', '25.086721897126', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830222, '金山区', 'J', '121.34848004512', '30.74785237657', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830223, '万里区', 'W', '121.66558782234', '25.179420721026', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830224, '三芝区', 'S', '121.53552324466', '25.233947831353', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830225, '石门区', 'S', '121.59364212175', '25.261063301582', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830226, '瑞芳区', 'R', '121.81592241951', '25.092372901641', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830227, '贡寮区', 'G', '121.92278316131', '25.044375645825', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830228, '双溪区', 'S', '121.8310510997', '25.001750367683', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830229, '平溪区', 'P', '121.75897792057', '25.028954662262', 830200, 3, 'tr_0 tr_830000 tr_830200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830300, '桃园市', 'T', '121.97387097872', '24.086956718805', 830000, 2, 'tr_0 tr_830000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830301, '桃园区', 'T', '115.95771247803', '39.980514890446', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830302, '中坜区', 'Z', '115.95771247803', '39.980514890446', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830303, '平镇区', 'P', '115.95771247803', '39.980514890446', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830304, '八德区', 'B', '115.95771247803', '39.980514890446', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830305, '杨梅区', 'Y', '110.86164512823', '21.447395667888', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830306, '芦竹区', 'L', '115.95771247803', '39.980514890446', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830307, '大溪区', 'D', '115.95771247803', '39.980514890446', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830308, '龙潭区', 'L', '126.56854459242', '43.91634255363', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830309, '龟山区', 'G', '115.95771247803', '39.980514890446', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830310, '大园区', 'D', '115.95771247803', '39.980514890446', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830311, '观音区', 'G', '120.42538525561', '36.169241550407', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830312, '新屋区', 'X', '115.95771247803', '39.980514890446', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830313, '复兴区', 'F', '114.44809470749', '36.610368592227', 830300, 3, 'tr_0 tr_830000 tr_830300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830400, '台中市', 'T', '121.97387097872', '24.086956718805', 830000, 2, 'tr_0 tr_830000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830401, '中区', 'Z', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830402, '东区', 'D', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830403, '西区', 'X', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830404, '南区', 'N', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830405, '北区', 'B', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830406, '西屯区', 'X', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830407, '南屯区', 'N', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830408, '北屯区', 'B', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830409, '丰原区', 'F', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830410, '大里区', 'D', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830411, '太平区', 'T', '121.68538413681', '42.016967854141', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830412, '东势区', 'D', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830413, '大甲区', 'D', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830414, '清水区', 'Q', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830415, '沙鹿区', 'S', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830416, '梧栖区', 'W', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830417, '后里区', 'H', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830418, '神冈区', 'S', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830419, '潭子区', 'T', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830420, '大雅区', 'D', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830421, '新小区', 'X', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830422, '石冈区', 'S', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830423, '外埔区', 'W', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830424, '大安区', 'D', '104.78041635328', '29.369928541322', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830425, '乌日区', 'W', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830426, '大肚区', 'D', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830427, '龙井区', 'L', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830428, '雾峰区', 'W', '119.33696304538', '26.091557030419', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830429, '和平区', 'H', '117.2214669949', '39.12339025328', 830400, 3, 'tr_0 tr_830000 tr_830400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830500, '台南市', 'T', '121.97387097872', '24.086956718805', 830000, 2, 'tr_0 tr_830000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830501, '中西区', 'Z', '114.15949141031', '22.291342714292', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830502, '东区', 'D', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830503, '南区', 'N', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830504, '北区', 'B', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830505, '安平区', 'A', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830506, '安南区', 'A', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830507, '永康区', 'Y', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830508, '归仁区', 'G', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830509, '新化区', 'X', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830510, '左镇区', 'Z', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830511, '玉井区', 'Y', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830512, '楠西区', 'N', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830513, '南化区', 'N', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830514, '仁德区', 'R', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830515, '关庙区', 'G', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830516, '龙崎区', 'L', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830517, '官田区', 'G', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830518, '麻豆区', 'M', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830519, '佳里区', 'J', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830520, '西港区', 'X', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830521, '七股区', 'Q', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830522, '将军区', 'J', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830523, '学甲区', 'X', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830524, '北门区', 'B', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830525, '新营区', 'X', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830526, '后壁区', 'H', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830527, '白河区', 'B', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830528, '东山区', 'D', '130.32336109407', '47.344987135573', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830529, '六甲区', 'L', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830530, '下营区', 'X', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830531, '柳营区', 'L', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830532, '盐水区', 'Y', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830533, '善化区', 'S', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830534, '大内区', 'D', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830535, '山上区', 'S', '121.36052796411', '38.965848756262', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830536, '新市区', 'X', '115.41224520287', '38.88118294749', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830537, '安定区', 'A', '104.61650040265', '35.585600016725', 830500, 3, 'tr_0 tr_830000 tr_830500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830600, '高雄市', 'G', '121.97387097872', '24.086956718805', 830000, 2, 'tr_0 tr_830000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830601, '楠梓区', 'N', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830602, '左营区', 'Z', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830603, '鼓山区', 'G', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830604, '三民区', 'S', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830605, '盐埕区', 'Y', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830606, '前金区', 'Q', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830607, '新兴区', 'X', '130.93837086995', '45.822310328543', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830608, '苓雅区', 'L', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830609, '前镇区', 'Q', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830610, '旗津区', 'Q', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830611, '小港区', 'X', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830612, '凤山区', 'F', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830613, '大寮区', 'D', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830614, '鸟松区', 'N', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830615, '林园区', 'L', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830616, '仁武区', 'R', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830617, '大树区', 'D', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830618, '大社区', 'D', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830619, '冈山区', 'G', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830620, '路竹区', 'L', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830621, '桥头区', 'Q', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830622, '梓官区', 'Z', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830623, '弥陀区', 'M', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830624, '永安区', 'Y', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830625, '燕巢区', 'Y', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830626, '阿莲区', 'A', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830627, '茄萣区', 'J', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830628, '湖内区', 'H', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830629, '旗山区', 'Q', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830630, '美浓区', 'M', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830631, '内门区', 'N', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830632, '杉林区', 'S', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830633, '甲仙区', 'J', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830634, '六龟区', 'L', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830635, '茂林区', 'M', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830636, '桃源区', 'T', '114.29349244944', '30.607022895804', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830637, '那玛夏区', 'N', '120.71415692906', '23.273513646073', 830600, 3, 'tr_0 tr_830000 tr_830600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830700, '基隆市', 'J', '121.97387097872', '24.086956718805', 830000, 2, 'tr_0 tr_830000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830701, '中正区', 'Z', '118.53225032938', '24.6210238893', 830700, 3, 'tr_0 tr_830000 tr_830700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830702, '七堵区', 'Q', '118.53225032938', '24.6210238893', 830700, 3, 'tr_0 tr_830000 tr_830700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830703, '暖暖区', 'N', '118.53225032938', '24.6210238893', 830700, 3, 'tr_0 tr_830000 tr_830700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830704, '仁爱区', 'R', '118.53225032938', '24.6210238893', 830700, 3, 'tr_0 tr_830000 tr_830700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830705, '中山区', 'Z', '121.65154739367', '38.924511115496', 830700, 3, 'tr_0 tr_830000 tr_830700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830706, '安乐区', 'A', '118.53225032938', '24.6210238893', 830700, 3, 'tr_0 tr_830000 tr_830700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830707, '信义区', 'X', '118.53225032938', '24.6210238893', 830700, 3, 'tr_0 tr_830000 tr_830700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830800, '新竹市', 'X', '121.97387097872', '24.086956718805', 830000, 2, 'tr_0 tr_830000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830801, '东区', 'D', '119.76701381388', '49.221741849328', 830800, 3, 'tr_0 tr_830000 tr_830800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830802, '北区', 'B', '119.76701381388', '49.221741849328', 830800, 3, 'tr_0 tr_830000 tr_830800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830803, '香山区', 'X', '119.76701381388', '49.221741849328', 830800, 3, 'tr_0 tr_830000 tr_830800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830900, '嘉义市', 'J', '121.97387097872', '24.086956718805', 830000, 2, 'tr_0 tr_830000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830901, '东区', 'D', '114.2466374103', '22.728825804821', 830900, 3, 'tr_0 tr_830000 tr_830900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (830902, '西区', 'X', '114.2466374103', '22.728825804821', 830900, 3, 'tr_0 tr_830000 tr_830900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110000, '北京市', 'B', '116.41338369712', '39.9109245473', 0, 1, '', 0, 1, '2022-10-07 20:42:26', '2023-05-29 16:02:45'), + (120000, '天津市', 'T', '117.21081309155', '39.14392990331', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130000, '河北省', 'H', '114.53659630532', '38.0432016452', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140000, '山西省', 'S', '112.56937550968', '37.879829423856', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150000, '内蒙古自治区', 'N', '111.77260583082', '40.823156232446', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210000, '辽宁省', 'L', '123.43559785683', '41.841465251202', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220000, '吉林省', 'J', '125.33257987515', '43.901714435444', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230000, '黑龙江省', 'H', '126.66965282042', '45.747929837435', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310000, '上海市', 'S', '121.48053886018', '31.235929042252', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320000, '江苏省', 'J', '118.76955164467', '32.066776944293', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330000, '浙江省', 'Z', '120.15953308739', '30.271548393337', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340000, '安徽省', 'A', '117.33054041772', '31.734294156317', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350000, '福建省', 'F', '119.30244747704', '26.106339415901', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360000, '江西省', 'J', '115.91542320365', '28.681690516761', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370000, '山东省', 'S', '117.02744162848', '36.674856650405', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410000, '河南省', 'H', '113.75938408486', '34.771712921931', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420000, '湖北省', 'H', '114.34844073659', '30.551600064658', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430000, '湖南省', 'H', '112.98960254335', '28.118269998009', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440000, '广东省', 'G', '113.27242891273', '23.137948556539', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450000, '广西壮族自治区', 'G', '108.33452122944', '22.821268997909', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460000, '海南省', 'H', '110.35553651088', '20.025801964463', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500000, '重庆市', 'Z', '106.55843415538', '29.568996245339', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510000, '四川省', 'S', '104.07346654728', '30.577543147015', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520000, '贵州省', 'G', '106.71447593089', '26.604029544995', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530000, '云南省', 'Y', '102.71641607523', '25.051562267345', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540000, '西藏自治区', 'X', '91.124342128993', '29.652893647473', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610000, '陕西省', 'S', '108.96039314875', '34.275808006024', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620000, '甘肃省', 'G', '103.83247812812', '36.065464887368', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630000, '青海省', 'Q', '101.78646183587', '36.627158579235', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640000, '宁夏回族自治区', 'N', '106.26560480701', '38.476877967911', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650000, '新疆维吾尔自治区', 'X', '87.633473205738', '43.79923810129', 0, 1, 'tr_0 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110100, '市辖区', 'S', '116.41338369712', '39.9109245473', 110000, 2, 'tr_0 tr_110000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120100, '市辖区', 'S', '117.21081309155', '39.14392990331', 120000, 2, 'tr_0 tr_120000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140100, '太原市', 'T', '112.55639149167', '37.876989028848', 140000, 2, 'tr_0 tr_140000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140200, '大同市', 'D', '113.30643625859', '40.082468716161', 140000, 2, 'tr_0 tr_140000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140300, '阳泉市', 'Y', '113.58761666288', '37.862360847859', 140000, 2, 'tr_0 tr_140000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140400, '长治市', 'Z', '113.12255886985', '36.201268372155', 140000, 2, 'tr_0 tr_140000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140500, '晋城市', 'J', '112.85857823133', '35.496284586473', 140000, 2, 'tr_0 tr_140000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140600, '朔州市', 'S', '112.43937093967', '39.337108370542', 140000, 2, 'tr_0 tr_140000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140700, '晋中市', 'J', '112.75959475566', '37.69283940976', 140000, 2, 'tr_0 tr_140000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140800, '运城市', 'Y', '111.01338945448', '35.032706912909', 140000, 2, 'tr_0 tr_140000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140900, '忻州市', 'X', '112.74062416024', '38.422383385178', 140000, 2, 'tr_0 tr_140000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141000, '临汾市', 'L', '111.52553022403', '36.09374189542', 140000, 2, 'tr_0 tr_140000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141100, '吕梁市', 'L', '111.15044967529', '37.524497749577', 140000, 2, 'tr_0 tr_140000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150100, '呼和浩特市', 'H', '111.75550856171', '40.848422997113', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150200, '包头市', 'B', '109.84654350721', '40.662928788261', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150300, '乌海市', 'W', '106.80039105', '39.662006364891', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150400, '赤峰市', 'C', '118.89552039752', '42.261686103412', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150500, '通辽市', 'T', '122.25052178738', '43.657980083917', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150600, '鄂尔多斯市', 'E', '109.78744317924', '39.614482313949', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150700, '呼伦贝尔市', 'H', '119.77237049947', '49.218446475565', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150800, '巴彦淖尔市', 'B', '107.39439808372', '40.749359489573', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150900, '乌兰察布市', 'W', '113.13946767446', '41.000748327674', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152200, '兴安盟', 'X', '122.04436452583', '46.088463713219', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152500, '锡林郭勒盟', 'X', '116.05439144075', '43.939422665339', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152900, '阿拉善盟', 'A', '105.73537746449', '38.858275883057', 150000, 2, 'tr_0 tr_150000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210100, '沈阳市', 'S', '123.45598993089', '41.720915668889', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210200, '大连市', 'D', '121.62163148459', '38.918953666786', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210300, '鞍山市', 'A', '123.00137251399', '41.115053596949', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210400, '抚顺市', 'F', '123.96437461561', '41.885969593057', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210500, '本溪市', 'B', '123.69250712421', '41.492916460553', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210600, '丹东市', 'D', '124.36154728159', '40.006408705594', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210700, '锦州市', 'J', '121.13259630056', '41.100931499462', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210800, '营口市', 'Y', '122.2415746645', '40.673136838267', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210900, '阜新市', 'F', '121.67640799866', '42.028021901318', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211000, '辽阳市', 'L', '123.24336640651', '41.274161290454', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211100, '盘锦市', 'P', '122.07322781023', '41.141248022956', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211200, '铁岭市', 'T', '123.73236520918', '42.229947997184', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211300, '朝阳市', 'C', '120.45749949793', '41.579820864756', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211400, '葫芦岛市', 'H', '120.84339833993', '40.717364436362', 210000, 2, 'tr_0 tr_210000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220100, '长春市', 'Z', '125.33060207591', '43.821953501043', 220000, 2, 'tr_0 tr_220000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220200, '吉林市', 'J', '126.55563450495', '43.843567834579', 220000, 2, 'tr_0 tr_220000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220300, '四平市', 'S', '124.35648155716', '43.171993571561', 220000, 2, 'tr_0 tr_220000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220400, '辽源市', 'L', '125.15042516689', '42.894055005746', 220000, 2, 'tr_0 tr_220000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220500, '通化市', 'T', '125.94660627598', '41.733815801613', 220000, 2, 'tr_0 tr_220000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220600, '白山市', 'B', '126.42963008938', '41.939627205329', 220000, 2, 'tr_0 tr_220000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220700, '松原市', 'S', '124.83148187569', '45.147404193414', 220000, 2, 'tr_0 tr_220000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220800, '白城市', 'B', '122.8455906085', '45.625504359996', 220000, 2, 'tr_0 tr_220000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (222400, '延边朝鲜族自治州', 'Y', '129.47737632023', '42.915743033722', 220000, 2, 'tr_0 tr_220000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230100, '哈尔滨市', 'H', '126.54161509032', '45.808825827952', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230200, '齐齐哈尔市', 'Q', '123.92457086842', '47.359977186015', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230300, '鸡西市', 'J', '130.97561865877', '45.300872317824', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230400, '鹤岗市', 'H', '130.30443289867', '47.356056157685', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230500, '双鸭山市', 'S', '131.16534168078', '46.653185895886', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230600, '大庆市', 'D', '125.10865763402', '46.593633176722', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230700, '伊春市', 'Y', '128.8475463802', '47.733318457231', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230800, '佳木斯市', 'J', '130.32735909257', '46.805689990858', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230900, '七台河市', 'Q', '131.01154459103', '45.776300321548', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231000, '牡丹江市', 'M', '129.63953977835', '44.556245708986', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231100, '黑河市', 'H', '127.53548988622', '50.25127231175', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231200, '绥化市', 'S', '126.9753568753', '46.660032179824', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (232700, '大兴安岭地区', 'D', '124.15292785448', '50.420025955028', 230000, 2, 'tr_0 tr_230000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310100, '市辖区', 'S', '121.48053886018', '31.235929042252', 310000, 2, 'tr_0 tr_310000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320100, '南京市', 'N', '118.80242172125', '32.064652885618', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320200, '无锡市', 'W', '120.31858328811', '31.498809732686', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320300, '徐州市', 'X', '117.29057543439', '34.212666550113', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320400, '常州市', 'C', '119.98148471328', '31.815795653328', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320500, '苏州市', 'S', '120.59241222959', '31.303564074442', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320600, '南通市', 'N', '120.90159173866', '31.986549431201', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320700, '连云港市', 'L', '119.22862133317', '34.602249525267', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320800, '淮安市', 'H', '119.02148367071', '33.616295301033', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320900, '盐城市', 'Y', '120.16754426576', '33.355100917626', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321000, '扬州市', 'Y', '119.41941890823', '32.40067693609', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321100, '镇江市', 'Z', '119.43048944567', '32.194715920524', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321200, '泰州市', 'T', '119.92956633785', '32.460675049308', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321300, '宿迁市', 'S', '118.28157403571', '33.96774971569', 320000, 2, 'tr_0 tr_320000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330100, '杭州市', 'H', '120.21551180372', '30.253082981693', 330000, 2, 'tr_0 tr_330000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330200, '宁波市', 'N', '121.62857249434', '29.866033045866', 330000, 2, 'tr_0 tr_330000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330300, '温州市', 'W', '120.70647689036', '28.001085404472', 330000, 2, 'tr_0 tr_330000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330400, '嘉兴市', 'J', '120.76355182586', '30.75097483092', 330000, 2, 'tr_0 tr_330000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330500, '湖州市', 'H', '120.09451660916', '30.898963937294', 330000, 2, 'tr_0 tr_330000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330600, '绍兴市', 'S', '120.58547847885', '30.036369311307', 330000, 2, 'tr_0 tr_330000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330700, '金华市', 'J', '119.65343619053', '29.084639385514', 330000, 2, 'tr_0 tr_330000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330800, '衢州市', 'Q', '118.86659674036', '28.975545802265', 330000, 2, 'tr_0 tr_330000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330900, '舟山市', 'Z', '122.21355631852', '29.99091168016', 330000, 2, 'tr_0 tr_330000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331000, '台州市', 'T', '121.42743470428', '28.662194055996', 330000, 2, 'tr_0 tr_330000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331100, '丽水市', 'L', '119.92957305844', '28.473278180563', 330000, 2, 'tr_0 tr_330000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340100, '合肥市', 'H', '117.23344266498', '31.826577833687', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340200, '芜湖市', 'W', '118.43943137654', '31.358536655799', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340300, '蚌埠市', 'B', '117.39551332814', '32.921523704351', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340400, '淮南市', 'H', '117.00638885072', '32.631847399053', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340500, '马鞍山市', 'M', '118.51357957943', '31.676265597609', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340600, '淮北市', 'H', '116.80453726703', '33.961656300276', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340700, '铜陵市', 'T', '117.81847679446', '30.951233239913', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340800, '安庆市', 'A', '117.06360390492', '30.530956568043', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341000, '黄山市', 'H', '118.34543725315', '29.721889786592', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341100, '滁州市', 'C', '118.33940613597', '32.261270872041', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341200, '阜阳市', 'F', '115.82043612491', '32.896060994852', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341300, '宿州市', 'S', '116.97054394561', '33.652095326452', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341500, '六安市', 'L', '116.52640966419', '31.741450815323', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341600, '亳州市', 'B', '115.78446321127', '33.850642695789', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341700, '池州市', 'C', '117.4984209616', '30.670883790765', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341800, '宣城市', 'X', '118.76553424277', '30.946601545293', 340000, 2, 'tr_0 tr_340000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'); + +INSERT INTO hg_sys_provinces (id, title, pinyin, lng, lat, pid, level, tree, sort, status, created_at, updated_at) VALUES + (350100, '福州市', 'F', '119.30346983854', '26.080429420698', 350000, 2, 'tr_0 tr_350000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350200, '厦门市', 'S', '118.09643549977', '24.485406605176', 350000, 2, 'tr_0 tr_350000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350300, '莆田市', 'P', '119.01452097813', '25.459865455923', 350000, 2, 'tr_0 tr_350000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350400, '三明市', 'S', '117.64552116782', '26.269736515992', 350000, 2, 'tr_0 tr_350000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350500, '泉州市', 'Q', '118.6824462668', '24.879952330498', 350000, 2, 'tr_0 tr_350000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350600, '漳州市', 'Z', '117.65357645299', '24.518929791171', 350000, 2, 'tr_0 tr_350000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350700, '南平市', 'N', '118.18436954814', '26.647772874203', 350000, 2, 'tr_0 tr_350000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350800, '龙岩市', 'L', '117.02344756678', '25.081219844872', 350000, 2, 'tr_0 tr_350000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350900, '宁德市', 'N', '119.55451074543', '26.672241711409', 350000, 2, 'tr_0 tr_350000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360100, '南昌市', 'N', '115.86458944232', '28.689455295061', 360000, 2, 'tr_0 tr_360000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360200, '景德镇市', 'J', '117.18457644639', '29.274247711041', 360000, 2, 'tr_0 tr_360000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360300, '萍乡市', 'P', '113.86149643375', '27.628392709397', 360000, 2, 'tr_0 tr_360000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360400, '九江市', 'J', '116.00753491163', '29.711340559079', 360000, 2, 'tr_0 tr_360000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360500, '新余市', 'X', '114.9235346514', '27.823578697789', 360000, 2, 'tr_0 tr_360000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360600, '鹰潭市', 'Y', '117.07557542703', '28.265787063191', 360000, 2, 'tr_0 tr_360000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360700, '赣州市', 'G', '114.94050337298', '25.835176103498', 360000, 2, 'tr_0 tr_360000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360800, '吉安市', 'J', '115.00051072001', '27.11972682607', 360000, 2, 'tr_0 tr_360000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360900, '宜春市', 'Y', '114.42356367591', '27.820856421848', 360000, 2, 'tr_0 tr_360000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361000, '抚州市', 'F', '116.36453876864', '27.95489225342', 360000, 2, 'tr_0 tr_360000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361100, '上饶市', 'S', '117.94945960312', '28.460625921852', 360000, 2, 'tr_0 tr_360000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370100, '济南市', 'J', '117.12639941261', '36.656554201787', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370200, '青岛市', 'Q', '120.38945519115', '36.072227496663', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370300, '淄博市', 'Z', '118.0614525349', '36.819085683322', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370400, '枣庄市', 'Z', '117.33054194484', '34.815994048435', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370500, '东营市', 'D', '118.68138493514', '37.439641826323', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370600, '烟台市', 'Y', '121.4544154173', '37.470038383731', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370700, '潍坊市', 'W', '119.16837791143', '36.712651551268', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370800, '济宁市', 'J', '116.59361234854', '35.42017739453', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370900, '泰安市', 'T', '117.0944948348', '36.205858044885', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371000, '威海市', 'W', '122.12754097831', '37.516430548015', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371100, '日照市', 'R', '119.53341540457', '35.422838998438', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371200, '莱芜市', 'L', '117.68466691247', '36.233654133647', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371300, '临沂市', 'L', '118.36353300501', '35.110671242365', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371400, '德州市', 'D', '116.36555674397', '37.441308454576', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371500, '聊城市', 'L', '115.9915878483', '36.462758187694', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371600, '滨州市', 'B', '117.97740401715', '37.388196196077', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371700, '菏泽市', 'H', '115.48754503343', '35.239407424766', 370000, 2, 'tr_0 tr_370000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410100, '郑州市', 'Z', '113.63141920734', '34.753438850454', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410200, '开封市', 'K', '114.31459258497', '34.802885811212', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410300, '洛阳市', 'L', '112.45942129831', '34.624262779219', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410400, '平顶山市', 'P', '113.19952856052', '33.772050748691', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410500, '安阳市', 'A', '114.39950042177', '36.105940984015', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410600, '鹤壁市', 'H', '114.30359364248', '35.7523574114', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410700, '新乡市', 'X', '113.93360046733', '35.309639930337', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410800, '焦作市', 'J', '113.24854783457', '35.220963254039', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410900, '濮阳市', 'P', '115.03559747034', '35.767593028906', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411000, '许昌市', 'X', '113.85847553686', '34.041431611619', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411100, '漯河市', 'L', '114.02342077765', '33.587710707102', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411200, '三门峡市', 'S', '111.20653322387', '34.77832724946', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411300, '南阳市', 'N', '112.53450131351', '32.996562204651', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411400, '商丘市', 'S', '115.66244933826', '34.420201665859', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411500, '信阳市', 'X', '114.09748283305', '32.153014547531', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411600, '周口市', 'Z', '114.70348251482', '33.631828875702', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411700, '驻马店市', 'Z', '114.02847078173', '33.017842416744', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (419000, '省直辖县级行政区划', 'S', '113.75938408486', '34.771712921931', 410000, 2, 'tr_0 tr_410000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420100, '武汉市', 'W', '114.31158155473', '30.598466736401', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420200, '黄石市', 'H', '115.04553290894', '30.205207848942', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420300, '十堰市', 'S', '110.8045295607', '32.635061858401', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420500, '宜昌市', 'Y', '111.29254921035', '30.697446484492', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420600, '襄阳市', 'X', '112.128537201', '32.014796804669', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420700, '鄂州市', 'E', '114.90160738827', '30.396572173317', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420800, '荆门市', 'J', '112.20639298023', '31.04173257557', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420900, '孝感市', 'X', '113.92251007734', '30.930689227018', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421000, '荆州市', 'J', '112.24552262926', '30.340842107743', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421100, '黄冈市', 'H', '114.87849048411', '30.459358857618', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421200, '咸宁市', 'X', '114.32851909027', '29.847055947646', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421300, '随州市', 'S', '113.38945001822', '31.696516772328', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (422800, '恩施土家族苗族自治州', 'E', '109.49459261858', '30.277939575301', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (429000, '省直辖县级行政区划', 'S', '114.34844073659', '30.551600064658', 420000, 2, 'tr_0 tr_420000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430100, '长沙市', 'Z', '112.94547319535', '28.234889399944', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430200, '株洲市', 'Z', '113.14047079776', '27.833567639016', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430300, '湘潭市', 'X', '112.95046418076', '27.835702227136', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430400, '衡阳市', 'H', '112.57844721326', '26.899576139189', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430500, '邵阳市', 'S', '111.47443288593', '27.245270272809', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430600, '岳阳市', 'Y', '113.13548942422', '29.363178293926', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430700, '常德市', 'C', '111.70545217996', '29.037749999407', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430800, '张家界市', 'Z', '110.48553254695', '29.122815562552', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430900, '益阳市', 'Y', '112.36151595471', '28.55971117849', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431000, '郴州市', 'C', '113.02146049909', '25.776683273602', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431100, '永州市', 'Y', '111.61945505792', '26.4258641179', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431200, '怀化市', 'H', '110.00851426537', '27.575160902979', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431300, '娄底市', 'L', '112.00150349288', '27.703208596992', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (433100, '湘西土家族苗族自治州', 'X', '109.74557664947', '28.317369104701', 430000, 2, 'tr_0 tr_430000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440100, '广州市', 'G', '113.27143134446', '23.135336306695', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440200, '韶关市', 'S', '113.60352734562', '24.815881278583', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440300, '深圳市', 'S', '114.06455183659', '22.548456637984', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440400, '珠海市', 'Z', '113.58255478655', '22.276564654249', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440500, '汕头市', 'S', '116.68852864055', '23.359091717725', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440600, '佛山市', 'F', '113.1285121955', '23.027758750789', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440700, '江门市', 'J', '113.08855619524', '22.584603880965', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440800, '湛江市', 'Z', '110.36555441393', '21.276723439012', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440900, '茂名市', 'M', '110.93154257997', '21.669064031332', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441200, '肇庆市', 'Z', '112.47148894063', '23.052888771126', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441300, '惠州市', 'H', '114.42355801658', '23.116358854726', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441400, '梅州市', 'M', '116.12953737612', '24.294177532206', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441500, '汕尾市', 'S', '115.3729242894', '22.778730500164', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441600, '河源市', 'H', '114.70744627291', '23.74968437096', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441700, '阳江市', 'Y', '111.98848929181', '21.864339726139', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441800, '清远市', 'Q', '113.06246832527', '23.688230292088', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900, '东莞市', 'D', '113.75842045788', '23.027308411643', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000, '中山市', 'Z', '113.39942236263', '22.522314670791', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445100, '潮州市', 'C', '116.62947017363', '23.662623192616', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445200, '揭阳市', 'J', '116.37851218034', '23.555740488276', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445300, '云浮市', 'Y', '112.05151269959', '22.920911970343', 440000, 2, 'tr_0 tr_440000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450100, '南宁市', 'N', '108.37345082582', '22.822606601187', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450200, '柳州市', 'L', '109.43442194635', '24.331961386852', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450300, '桂林市', 'G', '110.20354537458', '25.242885724873', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450400, '梧州市', 'W', '111.28551681182', '23.482745281135', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450500, '北海市', 'B', '109.12653321257', '21.486836495769', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450600, '防城港市', 'F', '108.3604188383', '21.693005289969', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450700, '钦州市', 'Q', '108.66058016842', '21.986593539484', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450800, '贵港市', 'G', '109.60552031033', '23.117448382038', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450900, '玉林市', 'Y', '110.18845312337', '22.659830509953', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451000, '百色市', 'B', '106.62458932565', '23.908185934296', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451100, '贺州市', 'H', '111.57352631416', '24.409450902865', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451200, '河池市', 'H', '108.09149994499', '24.698911731273', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451300, '来宾市', 'L', '109.2274581959', '23.756546762607', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451400, '崇左市', 'C', '107.3715202061', '22.383117234663', 450000, 2, 'tr_0 tr_450000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460100, '海口市', 'H', '110.32552547126', '20.044049439257', 460000, 2, 'tr_0 tr_460000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460200, '三亚市', 'S', '109.5185567014', '18.258736291748', 460000, 2, 'tr_0 tr_460000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460300, '三沙市', 'S', '112.34048204137', '16.838953334409', 460000, 2, 'tr_0 tr_460000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400, '儋州市', 'D', '109.58745583569', '19.527146110044', 460000, 2, 'tr_0 tr_460000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469000, '省直辖县级行政区划', 'S', '110.35553651088', '20.025801964463', 460000, 2, 'tr_0 tr_460000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500100, '市辖区', 'S', '106.55843415538', '29.568996245339', 500000, 2, 'tr_0 tr_500000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500200, '县', 'X', '106.55843415538', '29.568996245339', 500000, 2, 'tr_0 tr_500000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510100, '成都市', 'C', '104.08153351042', '30.655821878416', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510300, '自贡市', 'Z', '104.78444884672', '29.345584921328', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510400, '攀枝花市', 'P', '101.72554117091', '26.588033173333', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510500, '泸州市', 'L', '105.44852406933', '28.877668303607', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510600, '德阳市', 'D', '104.40441936496', '31.133115003657', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510700, '绵阳市', 'M', '104.68556186076', '31.473663048746', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510800, '广元市', 'G', '105.85042318166', '32.441616305315', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510900, '遂宁市', 'S', '105.59942153064', '30.539097671109', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511000, '内江市', 'N', '105.064588025', '29.58588653832', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511100, '乐山市', 'L', '103.77253760363', '29.557940717458', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511300, '南充市', 'N', '106.11750261487', '30.843782508337', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511400, '眉山市', 'M', '103.85656331579', '30.082526119421', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511500, '宜宾市', 'Y', '104.64940370487', '28.758007028552', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511600, '广安市', 'G', '106.63955268233', '30.461746110679', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511700, '达州市', 'D', '107.47459385898', '31.214307723927', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511800, '雅安市', 'Y', '103.0495426236', '30.016792545706', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511900, '巴中市', 'B', '106.75158530316', '31.872888585957', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (512000, '资阳市', 'Z', '104.63443534164', '30.134956559253', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513200, '阿坝藏族羌族自治州', 'A', '102.23141546175', '31.905511577267', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513300, '甘孜藏族自治州', 'G', '101.96854674579', '30.055278843518', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513400, '凉山彝族自治州', 'L', '102.27350268097', '27.88775230037', 510000, 2, 'tr_0 tr_510000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520100, '贵阳市', 'G', '106.63657676353', '26.65332482231', 520000, 2, 'tr_0 tr_520000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520200, '六盘水市', 'L', '104.83755460235', '26.598833108257', 520000, 2, 'tr_0 tr_520000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520300, '遵义市', 'Z', '106.93342774802', '27.731700878917', 520000, 2, 'tr_0 tr_520000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520400, '安顺市', 'A', '105.95441712389', '26.259252378715', 520000, 2, 'tr_0 tr_520000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520500, '毕节市', 'B', '105.33332337117', '27.408562131331', 520000, 2, 'tr_0 tr_520000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520600, '铜仁市', 'T', '109.16855802826', '27.674902690624', 520000, 2, 'tr_0 tr_520000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522300, '黔西南布依族苗族自治州', 'Q', '104.91249214627', '25.093967349417', 520000, 2, 'tr_0 tr_520000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522600, '黔东南苗族侗族自治州', 'Q', '107.98944624078', '26.589702969826', 520000, 2, 'tr_0 tr_520000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522700, '黔南布依族苗族自治州', 'Q', '107.52840270574', '26.260616196074', 520000, 2, 'tr_0 tr_520000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530100, '昆明市', 'K', '102.852448365', '24.873998150044', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530300, '曲靖市', 'Q', '103.80243482795', '25.496406931544', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530400, '玉溪市', 'Y', '102.55356029311', '24.357710942446', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530500, '保山市', 'B', '99.177273285818', '25.139038793266', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530600, '昭通市', 'Z', '103.72351177197', '27.344083860247', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530700, '丽江市', 'L', '100.23246452903', '26.860657438065', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530800, '普洱市', 'P', '100.97256981473', '22.83097918601', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530900, '临沧市', 'L', '100.09544042015', '23.890468556279', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532300, '楚雄彝族自治州', 'C', '101.5344124805', '25.05177356534', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532500, '红河哈尼族彝族自治州', 'H', '103.38154905258', '23.369996247605', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532600, '文山壮族苗族自治州', 'W', '104.22256899109', '23.405994293612', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532800, '西双版纳傣族自治州', 'X', '100.80344682456', '22.013601254764', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532900, '大理白族自治州', 'D', '100.27458284048', '25.612128418193', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533100, '德宏傣族景颇族自治州', 'D', '98.591359356114', '24.438010702758', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533300, '怒江傈僳族自治州', 'N', '98.863288381358', '25.823707417658', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533400, '迪庆藏族自治州', 'D', '99.70952999014', '27.825184683643', 530000, 2, 'tr_0 tr_530000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540100, '拉萨市', 'L', '91.120823915464', '29.650040274768', 540000, 2, 'tr_0 tr_540000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540200, '日喀则市', 'R', '88.893703034826', '29.275657822512', 540000, 2, 'tr_0 tr_540000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540300, '昌都市', 'C', '97.179583594086', '31.147346549327', 540000, 2, 'tr_0 tr_540000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540400, '林芝市', 'L', '94.368058287133', '29.654042176952', 540000, 2, 'tr_0 tr_540000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540500, '山南市', 'S', '91.778675138519', '29.243026939249', 540000, 2, 'tr_0 tr_540000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540600, '那曲市', 'N', '92.057338498175', '31.482438388455', 540000, 2, 'tr_0 tr_540000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (542500, '阿里地区', 'A', '80.112776921926', '32.506866017633', 540000, 2, 'tr_0 tr_540000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610100, '西安市', 'X', '108.94646555063', '34.347268816624', 610000, 2, 'tr_0 tr_610000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610200, '铜川市', 'T', '108.95240424836', '34.902637080503', 610000, 2, 'tr_0 tr_610000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610300, '宝鸡市', 'B', '107.24457536704', '34.36891564287', 610000, 2, 'tr_0 tr_610000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610400, '咸阳市', 'X', '108.71542245143', '34.335476293369', 610000, 2, 'tr_0 tr_610000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610500, '渭南市', 'W', '109.51658960526', '34.505715516753', 610000, 2, 'tr_0 tr_610000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610600, '延安市', 'Y', '109.49658191613', '36.591111035218', 610000, 2, 'tr_0 tr_610000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610700, '汉中市', 'H', '107.02943020926', '33.073799907834', 610000, 2, 'tr_0 tr_610000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610800, '榆林市', 'Y', '109.74161603381', '38.290883835484', 610000, 2, 'tr_0 tr_610000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610900, '安康市', 'A', '109.03560108266', '32.690512770574', 610000, 2, 'tr_0 tr_610000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (611000, '商洛市', 'S', '109.92441788136', '33.878633852208', 610000, 2, 'tr_0 tr_610000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620100, '兰州市', 'L', '103.84052119634', '36.067234693546', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620200, '嘉峪关市', 'J', '98.296203843001', '39.777960147391', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620300, '金昌市', 'J', '102.1946056867', '38.525820092093', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620400, '白银市', 'B', '104.14445082834', '36.550825330415', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620500, '天水市', 'T', '105.73141674567', '34.587411881651', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620600, '武威市', 'W', '102.64455434037', '37.934377808158', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620700, '张掖市', 'Z', '100.45641147406', '38.932066007005', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620800, '平凉市', 'P', '106.67144234828', '35.549232050464', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620900, '酒泉市', 'J', '98.500685216068', '39.738469080716', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621000, '庆阳市', 'Q', '107.64938569595', '35.715215983562', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621100, '定西市', 'D', '104.63242008306', '35.586832926562', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621200, '陇南市', 'L', '104.92857497071', '33.406620229951', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (622900, '临夏回族自治州', 'L', '103.2163905653', '35.607562183503', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (623000, '甘南藏族自治州', 'G', '102.91758468826', '34.989139909968', 620000, 2, 'tr_0 tr_620000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630100, '西宁市', 'X', '101.78445017051', '36.623384696517', 630000, 2, 'tr_0 tr_630000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630200, '海东市', 'H', '102.11044407228', '36.508511080941', 630000, 2, 'tr_0 tr_630000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632200, '海北藏族自治州', 'H', '100.90743432146', '36.96066282413', 630000, 2, 'tr_0 tr_630000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632300, '黄南藏族自治州', 'H', '102.02242827808', '35.525804586516', 630000, 2, 'tr_0 tr_630000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632500, '海南藏族自治州', 'H', '100.62662114446', '36.292102479899', 630000, 2, 'tr_0 tr_630000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632600, '果洛藏族自治州', 'G', '100.2515919788', '34.477193866471', 630000, 2, 'tr_0 tr_630000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632700, '玉树藏族自治州', 'Y', '97.013180762773', '33.010979585143', 630000, 2, 'tr_0 tr_630000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632800, '海西蒙古族藏族自治州', 'H', '97.376299116019', '37.382750462527', 630000, 2, 'tr_0 tr_630000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640100, '银川市', 'Y', '106.2384935874', '38.49246005551', 640000, 2, 'tr_0 tr_640000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640200, '石嘴山市', 'S', '106.3906004255', '38.989682839915', 640000, 2, 'tr_0 tr_640000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640300, '吴忠市', 'W', '106.20537126664', '38.003712913453', 640000, 2, 'tr_0 tr_640000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640400, '固原市', 'G', '106.24857742607', '36.021617258011', 640000, 2, 'tr_0 tr_640000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640500, '中卫市', 'Z', '105.20357090089', '37.505701418703', 640000, 2, 'tr_0 tr_640000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650100, '乌鲁木齐市', 'W', '87.62443993536', '43.83076320429', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650200, '克拉玛依市', 'K', '84.895900538875', '45.585675237814', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650400, '吐鲁番市', 'T', '89.266025488642', '42.678924820794', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650500, '哈密市', 'H', '93.529373012389', '42.344467104552', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652300, '昌吉回族自治州', 'C', '87.315001624474', '44.01685415992', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652700, '博尔塔拉蒙古自治州', 'B', '82.072914758274', '44.912196413465', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652800, '巴音郭楞蒙古自治州', 'B', '86.151713865333', '41.77028733045', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652900, '阿克苏地区', 'A', '80.266943484735', '41.175029860077', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653000, '克孜勒苏柯尔克孜自治州', 'K', '76.174308676212', '39.720471204871', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653100, '喀什地区', 'K', '75.996390556397', '39.476096748645', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653200, '和田地区', 'H', '79.928507063512', '37.120446463042', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654000, '伊犁哈萨克自治州', 'Y', '81.330537747532', '43.922723137492', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654200, '塔城地区', 'T', '82.987235518406', '46.750948254373', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654300, '阿勒泰地区', 'A', '88.147926203735', '47.850727870102', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (659000, '自治区直辖县级行政区划', 'Z', '87.633473205738', '43.79923810129', 650000, 2, 'tr_0 tr_650000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110101, '东城区', 'D', '116.42240097766', '39.934827272396', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110102, '西城区', 'X', '116.37251358117', '39.918123605841', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110105, '朝阳区', 'C', '112.85530302042', '35.520558754673', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110106, '丰台区', 'F', '116.29240188731', '39.864937197557', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110107, '石景山区', 'S', '116.22961266776', '39.911353808778', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110108, '海淀区', 'H', '116.3054340545', '39.965489841101', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110109, '门头沟区', 'M', '116.10760355577', '39.946146720034', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110111, '房山区', 'F', '116.14944375184', '39.754325839773', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110112, '通州区', 'T', '112.85530302042', '35.520558754673', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110113, '顺义区', 'S', '116.66142426369', '40.136350762231', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110114, '昌平区', 'C', '116.23761791731', '40.226413371594', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110115, '大兴区', 'D', '116.34862521223', '39.732555236554', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110116, '怀柔区', 'H', '116.63838587143', '40.322618404266', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110117, '平谷区', 'P', '117.1273791046', '40.146950735799', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110118, '密云区', 'M', '116.84954704427', '40.382175658138', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (110119, '延庆区', 'Y', '115.98163156902', '40.462168973754', 110100, 3, 'tr_0 tr_110000 tr_110100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120101, '和平区', 'H', '112.85530302042', '35.520558754673', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120102, '河东区', 'H', '117.26169316527', '39.126625684666', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120103, '河西区', 'H', '117.22941628002', '39.115718082216', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120104, '南开区', 'N', '117.15651537432', '39.144105279768', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120105, '河北区', 'H', '117.20359278136', '39.153485144705', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120106, '红桥区', 'H', '117.15751788327', '39.173285646564', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120110, '东丽区', 'D', '117.32056850791', '39.092332342815', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120111, '西青区', 'X', '117.01441017994', '39.148726608967', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120112, '津南区', 'J', '117.36338677903', '38.944148568115', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120113, '北辰区', 'B', '117.14140273158', '39.230343909918', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120114, '武清区', 'W', '117.05059715978', '39.389871228788', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120115, '宝坻区', 'B', '117.31660069248', '39.723194482933', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120116, '滨海新区', 'B', '117.71739882966', '39.009415773647', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120117, '宁河区', 'N', '117.83239334342', '39.336956431227', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120118, '静海区', 'J', '116.98046860455', '38.953370689172', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (120119, '蓟州区', 'J', '117.41457869479', '40.051508786395', 120100, 3, 'tr_0 tr_120000 tr_120100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140105, '小店区', 'X', '112.57239624162', '37.742322528645', 140100, 3, 'tr_0 tr_140000 tr_140100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140106, '迎泽区', 'Y', '112.5693846724', '37.869532484225', 140100, 3, 'tr_0 tr_140000 tr_140100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140107, '杏花岭区', 'X', '112.5763830113', '37.900186246845', 140100, 3, 'tr_0 tr_140000 tr_140100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140108, '尖草坪区', 'J', '112.49360496704', '37.945943354548', 140100, 3, 'tr_0 tr_140000 tr_140100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140109, '万柏林区', 'W', '112.52257675702', '37.864974410402', 140100, 3, 'tr_0 tr_140000 tr_140100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140110, '晋源区', 'J', '112.48456424072', '37.721168857849', 140100, 3, 'tr_0 tr_140000 tr_140100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140121, '清徐县', 'Q', '112.36455763137', '37.613066838238', 140100, 3, 'tr_0 tr_140000 tr_140100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140122, '阳曲县', 'Y', '112.6794089516', '38.064620819448', 140100, 3, 'tr_0 tr_140000 tr_140100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140123, '娄烦县', 'L', '111.80359063362', '38.073195368896', 140100, 3, 'tr_0 tr_140000 tr_140100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140171, '山西转型综合改革示范区', 'S', '112.55639149167', '37.876989028848', 140100, 3, 'tr_0 tr_140000 tr_140100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140181, '古交市', 'G', '112.1824528689', '37.912999960962', 140100, 3, 'tr_0 tr_140000 tr_140100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140212, '新荣区', 'X', '113.14644373539', '40.261971219328', 140200, 3, 'tr_0 tr_140000 tr_140200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140213, '平城区', 'P', '113.30442522204', '40.081998375025', 140200, 3, 'tr_0 tr_140000 tr_140200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140214, '云冈区', 'Y', '113.16240150396', '39.996838811279', 140200, 3, 'tr_0 tr_140000 tr_140200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140215, '云州区', 'Y', '113.61847103172', '40.046229886508', 140200, 3, 'tr_0 tr_140000 tr_140200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140221, '阳高县', 'Y', '113.75541420332', '40.367391842472', 140200, 3, 'tr_0 tr_140000 tr_140200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140222, '天镇县', 'T', '114.09747753304', '40.426412198691', 140200, 3, 'tr_0 tr_140000 tr_140200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140223, '广灵县', 'G', '114.28858637097', '39.766004217139', 140200, 3, 'tr_0 tr_140000 tr_140200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140224, '灵丘县', 'L', '114.24136819946', '39.448825128052', 140200, 3, 'tr_0 tr_140000 tr_140200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140225, '浑源县', 'H', '113.70560028822', '39.698952969845', 140200, 3, 'tr_0 tr_140000 tr_140200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140226, '左云县', 'Z', '112.70946328956', '40.019623449015', 140200, 3, 'tr_0 tr_140000 tr_140200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140271, '山西大同经济开发区', 'S', '113.30643625859', '40.082468716161', 140200, 3, 'tr_0 tr_140000 tr_140200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140302, '城区', 'C', '113.61283811719', '37.85786536147', 140300, 3, 'tr_0 tr_140000 tr_140300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140303, '矿区', 'K', '113.54077065934', '37.890804244519', 140300, 3, 'tr_0 tr_140000 tr_140300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140311, '郊区', 'J', '113.60060283682', '37.950352892943', 140300, 3, 'tr_0 tr_140000 tr_140300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140321, '平定县', 'P', '113.66442115516', '37.792796383591', 140300, 3, 'tr_0 tr_140000 tr_140300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140322, '盂县', 'Y', '113.41842046075', '38.091979630201', 140300, 3, 'tr_0 tr_140000 tr_140300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140403, '潞州区', 'L', '113.12952091721', '36.209472481338', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140404, '上党区', 'S', '113.05741608986', '36.059286479291', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140405, '屯留区', 'T', '112.89847476377', '36.321630843108', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140406, '潞城区', 'L', '113.23557845894', '36.339691267612', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140423, '襄垣县', 'X', '113.05741258647', '36.541685821155', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140425, '平顺县', 'P', '113.44251696707', '36.205989459384', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140426, '黎城县', 'L', '113.39343247604', '36.508669901441', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140427, '壶关县', 'H', '113.21357985531', '36.121334604237', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140428, '长子县', 'Z', '112.88456585041', '36.128001557794', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140429, '武乡县', 'W', '112.8706056438', '36.843167949301', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140430, '沁县', 'Q', '112.70545801478', '36.762189938552', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140431, '沁源县', 'Q', '112.34445202694', '36.506103350913', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140471, '山西长治高新技术产业园区', 'S', '113.12255886985', '36.201268372155', 140400, 3, 'tr_0 tr_140000 tr_140400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140502, '城区', 'C', '112.85958379452', '35.507278924584', 140500, 3, 'tr_0 tr_140000 tr_140500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140521, '沁水县', 'Q', '112.19342620969', '35.696364462457', 140500, 3, 'tr_0 tr_140000 tr_140500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140522, '阳城县', 'Y', '112.42145378712', '35.492181320425', 140500, 3, 'tr_0 tr_140000 tr_140500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140524, '陵川县', 'L', '113.28740655466', '35.781743639538', 140500, 3, 'tr_0 tr_140000 tr_140500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140525, '泽州县', 'Z', '112.79440121959', '35.599769729488', 140500, 3, 'tr_0 tr_140000 tr_140500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140581, '高平市', 'G', '112.93041239923', '35.804336798578', 140500, 3, 'tr_0 tr_140000 tr_140500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140602, '朔城区', 'S', '112.43837642564', '39.325302712534', 140600, 3, 'tr_0 tr_140000 tr_140600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140603, '平鲁区', 'P', '112.29552500886', '39.517389104237', 140600, 3, 'tr_0 tr_140000 tr_140600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140621, '山阴县', 'S', '112.82243194473', '39.534030498011', 140600, 3, 'tr_0 tr_140000 tr_140600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140622, '应县', 'Y', '113.19749353922', '39.560077852375', 140600, 3, 'tr_0 tr_140000 tr_140600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140623, '右玉县', 'Y', '112.47350008125', '39.994859555431', 140600, 3, 'tr_0 tr_140000 tr_140600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140671, '山西朔州经济开发区', 'S', '112.46306042376', '39.354781496121', 140600, 3, 'tr_0 tr_140000 tr_140600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140681, '怀仁市', 'H', '113.10660846738', '39.833756889522', 140600, 3, 'tr_0 tr_140000 tr_140600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140702, '榆次区', 'Y', '112.71450350211', '37.703940486801', 140700, 3, 'tr_0 tr_140000 tr_140700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140721, '榆社县', 'Y', '112.98159856583', '37.0763696687', 140700, 3, 'tr_0 tr_140000 tr_140700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140722, '左权县', 'Z', '113.38545184006', '37.088555147171', 140700, 3, 'tr_0 tr_140000 tr_140700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140723, '和顺县', 'H', '113.57660568309', '37.334807738688', 140700, 3, 'tr_0 tr_140000 tr_140700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140724, '昔阳县', 'X', '113.71361290387', '37.617884042996', 140700, 3, 'tr_0 tr_140000 tr_140700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140725, '寿阳县', 'S', '113.18341017493', '37.901307606957', 140700, 3, 'tr_0 tr_140000 tr_140700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140726, '太谷县', 'T', '112.55738411926', '37.427395577313', 140700, 3, 'tr_0 tr_140000 tr_140700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140727, '祁县', 'Q', '112.34244242768', '37.364131283475', 140700, 3, 'tr_0 tr_140000 tr_140700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140728, '平遥县', 'P', '112.18245556381', '37.195600690703', 140700, 3, 'tr_0 tr_140000 tr_140700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140729, '灵石县', 'L', '111.78561787596', '36.85336750127', 140700, 3, 'tr_0 tr_140000 tr_140700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140781, '介休市', 'J', '111.92356319719', '37.032686403603', 140700, 3, 'tr_0 tr_140000 tr_140700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140802, '盐湖区', 'Y', '111.00437711462', '35.021425327829', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140821, '临猗县', 'L', '110.78040700351', '35.149542242622', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140822, '万荣县', 'W', '110.84457611016', '35.421108800536', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140823, '闻喜县', 'W', '111.23141035768', '35.362931196381', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140824, '稷山县', 'J', '110.98941457872', '35.610403569616', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140825, '新绛县', 'X', '111.23140649497', '35.622630103082', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140826, '绛县', 'J', '111.57548652056', '35.497276373896', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140827, '垣曲县', 'Y', '111.67660670572', '35.303014517418', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140828, '夏县', 'X', '111.2264314994', '35.147461779807', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140829, '平陆县', 'P', '111.22348047596', '34.842925154581', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140830, '芮城县', 'R', '110.7006115132', '34.699388110563', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140881, '永济市', 'Y', '110.45457767131', '34.872829714714', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140882, '河津市', 'H', '110.71857214373', '35.601926575322', 140800, 3, 'tr_0 tr_140000 tr_140800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140902, '忻府区', 'X', '112.75261366422', '38.40987981762', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140921, '定襄县', 'D', '112.96352861152', '38.479974305847', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140922, '五台县', 'W', '113.26145109492', '38.734181590565', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140923, '代县', 'D', '112.96655194854', '39.072728346381', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140924, '繁峙县', 'F', '113.27140827251', '39.195237430734', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140925, '宁武县', 'N', '112.32639824212', '39.024342381431', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140926, '静乐县', 'J', '111.94543190585', '38.365147088438', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'); + +INSERT INTO hg_sys_provinces (id, title, pinyin, lng, lat, pid, level, tree, sort, status, created_at, updated_at) VALUES + (140927, '神池县', 'S', '112.21738276001', '39.096875824863', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140928, '五寨县', 'W', '111.85340993856', '38.917019909692', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140929, '岢岚县', 'K', '111.57947778177', '38.710151038936', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140930, '河曲县', 'H', '111.14444863516', '39.390702488715', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140931, '保德县', 'B', '111.09254175805', '39.028336932396', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140932, '偏关县', 'P', '111.51447352049', '39.442230090387', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140971, '五台山风景名胜区', 'W', '113.602695497', '38.983546253607', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (140981, '原平市', 'Y', '112.71748713403', '38.736475897605', 140900, 3, 'tr_0 tr_140000 tr_140900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141002, '尧都区', 'Y', '111.58643021727', '36.084562230192', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141021, '曲沃县', 'Q', '111.48239637819', '35.647327335982', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141022, '翼城县', 'Y', '111.72537553219', '35.744429075039', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141023, '襄汾县', 'X', '111.44854005199', '35.882062670676', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141024, '洪洞县', 'H', '111.68158942672', '36.259467079377', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141025, '古县', 'G', '111.92657314947', '36.272338064827', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141026, '安泽县', 'A', '112.2566128396', '36.153514380523', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141027, '浮山县', 'F', '111.85538495306', '35.974392753943', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141028, '吉县', 'J', '110.68854637189', '36.103999062021', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141029, '乡宁县', 'X', '110.85349790083', '35.976441665474', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141030, '大宁县', 'D', '110.75938440882', '36.471305687097', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141031, '隰县', 'X', '110.94759127079', '36.699061383227', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141032, '永和县', 'Y', '110.63841589393', '36.765908673933', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141033, '蒲县', 'P', '111.10247405258', '36.418005429177', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141034, '汾西县', 'F', '111.56954629571', '36.658782264232', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141081, '侯马市', 'H', '111.37839658489', '35.625364816258', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141082, '霍州市', 'H', '111.76150942218', '36.574606950709', 141000, 3, 'tr_0 tr_140000 tr_141000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141102, '离石区', 'L', '111.15749077354', '37.523577475907', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141121, '文水县', 'W', '112.0355986926', '37.444300082651', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141122, '交城县', 'J', '112.16256770864', '37.557772236259', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141123, '兴县', 'X', '111.13439210498', '38.468803780991', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141124, '临县', 'L', '110.99841488129', '37.957210672321', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141125, '柳林县', 'L', '110.8953898393', '37.435492964934', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141126, '石楼县', 'S', '110.84159553248', '37.004470503012', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141127, '岚县', 'L', '111.67859223038', '38.28502878885', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141128, '方山县', 'F', '111.25037044293', '37.90102023916', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141129, '中阳县', 'Z', '111.18562956483', '37.36287279238', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141130, '交口县', 'J', '111.18762820476', '36.987872666553', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141181, '孝义市', 'X', '111.78560601833', '37.151063319102', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (141182, '汾阳市', 'F', '111.7945966192', '37.271291794518', 141100, 3, 'tr_0 tr_140000 tr_141100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150102, '新城区', 'X', '111.671620122', '40.863877021183', 150100, 3, 'tr_0 tr_150000 tr_150100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150103, '回民区', 'H', '111.63047018388', '40.814506362944', 150100, 3, 'tr_0 tr_150000 tr_150100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150104, '玉泉区', 'Y', '111.68157514366', '40.758058968635', 150100, 3, 'tr_0 tr_150000 tr_150100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150105, '赛罕区', 'S', '111.7084206445', '40.798394236975', 150100, 3, 'tr_0 tr_150000 tr_150100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150121, '土默特左旗', 'T', '111.16958672672', '40.735293711759', 150100, 3, 'tr_0 tr_150000 tr_150100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150122, '托克托县', 'T', '111.20057494309', '40.283146729007', 150100, 3, 'tr_0 tr_150000 tr_150100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150123, '和林格尔县', 'H', '111.82843021826', '40.384797744251', 150100, 3, 'tr_0 tr_150000 tr_150100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150124, '清水河县', 'Q', '111.65357648803', '39.926333854389', 150100, 3, 'tr_0 tr_150000 tr_150100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150125, '武川县', 'W', '111.45749705623', '41.102418723793', 150100, 3, 'tr_0 tr_150000 tr_150100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150171, '呼和浩特金海工业园区', 'H', '111.61859862741', '40.813484420815', 150100, 3, 'tr_0 tr_150000 tr_150100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150172, '呼和浩特经济技术开发区', 'H', '111.75550856171', '40.848422997113', 150100, 3, 'tr_0 tr_150000 tr_150100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150202, '东河区', 'D', '110.05039480879', '40.582228038324', 150200, 3, 'tr_0 tr_150000 tr_150200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150203, '昆都仑区', 'K', '109.84553830335', '40.647644106921', 150200, 3, 'tr_0 tr_150000 tr_150200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150204, '青山区', 'Q', '109.9074160123', '40.649473068783', 150200, 3, 'tr_0 tr_150000 tr_150200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150205, '石拐区', 'S', '110.27838088451', '40.67829939834', 150200, 3, 'tr_0 tr_150000 tr_150200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150206, '白云鄂博矿区', 'B', '109.97962576174', '41.774995234182', 150200, 3, 'tr_0 tr_150000 tr_150200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150207, '九原区', 'J', '109.96958800614', '40.613396589444', 150200, 3, 'tr_0 tr_150000 tr_150200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150221, '土默特右旗', 'T', '110.53038926652', '40.575127429108', 150200, 3, 'tr_0 tr_150000 tr_150200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150222, '固阳县', 'G', '110.06643261639', '41.040162852726', 150200, 3, 'tr_0 tr_150000 tr_150200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150223, '达尔罕茂明安联合旗', 'D', '110.43952090317', '41.704548551002', 150200, 3, 'tr_0 tr_150000 tr_150200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150271, '包头稀土高新技术产业开发区', 'B', '109.84664914794', '40.637085021364', 150200, 3, 'tr_0 tr_150000 tr_150200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150302, '海勃湾区', 'H', '106.82943856714', '39.696907993535', 150300, 3, 'tr_0 tr_150000 tr_150300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150303, '海南区', 'H', '106.89847100998', '39.446827515087', 150300, 3, 'tr_0 tr_150000 tr_150300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150304, '乌达区', 'W', '106.7326063535', '39.511468916129', 150300, 3, 'tr_0 tr_150000 tr_150300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150402, '红山区', 'H', '118.96356353651', '42.27047843525', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150403, '元宝山区', 'Y', '119.29540450885', '42.045124715638', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150404, '松山区', 'S', '118.9394138505', '42.292481572694', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150421, '阿鲁科尔沁旗', 'A', '120.07261385472', '43.877953412182', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150422, '巴林左旗', 'B', '119.38644328076', '43.97638259461', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150423, '巴林右旗', 'B', '118.67039425705', '43.540131553108', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150424, '林西县', 'L', '118.06246142182', '43.624210259291', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150425, '克什克腾旗', 'K', '117.55162041051', '43.270757591896', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150426, '翁牛特旗', 'W', '119.01250888002', '42.942019262236', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150428, '喀喇沁旗', 'K', '118.7104736845', '41.932214335643', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150429, '宁城县', 'N', '119.35060897566', '41.600245148269', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150430, '敖汉旗', 'A', '119.92757793861', '42.296507085243', 150400, 3, 'tr_0 tr_150000 tr_150400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150502, '科尔沁区', 'K', '122.2624570337', '43.628712488829', 150500, 3, 'tr_0 tr_150000 tr_150500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150521, '科尔沁左翼中旗', 'K', '123.31858853365', '44.132294228308', 150500, 3, 'tr_0 tr_150000 tr_150500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150522, '科尔沁左翼后旗', 'K', '122.36356257648', '42.93956249402', 150500, 3, 'tr_0 tr_150000 tr_150500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150523, '开鲁县', 'K', '121.32538568843', '43.606369431362', 150500, 3, 'tr_0 tr_150000 tr_150500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150524, '库伦旗', 'K', '121.81740576201', '42.741211100235', 150500, 3, 'tr_0 tr_150000 tr_150500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150525, '奈曼旗', 'N', '120.66464641294', '42.87184654666', 150500, 3, 'tr_0 tr_150000 tr_150500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150526, '扎鲁特旗', 'Z', '120.91862585689', '44.562213133099', 150500, 3, 'tr_0 tr_150000 tr_150500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150571, '通辽经济技术开发区', 'T', '122.22276854881', '43.676026521565', 150500, 3, 'tr_0 tr_150000 tr_150500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150581, '霍林郭勒市', 'H', '119.67046591394', '45.53751332061', 150500, 3, 'tr_0 tr_150000 tr_150500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130100, '石家庄市', 'S', '114.52153190157', '38.048311926873', 130000, 2, 'tr_0 tr_130000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130200, '唐山市', 'T', '118.18645947204', '39.636583724147', 130000, 2, 'tr_0 tr_130000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130300, '秦皇岛市', 'Q', '119.60853063334', '39.941748102378', 130000, 2, 'tr_0 tr_130000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130400, '邯郸市', 'H', '114.54562822824', '36.631262731204', 130000, 2, 'tr_0 tr_130000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130500, '邢台市', 'X', '114.51146225613', '37.076685950966', 130000, 2, 'tr_0 tr_130000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130600, '保定市', 'B', '115.47146383769', '38.879987768455', 130000, 2, 'tr_0 tr_130000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130700, '张家口市', 'Z', '114.89257223145', '40.773237202691', 130000, 2, 'tr_0 tr_130000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130800, '承德市', 'C', '117.96939750997', '40.957856012338', 130000, 2, 'tr_0 tr_130000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130900, '沧州市', 'C', '116.84558075595', '38.310215141107', 130000, 2, 'tr_0 tr_130000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131000, '廊坊市', 'L', '116.69058173343', '39.543366662759', 130000, 2, 'tr_0 tr_130000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131100, '衡水市', 'H', '115.67540613762', '37.745191408077', 130000, 2, 'tr_0 tr_130000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150602, '东胜区', 'D', '109.96956006883', '39.827986984444', 150600, 3, 'tr_0 tr_150000 tr_150600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150603, '康巴什区', 'K', '109.86962735373', '39.616378146766', 150600, 3, 'tr_0 tr_150000 tr_150600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150621, '达拉特旗', 'D', '110.04036612608', '40.418907154391', 150600, 3, 'tr_0 tr_150000 tr_150600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150622, '准格尔旗', 'Z', '111.24639840546', '39.870540265037', 150600, 3, 'tr_0 tr_150000 tr_150600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150623, '鄂托克前旗', 'E', '107.48458472303', '38.188216741284', 150600, 3, 'tr_0 tr_150000 tr_150600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150624, '鄂托克旗', 'E', '107.98244495023', '39.095293413608', 150600, 3, 'tr_0 tr_150000 tr_150600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150625, '杭锦旗', 'H', '108.74241293879', '39.838815768815', 150600, 3, 'tr_0 tr_150000 tr_150600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150626, '乌审旗', 'W', '108.82443496914', '38.610026521177', 150600, 3, 'tr_0 tr_150000 tr_150600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150627, '伊金霍洛旗', 'Y', '109.78744317924', '39.614482313949', 150600, 3, 'tr_0 tr_150000 tr_150600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150702, '海拉尔区', 'H', '119.74246537006', '49.218215799363', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150703, '扎赉诺尔区', 'Z', '117.69453227349', '49.467770183628', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150721, '阿荣旗', 'A', '123.46544000531', '48.131971245042', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150722, '莫力达瓦达斡尔族自治旗', 'M', '124.52557642071', '48.482896292115', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150723, '鄂伦春自治旗', 'E', '123.73234507742', '50.597947928064', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150724, '鄂温克族自治旗', 'E', '119.76135125527', '49.15304476395', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150725, '陈巴尔虎旗', 'C', '119.43046248677', '49.334914288885', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150726, '新巴尔虎左旗', 'X', '118.27660837276', '48.223786760037', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150727, '新巴尔虎右旗', 'X', '116.83063240352', '48.677053599089', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150781, '满洲里市', 'M', '117.38543585768', '49.604098854866', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150782, '牙克石市', 'Y', '120.7183468371', '49.292023693206', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150783, '扎兰屯市', 'Z', '122.74445371486', '48.01995552011', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150784, '额尔古纳市', 'E', '120.18663369726', '50.248131758636', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150785, '根河市', 'G', '121.52758526594', '50.786140434318', 150700, 3, 'tr_0 tr_150000 tr_150700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150802, '临河区', 'L', '107.36953379568', '40.75668072584', 150800, 3, 'tr_0 tr_150000 tr_150800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150821, '五原县', 'W', '108.2734913541', '41.094454821479', 150800, 3, 'tr_0 tr_150000 tr_150800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150822, '磴口县', 'D', '107.01452247', '40.336470177103', 150800, 3, 'tr_0 tr_150000 tr_150800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150823, '乌拉特前旗', 'W', '108.6586151381', '40.742103512928', 150800, 3, 'tr_0 tr_150000 tr_150800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150824, '乌拉特中旗', 'W', '108.51951244005', '41.593346263746', 150800, 3, 'tr_0 tr_150000 tr_150800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150825, '乌拉特后旗', 'W', '107.08154612207', '41.089422269258', 150800, 3, 'tr_0 tr_150000 tr_150800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150826, '杭锦后旗', 'H', '107.15737244949', '40.892179419823', 150800, 3, 'tr_0 tr_150000 tr_150800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150902, '集宁区', 'J', '113.12058699942', '41.041146171787', 150900, 3, 'tr_0 tr_150000 tr_150900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150921, '卓资县', 'Z', '112.5844095507', '40.900291837834', 150900, 3, 'tr_0 tr_150000 tr_150900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150922, '化德县', 'H', '114.0164087845', '41.909602587109', 150900, 3, 'tr_0 tr_150000 tr_150900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150923, '商都县', 'S', '113.58463922926', '41.567566637224', 150900, 3, 'tr_0 tr_150000 tr_150900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150924, '兴和县', 'X', '113.84057886567', '40.879341798933', 150900, 3, 'tr_0 tr_150000 tr_150900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150925, '凉城县', 'L', '112.51060018864', '40.5371631252', 150900, 3, 'tr_0 tr_150000 tr_150900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150926, '察哈尔右翼前旗', 'C', '113.22160531673', '40.791267302593', 150900, 3, 'tr_0 tr_150000 tr_150900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150927, '察哈尔右翼中旗', 'C', '112.64258040196', '41.283272943291', 150900, 3, 'tr_0 tr_150000 tr_150900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150928, '察哈尔右翼后旗', 'C', '113.19853090242', '41.441770999655', 150900, 3, 'tr_0 tr_150000 tr_150900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150929, '四子王旗', 'S', '111.71241927182', '41.539353349915', 150900, 3, 'tr_0 tr_150000 tr_150900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (150981, '丰镇市', 'F', '113.11660121788', '40.441804808844', 150900, 3, 'tr_0 tr_150000 tr_150900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152201, '乌兰浩特市', 'W', '122.09962235198', '46.078654343582', 152200, 3, 'tr_0 tr_150000 tr_152200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152202, '阿尔山市', 'A', '119.95065315166', '47.18305415375', 152200, 3, 'tr_0 tr_150000 tr_152200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152221, '科尔沁右翼前旗', 'K', '121.9645531355', '46.082648853819', 152200, 3, 'tr_0 tr_150000 tr_152200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152222, '科尔沁右翼中旗', 'K', '121.48354781458', '45.066470993428', 152200, 3, 'tr_0 tr_150000 tr_152200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152223, '扎赉特旗', 'Z', '122.90644442883', '46.729189539358', 152200, 3, 'tr_0 tr_150000 tr_152200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152224, '突泉县', 'T', '121.60054536997', '45.387830342585', 152200, 3, 'tr_0 tr_150000 tr_152200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152501, '二连浩特市', 'E', '111.95836319333', '43.648800184052', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152502, '锡林浩特市', 'X', '116.09361388474', '43.93833380136', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152522, '阿巴嘎旗', 'A', '114.95736709772', '44.028101587023', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152523, '苏尼特左旗', 'S', '113.67347993742', '43.865553657792', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152524, '苏尼特右旗', 'S', '112.64856904548', '42.747368922463', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152525, '东乌珠穆沁旗', 'D', '116.97850435996', '45.515743305312', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152526, '西乌珠穆沁旗', 'X', '117.61637700896', '44.593802912007', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152527, '太仆寺旗', 'T', '115.29053531645', '41.882291746043', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152528, '镶黄旗', 'X', '113.85450538582', '42.237661285279', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152529, '正镶白旗', 'Z', '115.03662171828', '42.292605429249', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152530, '正蓝旗', 'Z', '115.99860388383', '42.247118844188', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152531, '多伦县', 'D', '116.49250878204', '42.208920864211', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152571, '乌拉盖管委会', 'W', '114.09790153324', '42.80523252057', 152500, 3, 'tr_0 tr_150000 tr_152500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152921, '阿拉善左旗', 'A', '105.67259866528', '38.839094137436', 152900, 3, 'tr_0 tr_150000 tr_152900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152922, '阿拉善右旗', 'A', '101.67346389594', '39.222240969855', 152900, 3, 'tr_0 tr_150000 tr_152900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152923, '额济纳旗', 'E', '101.06240334058', '41.960297611813', 152900, 3, 'tr_0 tr_150000 tr_152900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (152971, '内蒙古阿拉善经济开发区', 'N', '105.77197191571', '40.314622117574', 152900, 3, 'tr_0 tr_150000 tr_152900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210102, '和平区', 'H', '123.42664426615', '41.795236052902', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210103, '沈河区', 'S', '123.46546103538', '41.802274138805', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210104, '大东区', 'D', '123.47640473208', '41.811425174494', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210105, '皇姑区', 'H', '123.43162078885', '41.826042120277', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210106, '铁西区', 'T', '123.38343595078', '41.809037832217', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210111, '苏家屯区', 'S', '123.35043463177', '41.671253644959', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210112, '浑南区', 'H', '123.45598993089', '41.720915668889', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210113, '沈北新区', 'S', '123.53360460492', '42.058914115763', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210114, '于洪区', 'Y', '123.31463302499', '41.799668255615', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210115, '辽中区', 'L', '122.77237835983', '41.523149081842', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210123, '康平县', 'K', '123.33751124938', '42.749925495719', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210124, '法库县', 'F', '123.41462107572', '42.509606549903', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210181, '新民市', 'X', '122.87539513741', '42.007109320665', 210100, 3, 'tr_0 tr_210000 tr_210100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210202, '中山区', 'Z', '121.65154739367', '38.924511115496', 210200, 3, 'tr_0 tr_210000 tr_210200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210203, '西岗区', 'X', '121.61862512554', '38.920472689273', 210200, 3, 'tr_0 tr_210000 tr_210200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210204, '沙河口区', 'S', '121.59450670057', '38.913544290956', 210200, 3, 'tr_0 tr_210000 tr_210200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210211, '甘井子区', 'G', '121.5315189555', '38.958002162932', 210200, 3, 'tr_0 tr_210000 tr_210200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210212, '旅顺口区', 'L', '121.26859688019', '38.856832222859', 210200, 3, 'tr_0 tr_210000 tr_210200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210213, '金州区', 'J', '121.78943558267', '39.056432991661', 210200, 3, 'tr_0 tr_210000 tr_210200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210214, '普兰店区', 'P', '121.94645983497', '39.398089145183', 210200, 3, 'tr_0 tr_210000 tr_210200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210224, '长海县', 'Z', '122.59462651637', '39.278270217167', 210200, 3, 'tr_0 tr_210000 tr_210200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210281, '瓦房店市', 'W', '121.98563754334', '39.632740747388', 210200, 3, 'tr_0 tr_210000 tr_210200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210283, '庄河市', 'Z', '122.97449548263', '39.686956078878', 210200, 3, 'tr_0 tr_210000 tr_210200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210302, '铁东区', 'T', '122.99739966805', '41.096331870506', 210300, 3, 'tr_0 tr_210000 tr_210300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210303, '铁西区', 'T', '122.97549026615', '41.125475259583', 210300, 3, 'tr_0 tr_210000 tr_210300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210304, '立山区', 'L', '123.03548413862', '41.156116121102', 210300, 3, 'tr_0 tr_210000 tr_210300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210311, '千山区', 'Q', '122.96757421833', '41.080938608935', 210300, 3, 'tr_0 tr_210000 tr_210300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210321, '台安县', 'T', '122.44255004099', '41.418590371099', 210300, 3, 'tr_0 tr_210000 tr_210300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210323, '岫岩满族自治县', 'X', '123.28754677827', '40.295892396362', 210300, 3, 'tr_0 tr_210000 tr_210300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210381, '海城市', 'H', '122.69156940124', '40.887633947097', 210300, 3, 'tr_0 tr_210000 tr_210300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210402, '新抚区', 'X', '123.91958231814', '41.867805858593', 210400, 3, 'tr_0 tr_210000 tr_210400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210403, '东洲区', 'D', '124.04554972353', '41.859190936634', 210400, 3, 'tr_0 tr_210000 tr_210400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210404, '望花区', 'W', '123.790604152', '41.859030362749', 210400, 3, 'tr_0 tr_210000 tr_210400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210411, '顺城区', 'S', '123.95141404338', '41.889163788467', 210400, 3, 'tr_0 tr_210000 tr_210400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210421, '抚顺县', 'F', '123.92159012079', '41.887037475382', 210400, 3, 'tr_0 tr_210000 tr_210400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210422, '新宾满族自治县', 'X', '125.04635620406', '41.739968775071', 210400, 3, 'tr_0 tr_210000 tr_210400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210423, '清原满族自治县', 'Q', '124.93036025933', '42.106760992634', 210400, 3, 'tr_0 tr_210000 tr_210400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210502, '平山区', 'P', '123.77461422409', '41.301604181774', 210500, 3, 'tr_0 tr_210000 tr_210500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210503, '溪湖区', 'X', '123.77461054104', '41.334802931364', 210500, 3, 'tr_0 tr_210000 tr_210500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210504, '明山区', 'M', '123.82347449807', '41.314939368877', 210500, 3, 'tr_0 tr_210000 tr_210500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210505, '南芬区', 'N', '123.75146713686', '41.10709572322', 210500, 3, 'tr_0 tr_210000 tr_210500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210521, '本溪满族自治县', 'B', '124.12758486914', '41.307902881353', 210500, 3, 'tr_0 tr_210000 tr_210500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210522, '桓仁满族自治县', 'H', '125.36754435102', '41.27292530103', 210500, 3, 'tr_0 tr_210000 tr_210500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210602, '元宝区', 'Y', '124.40258403322', '40.142251463139', 210600, 3, 'tr_0 tr_210000 tr_210600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210603, '振兴区', 'Z', '124.36657851109', '40.110719472216', 210600, 3, 'tr_0 tr_210000 tr_210600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210604, '振安区', 'Z', '124.43438692285', '40.164697025661', 210600, 3, 'tr_0 tr_210000 tr_210600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210624, '宽甸满族自治县', 'K', '124.79042662868', '40.73755320049', 210600, 3, 'tr_0 tr_210000 tr_210600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210681, '东港市', 'D', '124.15961035888', '39.867716187286', 210600, 3, 'tr_0 tr_210000 tr_210600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210682, '凤城市', 'F', '124.07242172439', '40.459180482456', 210600, 3, 'tr_0 tr_210000 tr_210600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210702, '古塔区', 'G', '121.13458496929', '41.122900925898', 210700, 3, 'tr_0 tr_210000 tr_210700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210703, '凌河区', 'L', '121.15759003442', '41.120690614472', 210700, 3, 'tr_0 tr_210000 tr_210700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210711, '太和区', 'T', '121.1104532494', '41.115109307132', 210700, 3, 'tr_0 tr_210000 tr_210700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210726, '黑山县', 'H', '122.13055703906', '41.671592983776', 210700, 3, 'tr_0 tr_210000 tr_210700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210727, '义县', 'Y', '121.24556854895', '41.538938862271', 210700, 3, 'tr_0 tr_210000 tr_210700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210781, '凌海市', 'L', '121.36253879584', '41.166487628588', 210700, 3, 'tr_0 tr_210000 tr_210700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210782, '北镇市', 'B', '121.78344729848', '41.594428096803', 210700, 3, 'tr_0 tr_210000 tr_210700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210802, '站前区', 'Z', '122.26543743173', '40.678764125936', 210800, 3, 'tr_0 tr_210000 tr_210800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210803, '西市区', 'X', '122.21358238684', '40.672110926311', 210800, 3, 'tr_0 tr_210000 tr_210800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210804, '鲅鱼圈区', 'B', '122.12757349697', '40.232339850773', 210800, 3, 'tr_0 tr_210000 tr_210800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210811, '老边区', 'L', '122.38643918392', '40.686383619803', 210800, 3, 'tr_0 tr_210000 tr_210800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210881, '盖州市', 'G', '122.35559128288', '40.406167457268', 210800, 3, 'tr_0 tr_210000 tr_210800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210882, '大石桥市', 'D', '122.5153795314', '40.650802164815', 210800, 3, 'tr_0 tr_210000 tr_210800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210902, '海州区', 'H', '121.66943571061', '42.023734789385', 210900, 3, 'tr_0 tr_210000 tr_210900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210903, '新邱区', 'X', '121.79936338568', '42.093934514765', 210900, 3, 'tr_0 tr_210000 tr_210900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210904, '太平区', 'T', '121.68538413681', '42.016967854141', 210900, 3, 'tr_0 tr_210000 tr_210900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210905, '清河门区', 'Q', '121.42247894964', '41.789318551009', 210900, 3, 'tr_0 tr_210000 tr_210900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210911, '细河区', 'X', '121.68639230508', '42.03187124588', 210900, 3, 'tr_0 tr_210000 tr_210900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210921, '阜新蒙古族自治县', 'F', '121.76357399585', '42.071368153837', 210900, 3, 'tr_0 tr_210000 tr_210900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (210922, '彰武县', 'Z', '122.54544932021', '42.392706534364', 210900, 3, 'tr_0 tr_210000 tr_210900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211002, '白塔区', 'B', '123.18060844799', '41.275845361792', 211000, 3, 'tr_0 tr_210000 tr_211000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211003, '文圣区', 'W', '123.19160469557', '41.268438007815', 211000, 3, 'tr_0 tr_210000 tr_211000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211004, '宏伟区', 'H', '123.20358018598', '41.223368108445', 211000, 3, 'tr_0 tr_210000 tr_211000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211005, '弓长岭区', 'G', '123.42661543055', '41.157327042722', 211000, 3, 'tr_0 tr_210000 tr_211000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211011, '太子河区', 'T', '123.188604445', '41.259226178044', 211000, 3, 'tr_0 tr_210000 tr_211000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211021, '辽阳县', 'L', '123.1124212208', '41.211678771808', 211000, 3, 'tr_0 tr_210000 tr_211000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211081, '灯塔市', 'D', '123.34546215145', '41.432474125926', 211000, 3, 'tr_0 tr_210000 tr_211000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211102, '双台子区', 'S', '122.04639299922', '41.206071617512', 211100, 3, 'tr_0 tr_210000 tr_211100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211103, '兴隆台区', 'X', '121.96962911034', '41.155830887559', 211100, 3, 'tr_0 tr_210000 tr_211100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211104, '大洼区', 'D', '122.08855478867', '41.00817878896', 211100, 3, 'tr_0 tr_210000 tr_211100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211122, '盘山县', 'P', '122.00356035522', '41.248263682582', 211100, 3, 'tr_0 tr_210000 tr_211100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211202, '银州区', 'Y', '123.8483863963', '42.292573681442', 211200, 3, 'tr_0 tr_210000 tr_211200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211204, '清河区', 'Q', '124.16556298034', '42.552494793453', 211200, 3, 'tr_0 tr_210000 tr_211200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211221, '铁岭县', 'T', '123.7353723767', '42.229225608048', 211200, 3, 'tr_0 tr_210000 tr_211200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211223, '西丰县', 'X', '124.73361509331', '42.744014442436', 211200, 3, 'tr_0 tr_210000 tr_211200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211224, '昌图县', 'C', '124.11750067115', '42.792178371844', 211200, 3, 'tr_0 tr_210000 tr_211200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211281, '调兵山市', 'D', '123.57350868313', '42.473738012058', 211200, 3, 'tr_0 tr_210000 tr_211200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211282, '开原市', 'K', '124.04456886375', '42.552079074779', 211200, 3, 'tr_0 tr_210000 tr_211200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211302, '双塔区', 'S', '120.46048690274', '41.571779500856', 211300, 3, 'tr_0 tr_210000 tr_211300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211303, '龙城区', 'L', '120.4435668693', '41.59846852305', 211300, 3, 'tr_0 tr_210000 tr_211300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211321, '朝阳县', 'C', '120.25939061432', '41.241075720873', 211300, 3, 'tr_0 tr_210000 tr_211300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211322, '建平县', 'J', '119.64938035777', '41.409455511027', 211300, 3, 'tr_0 tr_210000 tr_211300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211324, '喀喇沁左翼蒙古族自治县', 'K', '119.74741405502', '41.133689119828', 211300, 3, 'tr_0 tr_210000 tr_211300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211381, '北票市', 'B', '120.77762773422', '41.80648256895', 211300, 3, 'tr_0 tr_210000 tr_211300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211382, '凌源市', 'L', '119.40735807879', '41.251651297148', 211300, 3, 'tr_0 tr_210000 tr_211300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211402, '连山区', 'L', '120.87648167423', '40.780893808442', 211400, 3, 'tr_0 tr_210000 tr_211400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211403, '龙港区', 'L', '120.90062076024', '40.741056601241', 211400, 3, 'tr_0 tr_210000 tr_211400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211404, '南票区', 'N', '120.75649312082', '41.113097595823', 211400, 3, 'tr_0 tr_210000 tr_211400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211421, '绥中县', 'S', '120.35042453538', '40.331843475397', 211400, 3, 'tr_0 tr_210000 tr_211400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211422, '建昌县', 'J', '119.84359526665', '40.830379953809', 211400, 3, 'tr_0 tr_210000 tr_211400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (211481, '兴城市', 'X', '120.76455846701', '40.616555664044', 211400, 3, 'tr_0 tr_210000 tr_211400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220102, '南关区', 'N', '125.35660981703', '43.869873025193', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220103, '宽城区', 'K', '125.33462450832', '43.949502239804', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220104, '朝阳区', 'C', '125.29540125585', '43.840641474962', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220105, '二道区', 'E', '125.38046755375', '43.871276524271', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220106, '绿园区', 'L', '125.26244260635', '43.886810403937', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220112, '双阳区', 'S', '125.67144793217', '43.531091309119', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220113, '九台区', 'J', '125.84556442307', '44.157791853861', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220122, '农安县', 'N', '125.19148410666', '44.438903951261', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220171, '长春经济技术开发区', 'Z', '125.37014719124', '43.866004586928', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220172, '长春净月高新技术产业开发区', 'Z', '125.26127292275', '43.823034492758', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220173, '长春高新技术产业开发区', 'Z', '125.26127292275', '43.823034492758', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220174, '长春汽车经济技术开发区', 'Z', '125.33060207591', '43.821953501043', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220182, '榆树市', 'Y', '126.53960936347', '44.845439727693', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220183, '德惠市', 'D', '125.73451517728', '44.527161066608', 220100, 3, 'tr_0 tr_220000 tr_220100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220202, '昌邑区', 'C', '126.58144866124', '43.887992474736', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220203, '龙潭区', 'L', '126.56854459242', '43.91634255363', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220204, '船营区', 'C', '126.54764973677', '43.83992740229', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220211, '丰满区', 'F', '126.56857046362', '43.827151576836', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220221, '永吉县', 'Y', '126.50441572986', '43.678720676989', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220271, '吉林经济开发区', 'J', '126.55563450495', '43.843567834579', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220272, '吉林高新技术产业开发区', 'J', '126.55091570611', '43.822448990547', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220273, '吉林中国新加坡食品区', 'J', '126.55563450495', '43.843567834579', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220281, '蛟河市', 'J', '127.35148018677', '43.730003870507', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220282, '桦甸市', 'H', '126.75248423373', '42.977982779881', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220283, '舒兰市', 'S', '126.97137703226', '44.412270028324', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220284, '磐石市', 'P', '126.06661629889', '42.951817500114', 220200, 3, 'tr_0 tr_220000 tr_220200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220302, '铁西区', 'T', '124.35246676034', '43.152575391803', 220300, 3, 'tr_0 tr_220000 tr_220300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220303, '铁东区', 'T', '124.4164827059', '43.167993993185', 220300, 3, 'tr_0 tr_220000 tr_220300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220322, '梨树县', 'L', '124.3424012471', '43.313345515553', 220300, 3, 'tr_0 tr_220000 tr_220300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220323, '伊通满族自治县', 'Y', '125.31148460754', '43.351103666821', 220300, 3, 'tr_0 tr_220000 tr_220300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220381, '公主岭市', 'G', '124.82944866071', '43.510832663153', 220300, 3, 'tr_0 tr_220000 tr_220300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220382, '双辽市', 'S', '123.50943776128', '43.524527382171', 220300, 3, 'tr_0 tr_220000 tr_220300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220402, '龙山区', 'L', '125.14345242969', '42.907634012133', 220400, 3, 'tr_0 tr_220000 tr_220400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220403, '西安区', 'X', '125.15537330313', '42.933308420625', 220400, 3, 'tr_0 tr_220000 tr_220400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220421, '东丰县', 'D', '125.53737790091', '42.683310778553', 220400, 3, 'tr_0 tr_220000 tr_220400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220422, '东辽县', 'D', '124.99758944369', '42.931879101776', 220400, 3, 'tr_0 tr_220000 tr_220400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220502, '东昌区', 'D', '125.93359459016', '41.70840538484', 220500, 3, 'tr_0 tr_220000 tr_220500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220503, '二道江区', 'E', '126.0495917027', '41.779966174493', 220500, 3, 'tr_0 tr_220000 tr_220500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220521, '通化县', 'T', '125.76539191393', '41.685682238068', 220500, 3, 'tr_0 tr_220000 tr_220500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220523, '辉南县', 'H', '126.05358125713', '42.690699881882', 220500, 3, 'tr_0 tr_220000 tr_220500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220524, '柳河县', 'L', '125.75142398189', '42.290871215056', 220500, 3, 'tr_0 tr_220000 tr_220500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220581, '梅河口市', 'M', '125.71760780995', '42.544883890284', 220500, 3, 'tr_0 tr_220000 tr_220500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220582, '集安市', 'J', '126.199577372', '41.131299724033', 220500, 3, 'tr_0 tr_220000 tr_220500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220602, '浑江区', 'H', '126.42361952721', '41.95042372822', 220600, 3, 'tr_0 tr_220000 tr_220600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220605, '江源区', 'J', '126.59739097896', '42.062939372081', 220600, 3, 'tr_0 tr_220000 tr_220600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220621, '抚松县', 'F', '127.45537119527', '42.227335272553', 220600, 3, 'tr_0 tr_220000 tr_220600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220622, '靖宇县', 'J', '126.81949899257', '42.394765734578', 220600, 3, 'tr_0 tr_220000 tr_220600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220623, '长白朝鲜族自治县', 'Z', '128.20758420219', '41.425895812594', 220600, 3, 'tr_0 tr_220000 tr_220600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220681, '临江市', 'L', '126.9245815135', '41.817678643992', 220600, 3, 'tr_0 tr_220000 tr_220600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220702, '宁江区', 'N', '124.82342254815', '45.178039438667', 220700, 3, 'tr_0 tr_220000 tr_220700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220721, '前郭尔罗斯蒙古族自治县', 'Q', '124.83045556165', '45.123416092926', 220700, 3, 'tr_0 tr_220000 tr_220700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220722, '长岭县', 'Z', '123.9743741034', '44.281638280052', 220700, 3, 'tr_0 tr_220000 tr_220700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220723, '乾安县', 'G', '124.0475638046', '45.008434321605', 220700, 3, 'tr_0 tr_220000 tr_220700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220771, '吉林松原经济开发区', 'J', '124.83148187569', '45.147404193414', 220700, 3, 'tr_0 tr_220000 tr_220700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220781, '扶余市', 'F', '126.0566062111', '44.994168421151', 220700, 3, 'tr_0 tr_220000 tr_220700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220802, '洮北区', 'T', '122.85750977516', '45.627524686514', 220800, 3, 'tr_0 tr_220000 tr_220800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220821, '镇赉县', 'Z', '123.20657575565', '45.853116635389', 220800, 3, 'tr_0 tr_220000 tr_220800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220822, '通榆县', 'T', '123.09452077673', '44.818963735882', 220800, 3, 'tr_0 tr_220000 tr_220800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220871, '吉林白城经济开发区', 'J', '122.81641245977', '45.642168989302', 220800, 3, 'tr_0 tr_220000 tr_220800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220881, '洮南市', 'T', '122.7944676826', '45.341131872567', 220800, 3, 'tr_0 tr_220000 tr_220800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (220882, '大安市', 'D', '124.29850428102', '45.513045149628', 220800, 3, 'tr_0 tr_220000 tr_220800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (222401, '延吉市', 'Y', '129.52052013726', '42.91271700988', 222400, 3, 'tr_0 tr_220000 tr_222400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (222402, '图们市', 'T', '129.85038151375', '42.974283499075', 222400, 3, 'tr_0 tr_220000 tr_222400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (222403, '敦化市', 'D', '128.23861239315', '43.378291274517', 222400, 3, 'tr_0 tr_220000 tr_222400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (222404, '珲春市', 'H', '130.37261321858', '42.868515115192', 222400, 3, 'tr_0 tr_220000 tr_222400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (222405, '龙井市', 'L', '129.43263477701', '42.771534868349', 222400, 3, 'tr_0 tr_220000 tr_222400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (222406, '和龙市', 'H', '129.01738712621', '42.552322568432', 222400, 3, 'tr_0 tr_220000 tr_222400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (222424, '汪清县', 'W', '129.77760879625', '43.318450833865', 222400, 3, 'tr_0 tr_220000 tr_222400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (222426, '安图县', 'A', '128.90544846814', '43.117916954912', 222400, 3, 'tr_0 tr_220000 tr_222400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230102, '道里区', 'D', '126.62343158837', '45.761844478815', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230103, '南岗区', 'N', '126.67563849952', '45.765866163758', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230104, '道外区', 'D', '126.65560404089', '45.797776220434', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230108, '平房区', 'P', '126.54161509032', '45.808825827952', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'); + +INSERT INTO hg_sys_provinces (id, title, pinyin, lng, lat, pid, level, tree, sort, status, created_at, updated_at) VALUES + (230109, '松北区', 'S', '126.51648256825', '45.808592561429', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230110, '香坊区', 'X', '126.66962434413', '45.713619645389', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230111, '呼兰区', 'H', '126.5943989831', '45.895209780863', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230112, '阿城区', 'A', '126.96435649552', '45.554275304352', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230113, '双城区', 'S', '126.31962313777', '45.388111522394', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230123, '依兰县', 'Y', '129.57451969721', '46.331260289052', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230124, '方正县', 'F', '128.83563368134', '45.857758440062', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230125, '宾县', 'B', '127.4734970145', '45.752465386742', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230126, '巴彦县', 'B', '127.4105479864', '46.091282657815', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230127, '木兰县', 'M', '128.05035620452', '45.956871319448', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230128, '通河县', 'T', '128.75241627584', '45.996392590921', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230129, '延寿县', 'Y', '128.33860582402', '45.457641195714', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230183, '尚志市', 'S', '128.01548820666', '45.215473941867', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230184, '五常市', 'W', '127.17352882965', '44.937842855774', 230100, 3, 'tr_0 tr_230000 tr_230100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230202, '龙沙区', 'L', '123.96437622285', '47.323576977429', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230203, '建华区', 'J', '123.96135010108', '47.360554871046', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230204, '铁锋区', 'T', '123.984415712', '47.347018863772', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230205, '昂昂溪区', 'A', '123.82940626913', '47.161332243626', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230206, '富拉尔基区', 'F', '123.63650980324', '47.215504082791', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230207, '碾子山区', 'N', '122.89436680108', '47.523236298133', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230208, '梅里斯达斡尔族区', 'M', '123.75954091741', '47.315549574077', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230221, '龙江县', 'L', '123.21153898342', '47.343605740151', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230223, '依安县', 'Y', '125.3124821661', '47.899483651368', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230224, '泰来县', 'T', '123.42362630925', '46.39782928518', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230225, '甘南县', 'G', '123.51248588182', '47.92688406951', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230227, '富裕县', 'F', '124.48054247906', '47.780228063275', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230229, '克山县', 'K', '125.88137832693', '48.043172360737', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230230, '克东县', 'K', '126.25538674804', '48.048244160483', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230231, '拜泉县', 'B', '126.10542147027', '47.601867301959', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230281, '讷河市', 'N', '124.8905490562', '48.490086593264', 230200, 3, 'tr_0 tr_230000 tr_230200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230302, '鸡冠区', 'J', '130.98763160852', '45.309806344312', 230300, 3, 'tr_0 tr_230000 tr_230300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230303, '恒山区', 'H', '130.91138523344', '45.216971883154', 230300, 3, 'tr_0 tr_230000 tr_230300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230304, '滴道区', 'D', '130.85058046059', '45.354433617216', 230300, 3, 'tr_0 tr_230000 tr_230300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230305, '梨树区', 'L', '130.70339606719', '45.098241780981', 230300, 3, 'tr_0 tr_230000 tr_230300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230306, '城子河区', 'C', '131.02770429868', '45.379689760283', 230300, 3, 'tr_0 tr_230000 tr_230300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230307, '麻山区', 'M', '130.48453641613', '45.217934996767', 230300, 3, 'tr_0 tr_230000 tr_230300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230321, '鸡东县', 'J', '131.13055848296', '45.266184560826', 230300, 3, 'tr_0 tr_230000 tr_230300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230381, '虎林市', 'H', '132.94346566318', '45.768946912884', 230300, 3, 'tr_0 tr_230000 tr_230300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230382, '密山市', 'M', '131.85353110655', '45.535640809748', 230300, 3, 'tr_0 tr_230000 tr_230300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230402, '向阳区', 'X', '130.30046804764', '47.348580889067', 230400, 3, 'tr_0 tr_230000 tr_230400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230403, '工农区', 'G', '130.28161728617', '47.324430299458', 230400, 3, 'tr_0 tr_230000 tr_230400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230404, '南山区', 'N', '130.29354031555', '47.321245938809', 230400, 3, 'tr_0 tr_230000 tr_230400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230405, '兴安区', 'X', '130.24554573859', '47.258716269483', 230400, 3, 'tr_0 tr_230000 tr_230400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230406, '东山区', 'D', '130.32336109407', '47.344987135573', 230400, 3, 'tr_0 tr_230000 tr_230400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230407, '兴山区', 'X', '130.31736364716', '47.396045381282', 230400, 3, 'tr_0 tr_230000 tr_230400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230421, '萝北县', 'L', '130.8354950365', '47.583422197029', 230400, 3, 'tr_0 tr_230000 tr_230400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230422, '绥滨县', 'S', '131.85948651276', '47.295265458073', 230400, 3, 'tr_0 tr_230000 tr_230400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230502, '尖山区', 'J', '131.16534177061', '46.652585923812', 230500, 3, 'tr_0 tr_230000 tr_230500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230503, '岭东区', 'L', '131.164376721', '46.464596047853', 230500, 3, 'tr_0 tr_230000 tr_230500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230505, '四方台区', 'S', '131.345657378', '46.602012285083', 230500, 3, 'tr_0 tr_230000 tr_230500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230506, '宝山区', 'B', '131.40737518857', '46.583598340241', 230500, 3, 'tr_0 tr_230000 tr_230500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230521, '集贤县', 'J', '131.14743449942', '46.734517788557', 230500, 3, 'tr_0 tr_230000 tr_230500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230522, '友谊县', 'Y', '131.8145948627', '46.772973223022', 230500, 3, 'tr_0 tr_230000 tr_230500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230523, '宝清县', 'B', '132.20359411633', '46.332651823572', 230500, 3, 'tr_0 tr_230000 tr_230500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230524, '饶河县', 'R', '134.02046893233', '46.804182744162', 230500, 3, 'tr_0 tr_230000 tr_230500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230602, '萨尔图区', 'S', '125.13351006443', '46.638936435554', 230600, 3, 'tr_0 tr_230000 tr_230600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230603, '龙凤区', 'L', '125.14047256095', '46.567678067125', 230600, 3, 'tr_0 tr_230000 tr_230600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230604, '让胡路区', 'R', '124.87759881447', '46.658078458609', 230600, 3, 'tr_0 tr_230000 tr_230600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230605, '红岗区', 'H', '124.8974774171', '46.404313108628', 230600, 3, 'tr_0 tr_230000 tr_230600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230606, '大同区', 'D', '124.81937675979', '46.045583951311', 230600, 3, 'tr_0 tr_230000 tr_230600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230621, '肇州县', 'Z', '125.2753682248', '45.705107986871', 230600, 3, 'tr_0 tr_230000 tr_230600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230622, '肇源县', 'Z', '125.08457262601', '45.524152914206', 230600, 3, 'tr_0 tr_230000 tr_230600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230623, '林甸县', 'L', '124.86965042766', '47.177234395243', 230600, 3, 'tr_0 tr_230000 tr_230600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230624, '杜尔伯特蒙古族自治县', 'D', '124.44935879141', '46.868767758452', 230600, 3, 'tr_0 tr_230000 tr_230600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230671, '大庆高新技术产业开发区', 'D', '125.15778147083', '46.581298438495', 230600, 3, 'tr_0 tr_230000 tr_230600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230702, '伊春区', 'Y', '128.91345891818', '47.733954439001', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230703, '南岔区', 'N', '129.28957179961', '47.143749913595', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230704, '友好区', 'Y', '128.84257946937', '47.846436100332', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230705, '西林区', 'X', '129.31959406806', '47.486393100686', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230706, '翠峦区', 'C', '128.67648152295', '47.732893980201', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230707, '新青区', 'X', '129.54064675236', '48.296134660851', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230708, '美溪区', 'M', '129.13536777746', '47.64134415168', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230709, '金山屯区', 'J', '129.43563861113', '47.418759014597', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230710, '五营区', 'W', '129.25134952898', '48.11427128362', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230711, '乌马河区', 'W', '128.80554637557', '47.73361851021', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230712, '汤旺河区', 'T', '129.57747422403', '48.460614389845', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230713, '带岭区', 'D', '129.02742523145', '47.034571951137', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230714, '乌伊岭区', 'W', '129.44457666112', '48.596169129772', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230715, '红星区', 'H', '129.39750706935', '48.245480405275', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230716, '上甘岭区', 'S', '129.03043733966', '47.980913793769', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230722, '嘉荫县', 'J', '130.41055547772', '48.894983469564', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230781, '铁力市', 'T', '128.03836490393', '46.992948620259', 230700, 3, 'tr_0 tr_230000 tr_230700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230803, '向阳区', 'X', '130.37261186145', '46.813511816781', 230800, 3, 'tr_0 tr_230000 tr_230800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230804, '前进区', 'Q', '130.3816482759', '46.819626508482', 230800, 3, 'tr_0 tr_230000 tr_230800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230805, '东风区', 'D', '130.41056077772', '46.828385151991', 230800, 3, 'tr_0 tr_230000 tr_230800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230811, '郊区', 'J', '130.32735909257', '46.805689990858', 230800, 3, 'tr_0 tr_230000 tr_230800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230822, '桦南县', 'H', '130.56038502153', '46.24507747688', 230800, 3, 'tr_0 tr_230000 tr_230800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230826, '桦川县', 'H', '130.72554944886', '47.028816852926', 230800, 3, 'tr_0 tr_230000 tr_230800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230828, '汤原县', 'T', '129.91164504155', '46.735326720461', 230800, 3, 'tr_0 tr_230000 tr_230800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230881, '同江市', 'T', '132.51750949205', '47.647980676666', 230800, 3, 'tr_0 tr_230000 tr_230800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230882, '富锦市', 'F', '132.04453879528', '47.255932571848', 230800, 3, 'tr_0 tr_230000 tr_230800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230883, '抚远市', 'F', '134.31448962575', '48.370944696273', 230800, 3, 'tr_0 tr_230000 tr_230800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230902, '新兴区', 'X', '130.93837086995', '45.822310328543', 230900, 3, 'tr_0 tr_230000 tr_230900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230903, '桃山区', 'T', '131.02644424554', '45.771799915696', 230900, 3, 'tr_0 tr_230000 tr_230900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230904, '茄子河区', 'J', '131.0744805937', '45.791238180152', 230900, 3, 'tr_0 tr_230000 tr_230900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (230921, '勃利县', 'B', '130.59853255314', '45.760964313167', 230900, 3, 'tr_0 tr_230000 tr_230900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231002, '东安区', 'D', '129.63347765344', '44.587460377571', 231000, 3, 'tr_0 tr_230000 tr_231000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231003, '阳明区', 'Y', '129.64252736281', '44.601775026515', 231000, 3, 'tr_0 tr_230000 tr_231000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231004, '爱民区', 'A', '129.59836369953', '44.602350339442', 231000, 3, 'tr_0 tr_230000 tr_231000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231005, '西安区', 'X', '129.62241286515', '44.583861081842', 231000, 3, 'tr_0 tr_230000 tr_231000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231025, '林口县', 'L', '130.28757880086', '45.28412885062', 231000, 3, 'tr_0 tr_230000 tr_231000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231071, '牡丹江经济技术开发区', 'M', '129.63953977835', '44.556245708986', 231000, 3, 'tr_0 tr_230000 tr_231000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231081, '绥芬河市', 'S', '131.15739222567', '44.418154372388', 231000, 3, 'tr_0 tr_230000 tr_231000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231083, '海林市', 'H', '129.38742683358', '44.599871973195', 231000, 3, 'tr_0 tr_230000 tr_231000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231084, '宁安市', 'N', '129.48936798014', '44.3469835775', 231000, 3, 'tr_0 tr_230000 tr_231000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231085, '穆棱市', 'M', '130.53055850352', '44.924784589588', 231000, 3, 'tr_0 tr_230000 tr_231000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231086, '东宁市', 'D', '131.13154357445', '44.096101486248', 231000, 3, 'tr_0 tr_230000 tr_231000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231102, '爱辉区', 'A', '127.50663227086', '50.257709616452', 231100, 3, 'tr_0 tr_230000 tr_231100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231121, '嫩江县', 'N', '125.22763469543', '49.191320184756', 231100, 3, 'tr_0 tr_230000 tr_231100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231123, '逊克县', 'X', '128.48558459529', '49.5694914357', 231100, 3, 'tr_0 tr_230000 tr_231100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231124, '孙吴县', 'S', '127.34238770837', '49.431450606859', 231100, 3, 'tr_0 tr_230000 tr_231100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231181, '北安市', 'B', '126.49737974226', '48.247419532219', 231100, 3, 'tr_0 tr_230000 tr_231100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231182, '五大连池市', 'W', '126.21155518831', '48.522609551763', 231100, 3, 'tr_0 tr_230000 tr_231100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231202, '北林区', 'B', '126.99144894055', '46.643492672111', 231200, 3, 'tr_0 tr_230000 tr_231200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231221, '望奎县', 'W', '126.49238489413', '46.839167601749', 231200, 3, 'tr_0 tr_230000 tr_231200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231222, '兰西县', 'L', '126.29461952255', '46.258095172245', 231200, 3, 'tr_0 tr_230000 tr_231200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231223, '青冈县', 'Q', '126.10048887472', '46.71068498305', 231200, 3, 'tr_0 tr_230000 tr_231200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231224, '庆安县', 'Q', '127.5146121882', '46.885744465245', 231200, 3, 'tr_0 tr_230000 tr_231200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231225, '明水县', 'M', '125.91248269419', '47.179483374941', 231200, 3, 'tr_0 tr_230000 tr_231200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231226, '绥棱县', 'S', '127.12051514063', '47.242515793854', 231200, 3, 'tr_0 tr_230000 tr_231200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231281, '安达市', 'A', '125.34862234422', '46.425719232144', 231200, 3, 'tr_0 tr_230000 tr_231200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231282, '肇东市', 'Z', '125.96853740717', '46.056938289303', 231200, 3, 'tr_0 tr_230000 tr_231200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (231283, '海伦市', 'H', '126.93650857556', '47.456903841096', 231200, 3, 'tr_0 tr_230000 tr_231200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (232701, '漠河市', 'M', '122.5454208342', '52.978303678377', 232700, 3, 'tr_0 tr_230000 tr_232700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (232721, '呼玛县', 'H', '126.65964991907', '51.73094674724', 232700, 3, 'tr_0 tr_230000 tr_232700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (232722, '塔河县', 'T', '124.71651251449', '52.340305081113', 232700, 3, 'tr_0 tr_230000 tr_232700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (232761, '加格达奇区', 'J', '124.15292785448', '50.420025955028', 232700, 3, 'tr_0 tr_230000 tr_232700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (232762, '松岭区', 'S', '124.15292785448', '50.420025955028', 232700, 3, 'tr_0 tr_230000 tr_232700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (232763, '新林区', 'X', '124.53914092375', '51.801225110533', 232700, 3, 'tr_0 tr_230000 tr_232700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (232764, '呼中区', 'H', '123.58143136869', '52.037468814622', 232700, 3, 'tr_0 tr_230000 tr_232700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310101, '黄浦区', 'H', '121.49158559252', '31.237247152064', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310104, '徐汇区', 'X', '121.44339635276', '31.194556772823', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310105, '长宁区', 'Z', '121.43045437545', '31.226847968225', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310106, '静安区', 'J', '121.45343177277', '31.233844930402', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310107, '普陀区', 'P', '112.85530302042', '35.520558754673', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310109, '虹口区', 'H', '121.51158645453', '31.269746698931', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310110, '杨浦区', 'Y', '121.53251993733', '31.265524144657', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310112, '闵行区', 'M', '121.38861193361', '31.118842580087', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310113, '宝山区', 'B', '131.40737518857', '46.583598340241', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310114, '嘉定区', 'J', '121.27259505835', '31.380155339677', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310115, '浦东新区', 'P', '121.55045460683', '31.227348292436', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310116, '金山区', 'J', '121.34848004512', '30.74785237657', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310117, '松江区', 'S', '121.23447959624', '31.037135176464', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310118, '青浦区', 'Q', '121.13055310467', '31.155454317981', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310120, '奉贤区', 'F', '121.48050373643', '30.923720110285', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (310151, '崇明区', 'C', '121.40355686272', '31.628569984404', 310100, 3, 'tr_0 tr_310000 tr_310100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320102, '玄武区', 'X', '118.80441263575', '32.054756682949', 320100, 3, 'tr_0 tr_320000 tr_320100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320104, '秦淮区', 'Q', '118.80040736097', '32.045138606405', 320100, 3, 'tr_0 tr_320000 tr_320100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320105, '建邺区', 'J', '118.73856944695', '32.009369695446', 320100, 3, 'tr_0 tr_320000 tr_320100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320106, '鼓楼区', 'G', '118.77651899204', '32.072405160557', 320100, 3, 'tr_0 tr_320000 tr_320100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320111, '浦口区', 'P', '118.63460405875', '32.064679277923', 320100, 3, 'tr_0 tr_320000 tr_320100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320113, '栖霞区', 'Q', '118.91542298491', '32.10260020783', 320100, 3, 'tr_0 tr_320000 tr_320100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320114, '雨花台区', 'Y', '118.78544536406', '31.997858805466', 320100, 3, 'tr_0 tr_320000 tr_320100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320115, '江宁区', 'J', '118.84656705909', '31.958526869177', 320100, 3, 'tr_0 tr_320000 tr_320100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320116, '六合区', 'L', '118.82747132971', '32.32866604102', 320100, 3, 'tr_0 tr_320000 tr_320100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320117, '溧水区', 'L', '119.03440390903', '31.657283696314', 320100, 3, 'tr_0 tr_320000 tr_320100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320118, '高淳区', 'G', '118.89849765147', '31.333639123905', 320100, 3, 'tr_0 tr_320000 tr_320100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320205, '锡山区', 'X', '120.36342571103', '31.594761632814', 320200, 3, 'tr_0 tr_320000 tr_320200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320206, '惠山区', 'H', '120.30459559335', '31.686741337275', 320200, 3, 'tr_0 tr_320000 tr_320200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320211, '滨湖区', 'B', '120.29154752616', '31.534639699974', 320200, 3, 'tr_0 tr_320000 tr_320200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320213, '梁溪区', 'L', '120.30959951436', '31.571645024135', 320200, 3, 'tr_0 tr_320000 tr_320200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320214, '新吴区', 'X', '120.37039647195', '31.554850239842', 320200, 3, 'tr_0 tr_320000 tr_320200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320281, '江阴市', 'J', '120.29156800752', '31.926044909769', 320200, 3, 'tr_0 tr_320000 tr_320200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320282, '宜兴市', 'Y', '119.83160603216', '31.342956624268', 320200, 3, 'tr_0 tr_320000 tr_320200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320302, '鼓楼区', 'G', '117.19257874733', '34.293760084221', 320300, 3, 'tr_0 tr_320000 tr_320300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320303, '云龙区', 'Y', '117.2584239124', '34.259086691031', 320300, 3, 'tr_0 tr_320000 tr_320300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320305, '贾汪区', 'J', '117.46943039703', '34.441620400617', 320300, 3, 'tr_0 tr_320000 tr_320300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320311, '泉山区', 'Q', '117.20059046468', '34.249942871606', 320300, 3, 'tr_0 tr_320000 tr_320300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320312, '铜山区', 'T', '117.17556960199', '34.186100449885', 320300, 3, 'tr_0 tr_320000 tr_320300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320321, '丰县', 'F', '116.60258246804', '34.699769765634', 320300, 3, 'tr_0 tr_320000 tr_320300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320322, '沛县', 'P', '116.9425856239', '34.765151955415', 320300, 3, 'tr_0 tr_320000 tr_320300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320324, '睢宁县', 'S', '117.94743277245', '33.918789417818', 320300, 3, 'tr_0 tr_320000 tr_320300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320371, '徐州经济技术开发区', 'X', '117.28574962221', '34.272904039312', 320300, 3, 'tr_0 tr_320000 tr_320300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320381, '新沂市', 'X', '118.36153652102', '34.375610954637', 320300, 3, 'tr_0 tr_320000 tr_320300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320382, '邳州市', 'P', '117.96341066307', '34.339753160807', 320300, 3, 'tr_0 tr_320000 tr_320300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320402, '天宁区', 'T', '119.98046316025', '31.785570271253', 320400, 3, 'tr_0 tr_320000 tr_320400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320404, '钟楼区', 'Z', '119.908462716', '31.807646657754', 320400, 3, 'tr_0 tr_320000 tr_320400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320411, '新北区', 'X', '119.97751429276', '31.836323947624', 320400, 3, 'tr_0 tr_320000 tr_320400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320412, '武进区', 'W', '119.94861167229', '31.706446611742', 320400, 3, 'tr_0 tr_320000 tr_320400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320413, '金坛区', 'J', '119.60457090266', '31.72889303001', 320400, 3, 'tr_0 tr_320000 tr_320400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320481, '溧阳市', 'L', '119.49150603896', '31.422102292159', 320400, 3, 'tr_0 tr_320000 tr_320400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320505, '虎丘区', 'H', '120.57847178571', '31.301932876554', 320500, 3, 'tr_0 tr_320000 tr_320500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320506, '吴中区', 'W', '120.63850751921', '31.268261445846', 320500, 3, 'tr_0 tr_320000 tr_320500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320507, '相城区', 'X', '120.64856593584', '31.374689921493', 320500, 3, 'tr_0 tr_320000 tr_320500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320508, '姑苏区', 'G', '120.6234549731', '31.341831300993', 320500, 3, 'tr_0 tr_320000 tr_320500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320509, '吴江区', 'W', '120.65156717454', '31.144644190473', 320500, 3, 'tr_0 tr_320000 tr_320500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320571, '苏州工业园区', 'S', '120.82848521083', '31.309610913062', 320500, 3, 'tr_0 tr_320000 tr_320500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320581, '常熟市', 'C', '120.75949588665', '31.659538276741', 320500, 3, 'tr_0 tr_320000 tr_320500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320582, '张家港市', 'Z', '120.56155363871', '31.88114053634', 320500, 3, 'tr_0 tr_320000 tr_320500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320583, '昆山市', 'K', '120.98745249795', '31.390863425082', 320500, 3, 'tr_0 tr_320000 tr_320500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320585, '太仓市', 'T', '121.1355952935', '31.464599352978', 320500, 3, 'tr_0 tr_320000 tr_320500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320602, '崇川区', 'C', '120.86342022229', '32.015923029631', 320600, 3, 'tr_0 tr_320000 tr_320600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320611, '港闸区', 'G', '120.82445235808', '32.037345124875', 320600, 3, 'tr_0 tr_320000 tr_320600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320612, '通州区', 'T', '121.08142549498', '32.070355739676', 320600, 3, 'tr_0 tr_320000 tr_320600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320623, '如东县', 'R', '121.19243791024', '32.335872886155', 320600, 3, 'tr_0 tr_320000 tr_320600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320671, '南通经济技术开发区', 'N', '120.90159173866', '31.986549431201', 320600, 3, 'tr_0 tr_320000 tr_320600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320681, '启东市', 'Q', '121.66347374677', '31.814232849643', 320600, 3, 'tr_0 tr_320000 tr_320600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320682, '如皋市', 'R', '120.57946558109', '32.377851486109', 320600, 3, 'tr_0 tr_320000 tr_320600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320684, '海门市', 'H', '121.18843649817', '31.87361172603', 320600, 3, 'tr_0 tr_320000 tr_320600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320685, '海安市', 'H', '120.47443309578', '32.53919574424', 320600, 3, 'tr_0 tr_320000 tr_320600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320703, '连云区', 'L', '119.46701669742', '34.638921829102', 320700, 3, 'tr_0 tr_320000 tr_320700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320706, '海州区', 'H', '119.16940808819', '34.577456118597', 320700, 3, 'tr_0 tr_320000 tr_320700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320707, '赣榆区', 'G', '119.17943461497', '34.847682460846', 320700, 3, 'tr_0 tr_320000 tr_320700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320722, '东海县', 'D', '118.75956509248', '34.547918627364', 320700, 3, 'tr_0 tr_320000 tr_320700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320723, '灌云县', 'G', '119.24653354504', '34.288616060258', 320700, 3, 'tr_0 tr_320000 tr_320700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320724, '灌南县', 'G', '119.3225381861', '34.09259130777', 320700, 3, 'tr_0 tr_320000 tr_320700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320771, '连云港经济技术开发区', 'L', '119.35457059279', '34.70740063931', 320700, 3, 'tr_0 tr_320000 tr_320700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320772, '连云港高新技术产业开发区', 'L', '119.22862133317', '34.602249525267', 320700, 3, 'tr_0 tr_320000 tr_320700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320803, '淮安区', 'H', '119.14746320322', '33.508999838208', 320800, 3, 'tr_0 tr_320000 tr_320800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320804, '淮阴区', 'H', '119.04142174116', '33.638150424768', 320800, 3, 'tr_0 tr_320000 tr_320800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320812, '清江浦区', 'Q', '119.03241362334', '33.558562240066', 320800, 3, 'tr_0 tr_320000 tr_320800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320813, '洪泽区', 'H', '118.8795836493', '33.29962468147', 320800, 3, 'tr_0 tr_320000 tr_320800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320826, '涟水县', 'L', '119.26644843921', '33.7870787079', 320800, 3, 'tr_0 tr_320000 tr_320800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320830, '盱眙县', 'X', '118.55144127024', '33.01825474166', 320800, 3, 'tr_0 tr_320000 tr_320800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320831, '金湖县', 'J', '119.02646908663', '33.031283826757', 320800, 3, 'tr_0 tr_320000 tr_320800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320871, '淮安经济技术开发区', 'H', '119.13289044209', '33.610236869931', 320800, 3, 'tr_0 tr_320000 tr_320800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320902, '亭湖区', 'T', '120.20457816804', '33.395893486907', 320900, 3, 'tr_0 tr_320000 tr_320900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320903, '盐都区', 'Y', '120.16050325734', '33.344020315599', 320900, 3, 'tr_0 tr_320000 tr_320900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320904, '大丰区', 'D', '120.50743881649', '33.20475984971', 320900, 3, 'tr_0 tr_320000 tr_320900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320921, '响水县', 'X', '119.58460112202', '34.20474300276', 320900, 3, 'tr_0 tr_320000 tr_320900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320922, '滨海县', 'B', '119.82762105909', '33.995646547467', 320900, 3, 'tr_0 tr_320000 tr_320900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320923, '阜宁县', 'F', '119.80958074885', '33.765078727087', 320900, 3, 'tr_0 tr_320000 tr_320900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320924, '射阳县', 'S', '120.26444564892', '33.78101359213', 320900, 3, 'tr_0 tr_320000 tr_320900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320925, '建湖县', 'J', '119.80553127745', '33.469832978385', 320900, 3, 'tr_0 tr_320000 tr_320900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320971, '盐城经济技术开发区', 'Y', '120.16754426576', '33.355100917626', 320900, 3, 'tr_0 tr_320000 tr_320900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (320981, '东台市', 'D', '120.32653706475', '32.872716312488', 320900, 3, 'tr_0 tr_320000 tr_320900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321002, '广陵区', 'G', '119.43850484608', '32.40066115972', 321000, 3, 'tr_0 tr_320000 tr_321000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321003, '邗江区', 'H', '119.40438513671', '32.38275135526', 321000, 3, 'tr_0 tr_320000 tr_321000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321012, '江都区', 'J', '119.57660296908', '32.440294506243', 321000, 3, 'tr_0 tr_320000 tr_321000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321023, '宝应县', 'B', '119.36555570138', '33.247205461148', 321000, 3, 'tr_0 tr_320000 tr_321000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321071, '扬州经济技术开发区', 'Y', '119.41941890823', '32.40067693609', 321000, 3, 'tr_0 tr_320000 tr_321000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321081, '仪征市', 'Y', '119.19146705795', '32.278090483161', 321000, 3, 'tr_0 tr_320000 tr_321000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321084, '高邮市', 'G', '119.46561561654', '32.787147020528', 321000, 3, 'tr_0 tr_320000 tr_321000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321102, '京口区', 'J', '119.47560369584', '32.203785483528', 321100, 3, 'tr_0 tr_320000 tr_321100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321111, '润州区', 'R', '119.41844047387', '32.201494843152', 321100, 3, 'tr_0 tr_320000 tr_321100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321112, '丹徒区', 'D', '119.44050079109', '32.13792039565', 321100, 3, 'tr_0 tr_320000 tr_321100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321171, '镇江新区', 'Z', '119.67618104484', '32.168646770866', 321100, 3, 'tr_0 tr_320000 tr_321100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321181, '丹阳市', 'D', '119.61250060471', '32.01592027417', 321100, 3, 'tr_0 tr_320000 tr_321100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321182, '扬中市', 'Y', '119.80351961209', '32.242967194122', 321100, 3, 'tr_0 tr_320000 tr_321100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321183, '句容市', 'J', '119.1754332029', '31.950923490521', 321100, 3, 'tr_0 tr_320000 tr_321100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321202, '海陵区', 'H', '119.9255249512', '32.496731549227', 321200, 3, 'tr_0 tr_320000 tr_321200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321203, '高港区', 'G', '119.88842098109', '32.32486247444', 321200, 3, 'tr_0 tr_320000 tr_321200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321204, '姜堰区', 'J', '120.13339832587', '32.515233674759', 321200, 3, 'tr_0 tr_320000 tr_321200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321271, '泰州医药高新技术产业开发区', 'T', '119.91593203649', '32.502484457877', 321200, 3, 'tr_0 tr_320000 tr_321200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321281, '兴化市', 'X', '119.85751406137', '32.917824213889', 321200, 3, 'tr_0 tr_320000 tr_321200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321282, '靖江市', 'J', '120.28353203592', '31.988170075211', 321200, 3, 'tr_0 tr_320000 tr_321200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321283, '泰兴市', 'T', '120.05859939046', '32.177474023712', 321200, 3, 'tr_0 tr_320000 tr_321200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321302, '宿城区', 'S', '118.24956705107', '33.968677630731', 321300, 3, 'tr_0 tr_320000 tr_321300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321311, '宿豫区', 'S', '118.33640094471', '33.954804396327', 321300, 3, 'tr_0 tr_320000 tr_321300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321322, '沭阳县', 'S', '118.81041906571', '34.117454209479', 321300, 3, 'tr_0 tr_320000 tr_321300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321323, '泗阳县', 'S', '118.70946596538', '33.728328313047', 321300, 3, 'tr_0 tr_320000 tr_321300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321324, '泗洪县', 'S', '118.22241594669', '33.465732594595', 321300, 3, 'tr_0 tr_320000 tr_321300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (321371, '宿迁经济技术开发区', 'S', '118.27387299732', '33.898354594037', 321300, 3, 'tr_0 tr_320000 tr_321300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330102, '上城区', 'S', '120.17557880007', '30.248398420426', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330103, '下城区', 'X', '120.18760693119', '30.286744052562', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330104, '江干区', 'J', '120.21153877811', '30.263310567012', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330105, '拱墅区', 'G', '120.14844700926', '30.32464256663', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330106, '西湖区', 'X', '120.13643801205', '30.265916325589', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330108, '滨江区', 'B', '120.21847118139', '30.214332950144', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330109, '萧山区', 'X', '120.27047058397', '30.187511222214', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330110, '余杭区', 'Y', '120.30659216718', '30.424739268745', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330111, '富阳区', 'F', '119.96655568418', '30.054722967304', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330112, '临安区', 'L', '119.73151737122', '30.239805598054', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330122, '桐庐县', 'T', '119.69759877583', '29.798584790143', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330127, '淳安县', 'C', '119.04839230601', '29.614950366034', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330182, '建德市', 'J', '119.28739807501', '29.481154026968', 330100, 3, 'tr_0 tr_330000 tr_330100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330203, '海曙区', 'H', '121.55740307254', '29.865720708366', 330200, 3, 'tr_0 tr_330000 tr_330200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330205, '江北区', 'J', '121.56042128922', '29.892948379476', 330200, 3, 'tr_0 tr_330000 tr_330200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330206, '北仑区', 'B', '121.85057621461', '29.904659359939', 330200, 3, 'tr_0 tr_330000 tr_330200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330211, '镇海区', 'Z', '121.72251899132', '29.954884963349', 330200, 3, 'tr_0 tr_330000 tr_330200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330212, '鄞州区', 'Y', '121.55542706991', '29.824206349996', 330200, 3, 'tr_0 tr_330000 tr_330200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330213, '奉化区', 'F', '121.41352776719', '29.66114641278', 330200, 3, 'tr_0 tr_330000 tr_330200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330225, '象山县', 'X', '121.87556392982', '29.482270653805', 330200, 3, 'tr_0 tr_330000 tr_330200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330226, '宁海县', 'N', '121.43643177294', '29.294317441106', 330200, 3, 'tr_0 tr_330000 tr_330200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330281, '余姚市', 'Y', '121.16058507482', '30.042734639571', 330200, 3, 'tr_0 tr_330000 tr_330200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330282, '慈溪市', 'C', '121.27259613632', '30.17525661072', 330200, 3, 'tr_0 tr_330000 tr_330200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330302, '鹿城区', 'L', '120.66158649793', '28.020351607763', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330303, '龙湾区', 'L', '120.81946755397', '27.938652244916', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330304, '瓯海区', 'O', '120.62144724335', '27.972857351643', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330305, '洞头区', 'D', '121.16354856759', '27.841870324587', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330324, '永嘉县', 'Y', '120.68852407508', '28.156450332206', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330326, '平阳县', 'P', '120.57251537444', '27.667724401093', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330327, '苍南县', 'C', '120.43359512229', '27.523066788447', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330328, '文成县', 'W', '120.09748845652', '27.79321715229', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330329, '泰顺县', 'T', '119.72353725759', '27.562170559597', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330371, '温州经济技术开发区', 'W', '120.82366240355', '27.878919129203', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330381, '瑞安市', 'R', '120.66158218607', '27.783950736232', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330382, '乐清市', 'L', '120.99250185617', '28.118179995228', 330300, 3, 'tr_0 tr_330000 tr_330300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330402, '南湖区', 'N', '120.78961005175', '30.751546813315', 330400, 3, 'tr_0 tr_330000 tr_330400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330411, '秀洲区', 'X', '120.71543705563', '30.770207214174', 330400, 3, 'tr_0 tr_330000 tr_330400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330421, '嘉善县', 'J', '120.93251060584', '30.83712219382', 330400, 3, 'tr_0 tr_330000 tr_330400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330424, '海盐县', 'H', '120.95244526273', '30.531872894538', 330400, 3, 'tr_0 tr_330000 tr_330400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330481, '海宁市', 'H', '120.68656506738', '30.517923769776', 330400, 3, 'tr_0 tr_330000 tr_330400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330482, '平湖市', 'P', '121.02257525525', '30.682240998058', 330400, 3, 'tr_0 tr_330000 tr_330400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330483, '桐乡市', 'T', '120.57154315531', '30.63631118771', 330400, 3, 'tr_0 tr_330000 tr_330400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330502, '吴兴区', 'W', '120.1916046602', '30.862955454986', 330500, 3, 'tr_0 tr_330000 tr_330500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330503, '南浔区', 'N', '120.42460139422', '30.855242982243', 330500, 3, 'tr_0 tr_330000 tr_330500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330521, '德清县', 'D', '119.98346466845', '30.548628239139', 330500, 3, 'tr_0 tr_330000 tr_330500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330522, '长兴县', 'Z', '119.91749832197', '31.032579326835', 330500, 3, 'tr_0 tr_330000 tr_330500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330523, '安吉县', 'A', '119.68656337876', '30.644424794114', 330500, 3, 'tr_0 tr_330000 tr_330500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330602, '越城区', 'Y', '120.58843667181', '29.995309962798', 330600, 3, 'tr_0 tr_330000 tr_330600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330603, '柯桥区', 'K', '120.45151103408', '30.07900360495', 330600, 3, 'tr_0 tr_330000 tr_330600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330604, '上虞区', 'S', '120.87450989364', '30.038242967062', 330600, 3, 'tr_0 tr_330000 tr_330600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330624, '新昌县', 'X', '120.91056965639', '29.50554107531', 330600, 3, 'tr_0 tr_330000 tr_330600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330681, '诸暨市', 'Z', '120.25340833197', '29.714934649195', 330600, 3, 'tr_0 tr_330000 tr_330600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330683, '嵊州市', 'S', '120.83743725739', '29.567326991294', 330600, 3, 'tr_0 tr_330000 tr_330600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330702, '婺城区', 'W', '119.57859260936', '29.091775438186', 330700, 3, 'tr_0 tr_330000 tr_330700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330703, '金东区', 'J', '119.69958241405', '29.104765016118', 330700, 3, 'tr_0 tr_330000 tr_330700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330723, '武义县', 'W', '119.82256555867', '28.89824378665', 330700, 3, 'tr_0 tr_330000 tr_330700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330726, '浦江县', 'P', '119.8984360827', '29.458692851855', 330700, 3, 'tr_0 tr_330000 tr_330700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330727, '磐安县', 'P', '120.45651305177', '29.060103175107', 330700, 3, 'tr_0 tr_330000 tr_330700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330781, '兰溪市', 'L', '119.46659870554', '29.214044345079', 330700, 3, 'tr_0 tr_330000 tr_330700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330782, '义乌市', 'Y', '120.08158099306', '29.31114987541', 330700, 3, 'tr_0 tr_330000 tr_330700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330783, '东阳市', 'D', '120.24842192791', '29.295861065151', 330700, 3, 'tr_0 tr_330000 tr_330700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330784, '永康市', 'Y', '120.05455071078', '28.894203967255', 330700, 3, 'tr_0 tr_330000 tr_330700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330802, '柯城区', 'K', '118.87758391504', '28.974203651128', 330800, 3, 'tr_0 tr_330000 tr_330800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330803, '衢江区', 'Q', '118.9655390736', '28.986237907969', 330800, 3, 'tr_0 tr_330000 tr_330800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330822, '常山县', 'C', '118.51755663118', '28.906997949113', 330800, 3, 'tr_0 tr_330000 tr_330800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330824, '开化县', 'K', '118.42145932131', '29.143187521187', 330800, 3, 'tr_0 tr_330000 tr_330800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330825, '龙游县', 'L', '119.17841825566', '29.034486553295', 330800, 3, 'tr_0 tr_330000 tr_330800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330881, '江山市', 'J', '118.63358329793', '28.742868480118', 330800, 3, 'tr_0 tr_330000 tr_330800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330902, '定海区', 'D', '122.11360080392', '30.025462378363', 330900, 3, 'tr_0 tr_330000 tr_330900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330903, '普陀区', 'P', '122.33154416586', '29.976835696536', 330900, 3, 'tr_0 tr_330000 tr_330900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330921, '岱山县', 'D', '122.23260481449', '30.269655894035', 330900, 3, 'tr_0 tr_330000 tr_330900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (330922, '嵊泗县', 'S', '122.45758776506', '30.731273949024', 330900, 3, 'tr_0 tr_330000 tr_330900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331002, '椒江区', 'J', '121.44940797569', '28.679258224903', 331000, 3, 'tr_0 tr_330000 tr_331000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331003, '黄岩区', 'H', '121.26856605116', '28.655333607551', 331000, 3, 'tr_0 tr_330000 tr_331000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331004, '路桥区', 'L', '121.37157806769', '28.586946666726', 331000, 3, 'tr_0 tr_330000 tr_331000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331022, '三门县', 'S', '121.40255379759', '29.110355206289', 331000, 3, 'tr_0 tr_330000 tr_331000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331023, '天台县', 'T', '121.01355337629', '29.149514378149', 331000, 3, 'tr_0 tr_330000 tr_331000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331024, '仙居县', 'X', '120.73543520575', '28.853225693258', 331000, 3, 'tr_0 tr_330000 tr_331000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331081, '温岭市', 'W', '121.39258889458', '28.37765548985', 331000, 3, 'tr_0 tr_330000 tr_331000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'); + +INSERT INTO hg_sys_provinces (id, title, pinyin, lng, lat, pid, level, tree, sort, status, created_at, updated_at) VALUES + (331082, '临海市', 'L', '121.15158529413', '28.864049329083', 331000, 3, 'tr_0 tr_330000 tr_331000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331083, '玉环市', 'Y', '121.23851297084', '28.141862986829', 331000, 3, 'tr_0 tr_330000 tr_331000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331102, '莲都区', 'L', '119.91951913335', '28.451745135046', 331100, 3, 'tr_0 tr_330000 tr_331100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331121, '青田县', 'Q', '120.296573349', '28.14548755633', 331100, 3, 'tr_0 tr_330000 tr_331100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331122, '缙云县', 'J', '120.09747830566', '28.665214747164', 331100, 3, 'tr_0 tr_330000 tr_331100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331123, '遂昌县', 'S', '119.28243538622', '28.59845467671', 331100, 3, 'tr_0 tr_330000 tr_331100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331124, '松阳县', 'S', '119.48854377016', '28.455056404273', 331100, 3, 'tr_0 tr_330000 tr_331100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331125, '云和县', 'Y', '119.57959736407', '28.121469507454', 331100, 3, 'tr_0 tr_330000 tr_331100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331126, '庆元县', 'Q', '119.06948685498', '27.625431778354', 331100, 3, 'tr_0 tr_330000 tr_331100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331127, '景宁畲族自治县', 'J', '119.64243033109', '27.979553966951', 331100, 3, 'tr_0 tr_330000 tr_331100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (331181, '龙泉市', 'L', '119.14844476521', '28.080508725251', 331100, 3, 'tr_0 tr_330000 tr_331100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340102, '瑶海区', 'Y', '117.31558704454', '31.863786941657', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340103, '庐阳区', 'L', '117.27145913382', '31.884886695554', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340104, '蜀山区', 'S', '117.2664607823', '31.857378217104', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340111, '包河区', 'B', '117.31657625857', '31.799293467782', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340121, '长丰县', 'Z', '117.17356009256', '32.483722623763', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340122, '肥东县', 'F', '117.47540062528', '31.893890354487', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340123, '肥西县', 'F', '117.16455781372', '31.712962132717', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340124, '庐江县', 'L', '117.29357730192', '31.261327637478', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340171, '合肥高新技术产业开发区', 'H', '117.1837943471', '31.838528178293', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340172, '合肥经济技术开发区', 'H', '117.21475703093', '31.784661076762', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340173, '合肥新站高新技术产业开发区', 'H', '117.38386824707', '31.946175260915', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340181, '巢湖市', 'C', '117.89557620045', '31.629002428816', 340100, 3, 'tr_0 tr_340000 tr_340100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340202, '镜湖区', 'J', '118.39260630352', '31.345866595569', 340200, 3, 'tr_0 tr_340000 tr_340200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340203, '弋江区', 'Y', '118.37957970583', '31.317566272497', 340200, 3, 'tr_0 tr_340000 tr_340200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340207, '鸠江区', 'J', '118.39758848554', '31.375804519517', 340200, 3, 'tr_0 tr_340000 tr_340200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340208, '三山区', 'S', '118.27460210698', '31.225280124269', 340200, 3, 'tr_0 tr_340000 tr_340200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340221, '芜湖县', 'W', '118.58244251203', '31.141239223464', 340200, 3, 'tr_0 tr_340000 tr_340200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340222, '繁昌县', 'F', '118.20542431831', '31.107958593586', 340200, 3, 'tr_0 tr_340000 tr_340200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340223, '南陵县', 'N', '118.34041816695', '30.920260298683', 340200, 3, 'tr_0 tr_340000 tr_340200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340225, '无为县', 'W', '117.90857854389', '31.308844155979', 340200, 3, 'tr_0 tr_340000 tr_340200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340271, '芜湖经济技术开发区', 'W', '118.39582758127', '31.478017093937', 340200, 3, 'tr_0 tr_340000 tr_340200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340272, '安徽芜湖长江大桥经济开发区', 'A', '118.37946121933', '31.391647770998', 340200, 3, 'tr_0 tr_340000 tr_340200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340302, '龙子湖区', 'L', '117.39951276393', '32.948644262929', 340300, 3, 'tr_0 tr_340000 tr_340300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340303, '蚌山区', 'B', '117.37944120527', '32.923378770395', 340300, 3, 'tr_0 tr_340000 tr_340300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340304, '禹会区', 'Y', '117.3484523601', '32.935309988858', 340300, 3, 'tr_0 tr_340000 tr_340300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340311, '淮上区', 'H', '117.36638271774', '32.970547011885', 340300, 3, 'tr_0 tr_340000 tr_340300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340321, '怀远县', 'H', '117.21150631391', '32.976003726624', 340300, 3, 'tr_0 tr_340000 tr_340300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340322, '五河县', 'W', '117.88756088987', '33.132709462866', 340300, 3, 'tr_0 tr_340000 tr_340300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340323, '固镇县', 'G', '117.32354764831', '33.323274297744', 340300, 3, 'tr_0 tr_340000 tr_340300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340371, '蚌埠市高新技术开发区', 'B', '117.27641494698', '32.834931868561', 340300, 3, 'tr_0 tr_340000 tr_340300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340372, '蚌埠市经济开发区', 'B', '117.20923836199', '32.962369404949', 340300, 3, 'tr_0 tr_340000 tr_340300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340402, '大通区', 'D', '117.05958317929', '32.637269959538', 340400, 3, 'tr_0 tr_340000 tr_340400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340403, '田家庵区', 'T', '117.02344533676', '32.653323007096', 340400, 3, 'tr_0 tr_340000 tr_340400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340404, '谢家集区', 'X', '116.86543887721', '32.606254588196', 340400, 3, 'tr_0 tr_340000 tr_340400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340405, '八公山区', 'B', '116.84056434849', '32.637137318437', 340400, 3, 'tr_0 tr_340000 tr_340400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340406, '潘集区', 'P', '116.84158096084', '32.777955491108', 340400, 3, 'tr_0 tr_340000 tr_340400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340421, '凤台县', 'F', '116.71757320891', '32.715103905085', 340400, 3, 'tr_0 tr_340000 tr_340400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340422, '寿县', 'S', '116.8055627726', '32.561546151201', 340400, 3, 'tr_0 tr_340000 tr_340400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340503, '花山区', 'H', '118.49960562875', '31.725472572001', 340500, 3, 'tr_0 tr_340000 tr_340500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340504, '雨山区', 'Y', '118.50559705701', '31.687745482904', 340500, 3, 'tr_0 tr_340000 tr_340500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340506, '博望区', 'B', '118.85155804451', '31.556645467065', 340500, 3, 'tr_0 tr_340000 tr_340500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340521, '当涂县', 'D', '118.50460469891', '31.576649154711', 340500, 3, 'tr_0 tr_340000 tr_340500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340522, '含山县', 'H', '118.10746203634', '31.740862208736', 340500, 3, 'tr_0 tr_340000 tr_340500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340523, '和县', 'H', '118.35951254887', '31.748243815854', 340500, 3, 'tr_0 tr_340000 tr_340500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340602, '杜集区', 'D', '116.83461226601', '33.997285436391', 340600, 3, 'tr_0 tr_340000 tr_340600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340603, '相山区', 'X', '116.80052112276', '33.96582716177', 340600, 3, 'tr_0 tr_340000 tr_340600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340604, '烈山区', 'L', '116.9081817805', '33.84405351094', 340600, 3, 'tr_0 tr_340000 tr_340600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340621, '濉溪县', 'S', '116.77238942808', '33.921629194823', 340600, 3, 'tr_0 tr_340000 tr_340600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340705, '铜官区', 'T', '117.82145710265', '30.940386340633', 340700, 3, 'tr_0 tr_340000 tr_340700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340706, '义安区', 'Y', '117.79856800876', '30.958512099098', 340700, 3, 'tr_0 tr_340000 tr_340700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340711, '郊区', 'J', '117.80755007573', '30.897741483658', 340700, 3, 'tr_0 tr_340000 tr_340700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340722, '枞阳县', 'C', '117.22643695997', '30.705671267725', 340700, 3, 'tr_0 tr_340000 tr_340700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340802, '迎江区', 'Y', '117.09751448877', '30.517523291408', 340800, 3, 'tr_0 tr_340000 tr_340800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340803, '大观区', 'D', '117.04053820417', '30.518231924651', 340800, 3, 'tr_0 tr_340000 tr_340800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340811, '宜秀区', 'Y', '116.99344112425', '30.619675877796', 340800, 3, 'tr_0 tr_340000 tr_340800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340822, '怀宁县', 'H', '116.83659258051', '30.739399674607', 340800, 3, 'tr_0 tr_340000 tr_340800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340825, '太湖县', 'T', '116.31547630162', '30.460113290448', 340800, 3, 'tr_0 tr_340000 tr_340800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340826, '宿松县', 'S', '116.13552369949', '30.159786861375', 340800, 3, 'tr_0 tr_340000 tr_340800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340827, '望江县', 'W', '116.7005902941', '30.129968329229', 340800, 3, 'tr_0 tr_340000 tr_340800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340828, '岳西县', 'Y', '116.36655539021', '30.855227714002', 340800, 3, 'tr_0 tr_340000 tr_340800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340871, '安徽安庆经济开发区', 'A', '117.06360390492', '30.530956568043', 340800, 3, 'tr_0 tr_340000 tr_340800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340881, '桐城市', 'T', '116.98046635878', '31.041969037674', 340800, 3, 'tr_0 tr_340000 tr_340800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (340882, '潜山市', 'Q', '116.58761103892', '30.636755682399', 340800, 3, 'tr_0 tr_340000 tr_340800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341002, '屯溪区', 'T', '118.32141818077', '29.702143908546', 341000, 3, 'tr_0 tr_340000 tr_341000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341003, '黄山区', 'H', '118.14760982484', '30.278650980188', 341000, 3, 'tr_0 tr_340000 tr_341000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341004, '徽州区', 'H', '118.34343582847', '29.834221385317', 341000, 3, 'tr_0 tr_340000 tr_341000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341021, '歙县', 'S', '118.42146012979', '29.866287675757', 341000, 3, 'tr_0 tr_340000 tr_341000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341022, '休宁县', 'X', '118.20543014116', '29.795459004963', 341000, 3, 'tr_0 tr_340000 tr_341000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341023, '黟县', 'Y', '117.94447724144', '29.931047330704', 341000, 3, 'tr_0 tr_340000 tr_341000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341024, '祁门县', 'Q', '117.72339257754', '29.86034394808', 341000, 3, 'tr_0 tr_340000 tr_341000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341102, '琅琊区', 'L', '118.31244134015', '32.300867492599', 341100, 3, 'tr_0 tr_340000 tr_341100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341103, '南谯区', 'N', '118.42348205204', '32.206131899264', 341100, 3, 'tr_0 tr_340000 tr_341100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341122, '来安县', 'L', '118.4424124932', '32.458449762427', 341100, 3, 'tr_0 tr_340000 tr_341100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341124, '全椒县', 'Q', '118.2805842827', '32.091939797603', 341100, 3, 'tr_0 tr_340000 tr_341100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341125, '定远县', 'D', '117.70447068625', '32.537046613487', 341100, 3, 'tr_0 tr_340000 tr_341100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341126, '凤阳县', 'F', '117.53858536874', '32.880976725258', 341100, 3, 'tr_0 tr_340000 tr_341100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341171, '苏滁现代产业园', 'S', '118.42315086566', '32.314484916002', 341100, 3, 'tr_0 tr_340000 tr_341100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341172, '滁州经济技术开发区', 'C', '118.37688910117', '32.299081918592', 341100, 3, 'tr_0 tr_340000 tr_341100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341181, '天长市', 'T', '119.01138527949', '32.67341003277', 341100, 3, 'tr_0 tr_340000 tr_341100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341182, '明光市', 'M', '117.99550981385', '32.783022823418', 341100, 3, 'tr_0 tr_340000 tr_341100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341202, '颍州区', 'Y', '115.81341119616', '32.88962541655', 341200, 3, 'tr_0 tr_340000 tr_341200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341203, '颍东区', 'Y', '115.86361668264', '32.917362240172', 341200, 3, 'tr_0 tr_340000 tr_341200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341204, '颍泉区', 'Y', '115.81542555644', '32.931313576025', 341200, 3, 'tr_0 tr_340000 tr_341200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341221, '临泉县', 'L', '115.26761550051', '33.045959528363', 341200, 3, 'tr_0 tr_340000 tr_341200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341222, '太和县', 'T', '115.6286154697', '33.165959850096', 341200, 3, 'tr_0 tr_340000 tr_341200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341225, '阜南县', 'F', '115.60254592516', '32.664097385125', 341200, 3, 'tr_0 tr_340000 tr_341200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341226, '颍上县', 'Y', '116.26347689904', '32.659028468804', 341200, 3, 'tr_0 tr_340000 tr_341200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341271, '阜阳合肥现代产业园区', 'F', '115.88456164757', '32.809466011566', 341200, 3, 'tr_0 tr_340000 tr_341200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341272, '阜阳经济技术开发区', 'F', '115.86257063732', '32.867285704339', 341200, 3, 'tr_0 tr_340000 tr_341200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341282, '界首市', 'J', '115.38060984722', '33.262775236231', 341200, 3, 'tr_0 tr_340000 tr_341200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341302, '埇桥区', 'Y', '116.98348044326', '33.646130650445', 341300, 3, 'tr_0 tr_340000 tr_341300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341321, '砀山县', 'D', '116.37252400151', '34.448428171397', 341300, 3, 'tr_0 tr_340000 tr_341300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341322, '萧县', 'X', '116.95358492572', '34.194269344319', 341300, 3, 'tr_0 tr_340000 tr_341300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341323, '灵璧县', 'L', '117.56455699799', '33.547892231948', 341300, 3, 'tr_0 tr_340000 tr_341300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341324, '泗县', 'S', '117.91658999175', '33.488694630134', 341300, 3, 'tr_0 tr_340000 tr_341300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341371, '宿州马鞍山现代产业园区', 'S', '116.97054394561', '33.652095326452', 341300, 3, 'tr_0 tr_340000 tr_341300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341372, '宿州经济技术开发区', 'S', '116.97054394561', '33.652095326452', 341300, 3, 'tr_0 tr_340000 tr_341300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341702, '贵池区', 'G', '117.57449037049', '30.693857943819', 341700, 3, 'tr_0 tr_340000 tr_341700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341721, '东至县', 'D', '117.03448128944', '30.116534528265', 341700, 3, 'tr_0 tr_340000 tr_341700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341722, '石台县', 'S', '117.49239440959', '30.216530337189', 341700, 3, 'tr_0 tr_340000 tr_341700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341723, '青阳县', 'Q', '117.85343129914', '30.645634346235', 341700, 3, 'tr_0 tr_340000 tr_341700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341802, '宣州区', 'X', '118.76254944305', '30.952158157984', 341800, 3, 'tr_0 tr_340000 tr_341800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341821, '郎溪县', 'L', '119.18646592169', '31.132681870443', 341800, 3, 'tr_0 tr_340000 tr_341800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341822, '广德县', 'G', '119.42747581035', '30.883667102643', 341800, 3, 'tr_0 tr_340000 tr_341800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341823, '泾县', 'J', '118.42643469242', '30.694672488542', 341800, 3, 'tr_0 tr_340000 tr_341800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341824, '绩溪县', 'J', '118.58544384057', '30.073292199533', 341800, 3, 'tr_0 tr_340000 tr_341800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341825, '旌德县', 'J', '118.54646735263', '30.292481093722', 341800, 3, 'tr_0 tr_340000 tr_341800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341871, '宣城市经济开发区', 'X', '118.76553424277', '30.946601545293', 341800, 3, 'tr_0 tr_340000 tr_341800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341881, '宁国市', 'N', '118.98960981494', '30.639352229689', 341800, 3, 'tr_0 tr_340000 tr_341800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350102, '鼓楼区', 'G', '119.31049162322', '26.088114037555', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350103, '台江区', 'T', '119.32052821102', '26.058528150645', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350104, '仓山区', 'C', '119.28043216493', '26.052841691927', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350105, '马尾区', 'M', '119.44551915828', '26.004533771063', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350111, '晋安区', 'J', '119.33457941597', '26.087213904434', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350112, '长乐区', 'Z', '119.52943832001', '25.969257448077', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350121, '闽侯县', 'M', '119.13848201812', '26.156035214577', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350122, '连江县', 'L', '119.54647881621', '26.203583291029', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350123, '罗源县', 'L', '119.55648045992', '26.495495660324', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350124, '闽清县', 'M', '118.86957650956', '26.226847540202', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350125, '永泰县', 'Y', '118.93843072857', '25.872787263196', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350128, '平潭县', 'P', '119.79650131414', '25.504700273945', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350181, '福清市', 'F', '119.39046524749', '25.726343299035', 350100, 3, 'tr_0 tr_350000 tr_350100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350203, '思明区', 'S', '118.08840797224', '24.451948395671', 350200, 3, 'tr_0 tr_350000 tr_350200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350205, '海沧区', 'H', '118.03956171185', '24.490325818598', 350200, 3, 'tr_0 tr_350000 tr_350200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350206, '湖里区', 'H', '118.15358812172', '24.517573138112', 350200, 3, 'tr_0 tr_350000 tr_350200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350211, '集美区', 'J', '118.10343491664', '24.58201906225', 350200, 3, 'tr_0 tr_350000 tr_350200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350212, '同安区', 'T', '118.15856347661', '24.729113975347', 350200, 3, 'tr_0 tr_350000 tr_350200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350213, '翔安区', 'X', '118.25457589661', '24.624216383593', 350200, 3, 'tr_0 tr_350000 tr_350200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350302, '城厢区', 'C', '119.00153633131', '25.424343792482', 350300, 3, 'tr_0 tr_350000 tr_350300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350303, '涵江区', 'H', '119.12256736822', '25.464464388124', 350300, 3, 'tr_0 tr_350000 tr_350300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350304, '荔城区', 'L', '119.01948169064', '25.439754478806', 350300, 3, 'tr_0 tr_350000 tr_350300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350305, '秀屿区', 'X', '119.11157130031', '25.323654397561', 350300, 3, 'tr_0 tr_350000 tr_350300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350322, '仙游县', 'X', '118.69845425065', '25.368291498104', 350300, 3, 'tr_0 tr_350000 tr_350300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350402, '梅列区', 'M', '117.65255022877', '26.277335878355', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350403, '三元区', 'S', '117.61441509378', '26.240219374574', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350421, '明溪县', 'M', '117.20851763568', '26.361853685277', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350423, '清流县', 'Q', '116.8235931858', '26.18335735321', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350424, '宁化县', 'N', '116.660425512', '26.26795649054', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350425, '大田县', 'D', '117.85343999668', '25.698932641879', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350426, '尤溪县', 'Y', '118.19743971365', '26.17621803946', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350427, '沙县', 'S', '117.79856107581', '26.402813444346', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350428, '将乐县', 'J', '117.47740904084', '26.735209519833', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350429, '泰宁县', 'T', '117.1825958624', '26.905660032285', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350430, '建宁县', 'J', '116.85250622659', '26.836824655349', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350481, '永安市', 'Y', '117.37144258732', '25.948143989824', 350400, 3, 'tr_0 tr_350000 tr_350400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350502, '鲤城区', 'L', '118.59348105353', '24.913354167054', 350500, 3, 'tr_0 tr_350000 tr_350500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350503, '丰泽区', 'F', '118.61958015232', '24.894969993262', 350500, 3, 'tr_0 tr_350000 tr_350500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350504, '洛江区', 'L', '118.67741629493', '24.94621365376', 350500, 3, 'tr_0 tr_350000 tr_350500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350505, '泉港区', 'Q', '118.92243298541', '25.139650393954', 350500, 3, 'tr_0 tr_350000 tr_350500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350521, '惠安县', 'H', '118.8034155003', '25.036949815039', 350500, 3, 'tr_0 tr_350000 tr_350500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350524, '安溪县', 'A', '118.19242537229', '25.061759553382', 350500, 3, 'tr_0 tr_350000 tr_350500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350525, '永春县', 'Y', '118.30048613527', '25.327974202083', 350500, 3, 'tr_0 tr_350000 tr_350500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350526, '德化县', 'D', '118.24755006956', '25.497308594179', 350500, 3, 'tr_0 tr_350000 tr_350500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350581, '石狮市', 'S', '118.65451902647', '24.737665160883', 350500, 3, 'tr_0 tr_350000 tr_350500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350582, '晋江市', 'J', '118.55843052', '24.787824575145', 350500, 3, 'tr_0 tr_350000 tr_350500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350583, '南安市', 'N', '118.39257197205', '24.966362350468', 350500, 3, 'tr_0 tr_350000 tr_350500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350602, '芗城区', 'X', '117.6605895241', '24.516268416111', 350600, 3, 'tr_0 tr_350000 tr_350600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350603, '龙文区', 'L', '117.7164546946', '24.509509680945', 350600, 3, 'tr_0 tr_350000 tr_350600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350622, '云霄县', 'Y', '117.34644831448', '23.964072828248', 350600, 3, 'tr_0 tr_350000 tr_350600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350623, '漳浦县', 'Z', '117.62044335257', '24.123461614812', 350600, 3, 'tr_0 tr_350000 tr_350600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350624, '诏安县', 'Z', '117.18255858272', '23.717053963784', 350600, 3, 'tr_0 tr_350000 tr_350600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350625, '长泰县', 'Z', '117.76555257036', '24.631243628383', 350600, 3, 'tr_0 tr_350000 tr_350600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350626, '东山县', 'D', '117.43656030457', '23.706894688691', 350600, 3, 'tr_0 tr_350000 tr_350600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350627, '南靖县', 'N', '117.36344641066', '24.52085173207', 350600, 3, 'tr_0 tr_350000 tr_350600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350628, '平和县', 'P', '117.32255159131', '24.368365040126', 350600, 3, 'tr_0 tr_350000 tr_350600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350629, '华安县', 'H', '117.54058560971', '25.010067731399', 350600, 3, 'tr_0 tr_350000 tr_350600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350681, '龙海市', 'L', '117.82445086941', '24.452939738547', 350600, 3, 'tr_0 tr_350000 tr_350600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350702, '延平区', 'Y', '118.18845055007', '26.643807791057', 350700, 3, 'tr_0 tr_350000 tr_350700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350703, '建阳区', 'J', '118.12752522464', '27.337502466188', 350700, 3, 'tr_0 tr_350000 tr_350700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350721, '顺昌县', 'S', '117.81651928091', '26.799104367214', 350700, 3, 'tr_0 tr_350000 tr_350700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350722, '浦城县', 'P', '118.54743912328', '27.923390046145', 350700, 3, 'tr_0 tr_350000 tr_350700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350723, '光泽县', 'G', '117.34048158963', '27.547272859205', 350700, 3, 'tr_0 tr_350000 tr_350700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350724, '松溪县', 'S', '118.79145438278', '27.532554907167', 350700, 3, 'tr_0 tr_350000 tr_350700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350725, '政和县', 'Z', '118.86358723724', '27.371749198234', 350700, 3, 'tr_0 tr_350000 tr_350700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350781, '邵武市', 'S', '117.4994195021', '27.346469966261', 350700, 3, 'tr_0 tr_350000 tr_350700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350782, '武夷山市', 'W', '118.04157715009', '27.762553910259', 350700, 3, 'tr_0 tr_350000 tr_350700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350783, '建瓯市', 'J', '118.31146073369', '27.028955089429', 350700, 3, 'tr_0 tr_350000 tr_350700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350802, '新罗区', 'X', '117.04354293052', '25.104077629635', 350800, 3, 'tr_0 tr_350000 tr_350800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350803, '永定区', 'Y', '116.89244722515', '24.869137411287', 350800, 3, 'tr_0 tr_350000 tr_350800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350821, '长汀县', 'Z', '116.36356796988', '25.83918461828', 350800, 3, 'tr_0 tr_350000 tr_350800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350823, '上杭县', 'S', '116.42644288776', '25.055570401525', 350800, 3, 'tr_0 tr_350000 tr_350800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350824, '武平县', 'W', '116.10758916743', '25.100855173343', 350800, 3, 'tr_0 tr_350000 tr_350800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350825, '连城县', 'L', '116.76044617118', '25.716337381852', 350800, 3, 'tr_0 tr_350000 tr_350800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350881, '漳平市', 'Z', '117.42655632526', '25.295743499252', 350800, 3, 'tr_0 tr_350000 tr_350800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341502, '金安区', 'J', '116.54543837997', '31.756287719901', 341500, 3, 'tr_0 tr_340000 tr_341500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341503, '裕安区', 'Y', '116.48654978261', '31.74362587083', 341500, 3, 'tr_0 tr_340000 tr_341500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341504, '叶集区', 'Y', '115.94747592742', '31.83526314225', 341500, 3, 'tr_0 tr_340000 tr_341500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341522, '霍邱县', 'H', '116.28439133776', '32.359343590922', 341500, 3, 'tr_0 tr_340000 tr_341500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341523, '舒城县', 'S', '116.95560171142', '31.467692010556', 341500, 3, 'tr_0 tr_340000 tr_341500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341524, '金寨县', 'J', '115.94044120714', '31.733461734381', 341500, 3, 'tr_0 tr_340000 tr_341500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341525, '霍山县', 'H', '116.33957586218', '31.398570812489', 341500, 3, 'tr_0 tr_340000 tr_341500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350902, '蕉城区', 'J', '119.53344242699', '26.666738555955', 350900, 3, 'tr_0 tr_350000 tr_350900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350921, '霞浦县', 'X', '120.01142710564', '26.891348873767', 350900, 3, 'tr_0 tr_350000 tr_350900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350922, '古田县', 'G', '118.75257823557', '26.583261752073', 350900, 3, 'tr_0 tr_350000 tr_350900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350923, '屏南县', 'P', '118.99259621521', '26.914264918059', 350900, 3, 'tr_0 tr_350000 tr_350900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350924, '寿宁县', 'S', '119.51142504878', '27.466649659969', 350900, 3, 'tr_0 tr_350000 tr_350900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350925, '周宁县', 'Z', '119.34556712964', '27.110239280448', 350900, 3, 'tr_0 tr_350000 tr_350900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350926, '柘荣县', 'Z', '119.90745668696', '27.239961876352', 350900, 3, 'tr_0 tr_350000 tr_350900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350981, '福安市', 'F', '119.65440636048', '27.09432350806', 350900, 3, 'tr_0 tr_350000 tr_350900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (350982, '福鼎市', 'F', '120.22345190932', '27.330524972528', 350900, 3, 'tr_0 tr_350000 tr_350900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360102, '东湖区', 'D', '115.90546602606', '28.691259179775', 360100, 3, 'tr_0 tr_360000 tr_360100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360103, '西湖区', 'X', '115.88353569365', '28.661976709901', 360100, 3, 'tr_0 tr_360000 tr_360100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360104, '青云谱区', 'Q', '115.93141618579', '28.627235736484', 360100, 3, 'tr_0 tr_360000 tr_360100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360105, '湾里区', 'W', '115.73759563309', '28.720195384308', 360100, 3, 'tr_0 tr_360000 tr_360100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360111, '青山湖区', 'Q', '115.96855240505', '28.687596006173', 360100, 3, 'tr_0 tr_360000 tr_360100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360112, '新建区', 'X', '115.8214509253', '28.698748625155', 360100, 3, 'tr_0 tr_360000 tr_360100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360121, '南昌县', 'N', '115.95046017277', '28.551604186108', 360100, 3, 'tr_0 tr_360000 tr_360100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360123, '安义县', 'A', '115.55544146387', '28.850794273751', 360100, 3, 'tr_0 tr_360000 tr_360100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360124, '进贤县', 'J', '116.24853779343', '28.382758944474', 360100, 3, 'tr_0 tr_360000 tr_360100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360202, '昌江区', 'C', '117.19057910346', '29.27885446447', 360200, 3, 'tr_0 tr_360000 tr_360200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360203, '珠山区', 'Z', '117.20954826159', '29.305778220374', 360200, 3, 'tr_0 tr_360000 tr_360200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360222, '浮梁县', 'F', '117.22146608079', '29.357788237529', 360200, 3, 'tr_0 tr_360000 tr_360200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360281, '乐平市', 'L', '117.15851067473', '28.984363669039', 360200, 3, 'tr_0 tr_360000 tr_360200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360302, '安源区', 'A', '113.87743991926', '27.621307703862', 360300, 3, 'tr_0 tr_360000 tr_360300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360313, '湘东区', 'X', '113.74049971211', '27.645875074875', 360300, 3, 'tr_0 tr_360000 tr_360300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360321, '莲花县', 'L', '113.96854067422', '27.133462711028', 360300, 3, 'tr_0 tr_360000 tr_360300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360322, '上栗县', 'S', '113.80153822404', '27.886415692068', 360300, 3, 'tr_0 tr_360000 tr_360300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360323, '芦溪县', 'L', '114.03651940468', '27.6366047187', 360300, 3, 'tr_0 tr_360000 tr_360300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360402, '濂溪区', 'L', '116.00753491163', '29.711340559079', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360403, '浔阳区', 'X', '115.99655806746', '29.733093751939', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360404, '柴桑区', 'C', '115.91740154188', '29.614804909379', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360423, '武宁县', 'W', '115.10744177399', '29.2623521507', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360424, '修水县', 'X', '114.55356797639', '29.031175867959', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360425, '永修县', 'Y', '115.81540658685', '29.028005616261', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360426, '德安县', 'D', '115.76257795847', '29.319172496312', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360428, '都昌县', 'D', '116.21055204665', '29.278965044767', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360429, '湖口县', 'H', '116.25847134559', '29.737131514562', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360430, '彭泽县', 'P', '116.55550980644', '29.902122004906', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360481, '瑞昌市', 'R', '115.68742967207', '29.681951286531', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360482, '共青城市', 'G', '115.82142002359', '29.248741173716', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360483, '庐山市', 'L', '116.05142593917', '29.454539165717', 360400, 3, 'tr_0 tr_360000 tr_360400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360502, '渝水区', 'Y', '114.9514238934', '27.806839650444', 360500, 3, 'tr_0 tr_360000 tr_360500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360521, '分宜县', 'F', '114.69847247036', '27.820731344374', 360500, 3, 'tr_0 tr_360000 tr_360500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360602, '月湖区', 'Y', '117.04354760171', '28.245078331555', 360600, 3, 'tr_0 tr_360000 tr_360600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360603, '余江区', 'Y', '116.82459362864', '28.215353761359', 360600, 3, 'tr_0 tr_360000 tr_360600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360681, '贵溪市', 'G', '117.25139869833', '28.298735072105', 360600, 3, 'tr_0 tr_360000 tr_360600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360702, '章贡区', 'Z', '114.9275508855', '25.823747013882', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360703, '南康区', 'N', '114.77153821509', '25.66705293056', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360704, '赣县区', 'G', '115.01857016415', '25.866384616621', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360722, '信丰县', 'X', '114.92952113897', '25.391975120014', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360723, '大余县', 'D', '114.36840663965', '25.407637298367', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360724, '上犹县', 'S', '114.55854863129', '25.790518799476', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360725, '崇义县', 'C', '114.31457244808', '25.687687192664', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360726, '安远县', 'A', '115.40055913129', '25.142743431732', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360727, '龙南县', 'L', '114.79655413709', '24.916599461157', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360728, '定南县', 'D', '115.0345637751', '24.789783831846', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360729, '全南县', 'Q', '114.53658236666', '24.748206354967', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360730, '宁都县', 'N', '116.01549443743', '26.47597950334', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360731, '于都县', 'Y', '115.42149926153', '25.957893942751', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360732, '兴国县', 'X', '115.36955169119', '26.343882588243', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360733, '会昌县', 'H', '115.79245964209', '25.606661833811', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360734, '寻乌县', 'X', '115.65351531535', '24.96944654678', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360735, '石城县', 'S', '116.35259426977', '26.318972346784', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360781, '瑞金市', 'R', '116.03342066286', '25.891666273953', 360700, 3, 'tr_0 tr_360000 tr_360700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360802, '吉州区', 'J', '115.00153936965', '27.149314993877', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360803, '青原区', 'Q', '115.02156071302', '27.087662535191', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360821, '吉安县', 'J', '114.9145913014', '27.044989078994', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360822, '吉水县', 'J', '115.14256983128', '27.235259745039', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360823, '峡江县', 'X', '115.32240322821', '27.588234617615', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360824, '新干县', 'X', '115.39359474833', '27.746080951713', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360825, '永丰县', 'Y', '115.44740243989', '27.324342103714', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360826, '泰和县', 'T', '114.91559111544', '26.795697341165', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360827, '遂川县', 'S', '114.52756212171', '26.319517284146', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360828, '万安县', 'W', '114.79257715894', '26.464072836341', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360829, '安福县', 'A', '114.62647813461', '27.399076477105', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360830, '永新县', 'Y', '114.2494149359', '26.951537256563', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360881, '井冈山市', 'J', '114.29555585942', '26.753709741566', 360800, 3, 'tr_0 tr_360000 tr_360800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360902, '袁州区', 'Y', '114.43456118111', '27.802582705304', 360900, 3, 'tr_0 tr_360000 tr_360900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360921, '奉新县', 'F', '115.40655109853', '28.694028951458', 360900, 3, 'tr_0 tr_360000 tr_360900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360922, '万载县', 'W', '114.45253654385', '28.112133306116', 360900, 3, 'tr_0 tr_360000 tr_360900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360923, '上高县', 'S', '114.93154115857', '28.238815490252', 360900, 3, 'tr_0 tr_360000 tr_360900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360924, '宜丰县', 'Y', '114.80951713475', '28.400373307265', 360900, 3, 'tr_0 tr_360000 tr_360900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360925, '靖安县', 'J', '115.36955312848', '28.867081916186', 360900, 3, 'tr_0 tr_360000 tr_360900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360926, '铜鼓县', 'T', '114.37741107441', '28.52708345654', 360900, 3, 'tr_0 tr_360000 tr_360900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360981, '丰城市', 'F', '115.77747842145', '28.166614024369', 360900, 3, 'tr_0 tr_360000 tr_360900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360982, '樟树市', 'Z', '115.55241893533', '28.062153117648', 360900, 3, 'tr_0 tr_360000 tr_360900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (360983, '高安市', 'G', '115.38256535328', '28.422857002119', 360900, 3, 'tr_0 tr_360000 tr_360900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361002, '临川区', 'L', '116.31848983161', '27.940458992864', 361000, 3, 'tr_0 tr_360000 tr_361000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361003, '东乡区', 'D', '116.60954171505', '28.253977397999', 361000, 3, 'tr_0 tr_360000 tr_361000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361021, '南城县', 'N', '116.64339884971', '27.57624096656', 361000, 3, 'tr_0 tr_360000 tr_361000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361022, '黎川县', 'L', '116.91450700338', '27.288340234831', 361000, 3, 'tr_0 tr_360000 tr_361000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361023, '南丰县', 'N', '116.53140350859', '27.224733524876', 361000, 3, 'tr_0 tr_360000 tr_361000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361024, '崇仁县', 'C', '116.08354898488', '27.759079756014', 361000, 3, 'tr_0 tr_360000 tr_361000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361025, '乐安县', 'L', '115.83749627865', '27.434079864498', 361000, 3, 'tr_0 tr_360000 tr_361000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361026, '宜黄县', 'Y', '116.24254169398', '27.5605634607', 361000, 3, 'tr_0 tr_360000 tr_361000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361027, '金溪县', 'J', '116.76040404065', '27.925329188976', 361000, 3, 'tr_0 tr_360000 tr_361000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361028, '资溪县', 'Z', '117.06657027361', '27.711845785732', 361000, 3, 'tr_0 tr_360000 tr_361000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361030, '广昌县', 'G', '116.34256064638', '26.848454446681', 361000, 3, 'tr_0 tr_360000 tr_361000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361102, '信州区', 'X', '117.97341184157', '28.437628311', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361103, '广丰区', 'G', '118.19742022042', '28.442615061205', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361121, '上饶县', 'S', '117.91558441252', '28.45418687477', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361123, '玉山县', 'Y', '118.2515628901', '28.687749687317', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361124, '铅山县', 'Q', '117.71642163695', '28.321504694791', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361125, '横峰县', 'H', '117.60239738302', '28.413440462384', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361126, '弋阳县', 'Y', '117.45550637624', '28.384082001231', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361127, '余干县', 'Y', '116.70160096199', '28.707866244419', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361128, '鄱阳县', 'P', '116.7105661408', '29.011452830922', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361129, '万年县', 'W', '117.06459894217', '28.700054054129', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361130, '婺源县', 'W', '117.86844502243', '29.254039048097', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (361181, '德兴市', 'D', '117.58547968518', '28.952564863028', 361100, 3, 'tr_0 tr_360000 tr_361100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341602, '谯城区', 'Q', '115.78547191853', '33.882663087443', 341600, 3, 'tr_0 tr_340000 tr_341600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341621, '涡阳县', 'W', '116.22160903516', '33.498566835004', 341600, 3, 'tr_0 tr_340000 tr_341600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341622, '蒙城县', 'M', '116.57158940083', '33.271658239674', 341600, 3, 'tr_0 tr_340000 tr_341600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (341623, '利辛县', 'L', '116.1914935226', '33.155595841529', 341600, 3, 'tr_0 tr_340000 tr_341600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370102, '历下区', 'L', '117.0825673139', '36.672162950043', 370100, 3, 'tr_0 tr_370000 tr_370100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370103, '市中区', 'S', '117.00439910401', '36.657551673642', 370100, 3, 'tr_0 tr_370000 tr_370100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370104, '槐荫区', 'H', '116.90745837507', '36.657561734426', 370100, 3, 'tr_0 tr_370000 tr_370100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370105, '天桥区', 'T', '116.99339917338', '36.684067874353', 370100, 3, 'tr_0 tr_370000 tr_370100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370112, '历城区', 'L', '117.07158975107', '36.685655534711', 370100, 3, 'tr_0 tr_370000 tr_370100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370113, '长清区', 'Z', '116.75838709095', '36.56021587991', 370100, 3, 'tr_0 tr_370000 tr_370100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370114, '章丘区', 'Z', '117.53256537437', '36.68553275142', 370100, 3, 'tr_0 tr_370000 tr_370100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370115, '济阳区', 'J', '117.18062113319', '36.983970518315', 370100, 3, 'tr_0 tr_370000 tr_370100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370124, '平阴县', 'P', '116.46261667806', '36.294861321066', 370100, 3, 'tr_0 tr_370000 tr_370100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370126, '商河县', 'S', '117.1635297929', '37.314970715556', 370100, 3, 'tr_0 tr_370000 tr_370100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370171, '济南高新技术产业开发区', 'J', '117.12639941261', '36.656554201787', 370100, 3, 'tr_0 tr_370000 tr_370100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370202, '市南区', 'S', '120.41858472358', '36.081465640234', 370200, 3, 'tr_0 tr_370000 tr_370200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370203, '市北区', 'S', '120.38140448734', '36.09344959486', 370200, 3, 'tr_0 tr_370000 tr_370200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370211, '黄岛区', 'H', '120.20454654768', '35.966382870945', 370200, 3, 'tr_0 tr_370000 tr_370200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370212, '崂山区', 'L', '120.47539724708', '36.113499423971', 370200, 3, 'tr_0 tr_370000 tr_370200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370213, '李沧区', 'L', '120.43960282675', '36.151024667784', 370200, 3, 'tr_0 tr_370000 tr_370200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370214, '城阳区', 'C', '120.40252679394', '36.31288619735', 370200, 3, 'tr_0 tr_370000 tr_370200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'); +INSERT INTO hg_sys_provinces (id, title, pinyin, lng, lat, pid, level, tree, sort, status, created_at, updated_at) VALUES + (370215, '即墨区', 'J', '120.45353617402', '36.394749170322', 370200, 3, 'tr_0 tr_370000 tr_370200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370271, '青岛高新技术产业开发区', 'Q', '120.44085344768', '36.124685571214', 370200, 3, 'tr_0 tr_370000 tr_370200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370281, '胶州市', 'J', '120.03953537127', '36.270349088049', 370200, 3, 'tr_0 tr_370000 tr_370200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370283, '平度市', 'P', '119.99441429398', '36.782692254089', 370200, 3, 'tr_0 tr_370000 tr_370200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370285, '莱西市', 'L', '120.52455620764', '36.893956298026', 370200, 3, 'tr_0 tr_370000 tr_370200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370302, '淄川区', 'Z', '117.97341185763', '36.649834806022', 370300, 3, 'tr_0 tr_370000 tr_370300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370303, '张店区', 'Z', '118.02459110728', '36.811941952144', 370300, 3, 'tr_0 tr_370000 tr_370300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370304, '博山区', 'B', '117.86846875372', '36.500847855131', 370300, 3, 'tr_0 tr_370000 tr_370300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370305, '临淄区', 'L', '118.31539460935', '36.832293635152', 370300, 3, 'tr_0 tr_370000 tr_370300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370306, '周村区', 'Z', '117.87648217785', '36.808994352212', 370300, 3, 'tr_0 tr_370000 tr_370300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370321, '桓台县', 'H', '118.10443420779', '36.965607980118', 370300, 3, 'tr_0 tr_370000 tr_370300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370322, '高青县', 'G', '117.83339432525', '37.177268654333', 370300, 3, 'tr_0 tr_370000 tr_370300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370323, '沂源县', 'Y', '118.17748944237', '36.190916985848', 370300, 3, 'tr_0 tr_370000 tr_370300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370402, '市中区', 'S', '117.56256581399', '34.86996272507', 370400, 3, 'tr_0 tr_370000 tr_370400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370403, '薛城区', 'X', '117.26945761931', '34.801124568639', 370400, 3, 'tr_0 tr_370000 tr_370400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370404, '峄城区', 'Y', '117.59639060967', '34.778599873011', 370400, 3, 'tr_0 tr_370000 tr_370400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370405, '台儿庄区', 'T', '117.74042545412', '34.568763215633', 370400, 3, 'tr_0 tr_370000 tr_370400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370406, '山亭区', 'S', '117.46744316558', '35.105691980765', 370400, 3, 'tr_0 tr_370000 tr_370400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370481, '滕州市', 'T', '117.17256521921', '35.120034809574', 370400, 3, 'tr_0 tr_370000 tr_370400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370502, '东营区', 'D', '118.58846268607', '37.454847320166', 370500, 3, 'tr_0 tr_370000 tr_370500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370503, '河口区', 'H', '118.53250516975', '37.891120201056', 370500, 3, 'tr_0 tr_370000 tr_370500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370505, '垦利区', 'K', '118.58143173867', '37.578555133809', 370500, 3, 'tr_0 tr_370000 tr_370500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370522, '利津县', 'L', '118.26161799914', '37.495860299031', 370500, 3, 'tr_0 tr_370000 tr_370500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370523, '广饶县', 'G', '118.41349864392', '37.059638498906', 370500, 3, 'tr_0 tr_370000 tr_370500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370571, '东营经济技术开发区', 'D', '118.58846268607', '37.454847320166', 370500, 3, 'tr_0 tr_370000 tr_370500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370572, '东营港经济开发区', 'D', '118.96520739607', '38.098236253355', 370500, 3, 'tr_0 tr_370000 tr_370500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370602, '芝罘区', 'Z', '121.40654004549', '37.546312866891', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370611, '福山区', 'F', '121.27460474744', '37.503668228451', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370612, '牟平区', 'M', '121.60654911474', '37.392915451796', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370613, '莱山区', 'L', '121.4513806718', '37.517648584109', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370634, '长岛县', 'Z', '120.74342978244', '37.927628387579', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370671, '烟台高新技术产业开发区', 'Y', '121.4544154173', '37.470038383731', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370672, '烟台经济技术开发区', 'Y', '121.12513892753', '37.636399945094', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370681, '龙口市', 'L', '120.48536852807', '37.652555125496', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370682, '莱阳市', 'L', '120.71841430958', '36.984635568304', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370683, '莱州市', 'L', '119.94859307737', '37.182636609074', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370684, '蓬莱市', 'P', '120.76556151495', '37.816438725969', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370685, '招远市', 'Z', '120.44060165265', '37.361137142566', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370686, '栖霞市', 'Q', '120.85641658338', '37.3414181648', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370687, '海阳市', 'H', '121.18045819779', '36.693269738228', 370600, 3, 'tr_0 tr_370000 tr_370600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370702, '潍城区', 'W', '119.03142854152', '36.73285441557', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370703, '寒亭区', 'H', '119.22661514747', '36.780743786201', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370704, '坊子区', 'F', '119.17240097265', '36.660741599701', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370705, '奎文区', 'K', '119.13947052995', '36.712752014046', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370724, '临朐县', 'L', '118.54944999641', '36.519129501828', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370725, '昌乐县', 'C', '118.83648798144', '36.712996190845', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370772, '潍坊滨海经济技术开发区', 'W', '119.16837791143', '36.712651551268', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370781, '青州市', 'Q', '118.48653672087', '36.690416508705', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370782, '诸城市', 'Z', '119.41640221867', '36.002008858076', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370783, '寿光市', 'S', '118.79741537481', '36.861921746471', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370784, '安丘市', 'A', '119.22560751818', '36.483842195596', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370785, '高密市', 'G', '119.76241099602', '36.388956706465', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370786, '昌邑市', 'C', '119.40440597739', '36.865161072622', 370700, 3, 'tr_0 tr_370000 tr_370700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370811, '任城区', 'R', '116.55446985374', '35.49373064026', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370812, '兖州区', 'Y', '116.79011515173', '35.557952373283', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370826, '微山县', 'W', '117.13541381857', '34.813315104239', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370827, '鱼台县', 'Y', '116.65739284822', '35.017887717823', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370828, '金乡县', 'J', '116.31852982171', '35.072569118665', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370829, '嘉祥县', 'J', '116.34861308511', '35.413255044102', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370830, '汶上县', 'W', '116.50544105765', '35.717055392628', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370831, '泗水县', 'S', '117.25742858989', '35.670600481228', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370832, '梁山县', 'L', '116.10262029578', '35.808063886611', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370871, '济宁高新技术产业开发区', 'J', '116.59361234854', '35.42017739453', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370881, '曲阜市', 'Q', '116.99341597169', '35.587372286488', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370883, '邹城市', 'Z', '117.01440416129', '35.40752093245', 370800, 3, 'tr_0 tr_370000 tr_370800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370902, '泰山区', 'T', '117.14141108582', '36.199444601195', 370900, 3, 'tr_0 tr_370000 tr_370900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370911, '岱岳区', 'D', '117.04855647915', '36.193291242291', 370900, 3, 'tr_0 tr_370000 tr_370900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370921, '宁阳县', 'N', '116.81257853863', '35.764539097344', 370900, 3, 'tr_0 tr_370000 tr_370900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370923, '东平县', 'D', '116.47759421565', '35.941908015019', 370900, 3, 'tr_0 tr_370000 tr_370900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370982, '新泰市', 'X', '117.77460624827', '35.914619866588', 370900, 3, 'tr_0 tr_370000 tr_370900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (370983, '肥城市', 'F', '116.77540081764', '36.188811224315', 370900, 3, 'tr_0 tr_370000 tr_370900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371002, '环翠区', 'H', '122.12953818095', '37.507968071219', 371000, 3, 'tr_0 tr_370000 tr_371000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371003, '文登区', 'W', '122.06442836878', '37.200113328316', 371000, 3, 'tr_0 tr_370000 tr_371000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371071, '威海火炬高技术产业开发区', 'W', '122.12754097831', '37.516430548015', 371000, 3, 'tr_0 tr_370000 tr_371000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371072, '威海经济技术开发区', 'W', '122.18792776961', '37.412757933019', 371000, 3, 'tr_0 tr_370000 tr_371000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371073, '威海临港经济技术开发区', 'W', '122.12754097831', '37.516430548015', 371000, 3, 'tr_0 tr_370000 tr_371000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371082, '荣成市', 'R', '122.49250463074', '37.171317939253', 371000, 3, 'tr_0 tr_370000 tr_371000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371083, '乳山市', 'R', '121.5464285812', '36.925177357878', 371000, 3, 'tr_0 tr_370000 tr_371000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371102, '东港区', 'D', '119.46862431118', '35.431049003942', 371100, 3, 'tr_0 tr_370000 tr_371100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371103, '岚山区', 'L', '119.32553044175', '35.127432330052', 371100, 3, 'tr_0 tr_370000 tr_371100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371121, '五莲县', 'W', '119.21558036259', '35.755697104104', 371100, 3, 'tr_0 tr_370000 tr_371100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371122, '莒县', 'J', '118.8435382424', '35.585872122989', 371100, 3, 'tr_0 tr_370000 tr_371100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371171, '日照经济技术开发区', 'R', '119.53341540457', '35.422838998438', 371100, 3, 'tr_0 tr_370000 tr_371100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371202, '莱城区', 'L', '117.6459130158', '36.313394584932', 371200, 3, 'tr_0 tr_370000 tr_371200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371203, '钢城区', 'G', '117.8275371813', '36.092835887233', 371200, 3, 'tr_0 tr_370000 tr_371200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371302, '兰山区', 'L', '118.35449973464', '35.057340229806', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371311, '罗庄区', 'L', '118.29151252855', '35.002503733433', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371312, '河东区', 'H', '118.40954744713', '35.095675536824', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371321, '沂南县', 'Y', '118.47149154086', '35.55609766695', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371322, '郯城县', 'T', '118.37358710977', '34.619225932471', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371323, '沂水县', 'Y', '118.63461726385', '35.796180584718', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371324, '兰陵县', 'L', '118.07740949499', '34.86361638544', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371325, '费县', 'F', '117.98442508318', '35.272304128517', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371326, '平邑县', 'P', '117.64654058086', '35.51201963664', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371327, '莒南县', 'J', '118.84154077027', '35.180811631788', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371328, '蒙阴县', 'M', '117.95141460145', '35.716347166232', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371329, '临沭县', 'L', '118.6574945001', '34.926018591491', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371371, '临沂高新技术产业开发区', 'L', '118.27105074598', '34.991223857705', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371372, '临沂经济技术开发区', 'L', '118.41614315832', '35.028440855401', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371373, '临沂临港经济开发区', 'L', '119.09098821173', '35.192676079483', 371300, 3, 'tr_0 tr_370000 tr_371300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371402, '德城区', 'D', '116.30544896637', '37.456993283021', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371403, '陵城区', 'L', '116.58940001434', '37.347132434581', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371422, '宁津县', 'N', '116.80653761374', '37.658018745855', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371423, '庆云县', 'Q', '117.39145244825', '37.781585318857', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371424, '临邑县', 'L', '116.87340370302', '37.196169366727', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371425, '齐河县', 'Q', '116.76938747073', '36.78994480667', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371426, '平原县', 'P', '116.44050470827', '37.171221463312', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371427, '夏津县', 'X', '116.00853411226', '36.954154863323', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371428, '武城县', 'W', '116.07550629142', '37.219222080288', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371471, '德州经济技术开发区', 'D', '116.36555674397', '37.441308454576', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371472, '德州运河经济开发区', 'D', '116.36555674397', '37.441308454576', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371481, '乐陵市', 'L', '117.23840643173', '37.73592450081', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371482, '禹城市', 'Y', '116.64437110138', '36.940242008766', 371400, 3, 'tr_0 tr_370000 tr_371400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371502, '东昌府区', 'D', '115.99458657176', '36.440377840732', 371500, 3, 'tr_0 tr_370000 tr_371500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371521, '阳谷县', 'Y', '115.79839557041', '36.120815514687', 371500, 3, 'tr_0 tr_370000 tr_371500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371522, '莘县', 'S', '115.67739687246', '36.239907120546', 371500, 3, 'tr_0 tr_370000 tr_371500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371523, '茌平县', 'C', '116.26145544215', '36.586785068842', 371500, 3, 'tr_0 tr_370000 tr_371500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371524, '东阿县', 'D', '116.25449294564', '36.340957707761', 371500, 3, 'tr_0 tr_370000 tr_371500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371525, '冠县', 'G', '115.44939579504', '36.490243225394', 371500, 3, 'tr_0 tr_370000 tr_371500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371526, '高唐县', 'G', '116.23560427568', '36.851591084095', 371500, 3, 'tr_0 tr_370000 tr_371500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371581, '临清市', 'L', '115.71146960045', '36.844289186694', 371500, 3, 'tr_0 tr_370000 tr_371500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371702, '牡丹区', 'M', '115.42344303021', '35.257018176069', 371700, 3, 'tr_0 tr_370000 tr_371700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371703, '定陶区', 'D', '115.57943737524', '35.077275179757', 371700, 3, 'tr_0 tr_370000 tr_371700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371721, '曹县', 'C', '115.54845724362', '34.831809348415', 371700, 3, 'tr_0 tr_370000 tr_371700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371722, '单县', 'D', '116.11158367799', '34.784658433692', 371700, 3, 'tr_0 tr_370000 tr_371700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371723, '成武县', 'C', '115.89651900839', '34.95860565496', 371700, 3, 'tr_0 tr_370000 tr_371700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371724, '巨野县', 'J', '116.10159901224', '35.402062380609', 371700, 3, 'tr_0 tr_370000 tr_371700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371725, '郓城县', 'Y', '115.95045057629', '35.605902319687', 371700, 3, 'tr_0 tr_370000 tr_371700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371726, '鄄城县', 'J', '115.51660692346', '35.569204259881', 371700, 3, 'tr_0 tr_370000 tr_371700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371728, '东明县', 'D', '115.09641733473', '35.295701692411', 371700, 3, 'tr_0 tr_370000 tr_371700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371771, '菏泽经济技术开发区', 'H', '115.48754503343', '35.239407424766', 371700, 3, 'tr_0 tr_370000 tr_371700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371772, '菏泽高新技术开发区', 'H', '115.48754503343', '35.239407424766', 371700, 3, 'tr_0 tr_370000 tr_371700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410102, '中原区', 'Z', '113.61947551694', '34.754450781329', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410103, '二七区', 'E', '113.63141920734', '34.753438850454', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410104, '管城回族区', 'G', '113.6835246998', '34.759673874699', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410105, '金水区', 'J', '113.6664477324', '34.806070445662', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410106, '上街区', 'S', '113.29818225705', '34.822088918243', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410108, '惠济区', 'H', '113.62345527984', '34.873519885776', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410122, '中牟县', 'Z', '113.98248490573', '34.725010848924', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410171, '郑州经济技术开发区', 'Z', '113.77162403642', '34.724610916832', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410172, '郑州高新技术产业开发区', 'Z', '113.63793722229', '34.742959870174', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410173, '郑州航空港经济综合实验区', 'Z', '113.97018898974', '34.719717969385', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410181, '巩义市', 'G', '113.02843100495', '34.754096888697', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410182, '荥阳市', 'X', '113.38942279956', '34.793810500346', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410183, '新密市', 'X', '113.3973909491', '34.545897983445', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410184, '新郑市', 'X', '113.74643447195', '34.401766379106', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410185, '登封市', 'D', '113.05642283346', '34.45969746172', 410100, 3, 'tr_0 tr_410000 tr_410100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410202, '龙亭区', 'L', '114.36141316646', '34.822035612506', 410200, 3, 'tr_0 tr_410000 tr_410200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410203, '顺河回族区', 'S', '114.36739165912', '34.802241355559', 410200, 3, 'tr_0 tr_410000 tr_410200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410204, '鼓楼区', 'G', '114.35440485636', '34.794874251914', 410200, 3, 'tr_0 tr_410000 tr_410200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410205, '禹王台区', 'Y', '114.35439775975', '34.783472105917', 410200, 3, 'tr_0 tr_410000 tr_410200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410212, '祥符区', 'X', '114.4475325479', '34.762739572224', 410200, 3, 'tr_0 tr_410000 tr_410200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410221, '杞县', 'Q', '114.78959210474', '34.554856780687', 410200, 3, 'tr_0 tr_410000 tr_410200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410222, '通许县', 'T', '114.47343590593', '34.486771802655', 410200, 3, 'tr_0 tr_410000 tr_410200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410223, '尉氏县', 'W', '114.19956115086', '34.417228010354', 410200, 3, 'tr_0 tr_410000 tr_410200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410225, '兰考县', 'L', '114.82746071249', '34.828492897238', 410200, 3, 'tr_0 tr_410000 tr_410200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410302, '老城区', 'L', '112.47650356572', '34.689601063497', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410303, '西工区', 'X', '112.43439953731', '34.666767847513', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410304, '瀍河回族区', 'C', '112.50660380709', '34.685462421335', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410305, '涧西区', 'J', '112.4025520019', '34.663468974309', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410306, '吉利区', 'J', '112.59547847119', '34.907012657115', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410311, '洛龙区', 'L', '112.47046928829', '34.624704713024', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410322, '孟津县', 'M', '112.45141766571', '34.831731570285', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410323, '新安县', 'X', '112.14060970841', '34.734383327344', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410324, '栾川县', 'L', '111.62242666651', '33.791822464323', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410325, '嵩县', 'S', '112.09240816187', '34.140721556406', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410326, '汝阳县', 'R', '112.47950327731', '34.159843364893', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410327, '宜阳县', 'Y', '112.17946537426', '34.541046942554', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410328, '洛宁县', 'L', '111.65958740952', '34.394984560215', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410329, '伊川县', 'Y', '112.43240745502', '34.427645796427', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410371, '洛阳高新技术产业开发区', 'L', '112.45942129831', '34.624262779219', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410381, '偃师市', 'Y', '112.79642141885', '34.733796624013', 410300, 3, 'tr_0 tr_410000 tr_410300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410402, '新华区', 'X', '113.30043988965', '33.743657151646', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410403, '卫东区', 'W', '113.34161111761', '33.7403756514', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410404, '石龙区', 'S', '112.9054552264', '33.904754268397', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410411, '湛河区', 'Z', '113.25051467449', '33.685790171047', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410421, '宝丰县', 'B', '113.06144723584', '33.874745598631', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410422, '叶县', 'Y', '113.36358241276', '33.632491674058', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410423, '鲁山县', 'L', '112.91443396963', '33.744878863452', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410425, '郏县', 'J', '113.21960622765', '33.977486289177', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410471, '平顶山高新技术产业开发区', 'P', '113.40808986384', '33.737612151054', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410472, '平顶山市新城区', 'P', '113.19952856052', '33.772050748691', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410481, '舞钢市', 'W', '113.53141031593', '33.299431105301', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410482, '汝州市', 'R', '112.85054971566', '34.172767788551', 410400, 3, 'tr_0 tr_410000 tr_410400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410502, '文峰区', 'W', '114.36337398772', '36.096832748136', 410500, 3, 'tr_0 tr_410000 tr_410500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410503, '北关区', 'B', '114.36238189912', '36.113131607765', 410500, 3, 'tr_0 tr_410000 tr_410500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410505, '殷都区', 'Y', '114.29712997501', '36.135573231517', 410500, 3, 'tr_0 tr_410000 tr_410500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410506, '龙安区', 'L', '114.3075931681', '36.08275278362', 410500, 3, 'tr_0 tr_410000 tr_410500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410522, '安阳县', 'A', '114.23838187262', '36.218906964196', 410500, 3, 'tr_0 tr_410000 tr_410500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410523, '汤阴县', 'T', '114.36340938096', '35.927643740225', 410500, 3, 'tr_0 tr_410000 tr_410500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410526, '滑县', 'H', '114.52555316619', '35.581045400558', 410500, 3, 'tr_0 tr_410000 tr_410500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410527, '内黄县', 'N', '114.90758875551', '35.976949668061', 410500, 3, 'tr_0 tr_410000 tr_410500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410571, '安阳高新技术产业开发区', 'A', '114.39950042177', '36.105940984015', 410500, 3, 'tr_0 tr_410000 tr_410500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410581, '林州市', 'L', '113.82559018908', '36.088853208448', 410500, 3, 'tr_0 tr_410000 tr_410500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410602, '鹤山区', 'H', '114.16955478242', '35.960280248227', 410600, 3, 'tr_0 tr_410000 tr_410600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410603, '山城区', 'S', '114.19062058561', '35.903369613292', 410600, 3, 'tr_0 tr_410000 tr_410600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410611, '淇滨区', 'Q', '114.30559120444', '35.746952546289', 410600, 3, 'tr_0 tr_410000 tr_410600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410621, '浚县', 'J', '114.55760785086', '35.681917305913', 410600, 3, 'tr_0 tr_410000 tr_410600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410622, '淇县', 'Q', '114.2154897245', '35.627277020336', 410600, 3, 'tr_0 tr_410000 tr_410600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410671, '鹤壁经济技术开发区', 'H', '114.30359364248', '35.7523574114', 410600, 3, 'tr_0 tr_410000 tr_410600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410702, '红旗区', 'H', '113.88141583415', '35.310135512691', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410703, '卫滨区', 'W', '113.8724387977', '35.308459209602', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410704, '凤泉区', 'F', '113.91245884715', '35.375665060578', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410711, '牧野区', 'M', '113.91551290623', '35.321023486499', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410721, '新乡县', 'X', '113.81159378076', '35.196564408993', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410724, '获嘉县', 'H', '113.66341666994', '35.265809284161', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410725, '原阳县', 'Y', '113.94662374129', '35.071163864469', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410726, '延津县', 'Y', '114.21151175821', '35.147806510509', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410727, '封丘县', 'F', '114.42560616803', '35.046857531651', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410728, '长垣县', 'Z', '114.67560989146', '35.207198224565', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410771, '新乡高新技术产业开发区', 'X', '113.89511589149', '35.288196248852', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410772, '新乡经济技术开发区', 'X', '113.93360046733', '35.309639930337', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410773, '新乡市平原城乡一体化示范区', 'X', '113.93360046733', '35.309639930337', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410781, '卫辉市', 'W', '114.07160094452', '35.404068882145', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410782, '辉县市', 'H', '113.81157302991', '35.467957818376', 410700, 3, 'tr_0 tr_410000 tr_410700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410802, '解放区', 'J', '113.23757179887', '35.246309807633', 410800, 3, 'tr_0 tr_410000 tr_410800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410803, '中站区', 'Z', '113.18944759643', '35.242617103591', 410800, 3, 'tr_0 tr_410000 tr_410800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410804, '马村区', 'M', '113.32854400634', '35.261894441723', 410800, 3, 'tr_0 tr_410000 tr_410800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410811, '山阳区', 'S', '113.26048370971', '35.220272352977', 410800, 3, 'tr_0 tr_410000 tr_410800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410821, '修武县', 'X', '113.45458192871', '35.229323482594', 410800, 3, 'tr_0 tr_410000 tr_410800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410822, '博爱县', 'B', '113.07047799096', '35.177308063756', 410800, 3, 'tr_0 tr_410000 tr_410800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410823, '武陟县', 'W', '113.40839582041', '35.105838449217', 410800, 3, 'tr_0 tr_410000 tr_410800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410825, '温县', 'W', '113.08656906807', '34.946135492247', 410800, 3, 'tr_0 tr_410000 tr_410800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410871, '焦作城乡一体化示范区', 'J', '113.24854783457', '35.220963254039', 410800, 3, 'tr_0 tr_410000 tr_410800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410882, '沁阳市', 'Q', '112.95751688155', '35.093785732346', 410800, 3, 'tr_0 tr_410000 tr_410800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410883, '孟州市', 'M', '112.79739491254', '34.913597817886', 410800, 3, 'tr_0 tr_410000 tr_410800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410902, '华龙区', 'H', '115.0804129441', '35.783632884536', 410900, 3, 'tr_0 tr_410000 tr_410900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410922, '清丰县', 'Q', '115.11047186341', '35.891308168277', 410900, 3, 'tr_0 tr_410000 tr_410900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410923, '南乐县', 'N', '115.21138615695', '36.076030832875', 410900, 3, 'tr_0 tr_410000 tr_410900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410926, '范县', 'F', '115.51058621044', '35.857655087719', 410900, 3, 'tr_0 tr_410000 tr_410900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410927, '台前县', 'T', '115.87856816938', '35.975012712521', 410900, 3, 'tr_0 tr_410000 tr_410900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410928, '濮阳县', 'P', '115.03558408559', '35.717888889375', 410900, 3, 'tr_0 tr_410000 tr_410900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410971, '河南濮阳工业园区', 'H', '115.03559747034', '35.767593028906', 410900, 3, 'tr_0 tr_410000 tr_410900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (410972, '濮阳经济技术开发区', 'P', '115.03559747034', '35.767593028906', 410900, 3, 'tr_0 tr_410000 tr_410900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411002, '魏都区', 'W', '113.82959564352', '34.030861228003', 411000, 3, 'tr_0 tr_410000 tr_411000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411003, '建安区', 'J', '113.82961513675', '34.129966976383', 411000, 3, 'tr_0 tr_410000 tr_411000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411024, '鄢陵县', 'Y', '114.18561980866', '34.107963250311', 411000, 3, 'tr_0 tr_410000 tr_411000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411025, '襄城县', 'X', '113.51343127013', '33.856967773678', 411000, 3, 'tr_0 tr_410000 tr_411000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411071, '许昌经济技术开发区', 'X', '113.81237629469', '34.009184251036', 411000, 3, 'tr_0 tr_410000 tr_411000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411081, '禹州市', 'Y', '113.49550522436', '34.146082195029', 411000, 3, 'tr_0 tr_410000 tr_411000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411082, '长葛市', 'Z', '113.77442091063', '34.223016266284', 411000, 3, 'tr_0 tr_410000 tr_411000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411102, '源汇区', 'Y', '113.99041352982', '33.578423262447', 411100, 3, 'tr_0 tr_410000 tr_411100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411103, '郾城区', 'Y', '114.01339389154', '33.593415880865', 411100, 3, 'tr_0 tr_410000 tr_411100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411104, '召陵区', 'Z', '114.1004665548', '33.592467538561', 411100, 3, 'tr_0 tr_410000 tr_411100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411121, '舞阳县', 'W', '113.61549000488', '33.443577799934', 411100, 3, 'tr_0 tr_410000 tr_411100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411122, '临颍县', 'L', '113.93757834379', '33.83269194793', 411100, 3, 'tr_0 tr_410000 tr_411100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411171, '漯河经济技术开发区', 'L', '114.02342077765', '33.587710707102', 411100, 3, 'tr_0 tr_410000 tr_411100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411202, '湖滨区', 'H', '111.19557389665', '34.775996792444', 411200, 3, 'tr_0 tr_410000 tr_411200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411203, '陕州区', 'S', '111.10945065249', '34.726914801527', 411200, 3, 'tr_0 tr_410000 tr_411200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411221, '渑池县', 'M', '111.76854234585', '34.773197042986', 411200, 3, 'tr_0 tr_410000 tr_411200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411224, '卢氏县', 'L', '111.05456400617', '34.059924845299', 411200, 3, 'tr_0 tr_410000 tr_411200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411271, '河南三门峡经济开发区', 'H', '111.16756986287', '34.791595599754', 411200, 3, 'tr_0 tr_410000 tr_411200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411281, '义马市', 'Y', '111.88051478021', '34.753028009473', 411200, 3, 'tr_0 tr_410000 tr_411200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411282, '灵宝市', 'L', '110.90040831286', '34.523142624164', 411200, 3, 'tr_0 tr_410000 tr_411200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411302, '宛城区', 'W', '112.54645416663', '33.009870040626', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411303, '卧龙区', 'W', '112.54146183376', '32.992483797527', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411321, '南召县', 'N', '112.43542522255', '33.496185804625', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411322, '方城县', 'F', '113.0185027528', '33.260539455832', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411323, '西峡县', 'X', '111.48039809758', '33.313316115292', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411324, '镇平县', 'Z', '112.24154448331', '33.039718529225', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411325, '内乡县', 'N', '111.85542528697', '33.051203105476', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411326, '淅川县', 'X', '111.49743203615', '33.144185260027', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411327, '社旗县', 'S', '112.9544934547', '33.062236685935', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411328, '唐河县', 'T', '112.81342436589', '32.687720660005', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411329, '新野县', 'X', '112.36654962384', '32.526631778818', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411330, '桐柏县', 'T', '113.43447273106', '32.385130754956', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411371, '南阳高新技术产业开发区', 'N', '112.53450131351', '32.996562204651', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411372, '南阳市城乡一体化示范区', 'N', '112.53450131351', '32.996562204651', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411381, '邓州市', 'D', '112.09342010302', '32.69391743997', 411300, 3, 'tr_0 tr_410000 tr_411300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411402, '梁园区', 'L', '115.62060204557', '34.449471246294', 411400, 3, 'tr_0 tr_410000 tr_411400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411403, '睢阳区', 'S', '115.65947594702', '34.394151920479', 411400, 3, 'tr_0 tr_410000 tr_411400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411421, '民权县', 'M', '115.15457605887', '34.652478726537', 411400, 3, 'tr_0 tr_410000 tr_411400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411422, '睢县', 'S', '115.07841089061', '34.451616965409', 411400, 3, 'tr_0 tr_410000 tr_411400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411423, '宁陵县', 'N', '115.32041843737', '34.46663402766', 411400, 3, 'tr_0 tr_410000 tr_411400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411424, '柘城县', 'Z', '115.31243456749', '34.097360212415', 411400, 3, 'tr_0 tr_410000 tr_411400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411425, '虞城县', 'Y', '115.83447295698', '34.405331502097', 411400, 3, 'tr_0 tr_410000 tr_411400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411426, '夏邑县', 'X', '116.13751236823', '34.243523472378', 411400, 3, 'tr_0 tr_410000 tr_411400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411471, '豫东综合物流产业聚集区', 'Y', '115.66244933826', '34.420201665859', 411400, 3, 'tr_0 tr_410000 tr_411400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411472, '河南商丘经济开发区', 'H', '115.69827951116', '34.407726159442', 411400, 3, 'tr_0 tr_410000 tr_411400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411481, '永城市', 'Y', '116.4555661476', '33.934801475851', 411400, 3, 'tr_0 tr_410000 tr_411400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411502, '浉河区', 'S', '114.06558130947', '32.122554156884', 411500, 3, 'tr_0 tr_410000 tr_411500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411503, '平桥区', 'P', '114.13240742415', '32.10732538611', 411500, 3, 'tr_0 tr_410000 tr_411500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411521, '罗山县', 'L', '114.51952993791', '32.209150451838', 411500, 3, 'tr_0 tr_410000 tr_411500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411522, '光山县', 'G', '114.92553303688', '32.015906879568', 411500, 3, 'tr_0 tr_410000 tr_411500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411523, '新县', 'X', '114.88552475523', '31.649738468475', 411500, 3, 'tr_0 tr_410000 tr_411500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411524, '商城县', 'S', '115.41351334076', '31.804345366903', 411500, 3, 'tr_0 tr_410000 tr_411500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411525, '固始县', 'G', '115.66048788818', '32.174174379622', 411500, 3, 'tr_0 tr_410000 tr_411500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411526, '潢川县', 'H', '115.05847075405', '32.137530716414', 411500, 3, 'tr_0 tr_410000 tr_411500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411527, '淮滨县', 'H', '115.42643896891', '32.479469756663', 411500, 3, 'tr_0 tr_410000 tr_411500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411528, '息县', 'X', '114.74745313225', '32.348955511715', 411500, 3, 'tr_0 tr_410000 tr_411500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411571, '信阳高新技术产业开发区', 'X', '114.09748283305', '32.153014547531', 411500, 3, 'tr_0 tr_410000 tr_411500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411602, '川汇区', 'C', '114.65760174056', '33.652997102814', 411600, 3, 'tr_0 tr_410000 tr_411600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411621, '扶沟县', 'F', '114.40150984137', '34.065906253969', 411600, 3, 'tr_0 tr_410000 tr_411600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411622, '西华县', 'X', '114.53559667094', '33.773215334922', 411600, 3, 'tr_0 tr_410000 tr_411600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411623, '商水县', 'S', '114.61841594744', '33.548877475353', 411600, 3, 'tr_0 tr_410000 tr_411600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411624, '沈丘县', 'S', '115.10545545595', '33.415691094059', 411600, 3, 'tr_0 tr_410000 tr_411600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411625, '郸城县', 'D', '115.18347760136', '33.650827955049', 411600, 3, 'tr_0 tr_410000 tr_411600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411626, '淮阳县', 'H', '114.89258615519', '33.737347183458', 411600, 3, 'tr_0 tr_410000 tr_411600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411627, '太康县', 'T', '114.84438389', '34.070038382248', 411600, 3, 'tr_0 tr_410000 tr_411600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411628, '鹿邑县', 'L', '115.4905852586', '33.867173290317', 411600, 3, 'tr_0 tr_410000 tr_411600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411671, '河南周口经济开发区', 'H', '114.70348251482', '33.631828875702', 411600, 3, 'tr_0 tr_410000 tr_411600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411681, '项城市', 'X', '114.88151400079', '33.47300744143', 411600, 3, 'tr_0 tr_410000 tr_411600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411702, '驿城区', 'Y', '114.00038696674', '32.979519871982', 411700, 3, 'tr_0 tr_410000 tr_411700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411721, '西平县', 'X', '114.02747357279', '33.393860997525', 411700, 3, 'tr_0 tr_410000 tr_411700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411722, '上蔡县', 'S', '114.2704868624', '33.268511215884', 411700, 3, 'tr_0 tr_410000 tr_411700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411723, '平舆县', 'P', '114.62542865923', '32.967982400438', 411700, 3, 'tr_0 tr_410000 tr_411700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411724, '正阳县', 'Z', '114.39949655906', '32.611641077273', 411700, 3, 'tr_0 tr_410000 tr_411700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411725, '确山县', 'Q', '114.03249501076', '32.808175692984', 411700, 3, 'tr_0 tr_410000 tr_411700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411726, '泌阳县', 'M', '113.33355798837', '32.729730650435', 411700, 3, 'tr_0 tr_410000 tr_411700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411727, '汝南县', 'R', '114.36940889397', '33.013140881992', 411700, 3, 'tr_0 tr_410000 tr_411700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411728, '遂平县', 'S', '114.0194414639', '33.151971399579', 411700, 3, 'tr_0 tr_410000 tr_411700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411729, '新蔡县', 'X', '114.99246928382', '32.755268867306', 411700, 3, 'tr_0 tr_410000 tr_411700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (411771, '河南驻马店经济开发区', 'H', '114.02847078173', '33.017842416744', 411700, 3, 'tr_0 tr_410000 tr_411700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (419001, '济源市', 'J', '112.60858070621', '35.072907226847', 419000, 3, 'tr_0 tr_410000 tr_419000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420102, '江岸区', 'J', '114.31657918761', '30.605402797562', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420103, '江汉区', 'J', '114.27750613182', '30.607282276827', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420104, '硚口区', 'Q', '114.22146031207', '30.587584340776', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420105, '汉阳区', 'H', '114.22544555464', '30.560052027443', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420106, '武昌区', 'W', '114.35362228468', '30.564860292785', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420107, '青山区', 'Q', '114.39149265697', '30.646593075543', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420111, '洪山区', 'H', '114.35045554602', '30.506333956808', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420112, '东西湖区', 'D', '114.14345873786', '30.625919818109', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420113, '汉南区', 'H', '114.09151485056', '30.314809120145', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420114, '蔡甸区', 'C', '114.03547963081', '30.588113621855', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420115, '江夏区', 'J', '114.32855126446', '30.381564218182', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420116, '黄陂区', 'H', '114.38245399676', '30.887533767835', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420117, '新洲区', 'X', '114.8075433929', '30.847243870523', 420100, 3, 'tr_0 tr_420000 tr_420100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420202, '黄石港区', 'H', '115.07241748608', '30.229052639992', 420200, 3, 'tr_0 tr_420000 tr_420200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420203, '西塞山区', 'X', '115.11648143744', '30.210695184118', 420200, 3, 'tr_0 tr_420000 tr_420200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420204, '下陆区', 'X', '114.96741590247', '30.180046155273', 420200, 3, 'tr_0 tr_420000 tr_420200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'); +INSERT INTO hg_sys_provinces (id, title, pinyin, lng, lat, pid, level, tree, sort, status, created_at, updated_at) VALUES + (420205, '铁山区', 'T', '114.90757141821', '30.212250832587', 420200, 3, 'tr_0 tr_420000 tr_420200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420222, '阳新县', 'Y', '115.22142677197', '29.836541808086', 420200, 3, 'tr_0 tr_420000 tr_420200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420281, '大冶市', 'D', '114.98643626402', '30.101667800103', 420200, 3, 'tr_0 tr_420000 tr_420200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420302, '茅箭区', 'M', '110.81958031019', '32.597286519104', 420300, 3, 'tr_0 tr_420000 tr_420300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420303, '张湾区', 'Z', '110.77542410285', '32.65839954548', 420300, 3, 'tr_0 tr_420000 tr_420300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420304, '郧阳区', 'Y', '110.81857654362', '32.840592413038', 420300, 3, 'tr_0 tr_420000 tr_420300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420322, '郧西县', 'Y', '110.43247261847', '32.999167007536', 420300, 3, 'tr_0 tr_420000 tr_420300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420323, '竹山县', 'Z', '110.23558156764', '32.230304060376', 420300, 3, 'tr_0 tr_420000 tr_420300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420324, '竹溪县', 'Z', '109.72154249889', '32.324120048853', 420300, 3, 'tr_0 tr_420000 tr_420300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420325, '房县', 'F', '110.74746155911', '32.061684964544', 420300, 3, 'tr_0 tr_420000 tr_420300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420381, '丹江口市', 'D', '111.51953205848', '32.546252688501', 420300, 3, 'tr_0 tr_420000 tr_420300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420502, '西陵区', 'X', '111.29255972053', '30.716749346598', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420503, '伍家岗区', 'W', '111.36742225597', '30.65073733526', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420504, '点军区', 'D', '111.27447135095', '30.69932951388', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420505, '猇亭区', 'X', '111.44157378259', '30.536465982707', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420506, '夷陵区', 'Y', '111.33252973436', '30.774833327298', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420525, '远安县', 'Y', '111.64653035927', '31.066627841578', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420526, '兴山县', 'X', '110.75344607041', '31.354463517716', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420527, '秭归县', 'Z', '110.98444937468', '30.831931643216', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420528, '长阳土家族自治县', 'Z', '111.21350712887', '30.478645783056', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420529, '五峰土家族自治县', 'W', '111.05258063744', '30.171156151026', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420581, '宜都市', 'Y', '111.45651583712', '30.384404274314', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420582, '当阳市', 'D', '111.79456850223', '30.826989050281', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420583, '枝江市', 'Z', '111.76653975337', '30.431730676998', 420500, 3, 'tr_0 tr_420000 tr_420500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420602, '襄城区', 'X', '112.14057206941', '32.016174618141', 420600, 3, 'tr_0 tr_420000 tr_420600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420606, '樊城区', 'F', '112.14259891613', '32.050572374692', 420600, 3, 'tr_0 tr_420000 tr_420600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420607, '襄州区', 'X', '112.21843413678', '32.093375783399', 420600, 3, 'tr_0 tr_420000 tr_420600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420624, '南漳县', 'N', '111.84538618392', '31.781129706779', 420600, 3, 'tr_0 tr_420000 tr_420600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420625, '谷城县', 'G', '111.65957564172', '32.268983068947', 420600, 3, 'tr_0 tr_420000 tr_420600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420626, '保康县', 'B', '111.26744121203', '31.883847150262', 420600, 3, 'tr_0 tr_420000 tr_420600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420682, '老河口市', 'L', '111.68155636908', '32.392459585271', 420600, 3, 'tr_0 tr_420000 tr_420600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420683, '枣阳市', 'Z', '112.77847075951', '32.134729914319', 420600, 3, 'tr_0 tr_420000 tr_420600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420684, '宜城市', 'Y', '112.26461144169', '31.725469730972', 420600, 3, 'tr_0 tr_420000 tr_420600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420702, '梁子湖区', 'L', '114.69150657526', '30.105906774051', 420700, 3, 'tr_0 tr_420000 tr_420700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420703, '华容区', 'H', '114.73642634228', '30.540599527838', 420700, 3, 'tr_0 tr_420000 tr_420700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420704, '鄂城区', 'E', '114.89859968176', '30.406389456292', 420700, 3, 'tr_0 tr_420000 tr_420700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420802, '东宝区', 'D', '112.2083882066', '31.058429271365', 420800, 3, 'tr_0 tr_420000 tr_420800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420804, '掇刀区', 'D', '112.2144276942', '30.979910859804', 420800, 3, 'tr_0 tr_420000 tr_420800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420822, '沙洋县', 'S', '112.59548493899', '30.715314748831', 420800, 3, 'tr_0 tr_420000 tr_420800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420881, '钟祥市', 'Z', '112.59447102156', '31.174029854963', 420800, 3, 'tr_0 tr_420000 tr_420800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420882, '京山市', 'J', '113.12654806496', '31.024330601193', 420800, 3, 'tr_0 tr_420000 tr_420800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420902, '孝南区', 'X', '113.91748989699', '30.922977925049', 420900, 3, 'tr_0 tr_420000 tr_420900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420921, '孝昌县', 'X', '114.00440859068', '31.264540493062', 420900, 3, 'tr_0 tr_420000 tr_420900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420922, '大悟县', 'D', '114.13341253819', '31.567219806641', 420900, 3, 'tr_0 tr_420000 tr_420900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420923, '云梦县', 'Y', '113.75941220183', '31.027218220752', 420900, 3, 'tr_0 tr_420000 tr_420900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420981, '应城市', 'Y', '113.57956739635', '30.933976509913', 420900, 3, 'tr_0 tr_420000 tr_420900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420982, '安陆市', 'A', '113.69558292415', '31.261414994286', 420900, 3, 'tr_0 tr_420000 tr_420900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (420984, '汉川市', 'H', '113.8455490104', '30.666913578821', 420900, 3, 'tr_0 tr_420000 tr_420900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421002, '沙市区', 'S', '112.26157741483', '30.316571904872', 421000, 3, 'tr_0 tr_420000 tr_421000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421003, '荆州区', 'J', '112.19641397381', '30.358989490775', 421000, 3, 'tr_0 tr_420000 tr_421000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421022, '公安县', 'G', '112.23650157584', '30.064400686806', 421000, 3, 'tr_0 tr_420000 tr_421000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421023, '监利县', 'J', '112.91142023009', '29.845735162836', 421000, 3, 'tr_0 tr_420000 tr_421000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421024, '江陵县', 'J', '112.43145201728', '30.048042984592', 421000, 3, 'tr_0 tr_420000 tr_421000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421071, '荆州经济技术开发区', 'J', '112.19641397381', '30.358989490775', 421000, 3, 'tr_0 tr_420000 tr_421000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421081, '石首市', 'S', '112.43141984371', '29.727033977407', 421000, 3, 'tr_0 tr_420000 tr_421000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421083, '洪湖市', 'H', '113.48255290196', '29.83277032976', 421000, 3, 'tr_0 tr_420000 tr_421000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421087, '松滋市', 'S', '111.77358031264', '30.175342235143', 421000, 3, 'tr_0 tr_420000 tr_421000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421102, '黄州区', 'H', '114.88653238452', '30.440224145146', 421100, 3, 'tr_0 tr_420000 tr_421100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421121, '团风县', 'T', '114.87852435023', '30.649367767215', 421100, 3, 'tr_0 tr_420000 tr_421100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421122, '红安县', 'H', '114.6244256113', '31.294296714037', 421100, 3, 'tr_0 tr_420000 tr_421100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421123, '罗田县', 'L', '115.4055471675', '30.788910495685', 421100, 3, 'tr_0 tr_420000 tr_421100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421124, '英山县', 'Y', '115.68742160263', '30.741350084085', 421100, 3, 'tr_0 tr_420000 tr_421100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421125, '浠水县', 'X', '115.27156903289', '30.457460842265', 421100, 3, 'tr_0 tr_420000 tr_421100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421126, '蕲春县', 'Q', '115.4423985341', '30.232535499734', 421100, 3, 'tr_0 tr_420000 tr_421100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421127, '黄梅县', 'H', '115.95046198477', '30.076605056821', 421100, 3, 'tr_0 tr_420000 tr_421100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421171, '龙感湖管理区', 'L', '116.01030250647', '29.879697031911', 421100, 3, 'tr_0 tr_420000 tr_421100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421181, '麻城市', 'M', '115.01656174777', '31.176995837411', 421100, 3, 'tr_0 tr_420000 tr_421100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421182, '武穴市', 'W', '115.56739216105', '29.850441430483', 421100, 3, 'tr_0 tr_420000 tr_421100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421202, '咸安区', 'X', '114.30456990606', '29.858153915154', 421200, 3, 'tr_0 tr_420000 tr_421200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421221, '嘉鱼县', 'J', '113.94557046336', '29.976353520898', 421200, 3, 'tr_0 tr_420000 tr_421200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421222, '通城县', 'T', '113.82356790903', '29.250857930222', 421200, 3, 'tr_0 tr_420000 tr_421200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421223, '崇阳县', 'C', '114.04656290943', '29.561333782271', 421200, 3, 'tr_0 tr_420000 tr_421200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421224, '通山县', 'T', '114.48939330027', '29.612634338058', 421200, 3, 'tr_0 tr_420000 tr_421200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421281, '赤壁市', 'C', '113.90643686179', '29.730665997526', 421200, 3, 'tr_0 tr_420000 tr_421200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421303, '曾都区', 'C', '113.3775133346', '31.722122861271', 421300, 3, 'tr_0 tr_420000 tr_421300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421321, '随县', 'S', '113.3064583569', '31.859971678258', 421300, 3, 'tr_0 tr_420000 tr_421300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (421381, '广水市', 'G', '113.83259337884', '31.622476038007', 421300, 3, 'tr_0 tr_420000 tr_421300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (422801, '恩施市', 'E', '109.48655026901', '30.301037143741', 422800, 3, 'tr_0 tr_420000 tr_422800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (422802, '利川市', 'L', '108.94248057756', '30.29720344368', 422800, 3, 'tr_0 tr_420000 tr_422800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (422822, '建始县', 'J', '109.72855610899', '30.607907026319', 422800, 3, 'tr_0 tr_420000 tr_422800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (422823, '巴东县', 'B', '110.34757529184', '31.04806424896', 422800, 3, 'tr_0 tr_420000 tr_422800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (422825, '宣恩县', 'X', '109.49756797283', '29.99260392208', 422800, 3, 'tr_0 tr_420000 tr_422800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (422826, '咸丰县', 'X', '109.14660773562', '29.671077652358', 422800, 3, 'tr_0 tr_420000 tr_422800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (422827, '来凤县', 'L', '109.41349484153', '29.499443572607', 422800, 3, 'tr_0 tr_420000 tr_422800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (422828, '鹤峰县', 'H', '110.04042423301', '29.896116483403', 422800, 3, 'tr_0 tr_420000 tr_422800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (429004, '仙桃市', 'X', '113.46159059813', '30.368271921725', 429000, 3, 'tr_0 tr_420000 tr_429000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (429005, '潜江市', 'Q', '112.90547409082', '30.408357932419', 429000, 3, 'tr_0 tr_420000 tr_429000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (429006, '天门市', 'T', '113.17240916633', '30.669621830099', 429000, 3, 'tr_0 tr_420000 tr_429000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (429021, '神农架林区', 'S', '110.6825248504', '31.750496011246', 429000, 3, 'tr_0 tr_420000 tr_429000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371602, '滨城区', 'B', '118.02660385061', '37.436843207744', 371600, 3, 'tr_0 tr_370000 tr_371600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371603, '沾化区', 'Z', '118.10545441336', '37.705298106724', 371600, 3, 'tr_0 tr_370000 tr_371600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371621, '惠民县', 'H', '117.5165096905', '37.49580310894', 371600, 3, 'tr_0 tr_370000 tr_371600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371622, '阳信县', 'Y', '117.58443703791', '37.647338034957', 371600, 3, 'tr_0 tr_370000 tr_371600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371623, '无棣县', 'W', '117.63245748606', '37.777567312086', 371600, 3, 'tr_0 tr_370000 tr_371600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371625, '博兴县', 'B', '118.11749269533', '37.160477277651', 371600, 3, 'tr_0 tr_370000 tr_371600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (371681, '邹平市', 'Z', '117.74947848722', '36.870032216697', 371600, 3, 'tr_0 tr_370000 tr_371600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430202, '荷塘区', 'H', '113.18045222007', '27.862155809141', 430200, 3, 'tr_0 tr_430000 tr_430200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430203, '芦淞区', 'L', '113.15841867236', '27.791508825947', 430200, 3, 'tr_0 tr_430000 tr_430200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430204, '石峰区', 'S', '113.12456791567', '27.880705165595', 430200, 3, 'tr_0 tr_430000 tr_430200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430211, '天元区', 'T', '113.08954055842', '27.833083519485', 430200, 3, 'tr_0 tr_430000 tr_430200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430212, '渌口区', 'L', '113.15042671773', '27.704322804857', 430200, 3, 'tr_0 tr_430000 tr_430200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430223, '攸县', 'Y', '113.35157834169', '27.005771565213', 430200, 3, 'tr_0 tr_430000 tr_430200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430224, '茶陵县', 'C', '113.54547165714', '26.78358911036', 430200, 3, 'tr_0 tr_430000 tr_430200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430225, '炎陵县', 'Y', '113.77941879832', '26.496060691599', 430200, 3, 'tr_0 tr_430000 tr_430200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430271, '云龙示范区', 'Y', '113.17446420357', '27.934854931886', 430200, 3, 'tr_0 tr_430000 tr_430200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430281, '醴陵市', 'L', '113.50348315084', '27.652325149951', 430200, 3, 'tr_0 tr_430000 tr_430200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430302, '雨湖区', 'Y', '112.91344959207', '27.862466785111', 430300, 3, 'tr_0 tr_430000 tr_430300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430304, '岳塘区', 'Y', '112.97558942655', '27.877720506364', 430300, 3, 'tr_0 tr_430000 tr_430300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430321, '湘潭县', 'X', '112.95750536884', '27.784982534656', 430300, 3, 'tr_0 tr_430000 tr_430300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430371, '湖南湘潭高新技术产业园区', 'H', '112.95046418076', '27.835702227136', 430300, 3, 'tr_0 tr_430000 tr_430300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430372, '湘潭昭山示范区', 'X', '113.01812844052', '27.97161027839', 430300, 3, 'tr_0 tr_430000 tr_430300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430373, '湘潭九华示范区', 'X', '112.94707945543', '27.916546191684', 430300, 3, 'tr_0 tr_430000 tr_430300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430381, '湘乡市', 'X', '112.54149155341', '27.740190553344', 430300, 3, 'tr_0 tr_430000 tr_430300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430382, '韶山市', 'S', '112.53349932929', '27.921043749631', 430300, 3, 'tr_0 tr_430000 tr_430300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430405, '珠晖区', 'Z', '112.62659414282', '26.900265361946', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430406, '雁峰区', 'Y', '112.62358823292', '26.89436829036', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430407, '石鼓区', 'S', '112.60452969339', '26.948961867165', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430408, '蒸湘区', 'Z', '112.57344401089', '26.917719877877', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430412, '南岳区', 'N', '112.74557434825', '27.238360474562', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430421, '衡阳县', 'H', '112.37755268433', '26.975294950861', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430422, '衡南县', 'H', '112.68440252779', '26.744531956772', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430423, '衡山县', 'H', '112.87556328771', '27.235996029656', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430424, '衡东县', 'H', '112.95949529521', '27.087042820265', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430426, '祁东县', 'Q', '112.09644737847', '26.805995255191', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430471, '衡阳综合保税区', 'H', '112.57844721326', '26.899576139189', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430472, '湖南衡阳高新技术产业园区', 'H', '112.57844721326', '26.899576139189', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430473, '湖南衡阳松木经济开发区', 'H', '112.57844721326', '26.899576139189', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430481, '耒阳市', 'L', '112.86659721058', '26.428065593928', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430482, '常宁市', 'C', '112.40556050266', '26.426720432257', 430400, 3, 'tr_0 tr_430000 tr_430400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430502, '双清区', 'S', '111.50344150643', '27.239108783297', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430503, '大祥区', 'D', '111.44552828921', '27.227013968694', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430511, '北塔区', 'B', '111.45849694619', '27.251536276174', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430521, '邵东县', 'S', '111.75049070296', '27.264507471566', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430522, '新邵县', 'X', '111.46444938799', '27.32713173916', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430523, '邵阳县', 'S', '111.28050768064', '26.996528332196', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430524, '隆回县', 'L', '111.03950668528', '27.119946440019', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430525, '洞口县', 'D', '110.58257909625', '27.065975437799', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430527, '绥宁县', 'S', '110.16241987038', '26.588422719333', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430528, '新宁县', 'X', '110.86349072744', '26.439723697954', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430529, '城步苗族自治县', 'C', '110.32853713032', '26.396203220078', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430581, '武冈市', 'W', '110.63840761588', '26.732898572992', 430500, 3, 'tr_0 tr_430000 tr_430500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430602, '岳阳楼区', 'Y', '113.13648070435', '29.377995036881', 430600, 3, 'tr_0 tr_430000 tr_430600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430603, '云溪区', 'Y', '113.27840659691', '29.479907141133', 430600, 3, 'tr_0 tr_430000 tr_430600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430611, '君山区', 'J', '113.0125171491', '29.467129185832', 430600, 3, 'tr_0 tr_430000 tr_430600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430621, '岳阳县', 'Y', '113.1225444825', '29.150269316045', 430600, 3, 'tr_0 tr_430000 tr_430600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430623, '华容县', 'H', '112.54746151216', '29.536286434382', 430600, 3, 'tr_0 tr_430000 tr_430600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430624, '湘阴县', 'X', '112.88952187736', '28.676676377581', 430600, 3, 'tr_0 tr_430000 tr_430600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430626, '平江县', 'P', '113.58760362284', '28.707564248115', 430600, 3, 'tr_0 tr_430000 tr_430600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430671, '岳阳市屈原管理区', 'Y', '112.92259003029', '28.866288191728', 430600, 3, 'tr_0 tr_430000 tr_430600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430681, '汨罗市', 'M', '113.07349286947', '28.812454694812', 430600, 3, 'tr_0 tr_430000 tr_430600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430682, '临湘市', 'L', '113.45656151', '29.482801373395', 430600, 3, 'tr_0 tr_430000 tr_430600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430702, '武陵区', 'W', '111.68954489616', '29.060783476578', 430700, 3, 'tr_0 tr_430000 tr_430700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430703, '鼎城区', 'D', '111.68752209182', '29.024443397066', 430700, 3, 'tr_0 tr_430000 tr_430700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430721, '安乡县', 'A', '112.1775061558', '29.41732043222', 430700, 3, 'tr_0 tr_430000 tr_430700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430722, '汉寿县', 'H', '111.97641193356', '28.912287603085', 430700, 3, 'tr_0 tr_430000 tr_430700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430723, '澧县', 'L', '111.76553354736', '29.638946004609', 430700, 3, 'tr_0 tr_430000 tr_430700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430724, '临澧县', 'L', '111.65358500797', '29.446543990119', 430700, 3, 'tr_0 tr_430000 tr_430700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430725, '桃源县', 'T', '111.49540733145', '28.908694006999', 430700, 3, 'tr_0 tr_430000 tr_430700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430726, '石门县', 'S', '111.38645140702', '29.59036596665', 430700, 3, 'tr_0 tr_430000 tr_430700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430771, '常德市西洞庭管理区', 'C', '112.0093067782', '29.197804478833', 430700, 3, 'tr_0 tr_430000 tr_430700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430781, '津市市', 'J', '111.88451734602', '29.611258543007', 430700, 3, 'tr_0 tr_430000 tr_430700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430802, '永定区', 'Y', '110.54443192397', '29.126190558381', 430800, 3, 'tr_0 tr_430000 tr_430800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430811, '武陵源区', 'W', '110.5574989454', '29.351681136671', 430800, 3, 'tr_0 tr_430000 tr_430800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430821, '慈利县', 'C', '111.14547125235', '29.435986725969', 430800, 3, 'tr_0 tr_430000 tr_430800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430822, '桑植县', 'S', '110.17041335213', '29.405923219415', 430800, 3, 'tr_0 tr_430000 tr_430800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430902, '资阳区', 'Z', '112.33043548238', '28.597234549737', 430900, 3, 'tr_0 tr_430000 tr_430900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430903, '赫山区', 'H', '112.38059794001', '28.584983567573', 430900, 3, 'tr_0 tr_430000 tr_430900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430921, '南县', 'N', '112.40254156734', '29.367069853363', 430900, 3, 'tr_0 tr_430000 tr_430900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430922, '桃江县', 'T', '112.16254146398', '28.523870869898', 430900, 3, 'tr_0 tr_430000 tr_430900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430923, '安化县', 'A', '111.21949270432', '28.380053748765', 430900, 3, 'tr_0 tr_430000 tr_430900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430971, '益阳市大通湖管理区', 'Y', '112.65023278281', '29.193681230112', 430900, 3, 'tr_0 tr_430000 tr_430900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430972, '湖南益阳高新技术产业园区', 'H', '112.3715604476', '28.816150235875', 430900, 3, 'tr_0 tr_430000 tr_430900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430981, '沅江市', 'Y', '112.36053222035', '28.850233588583', 430900, 3, 'tr_0 tr_430000 tr_430900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431002, '北湖区', 'B', '113.01748199382', '25.79081459434', 431000, 3, 'tr_0 tr_430000 tr_431000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431003, '苏仙区', 'S', '113.04842340846', '25.806737374104', 431000, 3, 'tr_0 tr_430000 tr_431000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431021, '桂阳县', 'G', '112.74056036622', '25.759775327893', 431000, 3, 'tr_0 tr_430000 tr_431000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431022, '宜章县', 'Y', '112.95547924076', '25.405713969356', 431000, 3, 'tr_0 tr_430000 tr_431000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431023, '永兴县', 'Y', '113.12253316386', '26.132968478533', 431000, 3, 'tr_0 tr_430000 tr_431000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431024, '嘉禾县', 'J', '112.37558377831', '25.593421718268', 431000, 3, 'tr_0 tr_430000 tr_431000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431025, '临武县', 'L', '112.57041115183', '25.282527010969', 431000, 3, 'tr_0 tr_430000 tr_431000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431026, '汝城县', 'R', '113.69154466692', '25.556056733978', 431000, 3, 'tr_0 tr_430000 tr_431000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431027, '桂东县', 'G', '113.9515936018', '26.083173927327', 431000, 3, 'tr_0 tr_430000 tr_431000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431028, '安仁县', 'A', '113.27542359381', '26.715682788508', 431000, 3, 'tr_0 tr_430000 tr_431000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431081, '资兴市', 'Z', '113.24255612233', '25.981873602722', 431000, 3, 'tr_0 tr_430000 tr_431000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431102, '零陵区', 'L', '111.63750237493', '26.227682089779', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431103, '冷水滩区', 'L', '111.59842608526', '26.467705510832', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431121, '祁阳县', 'Q', '111.84742029288', '26.586434994948', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431122, '东安县', 'D', '111.32354235354', '26.398288039365', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431123, '双牌县', 'S', '111.6675938129', '25.967169239803', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431124, '道县', 'D', '111.60740437934', '25.53252996283', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431125, '江永县', 'J', '111.35043663236', '25.279720667918', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431126, '宁远县', 'N', '111.95245340697', '25.57705193746', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431127, '蓝山县', 'L', '112.20343493586', '25.37593472464', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431128, '新田县', 'X', '112.21040920018', '25.909825802754', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431129, '江华瑶族自治县', 'J', '111.58545203845', '25.191348924015', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431171, '永州经济技术开发区', 'Y', '111.61945505792', '26.4258641179', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431172, '永州市金洞管理区', 'Y', '112.09909809837', '26.297256941493', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431173, '永州市回龙圩管理区', 'Y', '111.35307783022', '25.173038319623', 431100, 3, 'tr_0 tr_430000 tr_431100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431202, '鹤城区', 'H', '110.04639994092', '27.585225763164', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431221, '中方县', 'Z', '109.95146189432', '27.44608117406', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431222, '沅陵县', 'Y', '110.40043076602', '28.459018102626', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431223, '辰溪县', 'C', '110.19048661755', '28.012605313813', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431224, '溆浦县', 'X', '110.60155112895', '27.913963373886', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431225, '会同县', 'H', '109.74158556792', '26.893383817274', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431226, '麻阳苗族自治县', 'M', '109.80943628984', '27.87193016295', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431227, '新晃侗族自治县', 'X', '109.18147151144', '27.358782968573', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431228, '芷江侗族自治县', 'Z', '109.6914022696', '27.449513277765', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431229, '靖州苗族侗族自治县', 'J', '109.70245160703', '26.581321351066', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431230, '通道侗族自治县', 'T', '109.79044548256', '26.164219864712', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431271, '怀化市洪江管理区', 'H', '109.8435098263', '27.215077093932', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431281, '洪江市', 'H', '109.8435098263', '27.215077093932', 431200, 3, 'tr_0 tr_430000 tr_431200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431302, '娄星区', 'L', '112.00855842504', '27.735604842109', 431300, 3, 'tr_0 tr_430000 tr_431300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431321, '双峰县', 'S', '112.18146049666', '27.462982658573', 431300, 3, 'tr_0 tr_430000 tr_431300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431322, '新化县', 'X', '111.334515335', '27.732666751066', 431300, 3, 'tr_0 tr_430000 tr_431300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431381, '冷水江市', 'L', '111.44153972291', '27.692058848958', 431300, 3, 'tr_0 tr_430000 tr_431300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (431382, '涟源市', 'L', '111.67056199396', '27.698167532255', 431300, 3, 'tr_0 tr_430000 tr_431300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (433101, '吉首市', 'J', '109.70444880967', '28.267493127593', 433100, 3, 'tr_0 tr_430000 tr_433100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (433122, '泸溪县', 'L', '110.22659921769', '28.221873097569', 433100, 3, 'tr_0 tr_430000 tr_433100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (433123, '凤凰县', 'F', '109.6055266883', '27.953847809726', 433100, 3, 'tr_0 tr_430000 tr_433100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (433124, '花垣县', 'H', '109.48856183128', '28.577909934397', 433100, 3, 'tr_0 tr_430000 tr_433100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (433125, '保靖县', 'B', '109.66647357306', '28.705968872486', 433100, 3, 'tr_0 tr_430000 tr_433100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (433126, '古丈县', 'G', '109.95750740057', '28.623083527843', 433100, 3, 'tr_0 tr_430000 tr_433100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (433127, '永顺县', 'Y', '109.86358578665', '28.985774485682', 433100, 3, 'tr_0 tr_430000 tr_433100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (433130, '龙山县', 'L', '109.45041573696', '29.464121765857', 433100, 3, 'tr_0 tr_430000 tr_433100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (433172, '湖南吉首经济开发区', 'H', '109.70444880967', '28.267493127593', 433100, 3, 'tr_0 tr_430000 tr_433100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (433173, '湖南永顺经济开发区', 'H', '109.86358578665', '28.985774485682', 433100, 3, 'tr_0 tr_430000 tr_433100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440103, '荔湾区', 'L', '113.25050226337', '23.131791134975', 440100, 3, 'tr_0 tr_440000 tr_440100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440104, '越秀区', 'Y', '113.273426481', '23.135260120148', 440100, 3, 'tr_0 tr_440000 tr_440100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440105, '海珠区', 'H', '113.32353998097', '23.088981296648', 440100, 3, 'tr_0 tr_440000 tr_440100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440106, '天河区', 'T', '113.36850942428', '23.130357835105', 440100, 3, 'tr_0 tr_440000 tr_440100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440111, '白云区', 'B', '113.27943309062', '23.164316834456', 440100, 3, 'tr_0 tr_440000 tr_440100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440112, '黄埔区', 'H', '113.48707083969', '23.187491541425', 440100, 3, 'tr_0 tr_440000 tr_440100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440113, '番禺区', 'F', '113.39046958043', '22.943830731518', 440100, 3, 'tr_0 tr_440000 tr_440100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440114, '花都区', 'H', '113.22657580629', '23.411161504876', 440100, 3, 'tr_0 tr_440000 tr_440100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440115, '南沙区', 'N', '113.53143554372', '22.807929296528', 440100, 3, 'tr_0 tr_440000 tr_440100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440117, '从化区', 'C', '113.59358543922', '23.553985922578', 440100, 3, 'tr_0 tr_440000 tr_440100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440118, '增城区', 'Z', '113.8175456689', '23.266592400631', 440100, 3, 'tr_0 tr_440000 tr_440100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440203, '武江区', 'W', '113.59455578884', '24.798486030733', 440200, 3, 'tr_0 tr_440000 tr_440200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440204, '浈江区', 'Z', '113.61747740137', '24.810413749784', 440200, 3, 'tr_0 tr_440000 tr_440200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440205, '曲江区', 'Q', '113.61150106465', '24.68840784638', 440200, 3, 'tr_0 tr_440000 tr_440200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440222, '始兴县', 'S', '114.06856735205', '24.958558154346', 440200, 3, 'tr_0 tr_440000 tr_440200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440224, '仁化县', 'R', '113.75544293443', '25.092287524428', 440200, 3, 'tr_0 tr_440000 tr_440200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440229, '翁源县', 'W', '114.13642723669', '24.356594490867', 440200, 3, 'tr_0 tr_440000 tr_440200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440232, '乳源瑶族自治县', 'R', '113.28243136492', '24.782333322942', 440200, 3, 'tr_0 tr_440000 tr_440200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440233, '新丰县', 'X', '114.21351173078', '24.065546505164', 440200, 3, 'tr_0 tr_440000 tr_440200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440281, '乐昌市', 'L', '113.3545786821', '25.135591561195', 440200, 3, 'tr_0 tr_440000 tr_440200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440282, '南雄市', 'N', '114.31857889065', '25.123526537362', 440200, 3, 'tr_0 tr_440000 tr_440200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440303, '罗湖区', 'L', '114.13743190157', '22.554484875856', 440300, 3, 'tr_0 tr_440000 tr_440300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440304, '福田区', 'F', '114.06154700466', '22.528465912072', 440300, 3, 'tr_0 tr_440000 tr_440300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440305, '南山区', 'N', '113.93653916925', '22.538500195784', 440300, 3, 'tr_0 tr_440000 tr_440300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440306, '宝安区', 'B', '113.89042744066', '22.560032908925', 440300, 3, 'tr_0 tr_440000 tr_440300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440307, '龙岗区', 'L', '114.25445487896', '22.726016550781', 440300, 3, 'tr_0 tr_440000 tr_440300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440308, '盐田区', 'Y', '114.2434301551', '22.563437914836', 440300, 3, 'tr_0 tr_440000 tr_440300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440309, '龙华区', 'L', '114.04852876121', '22.757596649222', 440300, 3, 'tr_0 tr_440000 tr_440300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440310, '坪山区', 'P', '114.35047403625', '22.716233464749', 440300, 3, 'tr_0 tr_440000 tr_440300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440311, '光明区', 'G', '113.94256006193', '22.754465883635', 440300, 3, 'tr_0 tr_440000 tr_440300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440402, '香洲区', 'X', '113.55047243408', '22.273003861799', 440400, 3, 'tr_0 tr_440000 tr_440400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440403, '斗门区', 'D', '113.30346725453', '22.215515662229', 440400, 3, 'tr_0 tr_440000 tr_440400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440404, '金湾区', 'J', '113.36951705357', '22.152576780675', 440400, 3, 'tr_0 tr_440000 tr_440400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440507, '龙湖区', 'L', '116.72352464693', '23.377775780628', 440500, 3, 'tr_0 tr_440000 tr_440500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440511, '金平区', 'J', '116.70955006744', '23.371750385773', 440500, 3, 'tr_0 tr_440000 tr_440500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440512, '濠江区', 'H', '116.73351658895', '23.291546359757', 440500, 3, 'tr_0 tr_440000 tr_440500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440513, '潮阳区', 'C', '116.6085145027', '23.270854956943', 440500, 3, 'tr_0 tr_440000 tr_440500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440514, '潮南区', 'C', '116.43949131427', '23.256341432673', 440500, 3, 'tr_0 tr_440000 tr_440500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440515, '澄海区', 'C', '116.76242504839', '23.472341401523', 440500, 3, 'tr_0 tr_440000 tr_440500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440523, '南澳县', 'N', '117.03049603113', '23.427812045946', 440500, 3, 'tr_0 tr_440000 tr_440500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440604, '禅城区', 'C', '113.12950518241', '23.015374368816', 440600, 3, 'tr_0 tr_440000 tr_440600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440605, '南海区', 'N', '113.14944567828', '23.035011446003', 440600, 3, 'tr_0 tr_440000 tr_440600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440606, '顺德区', 'S', '113.30045343954', '22.810453426795', 440600, 3, 'tr_0 tr_440000 tr_440600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440607, '三水区', 'S', '112.90347085515', '23.161920493984', 440600, 3, 'tr_0 tr_440000 tr_440600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440608, '高明区', 'G', '112.89947240749', '22.90634960163', 440600, 3, 'tr_0 tr_440000 tr_440600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440703, '蓬江区', 'P', '113.08454642894', '22.601065786023', 440700, 3, 'tr_0 tr_440000 tr_440700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440704, '江海区', 'J', '113.11755718015', '22.566115451824', 440700, 3, 'tr_0 tr_440000 tr_440700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440705, '新会区', 'X', '113.03845482239', '22.46511306052', 440700, 3, 'tr_0 tr_440000 tr_440700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440781, '台山市', 'T', '112.80044482505', '22.257923470251', 440700, 3, 'tr_0 tr_440000 tr_440700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440783, '开平市', 'K', '112.70446429491', '22.382499490201', 440700, 3, 'tr_0 tr_440000 tr_440700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440784, '鹤山市', 'H', '112.97052666653', '22.771169431377', 440700, 3, 'tr_0 tr_440000 tr_440700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440785, '恩平市', 'E', '112.31143757848', '22.189035201534', 440700, 3, 'tr_0 tr_440000 tr_440700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440802, '赤坎区', 'C', '110.37253254096', '21.272134812703', 440800, 3, 'tr_0 tr_440000 tr_440800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440803, '霞山区', 'X', '110.40442535096', '21.198227185303', 440800, 3, 'tr_0 tr_440000 tr_440800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440804, '坡头区', 'P', '110.46256709711', '21.250376738599', 440800, 3, 'tr_0 tr_440000 tr_440800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440811, '麻章区', 'M', '110.34057918516', '21.269188766567', 440800, 3, 'tr_0 tr_440000 tr_440800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440823, '遂溪县', 'S', '110.25651530642', '21.383102962029', 440800, 3, 'tr_0 tr_440000 tr_440800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440825, '徐闻县', 'X', '110.18247274427', '20.331723686702', 440800, 3, 'tr_0 tr_440000 tr_440800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440881, '廉江市', 'L', '110.29244770646', '21.615816495305', 440800, 3, 'tr_0 tr_440000 tr_440800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440882, '雷州市', 'L', '110.10258050648', '20.919880592716', 440800, 3, 'tr_0 tr_440000 tr_440800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440883, '吴川市', 'W', '110.78645034015', '21.447262768557', 440800, 3, 'tr_0 tr_440000 tr_440800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440902, '茂南区', 'M', '110.92554576188', '21.647152082304', 440900, 3, 'tr_0 tr_440000 tr_440900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440904, '电白区', 'D', '111.02047123221', '21.520351188198', 440900, 3, 'tr_0 tr_440000 tr_440900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440981, '高州市', 'G', '110.85947386452', '21.924048896771', 440900, 3, 'tr_0 tr_440000 tr_440900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440982, '化州市', 'H', '110.6464310112', '21.67023109387', 440900, 3, 'tr_0 tr_440000 tr_440900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (440983, '信宜市', 'X', '110.95358169717', '22.36009314173', 440900, 3, 'tr_0 tr_440000 tr_440900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441202, '端州区', 'D', '112.49156022979', '23.057563726176', 441200, 3, 'tr_0 tr_440000 tr_441200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441203, '鼎湖区', 'D', '112.57443448255', '23.164308112716', 441200, 3, 'tr_0 tr_440000 tr_441200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441204, '高要区', 'G', '112.46444604577', '23.031895546866', 441200, 3, 'tr_0 tr_440000 tr_441200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441223, '广宁县', 'G', '112.44742387501', '23.641035726333', 441200, 3, 'tr_0 tr_440000 tr_441200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441224, '怀集县', 'H', '112.19146878783', '23.917842129185', 441200, 3, 'tr_0 tr_440000 tr_441200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441225, '封开县', 'F', '111.51852585255', '23.429768921261', 441200, 3, 'tr_0 tr_440000 tr_441200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441226, '德庆县', 'D', '111.79155377493', '23.15137330611', 441200, 3, 'tr_0 tr_440000 tr_441200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441284, '四会市', 'S', '112.7405791408', '23.332381005175', 441200, 3, 'tr_0 tr_440000 tr_441200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441302, '惠城区', 'H', '114.38949004962', '23.089725972544', 441300, 3, 'tr_0 tr_440000 tr_441300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441303, '惠阳区', 'H', '114.46346443037', '22.794720878571', 441300, 3, 'tr_0 tr_440000 tr_441300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441322, '博罗县', 'B', '114.29657265143', '23.178805592433', 441300, 3, 'tr_0 tr_440000 tr_441300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441323, '惠东县', 'H', '114.72642585138', '22.991443112002', 441300, 3, 'tr_0 tr_440000 tr_441300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441324, '龙门县', 'L', '114.26143022124', '23.733838340062', 441300, 3, 'tr_0 tr_440000 tr_441300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441402, '梅江区', 'M', '116.12353597667', '24.315878769038', 441400, 3, 'tr_0 tr_440000 tr_441400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441403, '梅县区', 'M', '116.08856170928', '24.270999314695', 441400, 3, 'tr_0 tr_440000 tr_441400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441422, '大埔县', 'D', '116.70155892129', '24.353459468582', 441400, 3, 'tr_0 tr_440000 tr_441400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441423, '丰顺县', 'F', '116.18845382094', '23.745738303255', 441400, 3, 'tr_0 tr_440000 tr_441400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441424, '五华县', 'W', '115.78248548653', '23.938408899571', 441400, 3, 'tr_0 tr_440000 tr_441400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441426, '平远县', 'P', '115.89747694601', '24.572414126137', 441400, 3, 'tr_0 tr_440000 tr_441400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441427, '蕉岭县', 'J', '116.17743924793', '24.664992548662', 441400, 3, 'tr_0 tr_440000 tr_441400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441481, '兴宁市', 'X', '115.73757946359', '24.142293779322', 441400, 3, 'tr_0 tr_440000 tr_441400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441502, '城区', 'C', '115.37153074806', '22.784551839489', 441500, 3, 'tr_0 tr_440000 tr_441500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441521, '海丰县', 'H', '115.32944477561', '22.972744260966', 441500, 3, 'tr_0 tr_440000 tr_441500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441523, '陆河县', 'L', '115.66648271471', '23.30767707649', 441500, 3, 'tr_0 tr_440000 tr_441500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441581, '陆丰市', 'L', '115.78802975191', '22.967876723873', 441500, 3, 'tr_0 tr_440000 tr_441500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441602, '源城区', 'Y', '114.70843899033', '23.740298338347', 441600, 3, 'tr_0 tr_440000 tr_441600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441621, '紫金县', 'Z', '115.19044771834', '23.641430253189', 441600, 3, 'tr_0 tr_440000 tr_441600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441622, '龙川县', 'L', '115.26655548485', '24.105850721955', 441600, 3, 'tr_0 tr_440000 tr_441600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441623, '连平县', 'L', '114.49544419635', '24.375808067414', 441600, 3, 'tr_0 tr_440000 tr_441600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441624, '和平县', 'H', '114.9454488143', '24.448252767689', 441600, 3, 'tr_0 tr_440000 tr_441600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441625, '东源县', 'D', '114.7535083252', '23.794257873114', 441600, 3, 'tr_0 tr_440000 tr_441600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441702, '江城区', 'J', '111.96145451801', '21.868127886755', 441700, 3, 'tr_0 tr_440000 tr_441700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441704, '阳东区', 'Y', '112.01857947215', '21.873996844319', 441700, 3, 'tr_0 tr_440000 tr_441700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441721, '阳西县', 'Y', '111.62448107725', '21.758700627505', 441700, 3, 'tr_0 tr_440000 tr_441700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441781, '阳春市', 'Y', '111.7975361303', '22.17601480732', 441700, 3, 'tr_0 tr_440000 tr_441700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441802, '清城区', 'Q', '113.06947663537', '23.704022037925', 441800, 3, 'tr_0 tr_440000 tr_441800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441803, '清新区', 'Q', '112.99155779512', '23.754270337093', 441800, 3, 'tr_0 tr_440000 tr_441800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441821, '佛冈县', 'F', '113.53844124873', '23.885475421111', 441800, 3, 'tr_0 tr_440000 tr_441800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441823, '阳山县', 'Y', '112.64751954085', '24.47094363588', 441800, 3, 'tr_0 tr_440000 tr_441800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'); +INSERT INTO hg_sys_provinces (id, title, pinyin, lng, lat, pid, level, tree, sort, status, created_at, updated_at) VALUES + (441825, '连山壮族瑶族自治县', 'L', '112.10042570409', '24.576845604093', 441800, 3, 'tr_0 tr_440000 tr_441800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441826, '连南瑶族自治县', 'L', '112.29351728187', '24.73154858148', 441800, 3, 'tr_0 tr_440000 tr_441800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441881, '英德市', 'Y', '113.42144297474', '24.191939355217', 441800, 3, 'tr_0 tr_440000 tr_441800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441882, '连州市', 'L', '112.38357258887', '24.786466855047', 441800, 3, 'tr_0 tr_440000 tr_441800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900003, '东城街道办事处', 'D', '113.78961542643', '23.033927867022', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900004, '南城街道办事处', 'N', '113.74972154669', '23.02491560037', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900005, '万江街道办事处', 'W', '113.70128466119', '23.044382337638', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900006, '莞城街道办事处', 'G', '113.7555643548', '23.04532373021', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900101, '石碣镇', 'S', '113.81395530616', '23.105172244651', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900102, '石龙镇', 'S', '113.84749077289', '23.115219876975', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900103, '茶山镇', 'C', '113.89350241139', '23.069002516534', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900104, '石排镇', 'S', '113.96394649371', '23.088334509001', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900105, '企石镇', 'Q', '114.04851828338', '23.070690716193', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900106, '横沥镇', 'H', '113.98801324096', '23.030051448767', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900107, '桥头镇', 'Q', '114.10677408198', '23.020458678747', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900108, '谢岗镇', 'X', '114.19511437465', '22.946513843008', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900109, '东坑镇', 'D', '113.95246820282', '23.002958656049', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900110, '常平镇', 'C', '114.02458867145', '22.979369177741', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900111, '寮步镇', 'L', '113.88349112257', '22.996428153649', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900112, '樟木头镇', 'Z', '114.11559876672', '22.912795269745', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900113, '大朗镇', 'D', '113.94820653279', '22.912348752542', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900114, '黄江镇', 'H', '114.00621531625', '22.872431801821', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900115, '清溪镇', 'Q', '114.18744982903', '22.841601621999', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900116, '塘厦镇', 'T', '114.08442795001', '22.811576132112', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900117, '凤岗镇', 'F', '114.17560299034', '22.722315801247', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900118, '大岭山镇', 'D', '113.83293372133', '22.903546239236', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900119, '长安镇', 'Z', '113.76998309965', '22.795308241444', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900121, '虎门镇', 'H', '113.68188667267', '22.818449805406', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900122, '厚街镇', 'H', '113.7081456375', '22.923357615893', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900123, '沙田镇', 'S', '113.60821459687', '22.907479676518', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900124, '道滘镇', 'D', '113.66267069882', '22.982801242639', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900125, '洪梅镇', 'H', '113.6125183112', '22.978946913376', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900126, '麻涌镇', 'M', '113.58837988097', '23.057083015858', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900127, '望牛墩镇', 'W', '113.64023583492', '23.047597838769', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900128, '中堂镇', 'Z', '113.65890566238', '23.096485679975', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900129, '高埗镇', 'G', '113.74213386638', '23.100270479205', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900401, '松山湖管委会', 'S', '113.90386183402', '22.928504587758', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900402, '东莞港', 'D', '113.75842045788', '23.027308411643', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (441900403, '东莞生态园', 'D', '113.93331900631', '23.069150651008', 441900, 3, 'tr_0 tr_440000 tr_441900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000001, '石岐区街道办事处', 'S', '113.39476330111', '22.543405990677', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000002, '东区街道办事处', 'D', '113.39942236263', '22.522314670791', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000003, '火炬开发区街道办事处', 'H', '113.47638423802', '22.54191612433', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000004, '西区街道办事处', 'X', '113.34742851429', '22.557446683319', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000005, '南区街道办事处', 'N', '113.34166389111', '22.474593624741', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000006, '五桂山街道办事处', 'W', '113.40930659782', '22.451434375841', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000100, '小榄镇', 'X', '113.25710033351', '22.668653898989', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000101, '黄圃镇', 'H', '113.38940119784', '22.732151367196', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000102, '民众镇', 'M', '113.50030740281', '22.624234006676', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000103, '东凤镇', 'D', '113.26337563889', '22.696772350456', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000104, '东升镇', 'D', '113.31347763067', '22.605137527398', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000105, '古镇镇', 'G', '113.18899941194', '22.636034421686', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000106, '沙溪镇', 'S', '113.35710852331', '22.513668030794', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000107, '坦洲镇', 'T', '113.46831862593', '22.283731940242', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000108, '港口镇', 'G', '113.38354521878', '22.577121999043', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000109, '三角镇', 'S', '113.42740190231', '22.685663488493', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000110, '横栏镇', 'H', '113.24834255727', '22.574461443704', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000111, '南头镇', 'N', '113.29481042537', '22.721261074602', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000112, '阜沙镇', 'F', '113.34269477842', '22.666128002352', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000113, '南朗镇', 'N', '113.56057493505', '22.519486447352', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000114, '三乡镇', 'S', '113.42695556574', '22.371470122528', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000115, '板芙镇', 'B', '113.33339573359', '22.395149046719', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000116, '大涌镇', 'D', '113.29404791311', '22.483908949365', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (442000117, '神湾镇', 'S', '113.35331518036', '22.32576323421', 442000, 3, 'tr_0 tr_440000 tr_442000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445102, '湘桥区', 'X', '116.63446160819', '23.680686981566', 445100, 3, 'tr_0 tr_440000 tr_445100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445103, '潮安区', 'C', '116.68452606069', '23.468357129831', 445100, 3, 'tr_0 tr_440000 tr_445100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445122, '饶平县', 'R', '117.01044917588', '23.670347111195', 445100, 3, 'tr_0 tr_440000 tr_445100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445202, '榕城区', 'R', '116.37351589492', '23.530746417966', 445200, 3, 'tr_0 tr_440000 tr_445200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445203, '揭东区', 'J', '116.41845578398', '23.572485187047', 445200, 3, 'tr_0 tr_440000 tr_445200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445222, '揭西县', 'J', '115.84856088728', '23.437299708209', 445200, 3, 'tr_0 tr_440000 tr_445200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445224, '惠来县', 'H', '116.30144448456', '23.039645374525', 445200, 3, 'tr_0 tr_440000 tr_445200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445281, '普宁市', 'P', '116.17244898117', '23.30363452186', 445200, 3, 'tr_0 tr_440000 tr_445200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430102, '芙蓉区', 'F', '113.03940774487', '28.191913247305', 430100, 3, 'tr_0 tr_430000 tr_430100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430103, '天心区', 'T', '112.99659225852', '28.118211217441', 430100, 3, 'tr_0 tr_430000 tr_430100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430104, '岳麓区', 'Y', '112.9374476441', '28.241488836473', 430100, 3, 'tr_0 tr_430000 tr_430100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430105, '开福区', 'K', '112.99258491764', '28.261378687684', 430100, 3, 'tr_0 tr_430000 tr_430100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430111, '雨花区', 'Y', '113.04242155986', '28.142232711654', 430100, 3, 'tr_0 tr_430000 tr_430100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430112, '望城区', 'W', '112.8244661432', '28.367403020376', 430100, 3, 'tr_0 tr_430000 tr_430100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430121, '长沙县', 'Z', '113.08755916596', '28.251818487944', 430100, 3, 'tr_0 tr_430000 tr_430100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430181, '浏阳市', 'L', '113.64939823851', '28.169832216071', 430100, 3, 'tr_0 tr_430000 tr_430100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (430182, '宁乡市', 'N', '112.55840691564', '28.284104536209', 430100, 3, 'tr_0 tr_430000 tr_430100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445302, '云城区', 'Y', '112.05052923472', '22.933897802971', 445300, 3, 'tr_0 tr_440000 tr_445300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445303, '云安区', 'Y', '112.00956308992', '23.076892611911', 445300, 3, 'tr_0 tr_440000 tr_445300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445321, '新兴县', 'X', '112.23149683219', '22.701890082606', 445300, 3, 'tr_0 tr_440000 tr_445300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445322, '郁南县', 'Y', '111.54155382446', '23.240174042653', 445300, 3, 'tr_0 tr_440000 tr_445300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (445381, '罗定市', 'L', '111.57648048166', '22.774296060763', 445300, 3, 'tr_0 tr_440000 tr_445300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450102, '兴宁区', 'X', '108.37544497422', '22.860290951255', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450103, '青秀区', 'Q', '108.50143861009', '22.792227439631', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450105, '江南区', 'J', '108.27949435764', '22.787045753588', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450107, '西乡塘区', 'X', '108.31957243762', '22.839651509339', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450108, '良庆区', 'L', '108.32751579392', '22.76284928359', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450109, '邕宁区', 'Y', '108.49342024528', '22.76460044955', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450110, '武鸣区', 'W', '108.28151653318', '23.164515606911', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450123, '隆安县', 'L', '107.70257390338', '23.171585249828', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450124, '马山县', 'M', '108.18356215633', '23.71387772536', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450125, '上林县', 'S', '108.61145148078', '23.438518877663', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450126, '宾阳县', 'B', '108.81650237947', '23.223700543767', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450127, '横县', 'H', '109.2675678064', '22.685572608838', 450100, 3, 'tr_0 tr_450000 tr_450100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450202, '城中区', 'C', '109.4174821502', '24.321314069891', 450200, 3, 'tr_0 tr_450000 tr_450200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450203, '鱼峰区', 'Y', '109.44941628225', '24.318521699515', 450200, 3, 'tr_0 tr_450000 tr_450200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450204, '柳南区', 'L', '109.39155193285', '24.341578870912', 450200, 3, 'tr_0 tr_450000 tr_450200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450205, '柳北区', 'L', '109.40853179342', '24.367867017648', 450200, 3, 'tr_0 tr_450000 tr_450200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450206, '柳江区', 'L', '109.33244423878', '24.26081496535', 450200, 3, 'tr_0 tr_450000 tr_450200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450222, '柳城县', 'L', '109.25156152934', '24.656370391486', 450200, 3, 'tr_0 tr_450000 tr_450200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450223, '鹿寨县', 'L', '109.75755447547', '24.478622266898', 450200, 3, 'tr_0 tr_450000 tr_450200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450224, '融安县', 'R', '109.40456325934', '25.230511447128', 450200, 3, 'tr_0 tr_450000 tr_450200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450225, '融水苗族自治县', 'R', '109.26256083115', '25.072076504109', 450200, 3, 'tr_0 tr_450000 tr_450200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450226, '三江侗族自治县', 'S', '109.61454747223', '25.788830387788', 450200, 3, 'tr_0 tr_450000 tr_450200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450302, '秀峰区', 'X', '110.27043670622', '25.27961848567', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450303, '叠彩区', 'D', '110.30846314624', '25.320233274843', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450304, '象山区', 'X', '110.28742267527', '25.267930010211', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450305, '七星区', 'Q', '110.32453805385', '25.2585670875', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450311, '雁山区', 'Y', '110.3154792716', '25.066213543917', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450312, '临桂区', 'L', '110.21858669186', '25.244301999271', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450321, '阳朔县', 'Y', '110.50347503171', '24.784519191433', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450323, '灵川县', 'L', '110.33253719492', '25.41554953076', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450324, '全州县', 'Q', '111.07956895508', '25.934343027361', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450325, '兴安县', 'X', '110.67851632807', '25.617567220037', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450326, '永福县', 'Y', '109.989590831', '24.985577973084', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450327, '灌阳县', 'G', '111.16755205093', '25.495120752051', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450328, '龙胜各族自治县', 'L', '110.01749399674', '25.804116784254', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450329, '资源县', 'Z', '110.6584391101', '26.048569077338', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450330, '平乐县', 'P', '110.64944626347', '24.63963212806', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450332, '恭城瑶族自治县', 'G', '110.8345596307', '24.837194365911', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450381, '荔浦市', 'L', '110.40143677836', '24.494121641923', 450300, 3, 'tr_0 tr_450000 tr_450300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450403, '万秀区', 'W', '111.32751969101', '23.478845767296', 450400, 3, 'tr_0 tr_450000 tr_450400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450405, '长洲区', 'Z', '111.28149914043', '23.491509584406', 450400, 3, 'tr_0 tr_450000 tr_450400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450406, '龙圩区', 'L', '111.25344829326', '23.421414485718', 450400, 3, 'tr_0 tr_450000 tr_450400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450421, '苍梧县', 'C', '111.55554663956', '23.845998205466', 450400, 3, 'tr_0 tr_450000 tr_450400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450422, '藤县', 'T', '110.92149925488', '23.38100991555', 450400, 3, 'tr_0 tr_450000 tr_450400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450423, '蒙山县', 'M', '110.53141700425', '24.200017445935', 450400, 3, 'tr_0 tr_450000 tr_450400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450481, '岑溪市', 'C', '111.00143182659', '22.92462127872', 450400, 3, 'tr_0 tr_450000 tr_450400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450502, '海城区', 'H', '109.12452136755', '21.481065838236', 450500, 3, 'tr_0 tr_450000 tr_450500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450503, '银海区', 'Y', '109.14654476441', '21.454768668895', 450500, 3, 'tr_0 tr_450000 tr_450500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450512, '铁山港区', 'T', '109.42847264862', '21.53529504285', 450500, 3, 'tr_0 tr_450000 tr_450500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450521, '合浦县', 'H', '109.2134386113', '21.667005735642', 450500, 3, 'tr_0 tr_450000 tr_450500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450602, '港口区', 'G', '108.38648254385', '21.649565586624', 450600, 3, 'tr_0 tr_450000 tr_450600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450603, '防城区', 'F', '108.36044848238', '21.775411305197', 450600, 3, 'tr_0 tr_450000 tr_450600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450621, '上思县', 'S', '107.99044264125', '22.15991408311', 450600, 3, 'tr_0 tr_450000 tr_450600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450681, '东兴市', 'D', '107.97748898597', '21.55361543358', 450600, 3, 'tr_0 tr_450000 tr_450600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450802, '港北区', 'G', '109.57843298566', '23.117563632764', 450800, 3, 'tr_0 tr_450000 tr_450800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450803, '港南区', 'G', '109.6065534515', '23.08123957836', 450800, 3, 'tr_0 tr_450000 tr_450800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450804, '覃塘区', 'T', '109.45942672936', '23.133251089213', 450800, 3, 'tr_0 tr_450000 tr_450800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450821, '平南县', 'P', '110.39845197864', '23.545506098828', 450800, 3, 'tr_0 tr_450000 tr_450800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450881, '桂平市', 'G', '110.08552599672', '23.400048883699', 450800, 3, 'tr_0 tr_450000 tr_450800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450902, '玉州区', 'Y', '110.15743140022', '22.634492736172', 450900, 3, 'tr_0 tr_450000 tr_450900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450903, '福绵区', 'F', '110.08853765577', '22.563705412249', 450900, 3, 'tr_0 tr_450000 tr_450900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450921, '容县', 'R', '110.56453016229', '22.863665599935', 450900, 3, 'tr_0 tr_450000 tr_450900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450922, '陆川县', 'L', '110.27045619945', '22.327221527769', 450900, 3, 'tr_0 tr_450000 tr_450900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450923, '博白县', 'B', '109.98255305648', '22.278674815493', 450900, 3, 'tr_0 tr_450000 tr_450900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450924, '兴业县', 'X', '109.88155180701', '22.742267653423', 450900, 3, 'tr_0 tr_450000 tr_450900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450981, '北流市', 'B', '110.36057016581', '22.713958021611', 450900, 3, 'tr_0 tr_450000 tr_450900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451002, '右江区', 'Y', '106.62558913969', '23.907084503109', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451021, '田阳县', 'T', '106.9214125525', '23.742005722478', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451022, '田东县', 'T', '107.13249943541', '23.603129804015', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451023, '平果县', 'P', '107.59657106849', '23.334922742592', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451024, '德保县', 'D', '106.62158260728', '23.328994351286', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451026, '那坡县', 'N', '105.83942261017', '23.393793831292', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451027, '凌云县', 'L', '106.56841567705', '24.354015240604', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451028, '乐业县', 'L', '106.56342972215', '24.783216467053', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451029, '田林县', 'T', '106.23449791231', '24.300534611051', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451030, '西林县', 'X', '105.10049410469', '24.495667790362', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451031, '隆林各族自治县', 'L', '105.3504594704', '24.776813610296', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451081, '靖西市', 'J', '106.42445269708', '23.140125669019', 451000, 3, 'tr_0 tr_450000 tr_451000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451102, '八步区', 'B', '111.55856737149', '24.417531040919', 451100, 3, 'tr_0 tr_450000 tr_451100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451103, '平桂区', 'P', '111.47841426578', '24.462001422773', 451100, 3, 'tr_0 tr_450000 tr_451100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451121, '昭平县', 'Z', '110.81757491928', '24.175106050636', 451100, 3, 'tr_0 tr_450000 tr_451100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451122, '钟山县', 'Z', '111.30958574015', '24.531673107939', 451100, 3, 'tr_0 tr_450000 tr_451100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451123, '富川瑶族自治县', 'F', '111.28451124863', '24.820159951323', 451100, 3, 'tr_0 tr_450000 tr_451100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451202, '金城江区', 'J', '108.04350707483', '24.695679382239', 451200, 3, 'tr_0 tr_450000 tr_451200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451203, '宜州区', 'Y', '108.64353158748', '24.491084367739', 451200, 3, 'tr_0 tr_450000 tr_451200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451221, '南丹县', 'N', '107.54748028934', '24.981849775485', 451200, 3, 'tr_0 tr_450000 tr_451200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451222, '天峨县', 'T', '107.17845647579', '25.005664155232', 451200, 3, 'tr_0 tr_450000 tr_451200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451223, '凤山县', 'F', '107.04841983631', '24.553217796777', 451200, 3, 'tr_0 tr_450000 tr_451200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451224, '东兰县', 'D', '107.3805041595', '24.516871463381', 451200, 3, 'tr_0 tr_450000 tr_451200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451225, '罗城仫佬族自治县', 'L', '108.91157445325', '24.783084996429', 451200, 3, 'tr_0 tr_450000 tr_451200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451226, '环江毛南族自治县', 'H', '108.26444306917', '24.832087938551', 451200, 3, 'tr_0 tr_450000 tr_451200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451227, '巴马瑶族自治县', 'B', '107.26648125302', '24.14726480427', 451200, 3, 'tr_0 tr_450000 tr_451200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451228, '都安瑶族自治县', 'D', '108.11145804765', '23.937331261923', 451200, 3, 'tr_0 tr_450000 tr_451200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451229, '大化瑶族自治县', 'D', '108.00441075294', '23.742818222963', 451200, 3, 'tr_0 tr_450000 tr_451200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451302, '兴宾区', 'X', '109.24149907034', '23.733211038144', 451300, 3, 'tr_0 tr_450000 tr_451300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451321, '忻城县', 'X', '108.67256239612', '24.071888636576', 451300, 3, 'tr_0 tr_450000 tr_451300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451322, '象州县', 'X', '109.71146215028', '23.979680993271', 451300, 3, 'tr_0 tr_450000 tr_451300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451323, '武宣县', 'W', '109.66944220328', '23.600404197633', 451300, 3, 'tr_0 tr_450000 tr_451300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451324, '金秀瑶族自治县', 'J', '110.19550625891', '24.136319486486', 451300, 3, 'tr_0 tr_450000 tr_451300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451381, '合山市', 'H', '108.89256576969', '23.81226007105', 451300, 3, 'tr_0 tr_450000 tr_451300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451402, '江州区', 'J', '107.35953321738', '22.411245728018', 451400, 3, 'tr_0 tr_450000 tr_451400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451421, '扶绥县', 'F', '107.91046515426', '22.641097136345', 451400, 3, 'tr_0 tr_450000 tr_451400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451422, '宁明县', 'N', '107.08352381902', '22.145884844184', 451400, 3, 'tr_0 tr_450000 tr_451400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451423, '龙州县', 'L', '106.86058190847', '22.348298905766', 451400, 3, 'tr_0 tr_450000 tr_451400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451424, '大新县', 'D', '107.20755690312', '22.836229044406', 451400, 3, 'tr_0 tr_450000 tr_451400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451425, '天等县', 'T', '107.14947264852', '23.08750581209', 451400, 3, 'tr_0 tr_450000 tr_451400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (451481, '凭祥市', 'P', '106.77352361814', '22.100152592954', 451400, 3, 'tr_0 tr_450000 tr_451400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460105, '秀英区', 'X', '110.30043588821', '20.013642385161', 460100, 3, 'tr_0 tr_460000 tr_460100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460106, '龙华区', 'L', '110.33554112854', '20.036320733521', 460100, 3, 'tr_0 tr_460000 tr_460100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460107, '琼山区', 'Q', '110.36052605901', '20.009150644491', 460100, 3, 'tr_0 tr_460000 tr_460100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460108, '美兰区', 'M', '110.37349839904', '20.034646217625', 460100, 3, 'tr_0 tr_460000 tr_460100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460202, '海棠区', 'H', '109.72350007292', '18.33787879371', 460200, 3, 'tr_0 tr_460000 tr_460200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460203, '吉阳区', 'J', '109.52055165827', '18.257057667262', 460200, 3, 'tr_0 tr_460000 tr_460200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460204, '天涯区', 'T', '109.46246255283', '18.306919633503', 460200, 3, 'tr_0 tr_460000 tr_460200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460205, '崖州区', 'Y', '109.22846124383', '18.44463053478', 460200, 3, 'tr_0 tr_460000 tr_460200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460321, '西沙群岛', 'X', '111.67308686126', '16.497085431044', 460300, 3, 'tr_0 tr_460000 tr_460300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460322, '南沙群岛', 'N', '112.66030170907', '4.9743661921368', 460300, 3, 'tr_0 tr_460000 tr_460300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460323, '中沙群岛的岛礁及其海域', 'Z', '112.34048204137', '16.838953334409', 460300, 3, 'tr_0 tr_460000 tr_460300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400100, '那大镇', 'N', '109.552961497', '19.52127763772', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400101, '和庆镇', 'H', '109.64738779153', '19.531275426074', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400102, '南丰镇', 'N', '109.6054369934', '19.346095790543', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400103, '大成镇', 'D', '109.42116531507', '19.548276240672', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400104, '雅星镇', 'Y', '109.19716320191', '19.517956948407', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400105, '兰洋镇', 'L', '109.67367138789', '19.466430878427', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400106, '光村镇', 'G', '109.50795789562', '19.809145677126', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400107, '木棠镇', 'M', '109.35673473687', '19.809926770596', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400108, '海头镇', 'H', '108.95966166166', '19.509695855917', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400109, '峨蔓镇', 'E', '109.30390924357', '19.863144800976', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400111, '王五镇', 'W', '109.33806829512', '19.645800769747', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400112, '白马井镇', 'B', '109.58745583569', '19.527146110044', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400113, '中和镇', 'Z', '109.35613533713', '19.749465537088', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400114, '排浦镇', 'P', '109.16975400269', '19.644673698003', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400115, '东成镇', 'D', '109.4680333127', '19.709924104042', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400116, '新州镇', 'X', '109.32260133284', '19.720234743232', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400499, '洋浦经济开发区', 'Y', '109.19229656623', '19.775218244804', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (460400500, '华南热作学院', 'H', '109.58745583569', '19.527146110044', 460400, 3, 'tr_0 tr_460000 tr_460400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469001, '五指山市', 'W', '109.52354032071', '18.780994100706', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469002, '琼海市', 'Q', '110.48054452595', '19.264254019918', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469005, '文昌市', 'W', '110.80450870632', '19.549062083121', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469006, '万宁市', 'W', '110.39943436555', '18.800106988303', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469007, '东方市', 'D', '108.65856652679', '19.101104731289', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469021, '定安县', 'D', '104.36878601078', '31.589181642776', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469022, '屯昌县', 'T', '110.10857732457', '19.357374924278', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469023, '澄迈县', 'C', '110.01351091011', '19.744348671646', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469024, '临高县', 'L', '109.69744301483', '19.919474770278', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469025, '白沙黎族自治县', 'B', '109.45747066911', '19.231378733013', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469026, '昌江黎族自治县', 'C', '109.06246408734', '19.303997876684', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469027, '乐东黎族自治县', 'L', '109.18050798895', '18.755871493855', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469028, '陵水黎族自治县', 'L', '110.04446409255', '18.512331595699', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469029, '保亭黎族苗族自治县', 'B', '109.7034815143', '18.646909955376', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (469030, '琼中黎族苗族自治县', 'Q', '109.84451062847', '19.039163789181', 469000, 3, 'tr_0 tr_460000 tr_469000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500101, '万州区', 'W', '108.4155583705', '30.813621636708', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500102, '涪陵区', 'F', '107.39641979754', '29.709278197979', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500103, '渝中区', 'Y', '106.57544006681', '29.559090182994', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500104, '大渡口区', 'D', '106.48853359011', '29.490107128556', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500105, '江北区', 'J', '112.85530302042', '35.520558754673', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500106, '沙坪坝区', 'S', '106.46446511093', '29.547192516541', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500107, '九龙坡区', 'J', '106.51755873943', '29.507927715553', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500108, '南岸区', 'N', '106.6684297786', '29.502683098835', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500109, '北碚区', 'B', '106.40356933975', '29.811602753904', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500110, '綦江区', 'Q', '106.65748419545', '29.034113748311', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500111, '大足区', 'D', '105.72840462545', '29.713113506077', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500112, '渝北区', 'Y', '106.6375590606', '29.723927343007', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500113, '巴南区', 'B', '106.54745425696', '29.40847473977', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500114, '黔江区', 'Q', '108.77759119835', '29.53881256766', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500115, '长寿区', 'Z', '107.08753107007', '29.863520067323', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500116, '江津区', 'J', '106.26559760838', '29.295884374465', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500117, '合川区', 'H', '106.28254108758', '29.978181239534', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500118, '永川区', 'Y', '105.93349936145', '29.362046335949', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500119, '南川区', 'N', '107.10558512437', '29.163478599606', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500120, '璧山区', 'B', '106.23347456267', '29.598346607316', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500151, '铜梁区', 'T', '106.06344949411', '29.850508778722', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500152, '潼南区', 'T', '105.84739903617', '30.197314239664', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500153, '荣昌区', 'R', '105.60141979928', '29.41130739669', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500154, '开州区', 'K', '108.39949765612', '31.166644113193', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500155, '梁平区', 'L', '107.77609725763', '30.660553255023', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500156, '武隆区', 'W', '112.85530302042', '35.520558754673', 500100, 3, 'tr_0 tr_500000 tr_500100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500229, '城口县', 'C', '108.67161164256', '31.953390746293', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500230, '丰都县', 'F', '107.7374806182', '29.869412789214', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500231, '垫江县', 'D', '107.33956587472', '30.3332939685', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500233, '忠县', 'Z', '', '', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500235, '云阳县', 'Y', '108.7034475', '30.936611271975', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500236, '奉节县', 'F', '109.47047275631', '31.024601766549', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500237, '巫山县', 'W', '109.88554550703', '31.080518811736', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500238, '巫溪县', 'W', '109.576402559', '31.404880009858', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500240, '石柱土家族自治县', 'S', '108.12041416638', '30.006108697869', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500241, '秀山土家族苗族自治县', 'X', '109.01357389981', '28.453447864286', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500242, '酉阳土家族苗族自治县', 'Y', '108.7745860071', '28.847040258674', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (500243, '彭水苗族土家族自治县', 'P', '108.17257803588', '29.299462290443', 500200, 3, 'tr_0 tr_500000 tr_500200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510104, '锦江区', 'J', '104.0895617566', '30.661904490317', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510105, '青羊区', 'Q', '104.06744547494', '30.680037807007', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510106, '金牛区', 'J', '104.05740358714', '30.697356042874', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510107, '武侯区', 'W', '104.04942447828', '30.648712685321', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510108, '成华区', 'C', '104.10859155035', '30.665589283983', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510112, '龙泉驿区', 'L', '104.28139696436', '30.562697841', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510113, '青白江区', 'Q', '104.25751245813', '30.884421372736', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510114, '新都区', 'X', '104.16539284504', '30.829407468191', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510115, '温江区', 'W', '103.86357306318', '30.688486836627', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510116, '双流区', 'S', '103.93039154227', '30.580399352821', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510117, '郫都区', 'P', '103.90544568809', '30.799537653573', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510121, '金堂县', 'J', '104.41844263262', '30.868358423946', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510129, '大邑县', 'D', '103.52752981767', '30.593155402402', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510131, '蒲江县', 'P', '103.51257132415', '30.202500428139', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510132, '新津县', 'X', '103.81743303795', '30.416363953297', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510181, '都江堰市', 'D', '103.65353360443', '30.994256893542', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510182, '彭州市', 'P', '103.96556137078', '30.995564002629', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510183, '邛崃市', 'Q', '103.47048112964', '30.416398600854', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510184, '崇州市', 'C', '103.67943336923', '30.636595891379', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510185, '简阳市', 'J', '104.55349406265', '30.417451491353', 510100, 3, 'tr_0 tr_510000 tr_510100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510302, '自流井区', 'Z', '104.7834473259', '29.343498562348', 510300, 3, 'tr_0 tr_510000 tr_510300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510303, '贡井区', 'G', '104.72155659154', '29.351476269522', 510300, 3, 'tr_0 tr_510000 tr_510300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510304, '大安区', 'D', '104.78041635328', '29.369928541322', 510300, 3, 'tr_0 tr_510000 tr_510300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510311, '沿滩区', 'Y', '104.88040907516', '29.278797205251', 510300, 3, 'tr_0 tr_510000 tr_510300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510321, '荣县', 'R', '104.42345759121', '29.45180089858', 510300, 3, 'tr_0 tr_510000 tr_510300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510322, '富顺县', 'F', '104.98149440603', '29.186886257831', 510300, 3, 'tr_0 tr_510000 tr_510300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510402, '东区', 'D', '101.72554117091', '26.588033173333', 510400, 3, 'tr_0 tr_510000 tr_510400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510403, '西区', 'X', '101.72554117091', '26.588033173333', 510400, 3, 'tr_0 tr_510000 tr_510400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510411, '仁和区', 'R', '101.74444996291', '26.504019493295', 510400, 3, 'tr_0 tr_510000 tr_510400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510421, '米易县', 'M', '102.1164404304', '26.89696797612', 510400, 3, 'tr_0 tr_510000 tr_510400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510422, '盐边县', 'Y', '101.86049854831', '26.688767481964', 510400, 3, 'tr_0 tr_510000 tr_510400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510502, '江阳区', 'J', '105.44154513382', '28.884671972905', 510500, 3, 'tr_0 tr_510000 tr_510500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510503, '纳溪区', 'N', '105.37740854586', '28.779359901658', 510500, 3, 'tr_0 tr_510000 tr_510500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510504, '龙马潭区', 'L', '105.4445442166', '28.919012274486', 510500, 3, 'tr_0 tr_510000 tr_510500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510521, '泸县', 'L', '105.38845608667', '29.157626295708', 510500, 3, 'tr_0 tr_510000 tr_510500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510522, '合江县', 'H', '105.83843195885', '28.81779304284', 510500, 3, 'tr_0 tr_510000 tr_510500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510524, '叙永县', 'X', '105.45150761142', '28.161714341911', 510500, 3, 'tr_0 tr_510000 tr_510500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510525, '古蔺县', 'G', '105.81947079565', '28.044745368759', 510500, 3, 'tr_0 tr_510000 tr_510500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510603, '旌阳区', 'J', '104.42343882821', '31.148596291553', 510600, 3, 'tr_0 tr_510000 tr_510600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510604, '罗江区', 'L', '104.51741416083', '31.324178639826', 510600, 3, 'tr_0 tr_510000 tr_510600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510623, '中江县', 'Z', '104.68553015058', '31.038953695302', 510600, 3, 'tr_0 tr_510000 tr_510600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510681, '广汉市', 'G', '104.28842189311', '30.982415239743', 510600, 3, 'tr_0 tr_510000 tr_510600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510682, '什邡市', 'S', '104.17442710355', '31.132889048238', 510600, 3, 'tr_0 tr_510000 tr_510600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510683, '绵竹市', 'M', '104.227609305', '31.343592258211', 510600, 3, 'tr_0 tr_510000 tr_510600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510703, '涪城区', 'F', '104.76342033491', '31.46131438858', 510700, 3, 'tr_0 tr_510000 tr_510700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510704, '游仙区', 'Y', '104.77242899171', '31.479904474058', 510700, 3, 'tr_0 tr_510000 tr_510700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510705, '安州区', 'A', '104.5735550213', '31.540750527876', 510700, 3, 'tr_0 tr_510000 tr_510700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510722, '三台县', 'S', '105.10148979833', '31.101585571238', 510700, 3, 'tr_0 tr_510000 tr_510700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510723, '盐亭县', 'Y', '105.39550321547', '31.214318764837', 510700, 3, 'tr_0 tr_510000 tr_510700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510725, '梓潼县', 'Z', '105.17756684281', '31.648313467681', 510700, 3, 'tr_0 tr_510000 tr_510700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510726, '北川羌族自治县', 'B', '104.36158555316', '31.963084103415', 510700, 3, 'tr_0 tr_510000 tr_510700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510727, '平武县', 'P', '104.53542150325', '32.414681977696', 510700, 3, 'tr_0 tr_510000 tr_510700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510781, '江油市', 'J', '104.75241160088', '31.784128193388', 510700, 3, 'tr_0 tr_510000 tr_510700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510802, '利州区', 'L', '105.85242622329', '32.440207812726', 510800, 3, 'tr_0 tr_510000 tr_510800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510811, '昭化区', 'Z', '105.96941892782', '32.329618490159', 510800, 3, 'tr_0 tr_510000 tr_510800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510812, '朝天区', 'C', '105.8965888086', '32.649726240308', 510800, 3, 'tr_0 tr_510000 tr_510800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'); +INSERT INTO hg_sys_provinces (id, title, pinyin, lng, lat, pid, level, tree, sort, status, created_at, updated_at) VALUES + (510821, '旺苍县', 'W', '106.29649124536', '32.235097383079', 510800, 3, 'tr_0 tr_510000 tr_510800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510822, '青川县', 'Q', '105.24540705459', '32.5816168573', 510800, 3, 'tr_0 tr_510000 tr_510800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510823, '剑阁县', 'J', '105.53157601887', '32.293478516773', 510800, 3, 'tr_0 tr_510000 tr_510800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510824, '苍溪县', 'C', '105.9414826146', '31.738684400617', 510800, 3, 'tr_0 tr_510000 tr_510800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510903, '船山区', 'C', '105.5745228375', '30.531470607829', 510900, 3, 'tr_0 tr_510000 tr_510900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510904, '安居区', 'A', '105.46246730988', '30.361496469746', 510900, 3, 'tr_0 tr_510000 tr_510900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510921, '蓬溪县', 'P', '105.71344605411', '30.763751441791', 510900, 3, 'tr_0 tr_510000 tr_510900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510922, '射洪县', 'S', '105.39450950992', '30.877138522337', 510900, 3, 'tr_0 tr_510000 tr_510900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (510923, '大英县', 'D', '105.24340392313', '30.600810129921', 510900, 3, 'tr_0 tr_510000 tr_510900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511002, '市中区', 'S', '105.07457421786', '29.592710148736', 511000, 3, 'tr_0 tr_510000 tr_511000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511011, '东兴区', 'D', '105.08254748773', '29.598485728583', 511000, 3, 'tr_0 tr_510000 tr_511000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511024, '威远县', 'W', '104.6744982286', '29.533634931412', 511000, 3, 'tr_0 tr_510000 tr_511000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511025, '资中县', 'Z', '104.85849482242', '29.770234032565', 511000, 3, 'tr_0 tr_510000 tr_511000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511071, '内江经济开发区', 'N', '105.064588025', '29.58588653832', 511000, 3, 'tr_0 tr_510000 tr_511000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511083, '隆昌市', 'L', '105.29457175243', '29.345244662083', 511000, 3, 'tr_0 tr_510000 tr_511000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511102, '市中区', 'S', '103.76755865552', '29.561363941633', 511100, 3, 'tr_0 tr_510000 tr_511100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511111, '沙湾区', 'S', '103.55643566073', '29.419272499245', 511100, 3, 'tr_0 tr_510000 tr_511100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511112, '五通桥区', 'W', '103.82445508074', '29.413185014439', 511100, 3, 'tr_0 tr_510000 tr_511100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511113, '金口河区', 'J', '103.08539389554', '29.250803570124', 511100, 3, 'tr_0 tr_510000 tr_511100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511123, '犍为县', '', '', '', 511100, 3, 'tr_0 tr_510000 tr_511100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511124, '井研县', 'J', '104.07651071353', '29.65730305908', 511100, 3, 'tr_0 tr_510000 tr_511100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511126, '夹江县', 'J', '103.57841009994', '29.743846302985', 511100, 3, 'tr_0 tr_510000 tr_511100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511129, '沐川县', 'M', '103.90846703743', '28.962888278216', 511100, 3, 'tr_0 tr_510000 tr_511100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511132, '峨边彝族自治县', 'E', '103.26857725338', '29.236089109563', 511100, 3, 'tr_0 tr_510000 tr_511100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511133, '马边彝族自治县', 'M', '103.55245419105', '28.841736014812', 511100, 3, 'tr_0 tr_510000 tr_511100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511181, '峨眉山市', 'E', '103.4915455741', '29.606975527462', 511100, 3, 'tr_0 tr_510000 tr_511100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511302, '顺庆区', 'S', '106.09841065838', '30.802753098595', 511300, 3, 'tr_0 tr_510000 tr_511300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511303, '高坪区', 'G', '106.12554047291', '30.787254931592', 511300, 3, 'tr_0 tr_510000 tr_511300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511304, '嘉陵区', 'J', '106.07843297265', '30.764895560139', 511300, 3, 'tr_0 tr_510000 tr_511300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511321, '南部县', 'N', '106.04357826971', '31.353705301526', 511300, 3, 'tr_0 tr_510000 tr_511300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511322, '营山县', 'Y', '106.57240802852', '31.083002970199', 511300, 3, 'tr_0 tr_510000 tr_511300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511323, '蓬安县', 'P', '106.41848194209', '31.034630778271', 511300, 3, 'tr_0 tr_510000 tr_511300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511324, '仪陇县', 'Y', '106.30943016844', '31.277597359981', 511300, 3, 'tr_0 tr_510000 tr_511300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511325, '西充县', 'X', '105.90761137653', '31.000688020792', 511300, 3, 'tr_0 tr_510000 tr_511300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511381, '阆中市', 'L', '106.01156526642', '31.56407455364', 511300, 3, 'tr_0 tr_510000 tr_511300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511402, '东坡区', 'D', '103.83852480217', '30.048272134435', 511400, 3, 'tr_0 tr_510000 tr_511400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511403, '彭山区', 'P', '103.87955823007', '30.19885441686', 511400, 3, 'tr_0 tr_510000 tr_511400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511421, '仁寿县', 'R', '104.14047690443', '30.001663984301', 511400, 3, 'tr_0 tr_510000 tr_511400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511423, '洪雅县', 'H', '103.37960224488', '29.910615837469', 511400, 3, 'tr_0 tr_510000 tr_511400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511424, '丹棱县', 'D', '103.51958331729', '30.020362794872', 511400, 3, 'tr_0 tr_510000 tr_511400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511425, '青神县', 'Q', '103.85355883179', '29.837054743717', 511400, 3, 'tr_0 tr_510000 tr_511400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511502, '翠屏区', 'C', '104.62643798553', '28.772051773027', 511500, 3, 'tr_0 tr_510000 tr_511500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511503, '南溪区', 'N', '104.97651330198', '28.851503648027', 511500, 3, 'tr_0 tr_510000 tr_511500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511504, '叙州区', 'X', '104.53944275624', '28.696246394752', 511500, 3, 'tr_0 tr_510000 tr_511500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511523, '江安县', 'J', '105.07359488519', '28.729609721855', 511500, 3, 'tr_0 tr_510000 tr_511500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511524, '长宁县', 'Z', '104.92756445509', '28.588133452699', 511500, 3, 'tr_0 tr_510000 tr_511500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511525, '高县', 'G', '104.52441132032', '28.442510804102', 511500, 3, 'tr_0 tr_510000 tr_511500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511526, '珙县', 'G', '104.71557459549', '28.444319765248', 511500, 3, 'tr_0 tr_510000 tr_511500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511527, '筠连县', 'Y', '104.51740642378', '28.170174457648', 511500, 3, 'tr_0 tr_510000 tr_511500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511528, '兴文县', 'X', '105.24240230064', '28.309904884117', 511500, 3, 'tr_0 tr_510000 tr_511500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511529, '屏山县', 'P', '104.35267533908', '28.834274966477', 511500, 3, 'tr_0 tr_510000 tr_511500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511602, '广安区', 'G', '106.64853115608', '30.479768100142', 511600, 3, 'tr_0 tr_510000 tr_511600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511603, '前锋区', 'Q', '106.90447959588', '30.506435157767', 511600, 3, 'tr_0 tr_510000 tr_511600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511621, '岳池县', 'Y', '106.44641061972', '30.54411986458', 511600, 3, 'tr_0 tr_510000 tr_511600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511622, '武胜县', 'W', '106.3024617431', '30.355495660378', 511600, 3, 'tr_0 tr_510000 tr_511600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511623, '邻水县', 'L', '106.93640258896', '30.341072518332', 511600, 3, 'tr_0 tr_510000 tr_511600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511681, '华蓥市', 'H', '106.78946181601', '30.396307084289', 511600, 3, 'tr_0 tr_510000 tr_511600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511702, '通川区', 'T', '107.51144711201', '31.220931804105', 511700, 3, 'tr_0 tr_510000 tr_511700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511703, '达川区', 'D', '107.51841059667', '31.202393360554', 511700, 3, 'tr_0 tr_510000 tr_511700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511722, '宣汉县', 'X', '107.7335335663', '31.359754823662', 511700, 3, 'tr_0 tr_510000 tr_511700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511723, '开江县', 'K', '107.87542487414', '31.089372149066', 511700, 3, 'tr_0 tr_510000 tr_511700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511724, '大竹县', 'D', '107.21157970735', '30.74207661791', 511700, 3, 'tr_0 tr_510000 tr_511700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511725, '渠县', 'Q', '106.97958296702', '30.842299283481', 511700, 3, 'tr_0 tr_510000 tr_511700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511771, '达州经济开发区', 'D', '107.47459385898', '31.214307723927', 511700, 3, 'tr_0 tr_510000 tr_511700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511781, '万源市', 'W', '108.04154069684', '32.087420847789', 511700, 3, 'tr_0 tr_510000 tr_511700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511802, '雨城区', 'Y', '103.03957520533', '30.011061644393', 511800, 3, 'tr_0 tr_510000 tr_511800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511803, '名山区', 'M', '103.1154857938', '30.075913663382', 511800, 3, 'tr_0 tr_510000 tr_511800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511822, '荥经县', 'X', '102.85343551293', '29.799193512656', 511800, 3, 'tr_0 tr_510000 tr_511800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511823, '汉源县', 'H', '102.65857589024', '29.350217385987', 511800, 3, 'tr_0 tr_510000 tr_511800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511824, '石棉县', 'S', '102.36640453848', '29.23430487759', 511800, 3, 'tr_0 tr_510000 tr_511800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511825, '天全县', 'T', '102.76453022767', '30.072472953275', 511800, 3, 'tr_0 tr_510000 tr_511800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511826, '芦山县', 'L', '102.93452771831', '30.149873189563', 511800, 3, 'tr_0 tr_510000 tr_511800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511827, '宝兴县', 'B', '102.82148423429', '30.374082112445', 511800, 3, 'tr_0 tr_510000 tr_511800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511902, '巴州区', 'B', '106.77551310771', '31.857685602645', 511900, 3, 'tr_0 tr_510000 tr_511900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511903, '恩阳区', 'E', '106.63558190249', '31.802614044176', 511900, 3, 'tr_0 tr_510000 tr_511900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511921, '通江县', 'T', '107.25151684321', '31.917714346881', 511900, 3, 'tr_0 tr_510000 tr_511900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511922, '南江县', 'N', '106.83448345088', '32.352531654165', 511900, 3, 'tr_0 tr_510000 tr_511900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511923, '平昌县', 'P', '107.11059310023', '31.566185810095', 511900, 3, 'tr_0 tr_510000 tr_511900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (511971, '巴中经济开发区', 'B', '106.75158530316', '31.872888585957', 511900, 3, 'tr_0 tr_510000 tr_511900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (512002, '雁江区', 'Y', '104.65842441063', '30.123753456785', 512000, 3, 'tr_0 tr_510000 tr_512000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (512021, '安岳县', 'A', '105.34245423273', '30.103392734494', 512000, 3, 'tr_0 tr_510000 tr_512000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (512022, '乐至县', 'L', '105.02747697007', '30.282348346', 512000, 3, 'tr_0 tr_510000 tr_512000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513201, '马尔康市', 'M', '102.21350208208', '31.911747955648', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513221, '汶川县', 'W', '103.59651788422', '31.483005320468', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513222, '理县', 'L', '102.23141546175', '31.905511577267', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513223, '茂县', 'M', '102.23141546175', '31.905511577267', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513224, '松潘县', 'S', '103.61057968918', '32.661796559853', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513225, '九寨沟县', 'J', '104.24954673403', '33.257591509496', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513226, '金川县', 'J', '102.07061042122', '31.482005950337', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513227, '小金县', 'X', '102.36942635928', '31.002208697062', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513228, '黑水县', 'H', '102.99651735613', '32.067805449368', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513230, '壤塘县', 'R', '100.98558348726', '32.271093316269', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513231, '阿坝县', 'A', '101.71360970816', '32.908220918625', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513232, '若尔盖县', 'R', '102.97439065413', '33.584376654702', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513233, '红原县', 'H', '102.55061520946', '32.796605278762', 513200, 3, 'tr_0 tr_510000 tr_513200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513301, '康定市', 'K', '101.96355522139', '30.004407384262', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513322, '泸定县', 'L', '102.24143209631', '29.920401664951', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513323, '丹巴县', 'D', '101.89643706759', '30.88476979933', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513324, '九龙县', 'J', '101.51341566718', '29.006431902925', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513325, '雅江县', 'Y', '101.02050035294', '30.037568967864', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513326, '道孚县', 'D', '101.13154034619', '30.985326277402', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513327, '炉霍县', 'L', '100.68239693357', '31.397991882882', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513328, '甘孜县', 'G', '99.999210350851', '31.628956694034', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513329, '新龙县', 'X', '100.31839824093', '30.945469525266', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513330, '德格县', 'D', '98.587401611354', '31.812106494713', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513331, '白玉县', 'B', '98.83110021824', '31.215314448788', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513332, '石渠县', 'S', '98.109480622408', '32.984003420478', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513333, '色达县', 'S', '100.33941364918', '32.274330413227', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513334, '理塘县', 'L', '100.27557457998', '30.000030621751', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513335, '巴塘县', 'B', '99.11672669582', '30.011661707376', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513336, '乡城县', 'X', '99.805059570922', '28.936733475224', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513337, '稻城县', 'D', '100.3044615597', '29.043121558126', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513338, '得荣县', 'D', '99.292984198181', '28.718780051461', 513300, 3, 'tr_0 tr_510000 tr_513300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513401, '西昌市', 'X', '102.27148382917', '27.900580896264', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513422, '木里藏族自治县', 'M', '101.28639697674', '27.93459855924', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513423, '盐源县', 'Y', '101.51542912915', '27.428154867741', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513424, '德昌县', 'D', '102.18259551085', '27.408504192994', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513425, '会理县', 'H', '102.25143634511', '26.661199778427', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513426, '会东县', 'H', '102.5844621823', '26.640823775829', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513427, '宁南县', 'N', '102.76252636654', '27.064605070116', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513428, '普格县', 'P', '102.54659671863', '27.381996213807', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513429, '布拖县', 'B', '102.818478493', '27.7121287338', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513430, '金阳县', 'J', '103.25454895521', '27.702144511749', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513431, '昭觉县', 'Z', '102.84942278222', '28.020506268006', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513432, '喜德县', 'X', '102.41956715684', '28.312709832521', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513433, '冕宁县', 'M', '102.18357457402', '28.55529444536', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513434, '越西县', 'Y', '102.5144744814', '28.645827564326', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513435, '甘洛县', 'G', '102.77859651312', '28.9648231905', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513436, '美姑县', 'M', '103.13858579866', '28.33401962389', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (513437, '雷波县', 'L', '103.57842869486', '28.268950617624', 513400, 3, 'tr_0 tr_510000 tr_513400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520102, '南明区', 'N', '106.72052763544', '26.574336181539', 520100, 3, 'tr_0 tr_520000 tr_520100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520103, '云岩区', 'Y', '106.73053475882', '26.610381076426', 520100, 3, 'tr_0 tr_520000 tr_520100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520111, '花溪区', 'H', '106.6764407773', '26.41587945643', 520100, 3, 'tr_0 tr_520000 tr_520100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520112, '乌当区', 'W', '106.75755803432', '26.636529135598', 520100, 3, 'tr_0 tr_520000 tr_520100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520113, '白云区', 'B', '106.62959683989', '26.683588499124', 520100, 3, 'tr_0 tr_520000 tr_520100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520115, '观山湖区', 'G', '106.60953255751', '26.623894296899', 520100, 3, 'tr_0 tr_520000 tr_520100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520121, '开阳县', 'K', '106.97155955928', '27.063673573951', 520100, 3, 'tr_0 tr_520000 tr_520100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520122, '息烽县', 'X', '106.74756178044', '27.096475267062', 520100, 3, 'tr_0 tr_520000 tr_520100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520123, '修文县', 'X', '106.59849220314', '26.844862447594', 520100, 3, 'tr_0 tr_520000 tr_520100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520181, '清镇市', 'Q', '106.47752261032', '26.561987898479', 520100, 3, 'tr_0 tr_520000 tr_520100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520201, '钟山区', 'Z', '104.85052981696', '26.580704079622', 520200, 3, 'tr_0 tr_520000 tr_520200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520203, '六枝特区', 'L', '105.48342934686', '26.219214290638', 520200, 3, 'tr_0 tr_520000 tr_520200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520221, '水城县', 'S', '104.96456610819', '26.553719763692', 520200, 3, 'tr_0 tr_520000 tr_520200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520281, '盘州市', 'P', '104.47858183932', '25.715651258076', 520200, 3, 'tr_0 tr_520000 tr_520200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520302, '红花岗区', 'H', '106.90049658668', '27.650870260732', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520303, '汇川区', 'H', '106.94045752761', '27.756343380087', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520304, '播州区', 'B', '106.83650354793', '27.542500878', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520322, '桐梓县', 'T', '106.83248902061', '28.139468384162', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520323, '绥阳县', 'S', '107.19749228819', '27.953080005876', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520324, '正安县', 'Z', '107.4605748906', '28.55909172878', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520325, '道真仡佬族苗族自治县', 'D', '107.61948378781', '28.86864981438', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520326, '务川仡佬族苗族自治县', 'W', '107.90545629257', '28.569077110562', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520327, '凤冈县', 'F', '107.72354763025', '27.960695338965', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520328, '湄潭县', 'M', '107.47259853019', '27.75449836496', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520329, '余庆县', 'Y', '107.91146020728', '27.221379027997', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520330, '习水县', 'X', '106.20342803999', '28.339117886481', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520381, '赤水市', 'C', '105.70348859502', '28.596118908733', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520382, '仁怀市', 'R', '106.40752655518', '27.797752158543', 520300, 3, 'tr_0 tr_520000 tr_520300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450702, '钦南区', 'Q', '108.66454861267', '21.945972440989', 450700, 3, 'tr_0 tr_450000 tr_450700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450703, '钦北区', 'Q', '108.63851257493', '22.020367050196', 450700, 3, 'tr_0 tr_450000 tr_450700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450721, '灵山县', 'L', '109.29747796631', '22.422413326701', 450700, 3, 'tr_0 tr_450000 tr_450700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (450722, '浦北县', 'P', '109.5634229294', '22.277822326937', 450700, 3, 'tr_0 tr_450000 tr_450700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520402, '西秀区', 'X', '105.97240632053', '26.251497663244', 520400, 3, 'tr_0 tr_520000 tr_520400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520403, '平坝区', 'P', '106.26358378709', '26.411186471257', 520400, 3, 'tr_0 tr_520000 tr_520400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520422, '普定县', 'P', '105.74848570614', '26.308233451347', 520400, 3, 'tr_0 tr_520000 tr_520400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520423, '镇宁布依族苗族自治县', 'Z', '105.77658344485', '26.063829083032', 520400, 3, 'tr_0 tr_520000 tr_520400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520424, '关岭布依族苗族自治县', 'G', '105.62547597168', '25.949877045969', 520400, 3, 'tr_0 tr_520000 tr_520400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520425, '紫云苗族布依族自治县', 'Z', '106.09041375093', '25.757408728958', 520400, 3, 'tr_0 tr_520000 tr_520400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520502, '七星关区', 'Q', '105.31158071811', '27.304095223427', 520500, 3, 'tr_0 tr_520000 tr_520500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520521, '大方县', 'D', '105.61845131242', '27.147060750626', 520500, 3, 'tr_0 tr_520000 tr_520500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520522, '黔西县', 'Q', '106.03857397726', '27.014344747084', 520500, 3, 'tr_0 tr_520000 tr_520500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520523, '金沙县', 'J', '106.22644163901', '27.465354872614', 520500, 3, 'tr_0 tr_520000 tr_520500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520524, '织金县', 'Z', '105.77758954702', '26.669221885659', 520500, 3, 'tr_0 tr_520000 tr_520500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520525, '纳雍县', 'N', '105.38948662276', '26.783717229132', 520500, 3, 'tr_0 tr_520000 tr_520500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520526, '威宁彝族回族苗族自治县', 'W', '104.25948063398', '26.879247190553', 520500, 3, 'tr_0 tr_520000 tr_520500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520527, '赫章县', 'H', '104.73351582262', '27.129051675142', 520500, 3, 'tr_0 tr_520000 tr_520500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520602, '碧江区', 'B', '109.18743536171', '27.696773471802', 520600, 3, 'tr_0 tr_520000 tr_520600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520603, '万山区', 'W', '109.22045617394', '27.524647851983', 520600, 3, 'tr_0 tr_520000 tr_520600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520621, '江口县', 'J', '108.84540005924', '27.705921695043', 520600, 3, 'tr_0 tr_520000 tr_520600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520622, '玉屏侗族自治县', 'Y', '108.920563527', '27.248557881456', 520600, 3, 'tr_0 tr_520000 tr_520600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520623, '石阡县', 'S', '108.23046385479', '27.519722059758', 520600, 3, 'tr_0 tr_520000 tr_520600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520624, '思南县', 'S', '108.25941731933', '27.944547877977', 520600, 3, 'tr_0 tr_520000 tr_520600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520625, '印江土家族苗族自治县', 'Y', '108.41659167843', '27.999823251993', 520600, 3, 'tr_0 tr_520000 tr_520600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520626, '德江县', 'D', '108.1264110615', '28.270423278494', 520600, 3, 'tr_0 tr_520000 tr_520600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520627, '沿河土家族自治县', 'Y', '108.51047753979', '28.570101680095', 520600, 3, 'tr_0 tr_520000 tr_520600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (520628, '松桃苗族自治县', 'S', '109.20940351278', '28.160420179011', 520600, 3, 'tr_0 tr_520000 tr_520600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522301, '兴义市', 'X', '104.9024609483', '25.098113310297', 522300, 3, 'tr_0 tr_520000 tr_522300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522302, '兴仁市', 'X', '105.19256772452', '25.440898753576', 522300, 3, 'tr_0 tr_520000 tr_522300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522323, '普安县', 'P', '104.95954583802', '25.789951769129', 522300, 3, 'tr_0 tr_520000 tr_522300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522324, '晴隆县', 'Q', '105.22548361467', '25.841047900453', 522300, 3, 'tr_0 tr_520000 tr_522300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522325, '贞丰县', 'Z', '105.65655958807', '25.392123965341', 522300, 3, 'tr_0 tr_520000 tr_522300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522326, '望谟县', 'W', '106.10644455174', '25.18435492392', 522300, 3, 'tr_0 tr_520000 tr_522300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522327, '册亨县', 'C', '105.81851050706', '24.989637494252', 522300, 3, 'tr_0 tr_520000 tr_522300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522328, '安龙县', 'A', '105.44954274777', '25.103990431232', 522300, 3, 'tr_0 tr_520000 tr_522300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522601, '凯里市', 'K', '107.98944624078', '26.589702969826', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522622, '黄平县', 'H', '107.92354780622', '26.911288643101', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522623, '施秉县', 'S', '108.13043978205', '27.039822051733', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522624, '三穗县', 'S', '108.68154500207', '26.958666465246', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522625, '镇远县', 'Z', '108.43658077263', '27.054820913901', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522626, '岑巩县', 'C', '108.82248096196', '27.179902417394', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522627, '天柱县', 'T', '109.21444570161', '26.915804084012', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522628, '锦屏县', 'J', '109.20743846948', '26.682631631865', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522629, '剑河县', 'J', '108.44751710323', '26.734047558881', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522630, '台江县', 'T', '108.32855163', '26.672372539643', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522631, '黎平县', 'L', '109.14356697147', '26.236874050192', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522632, '榕江县', 'R', '108.52755369872', '25.93772537325', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522633, '从江县', 'C', '108.91156142782', '25.759881327892', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522634, '雷山县', 'L', '108.08452891457', '26.384205121689', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522635, '麻江县', 'M', '107.59555140191', '26.496807595584', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522636, '丹寨县', 'D', '107.79551348972', '26.204421169869', 522600, 3, 'tr_0 tr_520000 tr_522600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522701, '都匀市', 'D', '107.52540443144', '26.266117957789', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522702, '福泉市', 'F', '107.52643281158', '26.692525700784', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522722, '荔波县', 'L', '107.89340938687', '25.417097566273', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522723, '贵定县', 'G', '107.2405543594', '26.590659655039', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522725, '瓮安县', 'W', '107.47755223592', '27.084125602602', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522726, '独山县', 'D', '107.55149778107', '25.828287807074', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522727, '平塘县', 'P', '107.32956664388', '25.828201706902', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522728, '罗甸县', 'L', '106.75854805682', '25.430837682972', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522729, '长顺县', 'Z', '106.45842122163', '26.028454545714', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522730, '龙里县', 'L', '106.98658596469', '26.459080630642', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522731, '惠水县', 'H', '106.66345262709', '26.138209889396', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (522732, '三都水族自治县', 'S', '107.84263500353', '26.096765617985', 522700, 3, 'tr_0 tr_520000 tr_522700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530102, '五华区', 'W', '102.7134232806', '25.049834961981', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530103, '盘龙区', 'P', '102.7585262121', '25.12237227983', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530111, '官渡区', 'G', '102.7504817066', '25.021196423859', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530112, '西山区', 'X', '102.6715571235', '25.043198760947', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530113, '东川区', 'D', '103.19445186746', '26.089054237623', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530114, '呈贡区', 'C', '102.82747259726', '24.891871210947', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530115, '晋宁区', 'J', '102.60241805181', '24.676098812517', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530124, '富民县', 'F', '102.50447319701', '25.228085092195', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530125, '宜良县', 'Y', '103.14755798426', '24.925286989652', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530126, '石林彝族自治县', 'S', '103.29650817676', '24.77770196132', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530127, '嵩明县', 'S', '103.04356394016', '25.344409459135', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530128, '禄劝彝族苗族自治县', 'L', '102.47742324184', '25.55767180024', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530129, '寻甸回族彝族自治县', 'X', '103.26357387135', '25.563893580433', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530181, '安宁市', 'A', '102.48440918413', '24.925601726344', 530100, 3, 'tr_0 tr_530000 tr_530100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530302, '麒麟区', 'Q', '103.81143036949', '25.502101828437', 530300, 3, 'tr_0 tr_530000 tr_530300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530303, '沾益区', 'Z', '103.82848532841', '25.606630798868', 530300, 3, 'tr_0 tr_530000 tr_530300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530304, '马龙区', 'M', '103.58544688632', '25.433966374816', 530300, 3, 'tr_0 tr_530000 tr_530300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530322, '陆良县', 'L', '103.67343249743', '25.035639470439', 530300, 3, 'tr_0 tr_530000 tr_530300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530323, '师宗县', 'S', '103.99155634453', '24.827994969501', 530300, 3, 'tr_0 tr_530000 tr_530300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530324, '罗平县', 'L', '104.31551019438', '24.890519724895', 530300, 3, 'tr_0 tr_530000 tr_530300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530325, '富源县', 'F', '104.2614742434', '25.680279502133', 530300, 3, 'tr_0 tr_530000 tr_530300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530326, '会泽县', 'H', '103.30348729192', '26.424215045561', 530300, 3, 'tr_0 tr_530000 tr_530300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530381, '宣威市', 'X', '104.1115760691', '26.225598378324', 530300, 3, 'tr_0 tr_530000 tr_530300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530402, '红塔区', 'H', '102.55156461759', '24.359801443673', 530400, 3, 'tr_0 tr_530000 tr_530400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530403, '江川区', 'J', '102.76052700796', '24.293438700984', 530400, 3, 'tr_0 tr_530000 tr_530400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530422, '澄江县', 'C', '102.91455487235', '24.679414908816', 530400, 3, 'tr_0 tr_530000 tr_530400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530423, '通海县', 'T', '102.73242289128', '24.117891201574', 530400, 3, 'tr_0 tr_530000 tr_530400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530424, '华宁县', 'H', '102.93549185853', '24.198581027163', 530400, 3, 'tr_0 tr_530000 tr_530400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530425, '易门县', 'Y', '102.1695354962', '24.677404477592', 530400, 3, 'tr_0 tr_530000 tr_530400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530426, '峨山彝族自治县', 'E', '102.41256450607', '24.174774239093', 530400, 3, 'tr_0 tr_530000 tr_530400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530427, '新平彝族傣族自治县', 'X', '101.99642771261', '24.076262705278', 530400, 3, 'tr_0 tr_530000 tr_530400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530428, '元江哈尼族彝族傣族自治县', 'Y', '102.00441463673', '23.603000905475', 530400, 3, 'tr_0 tr_530000 tr_530400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530502, '隆阳区', 'L', '99.172070839289', '25.12688832219', 530500, 3, 'tr_0 tr_530000 tr_530500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530521, '施甸县', 'S', '99.195469362222', '24.728835000146', 530500, 3, 'tr_0 tr_530000 tr_530500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530523, '龙陵县', 'L', '98.695749912275', '24.592546947017', 530500, 3, 'tr_0 tr_530000 tr_530500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530524, '昌宁县', 'C', '99.611616576026', '24.833984919853', 530500, 3, 'tr_0 tr_530000 tr_530500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530581, '腾冲市', 'T', '98.497595035489', '25.026616860346', 530500, 3, 'tr_0 tr_530000 tr_530500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530602, '昭阳区', 'Z', '103.71347042315', '27.326144206053', 530600, 3, 'tr_0 tr_530000 tr_530600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530621, '鲁甸县', 'L', '103.5644121645', '27.193107219133', 530600, 3, 'tr_0 tr_530000 tr_530600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530622, '巧家县', 'Q', '102.93651934037', '26.914705038577', 530600, 3, 'tr_0 tr_530000 tr_530600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530623, '盐津县', 'Y', '104.24157884246', '28.114384038516', 530600, 3, 'tr_0 tr_530000 tr_530600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530624, '大关县', 'D', '103.89751489665', '27.754021401911', 530600, 3, 'tr_0 tr_530000 tr_530600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530625, '永善县', 'Y', '103.6445690431', '28.234722481383', 530600, 3, 'tr_0 tr_530000 tr_530600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530626, '绥江县', 'S', '103.9645523826', '28.604277931727', 530600, 3, 'tr_0 tr_530000 tr_530600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530627, '镇雄县', 'Z', '104.88040422431', '27.447794634649', 530600, 3, 'tr_0 tr_530000 tr_530600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530628, '彝良县', 'Y', '104.05444303021', '27.631690165547', 530600, 3, 'tr_0 tr_530000 tr_530600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530629, '威信县', 'W', '105.05557676311', '27.85253746404', 530600, 3, 'tr_0 tr_530000 tr_530600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530681, '水富市', 'S', '104.42243298394', '28.636106975262', 530600, 3, 'tr_0 tr_530000 tr_530600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530702, '古城区', 'G', '100.23248033921', '26.883161684001', 530700, 3, 'tr_0 tr_530000 tr_530700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530721, '玉龙纳西族自治县', 'Y', '100.24352734105', '26.827391803625', 530700, 3, 'tr_0 tr_530000 tr_530700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530722, '永胜县', 'Y', '100.75758141133', '26.689950245419', 530700, 3, 'tr_0 tr_530000 tr_530700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530723, '华坪县', 'H', '101.27243012268', '26.635223014622', 530700, 3, 'tr_0 tr_530000 tr_530700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530724, '宁蒗彝族自治县', 'N', '100.85859038623', '27.287727826052', 530700, 3, 'tr_0 tr_530000 tr_530700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530802, '思茅区', 'S', '100.98355510298', '22.79249798436', 530800, 3, 'tr_0 tr_530000 tr_530800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530821, '宁洱哈尼族彝族自治县', 'N', '101.05244246946', '23.054590179481', 530800, 3, 'tr_0 tr_530000 tr_530800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530822, '墨江哈尼族自治县', 'M', '101.69858356155', '23.437725772256', 530800, 3, 'tr_0 tr_530000 tr_530800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530823, '景东彝族自治县', 'J', '100.83848864452', '24.451863775495', 530800, 3, 'tr_0 tr_530000 tr_530800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530824, '景谷傣族彝族自治县', 'J', '100.7094565801', '23.503204071241', 530800, 3, 'tr_0 tr_530000 tr_530800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530825, '镇沅彝族哈尼族拉祜族自治县', 'Z', '101.11556882305', '24.010330833613', 530800, 3, 'tr_0 tr_530000 tr_530800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530826, '江城哈尼族彝族自治县', 'J', '101.86847918429', '22.59168385943', 530800, 3, 'tr_0 tr_530000 tr_530800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530827, '孟连傣族拉祜族佤族自治县', 'M', '99.590962825578', '22.335307615556', 530800, 3, 'tr_0 tr_530000 tr_530800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530828, '澜沧拉祜族自治县', 'L', '99.938588283239', '22.561831918087', 530800, 3, 'tr_0 tr_530000 tr_530800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530829, '西盟佤族自治县', 'X', '99.596622150289', '22.650656010974', 530800, 3, 'tr_0 tr_530000 tr_530800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530902, '临翔区', 'L', '100.0884425304', '23.901401938645', 530900, 3, 'tr_0 tr_530000 tr_530900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530921, '凤庆县', 'F', '99.934989222215', '24.586472458274', 530900, 3, 'tr_0 tr_530000 tr_530900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530922, '云县', 'Y', '100.12953102441', '24.442807275329', 530900, 3, 'tr_0 tr_530000 tr_530900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530923, '永德县', 'Y', '99.265075642606', '24.024871282777', 530900, 3, 'tr_0 tr_530000 tr_530900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530924, '镇康县', 'Z', '98.831871224123', '23.768315480096', 530900, 3, 'tr_0 tr_530000 tr_530900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530925, '双江拉祜族佤族布朗族傣族自治县', 'S', '99.834130982979', '23.479836504614', 530900, 3, 'tr_0 tr_530000 tr_530900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530926, '耿马傣族佤族自治县', 'G', '99.403942176092', '23.543490995101', 530900, 3, 'tr_0 tr_530000 tr_530900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (530927, '沧源佤族自治县', 'C', '99.252721696084', '23.152878733913', 530900, 3, 'tr_0 tr_530000 tr_530900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532301, '楚雄市', 'C', '101.55247228396', '25.038860388323', 532300, 3, 'tr_0 tr_530000 tr_532300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532322, '双柏县', 'S', '101.64840700053', '24.694898530382', 532300, 3, 'tr_0 tr_530000 tr_532300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532323, '牟定县', 'M', '101.55348099122', '25.318845903714', 532300, 3, 'tr_0 tr_530000 tr_532300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532324, '南华县', 'N', '101.28042055018', '25.198587071156', 532300, 3, 'tr_0 tr_530000 tr_532300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532325, '姚安县', 'Y', '101.2485272012', '25.509775443473', 532300, 3, 'tr_0 tr_530000 tr_532300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532326, '大姚县', 'D', '101.33056746713', '25.727600600572', 532300, 3, 'tr_0 tr_530000 tr_532300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532327, '永仁县', 'Y', '101.67249299667', '26.055565754521', 532300, 3, 'tr_0 tr_530000 tr_532300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532328, '元谋县', 'Y', '101.8804452425', '25.710895319939', 532300, 3, 'tr_0 tr_530000 tr_532300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532329, '武定县', 'W', '102.41053182037', '25.536089587807', 532300, 3, 'tr_0 tr_530000 tr_532300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532331, '禄丰县', 'L', '102.08553135476', '25.155830804806', 532300, 3, 'tr_0 tr_530000 tr_532300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532501, '个旧市', 'G', '103.16651860849', '23.364941534583', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532502, '开远市', 'K', '103.27355323709', '23.719907796912', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532503, '蒙自市', 'M', '103.37154588175', '23.402079885198', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532504, '弥勒市', 'M', '103.421489063', '24.417982225357', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532523, '屏边苗族自治县', 'P', '103.69343183232', '22.989989585513', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532524, '建水县', 'J', '102.83343959161', '23.640938563461', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532525, '石屏县', 'S', '102.50244661978', '23.712004452449', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532527, '泸西县', 'L', '103.77252314092', '24.53803716745', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532528, '元阳县', 'Y', '102.84143280386', '23.226198051926', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532529, '红河县', 'H', '102.42755057757', '23.374488738365', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532530, '金平苗族瑶族傣族自治县', 'J', '103.23246860579', '22.785560606183', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532531, '绿春县', 'L', '102.39849398755', '23.000164936586', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532532, '河口瑶族自治县', 'H', '103.9454436278', '22.535465602947', 532500, 3, 'tr_0 tr_530000 tr_532500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532601, '文山市', 'W', '104.23854382746', '23.391944131908', 532600, 3, 'tr_0 tr_530000 tr_532600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532622, '砚山县', 'Y', '104.3435508907', '23.6114865767', 532600, 3, 'tr_0 tr_530000 tr_532600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532623, '西畴县', 'X', '104.67852542203', '23.443271275283', 532600, 3, 'tr_0 tr_530000 tr_532600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532624, '麻栗坡县', 'M', '104.70954948078', '23.13158558356', 532600, 3, 'tr_0 tr_530000 tr_532600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532625, '马关县', 'M', '104.40041497692', '23.018993577166', 532600, 3, 'tr_0 tr_530000 tr_532600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532626, '丘北县', 'Q', '104.17344174074', '24.056993896218', 532600, 3, 'tr_0 tr_530000 tr_532600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532627, '广南县', 'G', '105.06158238459', '24.052198510921', 532600, 3, 'tr_0 tr_530000 tr_532600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532628, '富宁县', 'F', '105.63749017905', '23.63138040952', 532600, 3, 'tr_0 tr_530000 tr_532600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532801, '景洪市', 'J', '100.80644312258', '22.017004423119', 532800, 3, 'tr_0 tr_530000 tr_532800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532822, '勐海县', 'M', '100.4594459398', '21.963433596681', 532800, 3, 'tr_0 tr_530000 tr_532800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532823, '勐腊县', 'M', '101.57152830823', '21.465280880862', 532800, 3, 'tr_0 tr_530000 tr_532800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532901, '大理市', 'D', '100.23651930044', '25.597604905452', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532922, '漾濞彝族自治县', 'Y', '99.964413758168', '25.676295762972', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532923, '祥云县', 'X', '100.55744657937', '25.489872506242', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532924, '宾川县', 'B', '100.57845668762', '25.835249028198', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'); +INSERT INTO hg_sys_provinces (id, title, pinyin, lng, lat, pid, level, tree, sort, status, created_at, updated_at) VALUES + (532925, '弥渡县', 'M', '100.49758601546', '25.349336028746', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532926, '南涧彝族自治县', 'N', '100.51554862227', '25.049426762094', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532927, '巍山彝族回族自治县', 'W', '100.31346033515', '25.233438729799', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532928, '永平县', 'Y', '99.547494899931', '25.4702064833', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532929, '云龙县', 'Y', '99.377416022867', '25.891945073902', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532930, '洱源县', 'E', '99.969209721453', '26.120093341888', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532931, '剑川县', 'J', '99.912091235112', '26.542516534181', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (532932, '鹤庆县', 'H', '100.18249206302', '26.566197313345', 532900, 3, 'tr_0 tr_530000 tr_532900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533102, '瑞丽市', 'R', '97.862485584208', '24.022816893105', 533100, 3, 'tr_0 tr_530000 tr_533100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533103, '芒市', 'M', '98.591359356114', '24.438010702758', 533100, 3, 'tr_0 tr_530000 tr_533100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533122, '梁河县', 'L', '98.303133631636', '24.810784458257', 533100, 3, 'tr_0 tr_530000 tr_533100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533123, '盈江县', 'Y', '97.938426535386', '24.711534266143', 533100, 3, 'tr_0 tr_530000 tr_533100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533124, '陇川县', 'L', '97.798530364124', '24.189467890549', 533100, 3, 'tr_0 tr_530000 tr_533100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533301, '泸水市', 'L', '98.864586163328', '25.829026769972', 533300, 3, 'tr_0 tr_530000 tr_533300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533323, '福贡县', 'F', '98.875649424493', '26.908055208498', 533300, 3, 'tr_0 tr_530000 tr_533300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533324, '贡山独龙族怒族自治县', 'G', '98.672399448687', '27.747067875272', 533300, 3, 'tr_0 tr_530000 tr_533300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533325, '兰坪白族普米族自治县', 'L', '99.423284669988', '26.459207904688', 533300, 3, 'tr_0 tr_530000 tr_533300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533401, '香格里拉市', 'X', '99.707444573899', '27.835760125321', 533400, 3, 'tr_0 tr_530000 tr_533400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533422, '德钦县', 'D', '98.924452656054', '28.470086006822', 533400, 3, 'tr_0 tr_530000 tr_533400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (533423, '维西傈僳族自治县', 'W', '99.293465689934', '27.183170204022', 533400, 3, 'tr_0 tr_530000 tr_533400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540102, '城关区', 'C', '91.145100352371', '29.658331252915', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540103, '堆龙德庆区', 'D', '91.009963134209', '29.651625675009', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540104, '达孜区', 'D', '91.356318118388', '29.675409063815', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540121, '林周县', 'L', '91.26950057393', '29.898733205887', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540122, '当雄县', 'D', '91.107451746831', '30.479221726942', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540123, '尼木县', 'N', '90.171180066243', '29.437518981255', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540124, '曲水县', 'Q', '90.749958665453', '29.358987058337', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540127, '墨竹工卡县', 'M', '91.737266398592', '29.839752605055', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540171, '格尔木藏青工业园区', 'G', '91.120823915464', '29.650040274768', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540172, '拉萨经济技术开发区', 'L', '91.120823915464', '29.650040274768', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540173, '西藏文化旅游创意园区', 'X', '91.120823915464', '29.650040274768', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540174, '达孜工业园区', 'D', '91.356318118388', '29.675409063815', 540100, 3, 'tr_0 tr_540000 tr_540100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540202, '桑珠孜区', 'S', '88.902951718862', '29.255582814198', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540221, '南木林县', 'N', '89.105704213077', '29.687938036552', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540222, '江孜县', 'J', '89.612012194954', '28.917634684239', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540223, '定日县', 'D', '87.129597739314', '28.663951983289', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540224, '萨迦县', 'S', '88.028269488152', '28.90493151262', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540225, '拉孜县', 'L', '87.643647318074', '29.087509679995', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540226, '昂仁县', 'A', '87.242427336755', '29.301060484014', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540227, '谢通门县', 'X', '88.268206799957', '29.438142414132', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540228, '白朗县', 'B', '89.268741991895', '29.111858951918', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540229, '仁布县', 'R', '89.848624967899', '29.236788327037', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540230, '康马县', 'K', '89.688244915761', '28.561443952501', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540231, '定结县', 'D', '87.772376743375', '28.369910769393', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540232, '仲巴县', 'Z', '84.038116876917', '29.775982232026', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540233, '亚东县', 'Y', '88.913440783145', '27.491108780091', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540234, '吉隆县', 'J', '85.304073768987', '28.858501664955', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540235, '聂拉木县', 'N', '85.988770403046', '28.160839360543', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540236, '萨嘎县', 'S', '85.239825701307', '29.334659688784', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540237, '岗巴县', 'G', '88.526529281476', '28.28036304226', 540200, 3, 'tr_0 tr_540000 tr_540200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540302, '卡若区', 'K', '97.186654336416', '31.144248893947', 540300, 3, 'tr_0 tr_540000 tr_540300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540321, '江达县', 'J', '98.224594520968', '31.50520701798', 540300, 3, 'tr_0 tr_540000 tr_540300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540322, '贡觉县', 'G', '98.277334127289', '30.865966958412', 540300, 3, 'tr_0 tr_540000 tr_540300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540323, '类乌齐县', 'L', '96.606717192399', '31.217793112281', 540300, 3, 'tr_0 tr_540000 tr_540300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540324, '丁青县', 'D', '95.602643844218', '31.418402964614', 540300, 3, 'tr_0 tr_540000 tr_540300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540325, '察雅县', 'C', '97.575123679628', '30.659864699371', 540300, 3, 'tr_0 tr_540000 tr_540300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540326, '八宿县', 'B', '96.924360446152', '30.059028991399', 540300, 3, 'tr_0 tr_540000 tr_540300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540327, '左贡县', 'Z', '97.847366832989', '29.676848537197', 540300, 3, 'tr_0 tr_540000 tr_540300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540328, '芒康县', 'M', '98.599685480392', '29.685776117713', 540300, 3, 'tr_0 tr_540000 tr_540300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540329, '洛隆县', 'L', '95.831306613477', '30.747126507478', 540300, 3, 'tr_0 tr_540000 tr_540300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540330, '边坝县', 'B', '94.714371149159', '30.939624927347', 540300, 3, 'tr_0 tr_540000 tr_540300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540402, '巴宜区', 'B', '94.36754427672', '29.641644546372', 540400, 3, 'tr_0 tr_540000 tr_540400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540421, '工布江达县', 'G', '93.252419796678', '29.891367616241', 540400, 3, 'tr_0 tr_540000 tr_540400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540422, '米林县', 'M', '94.219938578083', '29.220916541197', 540400, 3, 'tr_0 tr_540000 tr_540400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540423, '墨脱县', 'M', '95.33949529751', '29.330937701878', 540400, 3, 'tr_0 tr_540000 tr_540400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540424, '波密县', 'B', '95.773900121645', '29.865060090549', 540400, 3, 'tr_0 tr_540000 tr_540400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540425, '察隅县', 'C', '97.473269749246', '28.667444137201', 540400, 3, 'tr_0 tr_540000 tr_540400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540426, '朗县', 'L', '93.081368234407', '29.051902419086', 540400, 3, 'tr_0 tr_540000 tr_540400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540602, '色尼区', 'S', '92.05984683665', '31.476117292678', 540600, 3, 'tr_0 tr_540000 tr_540600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540621, '嘉黎县', 'J', '93.23873151504', '30.647062455597', 540600, 3, 'tr_0 tr_540000 tr_540600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540622, '比如县', 'B', '93.685965938612', '31.48635726205', 540600, 3, 'tr_0 tr_540000 tr_540600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540623, '聂荣县', 'N', '92.308654466293', '32.113707483115', 540600, 3, 'tr_0 tr_540000 tr_540600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540624, '安多县', 'A', '91.688890677999', '32.271268023108', 540600, 3, 'tr_0 tr_540000 tr_540600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540625, '申扎县', 'S', '88.716481108234', '30.936393285832', 540600, 3, 'tr_0 tr_540000 tr_540600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540626, '索县', 'S', '93.792172958379', '31.892424309227', 540600, 3, 'tr_0 tr_540000 tr_540600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540627, '班戈县', 'B', '90.016707727114', '31.398727622963', 540600, 3, 'tr_0 tr_540000 tr_540600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540628, '巴青县', 'B', '94.059881564766', '31.924549424276', 540600, 3, 'tr_0 tr_540000 tr_540600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540629, '尼玛县', 'N', '87.243292410868', '31.790953326638', 540600, 3, 'tr_0 tr_540000 tr_540600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540630, '双湖县', 'S', '88.843427936123', '33.193503165809', 540600, 3, 'tr_0 tr_540000 tr_540600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (542521, '普兰县', 'P', '81.183094731974', '30.300162591078', 542500, 3, 'tr_0 tr_540000 tr_542500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (542522, '札达县', 'Z', '79.809323212178', '31.485343070014', 542500, 3, 'tr_0 tr_540000 tr_542500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (542523, '噶尔县', 'G', '80.102877146054', '32.497156823602', 542500, 3, 'tr_0 tr_540000 tr_542500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (542524, '日土县', 'R', '79.739109138263', '33.387186043872', 542500, 3, 'tr_0 tr_540000 tr_542500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (542525, '革吉县', 'G', '81.151664369638', '32.393356020044', 542500, 3, 'tr_0 tr_540000 tr_542500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (542526, '改则县', 'G', '84.06911336254', '32.308356643244', 542500, 3, 'tr_0 tr_540000 tr_542500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (542527, '措勤县', 'C', '85.165952205481', '31.022666379273', 542500, 3, 'tr_0 tr_540000 tr_542500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610102, '新城区', 'X', '108.9673910385', '34.272724469533', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610103, '碑林区', 'B', '108.94049774781', '34.236473940412', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610104, '莲湖区', 'L', '108.95042644912', '34.271017203053', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610111, '灞桥区', 'B', '109.07141535554', '34.279127674951', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610112, '未央区', 'W', '108.95340118781', '34.299148106589', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610113, '雁塔区', 'Y', '108.95144045638', '34.220635239986', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610114, '阎良区', 'Y', '109.23246311822', '34.668363274699', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610115, '临潼区', 'L', '109.22043579558', '34.372747432848', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610116, '长安区', 'Z', '108.91358047235', '34.163290267305', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610117, '高陵区', 'G', '109.09438691387', '34.541093106058', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610118, '鄠邑区', 'H', '108.61142023271', '34.115020711599', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610122, '蓝田县', 'L', '109.32938812681', '34.157620654732', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610124, '周至县', 'Z', '108.22842183954', '34.169385269616', 610100, 3, 'tr_0 tr_610000 tr_610100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610202, '王益区', 'W', '109.08141735858', '35.075322096471', 610200, 3, 'tr_0 tr_610000 tr_610200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610203, '印台区', 'Y', '109.10643408907', '35.120859282945', 610200, 3, 'tr_0 tr_610000 tr_610200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610204, '耀州区', 'Y', '108.98643790006', '34.91596030911', 610200, 3, 'tr_0 tr_610000 tr_610200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610222, '宜君县', 'Y', '109.12353674801', '35.404582194219', 610200, 3, 'tr_0 tr_610000 tr_610200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610302, '渭滨区', 'W', '107.15641916768', '34.377481132682', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610303, '金台区', 'J', '107.15342367813', '34.382351084696', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610304, '陈仓区', 'C', '107.39343842395', '34.360756335457', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610322, '凤翔县', 'F', '107.40737949665', '34.527616279899', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610323, '岐山县', 'Q', '107.62744727879', '34.449776962387', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610324, '扶风县', 'F', '107.9064530651', '34.381463351226', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610326, '眉县', 'M', '107.75639813644', '34.280375863086', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610327, '陇县', 'L', '106.87058365441', '34.898780253107', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610328, '千阳县', 'Q', '107.13946616644', '34.648544600794', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610329, '麟游县', 'L', '107.799514106', '34.683748667164', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610330, '凤县', 'F', '106.52255782187', '33.916583016343', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610331, '太白县', 'T', '107.32552913248', '34.064248441153', 610300, 3, 'tr_0 tr_610000 tr_610300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610402, '秦都区', 'Q', '108.71243199239', '34.3351451161', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610403, '杨陵区', 'Y', '108.09151531881', '34.278012507654', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610404, '渭城区', 'W', '108.74345057148', '34.368110229368', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610422, '三原县', 'S', '108.94744650025', '34.623078955252', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610423, '泾阳县', 'J', '108.84937884705', '34.533316532768', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610424, '乾县', 'G', '108.24537762554', '34.534018266142', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610425, '礼泉县', 'L', '108.43161549166', '34.487390768504', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610426, '永寿县', 'Y', '108.14846878644', '34.698035535617', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610428, '长武县', 'Z', '107.80556078005', '35.211657338715', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610429, '旬邑县', 'X', '108.34046703665', '35.117963919719', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610430, '淳化县', 'C', '108.58744176373', '34.804776911295', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610431, '武功县', 'W', '108.20655106479', '34.266137667633', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610481, '兴平市', 'X', '108.49639400877', '34.305476520292', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610482, '彬州市', 'B', '108.08456557823', '35.049610571828', 610400, 3, 'tr_0 tr_610000 tr_610400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610502, '临渭区', 'L', '109.4985962764', '34.504000470428', 610500, 3, 'tr_0 tr_610000 tr_610500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610503, '华州区', 'H', '109.7784773716', '34.5187307401', 610500, 3, 'tr_0 tr_610000 tr_610500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610522, '潼关县', 'T', '110.25250761972', '34.550326848532', 610500, 3, 'tr_0 tr_610000 tr_610500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610523, '大荔县', 'D', '109.94845330291', '34.801832760484', 610500, 3, 'tr_0 tr_610000 tr_610500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610524, '合阳县', 'H', '110.15539621274', '35.243872196866', 610500, 3, 'tr_0 tr_610000 tr_610500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610525, '澄城县', 'C', '109.93843360325', '35.196572815551', 610500, 3, 'tr_0 tr_610000 tr_610500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610526, '蒲城县', 'P', '109.59249651068', '34.961274128783', 610500, 3, 'tr_0 tr_610000 tr_610500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610527, '白水县', 'B', '109.59752055374', '35.183287514613', 610500, 3, 'tr_0 tr_610000 tr_610500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610528, '富平县', 'F', '109.18643744728', '34.757260440256', 610500, 3, 'tr_0 tr_610000 tr_610500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610581, '韩城市', 'H', '110.44955264012', '35.482086787313', 610500, 3, 'tr_0 tr_610000 tr_610500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610582, '华阴市', 'H', '110.09860075704', '34.571800158753', 610500, 3, 'tr_0 tr_610000 tr_610500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610602, '宝塔区', 'B', '109.49959402433', '36.596890441313', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610603, '安塞区', 'A', '109.33541943984', '36.870098259307', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610621, '延长县', 'Y', '110.01847172589', '36.585328801705', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610622, '延川县', 'Y', '110.20054028665', '36.884136960993', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610623, '子长县', 'Z', '109.68138985954', '37.148816918367', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610625, '志丹县', 'Z', '108.77557747991', '36.828021135864', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610626, '吴起县', 'W', '108.18258966361', '36.932576099483', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610627, '甘泉县', 'G', '109.35752350454', '36.282688619053', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610628, '富县', 'F', '109.38659653355', '35.993367977969', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610629, '洛川县', 'L', '109.43840396825', '35.768300429421', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610630, '宜川县', 'Y', '110.17541306458', '36.056397437854', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610631, '黄龙县', 'H', '109.84654907671', '35.590233768069', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610632, '黄陵县', 'H', '109.26960598495', '35.585076348969', 610600, 3, 'tr_0 tr_610000 tr_610600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610702, '汉台区', 'H', '107.03840167622', '33.074191093099', 610700, 3, 'tr_0 tr_610000 tr_610700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610703, '南郑区', 'N', '106.94243318334', '33.005614599734', 610700, 3, 'tr_0 tr_610000 tr_610700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610722, '城固县', 'C', '107.3406125803', '33.162399385178', 610700, 3, 'tr_0 tr_610000 tr_610700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610723, '洋县', 'Y', '107.55246428058', '33.228862589315', 610700, 3, 'tr_0 tr_610000 tr_610700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610724, '西乡县', 'X', '107.77339281906', '32.989397441895', 610700, 3, 'tr_0 tr_610000 tr_610700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610725, '勉县', 'M', '106.67942594867', '33.159804746955', 610700, 3, 'tr_0 tr_610000 tr_610700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610726, '宁强县', 'N', '106.26458864382', '32.835380199209', 610700, 3, 'tr_0 tr_610000 tr_610700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610727, '略阳县', 'L', '106.16354400616', '33.333193777733', 610700, 3, 'tr_0 tr_610000 tr_610700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610728, '镇巴县', 'Z', '107.9014456407', '32.54283336567', 610700, 3, 'tr_0 tr_610000 tr_610700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610729, '留坝县', 'L', '106.92741441352', '33.623825216737', 610700, 3, 'tr_0 tr_610000 tr_610700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610730, '佛坪县', 'F', '107.99742428443', '33.530693101588', 610700, 3, 'tr_0 tr_610000 tr_610700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610802, '榆阳区', 'Y', '109.72755916953', '38.28241962673', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610803, '横山区', 'H', '109.30049134534', '37.968573394166', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610822, '府谷县', 'F', '111.0736281152', '39.03379562985', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610824, '靖边县', 'J', '108.80060049853', '37.605063193955', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610825, '定边县', 'D', '107.60756957446', '37.600459865341', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610826, '绥德县', 'S', '110.26942648536', '37.508907288933', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610827, '米脂县', 'M', '110.19045141747', '37.761397514329', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610828, '佳县', 'J', '110.49747741874', '38.025611678572', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610829, '吴堡县', 'W', '110.74645500778', '37.458269874078', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610830, '清涧县', 'Q', '110.12755916227', '37.094852887828', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610831, '子洲县', 'Z', '110.04239845247', '37.617025887547', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610881, '神木市', 'S', '110.50542966826', '38.848544495221', 610800, 3, 'tr_0 tr_610000 tr_610800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610902, '汉滨区', 'H', '109.03359606476', '32.701196105738', 610900, 3, 'tr_0 tr_610000 tr_610900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610921, '汉阴县', 'H', '108.51550698561', '32.899120857292', 610900, 3, 'tr_0 tr_610000 tr_610900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610922, '石泉县', 'S', '108.25442679592', '33.044602110263', 610900, 3, 'tr_0 tr_610000 tr_610900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610923, '宁陕县', 'N', '108.32056400011', '33.316555486503', 610900, 3, 'tr_0 tr_610000 tr_610900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610924, '紫阳县', 'Z', '108.54159431661', '32.525785619364', 610900, 3, 'tr_0 tr_610000 tr_610900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610925, '岚皋县', 'L', '108.90861535814', '32.312880776501', 610900, 3, 'tr_0 tr_610000 tr_610900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610926, '平利县', 'P', '109.36854670128', '32.394804123185', 610900, 3, 'tr_0 tr_610000 tr_610900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610927, '镇坪县', 'Z', '109.53349679292', '31.889643295791', 610900, 3, 'tr_0 tr_610000 tr_610900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610928, '旬阳县', 'X', '109.37155674338', '32.839864221772', 610900, 3, 'tr_0 tr_610000 tr_610900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (610929, '白河县', 'B', '110.11958688053', '32.814846485284', 610900, 3, 'tr_0 tr_610000 tr_610900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (611002, '商州区', 'S', '109.94747163465', '33.86885529308', 611000, 3, 'tr_0 tr_610000 tr_611000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (611021, '洛南县', 'L', '110.15442748007', '34.097070538846', 611000, 3, 'tr_0 tr_610000 tr_611000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (611022, '丹凤县', 'D', '110.3335602886', '33.701537322921', 611000, 3, 'tr_0 tr_610000 tr_611000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (611023, '商南县', 'S', '110.88840847837', '33.537533476707', 611000, 3, 'tr_0 tr_610000 tr_611000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (611024, '山阳县', 'S', '109.88854863218', '33.537968382769', 611000, 3, 'tr_0 tr_610000 tr_611000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (611025, '镇安县', 'Z', '109.15957460914', '33.429044650147', 611000, 3, 'tr_0 tr_610000 tr_611000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (611026, '柞水县', 'Z', '109.120502272', '33.692026241945', 611000, 3, 'tr_0 tr_610000 tr_611000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620102, '城关区', 'C', '103.83147490053', '36.063181475369', 620100, 3, 'tr_0 tr_620000 tr_620100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620103, '七里河区', 'Q', '103.79241388204', '36.07212925843', 620100, 3, 'tr_0 tr_620000 tr_620100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620104, '西固区', 'X', '103.63458007682', '36.094109365757', 620100, 3, 'tr_0 tr_620000 tr_620100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620105, '安宁区', 'A', '103.72553503682', '36.109753754973', 620100, 3, 'tr_0 tr_620000 tr_620100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620111, '红古区', 'H', '102.86542781272', '36.351863423179', 620100, 3, 'tr_0 tr_620000 tr_620100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620121, '永登县', 'Y', '103.26662443823', '36.74209521344', 620100, 3, 'tr_0 tr_620000 tr_620100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620122, '皋兰县', 'G', '103.95346415997', '36.338142148673', 620100, 3, 'tr_0 tr_620000 tr_620100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620123, '榆中县', 'Y', '104.11956587928', '35.848851048242', 620100, 3, 'tr_0 tr_620000 tr_620100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620171, '兰州新区', 'L', '103.76383312444', '36.082833434467', 620100, 3, 'tr_0 tr_620000 tr_620100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620201, '市辖区', 'S', '98.208045429791', '39.821463455258', 620200, 3, 'tr_0 tr_620000 tr_620200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620302, '金川区', 'J', '102.20058588614', '38.525772245594', 620300, 3, 'tr_0 tr_620000 tr_620300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620321, '永昌县', 'Y', '101.97946358316', '38.252940956889', 620300, 3, 'tr_0 tr_620000 tr_620300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620402, '白银区', 'B', '104.15541276065', '36.541463568069', 620400, 3, 'tr_0 tr_620000 tr_620400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620403, '平川区', 'P', '104.83161394007', '36.733498751869', 620400, 3, 'tr_0 tr_620000 tr_620400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620421, '靖远县', 'J', '104.68251507796', '36.577096288837', 620400, 3, 'tr_0 tr_620000 tr_620400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620422, '会宁县', 'H', '105.05960693274', '35.698508053094', 620400, 3, 'tr_0 tr_620000 tr_620400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620423, '景泰县', 'J', '104.06944438436', '37.187406260097', 620400, 3, 'tr_0 tr_620000 tr_620400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620502, '秦州区', 'Q', '105.73041549435', '34.587315743121', 620500, 3, 'tr_0 tr_620000 tr_620500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620503, '麦积区', 'M', '105.89559698949', '34.576336861448', 620500, 3, 'tr_0 tr_620000 tr_620500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620521, '清水县', 'Q', '106.14359506621', '34.753882906363', 620500, 3, 'tr_0 tr_620000 tr_620500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620522, '秦安县', 'Q', '105.68157480343', '34.864876111568', 620500, 3, 'tr_0 tr_620000 tr_620500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620523, '甘谷县', 'G', '105.34247534291', '34.738300137398', 620500, 3, 'tr_0 tr_620000 tr_620500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620524, '武山县', 'W', '104.89742838309', '34.727669101635', 620500, 3, 'tr_0 tr_620000 tr_620500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620525, '张家川回族自治县', 'Z', '106.21139036271', '34.99490501302', 620500, 3, 'tr_0 tr_620000 tr_620500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620602, '凉州区', 'L', '102.64857479651', '37.934121948376', 620600, 3, 'tr_0 tr_620000 tr_620600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620621, '民勤县', 'M', '103.10040027988', '38.630624826433', 620600, 3, 'tr_0 tr_620000 tr_620600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620622, '古浪县', 'G', '102.90362978165', '37.475801906601', 620600, 3, 'tr_0 tr_620000 tr_620600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620623, '天祝藏族自治县', 'T', '103.14862131966', '36.97759617654', 620600, 3, 'tr_0 tr_620000 tr_620600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620702, '甘州区', 'G', '100.48455772128', '38.934781471785', 620700, 3, 'tr_0 tr_620000 tr_620700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620721, '肃南裕固族自治县', 'S', '99.621905418008', '38.843100205023', 620700, 3, 'tr_0 tr_620000 tr_620700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620722, '民乐县', 'M', '100.81942903742', '38.436842233981', 620700, 3, 'tr_0 tr_620000 tr_620700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620723, '临泽县', 'L', '100.17055476077', '39.158514444726', 620700, 3, 'tr_0 tr_620000 tr_620700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620724, '高台县', 'G', '99.825759504337', '39.383646046807', 620700, 3, 'tr_0 tr_620000 tr_620700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620725, '山丹县', 'S', '101.09561558172', '38.790452663306', 620700, 3, 'tr_0 tr_620000 tr_620700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620802, '崆峒区', 'K', '106.68141452757', '35.548814892232', 620800, 3, 'tr_0 tr_620000 tr_620800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620821, '泾川县', 'J', '107.37451813364', '35.338668597821', 620800, 3, 'tr_0 tr_620000 tr_620800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620822, '灵台县', 'L', '107.62746120252', '35.07158181696', 620800, 3, 'tr_0 tr_620000 tr_620800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620823, '崇信县', 'C', '107.04141513189', '35.308615839828', 620800, 3, 'tr_0 tr_620000 tr_620800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620825, '庄浪县', 'Z', '106.04258582178', '35.208192125804', 620800, 3, 'tr_0 tr_620000 tr_620800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620826, '静宁县', 'J', '105.73841580322', '35.528257189136', 620800, 3, 'tr_0 tr_620000 tr_620800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620881, '华亭市', 'H', '106.65948599177', '35.223550762897', 620800, 3, 'tr_0 tr_620000 tr_620800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620902, '肃州区', 'S', '98.514321853032', '39.751245509963', 620900, 3, 'tr_0 tr_620000 tr_620900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620921, '金塔县', 'J', '98.908368236172', '39.990029254093', 620900, 3, 'tr_0 tr_620000 tr_620900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620922, '瓜州县', 'G', '95.788736364512', '40.52610597895', 620900, 3, 'tr_0 tr_620000 tr_620900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620923, '肃北蒙古族自治县', 'S', '94.883692395412', '39.518329738436', 620900, 3, 'tr_0 tr_620000 tr_620900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620924, '阿克塞哈萨克族自治县', 'A', '94.346760190396', '39.640045316917', 620900, 3, 'tr_0 tr_620000 tr_620900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620981, '玉门市', 'Y', '97.051711691182', '40.297620020884', 620900, 3, 'tr_0 tr_620000 tr_620900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (620982, '敦煌市', 'D', '94.668527025762', '40.147867484244', 620900, 3, 'tr_0 tr_620000 tr_620900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621002, '西峰区', 'X', '107.65739112517', '35.736864475978', 621000, 3, 'tr_0 tr_620000 tr_621000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621021, '庆城县', 'Q', '107.88840619724', '36.021726360644', 621000, 3, 'tr_0 tr_620000 tr_621000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621022, '环县', 'H', '107.31446964419', '36.574427108907', 621000, 3, 'tr_0 tr_620000 tr_621000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621023, '华池县', 'H', '107.99638952632', '36.467575129884', 621000, 3, 'tr_0 tr_620000 tr_621000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621024, '合水县', 'H', '108.026447188', '35.8252622164', 621000, 3, 'tr_0 tr_620000 tr_621000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621025, '正宁县', 'Z', '108.36637461671', '35.498218780898', 621000, 3, 'tr_0 tr_620000 tr_621000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621026, '宁县', 'N', '107.93457092587', '35.507932974537', 621000, 3, 'tr_0 tr_620000 tr_621000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621027, '镇原县', 'Z', '107.20757586986', '35.683230586316', 621000, 3, 'tr_0 tr_620000 tr_621000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621102, '安定区', 'A', '104.61650040265', '35.585600016725', 621100, 3, 'tr_0 tr_620000 tr_621100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621121, '通渭县', 'T', '105.24840362211', '35.217216821266', 621100, 3, 'tr_0 tr_620000 tr_621100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621122, '陇西县', 'L', '104.64138059069', '35.010197162318', 621100, 3, 'tr_0 tr_620000 tr_621100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621123, '渭源县', 'W', '104.22158401062', '35.142391958021', 621100, 3, 'tr_0 tr_620000 tr_621100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621124, '临洮县', 'L', '103.8656010777', '35.400587040258', 621100, 3, 'tr_0 tr_620000 tr_621100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621125, '漳县', 'Z', '104.4785953255', '34.854249981778', 621100, 3, 'tr_0 tr_620000 tr_621100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621126, '岷县', 'M', '104.04339603983', '34.44440764065', 621100, 3, 'tr_0 tr_620000 tr_621100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621202, '武都区', 'W', '104.93259336075', '33.398072188089', 621200, 3, 'tr_0 tr_620000 tr_621200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621221, '成县', 'C', '105.7484779029', '33.756635187351', 621200, 3, 'tr_0 tr_620000 tr_621200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621222, '文县', 'W', '104.68955842198', '32.949601280768', 621200, 3, 'tr_0 tr_620000 tr_621200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621223, '宕昌县', 'D', '104.39938579987', '34.053486291359', 621200, 3, 'tr_0 tr_620000 tr_621200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621224, '康县', 'K', '105.61539187549', '33.335376401996', 621200, 3, 'tr_0 tr_620000 tr_621200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621225, '西和县', 'X', '105.30761048912', '34.016787358437', 621200, 3, 'tr_0 tr_620000 tr_621200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621226, '礼县', 'L', '105.1835909694', '34.194685061207', 621200, 3, 'tr_0 tr_620000 tr_621200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621227, '徽县', 'H', '106.09441787005', '33.77519418709', 621200, 3, 'tr_0 tr_620000 tr_621200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (621228, '两当县', 'L', '106.31141946599', '33.915122835173', 621200, 3, 'tr_0 tr_620000 tr_621200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (622901, '临夏市', 'L', '103.2495491776', '35.609898772689', 622900, 3, 'tr_0 tr_620000 tr_622900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (622921, '临夏县', 'L', '103.00251408439', '35.497397958837', 622900, 3, 'tr_0 tr_620000 tr_622900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (622922, '康乐县', 'K', '103.71547554223', '35.376109760702', 622900, 3, 'tr_0 tr_620000 tr_622900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (622923, '永靖县', 'Y', '103.29250749455', '35.963330304471', 622900, 3, 'tr_0 tr_620000 tr_622900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (622924, '广河县', 'G', '103.58240999619', '35.494101361696', 622900, 3, 'tr_0 tr_620000 tr_622900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (622925, '和政县', 'H', '103.35752370329', '35.430589904166', 622900, 3, 'tr_0 tr_620000 tr_622900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (622926, '东乡族自治县', 'D', '103.39561320437', '35.669329728624', 622900, 3, 'tr_0 tr_620000 tr_622900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (622927, '积石山保安族东乡族撒拉族自治县', 'J', '102.88251807505', '35.72349932364', 622900, 3, 'tr_0 tr_620000 tr_622900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (623001, '合作市', 'H', '102.917571573', '35.005935428196', 623000, 3, 'tr_0 tr_620000 tr_623000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (623021, '临潭县', 'L', '103.36053329624', '34.698639411522', 623000, 3, 'tr_0 tr_620000 tr_623000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (623022, '卓尼县', 'Z', '103.51361578396', '34.594916432804', 623000, 3, 'tr_0 tr_620000 tr_623000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (623023, '舟曲县', 'Z', '104.37748996239', '33.790814973644', 623000, 3, 'tr_0 tr_620000 tr_623000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (623024, '迭部县', 'D', '103.22844034558', '34.062020054097', 623000, 3, 'tr_0 tr_620000 tr_623000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (623025, '玛曲县', 'M', '102.07860004026', '34.003358168342', 623000, 3, 'tr_0 tr_620000 tr_623000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (623026, '碌曲县', 'L', '102.49442413371', '34.597087271566', 623000, 3, 'tr_0 tr_620000 tr_623000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (623027, '夏河县', 'X', '102.52857708038', '35.208324325541', 623000, 3, 'tr_0 tr_620000 tr_623000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630102, '城东区', 'C', '101.80956903833', '36.605707645661', 630100, 3, 'tr_0 tr_630000 tr_630100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630103, '城中区', 'C', '101.79048354964', '36.628800570589', 630100, 3, 'tr_0 tr_630000 tr_630100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630104, '城西区', 'C', '101.77241422413', '36.634496979524', 630100, 3, 'tr_0 tr_630000 tr_630100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630105, '城北区', 'C', '101.77240488176', '36.656293630837', 630100, 3, 'tr_0 tr_630000 tr_630100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630121, '大通回族土族自治县', 'D', '101.69256375752', '36.932666463407', 630100, 3, 'tr_0 tr_630000 tr_630100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630122, '湟中县', 'H', '101.57861675782', '36.506627546281', 630100, 3, 'tr_0 tr_630000 tr_630100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630123, '湟源县', 'H', '101.26244861154', '36.688587514903', 630100, 3, 'tr_0 tr_630000 tr_630100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630202, '乐都区', 'L', '102.40856633883', '36.487820051522', 630200, 3, 'tr_0 tr_630000 tr_630200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630203, '平安区', 'P', '102.11442787756', '36.506553573162', 630200, 3, 'tr_0 tr_630000 tr_630200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630222, '民和回族土族自治县', 'M', '102.11044407228', '36.508511080941', 630200, 3, 'tr_0 tr_630000 tr_630200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630223, '互助土族自治县', 'H', '101.96456904899', '36.850021613826', 630200, 3, 'tr_0 tr_630000 tr_630200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630224, '化隆回族自治县', 'H', '102.27044827345', '36.100988250893', 630200, 3, 'tr_0 tr_630000 tr_630200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (630225, '循化撒拉族自治县', 'X', '102.4953853206', '35.856667223862', 630200, 3, 'tr_0 tr_630000 tr_630200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632221, '门源回族自治县', 'M', '101.62843803903', '37.382180626313', 632200, 3, 'tr_0 tr_630000 tr_632200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632222, '祁连县', 'Q', '100.25962157243', '38.182924871569', 632200, 3, 'tr_0 tr_630000 tr_632200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632223, '海晏县', 'H', '101.0005855486', '36.902376022515', 632200, 3, 'tr_0 tr_630000 tr_632200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632224, '刚察县', 'G', '100.15360607139', '37.327320072254', 632200, 3, 'tr_0 tr_630000 tr_632200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632321, '同仁县', 'T', '102.0254377812', '35.521865150524', 632300, 3, 'tr_0 tr_630000 tr_632300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632322, '尖扎县', 'J', '102.0375073242', '35.944284459868', 632300, 3, 'tr_0 tr_630000 tr_632300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632323, '泽库县', 'Z', '101.47359451319', '35.0420144951', 632300, 3, 'tr_0 tr_630000 tr_632300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632324, '河南蒙古族自治县', 'H', '101.62247338027', '34.740396071091', 632300, 3, 'tr_0 tr_630000 tr_632300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632521, '共和县', 'G', '100.62662348005', '36.288703317865', 632500, 3, 'tr_0 tr_630000 tr_632500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632522, '同德县', 'T', '100.58542386564', '35.259857775817', 632500, 3, 'tr_0 tr_630000 tr_632500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632523, '贵德县', 'G', '101.43953310384', '36.046158080751', 632500, 3, 'tr_0 tr_630000 tr_632500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632524, '兴海县', 'X', '99.994380072293', '35.594629879949', 632500, 3, 'tr_0 tr_630000 tr_632500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632525, '贵南县', 'G', '100.75359321473', '35.592415454611', 632500, 3, 'tr_0 tr_630000 tr_632500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632621, '玛沁县', 'M', '100.24556434882', '34.483569486002', 632600, 3, 'tr_0 tr_630000 tr_632600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632622, '班玛县', 'B', '100.74360459645', '32.93850392747', 632600, 3, 'tr_0 tr_630000 tr_632600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632623, '甘德县', 'G', '99.907510695578', '33.975003677602', 632600, 3, 'tr_0 tr_630000 tr_632600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632624, '达日县', 'D', '99.658010113065', '33.754937373991', 632600, 3, 'tr_0 tr_630000 tr_632600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632625, '久治县', 'J', '101.48853225585', '33.434773499408', 632600, 3, 'tr_0 tr_630000 tr_632600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632626, '玛多县', 'M', '98.215883832099', '34.920748646186', 632600, 3, 'tr_0 tr_630000 tr_632600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632701, '玉树市', 'Y', '97.015376401101', '32.999555650886', 632700, 3, 'tr_0 tr_630000 tr_632700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632722, '杂多县', 'Z', '95.306964878828', '32.89924067586', 632700, 3, 'tr_0 tr_630000 tr_632700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632723, '称多县', 'C', '97.115000009277', '33.374225698944', 632700, 3, 'tr_0 tr_630000 tr_632700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632724, '治多县', 'Z', '95.61979357437', '33.857953267719', 632700, 3, 'tr_0 tr_630000 tr_632700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632725, '囊谦县', 'N', '96.486918271283', '32.209194368698', 632700, 3, 'tr_0 tr_630000 tr_632700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632726, '曲麻莱县', 'Q', '95.803750013992', '34.132298666997', 632700, 3, 'tr_0 tr_630000 tr_632700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632801, '格尔木市', 'G', '94.933310210425', '36.412371046954', 632800, 3, 'tr_0 tr_630000 tr_632800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632802, '德令哈市', 'D', '97.367470299975', '37.375345907463', 632800, 3, 'tr_0 tr_630000 tr_632800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632803, '茫崖市', 'M', '90.87951750334', '38.261902814972', 632800, 3, 'tr_0 tr_630000 tr_632800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632821, '乌兰县', 'W', '98.486735699295', '36.935747859032', 632800, 3, 'tr_0 tr_630000 tr_632800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632822, '都兰县', 'D', '98.102704793777', '36.307611028682', 632800, 3, 'tr_0 tr_630000 tr_632800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632823, '天峻县', 'T', '99.029242967967', '37.306903395111', 632800, 3, 'tr_0 tr_630000 tr_632800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (632857, '大柴旦行政委员会', 'D', '95.371722465415', '37.857987655919', 632800, 3, 'tr_0 tr_630000 tr_632800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640104, '兴庆区', 'X', '106.29549376692', '38.479578929456', 640100, 3, 'tr_0 tr_640000 tr_640100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640105, '西夏区', 'X', '106.15658124015', '38.496817469604', 640100, 3, 'tr_0 tr_640000 tr_640100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640106, '金凤区', 'J', '106.24956089094', '38.478695238722', 640100, 3, 'tr_0 tr_640000 tr_640100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640121, '永宁县', 'Y', '106.25960457536', '38.283001541521', 640100, 3, 'tr_0 tr_640000 tr_640100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640122, '贺兰县', 'H', '106.3565182653', '38.560406689579', 640100, 3, 'tr_0 tr_640000 tr_640100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'); +INSERT INTO hg_sys_provinces (id, title, pinyin, lng, lat, pid, level, tree, sort, status, created_at, updated_at) VALUES + (640181, '灵武市', 'L', '106.34644035545', '38.108658666793', 640100, 3, 'tr_0 tr_640000 tr_640100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540502, '乃东区', 'N', '91.778681965641', '29.234229154985', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540521, '扎囊县', 'Z', '91.343627127639', '29.251164315795', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540522, '贡嘎县', 'G', '90.990582372498', '29.295585920341', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540523, '桑日县', 'S', '92.022157253696', '29.265175836421', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540524, '琼结县', 'Q', '91.690100777976', '29.030865581933', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540525, '曲松县', 'Q', '92.210174662975', '29.068424815624', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540526, '措美县', 'C', '91.439917573188', '28.444257990161', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540527, '洛扎县', 'L', '90.866452001915', '28.391634617398', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540528, '加查县', 'J', '92.600448881489', '29.146087474784', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540529, '隆子县', 'L', '92.468965520987', '28.414018998419', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540530, '错那县', 'C', '91.96375005827', '27.997004265923', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (540531, '浪卡子县', 'L', '90.404646883462', '28.973992017804', 540500, 3, 'tr_0 tr_540000 tr_540500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640302, '利通区', 'L', '106.21940702074', '37.990746080857', 640300, 3, 'tr_0 tr_640000 tr_640300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640303, '红寺堡区', 'H', '106.06842117808', '37.431882454446', 640300, 3, 'tr_0 tr_640000 tr_640300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640323, '盐池县', 'Y', '107.41337954864', '37.789295649909', 640300, 3, 'tr_0 tr_640000 tr_640300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640324, '同心县', 'T', '105.9205990776', '36.986269629165', 640300, 3, 'tr_0 tr_640000 tr_640300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640381, '青铜峡市', 'Q', '106.08537031661', '38.027412223967', 640300, 3, 'tr_0 tr_640000 tr_640300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640402, '原州区', 'Y', '106.29451461392', '36.009367675763', 640400, 3, 'tr_0 tr_640000 tr_640400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640422, '西吉县', 'X', '105.73538590857', '35.97007642089', 640400, 3, 'tr_0 tr_640000 tr_640400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640423, '隆德县', 'L', '106.1184982967', '35.631762315094', 640400, 3, 'tr_0 tr_640000 tr_640400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640424, '泾源县', 'J', '106.33739343083', '35.504361637679', 640400, 3, 'tr_0 tr_640000 tr_640400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640425, '彭阳县', 'P', '106.64454429656', '35.85540546349', 640400, 3, 'tr_0 tr_640000 tr_640400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640502, '沙坡头区', 'S', '105.20357090089', '37.505701418703', 640500, 3, 'tr_0 tr_640000 tr_640500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640521, '中宁县', 'Z', '105.6915371912', '37.497420805579', 640500, 3, 'tr_0 tr_640000 tr_640500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640522, '海原县', 'H', '105.65055514638', '36.570781489719', 640500, 3, 'tr_0 tr_640000 tr_640500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650102, '天山区', 'T', '87.638407777566', '43.800271358313', 650100, 3, 'tr_0 tr_650000 tr_650100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650103, '沙依巴克区', 'S', '87.604670027697', '43.807262352761', 650100, 3, 'tr_0 tr_650000 tr_650100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650104, '新市区', 'X', '87.575908441201', '43.861394002748', 650100, 3, 'tr_0 tr_650000 tr_650100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650105, '水磨沟区', 'S', '87.648896662192', '43.838251163831', 650100, 3, 'tr_0 tr_650000 tr_650100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650106, '头屯河区', 'T', '87.434506709858', '43.882653022602', 650100, 3, 'tr_0 tr_650000 tr_650100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650107, '达坂城区', 'D', '88.317397656607', '43.36994274634', 650100, 3, 'tr_0 tr_650000 tr_650100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650109, '米东区', 'M', '87.662134271848', '43.979247426398', 650100, 3, 'tr_0 tr_650000 tr_650100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650121, '乌鲁木齐县', 'W', '87.416028745179', '43.477086065793', 650100, 3, 'tr_0 tr_650000 tr_650100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650171, '乌鲁木齐经济技术开发区', 'W', '87.523118529771', '43.868981036009', 650100, 3, 'tr_0 tr_650000 tr_650100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650172, '乌鲁木齐高新技术产业开发区', 'W', '87.58408445863', '43.87767236981', 650100, 3, 'tr_0 tr_650000 tr_650100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650202, '独山子区', 'D', '84.893613283343', '44.334407392365', 650200, 3, 'tr_0 tr_650000 tr_650200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650203, '克拉玛依区', 'K', '84.866221962114', '45.596624206981', 650200, 3, 'tr_0 tr_650000 tr_650200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650204, '白碱滩区', 'B', '85.139510123686', '45.693951629764', 650200, 3, 'tr_0 tr_650000 tr_650200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650205, '乌尔禾区', 'W', '85.700304826442', '46.095295184689', 650200, 3, 'tr_0 tr_650000 tr_650200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650402, '高昌区', 'G', '89.192458882701', '42.948548691684', 650400, 3, 'tr_0 tr_650000 tr_650400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650421, '鄯善县', 'S', '90.220093886103', '42.874759228479', 650400, 3, 'tr_0 tr_650000 tr_650400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650422, '托克逊县', 'T', '88.660164359541', '42.798545831023', 650400, 3, 'tr_0 tr_650000 tr_650400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650502, '伊州区', 'Y', '93.521320462369', '42.832824924721', 650500, 3, 'tr_0 tr_650000 tr_650500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650521, '巴里坤哈萨克自治县', 'B', '93.022930953564', '43.605688770787', 650500, 3, 'tr_0 tr_650000 tr_650500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (650522, '伊吾县', 'Y', '94.703825671285', '43.260676527466', 650500, 3, 'tr_0 tr_650000 tr_650500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652301, '昌吉市', 'C', '87.27386462195', '44.020126845939', 652300, 3, 'tr_0 tr_650000 tr_652300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652302, '阜康市', 'F', '87.993677905062', '44.163137321346', 652300, 3, 'tr_0 tr_650000 tr_652300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652323, '呼图壁县', 'H', '86.905143806731', '44.197654596132', 652300, 3, 'tr_0 tr_650000 tr_652300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652324, '玛纳斯县', 'M', '86.220643452199', '44.3100628588', 652300, 3, 'tr_0 tr_650000 tr_652300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652325, '奇台县', 'Q', '89.601080811724', '44.026897819018', 652300, 3, 'tr_0 tr_650000 tr_652300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652327, '吉木萨尔县', 'J', '89.187122858141', '44.005717795203', 652300, 3, 'tr_0 tr_650000 tr_652300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652328, '木垒哈萨克自治县', 'M', '90.292514737334', '43.840308302807', 652300, 3, 'tr_0 tr_650000 tr_652300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652701, '博乐市', 'B', '82.057972254591', '44.860009784639', 652700, 3, 'tr_0 tr_650000 tr_652700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652702, '阿拉山口市', 'A', '82.560725272438', '45.179670079921', 652700, 3, 'tr_0 tr_650000 tr_652700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652722, '精河县', 'J', '82.900655316205', '44.606645943492', 652700, 3, 'tr_0 tr_650000 tr_652700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652723, '温泉县', 'W', '81.031145546486', '44.974856638705', 652700, 3, 'tr_0 tr_650000 tr_652700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652801, '库尔勒市', 'K', '86.181494309938', '41.732373221412', 652800, 3, 'tr_0 tr_650000 tr_652800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652822, '轮台县', 'L', '84.258212152054', '41.783813000515', 652800, 3, 'tr_0 tr_650000 tr_652800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652823, '尉犁县', 'W', '86.266036536399', '41.350122782054', 652800, 3, 'tr_0 tr_650000 tr_652800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652824, '若羌县', 'R', '88.175324441896', '39.028991037175', 652800, 3, 'tr_0 tr_650000 tr_652800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652825, '且末县', 'Q', '85.535990385731', '38.15138769413', 652800, 3, 'tr_0 tr_650000 tr_652800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652826, '焉耆回族自治县', 'Y', '86.581222026277', '42.064850858728', 652800, 3, 'tr_0 tr_650000 tr_652800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652827, '和静县', 'H', '86.390398220692', '42.329365035879', 652800, 3, 'tr_0 tr_650000 tr_652800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652828, '和硕县', 'H', '86.883689037252', '42.288065062428', 652800, 3, 'tr_0 tr_650000 tr_652800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652829, '博湖县', 'B', '86.638469149986', '41.986430356829', 652800, 3, 'tr_0 tr_650000 tr_652800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652871, '库尔勒经济技术开发区', 'K', '86.229512961483', '41.71760888729', 652800, 3, 'tr_0 tr_650000 tr_652800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652901, '阿克苏市', 'A', '80.269926757334', '41.173859926953', 652900, 3, 'tr_0 tr_650000 tr_652900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652922, '温宿县', 'W', '80.245564352581', '41.282567249887', 652900, 3, 'tr_0 tr_650000 tr_652900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652923, '库车县', 'K', '82.968458787284', '41.723447514833', 652900, 3, 'tr_0 tr_650000 tr_652900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652924, '沙雅县', 'S', '82.788823736148', '41.227749329027', 652900, 3, 'tr_0 tr_650000 tr_652900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652925, '新和县', 'X', '82.615823030526', '41.553999628477', 652900, 3, 'tr_0 tr_650000 tr_652900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652926, '拜城县', 'B', '81.858516272038', '41.800706601984', 652900, 3, 'tr_0 tr_650000 tr_652900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652927, '乌什县', 'W', '79.230868990897', '41.220871106999', 652900, 3, 'tr_0 tr_650000 tr_652900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652928, '阿瓦提县', 'A', '80.381849245908', '40.649358802911', 652900, 3, 'tr_0 tr_650000 tr_652900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (652929, '柯坪县', 'K', '79.053213535614', '40.514055520966', 652900, 3, 'tr_0 tr_650000 tr_652900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653001, '阿图什市', 'A', '76.174906408698', '39.722079128589', 653000, 3, 'tr_0 tr_650000 tr_653000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653022, '阿克陶县', 'A', '75.953725266709', '39.153888517642', 653000, 3, 'tr_0 tr_650000 tr_653000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653023, '阿合奇县', 'A', '78.45253927839', '40.942958224222', 653000, 3, 'tr_0 tr_650000 tr_653000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653024, '乌恰县', 'W', '75.26533363237', '39.725123590953', 653000, 3, 'tr_0 tr_650000 tr_653000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653101, '喀什市', 'K', '76.000312737915', '39.473649532912', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653121, '疏附县', 'S', '75.869168667361', '39.381291555212', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653122, '疏勒县', 'S', '76.056614395075', '39.406709108732', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653123, '英吉沙县', 'Y', '76.182075425651', '38.935670863521', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653124, '泽普县', 'Z', '77.266559423761', '38.190725516333', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653125, '莎车县', 'S', '77.252436713686', '38.420156752419', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653126, '叶城县', 'Y', '77.420097621865', '37.889166844427', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653127, '麦盖提县', 'M', '77.658824287414', '38.911194315553', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653128, '岳普湖县', 'Y', '76.78414771574', '39.239387333945', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653129, '伽师县', 'J', '76.730385568257', '39.493851605868', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653130, '巴楚县', 'B', '78.5557014018', '39.79078837708', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653131, '塔什库尔干塔吉克自治县', 'T', '75.230804744838', '37.779045640763', 653100, 3, 'tr_0 tr_650000 tr_653100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653201, '和田市', 'H', '79.920212469755', '37.118335544466', 653200, 3, 'tr_0 tr_650000 tr_653200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653221, '和田县', 'H', '79.866215595042', '37.090362410221', 653200, 3, 'tr_0 tr_650000 tr_653200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653222, '墨玉县', 'M', '79.735479265358', '37.282993446907', 653200, 3, 'tr_0 tr_650000 tr_653200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653223, '皮山县', 'P', '78.289871062405', '37.627248714375', 653200, 3, 'tr_0 tr_650000 tr_653200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653224, '洛浦县', 'L', '80.195387611879', '37.079611030988', 653200, 3, 'tr_0 tr_650000 tr_653200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653225, '策勒县', 'C', '80.813201268742', '37.004122359371', 653200, 3, 'tr_0 tr_650000 tr_653200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653226, '于田县', 'Y', '81.683782914748', '36.86295413611', 653200, 3, 'tr_0 tr_650000 tr_653200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (653227, '民丰县', 'M', '82.702713427589', '37.070256968231', 653200, 3, 'tr_0 tr_650000 tr_653200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654002, '伊宁市', 'Y', '81.284242405278', '43.915299436243', 654000, 3, 'tr_0 tr_650000 tr_654000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654003, '奎屯市', 'K', '84.909449241687', '44.432057210004', 654000, 3, 'tr_0 tr_650000 tr_654000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654004, '霍尔果斯市', 'H', '80.427129772427', '44.235308556093', 654000, 3, 'tr_0 tr_650000 tr_654000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654021, '伊宁县', 'Y', '81.533906479394', '43.982909125124', 654000, 3, 'tr_0 tr_650000 tr_654000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654022, '察布查尔锡伯自治县', 'C', '81.157924570907', '43.846690330452', 654000, 3, 'tr_0 tr_650000 tr_654000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654023, '霍城县', 'H', '80.885281123201', '44.062249507399', 654000, 3, 'tr_0 tr_650000 tr_654000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654024, '巩留县', 'G', '82.238225609409', '43.488485559536', 654000, 3, 'tr_0 tr_650000 tr_654000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654025, '新源县', 'X', '83.267022301497', '43.435927002185', 654000, 3, 'tr_0 tr_650000 tr_654000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654026, '昭苏县', 'Z', '81.137377539147', '43.163496741509', 654000, 3, 'tr_0 tr_650000 tr_654000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654027, '特克斯县', 'T', '81.842587249244', '43.224248213467', 654000, 3, 'tr_0 tr_650000 tr_654000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654028, '尼勒克县', 'N', '82.51800753168', '43.804594836238', 654000, 3, 'tr_0 tr_650000 tr_654000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654201, '塔城市', 'T', '82.987235518406', '46.750948254373', 654200, 3, 'tr_0 tr_650000 tr_654200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654202, '乌苏市', 'W', '84.720088146964', '44.424048034452', 654200, 3, 'tr_0 tr_650000 tr_654200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654221, '额敏县', 'E', '83.633374454783', '46.531884861309', 654200, 3, 'tr_0 tr_650000 tr_654200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654223, '沙湾县', 'S', '85.626144686035', '44.331949461741', 654200, 3, 'tr_0 tr_650000 tr_654200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654224, '托里县', 'T', '83.612909438315', '45.94274280505', 654200, 3, 'tr_0 tr_650000 tr_654200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654225, '裕民县', 'Y', '82.9894387025', '46.207453546928', 654200, 3, 'tr_0 tr_650000 tr_654200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654226, '和布克赛尔蒙古自治县', 'H', '85.735008883548', '46.798685112637', 654200, 3, 'tr_0 tr_650000 tr_654200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654301, '阿勒泰市', 'A', '88.139226564024', '47.832752648475', 654300, 3, 'tr_0 tr_650000 tr_654300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654321, '布尔津县', 'B', '86.881360170273', '47.707951723888', 654300, 3, 'tr_0 tr_650000 tr_654300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654322, '富蕴县', 'F', '89.531953408055', '46.999951053055', 654300, 3, 'tr_0 tr_650000 tr_654300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654323, '福海县', 'F', '87.493157246325', '47.118140737535', 654300, 3, 'tr_0 tr_650000 tr_654300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654324, '哈巴河县', 'H', '86.424817684664', '48.066148902458', 654300, 3, 'tr_0 tr_650000 tr_654300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654325, '青河县', 'Q', '90.389444407193', '46.68019396705', 654300, 3, 'tr_0 tr_650000 tr_654300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (654326, '吉木乃县', 'J', '85.880818240706', '47.449018413257', 654300, 3, 'tr_0 tr_650000 tr_654300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (659001, '石河子市', 'S', '114.5163190347', '36.772534944449', 659000, 3, 'tr_0 tr_650000 tr_659000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (659002, '阿拉尔市', 'A', '81.287354225395', '40.553263894706', 659000, 3, 'tr_0 tr_650000 tr_659000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (659003, '图木舒克市', 'T', '79.075616286896', '39.871209077425', 659000, 3, 'tr_0 tr_650000 tr_659000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (659004, '五家渠市', 'W', '87.549936632296', '44.172444518901', 659000, 3, 'tr_0 tr_650000 tr_659000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (659006, '铁门关市', 'T', '85.686857831724', '41.863648697693', 659000, 3, 'tr_0 tr_650000 tr_659000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130102, '长安区', 'Z', '114.54561160958', '38.043256136498', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130104, '桥西区', 'Q', '114.46741977426', '38.010381080199', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130105, '新华区', 'X', '114.46943844641', '38.057119539196', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130107, '井陉矿区', 'J', '114.06863186515', '38.070565834517', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130108, '裕华区', 'Y', '114.53758291426', '38.012087686284', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130109, '藁城区', 'G', '114.85337790442', '38.027816555321', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130110, '鹿泉区', 'L', '114.32059757764', '38.09174945759', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130111, '栾城区', 'L', '114.65457561879', '37.905816364165', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130121, '井陉县', 'J', '114.15146299928', '38.038386214927', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130123, '正定县', 'Z', '114.57748106365', '38.151713727954', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130125, '行唐县', 'X', '114.55960676028', '38.444238747676', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130126, '灵寿县', 'L', '114.38947775771', '38.314629370046', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130127, '高邑县', 'G', '114.61841307286', '37.621879561553', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130128, '深泽县', 'S', '115.20740369913', '38.190451203069', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130129, '赞皇县', 'Z', '114.39246354556', '37.671667061291', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130130, '无极县', 'W', '114.98243934348', '38.18543617028', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130131, '平山县', 'P', '113.98543503085', '38.271951013311', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130132, '元氏县', 'Y', '114.53256551866', '37.772338553855', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130133, '赵县', 'Z', '114.78259655058', '37.761858522888', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130171, '石家庄高新技术产业开发区', 'S', '114.47561896798', '38.014375062684', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130172, '石家庄循环化工园区', 'S', '114.69991493042', '38.002797025837', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130181, '辛集市', 'X', '115.22445084279', '37.949309043173', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130183, '晋州市', 'J', '115.0505290147', '38.039491309736', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130184, '新乐市', 'X', '114.69053218327', '38.349292647959', 130100, 3, 'tr_0 tr_130000 tr_130100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130202, '路南区', 'L', '118.20604028639', '39.612986996735', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130203, '路北区', 'L', '118.2239040796', '39.673985965975', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130204, '古冶区', 'G', '118.45340092552', '39.739735914766', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130205, '开平区', 'K', '118.26860762449', '39.677143635862', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130207, '丰南区', 'F', '118.0903655757', '39.581540485109', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130208, '丰润区', 'F', '118.16854133135', '39.838353430851', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130209, '曹妃甸区', 'C', '118.46645986221', '39.279283996335', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130224, '滦南县', 'L', '118.68040524315', '39.510044702469', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130225, '乐亭县', 'L', '118.91938406305', '39.431931320096', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130227, '迁西县', 'Q', '118.32038397781', '40.147837151362', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130229, '玉田县', 'Y', '117.74543440564', '39.906592348189', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130271, '唐山市芦台经济技术开发区', 'T', '117.83195389236', '39.334328330689', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130272, '唐山市汉沽管理区', 'T', '117.88832858176', '39.367125548614', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130273, '唐山高新技术产业开发区', 'T', '118.18645947204', '39.636583724147', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130274, '河北唐山海港经济开发区', 'H', '119.00992050252', '39.237818631017', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130281, '遵化市', 'Z', '117.97237521307', '40.195533204033', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130283, '迁安市', 'Q', '118.70645736056', '40.004183924931', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130284, '滦州市', 'L', '118.71048006247', '39.747115765489', 130200, 3, 'tr_0 tr_130000 tr_130200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130302, '海港区', 'H', '119.61747524097', '39.940412688357', 130300, 3, 'tr_0 tr_130000 tr_130300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130303, '山海关区', 'S', '119.78243521397', '39.984445641831', 130300, 3, 'tr_0 tr_130000 tr_130300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130304, '北戴河区', 'B', '119.49152607118', '39.841005667936', 130300, 3, 'tr_0 tr_130000 tr_130300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130306, '抚宁区', 'F', '119.25154914402', '39.88141356935', 130300, 3, 'tr_0 tr_130000 tr_130300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130321, '青龙满族自治县', 'Q', '118.95648129587', '40.412793702313', 130300, 3, 'tr_0 tr_130000 tr_130300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130322, '昌黎县', 'C', '119.16937521021', '39.71905083388', 130300, 3, 'tr_0 tr_130000 tr_130300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130324, '卢龙县', 'L', '118.89948911126', '39.897958466103', 130300, 3, 'tr_0 tr_130000 tr_130300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130371, '秦皇岛市经济技术开发区', 'Q', '119.48439783729', '39.943641230776', 130300, 3, 'tr_0 tr_130000 tr_130300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130372, '北戴河新区', 'B', '119.47981001139', '39.831809170026', 130300, 3, 'tr_0 tr_130000 tr_130300 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130402, '邯山区', 'H', '114.49638868967', '36.586692191979', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130403, '丛台区', 'C', '114.49943259789', '36.642672565982', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130404, '复兴区', 'F', '114.44809470749', '36.610368592227', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130406, '峰峰矿区', 'F', '114.21948332131', '36.425653614399', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130407, '肥乡区', 'F', '114.80654708226', '36.55382525367', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130408, '永年区', 'Y', '114.55062514246', '36.747569389575', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130423, '临漳县', 'L', '114.62642694614', '36.340765980595', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130424, '成安县', 'C', '114.67657655802', '36.449796208953', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130425, '大名县', 'D', '115.15461253007', '36.291288466231', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130426, '涉县', 'S', '113.69758434883', '36.590691663211', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130427, '磁县', 'C', '114.38043173139', '36.380358940947', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130430, '邱县', 'Q', '115.19339516368', '36.817362417143', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130431, '鸡泽县', 'J', '114.89658577064', '36.916398206414', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130432, '广平县', 'G', '114.95441490649', '36.489779995612', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130433, '馆陶县', 'G', '115.28853676635', '36.553956728653', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130434, '魏县', 'W', '114.94545044631', '36.366156454371', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130435, '曲周县', 'Q', '114.96340442939', '36.771544831336', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130471, '邯郸经济技术开发区', 'H', '114.54562822824', '36.631262731204', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130473, '邯郸冀南新区', 'H', '114.54562822824', '36.631262731204', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130481, '武安市', 'W', '114.21051607638', '36.70248828628', 130400, 3, 'tr_0 tr_130000 tr_130400 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130502, '桥东区', 'Q', '114.51347113674', '37.073749959651', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130503, '桥西区', 'Q', '114.4743934996', '37.066172415704', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130521, '邢台县', 'X', '114.14341085818', '37.17710928752', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130522, '临城县', 'L', '114.50544333972', '37.450788548442', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130523, '内丘县', 'N', '114.51849293403', '37.292857912047', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130524, '柏乡县', 'B', '114.69949736209', '37.488758727152', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130525, '隆尧县', 'L', '114.77661608165', '37.355908006295', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130526, '任县', 'R', '114.67860600983', '37.126726783523', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130527, '南和县', 'N', '114.69054772395', '37.01099797056', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130528, '宁晋县', 'N', '114.92556169283', '37.625612279932', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130529, '巨鹿县', 'J', '115.04358735887', '37.227088328938', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130530, '新河县', 'X', '115.24854716945', '37.534590601536', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130531, '广宗县', 'G', '115.14960474634', '37.080457122162', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130532, '平乡县', 'P', '115.03658174369', '37.069096393044', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130533, '威县', 'W', '115.27361761861', '36.981581608663', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130534, '清河县', 'Q', '115.67439356765', '37.046375401617', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130535, '临西县', 'L', '115.50762943786', '36.87675996654', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130571, '河北邢台经济开发区', 'H', '114.51146225613', '37.076685950966', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130581, '南宫市', 'N', '115.4145290548', '37.364069402723', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130582, '沙河市', 'S', '114.50947385688', '36.861127341145', 130500, 3, 'tr_0 tr_130000 tr_130500 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130602, '竞秀区', 'J', '115.46543414161', '38.883787961691', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130606, '莲池区', 'L', '115.53548768833', '38.860675807041', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130607, '满城区', 'M', '115.3283750886', '38.955441208686', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130608, '清苑区', 'Q', '115.49660588179', '38.771001774749', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130609, '徐水区', 'X', '115.66247952133', '39.024712583834', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130623, '涞水县', 'L', '115.72054302508', '39.400334198489', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130624, '阜平县', 'F', '114.20156347384', '38.855351444796', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130626, '定兴县', 'D', '115.81441011189', '39.269423528527', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130627, '唐县', 'T', '114.9894471146', '38.754019925125', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130628, '高阳县', 'G', '115.78544721513', '38.706257734087', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130629, '容城县', 'R', '115.86863129349', '39.048559435416', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130630, '涞源县', 'L', '114.70047561679', '39.366271691524', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130631, '望都县', 'W', '115.16158760286', '38.700157645549', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130632, '安新县', 'A', '115.94242628266', '38.941734298593', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130633, '易县', 'Y', '115.50360664612', '39.355054469981', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130634, '曲阳县', 'Q', '114.7514548138', '38.628384104122', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130635, '蠡县', 'L', '115.59044548045', '38.494200963238', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130636, '顺平县', 'S', '115.14159743069', '38.843261370364', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130637, '博野县', 'B', '115.47046698806', '38.463408004952', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130638, '雄县', 'X', '116.11460144552', '39.000180119499', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130671, '保定高新技术产业开发区', 'B', '115.47146383769', '38.879987768455', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130672, '保定白沟新城', 'B', '116.06423983354', '39.145149134834', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130681, '涿州市', 'Z', '115.98161971138', '39.491065832', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130682, '定州市', 'D', '114.99649620776', '38.522198840134', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130683, '安国市', 'A', '115.33340802488', '38.424828318687', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130684, '高碑店市', 'G', '115.88056905507', '39.332335447462', 130600, 3, 'tr_0 tr_130000 tr_130600 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130702, '桥东区', 'Q', '114.90060577763', '40.794268437423', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130703, '桥西区', 'Q', '114.87651609843', '40.825605695041', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130705, '宣化区', 'X', '115.1054444068', '40.614591888266', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130706, '下花园区', 'X', '115.29351688226', '40.508145182672', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130708, '万全区', 'W', '114.74742582376', '40.773149648997', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130709, '崇礼区', 'C', '115.28954933632', '40.98047788587', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130722, '张北县', 'Z', '114.7263751121', '41.164943620015', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130723, '康保县', 'K', '114.60635583664', '41.858636884497', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130724, '沽源县', 'G', '115.69540744878', '41.676015876097', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130725, '尚义县', 'S', '113.97552438548', '41.081888482486', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130726, '蔚县', 'W', '114.5954005518', '39.847088636366', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130727, '阳原县', 'Y', '114.15752413604', '40.109588388731', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130728, '怀安县', 'H', '114.39246911506', '40.680369343116', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130730, '怀来县', 'H', '115.52455288485', '40.420289890382', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130731, '涿鹿县', 'Z', '115.21138346203', '40.385834075003', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130732, '赤城县', 'C', '115.83850589957', '40.918761216841', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130771, '张家口市高新技术产业开发区', 'Z', '114.89257223145', '40.773237202691', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130772, '张家口市察北管理区', 'Z', '115.13535097349', '41.463489368202', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130773, '张家口市塞北管理区', 'Z', '115.80931788745', '41.877919284073', 130700, 3, 'tr_0 tr_130000 tr_130700 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130802, '双桥区', 'S', '117.94942790899', '40.980824477401', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130803, '双滦区', 'S', '117.80657828883', '40.964729148178', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130804, '鹰手营子矿区', 'Y', '117.66560909159', '40.552043233623', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130821, '承德县', 'C', '118.18045573699', '40.774367194936', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130822, '兴隆县', 'X', '117.50742737264', '40.423454029635', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130824, '滦平县', 'L', '117.33949787111', '40.94756096291', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130825, '隆化县', 'L', '117.7454510243', '41.319898805021', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130826, '丰宁满族自治县', 'F', '116.65239270009', '41.215336380004', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130827, '宽城满族自治县', 'K', '118.49159436055', '40.617151507814', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130828, '围场满族蒙古族自治县', 'W', '117.76656434785', '41.944323773611', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130871, '承德高新技术产业开发区', 'C', '117.96939750997', '40.957856012338', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130881, '平泉市', 'P', '118.70742672204', '41.023755625929', 130800, 3, 'tr_0 tr_130000 tr_130800 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130902, '新华区', 'X', '116.87243317375', '38.320366719478', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130903, '运河区', 'Y', '116.8386119713', '38.316522737476', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130921, '沧县', 'C', '116.88439779466', '38.299452743407', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130922, '青县', 'Q', '116.81057477836', '38.58846475864', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130923, '东光县', 'D', '116.54340955698', '37.894513906653', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130924, '海兴县', 'H', '117.50441804918', '38.149402516518', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130925, '盐山县', 'Y', '117.23741362448', '38.064318399559', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130926, '肃宁县', 'S', '115.83651767998', '38.428905919718', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130927, '南皮县', 'N', '116.71560115883', '38.045187886965', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130928, '吴桥县', 'W', '116.39739206243', '37.633908755554', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130929, '献县', 'X', '116.12956002887', '38.195981438007', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130930, '孟村回族自治县', 'M', '117.11043607455', '38.059839127888', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130971, '河北沧州经济开发区', 'H', '116.84558075595', '38.310215141107', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130972, '沧州高新技术产业开发区', 'C', '116.81727200975', '38.34342368505', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130973, '沧州渤海新区', 'C', '117.7623777537', '38.282913560669', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130981, '泊头市', 'P', '116.58462803581', '38.089256915446', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130982, '任丘市', 'R', '116.1056050955', '38.717348630775', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130983, '黄骅市', 'H', '117.33648109172', '38.377493900735', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (130984, '河间市', 'H', '116.10562809212', '38.451356515106', 130900, 3, 'tr_0 tr_130000 tr_130900 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131002, '安次区', 'A', '116.70963326617', '39.526159764041', 131000, 3, 'tr_0 tr_130000 tr_131000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131003, '广阳区', 'G', '116.71761426148', '39.528611447334', 131000, 3, 'tr_0 tr_130000 tr_131000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131022, '固安县', 'G', '116.30542004093', '39.444484855304', 131000, 3, 'tr_0 tr_130000 tr_131000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131023, '永清县', 'Y', '116.50542928985', '39.327852998574', 131000, 3, 'tr_0 tr_130000 tr_131000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131024, '香河县', 'X', '117.0124021078', '39.767939188546', 131000, 3, 'tr_0 tr_130000 tr_131000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131025, '大城县', 'D', '116.66040917846', '38.710858640026', 131000, 3, 'tr_0 tr_130000 tr_131000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131026, '文安县', 'W', '116.464609479', '38.87895049307', 131000, 3, 'tr_0 tr_130000 tr_131000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131028, '大厂回族自治县', 'D', '116.99640912565', '39.892208394086', 131000, 3, 'tr_0 tr_130000 tr_131000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131071, '廊坊经济技术开发区', 'L', '116.76777922809', '39.587610159458', 131000, 3, 'tr_0 tr_130000 tr_131000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131081, '霸州市', 'B', '116.3983972663', '39.130920596981', 131000, 3, 'tr_0 tr_130000 tr_131000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131082, '三河市', 'S', '117.08458787248', '39.988099552443', 131000, 3, 'tr_0 tr_130000 tr_131000 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131102, '桃城区', 'T', '115.68139532011', '37.741636751694', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131103, '冀州区', 'J', '115.58542988146', '37.557086025833', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131121, '枣强县', 'Z', '115.7305629044', '37.519363689764', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131122, '武邑县', 'W', '115.89451363117', '37.807764276867', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131123, '武强县', 'W', '115.98961391178', '38.046856805237', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131124, '饶阳县', 'R', '115.73257160535', '38.241037525428', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131125, '安平县', 'A', '115.52554928532', '38.240506922191', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131126, '故城县', 'G', '115.97260216135', '37.353347552477', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131127, '景县', 'J', '116.2774107853', '37.698814551395', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131128, '阜城县', 'F', '116.18242153525', '37.868732457906', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131171, '河北衡水高新技术产业开发区', 'H', '115.73456139967', '37.807821775773', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131172, '衡水滨湖新区', 'H', '115.70627999969', '37.701616037093', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (131182, '深州市', 'S', '115.56636927583', '38.006941234922', 131100, 3, 'tr_0 tr_130000 tr_131100 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640202, '大武口区', '', '', '', 640200, 3, 'tr_0 tr_640000 tr_640200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640205, '惠农区', '', '', '', 640200, 3, 'tr_0 tr_640000 tr_640200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'), + (640221, '平罗县', '', '', '', 640200, 3, 'tr_0 tr_640000 tr_640200 ', 0, 1, '2022-10-07 20:42:26', '2022-11-01 00:00:00'); + +-- -------------------------------------------------------- + +-- +-- 转存表中的数据 hg_sys_serve_license +-- + +INSERT INTO hg_sys_serve_license (id, "group", name, appid, secret_key, remote_addr, online_limit, login_times, last_login_at, last_active_at, routes, allowed_ips, end_at, remark, status, created_at, updated_at) VALUES + (1, 'cron', '定时任务', '1002', 'hotgo', '127.0.0.1:62082', 1, 193, '2024-07-21 21:46:36', '2024-07-21 21:59:08', NULL, '127.0.0.1', '2033-03-09 00:00:00', '这是默认的定时任务TCP客户端授权凭证。', 1, '2023-03-11 00:00:00', '2024-07-21 21:59:08'), + (2, 'auth', '授权服务', 'mengshuai', '123456', '127.0.0.1:50640', 1, 3, '2023-07-26 17:05:30', '2023-07-26 17:07:01', '["ExampleRPCHelloReq", "ExampleHelloReq", "AuthSummaryReq"]', '127.0.0.1', '2033-03-09 00:00:00', '这是一个测试的授权服务,可以为第三方平台提供授权支持。', 1, '2023-03-11 00:00:00', '2023-07-26 17:07:01'); + +-- -------------------------------------------------------- + +-- 插入 hg_sys_sms_log 表数据 +INSERT INTO hg_sys_sms_log ( + id, event, mobile, code, times, ip, status, created_at, updated_at +) VALUES + (1, 'code', '1530380571', '1234', 1, '39.165.245.100', 1, '2022-12-16 16:01:30', '2022-01-24 11:33:16'); + +-- 插入 hg_test_category 表数据 +INSERT INTO hg_test_category ( + id, name, short_name, description, sort, remark, status, + created_at, updated_at, deleted_at +) VALUES + (1, '官方新闻', 'G', '用于演示关联表和字典选项生成和使用。', 10, '', 1, + '2023-01-03 00:00:00', '2023-01-03 00:00:00', NULL), + (2, '移动应用', 'Y', '', 20, '', 1, + '2023-01-03 00:00:00', '2023-01-03 00:00:00', NULL), + (3, '微信公众号', 'W', '', 30, '', 1, + '2023-01-03 00:00:00', '2023-01-03 00:00:00', NULL), + (4, '系统搭建', 'X', '', 40, '', 1, + '2023-01-03 00:00:00', '2023-01-03 00:00:00', NULL); + +-- 更新序列值 +SELECT setval('hg_test_category_id_seq', (SELECT MAX(id) FROM hg_test_category)); + +-- hg_addon_hgexample_tenant_order +CREATE INDEX ON hg_addon_hgexample_tenant_order (order_sn); +CREATE INDEX ON hg_addon_hgexample_tenant_order (user_id); +CREATE INDEX ON hg_addon_hgexample_tenant_order (merchant_id); +CREATE INDEX ON hg_addon_hgexample_tenant_order (tenant_id); + +-- hg_admin_cash +CREATE INDEX ON hg_admin_cash (member_id); + +-- hg_admin_credits_log +CREATE INDEX ON hg_admin_credits_log (member_id); + +-- hg_admin_dept +CREATE INDEX ON hg_admin_dept (pid); + +-- hg_admin_member +CREATE UNIQUE INDEX ON hg_admin_member (invite_code); +CREATE INDEX ON hg_admin_member (dept_id); +CREATE INDEX ON hg_admin_member (pid); + +-- hg_admin_menu +CREATE UNIQUE INDEX ON hg_admin_menu (name); +CREATE INDEX ON hg_admin_menu (pid); +CREATE INDEX ON hg_admin_menu (status); +CREATE INDEX ON hg_admin_menu (type); + +-- hg_admin_notice_read +CREATE UNIQUE INDEX ON hg_admin_notice_read (notice_id, member_id); + +-- hg_admin_oauth +CREATE INDEX ON hg_admin_oauth (oauth_client, oauth_openid); +CREATE INDEX ON hg_admin_oauth (member_id); + +-- hg_admin_order +CREATE INDEX ON hg_admin_order (order_sn); +CREATE INDEX ON hg_admin_order (member_id); + +-- hg_pay_log +CREATE UNIQUE INDEX ON hg_pay_log (order_sn); +CREATE INDEX ON hg_pay_log (member_id); + +-- hg_pay_refund +CREATE INDEX ON hg_pay_refund (order_sn); + +-- hg_sys_addons_config +CREATE UNIQUE INDEX ON hg_sys_addons_config (addon_name, key); +CREATE INDEX ON hg_sys_addons_config (addon_name); +CREATE INDEX ON hg_sys_addons_config (addon_name, "group"); + +-- hg_sys_addons_install +CREATE UNIQUE INDEX ON hg_sys_addons_install (name); + +-- hg_sys_attachment +CREATE INDEX ON hg_sys_attachment (md5); + +-- hg_sys_blacklist +CREATE UNIQUE INDEX ON hg_sys_blacklist (ip); + +-- hg_sys_config +CREATE INDEX ON hg_sys_config ("group"); +CREATE INDEX ON hg_sys_config (key); + +-- +-- Indexes for table hg_sys_dict_data +-- +CREATE INDEX dict_data_idx ON hg_sys_dict_data (type); + +-- hg_sys_dict_type +CREATE UNIQUE INDEX dict_type_idx ON hg_sys_dict_type (type); + +-- hg_sys_ems_log +CREATE INDEX ems_log_email_idx ON hg_sys_ems_log (email); + +-- hg_sys_log +CREATE INDEX log_error_code_idx ON hg_sys_log (error_code); +CREATE INDEX log_req_id_idx ON hg_sys_log (req_id); +CREATE INDEX log_member_id_idx ON hg_sys_log (member_id); + +-- hg_sys_login_log +CREATE INDEX login_log_member_id_idx ON hg_sys_login_log (member_id); +CREATE INDEX login_log_req_id_idx ON hg_sys_login_log (req_id); + +-- hg_sys_provinces +CREATE INDEX provinces_pid_idx ON hg_sys_provinces (pid); + +-- hg_sys_serve_license +CREATE UNIQUE INDEX serve_license_appid_idx ON hg_sys_serve_license (appid); + +-- hg_sys_serve_log +CREATE INDEX serve_log_level_format_idx ON hg_sys_serve_log (level_format); +CREATE INDEX serve_log_trace_id_idx ON hg_sys_serve_log (trace_id); + +-- hg_sys_sms_log +CREATE INDEX sms_log_mobile_idx ON hg_sys_sms_log (mobile); + +-- hg_test_category +-- hg_addon_hgexample_table +ALTER SEQUENCE hg_addon_hgexample_table_id_seq RESTART WITH 7; + +-- hg_addon_hgexample_tenant_order +ALTER SEQUENCE hg_addon_hgexample_tenant_order_id_seq RESTART WITH 2; + +-- hg_admin_cash +ALTER SEQUENCE hg_admin_cash_id_seq RESTART WITH 2; + +-- hg_admin_credits_log +ALTER SEQUENCE hg_admin_credits_log_id_seq RESTART WITH 8; + +-- hg_admin_dept +ALTER SEQUENCE hg_admin_dept_id_seq RESTART WITH 113; + +-- hg_admin_member +ALTER SEQUENCE hg_admin_member_id_seq RESTART WITH 14; + +-- hg_admin_menu +ALTER SEQUENCE hg_admin_menu_id_seq RESTART WITH 2431; + +-- hg_admin_notice +ALTER SEQUENCE hg_admin_notice_id_seq RESTART WITH 33; + +-- hg_admin_notice_read +ALTER SEQUENCE hg_admin_notice_read_id_seq RESTART WITH 9; + +-- hg_admin_oauth +SELECT setval('hg_admin_oauth_id_seq', (SELECT COALESCE(MAX(id), 0) + 1 FROM hg_admin_oauth)); + +-- hg_admin_order +ALTER SEQUENCE hg_admin_order_id_seq RESTART WITH 2; + +-- hg_admin_post +ALTER SEQUENCE hg_admin_post_id_seq RESTART WITH 7; + +-- hg_admin_role +ALTER SEQUENCE hg_admin_role_id_seq RESTART WITH 211; + +-- hg_admin_role_casbin +SELECT setval('hg_admin_role_casbin_id_seq', (SELECT COALESCE(MAX(id), 0) + 1 FROM hg_admin_role_casbin)); + +-- hg_pay_log +ALTER SEQUENCE hg_pay_log_id_seq RESTART WITH 2; + +-- hg_pay_refund +SELECT setval('hg_pay_refund_id_seq', (SELECT COALESCE(MAX(id), 0) + 1 FROM hg_pay_refund)); + +-- hg_sys_addons_config +ALTER SEQUENCE hg_sys_addons_config_id_seq RESTART WITH 2; + +-- hg_sys_addons_install +ALTER SEQUENCE hg_sys_addons_install_id_seq RESTART WITH 2; + +-- hg_sys_attachment +ALTER SEQUENCE hg_sys_attachment_id_seq RESTART WITH 9; + +-- hg_sys_blacklist +ALTER SEQUENCE hg_sys_blacklist_id_seq RESTART WITH 8; + +-- hg_sys_config +ALTER SEQUENCE hg_sys_config_id_seq RESTART WITH 129; + +-- hg_sys_cron +ALTER SEQUENCE hg_sys_cron_id_seq RESTART WITH 11; + +-- hg_sys_cron_group +ALTER SEQUENCE hg_sys_cron_group_id_seq RESTART WITH 3; + +-- hg_sys_dict_data +ALTER SEQUENCE hg_sys_dict_data_id_seq RESTART WITH 171; + +-- hg_sys_dict_type +ALTER SEQUENCE hg_sys_dict_type_id_seq RESTART WITH 45; + +-- hg_sys_ems_log +ALTER SEQUENCE hg_sys_ems_log_id_seq RESTART WITH 5; + +-- hg_sys_gen_codes +ALTER SEQUENCE hg_sys_gen_codes_id_seq RESTART WITH 12; + +-- hg_sys_gen_curd_demo +ALTER SEQUENCE hg_sys_gen_curd_demo_id_seq RESTART WITH 16; + +-- hg_sys_gen_tree_demo +ALTER SEQUENCE hg_sys_gen_tree_demo_id_seq RESTART WITH 41; + +-- hg_sys_log +SELECT setval('hg_sys_log_id_seq', (SELECT COALESCE(MAX(id), 0) + 1 FROM hg_sys_log)); + +-- hg_sys_login_log +SELECT setval('hg_sys_login_log_id_seq', (SELECT COALESCE(MAX(id), 0) + 1 FROM hg_sys_login_log)); + +-- hg_sys_serve_license +ALTER SEQUENCE hg_sys_serve_license_id_seq RESTART WITH 3; + +-- hg_sys_serve_log +SELECT setval('hg_sys_serve_log_id_seq', (SELECT COALESCE(MAX(id), 0) + 1 FROM hg_sys_serve_log)); + +-- hg_sys_sms_log +ALTER SEQUENCE hg_sys_sms_log_id_seq RESTART WITH 2; + +-- hg_test_category +ALTER SEQUENCE hg_test_category_id_seq RESTART WITH 5;