From f6024f0964dd4600847747e9239cd8105b891ac2 Mon Sep 17 00:00:00 2001
From: richjohnrambo
Date: Sat, 10 Oct 2026 20:56:17 +0800
Subject: [PATCH] feat: add Go backend
---
.gitignore | 4 +
server/.gitattributes | 1 +
server/.gitignore | 39 +
server/.golangci.yml | 287 +
server/Makefile | 113 +
server/README.MD | 1 +
server/addons/addons.go | 6 +
server/addons/hgexample/README.MD | 39 +
.../addons/hgexample/api/admin/comp/import.go | 26 +
.../hgexample/api/admin/config/config.go | 30 +
.../addons/hgexample/api/admin/index/index.go | 21 +
.../addons/hgexample/api/admin/table/table.go | 83 +
.../api/admin/tenantorder/tenantorder.go | 59 +
.../api/admin/treetable/treetable.go | 92 +
.../addons/hgexample/api/api/index/index.go | 21 +
.../addons/hgexample/api/home/index/index.go | 21 +
.../hgexample/api/websocket/index/index.go | 21 +
.../hgexample/controller/admin/sys/comp.go | 46 +
.../hgexample/controller/admin/sys/config.go | 33 +
.../hgexample/controller/admin/sys/index.go | 30 +
.../hgexample/controller/admin/sys/table.go | 85 +
.../controller/admin/sys/tenant_order.go | 67 +
.../controller/admin/sys/tree_table.go | 92 +
.../addons/hgexample/controller/api/index.go | 30 +
.../addons/hgexample/controller/home/index.go | 34 +
.../controller/websocket/handler/index.go | 25 +
.../hgexample/controller/websocket/index.go | 30 +
server/addons/hgexample/crons/crons.go | 9 +
server/addons/hgexample/global/global.go | 12 +
server/addons/hgexample/global/init.go | 22 +
server/addons/hgexample/logic/.gitkeep | 0
server/addons/hgexample/logic/logic.go | 9 +
server/addons/hgexample/logic/sys/config.go | 59 +
server/addons/hgexample/logic/sys/index.go | 35 +
server/addons/hgexample/logic/sys/table.go | 233 +
.../hgexample/logic/sys/tenant_order.go | 174 +
.../addons/hgexample/logic/sys/tree_table.go | 186 +
server/addons/hgexample/main.go | 97 +
server/addons/hgexample/model/config.go | 11 +
.../hgexample/model/input/sysin/config.go | 24 +
.../hgexample/model/input/sysin/index.go | 27 +
.../hgexample/model/input/sysin/table.go | 180 +
.../model/input/sysin/tenant_order.go | 123 +
.../hgexample/model/input/sysin/tree_table.go | 47 +
server/addons/hgexample/queues/queues.go | 9 +
server/addons/hgexample/router/admin.go | 36 +
server/addons/hgexample/router/api.go | 32 +
.../addons/hgexample/router/genrouter/init.go | 34 +
.../router/genrouter/tenant_order.go | 13 +
server/addons/hgexample/router/home.go | 25 +
server/addons/hgexample/router/websocket.go | 40 +
server/addons/hgexample/service/.gitkeep | 0
server/addons/hgexample/service/sys.go | 139 +
server/addons/modules/.gitkeep | 0
server/addons/modules/hgexample.go | 8 +
server/api/admin/addons/addons.go | 59 +
server/api/admin/appmember/appmember.go | 149 +
server/api/admin/approval/approval.go | 53 +
server/api/admin/attachment/attachment.go | 49 +
server/api/admin/bizaudit/biz_audit.go | 23 +
server/api/admin/blacklist/blacklist.go | 57 +
server/api/admin/cash/cash.go | 49 +
server/api/admin/common/console.go | 52 +
server/api/admin/common/ems.go | 27 +
server/api/admin/common/site.go | 90 +
server/api/admin/common/sms.go | 37 +
server/api/admin/common/upload.go | 48 +
server/api/admin/common/wechat.go | 31 +
server/api/admin/config/config.go | 47 +
server/api/admin/creditslog/creditslog.go | 33 +
server/api/admin/cron/cron.go | 93 +
server/api/admin/cron/cron_group.go | 83 +
server/api/admin/curddemo/curddemo.go | 85 +
.../admin/customerservice/customerservice.go | 38 +
server/api/admin/dept/dept.go | 75 +
server/api/admin/dict/dict_data.go | 53 +
server/api/admin/dict/dict_type.go | 36 +
server/api/admin/emslog/emslog.go | 65 +
server/api/admin/gencodes/gencodes.go | 118 +
server/api/admin/log/log.go | 56 +
server/api/admin/loginlog/loginlog.go | 39 +
server/api/admin/member/member.go | 138 +
server/api/admin/memberlevel/memberlevel.go | 67 +
server/api/admin/menu/menu.go | 39 +
server/api/admin/monitor/monitor.go | 106 +
.../admin/normaltreedemo/normaltreedemo.go | 69 +
server/api/admin/notice/notice.go | 128 +
.../admin/optiontreedemo/optiontreedemo.go | 69 +
server/api/admin/order/order.go | 93 +
server/api/admin/pay/refund.go | 33 +
server/api/admin/portal/portal.go | 144 +
server/api/admin/post/post.go | 67 +
server/api/admin/product/product.go | 43 +
server/api/admin/provinces/provinces.go | 115 +
.../api/admin/rechargeorder/rechargeorder.go | 37 +
server/api/admin/role/role.go | 82 +
server/api/admin/servelicense/servelicense.go | 74 +
server/api/admin/servelog/servelog.go | 49 +
server/api/admin/smslog/smslog.go | 41 +
server/api/admin/task/task.go | 38 +
server/api/admin/taskhall/taskhall.go | 36 +
.../admin/tasksubmission/tasksubmission.go | 26 +
server/api/admin/testcategory/testcategory.go | 69 +
server/api/admin/tradeorder/tradeorder.go | 45 +
.../admin/withdrawalorder/withdrawalorder.go | 39 +
server/api/api/member/member.go | 15 +
server/api/api/member/v1/member.go | 16 +
server/api/api/pay/pay.go | 17 +
server/api/api/pay/v1/notify.go | 41 +
server/api/home/base/site.go | 16 +
server/api/servmsg/auth.go | 21 +
server/api/servmsg/cron.go | 57 +
server/api/servmsg/example.go | 33 +
server/api/websocket/base/send.go | 20 +
server/go.mod | 165 +
server/go.sum | 706 ++
server/hack/config.yaml | 48 +
server/internal/cmd/auth.go | 35 +
server/internal/cmd/cmd.go | 86 +
server/internal/cmd/cron.go | 45 +
server/internal/cmd/handler_shutdown.go | 44 +
server/internal/cmd/http.go | 106 +
server/internal/cmd/queue.go | 43 +
server/internal/cmd/tools.go | 107 +
server/internal/cmd/up.go | 65 +
.../cmd/upgrade/fix/admin_menu_tree.go | 48 +
server/internal/consts/addons.go | 80 +
server/internal/consts/app.go | 15 +
server/internal/consts/app_member.go | 105 +
server/internal/consts/approval.go | 66 +
server/internal/consts/cache.go | 13 +
server/internal/consts/captcha.go | 6 +
server/internal/consts/cash.go | 13 +
server/internal/consts/config.go | 117 +
server/internal/consts/context.go | 15 +
server/internal/consts/credit_log.go | 48 +
server/internal/consts/cron.go | 17 +
server/internal/consts/debris.go | 37 +
server/internal/consts/dept.go | 30 +
server/internal/consts/ems.go | 38 +
server/internal/consts/error.go | 35 +
server/internal/consts/event.go | 10 +
server/internal/consts/gencodes.go | 96 +
server/internal/consts/http.go | 63 +
server/internal/consts/notice.go | 13 +
server/internal/consts/order.go | 66 +
server/internal/consts/pay.go | 105 +
server/internal/consts/portal.go | 70 +
server/internal/consts/product_task.go | 26 +
server/internal/consts/pubsub.go | 12 +
server/internal/consts/queue.go | 14 +
server/internal/consts/role.go | 90 +
server/internal/consts/servelicense.go | 29 +
server/internal/consts/sms.go | 33 +
server/internal/consts/status.go | 49 +
server/internal/consts/trade.go | 122 +
server/internal/consts/upload.go | 16 +
server/internal/consts/version.go | 11 +
server/internal/consts/wechat.go | 18 +
.../internal/controller/admin/admin/cash.go | 60 +
.../controller/admin/admin/credits_log.go | 39 +
.../internal/controller/admin/admin/dept.go | 75 +
.../internal/controller/admin/admin/member.go | 145 +
.../internal/controller/admin/admin/menu.go | 37 +
.../controller/admin/admin/monitor.go | 243 +
.../internal/controller/admin/admin/notice.go | 127 +
.../internal/controller/admin/admin/order.go | 91 +
.../internal/controller/admin/admin/post.go | 67 +
.../internal/controller/admin/admin/role.go | 81 +
.../controller/admin/common/console.go | 51 +
.../internal/controller/admin/common/ems.go | 75 +
.../internal/controller/admin/common/site.go | 155 +
.../internal/controller/admin/common/sms.go | 67 +
.../controller/admin/common/upload.go | 66 +
.../controller/admin/common/wechat.go | 28 +
.../internal/controller/admin/pay/refund.go | 39 +
.../internal/controller/admin/sys/addons.go | 61 +
.../controller/admin/sys/app_member.go | 157 +
.../internal/controller/admin/sys/approval.go | 64 +
.../controller/admin/sys/attachment.go | 55 +
.../controller/admin/sys/biz_audit.go | 34 +
.../controller/admin/sys/blacklist.go | 61 +
.../internal/controller/admin/sys/config.go | 53 +
server/internal/controller/admin/sys/cron.go | 97 +
.../controller/admin/sys/cron_group.go | 80 +
.../controller/admin/sys/curd_demo.go | 91 +
.../controller/admin/sys/customer_service.go | 40 +
.../controller/admin/sys/dict_data.go | 68 +
.../controller/admin/sys/dict_type.go | 37 +
.../internal/controller/admin/sys/ems_log.go | 61 +
.../controller/admin/sys/gen_codes.go | 137 +
server/internal/controller/admin/sys/log.go | 56 +
.../controller/admin/sys/login_log.go | 45 +
.../controller/admin/sys/member_level.go | 71 +
.../controller/admin/sys/normal_tree_demo.go | 89 +
.../controller/admin/sys/option_tree_demo.go | 89 +
.../internal/controller/admin/sys/portal.go | 168 +
.../internal/controller/admin/sys/product.go | 52 +
.../controller/admin/sys/provinces.go | 129 +
.../controller/admin/sys/recharge_order.go | 42 +
.../controller/admin/sys/serve_license.go | 74 +
.../controller/admin/sys/serve_log.go | 55 +
.../internal/controller/admin/sys/sms_log.go | 49 +
server/internal/controller/admin/sys/task.go | 48 +
.../controller/admin/sys/task_hall.go | 42 +
.../controller/admin/sys/task_submission.go | 37 +
.../controller/admin/sys/test_category.go | 79 +
.../controller/admin/sys/trade_order.go | 54 +
.../controller/admin/sys/withdrawal_order.go | 41 +
.../internal/controller/api/member/member.go | 5 +
.../controller/api/member/member_new.go | 15 +
.../api/member/member_v1_get_id_by_code.go | 14 +
server/internal/controller/api/pay/pay.go | 5 +
server/internal/controller/api/pay/pay_new.go | 15 +
.../api/pay/pay_v1_notify_ali_pay.go | 22 +
.../api/pay/pay_v1_notify_qq_pay.go | 26 +
.../api/pay/pay_v1_notify_wx_pay.go | 22 +
server/internal/controller/home/base/site.go | 38 +
.../websocket/handler/admin/monitor.go | 198 +
.../websocket/handler/common/site.go | 39 +
server/internal/controller/websocket/send.go | 29 +
server/internal/crons/close_order.go | 45 +
server/internal/crons/test.go | 33 +
server/internal/crons/test2.go | 45 +
server/internal/dao/.gitkeep | 0
server/internal/dao/addon_hgexample_table.go | 22 +
.../dao/addon_hgexample_tenant_order.go | 22 +
server/internal/dao/admin_cash.go | 22 +
server/internal/dao/admin_credits_log.go | 22 +
server/internal/dao/admin_dept.go | 22 +
server/internal/dao/admin_member.go | 22 +
server/internal/dao/admin_member_post.go | 22 +
server/internal/dao/admin_member_role.go | 22 +
server/internal/dao/admin_menu.go | 22 +
server/internal/dao/admin_notice.go | 22 +
server/internal/dao/admin_notice_read.go | 22 +
server/internal/dao/admin_oauth.go | 22 +
server/internal/dao/admin_order.go | 22 +
server/internal/dao/admin_post.go | 22 +
server/internal/dao/admin_role.go | 22 +
server/internal/dao/admin_role_casbin.go | 22 +
server/internal/dao/admin_role_menu.go | 22 +
server/internal/dao/app_member.go | 22 +
server/internal/dao/app_member_address.go | 22 +
server/internal/dao/app_member_level.go | 22 +
.../internal/dao/app_member_level_version.go | 22 +
server/internal/dao/app_member_notice.go | 22 +
.../dao/app_member_payment_account.go | 22 +
server/internal/dao/app_member_profile.go | 22 +
server/internal/dao/app_member_status_log.go | 22 +
server/internal/dao/approval_action.go | 22 +
server/internal/dao/approval_request.go | 22 +
server/internal/dao/banner.go | 22 +
server/internal/dao/biz_audit_log.go | 22 +
server/internal/dao/content.go | 22 +
server/internal/dao/content_version.go | 22 +
server/internal/dao/customer_service.go | 22 +
server/internal/dao/dashboard_daily_stat.go | 22 +
server/internal/dao/finance_review.go | 22 +
server/internal/dao/idempotency_record.go | 22 +
.../dao/internal/addon_hgexample_table.go | 151 +
.../internal/addon_hgexample_tenant_order.go | 99 +
server/internal/dao/internal/admin_cash.go | 97 +
.../dao/internal/admin_credits_log.go | 107 +
server/internal/dao/internal/admin_dept.go | 105 +
server/internal/dao/internal/admin_member.go | 133 +
.../dao/internal/admin_member_post.go | 81 +
.../dao/internal/admin_member_role.go | 81 +
server/internal/dao/internal/admin_menu.go | 129 +
server/internal/dao/internal/admin_notice.go | 105 +
.../dao/internal/admin_notice_read.go | 89 +
server/internal/dao/internal/admin_oauth.go | 107 +
server/internal/dao/internal/admin_order.go | 101 +
server/internal/dao/internal/admin_post.go | 93 +
server/internal/dao/internal/admin_role.go | 103 +
.../dao/internal/admin_role_casbin.go | 93 +
.../internal/dao/internal/admin_role_menu.go | 81 +
server/internal/dao/internal/app_member.go | 135 +
.../dao/internal/app_member_address.go | 115 +
.../internal/dao/internal/app_member_level.go | 111 +
.../dao/internal/app_member_level_version.go | 119 +
.../dao/internal/app_member_notice.go | 103 +
.../internal/app_member_payment_account.go | 121 +
.../dao/internal/app_member_profile.go | 107 +
.../dao/internal/app_member_status_log.go | 101 +
.../internal/dao/internal/approval_action.go | 101 +
.../internal/dao/internal/approval_request.go | 125 +
server/internal/dao/internal/banner.go | 119 +
server/internal/dao/internal/biz_audit_log.go | 113 +
server/internal/dao/internal/content.go | 111 +
.../internal/dao/internal/content_version.go | 107 +
.../internal/dao/internal/customer_service.go | 115 +
.../dao/internal/dashboard_daily_stat.go | 99 +
.../internal/dao/internal/finance_review.go | 101 +
.../dao/internal/idempotency_record.go | 103 +
server/internal/dao/internal/outbox_event.go | 103 +
server/internal/dao/internal/pay_log.go | 137 +
server/internal/dao/internal/pay_refund.go | 103 +
.../internal/dao/internal/payment_channel.go | 117 +
server/internal/dao/internal/product.go | 129 +
.../internal/dao/internal/product_category.go | 107 +
.../internal/dao/internal/recharge_order.go | 125 +
.../dao/internal/sensitive_access_log.go | 105 +
.../dao/internal/site_config_version.go | 113 +
.../dao/internal/sys_addons_config.go | 105 +
.../dao/internal/sys_addons_install.go | 89 +
.../internal/dao/internal/sys_attachment.go | 111 +
server/internal/dao/internal/sys_blacklist.go | 89 +
server/internal/dao/internal/sys_config.go | 103 +
server/internal/dao/internal/sys_cron.go | 103 +
.../internal/dao/internal/sys_cron_group.go | 95 +
server/internal/dao/internal/sys_dict_data.go | 101 +
server/internal/dao/internal/sys_dict_type.go | 95 +
server/internal/dao/internal/sys_ems_log.go | 97 +
server/internal/dao/internal/sys_gen_codes.go | 105 +
.../dao/internal/sys_gen_curd_demo.go | 111 +
.../dao/internal/sys_gen_tree_demo.go | 105 +
server/internal/dao/internal/sys_log.go | 123 +
server/internal/dao/internal/sys_login_log.go | 105 +
server/internal/dao/internal/sys_provinces.go | 101 +
.../dao/internal/sys_serve_license.go | 111 +
server/internal/dao/internal/sys_serve_log.go | 97 +
server/internal/dao/internal/sys_sms_log.go | 95 +
server/internal/dao/internal/task.go | 127 +
server/internal/dao/internal/task_hall.go | 117 +
.../internal/dao/internal/task_hall_level.go | 87 +
server/internal/dao/internal/task_level.go | 87 +
.../internal/dao/internal/task_submission.go | 125 +
server/internal/dao/internal/test_category.go | 97 +
server/internal/dao/internal/trade_order.go | 129 +
.../internal/dao/internal/wallet_account.go | 101 +
.../dao/internal/wallet_adjustment_request.go | 115 +
server/internal/dao/internal/wallet_ledger.go | 115 +
.../internal/dao/internal/withdrawal_order.go | 135 +
server/internal/dao/outbox_event.go | 22 +
server/internal/dao/pay_log.go | 22 +
server/internal/dao/pay_refund.go | 22 +
server/internal/dao/payment_channel.go | 22 +
server/internal/dao/product.go | 22 +
server/internal/dao/product_category.go | 22 +
server/internal/dao/recharge_order.go | 22 +
server/internal/dao/sensitive_access_log.go | 22 +
server/internal/dao/site_config_version.go | 22 +
server/internal/dao/sys_addons_config.go | 22 +
server/internal/dao/sys_addons_install.go | 22 +
server/internal/dao/sys_attachment.go | 22 +
server/internal/dao/sys_blacklist.go | 22 +
server/internal/dao/sys_config.go | 22 +
server/internal/dao/sys_cron.go | 22 +
server/internal/dao/sys_cron_group.go | 22 +
server/internal/dao/sys_dict_data.go | 22 +
server/internal/dao/sys_dict_type.go | 22 +
server/internal/dao/sys_ems_log.go | 22 +
server/internal/dao/sys_gen_codes.go | 22 +
server/internal/dao/sys_gen_curd_demo.go | 22 +
server/internal/dao/sys_gen_tree_demo.go | 22 +
server/internal/dao/sys_log.go | 22 +
server/internal/dao/sys_login_log.go | 22 +
server/internal/dao/sys_provinces.go | 22 +
server/internal/dao/sys_serve_license.go | 22 +
server/internal/dao/sys_serve_log.go | 22 +
server/internal/dao/sys_sms_log.go | 22 +
server/internal/dao/task.go | 22 +
server/internal/dao/task_hall.go | 22 +
server/internal/dao/task_hall_level.go | 22 +
server/internal/dao/task_level.go | 22 +
server/internal/dao/task_submission.go | 22 +
server/internal/dao/test_category.go | 22 +
server/internal/dao/trade_order.go | 22 +
server/internal/dao/wallet_account.go | 22 +
.../internal/dao/wallet_adjustment_request.go | 22 +
server/internal/dao/wallet_ledger.go | 22 +
server/internal/dao/withdrawal_order.go | 22 +
server/internal/global/cluster.go | 51 +
server/internal/global/global.go | 8 +
server/internal/global/httproutes.go | 125 +
server/internal/global/init.go | 168 +
server/internal/library/addons/addons.go | 61 +
server/internal/library/addons/build.go | 138 +
.../internal/library/addons/build_layout.go | 232 +
server/internal/library/addons/install.go | 120 +
server/internal/library/addons/module.go | 186 +
server/internal/library/cache/cache.go | 58 +
server/internal/library/cache/file/file.go | 322 +
server/internal/library/captcha/captcha.go | 77 +
server/internal/library/casbin/adapter.go | 333 +
server/internal/library/casbin/casbin_test.go | 68 +
server/internal/library/casbin/enforcer.go | 164 +
server/internal/library/contexts/context.go | 195 +
server/internal/library/contexts/detached.go | 35 +
server/internal/library/cron/cron.go | 313 +
server/internal/library/cron/cron_gen.go | 88 +
server/internal/library/debris/debris.go | 9 +
server/internal/library/dict/dict.go | 81 +
server/internal/library/dict/dict_option.go | 181 +
.../library/dict/dict_register_enums.go | 70 +
.../library/dict/dict_register_func.go | 129 +
server/internal/library/ems/ems.go | 50 +
server/internal/library/hggen/hggen.go | 290 +
server/internal/library/hggen/init.go | 130 +
.../library/hggen/internal/cmd/cmd.go | 79 +
.../library/hggen/internal/cmd/cmd_build.go | 399 +
.../library/hggen/internal/cmd/cmd_doc.go | 184 +
.../library/hggen/internal/cmd/cmd_docker.go | 179 +
.../library/hggen/internal/cmd/cmd_env.go | 85 +
.../library/hggen/internal/cmd/cmd_fix.go | 152 +
.../library/hggen/internal/cmd/cmd_gen.go | 42 +
.../hggen/internal/cmd/cmd_gen_ctrl.go | 15 +
.../library/hggen/internal/cmd/cmd_gen_dao.go | 25 +
.../hggen/internal/cmd/cmd_gen_enums.go | 15 +
.../library/hggen/internal/cmd/cmd_gen_pb.go | 13 +
.../hggen/internal/cmd/cmd_gen_pbentity.go | 13 +
.../hggen/internal/cmd/cmd_gen_service.go | 15 +
.../library/hggen/internal/cmd/cmd_init.go | 182 +
.../library/hggen/internal/cmd/cmd_install.go | 34 +
.../library/hggen/internal/cmd/cmd_pack.go | 104 +
.../library/hggen/internal/cmd/cmd_run.go | 283 +
.../library/hggen/internal/cmd/cmd_tpl.go | 174 +
.../library/hggen/internal/cmd/cmd_up.go | 279 +
.../library/hggen/internal/cmd/cmd_version.go | 162 +
.../hggen/internal/cmd/genctrl/genctrl.go | 238 +
.../internal/cmd/genctrl/genctrl_api_item.go | 37 +
.../internal/cmd/genctrl/genctrl_ast_parse.go | 95 +
.../cmd/genctrl/genctrl_ast_parse_clear.go | 43 +
.../internal/cmd/genctrl/genctrl_calculate.go | 137 +
.../cmd/genctrl/genctrl_generate_ctrl.go | 231 +
.../genctrl/genctrl_generate_ctrl_clear.go | 57 +
.../cmd/genctrl/genctrl_generate_interface.go | 118 +
.../cmd/genctrl/genctrl_generate_sdk.go | 199 +
.../hggen/internal/cmd/gendao/gendao.go | 413 +
.../hggen/internal/cmd/gendao/gendao_clear.go | 48 +
.../hggen/internal/cmd/gendao/gendao_dao.go | 260 +
.../hggen/internal/cmd/gendao/gendao_do.go | 100 +
.../internal/cmd/gendao/gendao_entity.go | 85 +
.../internal/cmd/gendao/gendao_gen_item.go | 53 +
.../internal/cmd/gendao/gendao_structure.go | 229 +
.../hggen/internal/cmd/gendao/gendao_table.go | 147 +
.../hggen/internal/cmd/gendao/gendao_tag.go | 155 +
.../hggen/internal/cmd/genenums/genenums.go | 85 +
.../internal/cmd/genenums/genenums_parser.go | 149 +
.../library/hggen/internal/cmd/genpb/genpb.go | 132 +
.../internal/cmd/genpb/genpb_controller.go | 197 +
.../hggen/internal/cmd/genpb/genpb_tag.go | 123 +
.../internal/cmd/genpbentity/genpbentity.go | 591 ++
.../internal/cmd/genservice/genservice.go | 391 +
.../cmd/genservice/genservice_ast_parse.go | 319 +
.../cmd/genservice/genservice_ast_utils.go | 48 +
.../cmd/genservice/genservice_calculate.go | 228 +
.../cmd/genservice/genservice_generate.go | 87 +
.../genservice_generate_template.go | 105 +
.../library/hggen/internal/consts/consts.go | 13 +
.../consts/consts_gen_ctrl_template.go | 87 +
.../consts/consts_gen_ctrl_template_sdk.go | 89 +
.../consts/consts_gen_dao_template_dao.go | 139 +
.../consts/consts_gen_dao_template_do.go | 20 +
.../consts/consts_gen_dao_template_entity.go | 20 +
.../consts/consts_gen_dao_template_table.go | 35 +
.../consts/consts_gen_enums_template.go | 23 +
.../consts/consts_gen_pbentity_template.go | 23 +
.../consts/consts_gen_service_template.go | 41 +
.../consts_gen_service_template_logic.go | 19 +
.../library/hggen/internal/service/install.go | 246 +
.../hggen/internal/utility/allyes/allyes.go | 28 +
.../hggen/internal/utility/mlog/mlog.go | 76 +
.../hggen/internal/utility/utils/utils.go | 135 +
.../utility/utils/utils_http_download.go | 55 +
server/internal/library/hggen/views/column.go | 305 +
.../library/hggen/views/column_default.go | 326 +
.../library/hggen/views/column_map.go | 343 +
server/internal/library/hggen/views/curd.go | 1009 +++
.../hggen/views/curd_generate_input.go | 354 +
.../hggen/views/curd_generate_logic.go | 318 +
.../hggen/views/curd_generate_web_edit.go | 232 +
.../hggen/views/curd_generate_web_index.go | 167 +
.../hggen/views/curd_generate_web_model.go | 493 ++
.../hggen/views/curd_generate_web_view.go | 90 +
.../library/hggen/views/gohtml/consts.go | 7 +
.../library/hggen/views/gohtml/doc.go | 2 +
.../library/hggen/views/gohtml/element.go | 7 +
.../library/hggen/views/gohtml/formatter.go | 36 +
.../hggen/views/gohtml/html_document.go | 54 +
.../library/hggen/views/gohtml/parser.go | 128 +
.../library/hggen/views/gohtml/tag_element.go | 145 +
.../hggen/views/gohtml/text_element.go | 43 +
.../library/hggen/views/gohtml/utils.go | 101 +
.../library/hggen/views/gohtml/writer.go | 33 +
server/internal/library/hggen/views/utils.go | 543 ++
server/internal/library/hgorm/dao.go | 232 +
server/internal/library/hgorm/dao_tenant.go | 96 +
server/internal/library/hgorm/dao_tree.go | 146 +
.../library/hgorm/handler/filter_auth.go | 160 +
.../library/hgorm/handler/force_cache.go | 15 +
.../internal/library/hgorm/handler/handler.go | 42 +
.../internal/library/hgorm/handler/sorter.go | 200 +
.../library/hgorm/handler/sorter_test.go | 96 +
.../internal/library/hgorm/handler/tenant.go | 49 +
server/internal/library/hgorm/hook/hook.go | 8 +
server/internal/library/hgorm/hook/member.go | 146 +
.../internal/library/hgorm/hook/provinces.go | 63 +
server/internal/library/hgorm/hook/tenant.go | 288 +
.../library/hgorm/hook/tenant_test.go | 67 +
server/internal/library/hgrds/lock/consts.go | 59 +
server/internal/library/hgrds/lock/lock.go | 183 +
.../internal/library/hgrds/lock/lock_test.go | 152 +
.../internal/library/hgrds/pubsub/publish.go | 16 +
.../library/hgrds/pubsub/subscribe.go | 82 +
server/internal/library/location/cache.go | 45 +
server/internal/library/location/geocode.go | 95 +
server/internal/library/location/location.go | 232 +
.../library/location/location_test.go | 72 +
server/internal/library/location/region.go | 113 +
server/internal/library/network/tcp/client.go | 303 +
.../library/network/tcp/client_cron.go | 50 +
.../library/network/tcp/client_handle.go | 79 +
server/internal/library/network/tcp/conn.go | 178 +
server/internal/library/network/tcp/consts.go | 32 +
.../internal/library/network/tcp/context.go | 50 +
server/internal/library/network/tcp/msg.go | 82 +
.../library/network/tcp/msg_parser.go | 220 +
server/internal/library/network/tcp/router.go | 94 +
server/internal/library/network/tcp/rpc.go | 101 +
server/internal/library/network/tcp/server.go | 294 +
.../library/network/tcp/server_cron.go | 68 +
.../library/network/tcp/tcp_example_test.go | 133 +
.../internal/library/payment/alipay/handle.go | 200 +
.../internal/library/payment/alipay/model.go | 66 +
server/internal/library/payment/config.go | 18 +
server/internal/library/payment/notifycall.go | 55 +
server/internal/library/payment/payment.go | 125 +
.../internal/library/payment/qqpay/handle.go | 137 +
.../internal/library/payment/qqpay/model.go | 28 +
.../internal/library/payment/wxpay/handle.go | 314 +
.../internal/library/payment/wxpay/model.go | 6 +
server/internal/library/queue/consumer.go | 75 +
server/internal/library/queue/disk.go | 148 +
server/internal/library/queue/disk/disk.go | 123 +
server/internal/library/queue/disk/reader.go | 181 +
server/internal/library/queue/disk/writer.go | 107 +
server/internal/library/queue/kafkamq.go | 258 +
server/internal/library/queue/logger.go | 35 +
server/internal/library/queue/producer.go | 36 +
server/internal/library/queue/queue.go | 219 +
server/internal/library/queue/redismq.go | 277 +
server/internal/library/queue/rocketmq.go | 311 +
server/internal/library/response/response.go | 115 +
server/internal/library/sms/config.go | 28 +
server/internal/library/sms/sms.go | 39 +
server/internal/library/sms/sms_aliyun.go | 65 +
server/internal/library/sms/sms_tencent.go | 129 +
server/internal/library/storager/config.go | 28 +
server/internal/library/storager/mime.go | 232 +
server/internal/library/storager/model.go | 69 +
server/internal/library/storager/upload.go | 392 +
.../internal/library/storager/upload_cos.go | 59 +
.../internal/library/storager/upload_local.go | 156 +
.../library/storager/upload_local_test.go | 61 +
.../internal/library/storager/upload_minio.go | 76 +
.../internal/library/storager/upload_oss.go | 59 +
.../internal/library/storager/upload_qiniu.go | 69 +
.../library/storager/upload_ucloud.go | 62 +
server/internal/library/token/token.go | 305 +
server/internal/library/validate/yaml.go | 50 +
server/internal/library/wechat/cache.go | 69 +
server/internal/library/wechat/config.go | 64 +
server/internal/library/wechat/wechat.go | 41 +
server/internal/logic/.gitkeep | 0
server/internal/logic/admin/cash.go | 285 +
server/internal/logic/admin/credits_log.go | 266 +
server/internal/logic/admin/dept.go | 349 +
server/internal/logic/admin/member.go | 914 +++
server/internal/logic/admin/member_post.go | 44 +
server/internal/logic/admin/menu.go | 312 +
server/internal/logic/admin/monitor.go | 97 +
server/internal/logic/admin/notice.go | 534 ++
server/internal/logic/admin/order.go | 407 +
server/internal/logic/admin/post.go | 202 +
server/internal/logic/admin/role.go | 481 ++
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/app_member.go | 737 ++
server/internal/logic/sys/approval.go | 352 +
server/internal/logic/sys/attachment.go | 128 +
server/internal/logic/sys/biz_audit.go | 149 +
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/customer_service.go | 121 +
server/internal/logic/sys/dashboard.go | 285 +
server/internal/logic/sys/dashboard_test.go | 39 +
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/member_level.go | 310 +
server/internal/logic/sys/normal_tree_demo.go | 176 +
server/internal/logic/sys/option_tree_demo.go | 177 +
server/internal/logic/sys/portal.go | 586 ++
server/internal/logic/sys/portal_test.go | 32 +
server/internal/logic/sys/product.go | 194 +
server/internal/logic/sys/provinces.go | 257 +
server/internal/logic/sys/recharge_order.go | 309 +
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/task.go | 207 +
server/internal/logic/sys/task_hall.go | 236 +
server/internal/logic/sys/task_submission.go | 153 +
server/internal/logic/sys/test_category.go | 167 +
server/internal/logic/sys/trade_order.go | 316 +
server/internal/logic/sys/withdrawal_order.go | 281 +
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/app_member.go | 44 +
.../internal/model/do/app_member_address.go | 34 +
server/internal/model/do/app_member_level.go | 32 +
.../model/do/app_member_level_version.go | 37 +
server/internal/model/do/app_member_notice.go | 28 +
.../model/do/app_member_payment_account.go | 37 +
.../internal/model/do/app_member_profile.go | 30 +
.../model/do/app_member_status_log.go | 27 +
server/internal/model/do/approval_action.go | 28 +
server/internal/model/do/approval_request.go | 40 +
server/internal/model/do/banner.go | 36 +
server/internal/model/do/biz_audit_log.go | 34 +
server/internal/model/do/content.go | 32 +
server/internal/model/do/content_version.go | 31 +
server/internal/model/do/customer_service.go | 35 +
.../internal/model/do/dashboard_daily_stat.go | 26 +
server/internal/model/do/finance_review.go | 28 +
.../internal/model/do/idempotency_record.go | 28 +
server/internal/model/do/outbox_event.go | 29 +
server/internal/model/do/pay_log.go | 46 +
server/internal/model/do/pay_refund.go | 28 +
server/internal/model/do/payment_channel.go | 35 +
server/internal/model/do/product.go | 41 +
server/internal/model/do/product_category.go | 30 +
server/internal/model/do/recharge_order.go | 40 +
.../internal/model/do/sensitive_access_log.go | 30 +
.../internal/model/do/site_config_version.go | 34 +
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/task.go | 40 +
server/internal/model/do/task_hall.go | 35 +
server/internal/model/do/task_hall_level.go | 20 +
server/internal/model/do/task_level.go | 20 +
server/internal/model/do/task_submission.go | 40 +
server/internal/model/do/test_category.go | 25 +
server/internal/model/do/trade_order.go | 42 +
server/internal/model/do/wallet_account.go | 27 +
.../model/do/wallet_adjustment_request.go | 35 +
server/internal/model/do/wallet_ledger.go | 34 +
server/internal/model/do/withdrawal_order.go | 45 +
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/app_member.go | 42 +
.../model/entity/app_member_address.go | 32 +
.../internal/model/entity/app_member_level.go | 30 +
.../model/entity/app_member_level_version.go | 35 +
.../model/entity/app_member_notice.go | 26 +
.../entity/app_member_payment_account.go | 35 +
.../model/entity/app_member_profile.go | 28 +
.../model/entity/app_member_status_log.go | 25 +
.../internal/model/entity/approval_action.go | 26 +
.../internal/model/entity/approval_request.go | 38 +
server/internal/model/entity/banner.go | 34 +
server/internal/model/entity/biz_audit_log.go | 32 +
server/internal/model/entity/content.go | 30 +
.../internal/model/entity/content_version.go | 29 +
.../internal/model/entity/customer_service.go | 33 +
.../model/entity/dashboard_daily_stat.go | 24 +
.../internal/model/entity/finance_review.go | 26 +
.../model/entity/idempotency_record.go | 26 +
server/internal/model/entity/outbox_event.go | 27 +
server/internal/model/entity/pay_log.go | 44 +
server/internal/model/entity/pay_refund.go | 26 +
.../internal/model/entity/payment_channel.go | 33 +
server/internal/model/entity/product.go | 39 +
.../internal/model/entity/product_category.go | 28 +
.../internal/model/entity/recharge_order.go | 38 +
.../model/entity/sensitive_access_log.go | 28 +
.../model/entity/site_config_version.go | 32 +
.../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/task.go | 38 +
server/internal/model/entity/task_hall.go | 33 +
.../internal/model/entity/task_hall_level.go | 18 +
server/internal/model/entity/task_level.go | 18 +
.../internal/model/entity/task_submission.go | 38 +
server/internal/model/entity/test_category.go | 23 +
server/internal/model/entity/trade_order.go | 40 +
.../internal/model/entity/wallet_account.go | 25 +
.../model/entity/wallet_adjustment_request.go | 33 +
server/internal/model/entity/wallet_ledger.go | 32 +
.../internal/model/entity/withdrawal_order.go | 43 +
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 | 155 +
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 | 27 +
.../internal/model/input/sysin/app_member.go | 427 +
server/internal/model/input/sysin/approval.go | 137 +
.../internal/model/input/sysin/attachment.go | 106 +
.../internal/model/input/sysin/biz_audit.go | 50 +
.../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/dashboard.go | 80 +
.../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/member_level.go | 211 +
.../model/input/sysin/normal_tree_demo.go | 145 +
.../model/input/sysin/option_tree_demo.go | 144 +
server/internal/model/input/sysin/portal.go | 353 +
.../model/input/sysin/product_task.go | 272 +
.../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 +
server/internal/model/input/sysin/trade.go | 327 +
.../internal/model/input/websocketin/send.go | 16 +
server/internal/model/monitor.go | 37 +
server/internal/model/response.go | 17 +
server/internal/model/tree.go | 30 +
server/internal/model/view.go | 42 +
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 +
.../internal/router/genrouter/app_member.go | 5 +
server/internal/router/genrouter/approval.go | 7 +
server/internal/router/genrouter/biz_audit.go | 7 +
server/internal/router/genrouter/curd_demo.go | 13 +
server/internal/router/genrouter/init.go | 32 +
.../internal/router/genrouter/member_level.go | 5 +
.../router/genrouter/normal_tree_demo.go | 13 +
.../router/genrouter/option_tree_demo.go | 13 +
server/internal/router/genrouter/portal.go | 5 +
.../internal/router/genrouter/product_task.go | 7 +
server/internal/router/genrouter/task_hall.go | 5 +
.../router/genrouter/test_category.go | 13 +
server/internal/router/genrouter/trade.go | 7 +
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 | 931 +++
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 | 44 +
server/internal/websocket/router.go | 64 +
server/main.go | 25 +
server/manifest/config/casbin.conf | 15 +
server/manifest/config/config.example.yaml | 307 +
.../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 +++++++++++++++++
server/storage/data/hotgo.sql | 6207 +++++++++++++++
.../migrations/20261008_001_governance.sql | 161 +
.../20261008_002_governance_menu.sql | 50 +
.../20261008_003_dashboard_menu.sql | 25 +
.../20261008_004_portal_content.sql | 220 +
.../20261008_005_member_management.sql | 281 +
.../20261008_006_member_level_task_hall.sql | 119 +
.../20261008_007_trade_management.sql | 239 +
.../20261008_008_product_task_management.sql | 147 +
.../20261008_009_member_menu_alignment.sql | 28 +
.../20261009_001_remove_governance_menu.sql | 9 +
.../20261009_002_delete_governance_menu.sql | 12 +
.../20261009_003_role_menu_parent_scope.sql | 10 +
...0261009_010_member_operation_alignment.sql | 14 +
.../20261009_010_menu_structure_alignment.sql | 54 +
.../20261009_011_trade_order_match_menu.sql | 17 +
...20261009_012_show_personal_center_menu.sql | 9 +
...261009_013_hide_member_auxiliary_menus.sql | 22 +
.../20261009_014_order_matching_demo.sql | 19 +
.../20261010_001_system_submenu_icons.sql | 37 +
...20261010_002_product_upload_permission.sql | 34 +
.../seeds/20261008_business_demo_data.sql | 518 ++
.../seeds/20261008_dashboard_demo_data.sql | 128 +
.../seeds/20261008_portal_content_initial.sql | 205 +
.../seeds/20261009_member_level_initial.sql | 66 +
server/storage/data/sqlite/data.sql | 5134 ++++++++++++
server/storage/data/sqlite/tables.sql | 656 ++
server/utility/.gitkeep | 0
server/utility/charset/charset.go | 74 +
server/utility/convert/convert.go | 166 +
server/utility/convert/match.go | 115 +
server/utility/convert/slice.go | 59 +
server/utility/db/README.md | 11 +
server/utility/db/db.go | 54 +
server/utility/db/sqlite_example.sql | 45 +
server/utility/db/sqlite_fields.go | 105 +
server/utility/db/utils.go | 74 +
server/utility/encrypt/aes.go | 42 +
server/utility/encrypt/encrypt.go | 29 +
server/utility/encrypt/field.go | 130 +
server/utility/encrypt/field_test.go | 15 +
server/utility/excel/excel.go | 150 +
server/utility/file/file.go | 103 +
server/utility/format/format.go | 73 +
server/utility/simple/event.go | 56 +
server/utility/simple/simple.go | 144 +
server/utility/simple/system_config.go | 31 +
server/utility/tree/tree.go | 108 +
server/utility/tree/tree_list.go | 35 +
server/utility/url/url.go | 74 +
server/utility/useragent/useragent.go | 129 +
server/utility/validate/filter.go | 32 +
server/utility/validate/filter_test.go | 72 +
server/utility/validate/include.go | 38 +
server/utility/validate/validate.go | 192 +
server/utility/validate/validate_test.go | 17 +
.../build_reference_prd.cpython-312.pyc | Bin 62437 -> 0 bytes
1040 files changed, 107169 insertions(+)
create mode 100644 server/.gitattributes
create mode 100644 server/.gitignore
create mode 100644 server/.golangci.yml
create mode 100644 server/Makefile
create mode 100644 server/README.MD
create mode 100644 server/addons/addons.go
create mode 100644 server/addons/hgexample/README.MD
create mode 100644 server/addons/hgexample/api/admin/comp/import.go
create mode 100644 server/addons/hgexample/api/admin/config/config.go
create mode 100644 server/addons/hgexample/api/admin/index/index.go
create mode 100644 server/addons/hgexample/api/admin/table/table.go
create mode 100644 server/addons/hgexample/api/admin/tenantorder/tenantorder.go
create mode 100644 server/addons/hgexample/api/admin/treetable/treetable.go
create mode 100644 server/addons/hgexample/api/api/index/index.go
create mode 100644 server/addons/hgexample/api/home/index/index.go
create mode 100644 server/addons/hgexample/api/websocket/index/index.go
create mode 100644 server/addons/hgexample/controller/admin/sys/comp.go
create mode 100644 server/addons/hgexample/controller/admin/sys/config.go
create mode 100644 server/addons/hgexample/controller/admin/sys/index.go
create mode 100644 server/addons/hgexample/controller/admin/sys/table.go
create mode 100644 server/addons/hgexample/controller/admin/sys/tenant_order.go
create mode 100644 server/addons/hgexample/controller/admin/sys/tree_table.go
create mode 100644 server/addons/hgexample/controller/api/index.go
create mode 100644 server/addons/hgexample/controller/home/index.go
create mode 100644 server/addons/hgexample/controller/websocket/handler/index.go
create mode 100644 server/addons/hgexample/controller/websocket/index.go
create mode 100644 server/addons/hgexample/crons/crons.go
create mode 100644 server/addons/hgexample/global/global.go
create mode 100644 server/addons/hgexample/global/init.go
create mode 100644 server/addons/hgexample/logic/.gitkeep
create mode 100644 server/addons/hgexample/logic/logic.go
create mode 100644 server/addons/hgexample/logic/sys/config.go
create mode 100644 server/addons/hgexample/logic/sys/index.go
create mode 100644 server/addons/hgexample/logic/sys/table.go
create mode 100644 server/addons/hgexample/logic/sys/tenant_order.go
create mode 100644 server/addons/hgexample/logic/sys/tree_table.go
create mode 100644 server/addons/hgexample/main.go
create mode 100644 server/addons/hgexample/model/config.go
create mode 100644 server/addons/hgexample/model/input/sysin/config.go
create mode 100644 server/addons/hgexample/model/input/sysin/index.go
create mode 100644 server/addons/hgexample/model/input/sysin/table.go
create mode 100644 server/addons/hgexample/model/input/sysin/tenant_order.go
create mode 100644 server/addons/hgexample/model/input/sysin/tree_table.go
create mode 100644 server/addons/hgexample/queues/queues.go
create mode 100644 server/addons/hgexample/router/admin.go
create mode 100644 server/addons/hgexample/router/api.go
create mode 100644 server/addons/hgexample/router/genrouter/init.go
create mode 100644 server/addons/hgexample/router/genrouter/tenant_order.go
create mode 100644 server/addons/hgexample/router/home.go
create mode 100644 server/addons/hgexample/router/websocket.go
create mode 100644 server/addons/hgexample/service/.gitkeep
create mode 100644 server/addons/hgexample/service/sys.go
create mode 100644 server/addons/modules/.gitkeep
create mode 100644 server/addons/modules/hgexample.go
create mode 100644 server/api/admin/addons/addons.go
create mode 100644 server/api/admin/appmember/appmember.go
create mode 100644 server/api/admin/approval/approval.go
create mode 100644 server/api/admin/attachment/attachment.go
create mode 100644 server/api/admin/bizaudit/biz_audit.go
create mode 100644 server/api/admin/blacklist/blacklist.go
create mode 100644 server/api/admin/cash/cash.go
create mode 100644 server/api/admin/common/console.go
create mode 100644 server/api/admin/common/ems.go
create mode 100644 server/api/admin/common/site.go
create mode 100644 server/api/admin/common/sms.go
create mode 100644 server/api/admin/common/upload.go
create mode 100644 server/api/admin/common/wechat.go
create mode 100644 server/api/admin/config/config.go
create mode 100644 server/api/admin/creditslog/creditslog.go
create mode 100644 server/api/admin/cron/cron.go
create mode 100644 server/api/admin/cron/cron_group.go
create mode 100644 server/api/admin/curddemo/curddemo.go
create mode 100644 server/api/admin/customerservice/customerservice.go
create mode 100644 server/api/admin/dept/dept.go
create mode 100644 server/api/admin/dict/dict_data.go
create mode 100644 server/api/admin/dict/dict_type.go
create mode 100644 server/api/admin/emslog/emslog.go
create mode 100644 server/api/admin/gencodes/gencodes.go
create mode 100644 server/api/admin/log/log.go
create mode 100644 server/api/admin/loginlog/loginlog.go
create mode 100644 server/api/admin/member/member.go
create mode 100644 server/api/admin/memberlevel/memberlevel.go
create mode 100644 server/api/admin/menu/menu.go
create mode 100644 server/api/admin/monitor/monitor.go
create mode 100644 server/api/admin/normaltreedemo/normaltreedemo.go
create mode 100644 server/api/admin/notice/notice.go
create mode 100644 server/api/admin/optiontreedemo/optiontreedemo.go
create mode 100644 server/api/admin/order/order.go
create mode 100644 server/api/admin/pay/refund.go
create mode 100644 server/api/admin/portal/portal.go
create mode 100644 server/api/admin/post/post.go
create mode 100644 server/api/admin/product/product.go
create mode 100644 server/api/admin/provinces/provinces.go
create mode 100644 server/api/admin/rechargeorder/rechargeorder.go
create mode 100644 server/api/admin/role/role.go
create mode 100644 server/api/admin/servelicense/servelicense.go
create mode 100644 server/api/admin/servelog/servelog.go
create mode 100644 server/api/admin/smslog/smslog.go
create mode 100644 server/api/admin/task/task.go
create mode 100644 server/api/admin/taskhall/taskhall.go
create mode 100644 server/api/admin/tasksubmission/tasksubmission.go
create mode 100644 server/api/admin/testcategory/testcategory.go
create mode 100644 server/api/admin/tradeorder/tradeorder.go
create mode 100644 server/api/admin/withdrawalorder/withdrawalorder.go
create mode 100644 server/api/api/member/member.go
create mode 100644 server/api/api/member/v1/member.go
create mode 100644 server/api/api/pay/pay.go
create mode 100644 server/api/api/pay/v1/notify.go
create mode 100644 server/api/home/base/site.go
create mode 100644 server/api/servmsg/auth.go
create mode 100644 server/api/servmsg/cron.go
create mode 100644 server/api/servmsg/example.go
create mode 100644 server/api/websocket/base/send.go
create mode 100644 server/go.mod
create mode 100644 server/go.sum
create mode 100644 server/hack/config.yaml
create mode 100644 server/internal/cmd/auth.go
create mode 100644 server/internal/cmd/cmd.go
create mode 100644 server/internal/cmd/cron.go
create mode 100644 server/internal/cmd/handler_shutdown.go
create mode 100644 server/internal/cmd/http.go
create mode 100644 server/internal/cmd/queue.go
create mode 100644 server/internal/cmd/tools.go
create mode 100644 server/internal/cmd/up.go
create mode 100644 server/internal/cmd/upgrade/fix/admin_menu_tree.go
create mode 100644 server/internal/consts/addons.go
create mode 100644 server/internal/consts/app.go
create mode 100644 server/internal/consts/app_member.go
create mode 100644 server/internal/consts/approval.go
create mode 100644 server/internal/consts/cache.go
create mode 100644 server/internal/consts/captcha.go
create mode 100644 server/internal/consts/cash.go
create mode 100644 server/internal/consts/config.go
create mode 100644 server/internal/consts/context.go
create mode 100644 server/internal/consts/credit_log.go
create mode 100644 server/internal/consts/cron.go
create mode 100644 server/internal/consts/debris.go
create mode 100644 server/internal/consts/dept.go
create mode 100644 server/internal/consts/ems.go
create mode 100644 server/internal/consts/error.go
create mode 100644 server/internal/consts/event.go
create mode 100644 server/internal/consts/gencodes.go
create mode 100644 server/internal/consts/http.go
create mode 100644 server/internal/consts/notice.go
create mode 100644 server/internal/consts/order.go
create mode 100644 server/internal/consts/pay.go
create mode 100644 server/internal/consts/portal.go
create mode 100644 server/internal/consts/product_task.go
create mode 100644 server/internal/consts/pubsub.go
create mode 100644 server/internal/consts/queue.go
create mode 100644 server/internal/consts/role.go
create mode 100644 server/internal/consts/servelicense.go
create mode 100644 server/internal/consts/sms.go
create mode 100644 server/internal/consts/status.go
create mode 100644 server/internal/consts/trade.go
create mode 100644 server/internal/consts/upload.go
create mode 100644 server/internal/consts/version.go
create mode 100644 server/internal/consts/wechat.go
create mode 100644 server/internal/controller/admin/admin/cash.go
create mode 100644 server/internal/controller/admin/admin/credits_log.go
create mode 100644 server/internal/controller/admin/admin/dept.go
create mode 100644 server/internal/controller/admin/admin/member.go
create mode 100644 server/internal/controller/admin/admin/menu.go
create mode 100644 server/internal/controller/admin/admin/monitor.go
create mode 100644 server/internal/controller/admin/admin/notice.go
create mode 100644 server/internal/controller/admin/admin/order.go
create mode 100644 server/internal/controller/admin/admin/post.go
create mode 100644 server/internal/controller/admin/admin/role.go
create mode 100644 server/internal/controller/admin/common/console.go
create mode 100644 server/internal/controller/admin/common/ems.go
create mode 100644 server/internal/controller/admin/common/site.go
create mode 100644 server/internal/controller/admin/common/sms.go
create mode 100644 server/internal/controller/admin/common/upload.go
create mode 100644 server/internal/controller/admin/common/wechat.go
create mode 100644 server/internal/controller/admin/pay/refund.go
create mode 100644 server/internal/controller/admin/sys/addons.go
create mode 100644 server/internal/controller/admin/sys/app_member.go
create mode 100644 server/internal/controller/admin/sys/approval.go
create mode 100644 server/internal/controller/admin/sys/attachment.go
create mode 100644 server/internal/controller/admin/sys/biz_audit.go
create mode 100644 server/internal/controller/admin/sys/blacklist.go
create mode 100644 server/internal/controller/admin/sys/config.go
create mode 100644 server/internal/controller/admin/sys/cron.go
create mode 100644 server/internal/controller/admin/sys/cron_group.go
create mode 100644 server/internal/controller/admin/sys/curd_demo.go
create mode 100644 server/internal/controller/admin/sys/customer_service.go
create mode 100644 server/internal/controller/admin/sys/dict_data.go
create mode 100644 server/internal/controller/admin/sys/dict_type.go
create mode 100644 server/internal/controller/admin/sys/ems_log.go
create mode 100644 server/internal/controller/admin/sys/gen_codes.go
create mode 100644 server/internal/controller/admin/sys/log.go
create mode 100644 server/internal/controller/admin/sys/login_log.go
create mode 100644 server/internal/controller/admin/sys/member_level.go
create mode 100644 server/internal/controller/admin/sys/normal_tree_demo.go
create mode 100644 server/internal/controller/admin/sys/option_tree_demo.go
create mode 100644 server/internal/controller/admin/sys/portal.go
create mode 100644 server/internal/controller/admin/sys/product.go
create mode 100644 server/internal/controller/admin/sys/provinces.go
create mode 100644 server/internal/controller/admin/sys/recharge_order.go
create mode 100644 server/internal/controller/admin/sys/serve_license.go
create mode 100644 server/internal/controller/admin/sys/serve_log.go
create mode 100644 server/internal/controller/admin/sys/sms_log.go
create mode 100644 server/internal/controller/admin/sys/task.go
create mode 100644 server/internal/controller/admin/sys/task_hall.go
create mode 100644 server/internal/controller/admin/sys/task_submission.go
create mode 100644 server/internal/controller/admin/sys/test_category.go
create mode 100644 server/internal/controller/admin/sys/trade_order.go
create mode 100644 server/internal/controller/admin/sys/withdrawal_order.go
create mode 100644 server/internal/controller/api/member/member.go
create mode 100644 server/internal/controller/api/member/member_new.go
create mode 100644 server/internal/controller/api/member/member_v1_get_id_by_code.go
create mode 100644 server/internal/controller/api/pay/pay.go
create mode 100644 server/internal/controller/api/pay/pay_new.go
create mode 100644 server/internal/controller/api/pay/pay_v1_notify_ali_pay.go
create mode 100644 server/internal/controller/api/pay/pay_v1_notify_qq_pay.go
create mode 100644 server/internal/controller/api/pay/pay_v1_notify_wx_pay.go
create mode 100644 server/internal/controller/home/base/site.go
create mode 100644 server/internal/controller/websocket/handler/admin/monitor.go
create mode 100644 server/internal/controller/websocket/handler/common/site.go
create mode 100644 server/internal/controller/websocket/send.go
create mode 100644 server/internal/crons/close_order.go
create mode 100644 server/internal/crons/test.go
create mode 100644 server/internal/crons/test2.go
create mode 100644 server/internal/dao/.gitkeep
create mode 100755 server/internal/dao/addon_hgexample_table.go
create mode 100755 server/internal/dao/addon_hgexample_tenant_order.go
create mode 100755 server/internal/dao/admin_cash.go
create mode 100755 server/internal/dao/admin_credits_log.go
create mode 100755 server/internal/dao/admin_dept.go
create mode 100755 server/internal/dao/admin_member.go
create mode 100755 server/internal/dao/admin_member_post.go
create mode 100755 server/internal/dao/admin_member_role.go
create mode 100755 server/internal/dao/admin_menu.go
create mode 100755 server/internal/dao/admin_notice.go
create mode 100755 server/internal/dao/admin_notice_read.go
create mode 100755 server/internal/dao/admin_oauth.go
create mode 100755 server/internal/dao/admin_order.go
create mode 100755 server/internal/dao/admin_post.go
create mode 100755 server/internal/dao/admin_role.go
create mode 100755 server/internal/dao/admin_role_casbin.go
create mode 100755 server/internal/dao/admin_role_menu.go
create mode 100644 server/internal/dao/app_member.go
create mode 100644 server/internal/dao/app_member_address.go
create mode 100644 server/internal/dao/app_member_level.go
create mode 100644 server/internal/dao/app_member_level_version.go
create mode 100644 server/internal/dao/app_member_notice.go
create mode 100644 server/internal/dao/app_member_payment_account.go
create mode 100644 server/internal/dao/app_member_profile.go
create mode 100644 server/internal/dao/app_member_status_log.go
create mode 100644 server/internal/dao/approval_action.go
create mode 100644 server/internal/dao/approval_request.go
create mode 100644 server/internal/dao/banner.go
create mode 100644 server/internal/dao/biz_audit_log.go
create mode 100644 server/internal/dao/content.go
create mode 100644 server/internal/dao/content_version.go
create mode 100644 server/internal/dao/customer_service.go
create mode 100644 server/internal/dao/dashboard_daily_stat.go
create mode 100644 server/internal/dao/finance_review.go
create mode 100644 server/internal/dao/idempotency_record.go
create mode 100755 server/internal/dao/internal/addon_hgexample_table.go
create mode 100755 server/internal/dao/internal/addon_hgexample_tenant_order.go
create mode 100755 server/internal/dao/internal/admin_cash.go
create mode 100755 server/internal/dao/internal/admin_credits_log.go
create mode 100755 server/internal/dao/internal/admin_dept.go
create mode 100755 server/internal/dao/internal/admin_member.go
create mode 100755 server/internal/dao/internal/admin_member_post.go
create mode 100755 server/internal/dao/internal/admin_member_role.go
create mode 100755 server/internal/dao/internal/admin_menu.go
create mode 100755 server/internal/dao/internal/admin_notice.go
create mode 100755 server/internal/dao/internal/admin_notice_read.go
create mode 100755 server/internal/dao/internal/admin_oauth.go
create mode 100755 server/internal/dao/internal/admin_order.go
create mode 100755 server/internal/dao/internal/admin_post.go
create mode 100755 server/internal/dao/internal/admin_role.go
create mode 100755 server/internal/dao/internal/admin_role_casbin.go
create mode 100755 server/internal/dao/internal/admin_role_menu.go
create mode 100644 server/internal/dao/internal/app_member.go
create mode 100644 server/internal/dao/internal/app_member_address.go
create mode 100644 server/internal/dao/internal/app_member_level.go
create mode 100644 server/internal/dao/internal/app_member_level_version.go
create mode 100644 server/internal/dao/internal/app_member_notice.go
create mode 100644 server/internal/dao/internal/app_member_payment_account.go
create mode 100644 server/internal/dao/internal/app_member_profile.go
create mode 100644 server/internal/dao/internal/app_member_status_log.go
create mode 100644 server/internal/dao/internal/approval_action.go
create mode 100644 server/internal/dao/internal/approval_request.go
create mode 100644 server/internal/dao/internal/banner.go
create mode 100644 server/internal/dao/internal/biz_audit_log.go
create mode 100644 server/internal/dao/internal/content.go
create mode 100644 server/internal/dao/internal/content_version.go
create mode 100644 server/internal/dao/internal/customer_service.go
create mode 100644 server/internal/dao/internal/dashboard_daily_stat.go
create mode 100644 server/internal/dao/internal/finance_review.go
create mode 100644 server/internal/dao/internal/idempotency_record.go
create mode 100644 server/internal/dao/internal/outbox_event.go
create mode 100755 server/internal/dao/internal/pay_log.go
create mode 100755 server/internal/dao/internal/pay_refund.go
create mode 100644 server/internal/dao/internal/payment_channel.go
create mode 100644 server/internal/dao/internal/product.go
create mode 100644 server/internal/dao/internal/product_category.go
create mode 100644 server/internal/dao/internal/recharge_order.go
create mode 100644 server/internal/dao/internal/sensitive_access_log.go
create mode 100644 server/internal/dao/internal/site_config_version.go
create mode 100755 server/internal/dao/internal/sys_addons_config.go
create mode 100644 server/internal/dao/internal/sys_addons_install.go
create mode 100755 server/internal/dao/internal/sys_attachment.go
create mode 100755 server/internal/dao/internal/sys_blacklist.go
create mode 100755 server/internal/dao/internal/sys_config.go
create mode 100755 server/internal/dao/internal/sys_cron.go
create mode 100755 server/internal/dao/internal/sys_cron_group.go
create mode 100755 server/internal/dao/internal/sys_dict_data.go
create mode 100755 server/internal/dao/internal/sys_dict_type.go
create mode 100755 server/internal/dao/internal/sys_ems_log.go
create mode 100755 server/internal/dao/internal/sys_gen_codes.go
create mode 100755 server/internal/dao/internal/sys_gen_curd_demo.go
create mode 100755 server/internal/dao/internal/sys_gen_tree_demo.go
create mode 100755 server/internal/dao/internal/sys_log.go
create mode 100755 server/internal/dao/internal/sys_login_log.go
create mode 100755 server/internal/dao/internal/sys_provinces.go
create mode 100755 server/internal/dao/internal/sys_serve_license.go
create mode 100755 server/internal/dao/internal/sys_serve_log.go
create mode 100755 server/internal/dao/internal/sys_sms_log.go
create mode 100644 server/internal/dao/internal/task.go
create mode 100644 server/internal/dao/internal/task_hall.go
create mode 100644 server/internal/dao/internal/task_hall_level.go
create mode 100644 server/internal/dao/internal/task_level.go
create mode 100644 server/internal/dao/internal/task_submission.go
create mode 100755 server/internal/dao/internal/test_category.go
create mode 100644 server/internal/dao/internal/trade_order.go
create mode 100644 server/internal/dao/internal/wallet_account.go
create mode 100644 server/internal/dao/internal/wallet_adjustment_request.go
create mode 100644 server/internal/dao/internal/wallet_ledger.go
create mode 100644 server/internal/dao/internal/withdrawal_order.go
create mode 100644 server/internal/dao/outbox_event.go
create mode 100755 server/internal/dao/pay_log.go
create mode 100755 server/internal/dao/pay_refund.go
create mode 100644 server/internal/dao/payment_channel.go
create mode 100644 server/internal/dao/product.go
create mode 100644 server/internal/dao/product_category.go
create mode 100644 server/internal/dao/recharge_order.go
create mode 100644 server/internal/dao/sensitive_access_log.go
create mode 100644 server/internal/dao/site_config_version.go
create mode 100755 server/internal/dao/sys_addons_config.go
create mode 100644 server/internal/dao/sys_addons_install.go
create mode 100755 server/internal/dao/sys_attachment.go
create mode 100755 server/internal/dao/sys_blacklist.go
create mode 100755 server/internal/dao/sys_config.go
create mode 100755 server/internal/dao/sys_cron.go
create mode 100755 server/internal/dao/sys_cron_group.go
create mode 100755 server/internal/dao/sys_dict_data.go
create mode 100755 server/internal/dao/sys_dict_type.go
create mode 100755 server/internal/dao/sys_ems_log.go
create mode 100755 server/internal/dao/sys_gen_codes.go
create mode 100755 server/internal/dao/sys_gen_curd_demo.go
create mode 100755 server/internal/dao/sys_gen_tree_demo.go
create mode 100755 server/internal/dao/sys_log.go
create mode 100755 server/internal/dao/sys_login_log.go
create mode 100755 server/internal/dao/sys_provinces.go
create mode 100755 server/internal/dao/sys_serve_license.go
create mode 100755 server/internal/dao/sys_serve_log.go
create mode 100755 server/internal/dao/sys_sms_log.go
create mode 100644 server/internal/dao/task.go
create mode 100644 server/internal/dao/task_hall.go
create mode 100644 server/internal/dao/task_hall_level.go
create mode 100644 server/internal/dao/task_level.go
create mode 100644 server/internal/dao/task_submission.go
create mode 100755 server/internal/dao/test_category.go
create mode 100644 server/internal/dao/trade_order.go
create mode 100644 server/internal/dao/wallet_account.go
create mode 100644 server/internal/dao/wallet_adjustment_request.go
create mode 100644 server/internal/dao/wallet_ledger.go
create mode 100644 server/internal/dao/withdrawal_order.go
create mode 100644 server/internal/global/cluster.go
create mode 100644 server/internal/global/global.go
create mode 100644 server/internal/global/httproutes.go
create mode 100644 server/internal/global/init.go
create mode 100644 server/internal/library/addons/addons.go
create mode 100644 server/internal/library/addons/build.go
create mode 100644 server/internal/library/addons/build_layout.go
create mode 100644 server/internal/library/addons/install.go
create mode 100644 server/internal/library/addons/module.go
create mode 100644 server/internal/library/cache/cache.go
create mode 100644 server/internal/library/cache/file/file.go
create mode 100644 server/internal/library/captcha/captcha.go
create mode 100644 server/internal/library/casbin/adapter.go
create mode 100644 server/internal/library/casbin/casbin_test.go
create mode 100644 server/internal/library/casbin/enforcer.go
create mode 100644 server/internal/library/contexts/context.go
create mode 100644 server/internal/library/contexts/detached.go
create mode 100644 server/internal/library/cron/cron.go
create mode 100644 server/internal/library/cron/cron_gen.go
create mode 100644 server/internal/library/debris/debris.go
create mode 100644 server/internal/library/dict/dict.go
create mode 100644 server/internal/library/dict/dict_option.go
create mode 100644 server/internal/library/dict/dict_register_enums.go
create mode 100644 server/internal/library/dict/dict_register_func.go
create mode 100644 server/internal/library/ems/ems.go
create mode 100644 server/internal/library/hggen/hggen.go
create mode 100644 server/internal/library/hggen/init.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_build.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_doc.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_docker.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_env.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_fix.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_gen.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_gen_ctrl.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_gen_dao.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_gen_enums.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_gen_pb.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_gen_pbentity.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_gen_service.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_init.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_install.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_pack.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_run.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_tpl.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_up.go
create mode 100644 server/internal/library/hggen/internal/cmd/cmd_version.go
create mode 100644 server/internal/library/hggen/internal/cmd/genctrl/genctrl.go
create mode 100644 server/internal/library/hggen/internal/cmd/genctrl/genctrl_api_item.go
create mode 100644 server/internal/library/hggen/internal/cmd/genctrl/genctrl_ast_parse.go
create mode 100644 server/internal/library/hggen/internal/cmd/genctrl/genctrl_ast_parse_clear.go
create mode 100644 server/internal/library/hggen/internal/cmd/genctrl/genctrl_calculate.go
create mode 100644 server/internal/library/hggen/internal/cmd/genctrl/genctrl_generate_ctrl.go
create mode 100644 server/internal/library/hggen/internal/cmd/genctrl/genctrl_generate_ctrl_clear.go
create mode 100644 server/internal/library/hggen/internal/cmd/genctrl/genctrl_generate_interface.go
create mode 100644 server/internal/library/hggen/internal/cmd/genctrl/genctrl_generate_sdk.go
create mode 100644 server/internal/library/hggen/internal/cmd/gendao/gendao.go
create mode 100644 server/internal/library/hggen/internal/cmd/gendao/gendao_clear.go
create mode 100644 server/internal/library/hggen/internal/cmd/gendao/gendao_dao.go
create mode 100644 server/internal/library/hggen/internal/cmd/gendao/gendao_do.go
create mode 100644 server/internal/library/hggen/internal/cmd/gendao/gendao_entity.go
create mode 100644 server/internal/library/hggen/internal/cmd/gendao/gendao_gen_item.go
create mode 100644 server/internal/library/hggen/internal/cmd/gendao/gendao_structure.go
create mode 100644 server/internal/library/hggen/internal/cmd/gendao/gendao_table.go
create mode 100644 server/internal/library/hggen/internal/cmd/gendao/gendao_tag.go
create mode 100644 server/internal/library/hggen/internal/cmd/genenums/genenums.go
create mode 100644 server/internal/library/hggen/internal/cmd/genenums/genenums_parser.go
create mode 100644 server/internal/library/hggen/internal/cmd/genpb/genpb.go
create mode 100644 server/internal/library/hggen/internal/cmd/genpb/genpb_controller.go
create mode 100644 server/internal/library/hggen/internal/cmd/genpb/genpb_tag.go
create mode 100644 server/internal/library/hggen/internal/cmd/genpbentity/genpbentity.go
create mode 100644 server/internal/library/hggen/internal/cmd/genservice/genservice.go
create mode 100644 server/internal/library/hggen/internal/cmd/genservice/genservice_ast_parse.go
create mode 100644 server/internal/library/hggen/internal/cmd/genservice/genservice_ast_utils.go
create mode 100644 server/internal/library/hggen/internal/cmd/genservice/genservice_calculate.go
create mode 100644 server/internal/library/hggen/internal/cmd/genservice/genservice_generate.go
create mode 100644 server/internal/library/hggen/internal/cmd/genservice/genservice_generate_template.go
create mode 100644 server/internal/library/hggen/internal/consts/consts.go
create mode 100644 server/internal/library/hggen/internal/consts/consts_gen_ctrl_template.go
create mode 100644 server/internal/library/hggen/internal/consts/consts_gen_ctrl_template_sdk.go
create mode 100644 server/internal/library/hggen/internal/consts/consts_gen_dao_template_dao.go
create mode 100644 server/internal/library/hggen/internal/consts/consts_gen_dao_template_do.go
create mode 100644 server/internal/library/hggen/internal/consts/consts_gen_dao_template_entity.go
create mode 100644 server/internal/library/hggen/internal/consts/consts_gen_dao_template_table.go
create mode 100644 server/internal/library/hggen/internal/consts/consts_gen_enums_template.go
create mode 100644 server/internal/library/hggen/internal/consts/consts_gen_pbentity_template.go
create mode 100644 server/internal/library/hggen/internal/consts/consts_gen_service_template.go
create mode 100644 server/internal/library/hggen/internal/consts/consts_gen_service_template_logic.go
create mode 100644 server/internal/library/hggen/internal/service/install.go
create mode 100644 server/internal/library/hggen/internal/utility/allyes/allyes.go
create mode 100644 server/internal/library/hggen/internal/utility/mlog/mlog.go
create mode 100644 server/internal/library/hggen/internal/utility/utils/utils.go
create mode 100644 server/internal/library/hggen/internal/utility/utils/utils_http_download.go
create mode 100644 server/internal/library/hggen/views/column.go
create mode 100644 server/internal/library/hggen/views/column_default.go
create mode 100644 server/internal/library/hggen/views/column_map.go
create mode 100644 server/internal/library/hggen/views/curd.go
create mode 100644 server/internal/library/hggen/views/curd_generate_input.go
create mode 100644 server/internal/library/hggen/views/curd_generate_logic.go
create mode 100644 server/internal/library/hggen/views/curd_generate_web_edit.go
create mode 100644 server/internal/library/hggen/views/curd_generate_web_index.go
create mode 100644 server/internal/library/hggen/views/curd_generate_web_model.go
create mode 100644 server/internal/library/hggen/views/curd_generate_web_view.go
create mode 100644 server/internal/library/hggen/views/gohtml/consts.go
create mode 100644 server/internal/library/hggen/views/gohtml/doc.go
create mode 100644 server/internal/library/hggen/views/gohtml/element.go
create mode 100644 server/internal/library/hggen/views/gohtml/formatter.go
create mode 100644 server/internal/library/hggen/views/gohtml/html_document.go
create mode 100644 server/internal/library/hggen/views/gohtml/parser.go
create mode 100644 server/internal/library/hggen/views/gohtml/tag_element.go
create mode 100644 server/internal/library/hggen/views/gohtml/text_element.go
create mode 100644 server/internal/library/hggen/views/gohtml/utils.go
create mode 100644 server/internal/library/hggen/views/gohtml/writer.go
create mode 100644 server/internal/library/hggen/views/utils.go
create mode 100644 server/internal/library/hgorm/dao.go
create mode 100644 server/internal/library/hgorm/dao_tenant.go
create mode 100644 server/internal/library/hgorm/dao_tree.go
create mode 100644 server/internal/library/hgorm/handler/filter_auth.go
create mode 100644 server/internal/library/hgorm/handler/force_cache.go
create mode 100644 server/internal/library/hgorm/handler/handler.go
create mode 100644 server/internal/library/hgorm/handler/sorter.go
create mode 100644 server/internal/library/hgorm/handler/sorter_test.go
create mode 100644 server/internal/library/hgorm/handler/tenant.go
create mode 100644 server/internal/library/hgorm/hook/hook.go
create mode 100644 server/internal/library/hgorm/hook/member.go
create mode 100644 server/internal/library/hgorm/hook/provinces.go
create mode 100644 server/internal/library/hgorm/hook/tenant.go
create mode 100644 server/internal/library/hgorm/hook/tenant_test.go
create mode 100644 server/internal/library/hgrds/lock/consts.go
create mode 100644 server/internal/library/hgrds/lock/lock.go
create mode 100644 server/internal/library/hgrds/lock/lock_test.go
create mode 100644 server/internal/library/hgrds/pubsub/publish.go
create mode 100644 server/internal/library/hgrds/pubsub/subscribe.go
create mode 100644 server/internal/library/location/cache.go
create mode 100644 server/internal/library/location/geocode.go
create mode 100644 server/internal/library/location/location.go
create mode 100644 server/internal/library/location/location_test.go
create mode 100644 server/internal/library/location/region.go
create mode 100644 server/internal/library/network/tcp/client.go
create mode 100644 server/internal/library/network/tcp/client_cron.go
create mode 100644 server/internal/library/network/tcp/client_handle.go
create mode 100644 server/internal/library/network/tcp/conn.go
create mode 100644 server/internal/library/network/tcp/consts.go
create mode 100644 server/internal/library/network/tcp/context.go
create mode 100644 server/internal/library/network/tcp/msg.go
create mode 100644 server/internal/library/network/tcp/msg_parser.go
create mode 100644 server/internal/library/network/tcp/router.go
create mode 100644 server/internal/library/network/tcp/rpc.go
create mode 100644 server/internal/library/network/tcp/server.go
create mode 100644 server/internal/library/network/tcp/server_cron.go
create mode 100644 server/internal/library/network/tcp/tcp_example_test.go
create mode 100644 server/internal/library/payment/alipay/handle.go
create mode 100644 server/internal/library/payment/alipay/model.go
create mode 100644 server/internal/library/payment/config.go
create mode 100644 server/internal/library/payment/notifycall.go
create mode 100644 server/internal/library/payment/payment.go
create mode 100644 server/internal/library/payment/qqpay/handle.go
create mode 100644 server/internal/library/payment/qqpay/model.go
create mode 100644 server/internal/library/payment/wxpay/handle.go
create mode 100644 server/internal/library/payment/wxpay/model.go
create mode 100644 server/internal/library/queue/consumer.go
create mode 100644 server/internal/library/queue/disk.go
create mode 100644 server/internal/library/queue/disk/disk.go
create mode 100644 server/internal/library/queue/disk/reader.go
create mode 100644 server/internal/library/queue/disk/writer.go
create mode 100644 server/internal/library/queue/kafkamq.go
create mode 100644 server/internal/library/queue/logger.go
create mode 100644 server/internal/library/queue/producer.go
create mode 100644 server/internal/library/queue/queue.go
create mode 100644 server/internal/library/queue/redismq.go
create mode 100644 server/internal/library/queue/rocketmq.go
create mode 100644 server/internal/library/response/response.go
create mode 100644 server/internal/library/sms/config.go
create mode 100644 server/internal/library/sms/sms.go
create mode 100644 server/internal/library/sms/sms_aliyun.go
create mode 100644 server/internal/library/sms/sms_tencent.go
create mode 100644 server/internal/library/storager/config.go
create mode 100644 server/internal/library/storager/mime.go
create mode 100644 server/internal/library/storager/model.go
create mode 100644 server/internal/library/storager/upload.go
create mode 100644 server/internal/library/storager/upload_cos.go
create mode 100644 server/internal/library/storager/upload_local.go
create mode 100644 server/internal/library/storager/upload_local_test.go
create mode 100644 server/internal/library/storager/upload_minio.go
create mode 100644 server/internal/library/storager/upload_oss.go
create mode 100644 server/internal/library/storager/upload_qiniu.go
create mode 100644 server/internal/library/storager/upload_ucloud.go
create mode 100644 server/internal/library/token/token.go
create mode 100644 server/internal/library/validate/yaml.go
create mode 100644 server/internal/library/wechat/cache.go
create mode 100644 server/internal/library/wechat/config.go
create mode 100644 server/internal/library/wechat/wechat.go
create mode 100644 server/internal/logic/.gitkeep
create mode 100644 server/internal/logic/admin/cash.go
create mode 100644 server/internal/logic/admin/credits_log.go
create mode 100644 server/internal/logic/admin/dept.go
create mode 100644 server/internal/logic/admin/member.go
create mode 100644 server/internal/logic/admin/member_post.go
create mode 100644 server/internal/logic/admin/menu.go
create mode 100644 server/internal/logic/admin/monitor.go
create mode 100644 server/internal/logic/admin/notice.go
create mode 100644 server/internal/logic/admin/order.go
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/app_member.go
create mode 100644 server/internal/logic/sys/approval.go
create mode 100644 server/internal/logic/sys/attachment.go
create mode 100644 server/internal/logic/sys/biz_audit.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/customer_service.go
create mode 100644 server/internal/logic/sys/dashboard.go
create mode 100644 server/internal/logic/sys/dashboard_test.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/member_level.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/portal.go
create mode 100644 server/internal/logic/sys/portal_test.go
create mode 100644 server/internal/logic/sys/product.go
create mode 100644 server/internal/logic/sys/provinces.go
create mode 100644 server/internal/logic/sys/recharge_order.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/task.go
create mode 100644 server/internal/logic/sys/task_hall.go
create mode 100644 server/internal/logic/sys/task_submission.go
create mode 100644 server/internal/logic/sys/test_category.go
create mode 100644 server/internal/logic/sys/trade_order.go
create mode 100644 server/internal/logic/sys/withdrawal_order.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 100644 server/internal/model/do/app_member.go
create mode 100644 server/internal/model/do/app_member_address.go
create mode 100644 server/internal/model/do/app_member_level.go
create mode 100644 server/internal/model/do/app_member_level_version.go
create mode 100644 server/internal/model/do/app_member_notice.go
create mode 100644 server/internal/model/do/app_member_payment_account.go
create mode 100644 server/internal/model/do/app_member_profile.go
create mode 100644 server/internal/model/do/app_member_status_log.go
create mode 100644 server/internal/model/do/approval_action.go
create mode 100644 server/internal/model/do/approval_request.go
create mode 100644 server/internal/model/do/banner.go
create mode 100644 server/internal/model/do/biz_audit_log.go
create mode 100644 server/internal/model/do/content.go
create mode 100644 server/internal/model/do/content_version.go
create mode 100644 server/internal/model/do/customer_service.go
create mode 100644 server/internal/model/do/dashboard_daily_stat.go
create mode 100644 server/internal/model/do/finance_review.go
create mode 100644 server/internal/model/do/idempotency_record.go
create mode 100644 server/internal/model/do/outbox_event.go
create mode 100755 server/internal/model/do/pay_log.go
create mode 100755 server/internal/model/do/pay_refund.go
create mode 100644 server/internal/model/do/payment_channel.go
create mode 100644 server/internal/model/do/product.go
create mode 100644 server/internal/model/do/product_category.go
create mode 100644 server/internal/model/do/recharge_order.go
create mode 100644 server/internal/model/do/sensitive_access_log.go
create mode 100644 server/internal/model/do/site_config_version.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 100644 server/internal/model/do/task.go
create mode 100644 server/internal/model/do/task_hall.go
create mode 100644 server/internal/model/do/task_hall_level.go
create mode 100644 server/internal/model/do/task_level.go
create mode 100644 server/internal/model/do/task_submission.go
create mode 100755 server/internal/model/do/test_category.go
create mode 100644 server/internal/model/do/trade_order.go
create mode 100644 server/internal/model/do/wallet_account.go
create mode 100644 server/internal/model/do/wallet_adjustment_request.go
create mode 100644 server/internal/model/do/wallet_ledger.go
create mode 100644 server/internal/model/do/withdrawal_order.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 100644 server/internal/model/entity/app_member.go
create mode 100644 server/internal/model/entity/app_member_address.go
create mode 100644 server/internal/model/entity/app_member_level.go
create mode 100644 server/internal/model/entity/app_member_level_version.go
create mode 100644 server/internal/model/entity/app_member_notice.go
create mode 100644 server/internal/model/entity/app_member_payment_account.go
create mode 100644 server/internal/model/entity/app_member_profile.go
create mode 100644 server/internal/model/entity/app_member_status_log.go
create mode 100644 server/internal/model/entity/approval_action.go
create mode 100644 server/internal/model/entity/approval_request.go
create mode 100644 server/internal/model/entity/banner.go
create mode 100644 server/internal/model/entity/biz_audit_log.go
create mode 100644 server/internal/model/entity/content.go
create mode 100644 server/internal/model/entity/content_version.go
create mode 100644 server/internal/model/entity/customer_service.go
create mode 100644 server/internal/model/entity/dashboard_daily_stat.go
create mode 100644 server/internal/model/entity/finance_review.go
create mode 100644 server/internal/model/entity/idempotency_record.go
create mode 100644 server/internal/model/entity/outbox_event.go
create mode 100755 server/internal/model/entity/pay_log.go
create mode 100755 server/internal/model/entity/pay_refund.go
create mode 100644 server/internal/model/entity/payment_channel.go
create mode 100644 server/internal/model/entity/product.go
create mode 100644 server/internal/model/entity/product_category.go
create mode 100644 server/internal/model/entity/recharge_order.go
create mode 100644 server/internal/model/entity/sensitive_access_log.go
create mode 100644 server/internal/model/entity/site_config_version.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 100644 server/internal/model/entity/task.go
create mode 100644 server/internal/model/entity/task_hall.go
create mode 100644 server/internal/model/entity/task_hall_level.go
create mode 100644 server/internal/model/entity/task_level.go
create mode 100644 server/internal/model/entity/task_submission.go
create mode 100755 server/internal/model/entity/test_category.go
create mode 100644 server/internal/model/entity/trade_order.go
create mode 100644 server/internal/model/entity/wallet_account.go
create mode 100644 server/internal/model/entity/wallet_adjustment_request.go
create mode 100644 server/internal/model/entity/wallet_ledger.go
create mode 100644 server/internal/model/entity/withdrawal_order.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/app_member.go
create mode 100644 server/internal/model/input/sysin/approval.go
create mode 100644 server/internal/model/input/sysin/attachment.go
create mode 100644 server/internal/model/input/sysin/biz_audit.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/dashboard.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/member_level.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/portal.go
create mode 100644 server/internal/model/input/sysin/product_task.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/sysin/trade.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/app_member.go
create mode 100644 server/internal/router/genrouter/approval.go
create mode 100644 server/internal/router/genrouter/biz_audit.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/member_level.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/portal.go
create mode 100644 server/internal/router/genrouter/product_task.go
create mode 100644 server/internal/router/genrouter/task_hall.go
create mode 100644 server/internal/router/genrouter/test_category.go
create mode 100644 server/internal/router/genrouter/trade.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
create mode 100644 server/storage/data/hotgo.sql
create mode 100644 server/storage/data/migrations/20261008_001_governance.sql
create mode 100644 server/storage/data/migrations/20261008_002_governance_menu.sql
create mode 100644 server/storage/data/migrations/20261008_003_dashboard_menu.sql
create mode 100644 server/storage/data/migrations/20261008_004_portal_content.sql
create mode 100644 server/storage/data/migrations/20261008_005_member_management.sql
create mode 100644 server/storage/data/migrations/20261008_006_member_level_task_hall.sql
create mode 100644 server/storage/data/migrations/20261008_007_trade_management.sql
create mode 100644 server/storage/data/migrations/20261008_008_product_task_management.sql
create mode 100644 server/storage/data/migrations/20261008_009_member_menu_alignment.sql
create mode 100644 server/storage/data/migrations/20261009_001_remove_governance_menu.sql
create mode 100644 server/storage/data/migrations/20261009_002_delete_governance_menu.sql
create mode 100644 server/storage/data/migrations/20261009_003_role_menu_parent_scope.sql
create mode 100644 server/storage/data/migrations/20261009_010_member_operation_alignment.sql
create mode 100644 server/storage/data/migrations/20261009_010_menu_structure_alignment.sql
create mode 100644 server/storage/data/migrations/20261009_011_trade_order_match_menu.sql
create mode 100644 server/storage/data/migrations/20261009_012_show_personal_center_menu.sql
create mode 100644 server/storage/data/migrations/20261009_013_hide_member_auxiliary_menus.sql
create mode 100644 server/storage/data/migrations/20261009_014_order_matching_demo.sql
create mode 100644 server/storage/data/migrations/20261010_001_system_submenu_icons.sql
create mode 100644 server/storage/data/migrations/20261010_002_product_upload_permission.sql
create mode 100644 server/storage/data/seeds/20261008_business_demo_data.sql
create mode 100644 server/storage/data/seeds/20261008_dashboard_demo_data.sql
create mode 100644 server/storage/data/seeds/20261008_portal_content_initial.sql
create mode 100644 server/storage/data/seeds/20261009_member_level_initial.sql
create mode 100644 server/storage/data/sqlite/data.sql
create mode 100644 server/storage/data/sqlite/tables.sql
create mode 100644 server/utility/.gitkeep
create mode 100644 server/utility/charset/charset.go
create mode 100644 server/utility/convert/convert.go
create mode 100644 server/utility/convert/match.go
create mode 100644 server/utility/convert/slice.go
create mode 100644 server/utility/db/README.md
create mode 100644 server/utility/db/db.go
create mode 100644 server/utility/db/sqlite_example.sql
create mode 100644 server/utility/db/sqlite_fields.go
create mode 100644 server/utility/db/utils.go
create mode 100644 server/utility/encrypt/aes.go
create mode 100644 server/utility/encrypt/encrypt.go
create mode 100644 server/utility/encrypt/field.go
create mode 100644 server/utility/encrypt/field_test.go
create mode 100644 server/utility/excel/excel.go
create mode 100644 server/utility/file/file.go
create mode 100644 server/utility/format/format.go
create mode 100644 server/utility/simple/event.go
create mode 100644 server/utility/simple/simple.go
create mode 100644 server/utility/simple/system_config.go
create mode 100644 server/utility/tree/tree.go
create mode 100644 server/utility/tree/tree_list.go
create mode 100644 server/utility/url/url.go
create mode 100644 server/utility/useragent/useragent.go
create mode 100644 server/utility/validate/filter.go
create mode 100644 server/utility/validate/filter_test.go
create mode 100644 server/utility/validate/include.go
create mode 100644 server/utility/validate/validate.go
create mode 100644 server/utility/validate/validate_test.go
delete mode 100644 tools/__pycache__/build_reference_prd.cpython-312.pyc
diff --git a/.gitignore b/.gitignore
index 7ca469a..1aa21ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -70,3 +70,7 @@ dist/
.DS_Store
.idea/
.vscode/
+
+# Python bytecode
+__pycache__/
+*.py[cod]
diff --git a/server/.gitattributes b/server/.gitattributes
new file mode 100644
index 0000000..1fbf887
--- /dev/null
+++ b/server/.gitattributes
@@ -0,0 +1 @@
+* linguist-language=GO
\ No newline at end of file
diff --git a/server/.gitignore b/server/.gitignore
new file mode 100644
index 0000000..a314378
--- /dev/null
+++ b/server/.gitignore
@@ -0,0 +1,39 @@
+.buildpath
+.hgignore.swp
+.project
+.orig
+.swp
+.idea/
+.settings/
+.vscode/
+vendor/
+composer.lock
+pkg/
+cbuild
+**/.DS_Store
+/test/
+main
+output/
+manifest/config/config.yaml
+manifest/output/
+resource/log/
+resource/public/admin/
+resource/public/attachment/
+storage/cache/
+storage/diskqueue/
+storage/cert/ssl/server.crt
+storage/cert/ssl/server.key
+storage/cert/pay/alipay/
+storage/cert/pay/wxpay/
+temp/
+logs/
+main.exe
+main.exe~
+*.exe
+*.log
+*.zip
+.idea
+!hotgo/
+*.lock
+/bin/package.sh
+internal/packed/packed.go
diff --git a/server/.golangci.yml b/server/.golangci.yml
new file mode 100644
index 0000000..94f158a
--- /dev/null
+++ b/server/.golangci.yml
@@ -0,0 +1,287 @@
+## This file contains all available configuration options
+## with their default values.
+
+# See https://github.com/golangci/golangci-lint#config-file
+# See https://golangci-lint.run/usage/configuration/
+
+# Options for analysis running.
+run:
+ # Exit code when at least one issue was found.
+ # Default: 1
+ issues-exit-code: 2
+
+ # Include test files or not.
+ # Default: true
+ tests: false
+ go: "1.20"
+
+ # Which dirs to skip: issues from them won't be reported.
+ # Can use regexp here: `generated.*`, regexp is applied on full path.
+ # Default value is empty list,
+ # but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
+ # "/" will be replaced by current OS file path separator to properly work on Windows.
+ # skip-dirs:
+ # - internal/library/hggen/internal
+
+ # Which files to skip: they will be analyzed, but issues from them won't be reported.
+ # Default value is empty list,
+ # but there is no need to include all autogenerated files,
+ # we confidently recognize autogenerated files.
+ # If it's not please let us know.
+ # "/" will be replaced by current OS file path separator to properly work on Windows.
+ # skip-files: []
+
+
+# Main linters configurations.
+# See https://golangci-lint.run/usage/linters
+linters:
+ # Disable all default enabled linters.
+ disable-all: true
+ # Custom enable linters we want to use.
+ enable:
+ - errcheck # Errcheck is a program for checking for unchecked errors in go programs.
+ - errchkjson # Checks types passed to the json encoding functions. Reports unsupported types and optionally reports occasions, where the check for the returned error can be omitted.
+ - funlen # Tool for detection of long functions
+ - goconst # Finds repeated strings that could be replaced by a constant
+ - gocritic # Provides diagnostics that check for bugs, performance and style issues.
+# - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
+ - gosimple # Linter for Go source code that specializes in simplifying code
+ - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - misspell # Finds commonly misspelled English words in comments
+ - nolintlint # Reports ill-formed or insufficient nolint directives
+ - revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
+ - staticcheck # It's a set of rules from staticcheck. It's not the same thing as the staticcheck binary.
+ - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
+ - usestdlibvars # A linter that detect the possibility to use variables/constants from the Go standard library.
+ - whitespace # Tool for detection of leading and trailing whitespace
+
+
+issues:
+ exclude-rules:
+ # helpers in tests often (rightfully) pass a *testing.T as their first argument
+ - path: _test\.go
+ text: "context.Context should be the first parameter of a function"
+ linters:
+ - revive
+ # Yes, they are, but it's okay in a test
+ - path: _test\.go
+ text: "exported func.*returns unexported type.*which can be annoying to use"
+ linters:
+ - revive
+ # https://github.com/go-critic/go-critic/issues/926
+ - linters:
+ - gocritic
+ text: "unnecessaryDefer:"
+ exclude-dirs:
+ - internal/library/hggen/internal
+ exclude-files: []
+
+
+# https://golangci-lint.run/usage/linters
+linters-settings:
+ # https://golangci-lint.run/usage/linters/#misspell
+ misspell:
+ locale: US
+ ignore-words:
+ - cancelled
+
+ # https://golangci-lint.run/usage/linters/#revive
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
+ revive:
+ ignore-generated-header: true
+ severity: error
+ rules:
+ - name: atomic
+ - name: line-length-limit
+ severity: error
+ arguments: [ 1024 ]
+ - name: unhandled-error
+ severity: warning
+ disabled: true
+ arguments: []
+ - name: var-naming
+ severity: warning
+ disabled: true
+ arguments:
+ # AllowList
+ - [ "ID","URL","IP","HTTP","JSON","API","UID","Id","Api","Uid","Http","Json","Ip","Url" ]
+ # DenyList
+ - [ "VM" ]
+ - name: string-format
+ severity: warning
+ disabled: false
+ arguments:
+ - - 'core.WriteError[1].Message'
+ - '/^([^A-Z]|$)/'
+ - must not start with a capital letter
+ - - 'fmt.Errorf[0]'
+ - '/(^|[^\.!?])$/'
+ - must not end in punctuation
+ - - panic
+ - '/^[^\n]*$/'
+ - must not contain line breaks
+ - name: function-result-limit
+ severity: warning
+ disabled: false
+ arguments: [ 4 ]
+
+ # https://golangci-lint.run/usage/linters/#funlen
+ funlen:
+ # Checks the number of lines in a function.
+ # If lower than 0, disable the check.
+ # Default: 60
+ lines: 330
+ # Checks the number of statements in a function.
+ # If lower than 0, disable the check.
+ # Default: 40
+ statements: -1
+
+ # https://golangci-lint.run/usage/linters/#goconst
+ goconst:
+ # Minimal length of string constant.
+ # Default: 3
+ min-len: 4
+ # Minimum occurrences of constant string count to trigger issue.
+ # Default: 3
+ # For subsequent optimization, the value is reduced.
+ min-occurrences: 30
+ # Ignore test files.
+ # Default: false
+ ignore-tests: true
+ # Look for existing constants matching the values.
+ # Default: true
+ match-constant: false
+ # Search also for duplicated numbers.
+ # Default: false
+ numbers: true
+ # Minimum value, only works with goconst.numbers
+ # Default: 3
+ min: 5
+ # Maximum value, only works with goconst.numbers
+ # Default: 3
+ max: 20
+ # Ignore when constant is not used as function argument.
+ # Default: true
+ ignore-calls: false
+
+ # https://golangci-lint.run/usage/linters/#gocritic
+ gocritic:
+ disabled-checks:
+ - ifElseChain
+ - assignOp
+ - appendAssign
+ - singleCaseSwitch
+ - regexpMust
+ - typeSwitchVar
+ - elseif
+
+ # https://golangci-lint.run/usage/linters/#gosimple
+ gosimple:
+ # Select the Go version to target.
+ # Default: 1.13
+ # Deprecated: use the global `run.go` instead.
+ # go: "1.15"
+ # Sxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
+ # Default: ["*"]
+ checks: [
+ "all", "-S1000", "-S1001", "-S1002", "-S1008", "-S1009", "-S1016", "-S1023", "-S1025", "-S1029", "-S1034", "-S1040"
+ ]
+
+ # https://golangci-lint.run/usage/linters/#govet
+ govet:
+ # Report about shadowed variables.
+ # Default: false
+ # check-shadowing: true
+ # Settings per analyzer.
+ settings:
+ # Analyzer name, run `go tool vet help` to see all analyzers.
+ printf:
+ # Comma-separated list of print function names to check (in addition to default, see `go tool vet help printf`).
+ # Default: []
+ funcs:
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
+ # shadow:
+ # Whether to be strict about shadowing; can be noisy.
+ # Default: false
+ # strict: false
+ unusedresult:
+ # Comma-separated list of functions whose results must be used
+ # (in addition to defaults context.WithCancel,context.WithDeadline,context.WithTimeout,context.WithValue,
+ # errors.New,fmt.Errorf,fmt.Sprint,fmt.Sprintf,sort.Reverse)
+ # Default []
+ funcs:
+ - pkg.MyFunc
+ - context.WithCancel
+ # Comma-separated list of names of methods of type func() string whose results must be used
+ # (in addition to default Error,String)
+ # Default []
+ stringmethods:
+ - MyMethod
+ # Enable all analyzers.
+ # Default: false
+ enable-all: true
+ # Disable analyzers by name.
+ # Run `go tool vet help` to see all analyzers.
+ # Default: []
+ disable:
+ - asmdecl
+ - assign
+ - atomic
+ - atomicalign
+ - bools
+ - buildtag
+ - cgocall
+ - composites
+ - copylocks
+ - deepequalerrors
+ - errorsas
+ - fieldalignment
+ - findcall
+ - framepointer
+ - httpresponse
+ - ifaceassert
+ - loopclosure
+ - lostcancel
+ - nilfunc
+ - nilness
+ - reflectvaluecompare
+ - shift
+ - shadow
+ - sigchanyzer
+ - sortslice
+ - stdmethods
+ - stringintconv
+ - structtag
+ - testinggoroutine
+ - tests
+ - unmarshal
+ - unreachable
+ - unsafeptr
+ - unusedwrite
+
+ # https://golangci-lint.run/usage/linters/#staticcheck
+ staticcheck:
+ # Select the Go version to target.
+ # Default: "1.13"
+ # Deprecated: use the global `run.go` instead.
+ # go: "1.15"
+ # SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
+ # Default: ["*"]
+ checks: [ "all","-SA1019","-SA4015","-SA1029","-SA1016","-SA9003","-SA4006","-SA6003" ]
+
+ # https://golangci-lint.run/usage/linters/#gofmt
+ gofmt:
+ # Simplify code: gofmt with `-s` option.
+ # Default: true
+ simplify: true
+ # Apply the rewrite rules to the source before reformatting.
+ # https://pkg.go.dev/cmd/gofmt
+ # Default: []
+ rewrite-rules: [ ]
+ # - pattern: 'interface{}'
+ # replacement: 'any'
+ # - pattern: 'a[b:len(a)]'
+ # replacement: 'a[b:]'
\ No newline at end of file
diff --git a/server/Makefile b/server/Makefile
new file mode 100644
index 0000000..9731f00
--- /dev/null
+++ b/server/Makefile
@@ -0,0 +1,113 @@
+ROOT_DIR = $(shell pwd)
+NAMESPACE = "default"
+DEPLOY_NAME = "template-single"
+DOCKER_NAME = "template-single"
+ADMIN_RESOURCE_PATH = "/resource/public/admin/"
+
+# 一键编译。编译web前端,并将编译后的包移动到服务端对应静态资源路径下,最后编译服务端
+.PHONY: build
+build:
+ @rm -rf ./$(ADMIN_RESOURCE_PATH)
+ @mkdir ./$(ADMIN_RESOURCE_PATH)
+ @cd ../web && pnpm run build && \cp -rf ./dist/* ../server$(ADMIN_RESOURCE_PATH)
+ @cd ../server
+ @echo "y" | gf build
+
+# 通过热编译启动所有服务
+.PHONY: all
+all:
+ gf run main.go --args "all"
+
+.PHONY: http
+http:
+ gf run main.go --args "http"
+
+.PHONY: queue
+queue:
+ gf run main.go --args "queue"
+
+.PHONY: cron
+cron:
+ gf run main.go --args "cron"
+
+.PHONY: auth
+auth:
+ gf run main.go --args "auth"
+
+# 启动web服务
+.PHONY: web
+web:
+ @cd ../web && pnpm run dev
+
+# 刷新casbin权限
+.PHONY: refresh
+refresh:
+ @go run main.go tools -m=casbin -a1=refresh
+
+# 清理casbin权限
+.PHONY: clear
+clear:
+ @go run main.go tools -m=casbin -a1=clear
+
+# 运行代码质量分析工具
+# https://github.com/ywanbing/golangci
+.PHONY: lint
+lint:
+ golangci-lint run
+
+.PHONY: killmain
+killmain:
+ @kill -9 $(ps -ef|grep main|grep -v grep|awk '{print $2}')
+
+# Install/Update to the latest CLI tool.
+.PHONY: cli
+cli:
+ @set -e; \
+ wget -O gf https://github.com/gogf/gf/releases/latest/download/gf_$(shell go env GOOS)_$(shell go env GOARCH) && \
+ chmod +x gf && \
+ ./gf install -y && \
+ rm ./gf
+
+# Check and install CLI tool.
+.PHONY: cli.install
+cli.install:
+ @set -e; \
+ gf -v > /dev/null 2>&1 || if [[ "$?" -ne "0" ]]; then \
+ echo "GoFame CLI is not installed, start proceeding auto installation..."; \
+ make cli; \
+ fi;
+
+# Generate Go files for DAO/DO/Entity.
+.PHONY: dao
+dao: cli.install
+ @gf gen dao
+
+# Generate Go files for Service.
+.PHONY: service
+service: cli.install
+ @gf gen service
+
+# Build image, deploy image and yaml to current kubectl environment and make port forward to local machine.
+.PHONY: start
+start:
+ @set -e; \
+ make image; \
+ make deploy; \
+ make port;
+
+# Build docker image and commit to the repository.
+# example: make image tag=v0.0.1
+.PHONY: image
+image:
+ @echo "y" | gf docker main.go -p -tn hotgo:$(tag)
+
+# Deploy image and yaml to current kubectl environment.
+.PHONY: deploy
+deploy:
+ $(eval _TAG = $(if ${TAG}, ${TAG}, develop))
+ @set -e; \
+ mkdir -p $(ROOT_DIR)/temp/kustomize;\
+ cd $(ROOT_DIR)/manifest/deploy/kustomize/overlays/${_TAG};\
+ kustomize build > $(ROOT_DIR)/temp/kustomize.yaml;\
+ kubectl apply -f $(ROOT_DIR)/temp/kustomize.yaml; \
+ kubectl patch -n $(NAMESPACE) deployment/$(DEPLOY_NAME) -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"$(shell date +%s)\"}}}}}";
diff --git a/server/README.MD b/server/README.MD
new file mode 100644
index 0000000..67735c3
--- /dev/null
+++ b/server/README.MD
@@ -0,0 +1 @@
+## HotGo 管理后台服务端
\ No newline at end of file
diff --git a/server/addons/addons.go b/server/addons/addons.go
new file mode 100644
index 0000000..aa1b522
--- /dev/null
+++ b/server/addons/addons.go
@@ -0,0 +1,6 @@
+// Package addons
+// @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 addons
diff --git a/server/addons/hgexample/README.MD b/server/addons/hgexample/README.MD
new file mode 100644
index 0000000..8fa3944
--- /dev/null
+++ b/server/addons/hgexample/README.MD
@@ -0,0 +1,39 @@
+## 功能案例
+
+### 简介
+
+系统的一些功能案例
+
+
+### 使用说明
+
+系统自带的功能使用示例及其说明,包含一些简单的交互
+
+
+### 安装
+
+1、安装 HotGo (2.11.4及以上)
+
+项目介绍:https://github.com/bufanyun/hotgo
+
+2、将当前插件项目拷贝进 HotGo 根目录的 server/addons 目录下
+
+3、在 HotGo 根目录的 server/addons/modules 目录下创建go文件:hgexample.go,内容如下:
+```go
+package modules
+
+import _ "hotgo/addons/hgexample"
+```
+
+4、HotGo 后台进入 开发工具->插件管理->找到 功能案例 (hgexample) 进行安装
+
+5、重启服务即可生效
+
+
+### 常用命令行
+
+```shell
+# 接口维护-gen service
+gf gen service -s=addons/hgexample/logic -d=addons/hgexample/service
+
+```
diff --git a/server/addons/hgexample/api/admin/comp/import.go b/server/addons/hgexample/api/admin/comp/import.go
new file mode 100644
index 0000000..75bd097
--- /dev/null
+++ b/server/addons/hgexample/api/admin/comp/import.go
@@ -0,0 +1,26 @@
+// Package comp
+// @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 comp
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "github.com/gogf/gf/v2/net/ghttp"
+)
+
+// ImportExcelReq 导入Excel
+type ImportExcelReq struct {
+ g.Meta `path:"/comp/importExcel" method:"post" tags:"功能案例" summary:"导入Excel"`
+ File *ghttp.UploadFile `json:"file" type:"file" dc:"分片文件"`
+}
+
+type ImportExcelSheet struct {
+ Sheet string `json:"sheet"`
+ Rows [][]string `json:"rows"`
+}
+
+type ImportExcelRes struct {
+ Sheets []*ImportExcelSheet `json:"sheets"`
+}
diff --git a/server/addons/hgexample/api/admin/config/config.go b/server/addons/hgexample/api/admin/config/config.go
new file mode 100644
index 0000000..83b431f
--- /dev/null
+++ b/server/addons/hgexample/api/admin/config/config.go
@@ -0,0 +1,30 @@
+// Package config
+// @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 config
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/addons/hgexample/model/input/sysin"
+)
+
+// GetReq 获取指定分组的配置
+type GetReq struct {
+ g.Meta `path:"/config/get" method:"get" tags:"配置" summary:"获取指定分组的配置"`
+ sysin.GetConfigInp
+}
+
+type GetRes struct {
+ *sysin.GetConfigModel
+}
+
+// UpdateReq 获取指定分组的配置
+type UpdateReq struct {
+ g.Meta `path:"/config/update" method:"post" tags:"配置" summary:"获取指定分组的配置"`
+ sysin.UpdateConfigInp
+}
+
+type UpdateRes struct {
+}
diff --git a/server/addons/hgexample/api/admin/index/index.go b/server/addons/hgexample/api/admin/index/index.go
new file mode 100644
index 0000000..764eaa8
--- /dev/null
+++ b/server/addons/hgexample/api/admin/index/index.go
@@ -0,0 +1,21 @@
+// Package index
+// @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 index
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/addons/hgexample/model/input/sysin"
+)
+
+// TestReq 测试
+type TestReq struct {
+ g.Meta `path:"/index/test" method:"get" tags:"功能案例" summary:"测试"`
+ sysin.IndexTestInp
+}
+
+type TestRes struct {
+ *sysin.IndexTestModel
+}
diff --git a/server/addons/hgexample/api/admin/table/table.go b/server/addons/hgexample/api/admin/table/table.go
new file mode 100644
index 0000000..368c4dc
--- /dev/null
+++ b/server/addons/hgexample/api/admin/table/table.go
@@ -0,0 +1,83 @@
+// Package table
+// @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 table
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/addons/hgexample/model/input/sysin"
+ "hotgo/internal/model/input/form"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/table/list" method:"get" tags:"表格例子" summary:"获取表格列表"`
+ sysin.TableListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*sysin.TableListModel `json:"list" dc:"数据列表"`
+}
+
+// ExportReq 导出列表
+type ExportReq struct {
+ g.Meta `path:"/table/export" method:"get" tags:"表格例子" summary:"导出表格列表"`
+ sysin.TableListInp
+}
+
+type ExportRes struct{}
+
+// ViewReq 获取信息
+type ViewReq struct {
+ g.Meta `path:"/table/view" method:"get" tags:"表格例子" summary:"获取指定信息"`
+ sysin.TableViewInp
+}
+
+type ViewRes struct {
+ *sysin.TableViewModel
+}
+
+// EditReq 修改/新增
+type EditReq struct {
+ g.Meta `path:"/table/edit" method:"post" tags:"表格例子" summary:"修改/新增表格"`
+ sysin.TableEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除
+type DeleteReq struct {
+ g.Meta `path:"/table/delete" method:"post" tags:"表格例子" summary:"删除表格"`
+ sysin.TableDeleteInp
+}
+
+type DeleteRes struct{}
+
+// MaxSortReq 最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/table/maxSort" method:"get" tags:"表格例子" summary:"表格最大排序"`
+ sysin.TableMaxSortInp
+}
+
+type MaxSortRes struct {
+ *sysin.TableMaxSortModel
+}
+
+// StatusReq 更新状态
+type StatusReq struct {
+ g.Meta `path:"/table/status" method:"post" tags:"表格例子" summary:"更新表格状态"`
+ sysin.TableStatusInp
+}
+
+type StatusRes struct{}
+
+// SwitchReq 更新开关状态
+type SwitchReq struct {
+ g.Meta `path:"/table/switch" method:"post" tags:"表格例子" summary:"更新表格状态"`
+ sysin.TableSwitchInp
+}
+
+type SwitchRes struct{}
diff --git a/server/addons/hgexample/api/admin/tenantorder/tenantorder.go b/server/addons/hgexample/api/admin/tenantorder/tenantorder.go
new file mode 100644
index 0000000..edb8c2e
--- /dev/null
+++ b/server/addons/hgexample/api/admin/tenantorder/tenantorder.go
@@ -0,0 +1,59 @@
+// Package tenantorder
+// @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.13.1
+package tenantorder
+
+import (
+ "hotgo/addons/hgexample/model/input/sysin"
+ "hotgo/internal/model/input/form"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ListReq 查询多租户功能演示列表
+type ListReq struct {
+ g.Meta `path:"/tenantOrder/list" method:"get" tags:"多租户功能演示" summary:"获取多租户功能演示列表"`
+ sysin.TenantOrderListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*sysin.TenantOrderListModel `json:"list" dc:"数据列表"`
+}
+
+// ExportReq 导出多租户功能演示列表
+type ExportReq struct {
+ g.Meta `path:"/tenantOrder/export" method:"get" tags:"多租户功能演示" summary:"导出多租户功能演示列表"`
+ sysin.TenantOrderListInp
+}
+
+type ExportRes struct{}
+
+// ViewReq 获取多租户功能演示指定信息
+type ViewReq struct {
+ g.Meta `path:"/tenantOrder/view" method:"get" tags:"多租户功能演示" summary:"获取多租户功能演示指定信息"`
+ sysin.TenantOrderViewInp
+}
+
+type ViewRes struct {
+ *sysin.TenantOrderViewModel
+}
+
+// EditReq 修改/新增多租户功能演示
+type EditReq struct {
+ g.Meta `path:"/tenantOrder/edit" method:"post" tags:"多租户功能演示" summary:"修改/新增多租户功能演示"`
+ sysin.TenantOrderEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除多租户功能演示
+type DeleteReq struct {
+ g.Meta `path:"/tenantOrder/delete" method:"post" tags:"多租户功能演示" summary:"删除多租户功能演示"`
+ sysin.TenantOrderDeleteInp
+}
+
+type DeleteRes struct{}
\ No newline at end of file
diff --git a/server/addons/hgexample/api/admin/treetable/treetable.go b/server/addons/hgexample/api/admin/treetable/treetable.go
new file mode 100644
index 0000000..d5ebb96
--- /dev/null
+++ b/server/addons/hgexample/api/admin/treetable/treetable.go
@@ -0,0 +1,92 @@
+// Package treetable
+// @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 treetable
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/addons/hgexample/model/input/sysin"
+ "hotgo/internal/model/input/form"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/treeTable/list" method:"get" tags:"树形表格例子" summary:"获取表格列表"`
+ sysin.TreeTableListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*sysin.TreeTableListModel `json:"list" dc:"数据列表"`
+}
+
+// ExportReq 导出列表
+type ExportReq struct {
+ g.Meta `path:"/treeTable/export" method:"get" tags:"树形表格例子" summary:"导出表格列表"`
+ sysin.TableListInp
+}
+
+type ExportRes struct{}
+
+// ViewReq 获取信息
+type ViewReq struct {
+ g.Meta `path:"/treeTable/view" method:"get" tags:"树形表格例子" summary:"获取指定信息"`
+ sysin.TableViewInp
+}
+
+type ViewRes struct {
+ *sysin.TableViewModel
+}
+
+// EditReq 修改/新增
+type EditReq struct {
+ g.Meta `path:"/treeTable/edit" method:"post" tags:"树形表格例子" summary:"修改/新增表格"`
+ sysin.TableEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除
+type DeleteReq struct {
+ g.Meta `path:"/treeTable/delete" method:"post" tags:"树形表格例子" summary:"删除表格"`
+ sysin.TableDeleteInp
+}
+
+type DeleteRes struct{}
+
+// MaxSortReq 最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/treeTable/maxSort" method:"get" tags:"树形表格例子" summary:"表格最大排序"`
+ sysin.TableMaxSortInp
+}
+
+type MaxSortRes struct {
+ *sysin.TableMaxSortModel
+}
+
+// StatusReq 更新状态
+type StatusReq struct {
+ g.Meta `path:"/treeTable/status" method:"post" tags:"树形表格例子" summary:"更新表格状态"`
+ sysin.TableStatusInp
+}
+
+type StatusRes struct{}
+
+// SwitchReq 更新开关状态
+type SwitchReq struct {
+ g.Meta `path:"/treeTable/switch" method:"post" tags:"树形表格例子" summary:"更新表格状态"`
+ sysin.TableSwitchInp
+}
+
+type SwitchRes struct{}
+
+// SelectReq 树形选项
+type SelectReq struct {
+ g.Meta `path:"/treeTable/select" method:"get" tags:"树形表格例子" summary:"树形选项"`
+}
+
+type SelectRes struct {
+ List []*sysin.TableTree `json:"list" dc:"数据列表"`
+}
diff --git a/server/addons/hgexample/api/api/index/index.go b/server/addons/hgexample/api/api/index/index.go
new file mode 100644
index 0000000..764eaa8
--- /dev/null
+++ b/server/addons/hgexample/api/api/index/index.go
@@ -0,0 +1,21 @@
+// Package index
+// @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 index
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/addons/hgexample/model/input/sysin"
+)
+
+// TestReq 测试
+type TestReq struct {
+ g.Meta `path:"/index/test" method:"get" tags:"功能案例" summary:"测试"`
+ sysin.IndexTestInp
+}
+
+type TestRes struct {
+ *sysin.IndexTestModel
+}
diff --git a/server/addons/hgexample/api/home/index/index.go b/server/addons/hgexample/api/home/index/index.go
new file mode 100644
index 0000000..7a44e68
--- /dev/null
+++ b/server/addons/hgexample/api/home/index/index.go
@@ -0,0 +1,21 @@
+// Package index
+// @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 index
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/addons/hgexample/model/input/sysin"
+)
+
+// TestReq 测试
+type TestReq struct {
+ g.Meta `path:"/index/test" method:"get" tags:"功能案例" summary:"测试首页"`
+ sysin.IndexTestInp
+}
+
+type TestRes struct {
+ g.Meta `mime:"text/html" type:"string" example:""`
+}
diff --git a/server/addons/hgexample/api/websocket/index/index.go b/server/addons/hgexample/api/websocket/index/index.go
new file mode 100644
index 0000000..764eaa8
--- /dev/null
+++ b/server/addons/hgexample/api/websocket/index/index.go
@@ -0,0 +1,21 @@
+// Package index
+// @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 index
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/addons/hgexample/model/input/sysin"
+)
+
+// TestReq 测试
+type TestReq struct {
+ g.Meta `path:"/index/test" method:"get" tags:"功能案例" summary:"测试"`
+ sysin.IndexTestInp
+}
+
+type TestRes struct {
+ *sysin.IndexTestModel
+}
diff --git a/server/addons/hgexample/controller/admin/sys/comp.go b/server/addons/hgexample/controller/admin/sys/comp.go
new file mode 100644
index 0000000..ba57d0b
--- /dev/null
+++ b/server/addons/hgexample/controller/admin/sys/comp.go
@@ -0,0 +1,46 @@
+// 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/xuri/excelize/v2"
+ "hotgo/addons/hgexample/api/admin/comp"
+)
+
+var (
+ Comp = cComp{}
+)
+
+type cComp struct{}
+
+// ImportExcel 导入Excel
+func (c *cComp) ImportExcel(ctx context.Context, req *comp.ImportExcelReq) (res *comp.ImportExcelRes, err error) {
+ file, err := req.File.Open()
+ if err != nil {
+ return
+ }
+ defer file.Close()
+
+ excel, err := excelize.OpenReader(file)
+ if err != nil {
+ return
+ }
+ defer excel.Close()
+
+ res = new(comp.ImportExcelRes)
+ sheetList := excel.GetSheetList()
+ for _, sheet := range sheetList {
+ item := new(comp.ImportExcelSheet)
+ item.Sheet = sheet
+ item.Rows, err = excel.GetRows(sheet)
+ if err != nil {
+ return nil, err
+ }
+ res.Sheets = append(res.Sheets, item)
+ }
+ return
+}
diff --git a/server/addons/hgexample/controller/admin/sys/config.go b/server/addons/hgexample/controller/admin/sys/config.go
new file mode 100644
index 0000000..ef40a69
--- /dev/null
+++ b/server/addons/hgexample/controller/admin/sys/config.go
@@ -0,0 +1,33 @@
+// 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/addons/hgexample/api/admin/config"
+ "hotgo/addons/hgexample/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/addons/hgexample/controller/admin/sys/index.go b/server/addons/hgexample/controller/admin/sys/index.go
new file mode 100644
index 0000000..b378b1d
--- /dev/null
+++ b/server/addons/hgexample/controller/admin/sys/index.go
@@ -0,0 +1,30 @@
+// 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/addons/hgexample/api/admin/index"
+ "hotgo/addons/hgexample/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/addons/hgexample/controller/admin/sys/table.go b/server/addons/hgexample/controller/admin/sys/table.go
new file mode 100644
index 0000000..03188cf
--- /dev/null
+++ b/server/addons/hgexample/controller/admin/sys/table.go
@@ -0,0 +1,85 @@
+// 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/addons/hgexample/api/admin/table"
+ "hotgo/addons/hgexample/service"
+)
+
+var (
+ Table = cTable{}
+)
+
+type cTable struct{}
+
+// List 查看列表
+func (c *cTable) List(ctx context.Context, req *table.ListReq) (res *table.ListRes, err error) {
+ list, totalCount, err := service.SysTable().List(ctx, &req.TableListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(table.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Export 导出列表
+func (c *cTable) Export(ctx context.Context, req *table.ExportReq) (res *table.ExportRes, err error) {
+ err = service.SysTable().Export(ctx, &req.TableListInp)
+ return
+}
+
+// Edit 更新
+func (c *cTable) Edit(ctx context.Context, req *table.EditReq) (res *table.EditRes, err error) {
+ err = service.SysTable().Edit(ctx, &req.TableEditInp)
+ return
+}
+
+// MaxSort 最大排序
+func (c *cTable) MaxSort(ctx context.Context, req *table.MaxSortReq) (res *table.MaxSortRes, err error) {
+ data, err := service.SysTable().MaxSort(ctx, &req.TableMaxSortInp)
+ if err != nil {
+ return
+ }
+
+ res = new(table.MaxSortRes)
+ res.TableMaxSortModel = data
+ return
+}
+
+// View 获取指定信息
+func (c *cTable) View(ctx context.Context, req *table.ViewReq) (res *table.ViewRes, err error) {
+ data, err := service.SysTable().View(ctx, &req.TableViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(table.ViewRes)
+ res.TableViewModel = data
+ return
+}
+
+// Delete 删除
+func (c *cTable) Delete(ctx context.Context, req *table.DeleteReq) (res *table.DeleteRes, err error) {
+ err = service.SysTable().Delete(ctx, &req.TableDeleteInp)
+ return
+}
+
+// Status 更新状态
+func (c *cTable) Status(ctx context.Context, req *table.StatusReq) (res *table.StatusRes, err error) {
+ err = service.SysTable().Status(ctx, &req.TableStatusInp)
+ return
+}
+
+// Switch 更新开关状态
+func (c *cTable) Switch(ctx context.Context, req *table.SwitchReq) (res *table.SwitchRes, err error) {
+ err = service.SysTable().Switch(ctx, &req.TableSwitchInp)
+ return
+}
diff --git a/server/addons/hgexample/controller/admin/sys/tenant_order.go b/server/addons/hgexample/controller/admin/sys/tenant_order.go
new file mode 100644
index 0000000..95977a3
--- /dev/null
+++ b/server/addons/hgexample/controller/admin/sys/tenant_order.go
@@ -0,0 +1,67 @@
+// 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.13.1
+package sys
+
+import (
+ "context"
+ "hotgo/addons/hgexample/api/admin/tenantorder"
+ "hotgo/addons/hgexample/model/input/sysin"
+ "hotgo/addons/hgexample/service"
+)
+
+var (
+ TenantOrder = cTenantOrder{}
+)
+
+type cTenantOrder struct{}
+
+// List 查看多租户功能演示列表
+func (c *cTenantOrder) List(ctx context.Context, req *tenantorder.ListReq) (res *tenantorder.ListRes, err error) {
+ list, totalCount, err := service.SysTenantOrder().List(ctx, &req.TenantOrderListInp)
+ if err != nil {
+ return
+ }
+
+ if list == nil {
+ list = []*sysin.TenantOrderListModel{}
+ }
+
+ res = new(tenantorder.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Export 导出多租户功能演示列表
+func (c *cTenantOrder) Export(ctx context.Context, req *tenantorder.ExportReq) (res *tenantorder.ExportRes, err error) {
+ err = service.SysTenantOrder().Export(ctx, &req.TenantOrderListInp)
+ return
+}
+
+// Edit 更新多租户功能演示
+func (c *cTenantOrder) Edit(ctx context.Context, req *tenantorder.EditReq) (res *tenantorder.EditRes, err error) {
+ err = service.SysTenantOrder().Edit(ctx, &req.TenantOrderEditInp)
+ return
+}
+
+// View 获取指定多租户功能演示信息
+func (c *cTenantOrder) View(ctx context.Context, req *tenantorder.ViewReq) (res *tenantorder.ViewRes, err error) {
+ data, err := service.SysTenantOrder().View(ctx, &req.TenantOrderViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(tenantorder.ViewRes)
+ res.TenantOrderViewModel = data
+ return
+}
+
+// Delete 删除多租户功能演示
+func (c *cTenantOrder) Delete(ctx context.Context, req *tenantorder.DeleteReq) (res *tenantorder.DeleteRes, err error) {
+ err = service.SysTenantOrder().Delete(ctx, &req.TenantOrderDeleteInp)
+ return
+}
\ No newline at end of file
diff --git a/server/addons/hgexample/controller/admin/sys/tree_table.go b/server/addons/hgexample/controller/admin/sys/tree_table.go
new file mode 100644
index 0000000..0d2dd86
--- /dev/null
+++ b/server/addons/hgexample/controller/admin/sys/tree_table.go
@@ -0,0 +1,92 @@
+// 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/addons/hgexample/api/admin/treetable"
+ "hotgo/addons/hgexample/service"
+)
+
+var (
+ TreeTable = cTreeTable{}
+)
+
+type cTreeTable struct{}
+
+// List 查看列表
+func (c *cTreeTable) List(ctx context.Context, req *treetable.ListReq) (res *treetable.ListRes, err error) {
+ list, totalCount, err := service.SysTreeTable().List(ctx, &req.TreeTableListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(treetable.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Export 导出列表
+func (c *cTreeTable) Export(ctx context.Context, req *treetable.ExportReq) (res *treetable.ExportRes, err error) {
+ err = service.SysTable().Export(ctx, &req.TableListInp)
+ return
+}
+
+// Edit 更新
+func (c *cTreeTable) Edit(ctx context.Context, req *treetable.EditReq) (res *treetable.EditRes, err error) {
+ err = service.SysTreeTable().Edit(ctx, &req.TableEditInp)
+ return
+}
+
+// MaxSort 最大排序
+func (c *cTreeTable) MaxSort(ctx context.Context, req *treetable.MaxSortReq) (res *treetable.MaxSortRes, err error) {
+ data, err := service.SysTable().MaxSort(ctx, &req.TableMaxSortInp)
+ if err != nil {
+ return
+ }
+
+ res = new(treetable.MaxSortRes)
+ res.TableMaxSortModel = data
+ return
+}
+
+// View 获取指定信息
+func (c *cTreeTable) View(ctx context.Context, req *treetable.ViewReq) (res *treetable.ViewRes, err error) {
+ data, err := service.SysTable().View(ctx, &req.TableViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(treetable.ViewRes)
+ res.TableViewModel = data
+ return
+}
+
+// Delete 删除
+func (c *cTreeTable) Delete(ctx context.Context, req *treetable.DeleteReq) (res *treetable.DeleteRes, err error) {
+ err = service.SysTreeTable().Delete(ctx, &req.TableDeleteInp)
+ return
+}
+
+// Status 更新状态
+func (c *cTreeTable) Status(ctx context.Context, req *treetable.StatusReq) (res *treetable.StatusRes, err error) {
+ err = service.SysTable().Status(ctx, &req.TableStatusInp)
+ return
+}
+
+// Switch 更新开关状态
+func (c *cTreeTable) Switch(ctx context.Context, req *treetable.SwitchReq) (res *treetable.SwitchRes, err error) {
+ err = service.SysTable().Switch(ctx, &req.TableSwitchInp)
+ return
+}
+
+// Select 树形选项
+func (c *cTreeTable) Select(ctx context.Context, _ *treetable.SelectReq) (res *treetable.SelectRes, err error) {
+ res = new(treetable.SelectRes)
+ res.List, err = service.SysTreeTable().Select(ctx)
+ return
+}
diff --git a/server/addons/hgexample/controller/api/index.go b/server/addons/hgexample/controller/api/index.go
new file mode 100644
index 0000000..c604f1d
--- /dev/null
+++ b/server/addons/hgexample/controller/api/index.go
@@ -0,0 +1,30 @@
+// Package api
+// @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 api
+
+import (
+ "context"
+ "hotgo/addons/hgexample/api/api/index"
+ "hotgo/addons/hgexample/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/addons/hgexample/controller/home/index.go b/server/addons/hgexample/controller/home/index.go
new file mode 100644
index 0000000..668fc74
--- /dev/null
+++ b/server/addons/hgexample/controller/home/index.go
@@ -0,0 +1,34 @@
+// Package home
+// @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 home
+
+import (
+ "context"
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/addons/hgexample/api/home/index"
+ "hotgo/addons/hgexample/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/addons/hgexample/controller/websocket/handler/index.go b/server/addons/hgexample/controller/websocket/handler/index.go
new file mode 100644
index 0000000..0cc74ab
--- /dev/null
+++ b/server/addons/hgexample/controller/websocket/handler/index.go
@@ -0,0 +1,25 @@
+// Package handler
+// @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 handler
+
+import (
+ "github.com/gogf/gf/v2/encoding/gjson"
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/websocket"
+)
+
+var (
+ Index = cIndex{}
+)
+
+type cIndex struct{}
+
+// TestMessage 测试消息
+func (c *cIndex) TestMessage(client *websocket.Client, req *websocket.WRequest) {
+ g.Log().Infof(client.Context(), "收到客户端测试消息:%v", gjson.New(req).String())
+ // 将收到的消息原样发送给客户端
+ websocket.SendSuccess(client, req.Event, req.Data)
+}
diff --git a/server/addons/hgexample/controller/websocket/index.go b/server/addons/hgexample/controller/websocket/index.go
new file mode 100644
index 0000000..37b9bbf
--- /dev/null
+++ b/server/addons/hgexample/controller/websocket/index.go
@@ -0,0 +1,30 @@
+// 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"
+ "hotgo/addons/hgexample/api/websocket/index"
+ "hotgo/addons/hgexample/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/addons/hgexample/crons/crons.go b/server/addons/hgexample/crons/crons.go
new file mode 100644
index 0000000..e20bf6c
--- /dev/null
+++ b/server/addons/hgexample/crons/crons.go
@@ -0,0 +1,9 @@
+// Package crons
+// @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 crons
+
+// 定时任务.
+// 插件中的定时任务可以统一在这里注册和处理
diff --git a/server/addons/hgexample/global/global.go b/server/addons/hgexample/global/global.go
new file mode 100644
index 0000000..f549f88
--- /dev/null
+++ b/server/addons/hgexample/global/global.go
@@ -0,0 +1,12 @@
+// Package global
+// @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 global
+
+import "hotgo/internal/library/addons"
+
+var (
+ skeleton *addons.Skeleton // 插件架子
+)
diff --git a/server/addons/hgexample/global/init.go b/server/addons/hgexample/global/init.go
new file mode 100644
index 0000000..9db6de9
--- /dev/null
+++ b/server/addons/hgexample/global/init.go
@@ -0,0 +1,22 @@
+// Package global
+// @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 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/addons/hgexample/logic/.gitkeep b/server/addons/hgexample/logic/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/server/addons/hgexample/logic/logic.go b/server/addons/hgexample/logic/logic.go
new file mode 100644
index 0000000..bd978f2
--- /dev/null
+++ b/server/addons/hgexample/logic/logic.go
@@ -0,0 +1,9 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package logic
+
+import (
+ _ "hotgo/addons/hgexample/logic/sys"
+)
diff --git a/server/addons/hgexample/logic/sys/config.go b/server/addons/hgexample/logic/sys/config.go
new file mode 100644
index 0000000..73620b2
--- /dev/null
+++ b/server/addons/hgexample/logic/sys/config.go
@@ -0,0 +1,59 @@
+// 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/util/gconv"
+ "hotgo/addons/hgexample/global"
+ "hotgo/addons/hgexample/model"
+ "hotgo/addons/hgexample/model/input/sysin"
+ "hotgo/addons/hgexample/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/addons/hgexample/logic/sys/index.go b/server/addons/hgexample/logic/sys/index.go
new file mode 100644
index 0000000..d3e8ccd
--- /dev/null
+++ b/server/addons/hgexample/logic/sys/index.go
@@ -0,0 +1,35 @@
+// 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/os/gtime"
+ "hotgo/addons/hgexample/global"
+ "hotgo/addons/hgexample/model/input/sysin"
+ "hotgo/addons/hgexample/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/addons/hgexample/logic/sys/table.go b/server/addons/hgexample/logic/sys/table.go
new file mode 100644
index 0000000..9c828bb
--- /dev/null
+++ b/server/addons/hgexample/logic/sys/table.go
@@ -0,0 +1,233 @@
+// 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/errors/gerror"
+ "github.com/gogf/gf/v2/frame/g"
+ "github.com/gogf/gf/v2/os/gctx"
+ "github.com/gogf/gf/v2/util/gconv"
+ "hotgo/addons/hgexample/model/input/sysin"
+ "hotgo/addons/hgexample/service"
+ "hotgo/internal/dao"
+ "hotgo/internal/library/contexts"
+ "hotgo/internal/library/hgorm"
+ "hotgo/internal/library/hgorm/handler"
+ "hotgo/internal/model/input/form"
+ "hotgo/utility/convert"
+ "hotgo/utility/excel"
+ "hotgo/utility/validate"
+)
+
+type sSysTable struct{}
+
+func NewSysTable() *sSysTable {
+ return &sSysTable{}
+}
+
+func init() {
+ service.RegisterSysTable(NewSysTable())
+}
+
+// Model Orm模型
+func (s *sSysTable) Model(ctx context.Context, option ...*handler.Option) *gdb.Model {
+ return handler.Model(dao.AddonHgexampleTable.Ctx(ctx), option...)
+}
+
+// List 获取列表
+func (s *sSysTable) List(ctx context.Context, in *sysin.TableListInp) (list []*sysin.TableListModel, totalCount int, err error) {
+ mod := s.Model(ctx)
+ cols := dao.AddonHgexampleTable.Columns()
+
+ if in.Title != "" {
+ mod = mod.WhereLike(cols.Title, "%"+in.Title+"%")
+ }
+
+ if in.Content != "" {
+ mod = mod.WhereLike(cols.Content, "%"+in.Content+"%")
+ }
+
+ if in.Status > 0 {
+ mod = mod.Where(cols.Status, in.Status)
+ }
+
+ if in.Switch > 0 {
+ mod = mod.Where(cols.Switch, in.Switch)
+ }
+
+ if len(in.Price) > 0 {
+ if in.Price[0] > 0 && in.Price[1] > 0 {
+ mod = mod.WhereBetween(cols.Price, in.Price[0], in.Price[1])
+ } else if in.Price[0] > 0 && in.Price[1] == 0 {
+ mod = mod.WhereGTE(cols.Price, in.Price[0])
+ } else if in.Price[0] == 0 && in.Price[1] > 0 {
+ mod = mod.WhereLTE(cols.Price, in.Price[1])
+ }
+ }
+
+ if in.ActivityAt != nil {
+ mod = mod.Where(cols.ActivityAt, in.ActivityAt)
+ }
+
+ if len(in.CreatedAt) == 2 {
+ mod = mod.WhereBetween(cols.CreatedAt, in.CreatedAt[0], in.CreatedAt[1])
+ }
+
+ if !in.Flag.IsNil() {
+ mod = mod.Where(fmt.Sprintf(`JSON_CONTAINS(%s,'%v')`, cols.Flag, in.Flag))
+ }
+
+ if !in.Hobby.IsNil() {
+ mod = mod.Where(fmt.Sprintf(`JSON_CONTAINS(%s,'%v')`, cols.Hobby, in.Hobby))
+ }
+
+ totalCount, err = mod.Clone().Count()
+ if err != nil {
+ err = gerror.Wrap(err, "获取表格数据行失败,请稍后重试!")
+ return
+ }
+
+ if totalCount == 0 {
+ return
+ }
+
+ // .OrderAsc(cols.Sort).OrderDesc(cols.Id)
+ if err = mod.Fields(sysin.TableListModel{}).Page(in.Page, in.PerPage).Handler(handler.Sorter(in)).Scan(&list); err != nil {
+ err = gerror.Wrap(err, "获取表格列表失败,请稍后重试!")
+ return
+ }
+ return
+}
+
+// Export 导出
+func (s *sSysTable) Export(ctx context.Context, in *sysin.TableListInp) (err error) {
+ list, totalCount, err := s.List(ctx, in)
+ if err != nil {
+ return
+ }
+
+ // 字段的排序是依据tags的字段顺序,如果你不想使用默认的排序方式,可以直接定义 tags = []string{"字段名称", "字段名称2", ...}
+ tags, err := convert.GetEntityDescTags(sysin.TableExportModel{})
+ 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.TableExportModel
+ )
+
+ if err = gconv.Scan(list, &exports); err != nil {
+ return
+ }
+
+ if err = excel.ExportByStructs(ctx, tags, exports, fileName, sheetName); err != nil {
+ return
+ }
+ return
+}
+
+// Edit 修改/新增
+func (s *sSysTable) Edit(ctx context.Context, in *sysin.TableEditInp) (err error) {
+ cols := dao.AddonHgexampleTable.Columns()
+ if err = hgorm.IsUnique(ctx, &dao.AddonHgexampleTable, g.Map{cols.Qq: in.Qq}, "QQ号码已存在,请换一个", in.Id); err != nil {
+ return
+ }
+
+ // 修改
+ if in.Id > 0 {
+ in.UpdatedBy = contexts.GetUserId(ctx)
+ if _, err = s.Model(ctx).WherePri(in.Id).Data(in).Update(); err != nil {
+ err = gerror.Wrap(err, "修改表格失败,请稍后重试!")
+ return
+ }
+ return
+ }
+
+ // 新增
+ in.CreatedBy = contexts.GetUserId(ctx)
+ if _, err = s.Model(ctx, &handler.Option{FilterAuth: false}).Data(in).OmitEmptyData().Insert(); err != nil {
+ err = gerror.Wrap(err, "新增表格失败,请稍后重试!")
+ return
+ }
+ return
+}
+
+// Delete 删除
+func (s *sSysTable) Delete(ctx context.Context, in *sysin.TableDeleteInp) (err error) {
+ if _, err = s.Model(ctx).WherePri(in.Id).Delete(); err != nil {
+ err = gerror.Wrap(err, "删除表格失败,请稍后重试!")
+ return
+ }
+ return
+}
+
+// Status 更新状态
+func (s *sSysTable) Status(ctx context.Context, in *sysin.TableStatusInp) (err error) {
+ update := g.Map{
+ dao.AddonHgexampleTable.Columns().Status: in.Status,
+ dao.AddonHgexampleTable.Columns().UpdatedBy: contexts.GetUserId(ctx),
+ }
+
+ if _, err = s.Model(ctx).WherePri(in.Id).Data(update).Update(); err != nil {
+ err = gerror.Wrap(err, "更新表格状态失败,请稍后重试!")
+ return
+ }
+ return
+}
+
+// Switch 更新开关状态
+func (s *sSysTable) Switch(ctx context.Context, in *sysin.TableSwitchInp) (err error) {
+ var fields = []string{
+ dao.AddonHgexampleTable.Columns().Switch,
+ // ...
+ }
+
+ if !validate.InSlice(fields, in.Key) {
+ err = gerror.New("开关键名不在白名单")
+ return
+ }
+
+ update := g.Map{
+ in.Key: in.Value,
+ dao.AddonHgexampleTable.Columns().UpdatedBy: contexts.GetUserId(ctx),
+ }
+
+ if _, err = s.Model(ctx).Where(dao.AddonHgexampleTable.Columns().Id, in.Id).Data(update).Update(); err != nil {
+ err = gerror.Wrap(err, "更新表格开关失败,请稍后重试!")
+ return
+ }
+ return
+}
+
+// MaxSort 最大排序
+func (s *sSysTable) MaxSort(ctx context.Context, in *sysin.TableMaxSortInp) (res *sysin.TableMaxSortModel, err error) {
+ dx := dao.AddonHgexampleTable
+ if err = dx.Ctx(ctx).Fields(dx.Columns().Sort).OrderDesc(dx.Columns().Sort).Scan(&res); err != nil {
+ err = gerror.Wrap(err, "获取表格最大排序,请稍后重试!")
+ return
+ }
+
+ if res == nil {
+ res = new(sysin.TableMaxSortModel)
+ }
+
+ res.Sort = form.DefaultMaxSort(res.Sort)
+ return
+}
+
+// View 获取指定信息
+func (s *sSysTable) View(ctx context.Context, in *sysin.TableViewInp) (res *sysin.TableViewModel, err error) {
+ if err = s.Model(ctx).WherePri(in.Id).Scan(&res); err != nil {
+ err = gerror.Wrap(err, "获取生成演示信息,请稍后重试!")
+ return
+ }
+ return
+}
diff --git a/server/addons/hgexample/logic/sys/tenant_order.go b/server/addons/hgexample/logic/sys/tenant_order.go
new file mode 100644
index 0000000..ac8094d
--- /dev/null
+++ b/server/addons/hgexample/logic/sys/tenant_order.go
@@ -0,0 +1,174 @@
+// 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.13.1
+package sys
+
+import (
+ "context"
+ "fmt"
+ "hotgo/addons/hgexample/model/input/sysin"
+ "hotgo/addons/hgexample/service"
+ "hotgo/internal/dao"
+ "hotgo/internal/library/hgorm/handler"
+ "hotgo/internal/library/hgorm/hook"
+ "hotgo/internal/model/input/form"
+ "hotgo/utility/convert"
+ "hotgo/utility/excel"
+
+ "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 sSysTenantOrder struct{}
+
+func NewSysTenantOrder() *sSysTenantOrder {
+ return &sSysTenantOrder{}
+}
+
+func init() {
+ service.RegisterSysTenantOrder(NewSysTenantOrder())
+}
+
+// Model 多租户功能演示ORM模型
+func (s *sSysTenantOrder) Model(ctx context.Context, option ...*handler.Option) *gdb.Model {
+ if len(option) == 0 {
+ // 过滤多租户数据权限
+ option = append(option, &handler.Option{
+ FilterTenant: true,
+ //FilterAuth: true, // 如果还需要维护created_by、member_id等部门数据权限范围可放开注释
+ })
+ }
+ return handler.Model(dao.AddonHgexampleTenantOrder.Ctx(ctx), option...)
+}
+
+// List 获取多租户功能演示列表
+func (s *sSysTenantOrder) List(ctx context.Context, in *sysin.TenantOrderListInp) (list []*sysin.TenantOrderListModel, totalCount int, err error) {
+ mod := s.Model(ctx)
+
+ // 字段过滤
+ mod = mod.Fields(sysin.TenantOrderListModel{})
+
+ // 查询主键
+ if in.Id > 0 {
+ mod = mod.Where(dao.AddonHgexampleTenantOrder.Columns().Id, in.Id)
+ }
+
+ // 查询租户ID
+ if in.TenantId > 0 {
+ mod = mod.Where(dao.AddonHgexampleTenantOrder.Columns().TenantId, in.TenantId)
+ }
+
+ // 查询商户ID
+ if in.MerchantId > 0 {
+ mod = mod.Where(dao.AddonHgexampleTenantOrder.Columns().MerchantId, in.MerchantId)
+ }
+
+ // 查询用户ID
+ if in.UserId > 0 {
+ mod = mod.Where(dao.AddonHgexampleTenantOrder.Columns().UserId, in.UserId)
+ }
+
+ // 查询关联订单号
+ if in.OrderSn != "" {
+ mod = mod.Where(dao.AddonHgexampleTenantOrder.Columns().OrderSn, in.OrderSn)
+ }
+
+ // 查询支付状态
+ if in.Status > 0 {
+ mod = mod.Where(dao.AddonHgexampleTenantOrder.Columns().Status, in.Status)
+ }
+
+ // 查询创建时间
+ if len(in.CreatedAt) == 2 {
+ mod = mod.WhereBetween(dao.AddonHgexampleTenantOrder.Columns().CreatedAt, in.CreatedAt[0], in.CreatedAt[1])
+ }
+
+ // 分页
+ mod = mod.Page(in.Page, in.PerPage)
+
+ // 排序
+ mod = mod.OrderDesc(dao.AddonHgexampleTenantOrder.Columns().Id)
+
+ // 查询数据
+ if err = mod.ScanAndCount(&list, &totalCount, false); err != nil {
+ err = gerror.Wrap(err, "获取多租户功能演示列表失败,请稍后重试!")
+ return
+ }
+ return
+}
+
+// Export 导出多租户功能演示
+func (s *sSysTenantOrder) Export(ctx context.Context, in *sysin.TenantOrderListInp) (err error) {
+ list, totalCount, err := s.List(ctx, in)
+ if err != nil {
+ return
+ }
+
+ // 字段的排序是依据tags的字段顺序,如果你不想使用默认的排序方式,可以直接定义 tags = []string{"字段名称", "字段名称2", ...}
+ tags, err := convert.GetEntityDescTags(sysin.TenantOrderExportModel{})
+ 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.TenantOrderExportModel
+ )
+
+ if err = gconv.Scan(list, &exports); err != nil {
+ return
+ }
+
+ err = excel.ExportByStructs(ctx, tags, exports, fileName, sheetName)
+ return
+}
+
+// Edit 修改/新增多租户功能演示
+func (s *sSysTenantOrder) Edit(ctx context.Context, in *sysin.TenantOrderEditInp) (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.TenantOrderUpdateFields{}).
+ WherePri(in.Id).Data(in).
+ Hook(hook.SaveTenant). // 自动维护租户关系更新
+ Update(); err != nil {
+ }
+ return
+ }
+
+ // 新增
+ if _, err = dao.AddonHgexampleTenantOrder.Ctx(ctx).
+ Fields(sysin.TenantOrderInsertFields{}).
+ Hook(hook.SaveTenant). // 自动维护租户关系更新
+ Data(in).
+ Insert(); err != nil {
+ }
+ return
+ })
+}
+
+// Delete 删除多租户功能演示
+func (s *sSysTenantOrder) Delete(ctx context.Context, in *sysin.TenantOrderDeleteInp) (err error) {
+ if _, err = s.Model(ctx).WherePri(in.Id).Delete(); err != nil {
+ err = gerror.Wrap(err, "删除多租户功能演示失败,请稍后重试!")
+ return
+ }
+ return
+}
+
+// View 获取多租户功能演示指定信息
+func (s *sSysTenantOrder) View(ctx context.Context, in *sysin.TenantOrderViewInp) (res *sysin.TenantOrderViewModel, err error) {
+ if err = s.Model(ctx).WherePri(in.Id).Scan(&res); err != nil {
+ err = gerror.Wrap(err, "获取多租户功能演示信息,请稍后重试!")
+ return
+ }
+ return
+}
diff --git a/server/addons/hgexample/logic/sys/tree_table.go b/server/addons/hgexample/logic/sys/tree_table.go
new file mode 100644
index 0000000..2f09057
--- /dev/null
+++ b/server/addons/hgexample/logic/sys/tree_table.go
@@ -0,0 +1,186 @@
+// 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/errors/gerror"
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/addons/hgexample/model/input/sysin"
+ "hotgo/addons/hgexample/service"
+ "hotgo/internal/consts"
+ "hotgo/internal/dao"
+ "hotgo/internal/library/contexts"
+ "hotgo/internal/library/hgorm"
+ "hotgo/internal/library/hgorm/handler"
+ "hotgo/internal/model/entity"
+)
+
+type sSysTreeTable struct{}
+
+func NewSysTreeTable() *sSysTreeTable {
+ return &sSysTreeTable{}
+}
+
+func init() {
+ service.RegisterSysTreeTable(NewSysTreeTable())
+}
+
+// Model Orm模型
+func (s *sSysTreeTable) Model(ctx context.Context, option ...*handler.Option) *gdb.Model {
+ return handler.Model(dao.AddonHgexampleTable.Ctx(ctx), option...)
+}
+
+// List 获取列表
+func (s *sSysTreeTable) List(ctx context.Context, in *sysin.TreeTableListInp) (list []*sysin.TreeTableListModel, totalCount int, err error) {
+ mod := s.Model(ctx)
+ cols := dao.AddonHgexampleTable.Columns()
+
+ if in.Title != "" {
+ mod = mod.WhereLike(cols.Title, "%"+in.Title+"%")
+ }
+
+ if in.Content != "" {
+ mod = mod.WhereLike(cols.Content, "%"+in.Content+"%")
+ }
+
+ if in.Status > 0 {
+ mod = mod.Where(cols.Status, in.Status)
+ }
+
+ if in.Switch > 0 {
+ mod = mod.Where(cols.Switch, in.Switch)
+ }
+
+ if in.Pid > 0 {
+ mod = mod.Where(cols.Pid, in.Pid)
+ }
+
+ if len(in.Price) > 0 {
+ if in.Price[0] > 0 && in.Price[1] > 0 {
+ mod = mod.WhereBetween(cols.Price, in.Price[0], in.Price[1])
+ } else if in.Price[0] > 0 && in.Price[1] == 0 {
+ mod = mod.WhereGTE(cols.Price, in.Price[0])
+ } else if in.Price[0] == 0 && in.Price[1] > 0 {
+ mod = mod.WhereLTE(cols.Price, in.Price[1])
+ }
+ }
+
+ if in.ActivityAt != nil {
+ mod = mod.Where(cols.ActivityAt, in.ActivityAt)
+ }
+
+ if len(in.CreatedAt) == 2 {
+ mod = mod.WhereBetween(cols.CreatedAt, in.CreatedAt[0], in.CreatedAt[1])
+ }
+
+ if !in.Flag.IsNil() {
+ mod = mod.Where(fmt.Sprintf(`JSON_CONTAINS(%s,'%v')`, cols.Flag, in.Flag))
+ }
+
+ if !in.Hobby.IsNil() {
+ mod = mod.Where(fmt.Sprintf(`JSON_CONTAINS(%s,'%v')`, cols.Hobby, in.Hobby))
+ }
+
+ totalCount, err = mod.Clone().Count()
+ if err != nil {
+ err = gerror.Wrap(err, "获取表格数据行失败,请稍后重试!")
+ return
+ }
+
+ if totalCount == 0 {
+ return
+ }
+
+ if err = mod.Fields(sysin.TableListModel{}).Page(in.Page, in.PerPage).Handler(handler.Sorter(in)).Scan(&list); err != nil {
+ err = gerror.Wrap(err, "获取表格列表失败,请稍后重试!")
+ return
+ }
+ return
+}
+
+// Edit 修改/新增
+func (s *sSysTreeTable) Edit(ctx context.Context, in *sysin.TableEditInp) (err error) {
+ cols := dao.AddonHgexampleTable.Columns()
+ if err = hgorm.IsUnique(ctx, &dao.AddonHgexampleTable, g.Map{cols.Qq: in.Qq}, "QQ号码已存在,请换一个", in.Id); err != nil {
+ return
+ }
+
+ 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.AddonHgexampleTable, in.Id, in.Pid)
+ if err != nil {
+ return err
+ }
+
+ if in.Id > 0 {
+ in.UpdatedBy = contexts.GetUserId(ctx)
+ if _, err = s.Model(ctx).WherePri(in.Id).Data(in).Update(); err != nil {
+ err = gerror.Wrap(err, "修改表格失败,请稍后重试!")
+ return err
+ }
+ } else {
+ in.CreatedBy = contexts.GetUserId(ctx)
+ if _, err = s.Model(ctx, &handler.Option{FilterAuth: false}).Data(in).OmitEmptyData().Insert(); err != nil {
+ err = gerror.Wrap(err, "新增表格失败,请稍后重试!")
+ return err
+ }
+ }
+ return
+ })
+}
+
+// Delete 删除
+func (s *sSysTreeTable) Delete(ctx context.Context, in *sysin.TableDeleteInp) (err error) {
+ count, err := dao.AdminMenu.Ctx(ctx).Where("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
+}
+
+// Select 关系树选项列表
+func (s *sSysTreeTable) Select(ctx context.Context) (list []*sysin.TableTree, err error) {
+ var models []*entity.AddonHgexampleTable
+ if err = dao.AddonHgexampleTable.Ctx(ctx).Order("pid asc,id asc,sort asc").Scan(&models); err != nil {
+ err = gerror.Wrap(err, "获取关系树选项列表失败!")
+ return
+ }
+
+ list = s.treeList(0, models)
+ return
+}
+
+// treeList 树状列表
+func (s *sSysTreeTable) treeList(pid int64, nodes []*entity.AddonHgexampleTable) (list []*sysin.TableTree) {
+ list = make([]*sysin.TableTree, 0)
+ for _, v := range nodes {
+ if v.Pid == pid {
+ item := new(sysin.TableTree)
+ item.AddonHgexampleTable = *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/addons/hgexample/main.go b/server/addons/hgexample/main.go
new file mode 100644
index 0000000..2cccd3a
--- /dev/null
+++ b/server/addons/hgexample/main.go
@@ -0,0 +1,97 @@
+// Package hgexample
+// @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 hgexample
+
+import (
+ "context"
+ "github.com/gogf/gf/v2/net/ghttp"
+ "github.com/gogf/gf/v2/os/gctx"
+ _ "hotgo/addons/hgexample/crons"
+ "hotgo/addons/hgexample/global"
+ _ "hotgo/addons/hgexample/logic"
+ _ "hotgo/addons/hgexample/queues"
+ "hotgo/addons/hgexample/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: "功能案例",
+ Name: "hgexample",
+ Group: 1,
+ Logo: "",
+ Brief: "系统的一些功能案例",
+ Description: "系统自带的功能使用示例及其说明,包含一些简单的交互",
+ Author: "孟帅",
+ Version: "v1.0.0", // 当该版本号高于已安装的版本号时,会提示可以更新
+ },
+ 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/addons/hgexample/model/config.go b/server/addons/hgexample/model/config.go
new file mode 100644
index 0000000..7496b4b
--- /dev/null
+++ b/server/addons/hgexample/model/config.go
@@ -0,0 +1,11 @@
+// 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 {
+ Test string `json:"basicTest"`
+}
diff --git a/server/addons/hgexample/model/input/sysin/config.go b/server/addons/hgexample/model/input/sysin/config.go
new file mode 100644
index 0000000..05c4fc1
--- /dev/null
+++ b/server/addons/hgexample/model/input/sysin/config.go
@@ -0,0 +1,24 @@
+// 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/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/addons/hgexample/model/input/sysin/index.go b/server/addons/hgexample/model/input/sysin/index.go
new file mode 100644
index 0000000..8e19ad5
--- /dev/null
+++ b/server/addons/hgexample/model/input/sysin/index.go
@@ -0,0 +1,27 @@
+// 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"
+)
+
+// 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/addons/hgexample/model/input/sysin/table.go b/server/addons/hgexample/model/input/sysin/table.go
new file mode 100644
index 0000000..e8d9f58
--- /dev/null
+++ b/server/addons/hgexample/model/input/sysin/table.go
@@ -0,0 +1,180 @@
+// 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"
+ "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"
+)
+
+// TableEditInp 修改/新增
+type TableEditInp struct {
+ entity.AddonHgexampleTable
+}
+
+type TableEditModel struct{}
+
+func (in *TableEditInp) Filter(ctx context.Context) (err error) {
+ if in.Map.IsNil() {
+ in.Map = gjson.New(consts.NilJsonToString)
+ }
+ if in.Flag.IsNil() {
+ in.Flag = gjson.New(consts.NilJsonToString)
+ }
+ if in.Images.IsNil() {
+ in.Images = gjson.New(consts.NilJsonToString)
+ }
+ if in.Attachfiles.IsNil() {
+ in.Attachfiles = gjson.New(consts.NilJsonToString)
+ }
+ if in.Hobby.IsNil() {
+ in.Hobby = gjson.New(consts.NilJsonToString)
+ }
+
+ if in.Title == "" {
+ return errors.New("标题不能为空")
+ }
+
+ if in.Email != "" && !validate.IsEmail(in.Email) {
+ return errors.New("邮箱格式不正确")
+ }
+
+ if err := g.Validator().Rules("float|between:0,5").Messages("请输入一个浮点数|推荐星只能是0~5星").Data(in.Star).Run(ctx); err != nil {
+ return err.Current()
+ }
+ return
+}
+
+// TableDeleteInp 删除类型
+type TableDeleteInp struct {
+ Id interface{} `json:"id" v:"required#表格ID不能为空" dc:"表格ID"`
+}
+
+type TableDeleteModel struct{}
+
+// TableViewInp 获取信息
+type TableViewInp struct {
+ Id int64 `json:"id" v:"required#表格ID不能为空" dc:"表格ID"`
+}
+
+type TableViewModel struct {
+ entity.AddonHgexampleTable
+}
+
+// TableListInp 获取列表
+type TableListInp struct {
+ form.PageReq
+ form.Sorters
+ Id int64 `json:"id" description:""`
+ Flag *gjson.Json `json:"flag" description:"标签"`
+ Title string `json:"title" description:"标题"`
+ Content string `json:"content" description:"内容"`
+ Price []float64 `json:"price" description:"价格"`
+ ActivityAt *gtime.Time `json:"activityAt" description:"活动时间"`
+ Switch int `json:"switch" description:"开关"`
+ Hobby *gjson.Json `json:"hobby" description:"爱好"`
+ Status int `json:"status" description:"状态"`
+ CreatedAt []*gtime.Time `json:"createdAt" description:"创建时间"`
+}
+
+type TableListModel struct {
+ entity.AddonHgexampleTable
+ TableCategoryName string `json:"TableCategoryName" description:"分类名称"`
+ TableCategoryDescription string `json:"TableCategoryDescription" description:"分类描述"`
+ TableCategoryRemark string `json:"TableCategoryRemark" description:"分类备注"`
+ SysProvincesTitle string `json:"sysProvincesTitle" description:""`
+}
+
+func (in *TableListInp) Filter(ctx context.Context) (err error) {
+ if !in.Flag.IsNil() {
+ in.Flag = gjson.New(in.Flag.Var().Ints())
+ }
+ if !in.Hobby.IsNil() {
+ in.Hobby = gjson.New(in.Hobby.Var().Ints())
+ }
+ return
+}
+
+type TableExportModel struct {
+ Id int64 `json:"id" description:""`
+ CategoryId int64 `json:"categoryId" description:"分类ID"`
+ Flag *gjson.Json `json:"flag" description:"标签"`
+ Title string `json:"title" description:"标题"`
+ Star float64 `json:"star" description:"推荐星"`
+ Price float64 `json:"price" description:"价格"`
+ Views int64 `json:"views" description:"浏览次数"`
+ ActivityAt *gtime.Time `json:"activityAt" description:"活动时间"`
+ StartAt *gtime.Time `json:"startAt" description:"开启时间"`
+ EndAt *gtime.Time `json:"endAt" description:"结束时间"`
+ Switch int `json:"switch" description:"开关"`
+ Sort int `json:"sort" description:"排序"`
+ Avatar string `json:"avatar" description:"头像"`
+ Sex int `json:"sex" description:"性别"`
+ Qq string `json:"qq" description:"qq"`
+ Email string `json:"email" description:"邮箱"`
+ Mobile string `json:"mobile" description:"手机号码"`
+ Hobby *gjson.Json `json:"hobby" description:"爱好"`
+ Channel int `json:"channel" description:"渠道"`
+ Pid int64 `json:"pid" description:"上级ID"`
+ Level int `json:"level" description:"树等级"`
+ Tree string `json:"tree" description:"关系树"`
+ Remark string `json:"remark" description:"备注"`
+ Status int `json:"status" description:"状态"`
+ CreatedBy int64 `json:"createdBy" description:"创建者"`
+ UpdatedBy int64 `json:"updatedBy" description:"更新者"`
+ CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
+ UpdatedAt *gtime.Time `json:"updatedAt" description:"修改时间"`
+ DeletedAt *gtime.Time `json:"deletedAt" description:"删除时间"`
+}
+
+// TableMaxSortInp 最大排序
+type TableMaxSortInp struct{}
+
+type TableMaxSortModel struct {
+ Sort int `json:"sort" description:"排序"`
+}
+
+// TableStatusInp 更新状态
+type TableStatusInp struct {
+ Id int64 `json:"id" v:"required#表格ID不能为空" dc:"表格ID"`
+ Status int `json:"status" dc:"状态"`
+}
+
+func (in *TableStatusInp) 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 TableStatusModel struct{}
+
+// TableSwitchInp 更新开关状态
+type TableSwitchInp struct {
+ form.SwitchReq
+ Id int64 `json:"id" v:"required#表格ID不能为空" dc:"表格ID"`
+}
+
+type TableSwitchModel struct{}
diff --git a/server/addons/hgexample/model/input/sysin/tenant_order.go b/server/addons/hgexample/model/input/sysin/tenant_order.go
new file mode 100644
index 0000000..61b44a6
--- /dev/null
+++ b/server/addons/hgexample/model/input/sysin/tenant_order.go
@@ -0,0 +1,123 @@
+// 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.13.1
+package sysin
+
+import (
+ "context"
+ "hotgo/internal/model/entity"
+ "hotgo/internal/model/input/form"
+
+ "github.com/gogf/gf/v2/frame/g"
+ "github.com/gogf/gf/v2/os/gtime"
+)
+
+// TenantOrderUpdateFields 修改多租户功能演示字段过滤
+type TenantOrderUpdateFields struct {
+ TenantId int64 `json:"tenantId" dc:"租户ID"`
+ MerchantId int64 `json:"merchantId" dc:"商户ID"`
+ UserId int64 `json:"userId" dc:"用户ID"`
+ ProductName string `json:"productName" dc:"购买产品"`
+ OrderSn string `json:"orderSn" dc:"关联订单号"`
+ Money float64 `json:"money" dc:"充值金额"`
+ Remark string `json:"remark" dc:"备注"`
+ Status int `json:"status" dc:"支付状态"`
+}
+
+// TenantOrderInsertFields 新增多租户功能演示字段过滤
+type TenantOrderInsertFields struct {
+ TenantId int64 `json:"tenantId" dc:"租户ID"`
+ MerchantId int64 `json:"merchantId" dc:"商户ID"`
+ UserId int64 `json:"userId" dc:"用户ID"`
+ ProductName string `json:"productName" dc:"购买产品"`
+ OrderSn string `json:"orderSn" dc:"关联订单号"`
+ Money float64 `json:"money" dc:"充值金额"`
+ Remark string `json:"remark" dc:"备注"`
+ Status int `json:"status" dc:"支付状态"`
+}
+
+// TenantOrderEditInp 修改/新增多租户功能演示
+type TenantOrderEditInp struct {
+ entity.AddonHgexampleTenantOrder
+}
+
+func (in *TenantOrderEditInp) Filter(ctx context.Context) (err error) {
+ // 验证充值金额
+ if err := g.Validator().Rules("required").Data(in.Money).Messages("充值金额不能为空").Run(ctx); err != nil {
+ return err.Current()
+ }
+
+ return
+}
+
+type TenantOrderEditModel struct{}
+
+// TenantOrderDeleteInp 删除多租户功能演示
+type TenantOrderDeleteInp struct {
+ Id interface{} `json:"id" v:"required#主键不能为空" dc:"主键"`
+}
+
+func (in *TenantOrderDeleteInp) Filter(ctx context.Context) (err error) {
+ return
+}
+
+type TenantOrderDeleteModel struct{}
+
+// TenantOrderViewInp 获取指定多租户功能演示信息
+type TenantOrderViewInp struct {
+ Id int64 `json:"id" v:"required#主键不能为空" dc:"主键"`
+}
+
+func (in *TenantOrderViewInp) Filter(ctx context.Context) (err error) {
+ return
+}
+
+type TenantOrderViewModel struct {
+ entity.AddonHgexampleTenantOrder
+}
+
+// TenantOrderListInp 获取多租户功能演示列表
+type TenantOrderListInp struct {
+ form.PageReq
+ Id int64 `json:"id" dc:"主键"`
+ TenantId int64 `json:"tenantId" dc:"租户ID"`
+ MerchantId int64 `json:"merchantId" dc:"商户ID"`
+ UserId int64 `json:"userId" dc:"用户ID"`
+ OrderSn string `json:"orderSn" dc:"关联订单号"`
+ Status int `json:"status" dc:"支付状态"`
+ CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
+}
+
+func (in *TenantOrderListInp) Filter(ctx context.Context) (err error) {
+ return
+}
+
+type TenantOrderListModel struct {
+ Id int64 `json:"id" dc:"主键"`
+ TenantId int64 `json:"tenantId" dc:"租户ID"`
+ MerchantId int64 `json:"merchantId" dc:"商户ID"`
+ UserId int64 `json:"userId" dc:"用户ID"`
+ ProductName string `json:"productName" dc:"购买产品"`
+ 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:"创建时间"`
+}
+
+// TenantOrderExportModel 导出多租户功能演示
+type TenantOrderExportModel struct {
+ Id int64 `json:"id" dc:"主键"`
+ TenantId int64 `json:"tenantId" dc:"租户ID"`
+ MerchantId int64 `json:"merchantId" dc:"商户ID"`
+ UserId int64 `json:"userId" dc:"用户ID"`
+ ProductName string `json:"productName" dc:"购买产品"`
+ 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:"创建时间"`
+}
diff --git a/server/addons/hgexample/model/input/sysin/tree_table.go b/server/addons/hgexample/model/input/sysin/tree_table.go
new file mode 100644
index 0000000..02702c4
--- /dev/null
+++ b/server/addons/hgexample/model/input/sysin/tree_table.go
@@ -0,0 +1,47 @@
+// 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/encoding/gjson"
+ "github.com/gogf/gf/v2/os/gtime"
+ "hotgo/internal/model/entity"
+ "hotgo/internal/model/input/form"
+)
+
+// TreeTableListInp 获取列表
+type TreeTableListInp struct {
+ form.PageReq
+ form.Sorters
+ Id int64 `json:"id" description:""`
+ Flag *gjson.Json `json:"flag" description:"标签"`
+ Title string `json:"title" description:"标题"`
+ Content string `json:"content" description:"内容"`
+ Price []float64 `json:"price" description:"价格"`
+ ActivityAt *gtime.Time `json:"activityAt" description:"活动时间"`
+ Switch int `json:"switch" description:"开关"`
+ Hobby *gjson.Json `json:"hobby" description:"爱好"`
+ Status int `json:"status" description:"状态"`
+ CreatedAt []*gtime.Time `json:"createdAt" description:"创建时间"`
+ Pid int64 `json:"pid" description:"上级ID"`
+}
+
+type TreeTableListModel struct {
+ entity.AddonHgexampleTable
+ TableCategoryName string `json:"TableCategoryName" description:"分类名称"`
+ TableCategoryDescription string `json:"TableCategoryDescription" description:"分类描述"`
+ TableCategoryRemark string `json:"TableCategoryRemark" description:"分类备注"`
+ SysProvincesTitle string `json:"sysProvincesTitle" description:""`
+}
+
+// TableTree 树
+type TableTree struct {
+ entity.AddonHgexampleTable
+ Key int64 `json:"key" dc:"key"`
+ Label string `json:"label" dc:"标签"`
+ Value int64 `json:"value" dc:"键值"`
+ Children []*TableTree `json:"children"`
+}
diff --git a/server/addons/hgexample/queues/queues.go b/server/addons/hgexample/queues/queues.go
new file mode 100644
index 0000000..9f2e7eb
--- /dev/null
+++ b/server/addons/hgexample/queues/queues.go
@@ -0,0 +1,9 @@
+// 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
+
+// 消息队列.
+// 插件中的消息队列消费者可以统一在这里注册和处理
diff --git a/server/addons/hgexample/router/admin.go b/server/addons/hgexample/router/admin.go
new file mode 100644
index 0000000..75884df
--- /dev/null
+++ b/server/addons/hgexample/router/admin.go
@@ -0,0 +1,36 @@
+// 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/addons/hgexample/controller/admin/sys"
+ "hotgo/addons/hgexample/global"
+ "hotgo/addons/hgexample/router/genrouter"
+ "hotgo/internal/consts"
+ "hotgo/internal/library/addons"
+ "hotgo/internal/service"
+)
+
+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.Comp,
+ sys.Config,
+ sys.Table,
+ sys.TreeTable,
+ )
+ })
+
+ // 注册生成路由
+ genrouter.Register(ctx, group)
+}
diff --git a/server/addons/hgexample/router/api.go b/server/addons/hgexample/router/api.go
new file mode 100644
index 0000000..60c3626
--- /dev/null
+++ b/server/addons/hgexample/router/api.go
@@ -0,0 +1,32 @@
+// 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/addons/hgexample/controller/api"
+ "hotgo/addons/hgexample/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/addons/hgexample/router/genrouter/init.go b/server/addons/hgexample/router/genrouter/init.go
new file mode 100644
index 0000000..d15d513
--- /dev/null
+++ b/server/addons/hgexample/router/genrouter/init.go
@@ -0,0 +1,34 @@
+// 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/addons/hgexample/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/addons/hgexample/router/genrouter/tenant_order.go b/server/addons/hgexample/router/genrouter/tenant_order.go
new file mode 100644
index 0000000..15aa5b0
--- /dev/null
+++ b/server/addons/hgexample/router/genrouter/tenant_order.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.13.1
+package genrouter
+
+import "hotgo/addons/hgexample/controller/admin/sys"
+
+func init() {
+ LoginRequiredRouter = append(LoginRequiredRouter, sys.TenantOrder) // 多租户功能演示
+}
\ No newline at end of file
diff --git a/server/addons/hgexample/router/home.go b/server/addons/hgexample/router/home.go
new file mode 100644
index 0000000..d985980
--- /dev/null
+++ b/server/addons/hgexample/router/home.go
@@ -0,0 +1,25 @@
+// 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/addons/hgexample/controller/home"
+ "hotgo/addons/hgexample/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/addons/hgexample/router/websocket.go b/server/addons/hgexample/router/websocket.go
new file mode 100644
index 0000000..b2ec122
--- /dev/null
+++ b/server/addons/hgexample/router/websocket.go
@@ -0,0 +1,40 @@
+// 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/addons/hgexample/controller/websocket"
+ "hotgo/addons/hgexample/controller/websocket/handler"
+ "hotgo/addons/hgexample/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{
+ "admin/addons/hgexample/testMessage": handler.Index.TestMessage, // 测试消息
+ })
+}
diff --git a/server/addons/hgexample/service/.gitkeep b/server/addons/hgexample/service/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/server/addons/hgexample/service/sys.go b/server/addons/hgexample/service/sys.go
new file mode 100644
index 0000000..9ad290d
--- /dev/null
+++ b/server/addons/hgexample/service/sys.go
@@ -0,0 +1,139 @@
+// ================================================================================
+// 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/addons/hgexample/model"
+ "hotgo/addons/hgexample/model/input/sysin"
+ "hotgo/internal/library/hgorm/handler"
+
+ "github.com/gogf/gf/v2/database/gdb"
+)
+
+type (
+ ISysConfig interface {
+ // GetBasic 获取基础配置
+ GetBasic(ctx context.Context) (conf *model.BasicConfig, err error)
+ // GetConfigByGroup 获取指定分组配置
+ GetConfigByGroup(ctx context.Context, in *sysin.GetConfigInp) (res *sysin.GetConfigModel, err error)
+ // UpdateConfigByGroup 更新指定分组的配置
+ UpdateConfigByGroup(ctx context.Context, in *sysin.UpdateConfigInp) error
+ }
+ ISysIndex interface {
+ // Test 测试
+ Test(ctx context.Context, in *sysin.IndexTestInp) (res *sysin.IndexTestModel, err error)
+ }
+ ISysTable interface {
+ // Model Orm模型
+ Model(ctx context.Context, option ...*handler.Option) *gdb.Model
+ // List 获取列表
+ List(ctx context.Context, in *sysin.TableListInp) (list []*sysin.TableListModel, totalCount int, err error)
+ // Export 导出
+ Export(ctx context.Context, in *sysin.TableListInp) (err error)
+ // Edit 修改/新增
+ Edit(ctx context.Context, in *sysin.TableEditInp) (err error)
+ // Delete 删除
+ Delete(ctx context.Context, in *sysin.TableDeleteInp) (err error)
+ // Status 更新状态
+ Status(ctx context.Context, in *sysin.TableStatusInp) (err error)
+ // Switch 更新开关状态
+ Switch(ctx context.Context, in *sysin.TableSwitchInp) (err error)
+ // MaxSort 最大排序
+ MaxSort(ctx context.Context, in *sysin.TableMaxSortInp) (res *sysin.TableMaxSortModel, err error)
+ // View 获取指定信息
+ View(ctx context.Context, in *sysin.TableViewInp) (res *sysin.TableViewModel, err error)
+ }
+ ISysTenantOrder interface {
+ // Model 多租户功能演示ORM模型
+ Model(ctx context.Context, option ...*handler.Option) *gdb.Model
+ // List 获取多租户功能演示列表
+ List(ctx context.Context, in *sysin.TenantOrderListInp) (list []*sysin.TenantOrderListModel, totalCount int, err error)
+ // Export 导出多租户功能演示
+ Export(ctx context.Context, in *sysin.TenantOrderListInp) (err error)
+ // Edit 修改/新增多租户功能演示
+ Edit(ctx context.Context, in *sysin.TenantOrderEditInp) (err error)
+ // Delete 删除多租户功能演示
+ Delete(ctx context.Context, in *sysin.TenantOrderDeleteInp) (err error)
+ // View 获取多租户功能演示指定信息
+ View(ctx context.Context, in *sysin.TenantOrderViewInp) (res *sysin.TenantOrderViewModel, err error)
+ }
+ ISysTreeTable interface {
+ // Model Orm模型
+ Model(ctx context.Context, option ...*handler.Option) *gdb.Model
+ // List 获取列表
+ List(ctx context.Context, in *sysin.TreeTableListInp) (list []*sysin.TreeTableListModel, totalCount int, err error)
+ // Edit 修改/新增
+ Edit(ctx context.Context, in *sysin.TableEditInp) (err error)
+ // Delete 删除
+ Delete(ctx context.Context, in *sysin.TableDeleteInp) (err error)
+ // Select 关系树选项列表
+ Select(ctx context.Context) (list []*sysin.TableTree, err error)
+ }
+)
+
+var (
+ localSysConfig ISysConfig
+ localSysIndex ISysIndex
+ localSysTable ISysTable
+ localSysTenantOrder ISysTenantOrder
+ localSysTreeTable ISysTreeTable
+)
+
+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
+}
+
+func SysTable() ISysTable {
+ if localSysTable == nil {
+ panic("implement not found for interface ISysTable, forgot register?")
+ }
+ return localSysTable
+}
+
+func RegisterSysTable(i ISysTable) {
+ localSysTable = i
+}
+
+func SysTenantOrder() ISysTenantOrder {
+ if localSysTenantOrder == nil {
+ panic("implement not found for interface ISysTenantOrder, forgot register?")
+ }
+ return localSysTenantOrder
+}
+
+func RegisterSysTenantOrder(i ISysTenantOrder) {
+ localSysTenantOrder = i
+}
+
+func SysTreeTable() ISysTreeTable {
+ if localSysTreeTable == nil {
+ panic("implement not found for interface ISysTreeTable, forgot register?")
+ }
+ return localSysTreeTable
+}
+
+func RegisterSysTreeTable(i ISysTreeTable) {
+ localSysTreeTable = i
+}
diff --git a/server/addons/modules/.gitkeep b/server/addons/modules/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/server/addons/modules/hgexample.go b/server/addons/modules/hgexample.go
new file mode 100644
index 0000000..eafbc58
--- /dev/null
+++ b/server/addons/modules/hgexample.go
@@ -0,0 +1,8 @@
+// Package modules
+// @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 modules
+
+import _ "hotgo/addons/hgexample"
diff --git a/server/api/admin/addons/addons.go b/server/api/admin/addons/addons.go
new file mode 100644
index 0000000..83dd492
--- /dev/null
+++ b/server/api/admin/addons/addons.go
@@ -0,0 +1,59 @@
+// Package addons
+// @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 addons
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/addons/list" method:"get" tags:"插件管理" summary:"获取插件列表"`
+ sysin.AddonsListInp
+}
+
+type ListRes struct {
+ List []*sysin.AddonsListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// BuildReq 提交生成
+type BuildReq struct {
+ g.Meta `path:"/addons/build" method:"post" tags:"插件管理" summary:"提交生成"`
+ sysin.AddonsBuildInp
+}
+
+type BuildRes struct {
+}
+
+// InstallReq 安装模块
+type InstallReq struct {
+ g.Meta `path:"/addons/install" method:"post" tags:"插件管理" summary:"安装模块"`
+ sysin.AddonsInstallInp
+}
+
+type InstallRes struct {
+}
+
+// UpgradeReq 更新模块
+type UpgradeReq struct {
+ g.Meta `path:"/addons/upgrade" method:"post" tags:"插件管理" summary:"更新模块"`
+ sysin.AddonsUpgradeInp
+}
+
+type UpgradeRes struct {
+}
+
+// UnInstallReq 卸载模块
+type UnInstallReq struct {
+ g.Meta `path:"/addons/uninstall" method:"post" tags:"插件管理" summary:"卸载模块"`
+ sysin.AddonsUnInstallInp
+}
+
+type UnInstallRes struct {
+}
diff --git a/server/api/admin/appmember/appmember.go b/server/api/admin/appmember/appmember.go
new file mode 100644
index 0000000..3da74e1
--- /dev/null
+++ b/server/api/admin/appmember/appmember.go
@@ -0,0 +1,149 @@
+package appmember
+
+import (
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+type ListReq struct {
+ g.Meta `path:"/appMember/list" method:"get" tags:"会员管理" summary:"会员列表"`
+ sysin.AppMemberListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*sysin.AppMemberListModel `json:"list"`
+}
+type ViewReq struct {
+ g.Meta `path:"/appMember/view" method:"get" tags:"会员管理" summary:"会员详情"`
+ sysin.AppMemberViewInp
+}
+type ViewRes struct{ *sysin.AppMemberViewModel }
+type EditReq struct {
+ g.Meta `path:"/appMember/edit" method:"post" tags:"会员管理" summary:"新增编辑会员"`
+ sysin.AppMemberEditInp
+}
+type EditRes struct{}
+type DeleteReq struct {
+ g.Meta `path:"/appMember/delete" method:"post" tags:"会员管理" summary:"注销会员"`
+ sysin.AppMemberDeleteInp
+}
+type DeleteRes struct{}
+type AutoDispatchReq struct {
+ g.Meta `path:"/appMember/autoDispatch" method:"post" tags:"会员管理" summary:"切换派单模式"`
+ sysin.AppMemberAutoDispatchInp
+}
+type AutoDispatchRes struct{}
+type CategoryReq struct {
+ g.Meta `path:"/appMember/category" method:"post" tags:"会员管理" summary:"切换会员真人假人类别"`
+ sysin.AppMemberCategoryInp
+}
+type CategoryRes struct{}
+
+type PaymentListReq struct {
+ g.Meta `path:"/appMember/paymentList" method:"get" tags:"会员管理" summary:"收款账户列表"`
+ sysin.AppMemberPaymentListInp
+}
+type PaymentListRes struct {
+ List []*sysin.AppMemberPaymentModel `json:"list"`
+}
+type PaymentEditReq struct {
+ g.Meta `path:"/appMember/paymentEdit" method:"post" tags:"会员管理" summary:"新增编辑收款账户"`
+ sysin.AppMemberPaymentEditInp
+}
+type PaymentEditRes struct{}
+type PaymentDeleteReq struct {
+ g.Meta `path:"/appMember/paymentDelete" method:"post" tags:"会员管理" summary:"删除收款账户"`
+ sysin.AppMemberPaymentDeleteInp
+}
+type PaymentDeleteRes struct{}
+
+type AddressListReq struct {
+ g.Meta `path:"/appMember/addressList" method:"get" tags:"会员管理" summary:"地址列表"`
+ sysin.AppMemberAddressListInp
+}
+type AddressListRes struct {
+ List []*sysin.AppMemberAddressModel `json:"list"`
+}
+type AddressEditReq struct {
+ g.Meta `path:"/appMember/addressEdit" method:"post" tags:"会员管理" summary:"新增编辑地址"`
+ sysin.AppMemberAddressEditInp
+}
+type AddressEditRes struct{}
+type AddressDeleteReq struct {
+ g.Meta `path:"/appMember/addressDelete" method:"post" tags:"会员管理" summary:"删除地址"`
+ sysin.AppMemberAddressDeleteInp
+}
+type AddressDeleteRes struct{}
+
+type SensitiveReq struct {
+ g.Meta `path:"/appMember/sensitive" method:"post" tags:"会员管理" summary:"授权查看敏感信息"`
+ sysin.AppMemberSensitiveInp
+}
+type SensitiveRes struct{ *sysin.AppMemberSensitiveModel }
+type TeamReq struct {
+ g.Meta `path:"/appMember/team" method:"get" tags:"会员管理" summary:"团队查询"`
+ sysin.AppMemberTeamInp
+}
+type TeamRes struct {
+ form.PageRes
+ List []*sysin.AppMemberTeamModel `json:"list"`
+}
+
+type StatusRequestReq struct {
+ g.Meta `path:"/appMember/statusRequest" method:"post" tags:"会员管理" summary:"发起会员状态审批"`
+ sysin.AppMemberStatusRequestInp
+}
+type StatusRequestRes struct{ *sysin.AppMemberApprovalModel }
+type StatusExecuteReq struct {
+ g.Meta `path:"/appMember/statusExecute" method:"post" tags:"会员管理" summary:"执行已审批会员状态变更"`
+ sysin.AppMemberStatusExecuteInp
+}
+type StatusExecuteRes struct{}
+
+type WalletListReq struct {
+ g.Meta `path:"/appMember/walletList" method:"get" tags:"会员管理" summary:"资金调账列表"`
+ sysin.WalletAdjustmentListInp
+}
+type WalletListRes struct {
+ form.PageRes
+ List []*sysin.WalletAdjustmentListModel `json:"list"`
+}
+type LedgerListReq struct {
+ g.Meta `path:"/appMember/ledgerList" method:"get" tags:"会员管理" summary:"会员账变流水"`
+ sysin.WalletLedgerListInp
+}
+type LedgerListRes struct {
+ form.PageRes
+ List []*sysin.WalletLedgerListModel `json:"list"`
+}
+type WalletRequestReq struct {
+ g.Meta `path:"/appMember/walletRequest" method:"post" tags:"会员管理" summary:"发起资金调账审批"`
+ sysin.WalletAdjustmentRequestInp
+}
+type WalletRequestRes struct{ *sysin.AppMemberApprovalModel }
+type WalletExecuteReq struct {
+ g.Meta `path:"/appMember/walletExecute" method:"post" tags:"会员管理" summary:"执行已审批资金调账"`
+ sysin.WalletAdjustmentExecuteInp
+}
+type WalletExecuteRes struct{}
+
+type NoticeListReq struct {
+ g.Meta `path:"/appMember/noticeList" method:"get" tags:"会员管理" summary:"会员通知列表"`
+ sysin.MemberNoticeListInp
+}
+type NoticeListRes struct {
+ form.PageRes
+ List []*sysin.MemberNoticeListModel `json:"list"`
+}
+type NoticeEditReq struct {
+ g.Meta `path:"/appMember/noticeEdit" method:"post" tags:"会员管理" summary:"创建会员通知"`
+ sysin.MemberNoticeEditInp
+}
+type NoticeEditRes struct{}
+type NoticeRevokeReq struct {
+ g.Meta `path:"/appMember/noticeRevoke" method:"post" tags:"会员管理" summary:"撤回会员通知"`
+ sysin.MemberNoticeRevokeInp
+}
+type NoticeRevokeRes struct{}
diff --git a/server/api/admin/approval/approval.go b/server/api/admin/approval/approval.go
new file mode 100644
index 0000000..9a099a5
--- /dev/null
+++ b/server/api/admin/approval/approval.go
@@ -0,0 +1,53 @@
+package approval
+
+import (
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+type ListReq struct {
+ g.Meta `path:"/approval/list" method:"get" tags:"审批中心" summary:"获取审批列表"`
+ sysin.ApprovalListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*sysin.ApprovalListModel `json:"list" dc:"数据列表"`
+}
+
+type ViewReq struct {
+ g.Meta `path:"/approval/view" method:"get" tags:"审批中心" summary:"获取审批详情"`
+ sysin.ApprovalViewInp
+}
+type ViewRes struct{ *sysin.ApprovalViewModel }
+
+type CreateReq struct {
+ g.Meta `path:"/approval/create" method:"post" tags:"审批中心" summary:"创建审批草稿"`
+ sysin.ApprovalCreateInp
+}
+type CreateRes struct{ *sysin.ApprovalCreateModel }
+
+type SubmitReq struct {
+ g.Meta `path:"/approval/submit" method:"post" tags:"审批中心" summary:"提交审批"`
+ sysin.ApprovalSubmitInp
+}
+type SubmitRes struct{}
+
+type ApproveReq struct {
+ g.Meta `path:"/approval/approve" method:"post" tags:"审批中心" summary:"通过审批"`
+ sysin.ApprovalDecisionInp
+}
+type ApproveRes struct{}
+
+type RejectReq struct {
+ g.Meta `path:"/approval/reject" method:"post" tags:"审批中心" summary:"驳回审批"`
+ sysin.ApprovalDecisionInp
+}
+type RejectRes struct{}
+
+type CancelReq struct {
+ g.Meta `path:"/approval/cancel" method:"post" tags:"审批中心" summary:"取消审批"`
+ sysin.ApprovalCancelInp
+}
+type CancelRes struct{}
diff --git a/server/api/admin/attachment/attachment.go b/server/api/admin/attachment/attachment.go
new file mode 100644
index 0000000..df58a31
--- /dev/null
+++ b/server/api/admin/attachment/attachment.go
@@ -0,0 +1,49 @@
+// Package attachment
+// @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 attachment
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ListReq 查询附件列表
+type ListReq struct {
+ g.Meta `path:"/attachment/list" method:"get" tags:"附件" summary:"获取附件列表"`
+ sysin.AttachmentListInp
+}
+
+type ListRes struct {
+ List []*sysin.AttachmentListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// ViewReq 获取附件信息
+type ViewReq struct {
+ g.Meta `path:"/attachment/view" method:"get" tags:"附件" summary:"获取指定附件信息"`
+ sysin.AttachmentViewInp
+}
+
+type ViewRes struct {
+ *sysin.AttachmentViewModel
+}
+
+// DeleteReq 删除附件
+type DeleteReq struct {
+ g.Meta `path:"/attachment/delete" method:"post" tags:"附件" summary:"删除附件"`
+ sysin.AttachmentDeleteInp
+}
+
+type DeleteRes struct{}
+
+// ClearKindReq 清空上传类型
+type ClearKindReq struct {
+ g.Meta `path:"/attachment/clearKind" method:"post" tags:"附件" summary:"清空上传类型"`
+ sysin.AttachmentClearKindInp
+}
+
+type ClearKindRes struct{}
diff --git a/server/api/admin/bizaudit/biz_audit.go b/server/api/admin/bizaudit/biz_audit.go
new file mode 100644
index 0000000..00fb653
--- /dev/null
+++ b/server/api/admin/bizaudit/biz_audit.go
@@ -0,0 +1,23 @@
+package bizaudit
+
+import (
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+type ListReq struct {
+ g.Meta `path:"/bizAudit/list" method:"get" tags:"业务审计" summary:"获取业务审计列表"`
+ sysin.BizAuditListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*sysin.BizAuditListModel `json:"list" dc:"数据列表"`
+}
+
+type ViewReq struct {
+ g.Meta `path:"/bizAudit/view" method:"get" tags:"业务审计" summary:"获取业务审计详情"`
+ sysin.BizAuditViewInp
+}
+type ViewRes struct{ *sysin.BizAuditViewModel }
diff --git a/server/api/admin/blacklist/blacklist.go b/server/api/admin/blacklist/blacklist.go
new file mode 100644
index 0000000..97c7475
--- /dev/null
+++ b/server/api/admin/blacklist/blacklist.go
@@ -0,0 +1,57 @@
+// Package blacklist
+// @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 blacklist
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/blacklist/list" method:"get" tags:"黑名单" summary:"获取黑名单列表"`
+ sysin.BlacklistListInp
+}
+
+type ListRes struct {
+ List []*sysin.BlacklistListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// ViewReq 获取信息
+type ViewReq struct {
+ g.Meta `path:"/blacklist/view" method:"get" tags:"黑名单" summary:"获取指定信息"`
+ sysin.BlacklistViewInp
+}
+
+type ViewRes struct {
+ *sysin.BlacklistViewModel
+}
+
+// EditReq 修改/新增
+type EditReq struct {
+ g.Meta `path:"/blacklist/edit" method:"post" tags:"黑名单" summary:"修改/新增黑名单"`
+ sysin.BlacklistEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除
+type DeleteReq struct {
+ g.Meta `path:"/blacklist/delete" method:"post" tags:"黑名单" summary:"删除黑名单"`
+ sysin.BlacklistDeleteInp
+}
+
+type DeleteRes struct{}
+
+// StatusReq 更新状态
+type StatusReq struct {
+ g.Meta `path:"/blacklist/status" method:"post" tags:"黑名单" summary:"更新黑名单状态"`
+ sysin.BlacklistStatusInp
+}
+
+type StatusRes struct{}
diff --git a/server/api/admin/cash/cash.go b/server/api/admin/cash/cash.go
new file mode 100644
index 0000000..0d82d1f
--- /dev/null
+++ b/server/api/admin/cash/cash.go
@@ -0,0 +1,49 @@
+// Package cash
+// @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 cash
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/adminin"
+ "hotgo/internal/model/input/form"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/cash/list" method:"get" tags:"提现" summary:"获取提现列表"`
+ adminin.CashListInp
+}
+
+type ListRes struct {
+ List []*adminin.CashListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// ViewReq 获取指定信息
+type ViewReq struct {
+ g.Meta `path:"/cash/view" method:"get" tags:"提现" summary:"获取指定信息"`
+ adminin.CashViewInp
+}
+
+type ViewRes struct {
+ *adminin.CashViewModel
+}
+
+// ApplyReq 申请提现
+type ApplyReq struct {
+ g.Meta `path:"/cash/apply" method:"post" tags:"提现" summary:"申请提现"`
+ Money float64 `json:"money" description:"提现金额"`
+}
+
+type ApplyRes struct{}
+
+// PaymentReq 提现打款处理
+type PaymentReq struct {
+ g.Meta `path:"/cash/payment" method:"post" tags:"提现" summary:"提现打款处理"`
+ adminin.CashPaymentInp
+}
+
+type PaymentRes struct{}
diff --git a/server/api/admin/common/console.go b/server/api/admin/common/console.go
new file mode 100644
index 0000000..591b13c
--- /dev/null
+++ b/server/api/admin/common/console.go
@@ -0,0 +1,52 @@
+// 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 (
+ "hotgo/internal/model/input/sysin"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ConsoleStatReq 控制台统计
+type ConsoleStatReq struct {
+ g.Meta `path:"/console/stat" method:"get" tags:"控制台" summary:"综合数据统计"`
+}
+
+type ConsoleStatRes struct {
+ Visits struct {
+ DayVisits float64 `json:"dayVisits"`
+ Rise float64 `json:"rise"`
+ Decline float64 `json:"decline"`
+ Amount float64 `json:"amount"`
+ } `json:"visits"`
+ Saleroom struct {
+ WeekSaleroom float64 `json:"weekSaleroom"`
+ Amount float64 `json:"amount"`
+ Degree float64 `json:"degree"`
+ } `json:"saleroom"`
+ OrderLarge struct {
+ WeekLarge float64 `json:"weekLarge"`
+ Rise float64 `json:"rise"`
+ Decline float64 `json:"decline"`
+ Amount float64 `json:"amount"`
+ } `json:"orderLarge"`
+ Volume struct {
+ WeekLarge float64 `json:"weekLarge"`
+ Rise float64 `json:"rise"`
+ Decline float64 `json:"decline"`
+ Amount float64 `json:"amount"`
+ } `json:"volume"`
+}
+
+type DashboardSummaryReq struct {
+ g.Meta `path:"/dashboard/summary" method:"get" tags:"控制台" summary:"业务数据看板"`
+ sysin.DashboardSummaryInp
+}
+
+type DashboardSummaryRes struct {
+ *sysin.DashboardSummaryModel
+}
diff --git a/server/api/admin/common/ems.go b/server/api/admin/common/ems.go
new file mode 100644
index 0000000..82a5a53
--- /dev/null
+++ b/server/api/admin/common/ems.go
@@ -0,0 +1,27 @@
+// 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 (
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SendTestEmailReq 发送测试邮件
+type SendTestEmailReq struct {
+ g.Meta `path:"/ems/sendTest" tags:"邮件" method:"post" summary:"发送测试邮件"`
+ To string `json:"to" v:"required#接收者邮件不能为空" dc:"接收者邮件,多个用;隔开"`
+}
+
+type SendTestEmailRes struct {
+}
+
+// SendBindEmsReq 发送换绑邮件
+type SendBindEmsReq struct {
+ g.Meta `path:"/ems/sendBind" tags:"邮件" method:"post" summary:"发送换绑邮件"`
+}
+
+type SendBindEmsRes struct {
+}
diff --git a/server/api/admin/common/site.go b/server/api/admin/common/site.go
new file mode 100644
index 0000000..7825a4c
--- /dev/null
+++ b/server/api/admin/common/site.go
@@ -0,0 +1,90 @@
+// 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 (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model"
+ "hotgo/internal/model/input/adminin"
+)
+
+// LoginLogoutReq 注销登录
+type LoginLogoutReq struct {
+ g.Meta `path:"/site/logout" method:"post" tags:"后台基础" summary:"注销登录"`
+}
+
+type LoginLogoutRes struct{}
+
+// RegisterReq 提交账号注册
+type RegisterReq struct {
+ g.Meta `path:"/site/register" method:"post" tags:"后台基础" summary:"账号注册"`
+ adminin.RegisterInp
+}
+
+type RegisterRes struct {
+ *adminin.LoginModel
+}
+
+// LoginCaptchaReq 获取登录验证码
+type LoginCaptchaReq struct {
+ g.Meta `path:"/site/captcha" method:"get" tags:"后台基础" summary:"获取登录验证码"`
+}
+
+type LoginCaptchaRes struct {
+ Cid string `json:"cid" dc:"验证码ID"`
+ Base64 string `json:"base64" dc:"验证码"`
+}
+
+// AccountLoginReq 提交账号登录
+type AccountLoginReq struct {
+ g.Meta `path:"/site/accountLogin" method:"post" tags:"后台基础" summary:"账号登录"`
+ adminin.AccountLoginInp
+}
+
+type AccountLoginRes struct {
+ *adminin.LoginModel
+}
+
+// MobileLoginReq 提交手机号登录
+type MobileLoginReq struct {
+ g.Meta `path:"/site/mobileLogin" method:"post" tags:"后台基础" summary:"手机号登录"`
+ adminin.MobileLoginInp
+}
+
+type MobileLoginRes struct {
+ *adminin.LoginModel
+}
+
+// SiteConfigReq 获取配置
+type SiteConfigReq struct {
+ g.Meta `path:"/site/config" method:"get" tags:"后台基础" summary:"获取配置"`
+}
+
+type SiteConfigRes struct {
+ Version string `json:"version" dc:"系统版本"`
+ WsAddr string `json:"wsAddr" dc:"客户端websocket地址"`
+ Domain string `json:"domain" dc:"对外域名"`
+ Mode string `json:"mode" dc:"运行模式"`
+}
+
+// SiteLoginConfigReq 获取登录配置
+type SiteLoginConfigReq struct {
+ g.Meta `path:"/site/loginConfig" method:"get" tags:"后台基础" summary:"获取登录配置"`
+}
+
+type SiteLoginConfigRes struct {
+ *model.LoginConfig
+ I18nSwitch bool `json:"i18nSwitch" dc:"国际化开关"`
+ DefaultLanguage string `json:"defaultLanguage" dc:"默认语言设置"`
+ ProjectName string `json:"projectName" dc:"项目名称"`
+}
+
+// SitePingReq ping
+type SitePingReq struct {
+ g.Meta `path:"/site/ping" method:"get" tags:"后台基础" summary:"ping"`
+}
+
+type SitePingRes struct{}
diff --git a/server/api/admin/common/sms.go b/server/api/admin/common/sms.go
new file mode 100644
index 0000000..53ebbd1
--- /dev/null
+++ b/server/api/admin/common/sms.go
@@ -0,0 +1,37 @@
+// 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 (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/sysin"
+)
+
+// SendTestSmsReq 发送测试短信
+type SendTestSmsReq struct {
+ g.Meta `path:"/sms/sendTest" tags:"短信" method:"post" summary:"发送测试短信"`
+ sysin.SendCodeInp
+}
+
+type SendTestSmsRes struct {
+}
+
+// SendBindSmsReq 发送换绑短信
+type SendBindSmsReq struct {
+ g.Meta `path:"/sms/sendBind" tags:"短信" method:"post" summary:"发送换绑短信"`
+}
+
+type SendBindSmsRes struct {
+}
+
+// SendSmsReq 发送短信
+type SendSmsReq struct {
+ g.Meta `path:"/sms/send" tags:"短信" method:"post" summary:"发送短信"`
+ sysin.SendCodeInp
+}
+
+type SendSmsRes struct {
+}
diff --git a/server/api/admin/common/upload.go b/server/api/admin/common/upload.go
new file mode 100644
index 0000000..8f1afb3
--- /dev/null
+++ b/server/api/admin/common/upload.go
@@ -0,0 +1,48 @@
+// 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 (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/sysin"
+)
+
+// UploadFileReq 上传文件
+type UploadFileReq struct {
+ g.Meta `path:"/upload/file" tags:"附件" method:"post" summary:"上传附件"`
+}
+
+type UploadFileRes *sysin.AttachmentListModel
+
+// CheckMultipartReq 检查文件分片
+type CheckMultipartReq struct {
+ g.Meta `path:"/upload/checkMultipart" tags:"附件" method:"post" summary:"检查文件分片"`
+ sysin.CheckMultipartInp
+}
+
+type CheckMultipartRes struct {
+ *sysin.CheckMultipartModel
+}
+
+// UploadPartReq 分片上传
+type UploadPartReq struct {
+ g.Meta `path:"/upload/uploadPart" tags:"附件" method:"post" summary:"分片上传"`
+ sysin.UploadPartInp
+}
+
+type UploadPartRes struct {
+ *sysin.UploadPartModel
+}
+
+// ImageTransferStorageReq 图片链接转存
+type ImageTransferStorageReq struct {
+ g.Meta `path:"/upload/imageTransferStorage" tags:"附件" method:"post" summary:"图片链接转存"`
+ sysin.ImageTransferStorageInp
+}
+
+type ImageTransferStorageRes struct {
+ *sysin.ImageTransferStorageModel
+}
diff --git a/server/api/admin/common/wechat.go b/server/api/admin/common/wechat.go
new file mode 100644
index 0000000..c7af478
--- /dev/null
+++ b/server/api/admin/common/wechat.go
@@ -0,0 +1,31 @@
+// 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 (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/commonin"
+)
+
+// WechatAuthorizeReq 微信用户授权
+type WechatAuthorizeReq struct {
+ g.Meta `path:"/wechat/authorize" method:"get" tags:"微信" summary:"微信用户授权"`
+ commonin.WechatAuthorizeInp
+}
+
+type WechatAuthorizeRes struct {
+ *commonin.WechatAuthorizeModel
+}
+
+// WechatAuthorizeCallReq 微信用户授权回调
+type WechatAuthorizeCallReq struct {
+ g.Meta `path:"/wechat/authorizeCall" method:"get" tags:"微信" summary:"微信用户授权"`
+ commonin.WechatAuthorizeCallInp
+}
+
+type WechatAuthorizeCallRes struct {
+ *commonin.WechatAuthorizeCallModel
+}
diff --git a/server/api/admin/config/config.go b/server/api/admin/config/config.go
new file mode 100644
index 0000000..cc8b9b5
--- /dev/null
+++ b/server/api/admin/config/config.go
@@ -0,0 +1,47 @@
+// Package config
+// @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 config
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// GetReq 获取指定分组的配置
+type GetReq struct {
+ g.Meta `path:"/config/get" method:"get" tags:"配置" summary:"获取指定分组的配置"`
+ sysin.GetConfigInp
+}
+
+type GetRes struct {
+ *sysin.GetConfigModel
+}
+
+// UpdateReq 获取指定分组的配置
+type UpdateReq struct {
+ g.Meta `path:"/config/update" method:"post" tags:"配置" summary:"获取指定分组的配置"`
+ sysin.UpdateConfigInp
+}
+
+type UpdateRes struct {
+}
+
+// TypeSelectReq 数据类型选项
+type TypeSelectReq struct {
+ g.Meta `path:"/config/typeSelect" method:"get" tags:"配置" summary:"数据类型选项"`
+}
+
+type TypeSelectRes []form.Select
+
+// GetCashReq 获取提现配置
+type GetCashReq struct {
+ g.Meta `path:"/config/getCash" method:"get" tags:"配置" summary:"获取提现配置"`
+}
+
+type GetCashRes struct {
+ *sysin.GetConfigModel
+}
diff --git a/server/api/admin/creditslog/creditslog.go b/server/api/admin/creditslog/creditslog.go
new file mode 100644
index 0000000..bec4694
--- /dev/null
+++ b/server/api/admin/creditslog/creditslog.go
@@ -0,0 +1,33 @@
+// Package creditslog
+// @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 creditslog
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/adminin"
+ "hotgo/internal/model/input/form"
+)
+
+// ListReq 查询资产变动列表
+type ListReq struct {
+ g.Meta `path:"/creditsLog/list" method:"get" tags:"资产变动" summary:"获取资产变动列表"`
+ adminin.CreditsLogListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*adminin.CreditsLogListModel `json:"list" dc:"数据列表"`
+}
+
+// ExportReq 导出资产变动列表
+type ExportReq struct {
+ g.Meta `path:"/creditsLog/export" method:"get" tags:"资产变动" summary:"导出资产变动列表"`
+ adminin.CreditsLogListInp
+}
+
+type ExportRes struct{}
diff --git a/server/api/admin/cron/cron.go b/server/api/admin/cron/cron.go
new file mode 100644
index 0000000..87f7267
--- /dev/null
+++ b/server/api/admin/cron/cron.go
@@ -0,0 +1,93 @@
+// Package cron
+// @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 cron
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/cron/list" method:"get" tags:"定时任务" summary:"获取定时任务列表"`
+ sysin.CronListInp
+}
+
+type ListRes struct {
+ List []*sysin.CronListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// ViewReq 获取信息
+type ViewReq struct {
+ g.Meta `path:"/cron/view" method:"get" tags:"定时任务" summary:"获取指定信息"`
+ sysin.CronViewInp
+}
+
+type ViewRes struct {
+ *sysin.CronViewModel
+}
+
+// EditReq 修改/新增
+type EditReq struct {
+ g.Meta `path:"/cron/edit" method:"post" tags:"定时任务" summary:"修改/新增定时任务"`
+ sysin.CronEditInp
+}
+
+type EditRes struct {
+ *sysin.CronEditModel
+}
+
+// DeleteReq 删除
+type DeleteReq struct {
+ g.Meta `path:"/cron/delete" method:"post" tags:"定时任务" summary:"删除定时任务"`
+ sysin.CronDeleteInp
+}
+
+type DeleteRes struct {
+ *sysin.CronDeleteModel
+}
+
+// MaxSortReq 最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/cron/maxSort" method:"get" tags:"定时任务" summary:"定时任务最大排序"`
+ sysin.CronMaxSortInp
+}
+
+type MaxSortRes struct {
+ *sysin.CronMaxSortModel
+}
+
+// StatusReq 更新状态
+type StatusReq struct {
+ g.Meta `path:"/cron/status" method:"post" tags:"定时任务" summary:"更新定时任务状态"`
+ sysin.CronStatusInp
+}
+
+type StatusRes struct {
+ *sysin.CronStatusModel
+}
+
+// OnlineExecReq 在线执行
+type OnlineExecReq struct {
+ g.Meta `path:"/cron/onlineExec" method:"post" tags:"定时任务" summary:"在线执行"`
+ sysin.OnlineExecInp
+}
+
+type OnlineExecRes struct {
+ *sysin.OnlineExecModel
+}
+
+// DispatchLogReq 调度日志
+type DispatchLogReq struct {
+ g.Meta `path:"/cron/dispatchLog" method:"post" tags:"定时任务" summary:"调度日志"`
+ sysin.DispatchLogInp
+}
+
+type DispatchLogRes struct {
+ *sysin.DispatchLogModel
+}
diff --git a/server/api/admin/cron/cron_group.go b/server/api/admin/cron/cron_group.go
new file mode 100644
index 0000000..fa20089
--- /dev/null
+++ b/server/api/admin/cron/cron_group.go
@@ -0,0 +1,83 @@
+// Package cron
+// @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 cron
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// GroupListReq 查询列表
+type GroupListReq struct {
+ g.Meta `path:"/cronGroup/list" method:"get" tags:"定时任务分组" summary:"获取定时任务分组列表"`
+ sysin.CronGroupListInp
+}
+
+type GroupListRes struct {
+ List []*sysin.CronGroupListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// GroupViewReq 获取信息
+type GroupViewReq struct {
+ g.Meta `path:"/cronGroup/view" method:"get" tags:"定时任务分组" summary:"获取指定信息"`
+ sysin.CronGroupViewInp
+}
+
+type GroupViewRes struct {
+ *sysin.CronGroupViewModel
+}
+
+// GroupEditReq 修改/新增
+type GroupEditReq struct {
+ g.Meta `path:"/cronGroup/edit" method:"post" tags:"定时任务分组" summary:"修改/新增定时任务分组"`
+ sysin.CronGroupEditInp
+}
+
+type GroupEditRes struct {
+ *sysin.CronGroupEditModel
+}
+
+// GroupDeleteReq 删除
+type GroupDeleteReq struct {
+ g.Meta `path:"/cronGroup/delete" method:"post" tags:"定时任务分组" summary:"删除定时任务分组"`
+ sysin.CronGroupDeleteInp
+}
+
+type GroupDeleteRes struct {
+ *sysin.CronGroupDeleteModel
+}
+
+// GroupMaxSortReq 最大排序
+type GroupMaxSortReq struct {
+ g.Meta `path:"/cronGroup/maxSort" method:"get" tags:"定时任务分组" summary:"定时任务分组最大排序"`
+ sysin.CronGroupMaxSortInp
+}
+
+type GroupMaxSortRes struct {
+ *sysin.CronGroupMaxSortModel
+}
+
+// GroupStatusReq 更新状态
+type GroupStatusReq struct {
+ g.Meta `path:"/cronGroup/status" method:"post" tags:"定时任务分组" summary:"更新定时任务分组状态"`
+ sysin.CronGroupStatusInp
+}
+
+type GroupStatusRes struct {
+ *sysin.CronGroupStatusModel
+}
+
+// GroupSelectReq 定时任务分组选项
+type GroupSelectReq struct {
+ g.Meta `path:"/cronGroup/select" method:"get" tags:"定时任务分组" summary:"定时任务分组选项"`
+ sysin.CronGroupSelectInp
+}
+
+type GroupSelectRes struct {
+ *sysin.CronGroupSelectModel
+}
diff --git a/server/api/admin/curddemo/curddemo.go b/server/api/admin/curddemo/curddemo.go
new file mode 100644
index 0000000..f570d4f
--- /dev/null
+++ b/server/api/admin/curddemo/curddemo.go
@@ -0,0 +1,85 @@
+// Package curddemo
+// @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 curddemo
+
+import (
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ListReq 查询CURD列表列表
+type ListReq struct {
+ g.Meta `path:"/curdDemo/list" method:"get" tags:"CURD列表" summary:"获取CURD列表列表"`
+ sysin.CurdDemoListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*sysin.CurdDemoListModel `json:"list" dc:"数据列表"`
+}
+
+// ExportReq 导出CURD列表列表
+type ExportReq struct {
+ g.Meta `path:"/curdDemo/export" method:"get" tags:"CURD列表" summary:"导出CURD列表列表"`
+ sysin.CurdDemoListInp
+}
+
+type ExportRes struct{}
+
+// ViewReq 获取CURD列表指定信息
+type ViewReq struct {
+ g.Meta `path:"/curdDemo/view" method:"get" tags:"CURD列表" summary:"获取CURD列表指定信息"`
+ sysin.CurdDemoViewInp
+}
+
+type ViewRes struct {
+ *sysin.CurdDemoViewModel
+}
+
+// EditReq 修改/新增CURD列表
+type EditReq struct {
+ g.Meta `path:"/curdDemo/edit" method:"post" tags:"CURD列表" summary:"修改/新增CURD列表"`
+ sysin.CurdDemoEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除CURD列表
+type DeleteReq struct {
+ g.Meta `path:"/curdDemo/delete" method:"post" tags:"CURD列表" summary:"删除CURD列表"`
+ sysin.CurdDemoDeleteInp
+}
+
+type DeleteRes struct{}
+
+// MaxSortReq 获取CURD列表最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/curdDemo/maxSort" method:"get" tags:"CURD列表" summary:"获取CURD列表最大排序"`
+ sysin.CurdDemoMaxSortInp
+}
+
+type MaxSortRes struct {
+ *sysin.CurdDemoMaxSortModel
+}
+
+// StatusReq 更新CURD列表状态
+type StatusReq struct {
+ g.Meta `path:"/curdDemo/status" method:"post" tags:"CURD列表" summary:"更新CURD列表状态"`
+ sysin.CurdDemoStatusInp
+}
+
+type StatusRes struct{}
+
+// SwitchReq 更新CURD列表开关状态
+type SwitchReq struct {
+ g.Meta `path:"/curdDemo/switch" method:"post" tags:"CURD列表" summary:"更新CURD列表状态"`
+ sysin.CurdDemoSwitchInp
+}
+
+type SwitchRes struct{}
\ No newline at end of file
diff --git a/server/api/admin/customerservice/customerservice.go b/server/api/admin/customerservice/customerservice.go
new file mode 100644
index 0000000..2ccbcd0
--- /dev/null
+++ b/server/api/admin/customerservice/customerservice.go
@@ -0,0 +1,38 @@
+package customerservice
+
+import (
+ "hotgo/internal/model/entity"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+type ListReq struct {
+ g.Meta `path:"/customerService/list" method:"get" tags:"客服管理" summary:"客服列表"`
+ sysin.CustomerServiceListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*entity.CustomerService `json:"list"`
+}
+type ViewReq struct {
+ g.Meta `path:"/customerService/view" method:"get" tags:"客服管理" summary:"客服详情"`
+ sysin.CustomerServiceViewInp
+}
+type ViewRes struct{ *entity.CustomerService }
+type EditReq struct {
+ g.Meta `path:"/customerService/edit" method:"post" tags:"客服管理" summary:"新增编辑客服"`
+ sysin.CustomerServiceEditInp
+}
+type EditRes struct{}
+type StatusReq struct {
+ g.Meta `path:"/customerService/status" method:"post" tags:"客服管理" summary:"客服启停"`
+ sysin.CustomerServiceStatusInp
+}
+type StatusRes struct{}
+type DeleteReq struct {
+ g.Meta `path:"/customerService/delete" method:"post" tags:"客服管理" summary:"删除客服"`
+ sysin.CustomerServiceDeleteInp
+}
+type DeleteRes struct{}
diff --git a/server/api/admin/dept/dept.go b/server/api/admin/dept/dept.go
new file mode 100644
index 0000000..565ec74
--- /dev/null
+++ b/server/api/admin/dept/dept.go
@@ -0,0 +1,75 @@
+// Package dept
+// @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 dept
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/adminin"
+ "hotgo/internal/model/input/form"
+ "hotgo/utility/tree"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/dept/list" method:"get" tags:"部门" summary:"获取部门列表"`
+ adminin.DeptListInp
+}
+
+type ListRes *adminin.DeptListModel
+
+// ViewReq 获取指定信息
+type ViewReq struct {
+ g.Meta `path:"/dept/view" method:"get" tags:"部门" summary:"获取指定信息"`
+ adminin.DeptViewInp
+}
+
+type ViewRes struct {
+ *adminin.DeptViewModel
+}
+
+// EditReq 修改/新增字典数据
+type EditReq struct {
+ g.Meta `path:"/dept/edit" method:"post" tags:"部门" summary:"修改/新增部门"`
+ adminin.DeptEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除字典类型
+type DeleteReq struct {
+ g.Meta `path:"/dept/delete" method:"post" tags:"部门" summary:"删除部门"`
+ adminin.DeptDeleteInp
+}
+
+type DeleteRes struct{}
+
+// MaxSortReq 最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/dept/maxSort" method:"get" tags:"部门" summary:"部门最大排序"`
+ adminin.DeptMaxSortInp
+}
+
+type MaxSortRes struct {
+ *adminin.DeptMaxSortModel
+}
+
+// OptionReq 获取当前登录用户可选的部门选项
+type OptionReq struct {
+ g.Meta `path:"/dept/option" method:"get" tags:"部门" summary:"获取当前登录用户可选的部门选项"`
+ adminin.DeptOptionInp
+}
+
+type OptionRes struct {
+ *adminin.DeptOptionModel
+ form.PageRes
+}
+
+// TreeOptionReq 获取部门关系树选项
+type TreeOptionReq struct {
+ g.Meta `path:"/dept/treeOption" method:"get" tags:"部门" summary:"获取部门关系树选项"`
+}
+
+type TreeOptionRes []tree.Node
diff --git a/server/api/admin/dict/dict_data.go b/server/api/admin/dict/dict_data.go
new file mode 100644
index 0000000..8ecdea7
--- /dev/null
+++ b/server/api/admin/dict/dict_data.go
@@ -0,0 +1,53 @@
+// Package dict
+// @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 dict
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// DataEditReq 修改/新增字典数据
+type DataEditReq struct {
+ g.Meta `path:"/dictData/edit" method:"post" tags:"字典数据" summary:"修改/新增字典数据"`
+ sysin.DictDataEditInp
+}
+
+type DataEditRes struct{}
+
+// DataDeleteReq 删除字典数据
+type DataDeleteReq struct {
+ g.Meta `path:"/dictData/delete" method:"post" tags:"字典数据" summary:"删除字典数据"`
+ sysin.DictDataDeleteInp
+}
+
+type DataDeleteRes struct{}
+
+// DataListReq 查询列表
+type DataListReq struct {
+ g.Meta `path:"/dictData/list" method:"get" tags:"字典数据" summary:"获取字典数据列表"`
+ sysin.DictDataListInp
+}
+
+type DataListRes struct {
+ List []*sysin.DictDataListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+type DataSelectReq struct {
+ g.Meta `path:"/dictData/option/{Type}" method:"get" tags:"字典数据" summary:"获取指定字典选项"`
+ sysin.DataSelectInp
+}
+
+type DataSelectRes sysin.DataSelectModel
+
+type DataSelectsReq struct {
+ g.Meta `path:"/dictData/options" method:"get" tags:"字典数据" summary:"获取多个字典选项"`
+ Types []string `json:"types"`
+}
+
+type DataSelectsRes map[string]sysin.DataSelectModel
diff --git a/server/api/admin/dict/dict_type.go b/server/api/admin/dict/dict_type.go
new file mode 100644
index 0000000..16f09cb
--- /dev/null
+++ b/server/api/admin/dict/dict_type.go
@@ -0,0 +1,36 @@
+// Package dict
+// @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 dict
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/sysin"
+)
+
+// TypeTreeReq 字典类型树
+type TypeTreeReq struct {
+ g.Meta `path:"/dictType/tree" tags:"字典类型" method:"get" summary:"字典类型树列表"`
+}
+
+type TypeTreeRes struct {
+ List []*sysin.DictTypeTree `json:"list" dc:"数据列表"`
+}
+
+// TypeEditReq 修改/新增字典数据
+type TypeEditReq struct {
+ g.Meta `path:"/dictType/edit" method:"post" tags:"字典类型" summary:"修改/新增字典类型"`
+ sysin.DictTypeEditInp
+}
+
+type TypeEditRes struct{}
+
+// TypeDeleteReq 删除字典类型
+type TypeDeleteReq struct {
+ g.Meta `path:"/dictType/delete" method:"post" tags:"字典类型" summary:"删除字典类型"`
+ sysin.DictTypeDeleteInp
+}
+
+type TypeDeleteRes struct{}
diff --git a/server/api/admin/emslog/emslog.go b/server/api/admin/emslog/emslog.go
new file mode 100644
index 0000000..3fd1578
--- /dev/null
+++ b/server/api/admin/emslog/emslog.go
@@ -0,0 +1,65 @@
+// Package emslog
+// @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 emslog
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/emsLog/list" method:"get" tags:"邮件记录" summary:"获取邮件记录列表"`
+ sysin.EmsLogListInp
+}
+
+type ListRes struct {
+ List []*sysin.EmsLogListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// ViewReq 获取指定信息
+type ViewReq struct {
+ g.Meta `path:"/emsLog/view" method:"get" tags:"邮件记录" summary:"获取指定信息"`
+ sysin.EmsLogViewInp
+}
+
+type ViewRes struct {
+ *sysin.EmsLogViewModel
+}
+
+// EditReq 修改/新增数据
+type EditReq struct {
+ g.Meta `path:"/emsLog/edit" method:"post" tags:"邮件记录" summary:"修改/新增邮件记录"`
+ sysin.EmsLogEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除
+type DeleteReq struct {
+ g.Meta `path:"/emsLog/delete" method:"post" tags:"邮件记录" summary:"删除邮件记录"`
+ sysin.EmsLogDeleteInp
+}
+
+type DeleteRes struct{}
+
+// StatusReq 更新状态
+type StatusReq struct {
+ g.Meta `path:"/emsLog/status" method:"post" tags:"邮件记录" summary:"更新邮件记录状态"`
+ sysin.EmsLogStatusInp
+}
+
+type StatusRes struct{}
+
+// SendTestReq 更新状态
+type SendTestReq struct {
+ g.Meta `path:"/emsLog/sendTest" method:"post" tags:"邮件记录" summary:"发送测试邮件"`
+ sysin.SendEmsInp
+}
+
+type SendTestRes struct{}
diff --git a/server/api/admin/gencodes/gencodes.go b/server/api/admin/gencodes/gencodes.go
new file mode 100644
index 0000000..7b196c8
--- /dev/null
+++ b/server/api/admin/gencodes/gencodes.go
@@ -0,0 +1,118 @@
+// Package gencodes
+// @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 gencodes
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/genCodes/list" method:"get" tags:"生成代码" summary:"获取生成代码列表"`
+ sysin.GenCodesListInp
+}
+
+type ListRes struct {
+ List []*sysin.GenCodesListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// ViewReq 获取指定信息
+type ViewReq struct {
+ g.Meta `path:"/genCodes/view" method:"get" tags:"生成代码" summary:"获取指定信息"`
+ sysin.GenCodesViewInp
+}
+
+type ViewRes struct {
+ *sysin.GenCodesViewModel
+}
+
+// EditReq 修改/新增数据
+type EditReq struct {
+ g.Meta `path:"/genCodes/edit" method:"post" tags:"生成代码" summary:"修改/新增生成代码"`
+ sysin.GenCodesEditInp
+}
+
+type EditRes struct {
+ *sysin.GenCodesEditModel
+}
+
+// DeleteReq 删除
+type DeleteReq struct {
+ g.Meta `path:"/genCodes/delete" method:"post" tags:"生成代码" summary:"删除生成代码"`
+ sysin.GenCodesDeleteInp
+}
+
+type DeleteRes struct{}
+
+// MaxSortReq 最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/genCodes/maxSort" method:"get" tags:"生成代码" summary:"生成代码最大排序"`
+ sysin.GenCodesMaxSortInp
+}
+
+type MaxSortRes struct {
+ *sysin.GenCodesMaxSortModel
+}
+
+// StatusReq 更新状态
+type StatusReq struct {
+ g.Meta `path:"/genCodes/status" method:"post" tags:"生成代码" summary:"更新生成代码状态"`
+ sysin.GenCodesStatusInp
+}
+
+type StatusRes struct{}
+
+type SelectsReq struct {
+ g.Meta `path:"/genCodes/selects" method:"get" tags:"生成代码" summary:"生成入口选项"`
+ sysin.GenCodesSelectsInp
+}
+
+type SelectsRes struct {
+ *sysin.GenCodesSelectsModel
+}
+
+type TableSelectReq struct {
+ g.Meta `path:"/genCodes/tableSelect" method:"get" tags:"生成代码" summary:"数据库表选项"`
+ sysin.GenCodesTableSelectInp
+}
+
+type TableSelectRes []*sysin.GenCodesTableSelectModel
+
+type ColumnSelectReq struct {
+ g.Meta `path:"/genCodes/columnSelect" method:"get" tags:"生成代码" summary:"表字段选项"`
+ sysin.GenCodesColumnSelectInp
+}
+
+type ColumnSelectRes []*sysin.GenCodesColumnSelectModel
+
+type ColumnListReq struct {
+ g.Meta `path:"/genCodes/columnList" method:"get" tags:"生成代码" summary:"表字段列表"`
+ sysin.GenCodesColumnListInp
+}
+
+type ColumnListRes []*sysin.GenCodesColumnListModel
+
+// PreviewReq 生成预览
+type PreviewReq struct {
+ g.Meta `path:"/genCodes/preview" method:"post" tags:"生成代码" summary:"生成预览"`
+ sysin.GenCodesPreviewInp
+}
+
+type PreviewRes struct {
+ *sysin.GenCodesPreviewModel
+}
+
+// BuildReq 提交生成
+type BuildReq struct {
+ g.Meta `path:"/genCodes/build" method:"post" tags:"生成代码" summary:"提交生成"`
+ sysin.GenCodesBuildInp
+}
+
+type BuildRes struct {
+}
diff --git a/server/api/admin/log/log.go b/server/api/admin/log/log.go
new file mode 100644
index 0000000..981751d
--- /dev/null
+++ b/server/api/admin/log/log.go
@@ -0,0 +1,56 @@
+// Package log
+// @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 log
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ClearReq 清空日志
+type ClearReq struct {
+ g.Meta `path:"/log/clear" method:"post" tags:"访问日志" summary:"清空日志"`
+}
+
+type ClearRes struct{}
+
+// ExportReq 导出
+type ExportReq struct {
+ g.Meta `path:"/log/export" method:"get" tags:"访问日志" summary:"导出日志"`
+ sysin.LogListInp
+}
+
+type ExportRes struct{}
+
+// ListReq 获取菜单列表
+type ListReq struct {
+ g.Meta `path:"/log/list" method:"get" tags:"访问日志" summary:"获取日志列表"`
+ sysin.LogListInp
+}
+
+type ListRes struct {
+ List []*sysin.LogListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// DeleteReq 删除
+type DeleteReq struct {
+ g.Meta `path:"/log/delete" method:"post" tags:"访问日志" summary:"删除日志"`
+ sysin.LogDeleteInp
+}
+
+type DeleteRes struct{}
+
+// ViewReq 获取指定信息
+type ViewReq struct {
+ g.Meta `path:"/log/view" method:"get" tags:"访问日志" summary:"获取指定信息"`
+ sysin.LogViewInp
+}
+
+type ViewRes struct {
+ *sysin.LogViewModel
+}
diff --git a/server/api/admin/loginlog/loginlog.go b/server/api/admin/loginlog/loginlog.go
new file mode 100644
index 0000000..6fd3710
--- /dev/null
+++ b/server/api/admin/loginlog/loginlog.go
@@ -0,0 +1,39 @@
+// Package loginlog
+// @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 loginlog
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ListReq 查询登录日志列表
+type ListReq struct {
+ g.Meta `path:"/loginLog/list" method:"get" tags:"登录日志" summary:"获取登录日志列表"`
+ sysin.LoginLogListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*sysin.LoginLogListModel `json:"list" dc:"数据列表"`
+}
+
+// ExportReq 导出登录日志列表
+type ExportReq struct {
+ g.Meta `path:"/loginLog/export" method:"get" tags:"登录日志" summary:"导出登录日志列表"`
+ sysin.LoginLogListInp
+}
+
+type ExportRes struct{}
+
+// DeleteReq 删除登录日志
+type DeleteReq struct {
+ g.Meta `path:"/loginLog/delete" method:"post" tags:"登录日志" summary:"删除登录日志"`
+ sysin.LoginLogDeleteInp
+}
+
+type DeleteRes struct{}
diff --git a/server/api/admin/member/member.go b/server/api/admin/member/member.go
new file mode 100644
index 0000000..49cd1f0
--- /dev/null
+++ b/server/api/admin/member/member.go
@@ -0,0 +1,138 @@
+// Package member
+// @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 member
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/adminin"
+ "hotgo/internal/model/input/form"
+)
+
+// UpdateCashReq 更新提现信息
+type UpdateCashReq struct {
+ g.Meta `path:"/member/updateCash" method:"post" tags:"用户" summary:"更新提现信息"`
+ adminin.MemberUpdateCashInp
+}
+
+type UpdateCashRes struct{}
+
+// UpdateEmailReq 换绑邮箱
+type UpdateEmailReq struct {
+ g.Meta `path:"/member/updateEmail" method:"post" tags:"用户" summary:"换绑邮箱"`
+ adminin.MemberUpdateEmailInp
+}
+
+type UpdateEmailRes struct{}
+
+// UpdateMobileReq 换绑手机号
+type UpdateMobileReq struct {
+ g.Meta `path:"/member/updateMobile" method:"post" tags:"用户" summary:"换绑手机号"`
+ adminin.MemberUpdateMobileInp
+}
+
+type UpdateMobileRes struct{}
+
+// UpdateProfileReq 更新用户资料
+type UpdateProfileReq struct {
+ g.Meta `path:"/member/updateProfile" method:"post" tags:"用户" summary:"更新用户资料"`
+ adminin.MemberUpdateProfileInp
+}
+
+type UpdateProfileRes struct{}
+
+// UpdatePwdReq 修改登录密码
+type UpdatePwdReq struct {
+ g.Meta `path:"/member/updatePwd" method:"post" tags:"用户" summary:"重置密码"`
+ adminin.MemberUpdatePwdInp
+}
+
+type UpdatePwdRes struct{}
+
+// ResetPwdReq 重置密码
+type ResetPwdReq struct {
+ g.Meta `path:"/member/resetPwd" method:"post" tags:"用户" summary:"重置密码"`
+ adminin.MemberResetPwdInp
+}
+
+type ResetPwdRes struct{}
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/member/list" method:"get" tags:"用户" summary:"获取用户列表"`
+ adminin.MemberListInp
+}
+
+type ListRes struct {
+ List []*adminin.MemberListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// ViewReq 获取指定信息
+type ViewReq struct {
+ g.Meta `path:"/member/view" method:"get" tags:"用户" summary:"获取指定信息"`
+ adminin.MemberViewInp
+}
+
+type ViewRes struct {
+ *adminin.MemberViewModel
+}
+
+// EditReq 修改/新增
+type EditReq struct {
+ g.Meta `path:"/member/edit" method:"post" tags:"用户" summary:"修改/新增用户"`
+ adminin.MemberEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除
+type DeleteReq struct {
+ g.Meta `path:"/member/delete" method:"post" tags:"用户" summary:"删除用户"`
+ adminin.MemberDeleteInp
+}
+
+type DeleteRes struct{}
+
+// StatusReq 更新用户状态
+type StatusReq struct {
+ g.Meta `path:"/member/status" method:"post" tags:"用户" summary:"更新用户状态"`
+ adminin.MemberStatusInp
+}
+
+type StatusRes struct{}
+
+// SelectReq 获取可选的后台用户选项
+type SelectReq struct {
+ g.Meta `path:"/member/option" method:"get" tags:"用户" summary:"获取可选的后台用户选项"`
+ adminin.MemberSelectInp
+}
+
+type SelectRes []*adminin.MemberSelectModel
+
+// InfoReq 获取登录用户信息
+type InfoReq struct {
+ g.Meta `path:"/member/info" method:"get" tags:"用户" summary:"获取登录用户信息"`
+}
+
+type InfoRes struct {
+ *adminin.LoginMemberInfoModel
+}
+
+// AddBalanceReq 增加余额
+type AddBalanceReq struct {
+ g.Meta `path:"/member/addBalance" method:"post" tags:"用户" summary:"增加余额"`
+ adminin.MemberAddBalanceInp
+}
+
+type AddBalanceRes struct{}
+
+// AddIntegralReq 增加积分
+type AddIntegralReq struct {
+ g.Meta `path:"/member/addIntegral" method:"post" tags:"用户" summary:"增加积分"`
+ adminin.MemberAddIntegralInp
+}
+
+type AddIntegralRes struct{}
diff --git a/server/api/admin/memberlevel/memberlevel.go b/server/api/admin/memberlevel/memberlevel.go
new file mode 100644
index 0000000..63f27f7
--- /dev/null
+++ b/server/api/admin/memberlevel/memberlevel.go
@@ -0,0 +1,67 @@
+package memberlevel
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/entity"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+type ListReq struct {
+ g.Meta `path:"/memberLevel/list" method:"get" tags:"会员等级" summary:"会员等级列表"`
+ sysin.MemberLevelListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*sysin.MemberLevelListModel `json:"list"`
+}
+type ViewReq struct {
+ g.Meta `path:"/memberLevel/view" method:"get" tags:"会员等级" summary:"会员等级详情"`
+ sysin.MemberLevelViewInp
+}
+type ViewRes struct{ *sysin.MemberLevelViewModel }
+type SaveReq struct {
+ g.Meta `path:"/memberLevel/save" method:"post" tags:"会员等级" summary:"保存等级规则草稿"`
+ sysin.MemberLevelSaveInp
+}
+type SaveRes struct {
+ Id uint64 `json:"id"`
+ VersionId uint64 `json:"versionId"`
+}
+type SubmitReq struct {
+ g.Meta `path:"/memberLevel/submit" method:"post" tags:"会员等级" summary:"提交等级规则审批"`
+ sysin.MemberLevelSubmitInp
+}
+type SubmitRes struct {
+ *sysin.MemberLevelApprovalModel
+}
+type PublishReq struct {
+ g.Meta `path:"/memberLevel/publish" method:"post" tags:"会员等级" summary:"发布已审批等级规则"`
+ sysin.MemberLevelPublishInp
+}
+type PublishRes struct{}
+type RollbackReq struct {
+ g.Meta `path:"/memberLevel/rollback" method:"post" tags:"会员等级" summary:"回滚等级规则为新草稿"`
+ sysin.MemberLevelRollbackInp
+}
+type RollbackRes struct {
+ VersionId uint64 `json:"versionId"`
+}
+type HistoryReq struct {
+ g.Meta `path:"/memberLevel/history" method:"get" tags:"会员等级" summary:"等级版本历史"`
+ sysin.MemberLevelHistoryInp
+}
+type HistoryRes struct {
+ form.PageRes
+ List []*entity.AppMemberLevelVersion `json:"list"`
+}
+type StatusReq struct {
+ g.Meta `path:"/memberLevel/status" method:"post" tags:"会员等级" summary:"停用启用会员等级"`
+ sysin.MemberLevelStatusInp
+}
+type StatusRes struct{}
+type DeleteReq struct {
+ g.Meta `path:"/memberLevel/delete" method:"post" tags:"会员等级" summary:"删除会员等级"`
+ sysin.MemberLevelDeleteInp
+}
+type DeleteRes struct{}
diff --git a/server/api/admin/menu/menu.go b/server/api/admin/menu/menu.go
new file mode 100644
index 0000000..45351da
--- /dev/null
+++ b/server/api/admin/menu/menu.go
@@ -0,0 +1,39 @@
+// Package menu
+// @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 menu
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/adminin"
+ "hotgo/internal/model/input/form"
+)
+
+// EditReq 修改/新增菜单
+type EditReq struct {
+ g.Meta `path:"/menu/edit" method:"post" tags:"菜单" summary:"修改/新增菜单"`
+ adminin.MenuEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除菜单
+type DeleteReq struct {
+ g.Meta `path:"/menu/delete" method:"post" tags:"菜单" summary:"删除菜单"`
+ adminin.MenuDeleteInp
+}
+
+type DeleteRes struct{}
+
+// ListReq 获取菜单列表
+type ListReq struct {
+ g.Meta `path:"/menu/list" method:"get" tags:"菜单" summary:"获取菜单列表"`
+ adminin.MenuListInp
+}
+
+type ListRes struct {
+ *adminin.MenuListModel
+ form.PageRes
+}
diff --git a/server/api/admin/monitor/monitor.go b/server/api/admin/monitor/monitor.go
new file mode 100644
index 0000000..d86a812
--- /dev/null
+++ b/server/api/admin/monitor/monitor.go
@@ -0,0 +1,106 @@
+// Package monitor
+// @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 monitor
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "github.com/gogf/gf/v2/os/gtime"
+ "hotgo/internal/library/network/tcp"
+ "hotgo/internal/model/input/form"
+)
+
+// UserOfflineReq 下线用户
+type UserOfflineReq struct {
+ g.Meta `path:"/monitor/userOffline" method:"post" tags:"在线用户" summary:"下线用户"`
+ Id string `json:"id" v:"required#SID不能为空" description:"SID"`
+}
+
+type UserOfflineRes struct{}
+
+// UserOnlineListReq 获取在线用户列表
+type UserOnlineListReq struct {
+ g.Meta `path:"/monitor/userOnlineList" method:"get" tags:"在线用户" summary:"获取在线用户列表"`
+ form.PageReq
+ UserId int64 `json:"userId" description:"用户ID"`
+ Username string `json:"username" description:"用户名"`
+ IP string `json:"ip" description:"登录IP"`
+ FirstTime []*gtime.Time `json:"firstTime" description:"登录时间"`
+}
+
+type UserOnlineListRes struct {
+ List []*UserOnlineModel `json:"list" description:"数据列表"`
+ form.PageRes
+}
+
+type UserOnlineModel struct {
+ ID string `json:"id"` // 连接唯一标识
+ IP string `json:"ip"` // 客户端IP
+ Os string `json:"os"` // 客户端系统名称
+ Browser string `json:"browser"` // 浏览器
+ FirstTime int64 `json:"firstTime"` // 首次连接时间
+ HeartbeatTime uint64 `json:"heartbeatTime"` // 用户上次心跳时间
+ App string `json:"app"` // 应用名称
+ UserId int64 `json:"userId"` // 用户ID
+ Username string `json:"username"` // 用户名
+ Avatar string `json:"avatar"` // 头像
+}
+
+// NetOnlineListReq 获取在线服务列表
+type NetOnlineListReq struct {
+ g.Meta `path:"/monitor/netOnlineList" method:"get" tags:"在线服务" summary:"获取在线服务列表"`
+ form.PageReq
+ Name string `json:"name" description:"应用名称"`
+ Group string `json:"group" description:"分组"`
+ AppId string `json:"appId" description:"APPID"`
+ Addr string `json:"addr" description:"登录地址"`
+ FirstTime []*gtime.Time `json:"firstTime" description:"登录时间"`
+}
+
+type NetOnlineListRes struct {
+ List []*NetOnlineModel `json:"list" description:"数据列表"`
+ form.PageRes
+}
+
+type NetOnlineModel struct {
+ *tcp.AuthMeta
+ Id int64 `json:"id" description:"连接ID"`
+ IsAuth bool `json:"isAuth" description:"是否认证"`
+ Addr string `json:"addr" description:"登录地址"`
+ Port string `json:"port" description:"连接端口"`
+ FirstTime int64 `json:"firstTime" description:"首次连接时间"`
+ HeartbeatTime int64 `json:"heartbeatTime" description:"上次心跳时间"`
+ LicenseId int64 `json:"licenseId" description:"许可ID"`
+ LicenseName string `json:"licenseName" description:"许可名称"`
+ LoginTimes int64 `json:"loginTimes" description:"许可累计登录次数"`
+ Online int `json:"online" description:"许可在线数量"`
+ OnlineLimit int `json:"onlineLimit" description:"许可在线数量限制"`
+ Desc string `json:"desc" description:"许可说明"`
+ Proto string `json:"proto" description:"网络协议"`
+}
+
+// NetOptionReq 获取服务选项
+type NetOptionReq struct {
+ g.Meta `path:"/monitor/netOption" method:"get" tags:"在线服务" summary:"获取服务选项"`
+}
+
+type NetOptionRes struct {
+ Routes []*RouteSelect `json:"routes" dc:"路由选项"`
+}
+
+type RouteSelect struct {
+ Value interface{} `json:"value"`
+ Label string `json:"label"`
+ Disabled bool `json:"disabled"`
+ IsRPC bool `json:"isRPC"`
+}
+
+// NetOfflineReq 下线服务
+type NetOfflineReq struct {
+ g.Meta `path:"/monitor/netOffline" method:"post" tags:"在线服务" summary:"下线服务"`
+ Id int64 `json:"id" v:"required#连接ID不能为空" description:"连接ID"`
+}
+
+type NetOfflineRes struct{}
diff --git a/server/api/admin/normaltreedemo/normaltreedemo.go b/server/api/admin/normaltreedemo/normaltreedemo.go
new file mode 100644
index 0000000..62dff51
--- /dev/null
+++ b/server/api/admin/normaltreedemo/normaltreedemo.go
@@ -0,0 +1,69 @@
+// Package normaltreedemo
+// @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 normaltreedemo
+
+import (
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/utility/tree"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ListReq 查询普通树表列表
+type ListReq struct {
+ g.Meta `path:"/normalTreeDemo/list" method:"get" tags:"普通树表" summary:"获取普通树表列表"`
+ sysin.NormalTreeDemoListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*sysin.NormalTreeDemoListModel `json:"list" dc:"数据列表"`
+}
+
+// ViewReq 获取普通树表指定信息
+type ViewReq struct {
+ g.Meta `path:"/normalTreeDemo/view" method:"get" tags:"普通树表" summary:"获取普通树表指定信息"`
+ sysin.NormalTreeDemoViewInp
+}
+
+type ViewRes struct {
+ *sysin.NormalTreeDemoViewModel
+}
+
+// EditReq 修改/新增普通树表
+type EditReq struct {
+ g.Meta `path:"/normalTreeDemo/edit" method:"post" tags:"普通树表" summary:"修改/新增普通树表"`
+ sysin.NormalTreeDemoEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除普通树表
+type DeleteReq struct {
+ g.Meta `path:"/normalTreeDemo/delete" method:"post" tags:"普通树表" summary:"删除普通树表"`
+ sysin.NormalTreeDemoDeleteInp
+}
+
+type DeleteRes struct{}
+
+// MaxSortReq 获取普通树表最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/normalTreeDemo/maxSort" method:"get" tags:"普通树表" summary:"获取普通树表最大排序"`
+ sysin.NormalTreeDemoMaxSortInp
+}
+
+type MaxSortRes struct {
+ *sysin.NormalTreeDemoMaxSortModel
+}
+
+// TreeOptionReq 获取普通树表关系树选项
+type TreeOptionReq struct {
+ g.Meta `path:"/normalTreeDemo/treeOption" method:"get" tags:"普通树表" summary:"获取普通树表关系树选项"`
+}
+
+type TreeOptionRes []tree.Node
diff --git a/server/api/admin/notice/notice.go b/server/api/admin/notice/notice.go
new file mode 100644
index 0000000..75232df
--- /dev/null
+++ b/server/api/admin/notice/notice.go
@@ -0,0 +1,128 @@
+// Package notice
+// @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 notice
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/adminin"
+ "hotgo/internal/model/input/form"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/notice/list" method:"get" tags:"公告" summary:"获取公告列表"`
+ adminin.NoticeListInp
+}
+
+type ListRes struct {
+ List []*adminin.NoticeListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// ViewReq 获取指定信息
+type ViewReq struct {
+ g.Meta `path:"/notice/view" method:"get" tags:"公告" summary:"获取指定信息"`
+ adminin.NoticeViewInp
+}
+
+type ViewRes struct {
+ *adminin.NoticeViewModel
+}
+
+// EditReq 修改/新增字典数据
+type EditReq struct {
+ g.Meta `path:"/notice/edit" method:"post" tags:"公告" summary:"修改/新增公告"`
+ adminin.NoticeEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除字典类型
+type DeleteReq struct {
+ g.Meta `path:"/notice/delete" method:"post" tags:"公告" summary:"删除公告"`
+ adminin.NoticeDeleteInp
+}
+
+type DeleteRes struct{}
+
+// MaxSortReq 最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/notice/maxSort" method:"get" tags:"公告" summary:"公告最大排序"`
+ adminin.NoticeMaxSortInp
+}
+
+type MaxSortRes struct {
+ *adminin.NoticeMaxSortModel
+}
+
+// StatusReq 更新公告状态
+type StatusReq struct {
+ g.Meta `path:"/notice/status" method:"post" tags:"公告" summary:"更新公告状态"`
+ adminin.NoticeStatusInp
+}
+
+type StatusRes struct{}
+
+// EditNotifyReq 修改/新增通知
+type EditNotifyReq struct {
+ g.Meta `path:"/notice/editNotify" method:"post" tags:"公告" summary:"修改/新增通知"`
+ adminin.NoticeEditInp
+}
+
+type EditNotifyRes struct{}
+
+// EditNoticeReq 修改/新增公告
+type EditNoticeReq struct {
+ g.Meta `path:"/notice/editNotice" method:"post" tags:"公告" summary:"修改/新增公告"`
+ adminin.NoticeEditInp
+}
+
+type EditNoticeRes struct{}
+
+// EditLetterReq 修改/新增公告
+type EditLetterReq struct {
+ g.Meta `path:"/notice/editLetter" method:"post" tags:"公告" summary:"修改/新增私信"`
+ adminin.NoticeEditInp
+}
+
+type EditLetterRes struct{}
+
+// PullMessagesReq 拉取我的消息
+type PullMessagesReq struct {
+ g.Meta `path:"/notice/pullMessages" method:"get" tags:"公告" summary:"拉取我的消息"`
+ adminin.PullMessagesInp
+}
+
+type PullMessagesRes struct {
+ *adminin.PullMessagesModel
+}
+
+// ReadAllReq 全部已读
+type ReadAllReq struct {
+ g.Meta `path:"/notice/readAll" method:"post" tags:"公告" summary:"全部已读"`
+ adminin.NoticeReadAllInp
+}
+
+type ReadAllRes struct {
+}
+
+// UpReadReq 更新已读
+type UpReadReq struct {
+ g.Meta `path:"/notice/upRead" method:"post" tags:"公告" summary:"更新已读"`
+ adminin.NoticeUpReadInp
+}
+type UpReadRes struct{}
+
+// MessageListReq 我的消息列表
+type MessageListReq struct {
+ g.Meta `path:"/notice/messageList" method:"get" tags:"公告" summary:"我的消息列表"`
+ adminin.NoticeMessageListInp
+}
+
+type MessageListRes struct {
+ List []*adminin.NoticeMessageListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
diff --git a/server/api/admin/optiontreedemo/optiontreedemo.go b/server/api/admin/optiontreedemo/optiontreedemo.go
new file mode 100644
index 0000000..70d0c63
--- /dev/null
+++ b/server/api/admin/optiontreedemo/optiontreedemo.go
@@ -0,0 +1,69 @@
+// Package optiontreedemo
+// @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 optiontreedemo
+
+import (
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/utility/tree"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ListReq 查询选项树表列表
+type ListReq struct {
+ g.Meta `path:"/optionTreeDemo/list" method:"get" tags:"选项树表" summary:"获取选项树表列表"`
+ sysin.OptionTreeDemoListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*sysin.OptionTreeDemoListModel `json:"list" dc:"数据列表"`
+}
+
+// ViewReq 获取选项树表指定信息
+type ViewReq struct {
+ g.Meta `path:"/optionTreeDemo/view" method:"get" tags:"选项树表" summary:"获取选项树表指定信息"`
+ sysin.OptionTreeDemoViewInp
+}
+
+type ViewRes struct {
+ *sysin.OptionTreeDemoViewModel
+}
+
+// EditReq 修改/新增选项树表
+type EditReq struct {
+ g.Meta `path:"/optionTreeDemo/edit" method:"post" tags:"选项树表" summary:"修改/新增选项树表"`
+ sysin.OptionTreeDemoEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除选项树表
+type DeleteReq struct {
+ g.Meta `path:"/optionTreeDemo/delete" method:"post" tags:"选项树表" summary:"删除选项树表"`
+ sysin.OptionTreeDemoDeleteInp
+}
+
+type DeleteRes struct{}
+
+// MaxSortReq 获取选项树表最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/optionTreeDemo/maxSort" method:"get" tags:"选项树表" summary:"获取选项树表最大排序"`
+ sysin.OptionTreeDemoMaxSortInp
+}
+
+type MaxSortRes struct {
+ *sysin.OptionTreeDemoMaxSortModel
+}
+
+// TreeOptionReq 获取选项树表关系树选项
+type TreeOptionReq struct {
+ g.Meta `path:"/optionTreeDemo/treeOption" method:"get" tags:"选项树表" summary:"获取选项树表关系树选项"`
+}
+
+type TreeOptionRes []tree.Node
\ No newline at end of file
diff --git a/server/api/admin/order/order.go b/server/api/admin/order/order.go
new file mode 100644
index 0000000..425921f
--- /dev/null
+++ b/server/api/admin/order/order.go
@@ -0,0 +1,93 @@
+// Package order
+// @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 order
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/adminin"
+ "hotgo/internal/model/input/form"
+)
+
+// AcceptRefundReq 受理申请退款
+type AcceptRefundReq struct {
+ g.Meta `path:"/order/acceptRefund" method:"post" tags:"充值订单" summary:"受理申请退款"`
+ adminin.OrderAcceptRefundInp
+}
+
+type AcceptRefundRes struct {
+}
+
+// ApplyRefundReq 申请退款
+type ApplyRefundReq struct {
+ g.Meta `path:"/order/applyRefund" method:"post" tags:"充值订单" summary:"申请退款"`
+ adminin.OrderApplyRefundInp
+}
+
+type ApplyRefundRes struct {
+}
+
+// CreateReq 创建充值订单
+type CreateReq struct {
+ g.Meta `path:"/order/create" method:"post" tags:"充值订单" summary:"创建充值订单"`
+ adminin.OrderCreateInp
+}
+
+type CreateRes struct {
+ *adminin.OrderCreateModel
+}
+
+// ListReq 查询充值订单列表
+type ListReq struct {
+ g.Meta `path:"/order/list" method:"get" tags:"充值订单" summary:"获取充值订单列表"`
+ adminin.OrderListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*adminin.OrderListModel `json:"list" dc:"数据列表"`
+}
+
+// ExportReq 导出充值订单列表
+type ExportReq struct {
+ g.Meta `path:"/order/export" method:"get" tags:"充值订单" summary:"导出充值订单列表"`
+ adminin.OrderListInp
+}
+
+type ExportRes struct{}
+
+// ViewReq 获取充值订单指定信息
+type ViewReq struct {
+ g.Meta `path:"/order/view" method:"get" tags:"充值订单" summary:"获取充值订单指定信息"`
+ adminin.OrderViewInp
+}
+
+type ViewRes struct {
+ *adminin.OrderViewModel
+}
+
+// EditReq 修改/新增充值订单
+type EditReq struct {
+ g.Meta `path:"/order/edit" method:"post" tags:"充值订单" summary:"修改/新增充值订单"`
+ adminin.OrderEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除充值订单
+type DeleteReq struct {
+ g.Meta `path:"/order/delete" method:"post" tags:"充值订单" summary:"删除充值订单"`
+ adminin.OrderDeleteInp
+}
+
+type DeleteRes struct{}
+
+// StatusReq 更新充值订单状态
+type StatusReq struct {
+ g.Meta `path:"/order/status" method:"post" tags:"充值订单" summary:"更新充值订单状态"`
+ adminin.OrderStatusInp
+}
+
+type StatusRes struct{}
diff --git a/server/api/admin/pay/refund.go b/server/api/admin/pay/refund.go
new file mode 100644
index 0000000..dfbab3b
--- /dev/null
+++ b/server/api/admin/pay/refund.go
@@ -0,0 +1,33 @@
+// 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 (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/payin"
+)
+
+// RefundListReq 查询交易退款列表
+type RefundListReq struct {
+ g.Meta `path:"/payRefund/list" method:"get" tags:"交易退款" summary:"获取交易退款列表"`
+ payin.PayRefundListInp
+}
+
+type RefundListRes struct {
+ form.PageRes
+ List []*payin.PayRefundListModel `json:"list" dc:"数据列表"`
+}
+
+// RefundExportReq 导出交易退款列表
+type RefundExportReq struct {
+ g.Meta `path:"/payRefund/export" method:"get" tags:"交易退款" summary:"导出交易退款列表"`
+ payin.PayRefundListInp
+}
+
+type RefundExportRes struct{}
diff --git a/server/api/admin/portal/portal.go b/server/api/admin/portal/portal.go
new file mode 100644
index 0000000..a09ac78
--- /dev/null
+++ b/server/api/admin/portal/portal.go
@@ -0,0 +1,144 @@
+package portal
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/entity"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+type SiteConfigCurrentReq struct {
+ g.Meta `path:"/siteConfig/current" method:"get" tags:"门户管理" summary:"获取当前站点配置"`
+ sysin.SiteConfigCurrentInp
+}
+type SiteConfigCurrentRes struct{ *sysin.SiteConfigCurrentModel }
+type SiteConfigHistoryReq struct {
+ g.Meta `path:"/siteConfig/history" method:"get" tags:"门户管理" summary:"获取站点配置版本"`
+ sysin.SiteConfigHistoryInp
+}
+type SiteConfigHistoryRes struct {
+ form.PageRes
+ List []*sysin.SiteConfigHistoryModel `json:"list"`
+}
+type SiteConfigSaveReq struct {
+ g.Meta `path:"/siteConfig/save" method:"post" tags:"门户管理" summary:"保存并立即生效站点配置"`
+ sysin.SiteConfigSaveInp
+}
+type SiteConfigSaveRes struct {
+ Id uint64 `json:"id"`
+}
+type SiteConfigSubmitReq struct {
+ g.Meta `path:"/siteConfig/submit" method:"post" tags:"门户管理" summary:"提交站点配置审批"`
+ sysin.SiteConfigSubmitInp
+}
+type SiteConfigSubmitRes struct{ *sysin.PortalApprovalModel }
+type SiteConfigPublishReq struct {
+ g.Meta `path:"/siteConfig/publish" method:"post" tags:"门户管理" summary:"发布已审批站点配置"`
+ sysin.SiteConfigPublishInp
+}
+type SiteConfigPublishRes struct{}
+type SiteConfigRollbackReq struct {
+ g.Meta `path:"/siteConfig/rollback" method:"post" tags:"门户管理" summary:"回滚站点配置"`
+ sysin.SiteConfigRollbackInp
+}
+type SiteConfigRollbackRes struct {
+ Id uint64 `json:"id"`
+}
+
+type ContentListReq struct {
+ g.Meta `path:"/portalContent/list" method:"get" tags:"文本管理" summary:"获取文本内容列表"`
+ sysin.ContentListInp
+}
+type ContentListRes struct {
+ form.PageRes
+ List []*sysin.ContentListModel `json:"list"`
+}
+type ContentViewReq struct {
+ g.Meta `path:"/portalContent/view" method:"get" tags:"文本管理" summary:"获取文本内容详情"`
+ sysin.ContentViewInp
+}
+type ContentViewRes struct{ *sysin.ContentViewModel }
+type ContentEditReq struct {
+ g.Meta `path:"/portalContent/edit" method:"post" tags:"文本管理" summary:"新增或编辑文本内容"`
+ sysin.ContentEditInp
+}
+type ContentEditRes struct {
+ Id uint64 `json:"id"`
+}
+type ContentDeleteReq struct {
+ g.Meta `path:"/portalContent/delete" method:"post" tags:"文本管理" summary:"删除或下线文本内容"`
+ sysin.ContentDeleteInp
+}
+type ContentDeleteRes struct{}
+type ContentPublishReq struct {
+ g.Meta `path:"/portalContent/publish" method:"post" tags:"文本管理" summary:"发布文本内容版本"`
+ sysin.ContentPublishInp
+}
+type ContentPublishRes struct{}
+type ContentOfflineReq struct {
+ g.Meta `path:"/portalContent/offline" method:"post" tags:"文本管理" summary:"下线文本内容"`
+ sysin.ContentOfflineInp
+}
+type ContentOfflineRes struct{}
+
+type BannerListReq struct {
+ g.Meta `path:"/banner/list" method:"get" tags:"Banner管理" summary:"获取Banner列表"`
+ sysin.BannerListInp
+}
+type BannerListRes struct {
+ form.PageRes
+ List []*sysin.BannerListModel `json:"list"`
+}
+type BannerViewReq struct {
+ g.Meta `path:"/banner/view" method:"get" tags:"Banner管理" summary:"获取Banner详情"`
+ sysin.BannerViewInp
+}
+type BannerViewRes struct{ *entity.Banner }
+type BannerEditReq struct {
+ g.Meta `path:"/banner/edit" method:"post" tags:"Banner管理" summary:"新增或编辑Banner"`
+ sysin.BannerEditInp
+}
+type BannerEditRes struct {
+ Id uint64 `json:"id"`
+}
+type BannerDeleteReq struct {
+ g.Meta `path:"/banner/delete" method:"post" tags:"Banner管理" summary:"删除或下线Banner"`
+ sysin.BannerDeleteInp
+}
+type BannerDeleteRes struct{}
+type BannerStatusReq struct {
+ g.Meta `path:"/banner/status" method:"post" tags:"Banner管理" summary:"更新Banner发布状态"`
+ sysin.BannerStatusInp
+}
+type BannerStatusRes struct{}
+
+type ManualProductListReq struct {
+ g.Meta `path:"/manualProduct/list" method:"get" tags:"手工商城" summary:"获取手工商城商品"`
+ sysin.ManualProductListInp
+}
+type ManualProductListRes struct {
+ form.PageRes
+ List []*sysin.ManualProductListModel `json:"list"`
+}
+type ManualProductViewReq struct {
+ g.Meta `path:"/manualProduct/view" method:"get" tags:"手工商城" summary:"获取手工商城商品详情"`
+ sysin.ManualProductViewInp
+}
+type ManualProductViewRes struct{ *sysin.ManualProductViewModel }
+type ManualProductEditReq struct {
+ g.Meta `path:"/manualProduct/edit" method:"post" tags:"手工商城" summary:"新增或编辑手工商城商品"`
+ sysin.ManualProductEditInp
+}
+type ManualProductEditRes struct {
+ Id uint64 `json:"id"`
+}
+type ManualProductDeleteReq struct {
+ g.Meta `path:"/manualProduct/delete" method:"post" tags:"手工商城" summary:"删除或下线手工商城商品"`
+ sysin.ManualProductDeleteInp
+}
+type ManualProductDeleteRes struct{}
+type ManualProductStatusReq struct {
+ g.Meta `path:"/manualProduct/status" method:"post" tags:"手工商城" summary:"更新手工商城商品状态"`
+ sysin.ManualProductStatusInp
+}
+type ManualProductStatusRes struct{}
diff --git a/server/api/admin/post/post.go b/server/api/admin/post/post.go
new file mode 100644
index 0000000..e0659a6
--- /dev/null
+++ b/server/api/admin/post/post.go
@@ -0,0 +1,67 @@
+// Package post
+// @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 post
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/adminin"
+ "hotgo/internal/model/input/form"
+)
+
+// EditReq 修改/新增岗位
+type EditReq struct {
+ g.Meta `path:"/post/edit" method:"post" tags:"岗位" summary:"修改/新增岗位"`
+ adminin.PostEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除岗位
+type DeleteReq struct {
+ g.Meta `path:"/post/delete" method:"post" tags:"岗位" summary:"删除岗位"`
+ adminin.PostDeleteInp
+}
+
+type DeleteRes struct{}
+
+// MaxSortReq 最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/post/maxSort" method:"get" tags:"岗位" summary:"岗位最大排序"`
+ adminin.PostMaxSortInp
+}
+
+type MaxSortRes struct {
+ *adminin.PostMaxSortModel
+}
+
+// ListReq 获取列表
+type ListReq struct {
+ g.Meta `path:"/post/list" method:"get" tags:"岗位" summary:"获取岗位列表"`
+ adminin.PostListInp
+}
+
+type ListRes struct {
+ List []*adminin.PostListModel `json:"list" description:"数据列表"`
+ form.PageRes
+}
+
+// ViewReq 获取指定信息
+type ViewReq struct {
+ g.Meta `path:"/post/view" method:"get" tags:"岗位" summary:"获取指定信息"`
+ adminin.PostViewInp
+}
+
+type ViewRes struct {
+ *adminin.PostViewModel
+}
+
+// StatusReq 更新状态
+type StatusReq struct {
+ g.Meta `path:"/post/status" method:"post" tags:"岗位" summary:"更新岗位状态"`
+ adminin.PostStatusInp
+}
+
+type StatusRes struct{}
diff --git a/server/api/admin/product/product.go b/server/api/admin/product/product.go
new file mode 100644
index 0000000..0f6c176
--- /dev/null
+++ b/server/api/admin/product/product.go
@@ -0,0 +1,43 @@
+package product
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+type ListReq struct {
+ g.Meta `path:"/product/list" method:"get" tags:"商品管理" summary:"获取商品列表"`
+ sysin.ProductListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*sysin.ProductListModel `json:"list"`
+}
+type ViewReq struct {
+ g.Meta `path:"/product/view" method:"get" tags:"商品管理" summary:"获取商品详情"`
+ sysin.ProductViewInp
+}
+type ViewRes struct{ *sysin.ProductListModel }
+type EditReq struct {
+ g.Meta `path:"/product/edit" method:"post" tags:"商品管理" summary:"新增编辑商品"`
+ sysin.ProductEditInp
+}
+type EditRes struct {
+ Id uint64 `json:"id"`
+}
+type StatusReq struct {
+ g.Meta `path:"/product/status" method:"post" tags:"商品管理" summary:"商品上下架"`
+ sysin.ProductStatusInp
+}
+type StatusRes struct{}
+type RecommendReq struct {
+ g.Meta `path:"/product/recommend" method:"post" tags:"商品管理" summary:"商品推荐切换"`
+ sysin.ProductRecommendInp
+}
+type RecommendRes struct{}
+type DeleteReq struct {
+ g.Meta `path:"/product/delete" method:"post" tags:"商品管理" summary:"删除商品"`
+ sysin.ProductDeleteInp
+}
+type DeleteRes struct{}
diff --git a/server/api/admin/provinces/provinces.go b/server/api/admin/provinces/provinces.go
new file mode 100644
index 0000000..d6bc9fd
--- /dev/null
+++ b/server/api/admin/provinces/provinces.go
@@ -0,0 +1,115 @@
+// Package provinces
+// @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 provinces
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/provinces/list" method:"get" tags:"省市区" summary:"获取省市区列表"`
+ sysin.ProvincesListInp
+}
+
+type ListRes struct {
+ List []*sysin.ProvincesListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// ViewReq 获取信息
+type ViewReq struct {
+ g.Meta `path:"/provinces/view" method:"get" tags:"省市区" summary:"获取指定信息"`
+ sysin.ProvincesViewInp
+}
+
+type ViewRes struct {
+ *sysin.ProvincesViewModel
+}
+
+// EditReq 修改/新增
+type EditReq struct {
+ g.Meta `path:"/provinces/edit" method:"post" tags:"省市区" summary:"修改/新增省市区"`
+ sysin.ProvincesEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除
+type DeleteReq struct {
+ g.Meta `path:"/provinces/delete" method:"post" tags:"省市区" summary:"删除省市区"`
+ sysin.ProvincesDeleteInp
+}
+
+type DeleteRes struct{}
+
+// MaxSortReq 最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/provinces/maxSort" method:"get" tags:"省市区" summary:"省市区最大排序"`
+ sysin.ProvincesMaxSortInp
+}
+
+type MaxSortRes struct {
+ *sysin.ProvincesMaxSortModel
+}
+
+// StatusReq 更新状态
+type StatusReq struct {
+ g.Meta `path:"/provinces/status" method:"post" tags:"省市区" summary:"更新省市区状态"`
+ sysin.ProvincesStatusInp
+}
+
+type StatusRes struct{}
+
+// TreeReq 关系树选项列表
+type TreeReq struct {
+ g.Meta `path:"/provinces/tree" tags:"省市区" method:"get" summary:"省市区关系树选项列表"`
+}
+
+type TreeRes struct {
+ List []*sysin.ProvincesTree `json:"list" dc:"数据列表"`
+}
+
+// ChildrenListReq 获取省市区下级列表
+type ChildrenListReq struct {
+ g.Meta `path:"/provinces/childrenList" method:"get" tags:"省市区" summary:"获取省市区下级列表"`
+ sysin.ProvincesChildrenListInp
+}
+
+type ChildrenListRes struct {
+ List []*sysin.ProvincesChildrenListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// UniqueIdReq 地区ID是否唯一
+type UniqueIdReq struct {
+ g.Meta `path:"/provinces/uniqueId" method:"get" tags:"省市区" summary:"地区ID是否唯一"`
+ sysin.ProvincesUniqueIdInp
+}
+
+type UniqueIdRes struct {
+ *sysin.ProvincesUniqueIdModel
+}
+
+// SelectReq 省市区选项
+type SelectReq struct {
+ g.Meta `path:"/provinces/select" method:"get" tags:"省市区" summary:"省市区选项"`
+ sysin.ProvincesSelectInp
+}
+
+type SelectRes struct {
+ *sysin.ProvincesSelectModel
+}
+
+// CityLabelReq 获取指定城市标签
+type CityLabelReq struct {
+ g.Meta `path:"/provinces/cityLabel" method:"get" tags:"省市区" summary:"获取指定城市标签" `
+ sysin.ProvincesCityLabelInp
+}
+
+type CityLabelRes sysin.ProvincesCityLabelModel
diff --git a/server/api/admin/rechargeorder/rechargeorder.go b/server/api/admin/rechargeorder/rechargeorder.go
new file mode 100644
index 0000000..6debeee
--- /dev/null
+++ b/server/api/admin/rechargeorder/rechargeorder.go
@@ -0,0 +1,37 @@
+package rechargeorder
+
+import (
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+type ListReq struct {
+ g.Meta `path:"/rechargeOrder/list" method:"get" tags:"充值管理" summary:"充值订单列表"`
+ sysin.RechargeOrderListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*sysin.RechargeOrderListModel `json:"list"`
+}
+type SummaryReq struct {
+ g.Meta `path:"/rechargeOrder/summary" method:"get" tags:"充值管理" summary:"充值金额汇总"`
+ sysin.RechargeOrderListInp
+}
+type SummaryRes struct{ *sysin.RechargeSummaryModel }
+type ViewReq struct {
+ g.Meta `path:"/rechargeOrder/view" method:"get" tags:"充值管理" summary:"充值订单详情"`
+ sysin.RechargeOrderViewInp
+}
+type ViewRes struct{ *sysin.RechargeOrderListModel }
+type ReviewReq struct {
+ g.Meta `path:"/rechargeOrder/review" method:"post" tags:"充值管理" summary:"提交充值审核"`
+ sysin.RechargeReviewInp
+}
+type ReviewRes struct{ *sysin.FinanceApprovalModel }
+type ExecuteReq struct {
+ g.Meta `path:"/rechargeOrder/execute" method:"post" tags:"充值管理" summary:"执行已审批充值结果"`
+ sysin.FinanceExecuteInp
+}
+type ExecuteRes struct{}
diff --git a/server/api/admin/role/role.go b/server/api/admin/role/role.go
new file mode 100644
index 0000000..bbae5a1
--- /dev/null
+++ b/server/api/admin/role/role.go
@@ -0,0 +1,82 @@
+// Package role
+// @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 role
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/consts"
+ "hotgo/internal/model/input/adminin"
+ "hotgo/internal/model/input/form"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/role/list" method:"get" tags:"角色" summary:"获取角色列表"`
+ adminin.RoleListInp
+}
+
+type ListRes struct {
+ *adminin.RoleListModel
+ form.PageRes
+}
+
+// DynamicReq 动态路由
+type DynamicReq struct {
+ g.Meta `path:"/role/dynamic" method:"get" tags:"角色" summary:"获取动态路由" description:"获取登录用户动态路由"`
+}
+
+type DynamicRes struct {
+ List []*adminin.MenuRoute `json:"list" description:"数据列表"`
+}
+
+type UpdatePermissionsReq struct {
+ g.Meta `path:"/role/updatePermissions" method:"post" tags:"角色" summary:"编辑角色菜单权限"`
+ adminin.UpdatePermissionsInp
+}
+
+type UpdatePermissionsRes struct{}
+
+type GetPermissionsReq struct {
+ g.Meta `path:"/role/getPermissions" method:"get" tags:"角色" summary:"获取指定角色权限"`
+ adminin.GetPermissionsInp
+}
+
+type GetPermissionsRes struct {
+ *adminin.GetPermissionsModel
+}
+
+// EditReq 修改/新增角色
+type EditReq struct {
+ g.Meta `path:"/role/edit" method:"post" tags:"角色" summary:"修改/新增角色"`
+ adminin.RoleEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除角色
+type DeleteReq struct {
+ g.Meta `path:"/role/delete" method:"post" tags:"角色" summary:"删除角色"`
+ adminin.RoleDeleteInp
+}
+
+type DeleteRes struct{}
+
+// DataScopeSelectReq 获取数据权限选项
+type DataScopeSelectReq struct {
+ g.Meta `path:"/role/dataScope/select" method:"get" tags:"角色" summary:"获取数据权限选项"`
+}
+
+type DataScopeSelectRes struct {
+ List []consts.GroupScopeSelect `json:"list" dc:"数据选项"`
+}
+
+// DataScopeEditReq 修改指定角色的数据权限
+type DataScopeEditReq struct {
+ g.Meta `path:"/role/dataScope/edit" method:"post" tags:"角色" summary:"修改指定角色的数据权限"`
+ adminin.DataScopeEditInp
+}
+
+type DataScopeEditRes struct{}
diff --git a/server/api/admin/servelicense/servelicense.go b/server/api/admin/servelicense/servelicense.go
new file mode 100644
index 0000000..78c7f20
--- /dev/null
+++ b/server/api/admin/servelicense/servelicense.go
@@ -0,0 +1,74 @@
+// Package servelicense
+// @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 servelicense
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ListReq 查询服务许可证列表
+type ListReq struct {
+ g.Meta `path:"/serveLicense/list" method:"get" tags:"服务许可证" summary:"获取服务许可证列表"`
+ sysin.ServeLicenseListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*sysin.ServeLicenseListModel `json:"list" dc:"数据列表"`
+}
+
+// ExportReq 导出服务许可证列表
+type ExportReq struct {
+ g.Meta `path:"/serveLicense/export" method:"get" tags:"服务许可证" summary:"导出服务许可证列表"`
+ sysin.ServeLicenseListInp
+}
+
+type ExportRes struct{}
+
+// ViewReq 获取服务许可证指定信息
+type ViewReq struct {
+ g.Meta `path:"/serveLicense/view" method:"get" tags:"服务许可证" summary:"获取服务许可证指定信息"`
+ sysin.ServeLicenseViewInp
+}
+
+type ViewRes struct {
+ *sysin.ServeLicenseViewModel
+}
+
+// EditReq 修改/新增服务许可证
+type EditReq struct {
+ g.Meta `path:"/serveLicense/edit" method:"post" tags:"服务许可证" summary:"修改/新增服务许可证"`
+ sysin.ServeLicenseEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除服务许可证
+type DeleteReq struct {
+ g.Meta `path:"/serveLicense/delete" method:"post" tags:"服务许可证" summary:"删除服务许可证"`
+ sysin.ServeLicenseDeleteInp
+}
+
+type DeleteRes struct{}
+
+// StatusReq 更新服务许可证状态
+type StatusReq struct {
+ g.Meta `path:"/serveLicense/status" method:"post" tags:"服务许可证" summary:"更新服务许可证状态"`
+ sysin.ServeLicenseStatusInp
+}
+
+type StatusRes struct{}
+
+// AssignRouterReq 分配服务许可证路由
+type AssignRouterReq struct {
+ g.Meta `path:"/serveLicense/assignRouter" method:"post" tags:"服务许可证" summary:"分配服务许可证路由"`
+ sysin.ServeLicenseAssignRouterInp
+}
+
+type AssignRouterRes struct{}
diff --git a/server/api/admin/servelog/servelog.go b/server/api/admin/servelog/servelog.go
new file mode 100644
index 0000000..d250cd1
--- /dev/null
+++ b/server/api/admin/servelog/servelog.go
@@ -0,0 +1,49 @@
+// Package servelog
+// @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 servelog
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ListReq 查询服务日志列表
+type ListReq struct {
+ g.Meta `path:"/serveLog/list" method:"get" tags:"服务日志" summary:"获取服务日志列表"`
+ sysin.ServeLogListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*sysin.ServeLogListModel `json:"list" dc:"数据列表"`
+}
+
+// ExportReq 导出服务日志列表
+type ExportReq struct {
+ g.Meta `path:"/serveLog/export" method:"get" tags:"服务日志" summary:"导出服务日志列表"`
+ sysin.ServeLogListInp
+}
+
+type ExportRes struct{}
+
+// ViewReq 获取服务日志指定信息
+type ViewReq struct {
+ g.Meta `path:"/serveLog/view" method:"get" tags:"服务日志" summary:"获取服务日志指定信息"`
+ sysin.ServeLogViewInp
+}
+
+type ViewRes struct {
+ *sysin.ServeLogViewModel
+}
+
+// DeleteReq 删除服务日志
+type DeleteReq struct {
+ g.Meta `path:"/serveLog/delete" method:"post" tags:"服务日志" summary:"删除服务日志"`
+ sysin.ServeLogDeleteInp
+}
+
+type DeleteRes struct{}
diff --git a/server/api/admin/smslog/smslog.go b/server/api/admin/smslog/smslog.go
new file mode 100644
index 0000000..ed97c2d
--- /dev/null
+++ b/server/api/admin/smslog/smslog.go
@@ -0,0 +1,41 @@
+// Package smslog
+// @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 smslog
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+// ListReq 查询列表
+type ListReq struct {
+ g.Meta `path:"/smsLog/list" method:"get" tags:"短信" summary:"获取短信记录列表"`
+ sysin.SmsLogListInp
+}
+
+type ListRes struct {
+ List []*sysin.SmsLogListModel `json:"list" dc:"数据列表"`
+ form.PageRes
+}
+
+// ViewReq 获取指定信息
+type ViewReq struct {
+ g.Meta `path:"/smsLog/view" method:"get" tags:"短信" summary:"获取指定短信信息"`
+ sysin.SmsLogViewInp
+}
+
+type ViewRes struct {
+ *sysin.SmsLogViewModel
+}
+
+// DeleteReq 删除
+type DeleteReq struct {
+ g.Meta `path:"/smsLog/delete" method:"post" tags:"短信" summary:"删除短信记录"`
+ sysin.SmsLogDeleteInp
+}
+
+type DeleteRes struct{}
diff --git a/server/api/admin/task/task.go b/server/api/admin/task/task.go
new file mode 100644
index 0000000..1e87c88
--- /dev/null
+++ b/server/api/admin/task/task.go
@@ -0,0 +1,38 @@
+package task
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+type ListReq struct {
+ g.Meta `path:"/task/list" method:"get" tags:"任务管理" summary:"获取任务列表"`
+ sysin.TaskListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*sysin.TaskListModel `json:"list"`
+}
+type ViewReq struct {
+ g.Meta `path:"/task/view" method:"get" tags:"任务管理" summary:"获取任务详情"`
+ sysin.TaskViewInp
+}
+type ViewRes struct{ *sysin.TaskListModel }
+type EditReq struct {
+ g.Meta `path:"/task/edit" method:"post" tags:"任务管理" summary:"新增编辑任务"`
+ sysin.TaskEditInp
+}
+type EditRes struct {
+ Id uint64 `json:"id"`
+}
+type StatusReq struct {
+ g.Meta `path:"/task/status" method:"post" tags:"任务管理" summary:"任务发布下线"`
+ sysin.TaskStatusInp
+}
+type StatusRes struct{}
+type DeleteReq struct {
+ g.Meta `path:"/task/delete" method:"post" tags:"任务管理" summary:"删除任务"`
+ sysin.TaskDeleteInp
+}
+type DeleteRes struct{}
diff --git a/server/api/admin/taskhall/taskhall.go b/server/api/admin/taskhall/taskhall.go
new file mode 100644
index 0000000..32b3437
--- /dev/null
+++ b/server/api/admin/taskhall/taskhall.go
@@ -0,0 +1,36 @@
+package taskhall
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+type ListReq struct {
+ g.Meta `path:"/taskHall/list" method:"get" tags:"任务大厅" summary:"任务大厅列表"`
+ sysin.TaskHallListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*sysin.TaskHallListModel `json:"list"`
+}
+type ViewReq struct {
+ g.Meta `path:"/taskHall/view" method:"get" tags:"任务大厅" summary:"任务大厅详情"`
+ sysin.TaskHallViewInp
+}
+type ViewRes struct{ *sysin.TaskHallListModel }
+type EditReq struct {
+ g.Meta `path:"/taskHall/edit" method:"post" tags:"任务大厅" summary:"新增编辑任务大厅"`
+ sysin.TaskHallEditInp
+}
+type EditRes struct{}
+type StatusReq struct {
+ g.Meta `path:"/taskHall/status" method:"post" tags:"任务大厅" summary:"发布下线任务大厅"`
+ sysin.TaskHallStatusInp
+}
+type StatusRes struct{}
+type DeleteReq struct {
+ g.Meta `path:"/taskHall/delete" method:"post" tags:"任务大厅" summary:"删除任务大厅"`
+ sysin.TaskHallDeleteInp
+}
+type DeleteRes struct{}
diff --git a/server/api/admin/tasksubmission/tasksubmission.go b/server/api/admin/tasksubmission/tasksubmission.go
new file mode 100644
index 0000000..fbcfc94
--- /dev/null
+++ b/server/api/admin/tasksubmission/tasksubmission.go
@@ -0,0 +1,26 @@
+package tasksubmission
+
+import (
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+)
+
+type ListReq struct {
+ g.Meta `path:"/taskSubmission/list" method:"get" tags:"会员任务审核" summary:"获取会员任务提交"`
+ sysin.TaskSubmissionListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*sysin.TaskSubmissionListModel `json:"list"`
+}
+type ViewReq struct {
+ g.Meta `path:"/taskSubmission/view" method:"get" tags:"会员任务审核" summary:"获取任务提交详情"`
+ sysin.TaskSubmissionViewInp
+}
+type ViewRes struct{ *sysin.TaskSubmissionListModel }
+type ReviewReq struct {
+ g.Meta `path:"/taskSubmission/review" method:"post" tags:"会员任务审核" summary:"审核并结算会员任务"`
+ sysin.TaskSubmissionReviewInp
+}
+type ReviewRes struct{}
diff --git a/server/api/admin/testcategory/testcategory.go b/server/api/admin/testcategory/testcategory.go
new file mode 100644
index 0000000..7a8eca3
--- /dev/null
+++ b/server/api/admin/testcategory/testcategory.go
@@ -0,0 +1,69 @@
+// Package testcategory
+// @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 testcategory
+
+import (
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ListReq 查询测试分类列表
+type ListReq struct {
+ g.Meta `path:"/testCategory/list" method:"get" tags:"测试分类" summary:"获取测试分类列表"`
+ sysin.TestCategoryListInp
+}
+
+type ListRes struct {
+ form.PageRes
+ List []*sysin.TestCategoryListModel `json:"list" dc:"数据列表"`
+}
+
+// ViewReq 获取测试分类指定信息
+type ViewReq struct {
+ g.Meta `path:"/testCategory/view" method:"get" tags:"测试分类" summary:"获取测试分类指定信息"`
+ sysin.TestCategoryViewInp
+}
+
+type ViewRes struct {
+ *sysin.TestCategoryViewModel
+}
+
+// EditReq 修改/新增测试分类
+type EditReq struct {
+ g.Meta `path:"/testCategory/edit" method:"post" tags:"测试分类" summary:"修改/新增测试分类"`
+ sysin.TestCategoryEditInp
+}
+
+type EditRes struct{}
+
+// DeleteReq 删除测试分类
+type DeleteReq struct {
+ g.Meta `path:"/testCategory/delete" method:"post" tags:"测试分类" summary:"删除测试分类"`
+ sysin.TestCategoryDeleteInp
+}
+
+type DeleteRes struct{}
+
+// MaxSortReq 获取测试分类最大排序
+type MaxSortReq struct {
+ g.Meta `path:"/testCategory/maxSort" method:"get" tags:"测试分类" summary:"获取测试分类最大排序"`
+ sysin.TestCategoryMaxSortInp
+}
+
+type MaxSortRes struct {
+ *sysin.TestCategoryMaxSortModel
+}
+
+// StatusReq 更新测试分类状态
+type StatusReq struct {
+ g.Meta `path:"/testCategory/status" method:"post" tags:"测试分类" summary:"更新测试分类状态"`
+ sysin.TestCategoryStatusInp
+}
+
+type StatusRes struct{}
diff --git a/server/api/admin/tradeorder/tradeorder.go b/server/api/admin/tradeorder/tradeorder.go
new file mode 100644
index 0000000..a8fe652
--- /dev/null
+++ b/server/api/admin/tradeorder/tradeorder.go
@@ -0,0 +1,45 @@
+package tradeorder
+
+import (
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+type ListReq struct {
+ g.Meta `path:"/tradeOrder/list" method:"get" tags:"交易订单" summary:"交易订单列表"`
+ sysin.TradeOrderListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*sysin.TradeOrderListModel `json:"list"`
+}
+type ViewReq struct {
+ g.Meta `path:"/tradeOrder/view" method:"get" tags:"交易订单" summary:"交易订单详情"`
+ sysin.TradeOrderViewInp
+}
+type ViewRes struct{ *sysin.TradeOrderViewModel }
+type MatchProductsReq struct {
+ g.Meta `path:"/tradeOrder/matchProducts" method:"get" tags:"交易订单" summary:"获取可匹配商品"`
+ sysin.TradeOrderMatchProductListInp
+}
+type MatchProductsRes struct {
+ form.PageRes
+ List []*sysin.TradeOrderMatchProductModel `json:"list"`
+}
+type MatchReq struct {
+ g.Meta `path:"/tradeOrder/match" method:"post" tags:"交易订单" summary:"人工匹配订单商品"`
+ sysin.TradeOrderMatchInp
+}
+type MatchRes struct{}
+type ApplyReq struct {
+ g.Meta `path:"/tradeOrder/apply" method:"post" tags:"交易订单" summary:"提交订单人工处理审批"`
+ sysin.TradeOrderApplyInp
+}
+type ApplyRes struct{ *sysin.FinanceApprovalModel }
+type ExecuteReq struct {
+ g.Meta `path:"/tradeOrder/execute" method:"post" tags:"交易订单" summary:"执行已审批订单处理"`
+ sysin.TradeOrderExecuteInp
+}
+type ExecuteRes struct{}
diff --git a/server/api/admin/withdrawalorder/withdrawalorder.go b/server/api/admin/withdrawalorder/withdrawalorder.go
new file mode 100644
index 0000000..2302602
--- /dev/null
+++ b/server/api/admin/withdrawalorder/withdrawalorder.go
@@ -0,0 +1,39 @@
+package withdrawalorder
+
+import (
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+type ListReq struct {
+ g.Meta `path:"/withdrawalOrder/list" method:"get" tags:"提现管理" summary:"提现订单列表"`
+ sysin.WithdrawalOrderListInp
+}
+type ListRes struct {
+ form.PageRes
+ List []*sysin.WithdrawalOrderListModel `json:"list"`
+}
+type ViewReq struct {
+ g.Meta `path:"/withdrawalOrder/view" method:"get" tags:"提现管理" summary:"提现订单详情(仅脱敏账户)"`
+ sysin.WithdrawalOrderViewInp
+}
+type ViewRes struct {
+ *sysin.WithdrawalOrderListModel
+}
+type ReviewReq struct {
+ g.Meta `path:"/withdrawalOrder/review" method:"post" tags:"提现管理" summary:"提交提现审核"`
+ sysin.WithdrawalReviewInp
+}
+type ReviewRes struct{ *sysin.FinanceApprovalModel }
+type ExecuteReq struct {
+ g.Meta `path:"/withdrawalOrder/execute" method:"post" tags:"提现管理" summary:"执行已审批提现审核"`
+ sysin.FinanceExecuteInp
+}
+type ExecuteRes struct{}
+type CompleteReq struct {
+ g.Meta `path:"/withdrawalOrder/complete" method:"post" tags:"提现管理" summary:"登记提现付款结果"`
+ sysin.WithdrawalCompleteInp
+}
+type CompleteRes struct{}
diff --git a/server/api/api/member/member.go b/server/api/api/member/member.go
new file mode 100644
index 0000000..d335001
--- /dev/null
+++ b/server/api/api/member/member.go
@@ -0,0 +1,15 @@
+// =================================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package member
+
+import (
+ "context"
+
+ "hotgo/api/api/member/v1"
+)
+
+type IMemberV1 interface {
+ GetIdByCode(ctx context.Context, req *v1.GetIdByCodeReq) (res *v1.GetIdByCodeRes, err error)
+}
diff --git a/server/api/api/member/v1/member.go b/server/api/api/member/v1/member.go
new file mode 100644
index 0000000..0ed4bb6
--- /dev/null
+++ b/server/api/api/member/v1/member.go
@@ -0,0 +1,16 @@
+// Package member
+// @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 v1
+
+import "github.com/gogf/gf/v2/frame/g"
+
+// GetIdByCodeReq 通过邀请码获取用户ID
+type GetIdByCodeReq struct {
+ g.Meta `path:"/member/getIdByCode" method:"post" tags:"用户" summary:"通过邀请码获取用户ID"`
+ Code string `json:"code" dc:"邀请码"`
+}
+
+type GetIdByCodeRes struct{}
diff --git a/server/api/api/pay/pay.go b/server/api/api/pay/pay.go
new file mode 100644
index 0000000..654099c
--- /dev/null
+++ b/server/api/api/pay/pay.go
@@ -0,0 +1,17 @@
+// =================================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// =================================================================================
+
+package pay
+
+import (
+ "context"
+
+ "hotgo/api/api/pay/v1"
+)
+
+type IPayV1 interface {
+ NotifyAliPay(ctx context.Context, req *v1.NotifyAliPayReq) (res *v1.NotifyAliPayRes, err error)
+ NotifyWxPay(ctx context.Context, req *v1.NotifyWxPayReq) (res *v1.NotifyWxPayRes, err error)
+ NotifyQQPay(ctx context.Context, req *v1.NotifyQQPayReq) (res *v1.NotifyQQPayRes, err error)
+}
diff --git a/server/api/api/pay/v1/notify.go b/server/api/api/pay/v1/notify.go
new file mode 100644
index 0000000..8ac343b
--- /dev/null
+++ b/server/api/api/pay/v1/notify.go
@@ -0,0 +1,41 @@
+// 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 v1
+
+import (
+ "hotgo/internal/model/input/payin"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// NotifyAliPayReq 支付宝回调
+type NotifyAliPayReq struct {
+ g.Meta `path:"/pay/notify/alipay" method:"post" tags:"支付异步通知" summary:"支付宝回调"`
+}
+
+type NotifyAliPayRes struct {
+ g.Meta `mime:"text/html" type:"string" example:"
"`
+ *payin.PayNotifyModel
+}
+
+// NotifyWxPayReq 微信支付回调
+type NotifyWxPayReq struct {
+ g.Meta `path:"/pay/notify/wxpay" method:"post" tags:"支付异步通知" summary:"微信支付回调"`
+}
+
+type NotifyWxPayRes struct {
+ *payin.PayNotifyModel
+}
+
+// NotifyQQPayReq QQ支付回调
+type NotifyQQPayReq struct {
+ g.Meta `path:"/pay/notify/qqpay" method:"post" tags:"支付异步通知" summary:"QQ支付回调"`
+}
+
+type NotifyQQPayRes struct {
+ g.Meta `mime:"text/xml" type:"string"`
+ *payin.PayNotifyModel
+}
diff --git a/server/api/home/base/site.go b/server/api/home/base/site.go
new file mode 100644
index 0000000..d70f5ba
--- /dev/null
+++ b/server/api/home/base/site.go
@@ -0,0 +1,16 @@
+// Package base
+// @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 base
+
+import "github.com/gogf/gf/v2/frame/g"
+
+type SiteIndexReq struct {
+ g.Meta `path:"/" method:"get" summary:"首页" tags:"首页"`
+}
+
+type SiteIndexRes struct {
+ g.Meta `mime:"text/html" type:"string" example:"
+ 这是您通过HotGo后台发送的测试邮件。当你收到这封邮件的时候,说明已经联调成功了,恭喜你!
+
+ `,
+ })
+ return
+}
+
+// SendBindEms 发送换绑邮件
+func (c *cEms) SendBindEms(ctx context.Context, _ *common.SendBindEmsReq) (res *common.SendBindEmsRes, err error) {
+ var (
+ memberId = contexts.GetUserId(ctx)
+ models *entity.AdminMember
+ )
+
+ if memberId <= 0 {
+ err = gerror.New("用户身份异常,请重新登录!")
+ return
+ }
+
+ if err = dao.AdminMember.Ctx(ctx).Fields(dao.AdminMember.Columns().Email).Where(dao.AdminMember.Columns().Id, memberId).Scan(&models); err != nil {
+ return
+ }
+
+ if models == nil {
+ err = gerror.New("用户信息不存在")
+ return
+ }
+
+ if models.Email == "" {
+ err = gerror.New("未绑定邮箱无需发送")
+ return
+ }
+
+ err = service.SysEmsLog().Send(ctx, &sysin.SendEmsInp{
+ Event: consts.EmsTemplateBind,
+ Email: models.Email,
+ })
+ return
+}
diff --git a/server/internal/controller/admin/common/site.go b/server/internal/controller/admin/common/site.go
new file mode 100644
index 0000000..34296a6
--- /dev/null
+++ b/server/internal/controller/admin/common/site.go
@@ -0,0 +1,155 @@
+// 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"
+ "hotgo/api/admin/common"
+ "hotgo/internal/consts"
+ "hotgo/internal/library/captcha"
+ "hotgo/internal/library/token"
+ "hotgo/internal/service"
+ "hotgo/utility/validate"
+
+ "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/gconv"
+ "github.com/gogf/gf/v2/util/gmode"
+)
+
+var Site = cSite{}
+
+type cSite struct{}
+
+// Ping ping
+func (c *cSite) Ping(_ context.Context, _ *common.SitePingReq) (res *common.SitePingRes, err error) {
+ return
+}
+
+// Config 获取配置
+func (c *cSite) Config(ctx context.Context, _ *common.SiteConfigReq) (res *common.SiteConfigRes, err error) {
+ request := ghttp.RequestFromCtx(ctx)
+ res = &common.SiteConfigRes{
+ Version: consts.VersionApp,
+ WsAddr: c.getWsAddr(ctx, request),
+ Domain: c.getDomain(ctx, request),
+ Mode: gmode.Mode(),
+ }
+ return
+}
+
+func (c *cSite) getWsAddr(ctx context.Context, request *ghttp.Request) string {
+ // 如果是本地IP访问,则认为是调试模式,走实际请求地址,否则走配置中的地址
+ // 尝试读取hostname,兼容本地运行模式
+ ip := ghttp.RequestFromCtx(ctx).GetHeader("hostname")
+ if len(ip) == 0 {
+ ip = ghttp.RequestFromCtx(ctx).GetHost()
+ }
+
+ if validate.IsLocalIPAddr(ip) {
+ return "ws://" + ip + ":" + gstr.StrEx(request.Host, ":") + g.Cfg().MustGet(ctx, "router.websocket.prefix").String()
+ }
+
+ basic, err := service.SysConfig().GetBasic(ctx)
+ if err != nil || basic == nil {
+ return ""
+ }
+ return basic.WsAddr
+}
+
+func (c *cSite) getDomain(ctx context.Context, request *ghttp.Request) string {
+ // 如果是本地IP访问,则认为是调试模式,走实际请求地址,否则走配置中的地址
+ // 尝试读取hostname,兼容本地运行模式
+ ip := ghttp.RequestFromCtx(ctx).GetHeader("hostname")
+ if len(ip) == 0 {
+ ip = ghttp.RequestFromCtx(ctx).GetHost()
+ }
+
+ if validate.IsLocalIPAddr(ip) {
+ return "http://" + ip + ":" + gstr.StrEx(request.Host, ":")
+ }
+
+ basic, err := service.SysConfig().GetBasic(ctx)
+ if err != nil || basic == nil {
+ return ""
+ }
+ return basic.Domain
+}
+
+// LoginConfig 登录配置
+func (c *cSite) LoginConfig(ctx context.Context, _ *common.SiteLoginConfigReq) (res *common.SiteLoginConfigRes, err error) {
+ res = new(common.SiteLoginConfigRes)
+ login, err := service.SysConfig().GetLogin(ctx)
+ if err != nil {
+ return
+ }
+
+ res.LoginConfig = login
+ res.I18nSwitch = g.Cfg().MustGet(ctx, "system.i18n.switch", true).Bool()
+ res.DefaultLanguage = g.Cfg().MustGet(ctx, "system.i18n.defaultLanguage", consts.SysDefaultLanguage).String()
+ res.ProjectName = "企业办公管理系统"
+ return
+}
+
+// Captcha 登录验证码
+func (c *cSite) Captcha(ctx context.Context, _ *common.LoginCaptchaReq) (res *common.LoginCaptchaRes, err error) {
+ loginConf, err := service.SysConfig().GetLogin(ctx)
+ if err != nil {
+ return
+ }
+ cid, base64 := captcha.Generate(ctx, loginConf.CaptchaType)
+ res = &common.LoginCaptchaRes{Cid: cid, Base64: base64}
+ return
+}
+
+// Register 账号注册
+func (c *cSite) Register(ctx context.Context, req *common.RegisterReq) (res *common.RegisterRes, err error) {
+ err = service.AdminSite().Register(ctx, &req.RegisterInp)
+ return
+}
+
+// AccountLogin 账号登录
+func (c *cSite) AccountLogin(ctx context.Context, req *common.AccountLoginReq) (res *common.AccountLoginRes, err error) {
+ login, err := service.SysConfig().GetLogin(ctx)
+ if err != nil {
+ return
+ }
+
+ if !req.IsLock && login.CaptchaSwitch == consts.StatusEnabled {
+ // 校验 验证码
+ if !captcha.Verify(req.Cid, req.Code) {
+ err = gerror.New("验证码错误")
+ return
+ }
+ }
+
+ model, err := service.AdminSite().AccountLogin(ctx, &req.AccountLoginInp)
+ if err != nil {
+ return
+ }
+
+ err = gconv.Scan(model, &res)
+ return
+}
+
+// MobileLogin 手机号登录
+func (c *cSite) MobileLogin(ctx context.Context, req *common.MobileLoginReq) (res *common.MobileLoginRes, err error) {
+ model, err := service.AdminSite().MobileLogin(ctx, &req.MobileLoginInp)
+ if err != nil {
+ return
+ }
+
+ err = gconv.Scan(model, &res)
+ return
+}
+
+// Logout 注销登录
+func (c *cSite) Logout(ctx context.Context, _ *common.LoginLogoutReq) (res *common.LoginLogoutRes, err error) {
+ err = token.Logout(ghttp.RequestFromCtx(ctx))
+ return
+}
diff --git a/server/internal/controller/admin/common/sms.go b/server/internal/controller/admin/common/sms.go
new file mode 100644
index 0000000..c1f5c6a
--- /dev/null
+++ b/server/internal/controller/admin/common/sms.go
@@ -0,0 +1,67 @@
+// 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"
+ "github.com/gogf/gf/v2/errors/gerror"
+ "hotgo/api/admin/common"
+ "hotgo/internal/consts"
+ "hotgo/internal/dao"
+ "hotgo/internal/library/contexts"
+ "hotgo/internal/model/entity"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var Sms = new(cSms)
+
+type cSms struct{}
+
+// SendTest 发送测试短信
+func (c *cSms) SendTest(ctx context.Context, req *common.SendTestSmsReq) (res *common.SendTestSmsRes, err error) {
+ err = service.SysSmsLog().SendCode(ctx, &req.SendCodeInp)
+ return
+}
+
+// SendBindSms 发送换绑短信
+func (c *cSms) SendBindSms(ctx context.Context, _ *common.SendBindSmsReq) (res *common.SendBindSmsRes, err error) {
+ var (
+ memberId = contexts.GetUserId(ctx)
+ models *entity.AdminMember
+ )
+
+ if memberId <= 0 {
+ err = gerror.New("用户身份异常,请重新登录!")
+ return
+ }
+
+ if err = dao.AdminMember.Ctx(ctx).Fields(dao.AdminMember.Columns().Mobile).Where(dao.AdminMember.Columns().Id, memberId).Scan(&models); err != nil {
+ return
+ }
+
+ if models == nil {
+ err = gerror.New("用户信息不存在")
+ return
+ }
+
+ if models.Mobile == "" {
+ err = gerror.New("未绑定手机号无需发送")
+ return
+ }
+
+ err = service.SysSmsLog().SendCode(ctx, &sysin.SendCodeInp{
+ Event: consts.SmsTemplateBind,
+ Mobile: models.Mobile,
+ })
+ return
+}
+
+// SendSms 发送短信
+func (c *cSms) SendSms(ctx context.Context, req *common.SendSmsReq) (res *common.SendSmsRes, err error) {
+ err = service.SysSmsLog().SendCode(ctx, &req.SendCodeInp)
+ return
+}
diff --git a/server/internal/controller/admin/common/upload.go b/server/internal/controller/admin/common/upload.go
new file mode 100644
index 0000000..82f00aa
--- /dev/null
+++ b/server/internal/controller/admin/common/upload.go
@@ -0,0 +1,66 @@
+// 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"
+ "github.com/gogf/gf/v2/errors/gerror"
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/api/admin/common"
+ "hotgo/internal/library/storager"
+ "hotgo/internal/service"
+ "hotgo/utility/validate"
+)
+
+var Upload = new(cUpload)
+
+type cUpload struct{}
+
+// UploadFile 上传文件
+func (c *cUpload) UploadFile(ctx context.Context, _ *common.UploadFileReq) (res common.UploadFileRes, err error) {
+ r := g.RequestFromCtx(ctx)
+ uploadType := r.Header.Get("uploadType")
+ if uploadType != "default" && !validate.InSlice(storager.KindSlice, uploadType) {
+ err = gerror.New("上传类型是无效的")
+ return
+ }
+
+ file := r.GetUploadFile("file")
+ if file == nil {
+ err = gerror.New("没有找到上传的文件")
+ return
+ }
+ return service.CommonUpload().UploadFile(ctx, uploadType, file)
+}
+
+// CheckMultipart 检查文件分片
+func (c *cUpload) CheckMultipart(ctx context.Context, req *common.CheckMultipartReq) (res *common.CheckMultipartRes, err error) {
+ data, err := service.CommonUpload().CheckMultipart(ctx, &req.CheckMultipartInp)
+ if err != nil {
+ return nil, err
+ }
+ res = new(common.CheckMultipartRes)
+ res.CheckMultipartModel = data
+ return
+}
+
+// UploadPart 上传分片
+func (c *cUpload) UploadPart(ctx context.Context, req *common.UploadPartReq) (res *common.UploadPartRes, err error) {
+ data, err := service.CommonUpload().UploadPart(ctx, &req.UploadPartInp)
+ if err != nil {
+ return nil, err
+ }
+ res = new(common.UploadPartRes)
+ res.UploadPartModel = data
+ return
+}
+
+// ImageTransferStorage 图片链接转存
+func (c *cUpload) ImageTransferStorage(ctx context.Context, req *common.ImageTransferStorageReq) (res *common.ImageTransferStorageRes, err error) {
+ res = new(common.ImageTransferStorageRes)
+ res.ImageTransferStorageModel, err = service.CommonUpload().ImageTransferStorage(ctx, &req.ImageTransferStorageInp)
+ return
+}
diff --git a/server/internal/controller/admin/common/wechat.go b/server/internal/controller/admin/common/wechat.go
new file mode 100644
index 0000000..4e658d3
--- /dev/null
+++ b/server/internal/controller/admin/common/wechat.go
@@ -0,0 +1,28 @@
+// 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"
+ "hotgo/api/admin/common"
+ "hotgo/internal/service"
+)
+
+var (
+ Wechat = cWechat{}
+)
+
+type cWechat struct{}
+
+func (c *cWechat) Authorize(ctx context.Context, req *common.WechatAuthorizeReq) (res *common.WechatAuthorizeRes, err error) {
+ _, err = service.CommonWechat().Authorize(ctx, &req.WechatAuthorizeInp)
+ return
+}
+
+func (c *cWechat) AuthorizeCall(ctx context.Context, req *common.WechatAuthorizeCallReq) (res *common.WechatAuthorizeCallRes, err error) {
+ _, err = service.CommonWechat().AuthorizeCall(ctx, &req.WechatAuthorizeCallInp)
+ return
+}
diff --git a/server/internal/controller/admin/pay/refund.go b/server/internal/controller/admin/pay/refund.go
new file mode 100644
index 0000000..1facbfe
--- /dev/null
+++ b/server/internal/controller/admin/pay/refund.go
@@ -0,0 +1,39 @@
+// 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"
+ "hotgo/api/admin/pay"
+ "hotgo/internal/service"
+)
+
+var (
+ Refund = cRefund{}
+)
+
+type cRefund struct{}
+
+// List 查看交易退款列表
+func (c *cRefund) List(ctx context.Context, req *pay.RefundListReq) (res *pay.RefundListRes, err error) {
+ list, totalCount, err := service.PayRefund().List(ctx, &req.PayRefundListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(pay.RefundListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Export 导出交易退款列表
+func (c *cRefund) Export(ctx context.Context, req *pay.RefundExportReq) (res *pay.RefundExportRes, err error) {
+ err = service.PayRefund().Export(ctx, &req.PayRefundListInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/addons.go b/server/internal/controller/admin/sys/addons.go
new file mode 100644
index 0000000..73ba447
--- /dev/null
+++ b/server/internal/controller/admin/sys/addons.go
@@ -0,0 +1,61 @@
+// 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/api/admin/addons"
+ "hotgo/internal/service"
+)
+
+var (
+ Addons = cAddons{}
+)
+
+type cAddons struct{}
+
+// List 查看列表
+func (c *cAddons) List(ctx context.Context, req *addons.ListReq) (res *addons.ListRes, err error) {
+ list, totalCount, err := service.SysAddons().List(ctx, &req.AddonsListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(addons.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Build 生成预览
+func (c *cAddons) Build(ctx context.Context, req *addons.BuildReq) (res *addons.BuildRes, err error) {
+ err = service.SysAddons().Build(ctx, &req.AddonsBuildInp)
+ return
+}
+
+// Install 安装模块
+func (c *cAddons) Install(ctx context.Context, req *addons.InstallReq) (res *addons.InstallRes, err error) {
+ if err = service.SysAddons().Install(ctx, &req.AddonsInstallInp); err != nil {
+ return
+ }
+ return
+}
+
+// Upgrade 更新模块
+func (c *cAddons) Upgrade(ctx context.Context, req *addons.UpgradeReq) (res *addons.UpgradeRes, err error) {
+ if err = service.SysAddons().Upgrade(ctx, &req.AddonsUpgradeInp); err != nil {
+ return
+ }
+ return
+}
+
+// UnInstall 卸载模块
+func (c *cAddons) UnInstall(ctx context.Context, req *addons.UnInstallReq) (res *addons.UnInstallRes, err error) {
+ if err = service.SysAddons().UnInstall(ctx, &req.AddonsUnInstallInp); err != nil {
+ return
+ }
+ return
+}
diff --git a/server/internal/controller/admin/sys/app_member.go b/server/internal/controller/admin/sys/app_member.go
new file mode 100644
index 0000000..d5e7d7c
--- /dev/null
+++ b/server/internal/controller/admin/sys/app_member.go
@@ -0,0 +1,157 @@
+package sys
+
+import (
+ "context"
+ "hotgo/api/admin/appmember"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var AppMember = cAppMember{}
+
+type cAppMember struct{}
+
+func (c *cAppMember) List(ctx context.Context, req *appmember.ListReq) (res *appmember.ListRes, err error) {
+ list, total, err := service.SysAppMember().List(ctx, &req.AppMemberListInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*sysin.AppMemberListModel{}
+ }
+ res = new(appmember.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cAppMember) View(ctx context.Context, req *appmember.ViewReq) (res *appmember.ViewRes, err error) {
+ data, err := service.SysAppMember().View(ctx, &req.AppMemberViewInp)
+ if err != nil {
+ return
+ }
+ res = &appmember.ViewRes{AppMemberViewModel: data}
+ return
+}
+func (c *cAppMember) Edit(ctx context.Context, req *appmember.EditReq) (*appmember.EditRes, error) {
+ return &appmember.EditRes{}, service.SysAppMember().Edit(ctx, &req.AppMemberEditInp)
+}
+func (c *cAppMember) Delete(ctx context.Context, req *appmember.DeleteReq) (*appmember.DeleteRes, error) {
+ return &appmember.DeleteRes{}, service.SysAppMember().Delete(ctx, &req.AppMemberDeleteInp)
+}
+func (c *cAppMember) AutoDispatch(ctx context.Context, req *appmember.AutoDispatchReq) (*appmember.AutoDispatchRes, error) {
+ return &appmember.AutoDispatchRes{}, service.SysAppMember().AutoDispatch(ctx, &req.AppMemberAutoDispatchInp)
+}
+func (c *cAppMember) Category(ctx context.Context, req *appmember.CategoryReq) (*appmember.CategoryRes, error) {
+ return &appmember.CategoryRes{}, service.SysAppMember().Category(ctx, &req.AppMemberCategoryInp)
+}
+func (c *cAppMember) PaymentList(ctx context.Context, req *appmember.PaymentListReq) (*appmember.PaymentListRes, error) {
+ list, err := service.SysAppMember().PaymentList(ctx, &req.AppMemberPaymentListInp)
+ if list == nil {
+ list = []*sysin.AppMemberPaymentModel{}
+ }
+ return &appmember.PaymentListRes{List: list}, err
+}
+func (c *cAppMember) PaymentEdit(ctx context.Context, req *appmember.PaymentEditReq) (*appmember.PaymentEditRes, error) {
+ return &appmember.PaymentEditRes{}, service.SysAppMember().PaymentEdit(ctx, &req.AppMemberPaymentEditInp)
+}
+func (c *cAppMember) PaymentDelete(ctx context.Context, req *appmember.PaymentDeleteReq) (*appmember.PaymentDeleteRes, error) {
+ return &appmember.PaymentDeleteRes{}, service.SysAppMember().PaymentDelete(ctx, &req.AppMemberPaymentDeleteInp)
+}
+func (c *cAppMember) AddressList(ctx context.Context, req *appmember.AddressListReq) (*appmember.AddressListRes, error) {
+ list, err := service.SysAppMember().AddressList(ctx, &req.AppMemberAddressListInp)
+ if list == nil {
+ list = []*sysin.AppMemberAddressModel{}
+ }
+ return &appmember.AddressListRes{List: list}, err
+}
+func (c *cAppMember) AddressEdit(ctx context.Context, req *appmember.AddressEditReq) (*appmember.AddressEditRes, error) {
+ return &appmember.AddressEditRes{}, service.SysAppMember().AddressEdit(ctx, &req.AppMemberAddressEditInp)
+}
+func (c *cAppMember) AddressDelete(ctx context.Context, req *appmember.AddressDeleteReq) (*appmember.AddressDeleteRes, error) {
+ return &appmember.AddressDeleteRes{}, service.SysAppMember().AddressDelete(ctx, &req.AppMemberAddressDeleteInp)
+}
+func (c *cAppMember) Sensitive(ctx context.Context, req *appmember.SensitiveReq) (res *appmember.SensitiveRes, err error) {
+ data, err := service.SysAppMember().Sensitive(ctx, &req.AppMemberSensitiveInp)
+ if err != nil {
+ return
+ }
+ return &appmember.SensitiveRes{AppMemberSensitiveModel: data}, nil
+}
+func (c *cAppMember) Team(ctx context.Context, req *appmember.TeamReq) (res *appmember.TeamRes, err error) {
+ list, total, err := service.SysAppMember().Team(ctx, &req.AppMemberTeamInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*sysin.AppMemberTeamModel{}
+ }
+ res = new(appmember.TeamRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cAppMember) StatusRequest(ctx context.Context, req *appmember.StatusRequestReq) (res *appmember.StatusRequestRes, err error) {
+ data, err := service.SysAppMember().StatusRequest(ctx, &req.AppMemberStatusRequestInp)
+ if err != nil {
+ return
+ }
+ return &appmember.StatusRequestRes{AppMemberApprovalModel: data}, nil
+}
+func (c *cAppMember) StatusExecute(ctx context.Context, req *appmember.StatusExecuteReq) (*appmember.StatusExecuteRes, error) {
+ return &appmember.StatusExecuteRes{}, service.SysAppMember().StatusExecute(ctx, &req.AppMemberStatusExecuteInp)
+}
+func (c *cAppMember) WalletList(ctx context.Context, req *appmember.WalletListReq) (res *appmember.WalletListRes, err error) {
+ list, total, err := service.SysAppMember().WalletList(ctx, &req.WalletAdjustmentListInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*sysin.WalletAdjustmentListModel{}
+ }
+ res = new(appmember.WalletListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cAppMember) LedgerList(ctx context.Context, req *appmember.LedgerListReq) (res *appmember.LedgerListRes, err error) {
+ list, total, err := service.SysAppMember().LedgerList(ctx, &req.WalletLedgerListInp)
+ if err != nil {
+ return nil, err
+ }
+ if list == nil {
+ list = []*sysin.WalletLedgerListModel{}
+ }
+ res = new(appmember.LedgerListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cAppMember) WalletRequest(ctx context.Context, req *appmember.WalletRequestReq) (res *appmember.WalletRequestRes, err error) {
+ data, err := service.SysAppMember().WalletRequest(ctx, &req.WalletAdjustmentRequestInp)
+ if err != nil {
+ return
+ }
+ return &appmember.WalletRequestRes{AppMemberApprovalModel: data}, nil
+}
+func (c *cAppMember) WalletExecute(ctx context.Context, req *appmember.WalletExecuteReq) (*appmember.WalletExecuteRes, error) {
+ return &appmember.WalletExecuteRes{}, service.SysAppMember().WalletExecute(ctx, &req.WalletAdjustmentExecuteInp)
+}
+func (c *cAppMember) NoticeList(ctx context.Context, req *appmember.NoticeListReq) (res *appmember.NoticeListRes, err error) {
+ list, total, err := service.SysAppMember().NoticeList(ctx, &req.MemberNoticeListInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*sysin.MemberNoticeListModel{}
+ }
+ res = new(appmember.NoticeListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cAppMember) NoticeEdit(ctx context.Context, req *appmember.NoticeEditReq) (*appmember.NoticeEditRes, error) {
+ return &appmember.NoticeEditRes{}, service.SysAppMember().NoticeEdit(ctx, &req.MemberNoticeEditInp)
+}
+func (c *cAppMember) NoticeRevoke(ctx context.Context, req *appmember.NoticeRevokeReq) (*appmember.NoticeRevokeRes, error) {
+ return &appmember.NoticeRevokeRes{}, service.SysAppMember().NoticeRevoke(ctx, &req.MemberNoticeRevokeInp)
+}
diff --git a/server/internal/controller/admin/sys/approval.go b/server/internal/controller/admin/sys/approval.go
new file mode 100644
index 0000000..4d67ba9
--- /dev/null
+++ b/server/internal/controller/admin/sys/approval.go
@@ -0,0 +1,64 @@
+package sys
+
+import (
+ "context"
+ "hotgo/api/admin/approval"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var Approval = cApproval{}
+
+type cApproval struct{}
+
+func (c *cApproval) List(ctx context.Context, req *approval.ListReq) (res *approval.ListRes, err error) {
+ list, totalCount, err := service.SysApproval().List(ctx, &req.ApprovalListInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*sysin.ApprovalListModel{}
+ }
+ res = new(approval.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+func (c *cApproval) View(ctx context.Context, req *approval.ViewReq) (res *approval.ViewRes, err error) {
+ data, err := service.SysApproval().View(ctx, &req.ApprovalViewInp)
+ if err != nil {
+ return nil, err
+ }
+ res = &approval.ViewRes{ApprovalViewModel: data}
+ return
+}
+
+func (c *cApproval) Create(ctx context.Context, req *approval.CreateReq) (res *approval.CreateRes, err error) {
+ data, err := service.SysApproval().Create(ctx, &req.ApprovalCreateInp)
+ if err != nil {
+ return nil, err
+ }
+ res = &approval.CreateRes{ApprovalCreateModel: data}
+ return
+}
+
+func (c *cApproval) Submit(ctx context.Context, req *approval.SubmitReq) (res *approval.SubmitRes, err error) {
+ err = service.SysApproval().Submit(ctx, &req.ApprovalSubmitInp)
+ return
+}
+
+func (c *cApproval) Approve(ctx context.Context, req *approval.ApproveReq) (res *approval.ApproveRes, err error) {
+ err = service.SysApproval().Approve(ctx, &req.ApprovalDecisionInp)
+ return
+}
+
+func (c *cApproval) Reject(ctx context.Context, req *approval.RejectReq) (res *approval.RejectRes, err error) {
+ err = service.SysApproval().Reject(ctx, &req.ApprovalDecisionInp)
+ return
+}
+
+func (c *cApproval) Cancel(ctx context.Context, req *approval.CancelReq) (res *approval.CancelRes, err error) {
+ err = service.SysApproval().Cancel(ctx, &req.ApprovalCancelInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/attachment.go b/server/internal/controller/admin/sys/attachment.go
new file mode 100644
index 0000000..9380887
--- /dev/null
+++ b/server/internal/controller/admin/sys/attachment.go
@@ -0,0 +1,55 @@
+// 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/api/admin/attachment"
+ "hotgo/internal/service"
+)
+
+var (
+ Attachment = cAttachment{}
+)
+
+type cAttachment struct{}
+
+// Delete 删除附件
+func (c *cAttachment) Delete(ctx context.Context, req *attachment.DeleteReq) (res *attachment.DeleteRes, err error) {
+ err = service.SysAttachment().Delete(ctx, &req.AttachmentDeleteInp)
+ return
+}
+
+// View 获取指定附件信息
+func (c *cAttachment) View(ctx context.Context, req *attachment.ViewReq) (res *attachment.ViewRes, err error) {
+ data, err := service.SysAttachment().View(ctx, &req.AttachmentViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(attachment.ViewRes)
+ res.AttachmentViewModel = data
+ return
+}
+
+// List 查看附件列表
+func (c *cAttachment) List(ctx context.Context, req *attachment.ListReq) (res *attachment.ListRes, err error) {
+ list, totalCount, err := service.SysAttachment().List(ctx, &req.AttachmentListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(attachment.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// ClearKind 清空上传类型
+func (c *cAttachment) ClearKind(ctx context.Context, req *attachment.ClearKindReq) (res *attachment.ClearKindRes, err error) {
+ err = service.SysAttachment().ClearKind(ctx, &req.AttachmentClearKindInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/biz_audit.go b/server/internal/controller/admin/sys/biz_audit.go
new file mode 100644
index 0000000..94c29c1
--- /dev/null
+++ b/server/internal/controller/admin/sys/biz_audit.go
@@ -0,0 +1,34 @@
+package sys
+
+import (
+ "context"
+ "hotgo/api/admin/bizaudit"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var BizAudit = cBizAudit{}
+
+type cBizAudit struct{}
+
+func (c *cBizAudit) List(ctx context.Context, req *bizaudit.ListReq) (res *bizaudit.ListRes, err error) {
+ list, totalCount, err := service.SysBizAudit().List(ctx, &req.BizAuditListInp)
+ if err != nil {
+ return nil, err
+ }
+ if list == nil {
+ list = []*sysin.BizAuditListModel{}
+ }
+ res = new(bizaudit.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+func (c *cBizAudit) View(ctx context.Context, req *bizaudit.ViewReq) (res *bizaudit.ViewRes, err error) {
+ data, err := service.SysBizAudit().View(ctx, &req.BizAuditViewInp)
+ if err != nil {
+ return nil, err
+ }
+ return &bizaudit.ViewRes{BizAuditViewModel: data}, nil
+}
diff --git a/server/internal/controller/admin/sys/blacklist.go b/server/internal/controller/admin/sys/blacklist.go
new file mode 100644
index 0000000..cac7c3d
--- /dev/null
+++ b/server/internal/controller/admin/sys/blacklist.go
@@ -0,0 +1,61 @@
+// 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/api/admin/blacklist"
+ "hotgo/internal/service"
+)
+
+var (
+ Blacklist = cBlacklist{}
+)
+
+type cBlacklist struct{}
+
+// Delete 删除
+func (c *cBlacklist) Delete(ctx context.Context, req *blacklist.DeleteReq) (res *blacklist.DeleteRes, err error) {
+ err = service.SysBlacklist().Delete(ctx, &req.BlacklistDeleteInp)
+ return
+}
+
+// Edit 更新
+func (c *cBlacklist) Edit(ctx context.Context, req *blacklist.EditReq) (res *blacklist.EditRes, err error) {
+ err = service.SysBlacklist().Edit(ctx, &req.BlacklistEditInp)
+ return
+}
+
+// View 获取指定信息
+func (c *cBlacklist) View(ctx context.Context, req *blacklist.ViewReq) (res *blacklist.ViewRes, err error) {
+ data, err := service.SysBlacklist().View(ctx, &req.BlacklistViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(blacklist.ViewRes)
+ res.BlacklistViewModel = data
+ return
+}
+
+// List 查看列表
+func (c *cBlacklist) List(ctx context.Context, req *blacklist.ListReq) (res *blacklist.ListRes, err error) {
+ list, totalCount, err := service.SysBlacklist().List(ctx, &req.BlacklistListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(blacklist.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Status 更新黑名单状态
+func (c *cBlacklist) Status(ctx context.Context, req *blacklist.StatusReq) (res *blacklist.StatusRes, err error) {
+ err = service.SysBlacklist().Status(ctx, &req.BlacklistStatusInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/config.go b/server/internal/controller/admin/sys/config.go
new file mode 100644
index 0000000..a831c80
--- /dev/null
+++ b/server/internal/controller/admin/sys/config.go
@@ -0,0 +1,53 @@
+// 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/api/admin/config"
+ "hotgo/internal/consts"
+ "hotgo/internal/model/input/form"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var (
+ Config = cConfig{}
+)
+
+type cConfig struct{}
+
+// GetConfig 获取指定分组的配置
+func (c *cConfig) GetConfig(ctx context.Context, req *config.GetReq) (res *config.GetRes, err error) {
+ res = new(config.GetRes)
+ res.GetConfigModel, err = service.SysConfig().GetConfigByGroup(ctx, &req.GetConfigInp)
+ 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
+}
+
+// TypeSelect 数据类型选项
+func (c *cConfig) TypeSelect(_ context.Context, _ *config.TypeSelectReq) (res config.TypeSelectRes, err error) {
+ for _, v := range consts.ConfigTypes {
+ res = append(res, form.Select{
+ Value: v,
+ Name: v,
+ Label: v,
+ })
+ }
+ return
+}
+
+// GetCash 获取提现的配置
+func (c *cConfig) GetCash(ctx context.Context, _ *config.GetCashReq) (res *config.GetCashRes, err error) {
+ res = new(config.GetCashRes)
+ res.GetConfigModel, err = service.SysConfig().GetConfigByGroup(ctx, &sysin.GetConfigInp{Group: "cash"})
+ return
+}
diff --git a/server/internal/controller/admin/sys/cron.go b/server/internal/controller/admin/sys/cron.go
new file mode 100644
index 0000000..e87e98b
--- /dev/null
+++ b/server/internal/controller/admin/sys/cron.go
@@ -0,0 +1,97 @@
+// 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"
+ "hotgo/api/admin/cron"
+ "hotgo/api/servmsg"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var (
+ Cron = cCron{}
+)
+
+type cCron struct{}
+
+// Delete 删除
+func (c *cCron) Delete(ctx context.Context, req *cron.DeleteReq) (res *cron.DeleteRes, err error) {
+ err = service.TCPServer().CronDelete(ctx, &servmsg.CronDeleteReq{CronDeleteInp: &req.CronDeleteInp})
+ return
+}
+
+// Edit 更新
+func (c *cCron) Edit(ctx context.Context, req *cron.EditReq) (res *cron.EditRes, err error) {
+ err = service.TCPServer().CronEdit(ctx, &servmsg.CronEditReq{CronEditInp: &req.CronEditInp})
+ return
+}
+
+// MaxSort 最大排序
+func (c *cCron) MaxSort(ctx context.Context, req *cron.MaxSortReq) (res *cron.MaxSortRes, err error) {
+ res = new(cron.MaxSortRes)
+ res.CronMaxSortModel, err = service.SysCron().MaxSort(ctx, &req.CronMaxSortInp)
+ return
+}
+
+// View 获取指定信息
+func (c *cCron) View(ctx context.Context, req *cron.ViewReq) (res *cron.ViewRes, err error) {
+ data, err := service.SysCron().View(ctx, &req.CronViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(cron.ViewRes)
+ res.CronViewModel = data
+ return
+}
+
+// List 查看列表
+func (c *cCron) List(ctx context.Context, req *cron.ListReq) (res *cron.ListRes, err error) {
+ list, totalCount, err := service.SysCron().List(ctx, &req.CronListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(cron.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Status 更新状态
+func (c *cCron) Status(ctx context.Context, req *cron.StatusReq) (res *cron.StatusRes, err error) {
+ if req.Id <= 0 {
+ return nil, gerror.New("定时任务ID不能为空")
+ }
+
+ err = service.TCPServer().CronStatus(ctx, &servmsg.CronStatusReq{CronStatusInp: &req.CronStatusInp})
+ return
+}
+
+// OnlineExec 在线执行
+func (c *cCron) OnlineExec(ctx context.Context, req *cron.OnlineExecReq) (res *cron.OnlineExecRes, err error) {
+ if req.Id <= 0 {
+ return nil, gerror.New("定时任务ID不能为空")
+ }
+
+ err = service.TCPServer().CronOnlineExec(ctx, &servmsg.CronOnlineExecReq{OnlineExecInp: &req.OnlineExecInp})
+ return
+}
+
+// DispatchLog 调度日志
+func (c *cCron) DispatchLog(ctx context.Context, req *cron.DispatchLogReq) (res *cron.DispatchLogRes, err error) {
+ if req.Id <= 0 {
+ return nil, gerror.New("定时任务ID不能为空")
+ }
+
+ res = new(cron.DispatchLogRes)
+ res.DispatchLogModel = new(sysin.DispatchLogModel)
+ res.Log, err = service.TCPServer().DispatchLog(ctx, &servmsg.CronDispatchLogReq{DispatchLogInp: &req.DispatchLogInp})
+ return
+}
diff --git a/server/internal/controller/admin/sys/cron_group.go b/server/internal/controller/admin/sys/cron_group.go
new file mode 100644
index 0000000..8362c95
--- /dev/null
+++ b/server/internal/controller/admin/sys/cron_group.go
@@ -0,0 +1,80 @@
+// 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/api/admin/cron"
+ "hotgo/internal/service"
+)
+
+var (
+ CronGroup = cCronGroup{}
+)
+
+type cCronGroup struct{}
+
+// Delete 删除
+func (c *cCronGroup) Delete(ctx context.Context, req *cron.GroupDeleteReq) (res *cron.GroupDeleteRes, err error) {
+ err = service.SysCronGroup().Delete(ctx, &req.CronGroupDeleteInp)
+ return
+}
+
+// Edit 更新
+func (c *cCronGroup) Edit(ctx context.Context, req *cron.GroupEditReq) (res *cron.GroupEditRes, err error) {
+ err = service.SysCronGroup().Edit(ctx, &req.CronGroupEditInp)
+ return
+}
+
+// MaxSort 最大排序
+func (c *cCronGroup) MaxSort(ctx context.Context, req *cron.GroupMaxSortReq) (res *cron.GroupMaxSortRes, err error) {
+ res = new(cron.GroupMaxSortRes)
+ res.CronGroupMaxSortModel, err = service.SysCronGroup().MaxSort(ctx, &req.CronGroupMaxSortInp)
+ return
+}
+
+// View 获取指定信息
+func (c *cCronGroup) View(ctx context.Context, req *cron.GroupViewReq) (res *cron.GroupViewRes, err error) {
+ data, err := service.SysCronGroup().View(ctx, &req.CronGroupViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(cron.GroupViewRes)
+ res.CronGroupViewModel = data
+ return
+}
+
+// List 查看列表
+func (c *cCronGroup) List(ctx context.Context, req *cron.GroupListReq) (res *cron.GroupListRes, err error) {
+ list, totalCount, err := service.SysCronGroup().List(ctx, &req.CronGroupListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(cron.GroupListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Status 更新状态
+func (c *cCronGroup) Status(ctx context.Context, req *cron.GroupStatusReq) (res *cron.GroupStatusRes, err error) {
+ err = service.SysCronGroup().Status(ctx, &req.CronGroupStatusInp)
+ return
+}
+
+// Select 选项
+func (c *cCronGroup) Select(ctx context.Context, req *cron.GroupSelectReq) (res *cron.GroupSelectRes, err error) {
+ data, err := service.SysCronGroup().Select(ctx, &req.CronGroupSelectInp)
+ if err != nil {
+ return
+ }
+
+ res = new(cron.GroupSelectRes)
+ res.CronGroupSelectModel = data
+ return
+}
diff --git a/server/internal/controller/admin/sys/curd_demo.go b/server/internal/controller/admin/sys/curd_demo.go
new file mode 100644
index 0000000..ace44e3
--- /dev/null
+++ b/server/internal/controller/admin/sys/curd_demo.go
@@ -0,0 +1,91 @@
+// 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"
+ "hotgo/api/admin/curddemo"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var (
+ CurdDemo = cCurdDemo{}
+)
+
+type cCurdDemo struct{}
+
+// List 查看CURD列表列表
+func (c *cCurdDemo) List(ctx context.Context, req *curddemo.ListReq) (res *curddemo.ListRes, err error) {
+ list, totalCount, err := service.SysCurdDemo().List(ctx, &req.CurdDemoListInp)
+ if err != nil {
+ return
+ }
+
+ if list == nil {
+ list = []*sysin.CurdDemoListModel{}
+ }
+
+ res = new(curddemo.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Export 导出CURD列表列表
+func (c *cCurdDemo) Export(ctx context.Context, req *curddemo.ExportReq) (res *curddemo.ExportRes, err error) {
+ err = service.SysCurdDemo().Export(ctx, &req.CurdDemoListInp)
+ return
+}
+
+// Edit 更新CURD列表
+func (c *cCurdDemo) Edit(ctx context.Context, req *curddemo.EditReq) (res *curddemo.EditRes, err error) {
+ err = service.SysCurdDemo().Edit(ctx, &req.CurdDemoEditInp)
+ return
+}
+
+// MaxSort 获取CURD列表最大排序
+func (c *cCurdDemo) MaxSort(ctx context.Context, req *curddemo.MaxSortReq) (res *curddemo.MaxSortRes, err error) {
+ data, err := service.SysCurdDemo().MaxSort(ctx, &req.CurdDemoMaxSortInp)
+ if err != nil {
+ return
+ }
+
+ res = new(curddemo.MaxSortRes)
+ res.CurdDemoMaxSortModel = data
+ return
+}
+
+// View 获取指定CURD列表信息
+func (c *cCurdDemo) View(ctx context.Context, req *curddemo.ViewReq) (res *curddemo.ViewRes, err error) {
+ data, err := service.SysCurdDemo().View(ctx, &req.CurdDemoViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(curddemo.ViewRes)
+ res.CurdDemoViewModel = data
+ return
+}
+
+// Delete 删除CURD列表
+func (c *cCurdDemo) Delete(ctx context.Context, req *curddemo.DeleteReq) (res *curddemo.DeleteRes, err error) {
+ err = service.SysCurdDemo().Delete(ctx, &req.CurdDemoDeleteInp)
+ return
+}
+
+// Status 更新CURD列表状态
+func (c *cCurdDemo) Status(ctx context.Context, req *curddemo.StatusReq) (res *curddemo.StatusRes, err error) {
+ err = service.SysCurdDemo().Status(ctx, &req.CurdDemoStatusInp)
+ return
+}
+
+// Switch 更新CURD列表开关状态
+func (c *cCurdDemo) Switch(ctx context.Context, req *curddemo.SwitchReq) (res *curddemo.SwitchRes, err error) {
+ err = service.SysCurdDemo().Switch(ctx, &req.CurdDemoSwitchInp)
+ return
+}
\ No newline at end of file
diff --git a/server/internal/controller/admin/sys/customer_service.go b/server/internal/controller/admin/sys/customer_service.go
new file mode 100644
index 0000000..17b8eed
--- /dev/null
+++ b/server/internal/controller/admin/sys/customer_service.go
@@ -0,0 +1,40 @@
+package sys
+
+import (
+ "context"
+
+ "hotgo/api/admin/customerservice"
+ "hotgo/internal/model/entity"
+ "hotgo/internal/service"
+)
+
+var CustomerService = cCustomerService{}
+
+type cCustomerService struct{}
+
+func (c *cCustomerService) List(ctx context.Context, req *customerservice.ListReq) (res *customerservice.ListRes, err error) {
+ list, total, err := service.SysCustomerService().List(ctx, &req.CustomerServiceListInp)
+ if err != nil {
+ return nil, err
+ }
+ if list == nil {
+ list = []*entity.CustomerService{}
+ }
+ res = new(customerservice.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cCustomerService) View(ctx context.Context, req *customerservice.ViewReq) (*customerservice.ViewRes, error) {
+ v, err := service.SysCustomerService().View(ctx, &req.CustomerServiceViewInp)
+ return &customerservice.ViewRes{CustomerService: v}, err
+}
+func (c *cCustomerService) Edit(ctx context.Context, req *customerservice.EditReq) (*customerservice.EditRes, error) {
+ return &customerservice.EditRes{}, service.SysCustomerService().Edit(ctx, &req.CustomerServiceEditInp)
+}
+func (c *cCustomerService) Status(ctx context.Context, req *customerservice.StatusReq) (*customerservice.StatusRes, error) {
+ return &customerservice.StatusRes{}, service.SysCustomerService().Status(ctx, &req.CustomerServiceStatusInp)
+}
+func (c *cCustomerService) Delete(ctx context.Context, req *customerservice.DeleteReq) (*customerservice.DeleteRes, error) {
+ return &customerservice.DeleteRes{}, service.SysCustomerService().Delete(ctx, &req.CustomerServiceDeleteInp)
+}
diff --git a/server/internal/controller/admin/sys/dict_data.go b/server/internal/controller/admin/sys/dict_data.go
new file mode 100644
index 0000000..1e067da
--- /dev/null
+++ b/server/internal/controller/admin/sys/dict_data.go
@@ -0,0 +1,68 @@
+// 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/api/admin/dict"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var (
+ DictData = cDictData{}
+)
+
+type cDictData struct{}
+
+// Delete 删除
+func (c *cDictData) Delete(ctx context.Context, req *dict.DataDeleteReq) (res *dict.DataDeleteRes, err error) {
+ err = service.SysDictData().Delete(ctx, &req.DictDataDeleteInp)
+ return
+}
+
+// Edit 更新
+func (c *cDictData) Edit(ctx context.Context, req *dict.DataEditReq) (res *dict.DataEditRes, err error) {
+ err = service.SysDictData().Edit(ctx, &req.DictDataEditInp)
+ return
+}
+
+// List 查看列表
+func (c *cDictData) List(ctx context.Context, req *dict.DataListReq) (res *dict.DataListRes, err error) {
+ list, totalCount, err := service.SysDictData().List(ctx, &req.DictDataListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(dict.DataListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Select 指定选项
+func (c *cDictData) Select(ctx context.Context, req *dict.DataSelectReq) (res dict.DataSelectRes, err error) {
+ list, err := service.SysDictData().Select(ctx, &req.DataSelectInp)
+ if err != nil {
+ return
+ }
+
+ res = dict.DataSelectRes(list)
+ return
+}
+
+// Selects 多个选项
+func (c *cDictData) Selects(ctx context.Context, req *dict.DataSelectsReq) (res dict.DataSelectsRes, err error) {
+ res = make(dict.DataSelectsRes)
+ for _, v := range req.Types {
+ option, err := service.SysDictData().Select(ctx, &sysin.DataSelectInp{Type: v})
+ if err != nil {
+ return nil, err
+ }
+ res[v] = option
+ }
+ return
+}
diff --git a/server/internal/controller/admin/sys/dict_type.go b/server/internal/controller/admin/sys/dict_type.go
new file mode 100644
index 0000000..ededd0a
--- /dev/null
+++ b/server/internal/controller/admin/sys/dict_type.go
@@ -0,0 +1,37 @@
+// 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/api/admin/dict"
+ "hotgo/internal/service"
+)
+
+var (
+ DictType = cDictType{}
+)
+
+type cDictType struct{}
+
+// Tree 树
+func (c *cDictType) Tree(ctx context.Context, _ *dict.TypeTreeReq) (res *dict.TypeTreeRes, err error) {
+ res = new(dict.TypeTreeRes)
+ res.List, err = service.SysDictType().Tree(ctx)
+ return
+}
+
+// Delete 删除
+func (c *cDictType) Delete(ctx context.Context, req *dict.TypeDeleteReq) (res *dict.TypeDeleteRes, err error) {
+ err = service.SysDictType().Delete(ctx, &req.DictTypeDeleteInp)
+ return
+}
+
+// Edit 更新
+func (c *cDictType) Edit(ctx context.Context, req *dict.TypeEditReq) (res *dict.TypeEditRes, err error) {
+ err = service.SysDictType().Edit(ctx, &req.DictTypeEditInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/ems_log.go b/server/internal/controller/admin/sys/ems_log.go
new file mode 100644
index 0000000..0bea28e
--- /dev/null
+++ b/server/internal/controller/admin/sys/ems_log.go
@@ -0,0 +1,61 @@
+// 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/api/admin/emslog"
+ "hotgo/internal/service"
+)
+
+var (
+ EmsLog = cEmsLog{}
+)
+
+type cEmsLog struct{}
+
+// Delete 删除
+func (c *cEmsLog) Delete(ctx context.Context, req *emslog.DeleteReq) (res *emslog.DeleteRes, err error) {
+ err = service.SysEmsLog().Delete(ctx, &req.EmsLogDeleteInp)
+ return
+}
+
+// Edit 更新
+func (c *cEmsLog) Edit(ctx context.Context, req *emslog.EditReq) (res *emslog.EditRes, err error) {
+ err = service.SysEmsLog().Edit(ctx, &req.EmsLogEditInp)
+ return
+}
+
+// View 获取指定信息
+func (c *cEmsLog) View(ctx context.Context, req *emslog.ViewReq) (res *emslog.ViewRes, err error) {
+ data, err := service.SysEmsLog().View(ctx, &req.EmsLogViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(emslog.ViewRes)
+ res.EmsLogViewModel = data
+ return
+}
+
+// List 查看列表
+func (c *cEmsLog) List(ctx context.Context, req *emslog.ListReq) (res *emslog.ListRes, err error) {
+ list, totalCount, err := service.SysEmsLog().List(ctx, &req.EmsLogListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(emslog.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Status 更新状态
+func (c *cEmsLog) Status(ctx context.Context, req *emslog.StatusReq) (res *emslog.StatusRes, err error) {
+ err = service.SysEmsLog().Status(ctx, &req.EmsLogStatusInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/gen_codes.go b/server/internal/controller/admin/sys/gen_codes.go
new file mode 100644
index 0000000..44a4631
--- /dev/null
+++ b/server/internal/controller/admin/sys/gen_codes.go
@@ -0,0 +1,137 @@
+// 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/api/admin/gencodes"
+ "hotgo/internal/service"
+)
+
+var (
+ GenCodes = cGenCodes{}
+)
+
+type cGenCodes struct{}
+
+// Delete 删除
+func (c *cGenCodes) Delete(ctx context.Context, req *gencodes.DeleteReq) (res *gencodes.DeleteRes, err error) {
+ err = service.SysGenCodes().Delete(ctx, &req.GenCodesDeleteInp)
+ return
+}
+
+// Edit 更新
+func (c *cGenCodes) Edit(ctx context.Context, req *gencodes.EditReq) (res *gencodes.EditRes, err error) {
+ data, err := service.SysGenCodes().Edit(ctx, &req.GenCodesEditInp)
+ if err != nil {
+ return
+ }
+
+ res = new(gencodes.EditRes)
+ res.GenCodesEditModel = data
+ return
+}
+
+// MaxSort 最大排序
+func (c *cGenCodes) MaxSort(ctx context.Context, req *gencodes.MaxSortReq) (res *gencodes.MaxSortRes, err error) {
+ res = new(gencodes.MaxSortRes)
+ res.GenCodesMaxSortModel, err = service.SysGenCodes().MaxSort(ctx, &req.GenCodesMaxSortInp)
+ return
+}
+
+// View 获取指定信息
+func (c *cGenCodes) View(ctx context.Context, req *gencodes.ViewReq) (res *gencodes.ViewRes, err error) {
+ data, err := service.SysGenCodes().View(ctx, &req.GenCodesViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(gencodes.ViewRes)
+ res.GenCodesViewModel = data
+ return
+}
+
+// List 查看列表
+func (c *cGenCodes) List(ctx context.Context, req *gencodes.ListReq) (res *gencodes.ListRes, err error) {
+ list, totalCount, err := service.SysGenCodes().List(ctx, &req.GenCodesListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(gencodes.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Status 更新状态
+func (c *cGenCodes) Status(ctx context.Context, req *gencodes.StatusReq) (res *gencodes.StatusRes, err error) {
+ err = service.SysGenCodes().Status(ctx, &req.GenCodesStatusInp)
+ return
+}
+
+// Selects 获取指定信息
+func (c *cGenCodes) Selects(ctx context.Context, req *gencodes.SelectsReq) (res *gencodes.SelectsRes, err error) {
+ data, err := service.SysGenCodes().Selects(ctx, &req.GenCodesSelectsInp)
+ if err != nil {
+ return
+ }
+
+ res = new(gencodes.SelectsRes)
+ res.GenCodesSelectsModel = data
+ return
+}
+
+// TableSelect 数据库表选项
+func (c *cGenCodes) TableSelect(ctx context.Context, req *gencodes.TableSelectReq) (res *gencodes.TableSelectRes, err error) {
+ data, err := service.SysGenCodes().TableSelect(ctx, &req.GenCodesTableSelectInp)
+ if err != nil {
+ return
+ }
+
+ res = (*gencodes.TableSelectRes)(&data)
+ return
+}
+
+// ColumnSelect 表字段选项
+func (c *cGenCodes) ColumnSelect(ctx context.Context, req *gencodes.ColumnSelectReq) (res *gencodes.ColumnSelectRes, err error) {
+ data, err := service.SysGenCodes().ColumnSelect(ctx, &req.GenCodesColumnSelectInp)
+ if err != nil {
+ return
+ }
+
+ res = (*gencodes.ColumnSelectRes)(&data)
+ return
+}
+
+// ColumnList 表字段列表
+func (c *cGenCodes) ColumnList(ctx context.Context, req *gencodes.ColumnListReq) (res *gencodes.ColumnListRes, err error) {
+ data, err := service.SysGenCodes().ColumnList(ctx, &req.GenCodesColumnListInp)
+ if err != nil {
+ return
+ }
+
+ res = (*gencodes.ColumnListRes)(&data)
+ return
+}
+
+// Preview 生成预览
+func (c *cGenCodes) Preview(ctx context.Context, req *gencodes.PreviewReq) (res *gencodes.PreviewRes, err error) {
+ data, err := service.SysGenCodes().Preview(ctx, &req.GenCodesPreviewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(gencodes.PreviewRes)
+ res.GenCodesPreviewModel = data
+ return
+}
+
+// Build 生成预览
+func (c *cGenCodes) Build(ctx context.Context, req *gencodes.BuildReq) (res *gencodes.BuildRes, err error) {
+ err = service.SysGenCodes().Build(ctx, &req.GenCodesBuildInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/log.go b/server/internal/controller/admin/sys/log.go
new file mode 100644
index 0000000..192a5a5
--- /dev/null
+++ b/server/internal/controller/admin/sys/log.go
@@ -0,0 +1,56 @@
+// 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"
+ "hotgo/api/admin/log"
+ "hotgo/internal/service"
+)
+
+// Log 日志
+var Log = sLog{}
+
+type sLog struct{}
+
+// Clear 清空日志
+func (c *sLog) Clear(ctx context.Context, _ *log.ClearReq) (res *log.ClearRes, err error) {
+ err = gerror.New("暂时考虑到安全问题,请到数据库清空")
+ return
+}
+
+// Export 导出
+func (c *sLog) Export(ctx context.Context, req *log.ExportReq) (res *log.ExportRes, err error) {
+ err = service.SysLog().Export(ctx, &req.LogListInp)
+ return
+}
+
+// List 获取访问日志列表
+func (c *sLog) List(ctx context.Context, req *log.ListReq) (res *log.ListRes, err error) {
+ list, totalCount, err := service.SysLog().List(ctx, &req.LogListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(log.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// View 获取指定信息
+func (c *sLog) View(ctx context.Context, req *log.ViewReq) (res *log.ViewRes, err error) {
+ res = new(log.ViewRes)
+ res.LogViewModel, err = service.SysLog().View(ctx, &req.LogViewInp)
+ return
+}
+
+// Delete 删除
+func (c *sLog) Delete(ctx context.Context, req *log.DeleteReq) (res *log.DeleteRes, err error) {
+ err = service.SysLog().Delete(ctx, &req.LogDeleteInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/login_log.go b/server/internal/controller/admin/sys/login_log.go
new file mode 100644
index 0000000..6123c58
--- /dev/null
+++ b/server/internal/controller/admin/sys/login_log.go
@@ -0,0 +1,45 @@
+// 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.1.1
+// @AutoGenerate Date 2023-01-19 16:57:33
+package sys
+
+import (
+ "context"
+ "hotgo/api/admin/loginlog"
+ "hotgo/internal/service"
+)
+
+var (
+ LoginLog = cLoginLog{}
+)
+
+type cLoginLog struct{}
+
+// List 查看登录日志列表
+func (c *cLoginLog) List(ctx context.Context, req *loginlog.ListReq) (res *loginlog.ListRes, err error) {
+ list, totalCount, err := service.SysLoginLog().List(ctx, &req.LoginLogListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(loginlog.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Export 导出登录日志列表
+func (c *cLoginLog) Export(ctx context.Context, req *loginlog.ExportReq) (res *loginlog.ExportRes, err error) {
+ err = service.SysLoginLog().Export(ctx, &req.LoginLogListInp)
+ return
+}
+
+// Delete 删除登录日志
+func (c *cLoginLog) Delete(ctx context.Context, req *loginlog.DeleteReq) (res *loginlog.DeleteRes, err error) {
+ err = service.SysLoginLog().Delete(ctx, &req.LoginLogDeleteInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/member_level.go b/server/internal/controller/admin/sys/member_level.go
new file mode 100644
index 0000000..151d785
--- /dev/null
+++ b/server/internal/controller/admin/sys/member_level.go
@@ -0,0 +1,71 @@
+package sys
+
+import (
+ "context"
+ "hotgo/api/admin/memberlevel"
+ "hotgo/internal/model/entity"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var MemberLevel = cMemberLevel{}
+
+type cMemberLevel struct{}
+
+func (c *cMemberLevel) List(ctx context.Context, req *memberlevel.ListReq) (res *memberlevel.ListRes, err error) {
+ list, total, err := service.SysMemberLevel().List(ctx, &req.MemberLevelListInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*sysin.MemberLevelListModel{}
+ }
+ res = new(memberlevel.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cMemberLevel) View(ctx context.Context, req *memberlevel.ViewReq) (res *memberlevel.ViewRes, err error) {
+ v, err := service.SysMemberLevel().View(ctx, &req.MemberLevelViewInp)
+ if err != nil {
+ return
+ }
+ return &memberlevel.ViewRes{MemberLevelViewModel: v}, nil
+}
+func (c *cMemberLevel) Save(ctx context.Context, req *memberlevel.SaveReq) (res *memberlevel.SaveRes, err error) {
+ id, vid, err := service.SysMemberLevel().Save(ctx, &req.MemberLevelSaveInp)
+ return &memberlevel.SaveRes{Id: id, VersionId: vid}, err
+}
+func (c *cMemberLevel) Submit(ctx context.Context, req *memberlevel.SubmitReq) (res *memberlevel.SubmitRes, err error) {
+ v, err := service.SysMemberLevel().Submit(ctx, &req.MemberLevelSubmitInp)
+ if err != nil {
+ return
+ }
+ return &memberlevel.SubmitRes{MemberLevelApprovalModel: v}, nil
+}
+func (c *cMemberLevel) Publish(ctx context.Context, req *memberlevel.PublishReq) (*memberlevel.PublishRes, error) {
+ return &memberlevel.PublishRes{}, service.SysMemberLevel().Publish(ctx, &req.MemberLevelPublishInp)
+}
+func (c *cMemberLevel) Rollback(ctx context.Context, req *memberlevel.RollbackReq) (*memberlevel.RollbackRes, error) {
+ id, err := service.SysMemberLevel().Rollback(ctx, &req.MemberLevelRollbackInp)
+ return &memberlevel.RollbackRes{VersionId: id}, err
+}
+func (c *cMemberLevel) History(ctx context.Context, req *memberlevel.HistoryReq) (res *memberlevel.HistoryRes, err error) {
+ list, total, err := service.SysMemberLevel().History(ctx, &req.MemberLevelHistoryInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*entity.AppMemberLevelVersion{}
+ }
+ res = new(memberlevel.HistoryRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cMemberLevel) Status(ctx context.Context, req *memberlevel.StatusReq) (*memberlevel.StatusRes, error) {
+ return &memberlevel.StatusRes{}, service.SysMemberLevel().Status(ctx, &req.MemberLevelStatusInp)
+}
+func (c *cMemberLevel) Delete(ctx context.Context, req *memberlevel.DeleteReq) (*memberlevel.DeleteRes, error) {
+ return &memberlevel.DeleteRes{}, service.SysMemberLevel().Delete(ctx, &req.MemberLevelDeleteInp)
+}
diff --git a/server/internal/controller/admin/sys/normal_tree_demo.go b/server/internal/controller/admin/sys/normal_tree_demo.go
new file mode 100644
index 0000000..7348d87
--- /dev/null
+++ b/server/internal/controller/admin/sys/normal_tree_demo.go
@@ -0,0 +1,89 @@
+// 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/api/admin/normaltreedemo"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var (
+ NormalTreeDemo = cNormalTreeDemo{}
+)
+
+type cNormalTreeDemo struct{}
+
+// List 查看普通树表列表
+func (c *cNormalTreeDemo) List(ctx context.Context, req *normaltreedemo.ListReq) (res *normaltreedemo.ListRes, err error) {
+ list, totalCount, err := service.SysNormalTreeDemo().List(ctx, &req.NormalTreeDemoListInp)
+ if err != nil {
+ return
+ }
+
+ if list == nil {
+ list = []*sysin.NormalTreeDemoListModel{}
+ }
+
+ res = new(normaltreedemo.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Edit 更新普通树表
+func (c *cNormalTreeDemo) Edit(ctx context.Context, req *normaltreedemo.EditReq) (res *normaltreedemo.EditRes, err error) {
+ err = service.SysNormalTreeDemo().Edit(ctx, &req.NormalTreeDemoEditInp)
+ return
+}
+
+// MaxSort 获取普通树表最大排序
+func (c *cNormalTreeDemo) MaxSort(ctx context.Context, req *normaltreedemo.MaxSortReq) (res *normaltreedemo.MaxSortRes, err error) {
+ data, err := service.SysNormalTreeDemo().MaxSort(ctx, &req.NormalTreeDemoMaxSortInp)
+ if err != nil {
+ return
+ }
+
+ res = new(normaltreedemo.MaxSortRes)
+ res.NormalTreeDemoMaxSortModel = data
+ return
+}
+
+// View 获取指定普通树表信息
+func (c *cNormalTreeDemo) View(ctx context.Context, req *normaltreedemo.ViewReq) (res *normaltreedemo.ViewRes, err error) {
+ data, err := service.SysNormalTreeDemo().View(ctx, &req.NormalTreeDemoViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(normaltreedemo.ViewRes)
+ res.NormalTreeDemoViewModel = data
+ return
+}
+
+// Delete 删除普通树表
+func (c *cNormalTreeDemo) Delete(ctx context.Context, req *normaltreedemo.DeleteReq) (res *normaltreedemo.DeleteRes, err error) {
+ err = service.SysNormalTreeDemo().Delete(ctx, &req.NormalTreeDemoDeleteInp)
+ return
+}
+
+// TreeOption 获取普通树表关系树选项
+func (c *cNormalTreeDemo) TreeOption(ctx context.Context, req *normaltreedemo.TreeOptionReq) (res *normaltreedemo.TreeOptionRes, err error) {
+ data, err := service.SysNormalTreeDemo().TreeOption(ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ if len(data) > 0 {
+ res = (*normaltreedemo.TreeOptionRes)(&data)
+ } else {
+ temp := make(normaltreedemo.TreeOptionRes, 0)
+ res = &temp
+ }
+ return
+}
diff --git a/server/internal/controller/admin/sys/option_tree_demo.go b/server/internal/controller/admin/sys/option_tree_demo.go
new file mode 100644
index 0000000..5ec4a1c
--- /dev/null
+++ b/server/internal/controller/admin/sys/option_tree_demo.go
@@ -0,0 +1,89 @@
+// 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/api/admin/optiontreedemo"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var (
+ OptionTreeDemo = cOptionTreeDemo{}
+)
+
+type cOptionTreeDemo struct{}
+
+// List 查看选项树表列表
+func (c *cOptionTreeDemo) List(ctx context.Context, req *optiontreedemo.ListReq) (res *optiontreedemo.ListRes, err error) {
+ list, totalCount, err := service.SysOptionTreeDemo().List(ctx, &req.OptionTreeDemoListInp)
+ if err != nil {
+ return
+ }
+
+ if list == nil {
+ list = []*sysin.OptionTreeDemoListModel{}
+ }
+
+ res = new(optiontreedemo.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Edit 更新选项树表
+func (c *cOptionTreeDemo) Edit(ctx context.Context, req *optiontreedemo.EditReq) (res *optiontreedemo.EditRes, err error) {
+ err = service.SysOptionTreeDemo().Edit(ctx, &req.OptionTreeDemoEditInp)
+ return
+}
+
+// MaxSort 获取选项树表最大排序
+func (c *cOptionTreeDemo) MaxSort(ctx context.Context, req *optiontreedemo.MaxSortReq) (res *optiontreedemo.MaxSortRes, err error) {
+ data, err := service.SysOptionTreeDemo().MaxSort(ctx, &req.OptionTreeDemoMaxSortInp)
+ if err != nil {
+ return
+ }
+
+ res = new(optiontreedemo.MaxSortRes)
+ res.OptionTreeDemoMaxSortModel = data
+ return
+}
+
+// View 获取指定选项树表信息
+func (c *cOptionTreeDemo) View(ctx context.Context, req *optiontreedemo.ViewReq) (res *optiontreedemo.ViewRes, err error) {
+ data, err := service.SysOptionTreeDemo().View(ctx, &req.OptionTreeDemoViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(optiontreedemo.ViewRes)
+ res.OptionTreeDemoViewModel = data
+ return
+}
+
+// Delete 删除选项树表
+func (c *cOptionTreeDemo) Delete(ctx context.Context, req *optiontreedemo.DeleteReq) (res *optiontreedemo.DeleteRes, err error) {
+ err = service.SysOptionTreeDemo().Delete(ctx, &req.OptionTreeDemoDeleteInp)
+ return
+}
+
+// TreeOption 获取选项树表关系树选项
+func (c *cOptionTreeDemo) TreeOption(ctx context.Context, req *optiontreedemo.TreeOptionReq) (res *optiontreedemo.TreeOptionRes, err error) {
+ data, err := service.SysOptionTreeDemo().TreeOption(ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ if len(data) > 0 {
+ res = (*optiontreedemo.TreeOptionRes)(&data)
+ } else {
+ temp := make(optiontreedemo.TreeOptionRes, 0)
+ res = &temp
+ }
+ return
+}
\ No newline at end of file
diff --git a/server/internal/controller/admin/sys/portal.go b/server/internal/controller/admin/sys/portal.go
new file mode 100644
index 0000000..8c387ff
--- /dev/null
+++ b/server/internal/controller/admin/sys/portal.go
@@ -0,0 +1,168 @@
+package sys
+
+import (
+ "context"
+ "hotgo/api/admin/portal"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var Portal = cPortal{}
+
+type cPortal struct{}
+
+func (c *cPortal) SiteConfigCurrent(ctx context.Context, req *portal.SiteConfigCurrentReq) (res *portal.SiteConfigCurrentRes, err error) {
+ data, err := service.SysPortal().SiteConfigCurrent(ctx, &req.SiteConfigCurrentInp)
+ if err != nil {
+ return
+ }
+ res = &portal.SiteConfigCurrentRes{SiteConfigCurrentModel: data}
+ return
+}
+func (c *cPortal) SiteConfigHistory(ctx context.Context, req *portal.SiteConfigHistoryReq) (res *portal.SiteConfigHistoryRes, err error) {
+ list, total, err := service.SysPortal().SiteConfigHistory(ctx, &req.SiteConfigHistoryInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*sysin.SiteConfigHistoryModel{}
+ }
+ res = new(portal.SiteConfigHistoryRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cPortal) SiteConfigSave(ctx context.Context, req *portal.SiteConfigSaveReq) (res *portal.SiteConfigSaveRes, err error) {
+ id, err := service.SysPortal().SiteConfigSave(ctx, &req.SiteConfigSaveInp)
+ if err == nil {
+ res = &portal.SiteConfigSaveRes{Id: id}
+ }
+ return
+}
+func (c *cPortal) SiteConfigSubmit(ctx context.Context, req *portal.SiteConfigSubmitReq) (res *portal.SiteConfigSubmitRes, err error) {
+ data, err := service.SysPortal().SiteConfigSubmit(ctx, &req.SiteConfigSubmitInp)
+ if err == nil {
+ res = &portal.SiteConfigSubmitRes{PortalApprovalModel: data}
+ }
+ return
+}
+func (c *cPortal) SiteConfigPublish(ctx context.Context, req *portal.SiteConfigPublishReq) (res *portal.SiteConfigPublishRes, err error) {
+ err = service.SysPortal().SiteConfigPublish(ctx, &req.SiteConfigPublishInp)
+ return
+}
+func (c *cPortal) SiteConfigRollback(ctx context.Context, req *portal.SiteConfigRollbackReq) (res *portal.SiteConfigRollbackRes, err error) {
+ id, err := service.SysPortal().SiteConfigRollback(ctx, &req.SiteConfigRollbackInp)
+ if err == nil {
+ res = &portal.SiteConfigRollbackRes{Id: id}
+ }
+ return
+}
+func (c *cPortal) ContentList(ctx context.Context, req *portal.ContentListReq) (res *portal.ContentListRes, err error) {
+ list, total, err := service.SysPortal().ContentList(ctx, &req.ContentListInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*sysin.ContentListModel{}
+ }
+ res = new(portal.ContentListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cPortal) ContentView(ctx context.Context, req *portal.ContentViewReq) (res *portal.ContentViewRes, err error) {
+ data, err := service.SysPortal().ContentView(ctx, &req.ContentViewInp)
+ if err == nil {
+ res = &portal.ContentViewRes{ContentViewModel: data}
+ }
+ return
+}
+func (c *cPortal) ContentEdit(ctx context.Context, req *portal.ContentEditReq) (res *portal.ContentEditRes, err error) {
+ id, err := service.SysPortal().ContentEdit(ctx, &req.ContentEditInp)
+ if err == nil {
+ res = &portal.ContentEditRes{Id: id}
+ }
+ return
+}
+func (c *cPortal) ContentDelete(ctx context.Context, req *portal.ContentDeleteReq) (res *portal.ContentDeleteRes, err error) {
+ err = service.SysPortal().ContentDelete(ctx, &req.ContentDeleteInp)
+ return
+}
+func (c *cPortal) ContentPublish(ctx context.Context, req *portal.ContentPublishReq) (res *portal.ContentPublishRes, err error) {
+ err = service.SysPortal().ContentPublish(ctx, &req.ContentPublishInp)
+ return
+}
+func (c *cPortal) ContentOffline(ctx context.Context, req *portal.ContentOfflineReq) (res *portal.ContentOfflineRes, err error) {
+ err = service.SysPortal().ContentOffline(ctx, &req.ContentOfflineInp)
+ return
+}
+func (c *cPortal) BannerList(ctx context.Context, req *portal.BannerListReq) (res *portal.BannerListRes, err error) {
+ list, total, err := service.SysPortal().BannerList(ctx, &req.BannerListInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*sysin.BannerListModel{}
+ }
+ res = new(portal.BannerListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cPortal) BannerView(ctx context.Context, req *portal.BannerViewReq) (res *portal.BannerViewRes, err error) {
+ data, err := service.SysPortal().BannerView(ctx, &req.BannerViewInp)
+ if err == nil {
+ res = &portal.BannerViewRes{Banner: data}
+ }
+ return
+}
+func (c *cPortal) BannerEdit(ctx context.Context, req *portal.BannerEditReq) (res *portal.BannerEditRes, err error) {
+ id, err := service.SysPortal().BannerEdit(ctx, &req.BannerEditInp)
+ if err == nil {
+ res = &portal.BannerEditRes{Id: id}
+ }
+ return
+}
+func (c *cPortal) BannerDelete(ctx context.Context, req *portal.BannerDeleteReq) (res *portal.BannerDeleteRes, err error) {
+ err = service.SysPortal().BannerDelete(ctx, &req.BannerDeleteInp)
+ return
+}
+func (c *cPortal) BannerStatus(ctx context.Context, req *portal.BannerStatusReq) (res *portal.BannerStatusRes, err error) {
+ err = service.SysPortal().BannerStatus(ctx, &req.BannerStatusInp)
+ return
+}
+func (c *cPortal) ManualProductList(ctx context.Context, req *portal.ManualProductListReq) (res *portal.ManualProductListRes, err error) {
+ list, total, err := service.SysPortal().ManualProductList(ctx, &req.ManualProductListInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*sysin.ManualProductListModel{}
+ }
+ res = new(portal.ManualProductListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cPortal) ManualProductView(ctx context.Context, req *portal.ManualProductViewReq) (res *portal.ManualProductViewRes, err error) {
+ data, err := service.SysPortal().ManualProductView(ctx, &req.ManualProductViewInp)
+ if err == nil {
+ res = &portal.ManualProductViewRes{ManualProductViewModel: data}
+ }
+ return
+}
+func (c *cPortal) ManualProductEdit(ctx context.Context, req *portal.ManualProductEditReq) (res *portal.ManualProductEditRes, err error) {
+ id, err := service.SysPortal().ManualProductEdit(ctx, &req.ManualProductEditInp)
+ if err == nil {
+ res = &portal.ManualProductEditRes{Id: id}
+ }
+ return
+}
+func (c *cPortal) ManualProductDelete(ctx context.Context, req *portal.ManualProductDeleteReq) (res *portal.ManualProductDeleteRes, err error) {
+ err = service.SysPortal().ManualProductDelete(ctx, &req.ManualProductDeleteInp)
+ return
+}
+func (c *cPortal) ManualProductStatus(ctx context.Context, req *portal.ManualProductStatusReq) (res *portal.ManualProductStatusRes, err error) {
+ err = service.SysPortal().ManualProductStatus(ctx, &req.ManualProductStatusInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/product.go b/server/internal/controller/admin/sys/product.go
new file mode 100644
index 0000000..c0bacdd
--- /dev/null
+++ b/server/internal/controller/admin/sys/product.go
@@ -0,0 +1,52 @@
+package sys
+
+import (
+ "context"
+ "hotgo/api/admin/product"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var Product = cProduct{}
+
+type cProduct struct{}
+
+func (c *cProduct) List(ctx context.Context, req *product.ListReq) (res *product.ListRes, err error) {
+ list, total, err := service.SysProduct().List(ctx, &req.ProductListInp)
+ if err != nil {
+ return nil, err
+ }
+ if list == nil {
+ list = []*sysin.ProductListModel{}
+ }
+ res = new(product.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cProduct) View(ctx context.Context, req *product.ViewReq) (res *product.ViewRes, err error) {
+ data, err := service.SysProduct().View(ctx, &req.ProductViewInp)
+ if err == nil {
+ res = &product.ViewRes{ProductListModel: data}
+ }
+ return res, err
+}
+func (c *cProduct) Edit(ctx context.Context, req *product.EditReq) (res *product.EditRes, err error) {
+ id, err := service.SysProduct().Edit(ctx, &req.ProductEditInp)
+ if err == nil {
+ res = &product.EditRes{Id: id}
+ }
+ return res, err
+}
+func (c *cProduct) Status(ctx context.Context, req *product.StatusReq) (res *product.StatusRes, err error) {
+ err = service.SysProduct().Status(ctx, &req.ProductStatusInp)
+ return
+}
+func (c *cProduct) Recommend(ctx context.Context, req *product.RecommendReq) (res *product.RecommendRes, err error) {
+ err = service.SysProduct().Recommend(ctx, &req.ProductRecommendInp)
+ return
+}
+func (c *cProduct) Delete(ctx context.Context, req *product.DeleteReq) (res *product.DeleteRes, err error) {
+ err = service.SysProduct().Delete(ctx, &req.ProductDeleteInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/provinces.go b/server/internal/controller/admin/sys/provinces.go
new file mode 100644
index 0000000..318a423
--- /dev/null
+++ b/server/internal/controller/admin/sys/provinces.go
@@ -0,0 +1,129 @@
+// 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/api/admin/provinces"
+ "hotgo/internal/library/location"
+ "hotgo/internal/service"
+)
+
+var (
+ Provinces = cProvinces{}
+)
+
+type cProvinces struct{}
+
+// Tree 关系树选项列表
+func (c *cProvinces) Tree(ctx context.Context, _ *provinces.TreeReq) (res *provinces.TreeRes, err error) {
+ res = new(provinces.TreeRes)
+ res.List, err = service.SysProvinces().Tree(ctx)
+ return
+}
+
+// Delete 删除
+func (c *cProvinces) Delete(ctx context.Context, req *provinces.DeleteReq) (res *provinces.DeleteRes, err error) {
+ err = service.SysProvinces().Delete(ctx, &req.ProvincesDeleteInp)
+ return
+}
+
+// Edit 更新
+func (c *cProvinces) Edit(ctx context.Context, req *provinces.EditReq) (res *provinces.EditRes, err error) {
+ err = service.SysProvinces().Edit(ctx, &req.ProvincesEditInp)
+ return
+}
+
+// MaxSort 最大排序
+func (c *cProvinces) MaxSort(ctx context.Context, req *provinces.MaxSortReq) (res *provinces.MaxSortRes, err error) {
+ data, err := service.SysProvinces().MaxSort(ctx, &req.ProvincesMaxSortInp)
+ if err != nil {
+ return
+ }
+
+ res = new(provinces.MaxSortRes)
+ res.ProvincesMaxSortModel = data
+ return
+}
+
+// View 获取指定信息
+func (c *cProvinces) View(ctx context.Context, req *provinces.ViewReq) (res *provinces.ViewRes, err error) {
+ data, err := service.SysProvinces().View(ctx, &req.ProvincesViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(provinces.ViewRes)
+ res.ProvincesViewModel = data
+ return
+}
+
+// List 查看列表
+func (c *cProvinces) List(ctx context.Context, req *provinces.ListReq) (res *provinces.ListRes, err error) {
+ list, totalCount, err := service.SysProvinces().List(ctx, &req.ProvincesListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(provinces.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Status 更新省市区状态
+func (c *cProvinces) Status(ctx context.Context, req *provinces.StatusReq) (res *provinces.StatusRes, err error) {
+ err = service.SysProvinces().Status(ctx, &req.ProvincesStatusInp)
+ return
+}
+
+// ChildrenList 获取省市区下级列表
+func (c *cProvinces) ChildrenList(ctx context.Context, req *provinces.ChildrenListReq) (res *provinces.ChildrenListRes, err error) {
+ list, totalCount, err := service.SysProvinces().ChildrenList(ctx, &req.ProvincesChildrenListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(provinces.ChildrenListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// UniqueId 地区ID是否唯一
+func (c *cProvinces) UniqueId(ctx context.Context, req *provinces.UniqueIdReq) (res *provinces.UniqueIdRes, err error) {
+ data, err := service.SysProvinces().UniqueId(ctx, &req.ProvincesUniqueIdInp)
+ if err != nil {
+ return
+ }
+
+ res = new(provinces.UniqueIdRes)
+ res.ProvincesUniqueIdModel = data
+ return
+}
+
+// Select 省市区选项
+func (c *cProvinces) Select(ctx context.Context, req *provinces.SelectReq) (res *provinces.SelectRes, err error) {
+ data, err := service.SysProvinces().Select(ctx, &req.ProvincesSelectInp)
+ if err != nil {
+ return
+ }
+
+ res = new(provinces.SelectRes)
+ res.ProvincesSelectModel = data
+ return
+}
+
+// CityLabel 省市区选项
+func (c *cProvinces) CityLabel(ctx context.Context, req *provinces.CityLabelReq) (res *provinces.CityLabelRes, err error) {
+ cityLabel, err := location.ParseSimpleRegion(ctx, req.Id, req.Spilt)
+ if err != nil {
+ return
+ }
+
+ res = (*provinces.CityLabelRes)(&cityLabel)
+ return
+}
diff --git a/server/internal/controller/admin/sys/recharge_order.go b/server/internal/controller/admin/sys/recharge_order.go
new file mode 100644
index 0000000..ff55c87
--- /dev/null
+++ b/server/internal/controller/admin/sys/recharge_order.go
@@ -0,0 +1,42 @@
+package sys
+
+import (
+ "context"
+
+ "hotgo/api/admin/rechargeorder"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var RechargeOrder = cRechargeOrder{}
+
+type cRechargeOrder struct{}
+
+func (c *cRechargeOrder) List(ctx context.Context, req *rechargeorder.ListReq) (res *rechargeorder.ListRes, err error) {
+ list, total, err := service.SysRechargeOrder().List(ctx, &req.RechargeOrderListInp)
+ if err != nil {
+ return nil, err
+ }
+ if list == nil {
+ list = []*sysin.RechargeOrderListModel{}
+ }
+ res = new(rechargeorder.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cRechargeOrder) Summary(ctx context.Context, req *rechargeorder.SummaryReq) (*rechargeorder.SummaryRes, error) {
+ v, err := service.SysRechargeOrder().Summary(ctx, &req.RechargeOrderListInp)
+ return &rechargeorder.SummaryRes{RechargeSummaryModel: v}, err
+}
+func (c *cRechargeOrder) View(ctx context.Context, req *rechargeorder.ViewReq) (*rechargeorder.ViewRes, error) {
+ v, err := service.SysRechargeOrder().View(ctx, &req.RechargeOrderViewInp)
+ return &rechargeorder.ViewRes{RechargeOrderListModel: v}, err
+}
+func (c *cRechargeOrder) Review(ctx context.Context, req *rechargeorder.ReviewReq) (*rechargeorder.ReviewRes, error) {
+ v, err := service.SysRechargeOrder().Review(ctx, &req.RechargeReviewInp)
+ return &rechargeorder.ReviewRes{FinanceApprovalModel: v}, err
+}
+func (c *cRechargeOrder) Execute(ctx context.Context, req *rechargeorder.ExecuteReq) (*rechargeorder.ExecuteRes, error) {
+ return &rechargeorder.ExecuteRes{}, service.SysRechargeOrder().Execute(ctx, &req.FinanceExecuteInp)
+}
diff --git a/server/internal/controller/admin/sys/serve_license.go b/server/internal/controller/admin/sys/serve_license.go
new file mode 100644
index 0000000..5dd94d3
--- /dev/null
+++ b/server/internal/controller/admin/sys/serve_license.go
@@ -0,0 +1,74 @@
+// 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"
+ "hotgo/api/admin/servelicense"
+ "hotgo/internal/service"
+)
+
+var (
+ ServeLicense = cServeLicense{}
+)
+
+type cServeLicense struct{}
+
+// List 查看服务授权许可列表
+func (c *cServeLicense) List(ctx context.Context, req *servelicense.ListReq) (res *servelicense.ListRes, err error) {
+ list, totalCount, err := service.SysServeLicense().List(ctx, &req.ServeLicenseListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(servelicense.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Export 导出服务授权许可列表
+func (c *cServeLicense) Export(ctx context.Context, req *servelicense.ExportReq) (res *servelicense.ExportRes, err error) {
+ err = service.SysServeLicense().Export(ctx, &req.ServeLicenseListInp)
+ return
+}
+
+// Edit 更新服务授权许可
+func (c *cServeLicense) Edit(ctx context.Context, req *servelicense.EditReq) (res *servelicense.EditRes, err error) {
+ err = service.SysServeLicense().Edit(ctx, &req.ServeLicenseEditInp)
+ return
+}
+
+// View 获取指定服务授权许可信息
+func (c *cServeLicense) View(ctx context.Context, req *servelicense.ViewReq) (res *servelicense.ViewRes, err error) {
+ data, err := service.SysServeLicense().View(ctx, &req.ServeLicenseViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(servelicense.ViewRes)
+ res.ServeLicenseViewModel = data
+ return
+}
+
+// Delete 删除服务授权许可
+func (c *cServeLicense) Delete(ctx context.Context, req *servelicense.DeleteReq) (res *servelicense.DeleteRes, err error) {
+ err = service.SysServeLicense().Delete(ctx, &req.ServeLicenseDeleteInp)
+ return
+}
+
+// Status 更新服务授权许可状态
+func (c *cServeLicense) Status(ctx context.Context, req *servelicense.StatusReq) (res *servelicense.StatusRes, err error) {
+ err = service.SysServeLicense().Status(ctx, &req.ServeLicenseStatusInp)
+ return
+}
+
+// AssignRouter 分配服务授权许可路由
+func (c *cServeLicense) AssignRouter(ctx context.Context, req *servelicense.AssignRouterReq) (res *servelicense.AssignRouterRes, err error) {
+ err = service.SysServeLicense().AssignRouter(ctx, &req.ServeLicenseAssignRouterInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/serve_log.go b/server/internal/controller/admin/sys/serve_log.go
new file mode 100644
index 0000000..b3ca4cf
--- /dev/null
+++ b/server/internal/controller/admin/sys/serve_log.go
@@ -0,0 +1,55 @@
+// 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/api/admin/servelog"
+ "hotgo/internal/service"
+)
+
+var (
+ ServeLog = cServeLog{}
+)
+
+type cServeLog struct{}
+
+// List 查看服务日志列表
+func (c *cServeLog) List(ctx context.Context, req *servelog.ListReq) (res *servelog.ListRes, err error) {
+ list, totalCount, err := service.SysServeLog().List(ctx, &req.ServeLogListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(servelog.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Export 导出服务日志列表
+func (c *cServeLog) Export(ctx context.Context, req *servelog.ExportReq) (res *servelog.ExportRes, err error) {
+ err = service.SysServeLog().Export(ctx, &req.ServeLogListInp)
+ return
+}
+
+// View 获取指定服务日志信息
+func (c *cServeLog) View(ctx context.Context, req *servelog.ViewReq) (res *servelog.ViewRes, err error) {
+ data, err := service.SysServeLog().View(ctx, &req.ServeLogViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(servelog.ViewRes)
+ res.ServeLogViewModel = data
+ return
+}
+
+// Delete 删除服务日志
+func (c *cServeLog) Delete(ctx context.Context, req *servelog.DeleteReq) (res *servelog.DeleteRes, err error) {
+ err = service.SysServeLog().Delete(ctx, &req.ServeLogDeleteInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/sms_log.go b/server/internal/controller/admin/sys/sms_log.go
new file mode 100644
index 0000000..b718efb
--- /dev/null
+++ b/server/internal/controller/admin/sys/sms_log.go
@@ -0,0 +1,49 @@
+// 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/api/admin/smslog"
+ "hotgo/internal/service"
+)
+
+var (
+ SmsLog = cSmsLog{}
+)
+
+type cSmsLog struct{}
+
+// Delete 删除
+func (c *cSmsLog) Delete(ctx context.Context, req *smslog.DeleteReq) (res *smslog.DeleteRes, err error) {
+ err = service.SysSmsLog().Delete(ctx, &req.SmsLogDeleteInp)
+ return
+}
+
+// View 获取指定信息
+func (c *cSmsLog) View(ctx context.Context, req *smslog.ViewReq) (res *smslog.ViewRes, err error) {
+ data, err := service.SysSmsLog().View(ctx, &req.SmsLogViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(smslog.ViewRes)
+ res.SmsLogViewModel = data
+ return
+}
+
+// List 查看列表
+func (c *cSmsLog) List(ctx context.Context, req *smslog.ListReq) (res *smslog.ListRes, err error) {
+ list, totalCount, err := service.SysSmsLog().List(ctx, &req.SmsLogListInp)
+ if err != nil {
+ return
+ }
+
+ res = new(smslog.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
diff --git a/server/internal/controller/admin/sys/task.go b/server/internal/controller/admin/sys/task.go
new file mode 100644
index 0000000..3afad16
--- /dev/null
+++ b/server/internal/controller/admin/sys/task.go
@@ -0,0 +1,48 @@
+package sys
+
+import (
+ "context"
+ "hotgo/api/admin/task"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var Task = cTask{}
+
+type cTask struct{}
+
+func (c *cTask) List(ctx context.Context, req *task.ListReq) (res *task.ListRes, err error) {
+ list, total, err := service.SysTask().List(ctx, &req.TaskListInp)
+ if err != nil {
+ return nil, err
+ }
+ if list == nil {
+ list = []*sysin.TaskListModel{}
+ }
+ res = new(task.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cTask) View(ctx context.Context, req *task.ViewReq) (res *task.ViewRes, err error) {
+ data, err := service.SysTask().View(ctx, &req.TaskViewInp)
+ if err == nil {
+ res = &task.ViewRes{TaskListModel: data}
+ }
+ return res, err
+}
+func (c *cTask) Edit(ctx context.Context, req *task.EditReq) (res *task.EditRes, err error) {
+ id, err := service.SysTask().Edit(ctx, &req.TaskEditInp)
+ if err == nil {
+ res = &task.EditRes{Id: id}
+ }
+ return res, err
+}
+func (c *cTask) Status(ctx context.Context, req *task.StatusReq) (res *task.StatusRes, err error) {
+ err = service.SysTask().Status(ctx, &req.TaskStatusInp)
+ return
+}
+func (c *cTask) Delete(ctx context.Context, req *task.DeleteReq) (res *task.DeleteRes, err error) {
+ err = service.SysTask().Delete(ctx, &req.TaskDeleteInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/task_hall.go b/server/internal/controller/admin/sys/task_hall.go
new file mode 100644
index 0000000..60306ea
--- /dev/null
+++ b/server/internal/controller/admin/sys/task_hall.go
@@ -0,0 +1,42 @@
+package sys
+
+import (
+ "context"
+ "hotgo/api/admin/taskhall"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var TaskHall = cTaskHall{}
+
+type cTaskHall struct{}
+
+func (c *cTaskHall) List(ctx context.Context, req *taskhall.ListReq) (res *taskhall.ListRes, err error) {
+ list, total, err := service.SysTaskHall().List(ctx, &req.TaskHallListInp)
+ if err != nil {
+ return
+ }
+ if list == nil {
+ list = []*sysin.TaskHallListModel{}
+ }
+ res = new(taskhall.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cTaskHall) View(ctx context.Context, req *taskhall.ViewReq) (res *taskhall.ViewRes, err error) {
+ v, err := service.SysTaskHall().View(ctx, &req.TaskHallViewInp)
+ if err != nil {
+ return
+ }
+ return &taskhall.ViewRes{TaskHallListModel: v}, nil
+}
+func (c *cTaskHall) Edit(ctx context.Context, req *taskhall.EditReq) (*taskhall.EditRes, error) {
+ return &taskhall.EditRes{}, service.SysTaskHall().Edit(ctx, &req.TaskHallEditInp)
+}
+func (c *cTaskHall) Status(ctx context.Context, req *taskhall.StatusReq) (*taskhall.StatusRes, error) {
+ return &taskhall.StatusRes{}, service.SysTaskHall().Status(ctx, &req.TaskHallStatusInp)
+}
+func (c *cTaskHall) Delete(ctx context.Context, req *taskhall.DeleteReq) (*taskhall.DeleteRes, error) {
+ return &taskhall.DeleteRes{}, service.SysTaskHall().Delete(ctx, &req.TaskHallDeleteInp)
+}
diff --git a/server/internal/controller/admin/sys/task_submission.go b/server/internal/controller/admin/sys/task_submission.go
new file mode 100644
index 0000000..80ff33d
--- /dev/null
+++ b/server/internal/controller/admin/sys/task_submission.go
@@ -0,0 +1,37 @@
+package sys
+
+import (
+ "context"
+ "hotgo/api/admin/tasksubmission"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var TaskSubmission = cTaskSubmission{}
+
+type cTaskSubmission struct{}
+
+func (c *cTaskSubmission) List(ctx context.Context, req *tasksubmission.ListReq) (res *tasksubmission.ListRes, err error) {
+ list, total, err := service.SysTaskSubmission().List(ctx, &req.TaskSubmissionListInp)
+ if err != nil {
+ return nil, err
+ }
+ if list == nil {
+ list = []*sysin.TaskSubmissionListModel{}
+ }
+ res = new(tasksubmission.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cTaskSubmission) View(ctx context.Context, req *tasksubmission.ViewReq) (res *tasksubmission.ViewRes, err error) {
+ data, err := service.SysTaskSubmission().View(ctx, &req.TaskSubmissionViewInp)
+ if err == nil {
+ res = &tasksubmission.ViewRes{TaskSubmissionListModel: data}
+ }
+ return res, err
+}
+func (c *cTaskSubmission) Review(ctx context.Context, req *tasksubmission.ReviewReq) (res *tasksubmission.ReviewRes, err error) {
+ err = service.SysTaskSubmission().Review(ctx, &req.TaskSubmissionReviewInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/test_category.go b/server/internal/controller/admin/sys/test_category.go
new file mode 100644
index 0000000..72213f3
--- /dev/null
+++ b/server/internal/controller/admin/sys/test_category.go
@@ -0,0 +1,79 @@
+// 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/api/admin/testcategory"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var (
+ TestCategory = cTestCategory{}
+)
+
+type cTestCategory struct{}
+
+// List 查看测试分类列表
+func (c *cTestCategory) List(ctx context.Context, req *testcategory.ListReq) (res *testcategory.ListRes, err error) {
+ list, totalCount, err := service.SysTestCategory().List(ctx, &req.TestCategoryListInp)
+ if err != nil {
+ return
+ }
+
+ if list == nil {
+ list = []*sysin.TestCategoryListModel{}
+ }
+
+ res = new(testcategory.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, totalCount)
+ return
+}
+
+// Edit 更新测试分类
+func (c *cTestCategory) Edit(ctx context.Context, req *testcategory.EditReq) (res *testcategory.EditRes, err error) {
+ err = service.SysTestCategory().Edit(ctx, &req.TestCategoryEditInp)
+ return
+}
+
+// MaxSort 获取测试分类最大排序
+func (c *cTestCategory) MaxSort(ctx context.Context, req *testcategory.MaxSortReq) (res *testcategory.MaxSortRes, err error) {
+ data, err := service.SysTestCategory().MaxSort(ctx, &req.TestCategoryMaxSortInp)
+ if err != nil {
+ return
+ }
+
+ res = new(testcategory.MaxSortRes)
+ res.TestCategoryMaxSortModel = data
+ return
+}
+
+// View 获取指定测试分类信息
+func (c *cTestCategory) View(ctx context.Context, req *testcategory.ViewReq) (res *testcategory.ViewRes, err error) {
+ data, err := service.SysTestCategory().View(ctx, &req.TestCategoryViewInp)
+ if err != nil {
+ return
+ }
+
+ res = new(testcategory.ViewRes)
+ res.TestCategoryViewModel = data
+ return
+}
+
+// Delete 删除测试分类
+func (c *cTestCategory) Delete(ctx context.Context, req *testcategory.DeleteReq) (res *testcategory.DeleteRes, err error) {
+ err = service.SysTestCategory().Delete(ctx, &req.TestCategoryDeleteInp)
+ return
+}
+
+// Status 更新测试分类状态
+func (c *cTestCategory) Status(ctx context.Context, req *testcategory.StatusReq) (res *testcategory.StatusRes, err error) {
+ err = service.SysTestCategory().Status(ctx, &req.TestCategoryStatusInp)
+ return
+}
diff --git a/server/internal/controller/admin/sys/trade_order.go b/server/internal/controller/admin/sys/trade_order.go
new file mode 100644
index 0000000..aa14bc5
--- /dev/null
+++ b/server/internal/controller/admin/sys/trade_order.go
@@ -0,0 +1,54 @@
+package sys
+
+import (
+ "context"
+
+ "hotgo/api/admin/tradeorder"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var TradeOrder = cTradeOrder{}
+
+type cTradeOrder struct{}
+
+func (c *cTradeOrder) List(ctx context.Context, req *tradeorder.ListReq) (res *tradeorder.ListRes, err error) {
+ list, total, err := service.SysTradeOrder().List(ctx, &req.TradeOrderListInp)
+ if err != nil {
+ return nil, err
+ }
+ if list == nil {
+ list = []*sysin.TradeOrderListModel{}
+ }
+ res = new(tradeorder.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cTradeOrder) View(ctx context.Context, req *tradeorder.ViewReq) (*tradeorder.ViewRes, error) {
+ v, err := service.SysTradeOrder().View(ctx, &req.TradeOrderViewInp)
+ return &tradeorder.ViewRes{TradeOrderViewModel: v}, err
+}
+func (c *cTradeOrder) MatchProducts(ctx context.Context, req *tradeorder.MatchProductsReq) (res *tradeorder.MatchProductsRes, err error) {
+ list, total, err := service.SysTradeOrder().MatchProducts(ctx, &req.TradeOrderMatchProductListInp)
+ if err != nil {
+ return nil, err
+ }
+ if list == nil {
+ list = []*sysin.TradeOrderMatchProductModel{}
+ }
+ res = new(tradeorder.MatchProductsRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cTradeOrder) Match(ctx context.Context, req *tradeorder.MatchReq) (*tradeorder.MatchRes, error) {
+ return &tradeorder.MatchRes{}, service.SysTradeOrder().Match(ctx, &req.TradeOrderMatchInp)
+}
+func (c *cTradeOrder) Apply(ctx context.Context, req *tradeorder.ApplyReq) (*tradeorder.ApplyRes, error) {
+ v, err := service.SysTradeOrder().Apply(ctx, &req.TradeOrderApplyInp)
+ return &tradeorder.ApplyRes{FinanceApprovalModel: v}, err
+}
+func (c *cTradeOrder) Execute(ctx context.Context, req *tradeorder.ExecuteReq) (*tradeorder.ExecuteRes, error) {
+ return &tradeorder.ExecuteRes{}, service.SysTradeOrder().Execute(ctx, &req.TradeOrderExecuteInp)
+}
diff --git a/server/internal/controller/admin/sys/withdrawal_order.go b/server/internal/controller/admin/sys/withdrawal_order.go
new file mode 100644
index 0000000..0cf6ec1
--- /dev/null
+++ b/server/internal/controller/admin/sys/withdrawal_order.go
@@ -0,0 +1,41 @@
+package sys
+
+import (
+ "context"
+
+ "hotgo/api/admin/withdrawalorder"
+ "hotgo/internal/model/input/sysin"
+ "hotgo/internal/service"
+)
+
+var WithdrawalOrder = cWithdrawalOrder{}
+
+type cWithdrawalOrder struct{}
+
+func (c *cWithdrawalOrder) List(ctx context.Context, req *withdrawalorder.ListReq) (res *withdrawalorder.ListRes, err error) {
+ list, total, err := service.SysWithdrawalOrder().List(ctx, &req.WithdrawalOrderListInp)
+ if err != nil {
+ return nil, err
+ }
+ if list == nil {
+ list = []*sysin.WithdrawalOrderListModel{}
+ }
+ res = new(withdrawalorder.ListRes)
+ res.List = list
+ res.PageRes.Pack(req, total)
+ return
+}
+func (c *cWithdrawalOrder) View(ctx context.Context, req *withdrawalorder.ViewReq) (*withdrawalorder.ViewRes, error) {
+ v, err := service.SysWithdrawalOrder().View(ctx, &req.WithdrawalOrderViewInp)
+ return &withdrawalorder.ViewRes{WithdrawalOrderListModel: v}, err
+}
+func (c *cWithdrawalOrder) Review(ctx context.Context, req *withdrawalorder.ReviewReq) (*withdrawalorder.ReviewRes, error) {
+ v, err := service.SysWithdrawalOrder().Review(ctx, &req.WithdrawalReviewInp)
+ return &withdrawalorder.ReviewRes{FinanceApprovalModel: v}, err
+}
+func (c *cWithdrawalOrder) Execute(ctx context.Context, req *withdrawalorder.ExecuteReq) (*withdrawalorder.ExecuteRes, error) {
+ return &withdrawalorder.ExecuteRes{}, service.SysWithdrawalOrder().Execute(ctx, &req.FinanceExecuteInp)
+}
+func (c *cWithdrawalOrder) Complete(ctx context.Context, req *withdrawalorder.CompleteReq) (*withdrawalorder.CompleteRes, error) {
+ return &withdrawalorder.CompleteRes{}, service.SysWithdrawalOrder().Complete(ctx, &req.WithdrawalCompleteInp)
+}
diff --git a/server/internal/controller/api/member/member.go b/server/internal/controller/api/member/member.go
new file mode 100644
index 0000000..6fe3c71
--- /dev/null
+++ b/server/internal/controller/api/member/member.go
@@ -0,0 +1,5 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package member
diff --git a/server/internal/controller/api/member/member_new.go b/server/internal/controller/api/member/member_new.go
new file mode 100644
index 0000000..dfb4e71
--- /dev/null
+++ b/server/internal/controller/api/member/member_new.go
@@ -0,0 +1,15 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package member
+
+import (
+ "hotgo/api/api/member"
+)
+
+type ControllerV1 struct{}
+
+func NewV1() member.IMemberV1 {
+ return &ControllerV1{}
+}
diff --git a/server/internal/controller/api/member/member_v1_get_id_by_code.go b/server/internal/controller/api/member/member_v1_get_id_by_code.go
new file mode 100644
index 0000000..42010d3
--- /dev/null
+++ b/server/internal/controller/api/member/member_v1_get_id_by_code.go
@@ -0,0 +1,14 @@
+package member
+
+import (
+ "context"
+
+ v1 "hotgo/api/api/member/v1"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+func (c *ControllerV1) GetIdByCode(ctx context.Context, req *v1.GetIdByCodeReq) (res *v1.GetIdByCodeRes, err error) {
+ g.RequestFromCtx(ctx).Response.Writeln("Hello World api member!")
+ return
+}
diff --git a/server/internal/controller/api/pay/pay.go b/server/internal/controller/api/pay/pay.go
new file mode 100644
index 0000000..cc269a0
--- /dev/null
+++ b/server/internal/controller/api/pay/pay.go
@@ -0,0 +1,5 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package pay
diff --git a/server/internal/controller/api/pay/pay_new.go b/server/internal/controller/api/pay/pay_new.go
new file mode 100644
index 0000000..53eb435
--- /dev/null
+++ b/server/internal/controller/api/pay/pay_new.go
@@ -0,0 +1,15 @@
+// =================================================================================
+// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
+// =================================================================================
+
+package pay
+
+import (
+ "hotgo/api/api/pay"
+)
+
+type ControllerV1 struct{}
+
+func NewV1() pay.IPayV1 {
+ return &ControllerV1{}
+}
diff --git a/server/internal/controller/api/pay/pay_v1_notify_ali_pay.go b/server/internal/controller/api/pay/pay_v1_notify_ali_pay.go
new file mode 100644
index 0000000..5e22899
--- /dev/null
+++ b/server/internal/controller/api/pay/pay_v1_notify_ali_pay.go
@@ -0,0 +1,22 @@
+package pay
+
+import (
+ "context"
+
+ v1 "hotgo/api/api/pay/v1"
+ "hotgo/internal/consts"
+ "hotgo/internal/library/response"
+ "hotgo/internal/model/input/payin"
+ "hotgo/internal/service"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+func (c *ControllerV1) NotifyAliPay(ctx context.Context, req *v1.NotifyAliPayReq) (res *v1.NotifyAliPayRes, err error) {
+ if _, err = service.Pay().Notify(ctx, &payin.PayNotifyInp{PayType: consts.PayTypeAliPay}); err != nil {
+ return nil, err
+ }
+
+ response.RText(g.RequestFromCtx(ctx), "success")
+ return
+}
diff --git a/server/internal/controller/api/pay/pay_v1_notify_qq_pay.go b/server/internal/controller/api/pay/pay_v1_notify_qq_pay.go
new file mode 100644
index 0000000..6c93b03
--- /dev/null
+++ b/server/internal/controller/api/pay/pay_v1_notify_qq_pay.go
@@ -0,0 +1,26 @@
+package pay
+
+import (
+ "context"
+
+ v1 "hotgo/api/api/pay/v1"
+ "hotgo/internal/consts"
+ "hotgo/internal/model/input/payin"
+ "hotgo/internal/service"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+func (c *ControllerV1) NotifyQQPay(ctx context.Context, req *v1.NotifyQQPayReq) (res *v1.NotifyQQPayRes, err error) {
+ if _, err = service.Pay().Notify(ctx, &payin.PayNotifyInp{PayType: consts.PayTypeQQPay}); err != nil {
+ return
+ }
+
+ r := g.RequestFromCtx(ctx)
+ r.Response.ClearBuffer()
+ r.Response.Write(``)
+ r.Response.WriteXml(g.Map{
+ "return_code": "SUCCESS",
+ })
+ return
+}
diff --git a/server/internal/controller/api/pay/pay_v1_notify_wx_pay.go b/server/internal/controller/api/pay/pay_v1_notify_wx_pay.go
new file mode 100644
index 0000000..e871910
--- /dev/null
+++ b/server/internal/controller/api/pay/pay_v1_notify_wx_pay.go
@@ -0,0 +1,22 @@
+package pay
+
+import (
+ "context"
+
+ v1 "hotgo/api/api/pay/v1"
+ "hotgo/internal/consts"
+ "hotgo/internal/library/response"
+ "hotgo/internal/model/input/payin"
+ "hotgo/internal/service"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+func (c *ControllerV1) NotifyWxPay(ctx context.Context, req *v1.NotifyWxPayReq) (res *v1.NotifyWxPayRes, err error) {
+ if _, err = service.Pay().Notify(ctx, &payin.PayNotifyInp{PayType: consts.PayTypeWxPay}); err != nil {
+ return
+ }
+
+ response.CustomJson(g.RequestFromCtx(ctx), `{"code": "SUCCESS","message": "收单成功"}`)
+ return
+}
diff --git a/server/internal/controller/home/base/site.go b/server/internal/controller/home/base/site.go
new file mode 100644
index 0000000..b65ad40
--- /dev/null
+++ b/server/internal/controller/home/base/site.go
@@ -0,0 +1,38 @@
+// Package base
+// @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 base
+
+import (
+ "context"
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/api/home/base"
+ "hotgo/internal/consts"
+ "hotgo/internal/model"
+ "hotgo/internal/service"
+ "hotgo/utility/simple"
+)
+
+// Site 基础
+var Site = cSite{}
+
+type cSite struct{}
+
+func (a *cSite) Index(ctx context.Context, _ *base.SiteIndexReq) (res *base.SiteIndexRes, err error) {
+ service.View().Render(ctx, model.View{Data: g.Map{
+ "name": simple.AppName(ctx),
+ "version": consts.VersionApp,
+ }})
+
+ // err = gerror.New("这是一个测试错误")
+ // return
+
+ // err = gerror.NewCode(gcode.New(10000, "这是一个测试自定义错误码错误", nil))
+ // return
+
+ // service.View().Error(ctx, gerror.New("这是一个允许被自定义格式的错误,默认和通用错误格式一致,你可以修改它"))
+ // return
+ return
+}
diff --git a/server/internal/controller/websocket/handler/admin/monitor.go b/server/internal/controller/websocket/handler/admin/monitor.go
new file mode 100644
index 0000000..f10ed93
--- /dev/null
+++ b/server/internal/controller/websocket/handler/admin/monitor.go
@@ -0,0 +1,198 @@
+// 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 (
+ "fmt"
+ "github.com/gogf/gf/v2/frame/g"
+ "github.com/gogf/gf/v2/os/gtime"
+ "github.com/gogf/gf/v2/util/gconv"
+ "github.com/shirou/gopsutil/v3/cpu"
+ "github.com/shirou/gopsutil/v3/disk"
+ "github.com/shirou/gopsutil/v3/host"
+ "github.com/shirou/gopsutil/v3/mem"
+ "github.com/shirou/gopsutil/v3/process"
+ "hotgo/internal/consts"
+ "hotgo/internal/model"
+ "hotgo/internal/service"
+ "hotgo/internal/websocket"
+ "hotgo/utility/file"
+ "hotgo/utility/format"
+ "hotgo/utility/simple"
+ "os"
+ "runtime"
+ "time"
+)
+
+var (
+ Monitor = cMonitor{}
+)
+
+type cMonitor struct{}
+
+type MonitorHeadExtra struct {
+ Data interface{} `json:"data"`
+ Data1 string `json:"data1,omitempty"`
+}
+type MonitorHead struct {
+ Title string `json:"title"`
+ Data string `json:"data"`
+ BottomTitle string `json:"bottomTitle"`
+ TotalSum string `json:"totalSum"`
+ IconClass string `json:"iconClass"`
+ Extra MonitorHeadExtra `json:"extra"`
+}
+
+// RunInfo 运行信息
+func (c *cMonitor) RunInfo(client *websocket.Client, req *websocket.WRequest) {
+ var (
+ meta = service.AdminMonitor().GetMeta(client.Context())
+ mHost, _ = host.Info()
+ pwd, _ = os.Getwd()
+ gm runtime.MemStats
+ )
+
+ runtime.ReadMemStats(&gm)
+
+ data := g.Map{
+ // 服务器信息
+ "hostname": mHost.Hostname,
+ "os": mHost.OS,
+ "arch": mHost.KernelArch,
+ "intranet_ip": meta.IntranetIP,
+ "public_ip": meta.PublicIP,
+
+ // 运行信息
+ "version": runtime.Version(), // GO 版本
+ "hgVersion": consts.VersionApp, // HG 版本
+ "startTime": gtime.New(meta.STartTime),
+ "runTime": gtime.Now().Timestamp() - meta.STartTime,
+ "rootPath": runtime.GOROOT(),
+ "pwd": pwd,
+ "goroutine": runtime.NumGoroutine(),
+ "goMem": format.FileSize(int64(gm.Sys)),
+ "goSize": file.DirSize(pwd),
+ }
+
+ if simple.IsDemo(client.Context()) {
+ data["rootPath"] = consts.DemoTips
+ data["pwd"] = consts.DemoTips
+ data["intranet_ip"] = consts.DemoTips
+ data["public_ip"] = consts.DemoTips
+ }
+
+ websocket.SendSuccess(client, req.Event, data)
+}
+
+// Trends 实时数据
+func (c *cMonitor) Trends(client *websocket.Client, req *websocket.WRequest) {
+ type NetC struct {
+ Time *gtime.Time `json:"time"`
+ BytesSent string `json:"bytesSent"` // number of bytes sent
+ BytesRecv string `json:"bytesRecv"` // number of bytes received
+ Down float64 `json:"down"`
+ UP float64 `json:"up"`
+ }
+
+ var (
+ mCpu, cpuErr = cpu.Info()
+ mCpuUsed float64
+ mMem, memErr = mem.VirtualMemory()
+ mMemUsed float64
+ mDisk, diskErr = disk.Usage("/")
+ mProcess, processErr = process.Pids()
+ mLoadAvg = new(model.LoadAvgStats)
+ monitorHeads []MonitorHead
+ nets []NetC
+ meta = service.AdminMonitor().GetMeta(client.Context())
+ )
+
+ if cpuErr != nil {
+ g.Log().Infof(client.Context(), "read CPU info fail:%+v", cpuErr)
+ mCpu = []cpu.InfoStat{{VendorID: "", ModelName: ""}}
+ }
+
+ if memErr != nil {
+ g.Log().Infof(client.Context(), "read mem info fail:%+v", memErr)
+ mMem = new(mem.VirtualMemoryStat)
+ }
+
+ if diskErr != nil {
+ g.Log().Infof(client.Context(), "read disk info fail:%+v", diskErr)
+ mDisk = new(disk.UsageStat)
+ }
+
+ if processErr != nil {
+ g.Log().Infof(client.Context(), "read process.Pids fail:%+v", processErr)
+ }
+
+ // cpu使用率
+ cu, err := cpu.Percent(time.Second, false)
+ if err == nil {
+ mCpuUsed = gconv.Float64(fmt.Sprintf("%.2f", cu[0]))
+ }
+
+ // 内存使用率
+ mMemUsed = gconv.Float64(fmt.Sprintf("%.2f", mMem.UsedPercent))
+
+ // 负载
+ if len(meta.LoadAvg) > 0 {
+ mLoadAvg = meta.LoadAvg[len(meta.LoadAvg)-1]
+ }
+
+ monitorHeads = append(monitorHeads, MonitorHead{
+ Title: "CPU",
+ Data: "使用率 " + format.Round2String(mCpuUsed) + "%",
+ BottomTitle: "CPU数量",
+ TotalSum: gconv.String(runtime.NumCPU()) + "核心",
+ IconClass: "HardwareChip",
+ Extra: MonitorHeadExtra{
+ Data: mCpu[0].VendorID,
+ Data1: mCpu[0].ModelName,
+ }},
+ MonitorHead{
+ Title: "内存",
+ Data: "使用率 " + format.Round2String(mMemUsed) + "%",
+ BottomTitle: "总内存",
+ TotalSum: format.FileSize(int64(mMem.Total)),
+ IconClass: "AppsSharp",
+ Extra: MonitorHeadExtra{
+ Data: format.FileSize(int64(mMem.Used)),
+ Data1: format.FileSize(int64(mMem.Total - mMem.Used)),
+ }},
+ MonitorHead{
+ Title: "磁盘",
+ Data: "已用 " + format.FileSize(int64(mDisk.Used)),
+ BottomTitle: "总容量",
+ TotalSum: format.FileSize(int64(mDisk.Total)),
+ IconClass: "PieChart",
+ Extra: MonitorHeadExtra{
+ Data: format.Round2String(mDisk.UsedPercent),
+ }},
+ MonitorHead{
+ Title: "负载",
+ Data: format.Round2String(mLoadAvg.Ratio) + "%",
+ BottomTitle: "总进程数",
+ TotalSum: gconv.String(len(mProcess)) + "个",
+ IconClass: "Analytics",
+ })
+
+ for _, v := range meta.NetIO {
+ nets = append(nets, NetC{
+ Time: v.Time,
+ BytesSent: format.FileSize(int64(v.BytesSent)), // 转换为最大整数单位
+ BytesRecv: format.FileSize(int64(v.BytesRecv)),
+ Down: format.Round2Float64(v.Down / 1024), // 转换为kb
+ UP: format.Round2Float64(v.UP / 1024),
+ })
+ }
+
+ websocket.SendSuccess(client, req.Event, g.Map{
+ "head": monitorHeads,
+ "load": meta.LoadAvg,
+ "net": nets,
+ })
+}
diff --git a/server/internal/controller/websocket/handler/common/site.go b/server/internal/controller/websocket/handler/common/site.go
new file mode 100644
index 0000000..400165e
--- /dev/null
+++ b/server/internal/controller/websocket/handler/common/site.go
@@ -0,0 +1,39 @@
+// 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 (
+ "github.com/gogf/gf/v2/util/gconv"
+ "hotgo/internal/websocket"
+)
+
+var (
+ Site = cSite{}
+)
+
+type cSite struct{}
+
+func (c *cSite) Join(client *websocket.Client, req *websocket.WRequest) {
+ name := gconv.String(req.Data["id"])
+
+ if !client.Tags.Contains(name) {
+ client.Tags.Append(name)
+ }
+
+ websocket.SendSuccess(client, req.Event, client.Tags.Slice())
+}
+
+func (c *cSite) Quit(client *websocket.Client, req *websocket.WRequest) {
+ name := gconv.String(req.Data["id"])
+ if client.Tags.Contains(name) {
+ client.Tags.RemoveValue(name)
+ }
+ websocket.SendSuccess(client, req.Event, client.Tags.Slice())
+}
+
+func (c *cSite) Ping(client *websocket.Client, req *websocket.WRequest) {
+ websocket.SendSuccess(client, req.Event)
+}
diff --git a/server/internal/controller/websocket/send.go b/server/internal/controller/websocket/send.go
new file mode 100644
index 0000000..03cec08
--- /dev/null
+++ b/server/internal/controller/websocket/send.go
@@ -0,0 +1,29 @@
+// 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"
+ "hotgo/api/websocket/base"
+ "hotgo/internal/websocket"
+ "hotgo/utility/simple"
+)
+
+// Send 通过http发送ws消息
+var Send = send{}
+
+type send struct{}
+
+// SendToTag 发送标签消息
+func (c *send) SendToTag(ctx context.Context, req *base.SendToTagReq) (res *base.SendToTagRes, err error) {
+ simple.SafeGo(ctx, func(ctx context.Context) {
+ websocket.SendToTag(req.Tag, &websocket.WResponse{
+ Event: req.Response.Event,
+ Data: req.Response,
+ })
+ })
+ return
+}
diff --git a/server/internal/crons/close_order.go b/server/internal/crons/close_order.go
new file mode 100644
index 0000000..8dfebe6
--- /dev/null
+++ b/server/internal/crons/close_order.go
@@ -0,0 +1,45 @@
+// Package crons
+// @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 crons
+
+import (
+ "context"
+ "github.com/gogf/gf/v2/frame/g"
+ "github.com/gogf/gf/v2/os/gtime"
+ "hotgo/internal/consts"
+ "hotgo/internal/dao"
+ "hotgo/internal/library/cron"
+ "hotgo/internal/service"
+)
+
+func init() {
+ cron.Register(CloseOrder)
+}
+
+// CloseOrder 取消过期订单
+var CloseOrder = &cCloseOrder{name: "close_order"}
+
+type cCloseOrder struct {
+ name string
+}
+
+func (c *cCloseOrder) GetName() string {
+ return c.name
+}
+
+// Execute 执行任务
+func (c *cCloseOrder) Execute(ctx context.Context, parser *cron.Parser) (err error) {
+ _, err = service.AdminOrder().Model(ctx).
+ Where(dao.AdminOrder.Columns().Status, consts.OrderStatusNotPay).
+ WhereLTE(dao.AdminOrder.Columns().CreatedAt, gtime.Now().AddDate(0, 0, -1)).
+ Data(g.Map{
+ dao.AdminOrder.Columns().Status: consts.OrderStatusClose,
+ }).Update()
+ if err != nil {
+ parser.Logger.Warning(ctx, "cron CloseOrder Execute err:%+v", err)
+ }
+ return
+}
diff --git a/server/internal/crons/test.go b/server/internal/crons/test.go
new file mode 100644
index 0000000..c207c23
--- /dev/null
+++ b/server/internal/crons/test.go
@@ -0,0 +1,33 @@
+// Package crons
+// @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 crons
+
+import (
+ "context"
+ "hotgo/internal/library/cron"
+ "time"
+)
+
+func init() {
+ cron.Register(Test)
+}
+
+// Test 测试任务(无参数)
+var Test = &cTest{name: "test"}
+
+type cTest struct {
+ name string
+}
+
+func (c *cTest) GetName() string {
+ return c.name
+}
+
+// Execute 执行任务
+func (c *cTest) Execute(ctx context.Context, parser *cron.Parser) (err error) {
+ parser.Logger.Infof(ctx, "cron test Execute:%v", time.Now())
+ return
+}
diff --git a/server/internal/crons/test2.go b/server/internal/crons/test2.go
new file mode 100644
index 0000000..c312e13
--- /dev/null
+++ b/server/internal/crons/test2.go
@@ -0,0 +1,45 @@
+// Package crons
+// @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 crons
+
+import (
+ "context"
+ "github.com/gogf/gf/v2/errors/gerror"
+ "hotgo/internal/library/cron"
+ "time"
+)
+
+func init() {
+ cron.Register(Test2)
+}
+
+// Test2 测试2任务(带参数)
+var Test2 = &cTest2{name: "test2"}
+
+type cTest2 struct {
+ name string
+}
+
+func (c *cTest2) GetName() string {
+ return c.name
+}
+
+// Execute 执行任务
+func (c *cTest2) Execute(ctx context.Context, parser *cron.Parser) (err error) {
+ if len(parser.Args) != 3 {
+ err = gerror.New("传入参数不正确!")
+ return
+ }
+
+ var (
+ name = parser.Args[0]
+ age = parser.Args[1]
+ msg = parser.Args[2]
+ )
+
+ parser.Logger.Infof(ctx, "cron test2 Execute:%v, name:%v, age:%v, msg:%v", time.Now(), name, age, msg)
+ return
+}
diff --git a/server/internal/dao/.gitkeep b/server/internal/dao/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/server/internal/dao/addon_hgexample_table.go b/server/internal/dao/addon_hgexample_table.go
new file mode 100755
index 0000000..1191340
--- /dev/null
+++ b/server/internal/dao/addon_hgexample_table.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// addonHgexampleTableDao is the data access object for the table hg_addon_hgexample_table.
+// You can define custom methods on it to extend its functionality as needed.
+type addonHgexampleTableDao struct {
+ *internal.AddonHgexampleTableDao
+}
+
+var (
+ // AddonHgexampleTable is a globally accessible object for table hg_addon_hgexample_table operations.
+ AddonHgexampleTable = addonHgexampleTableDao{internal.NewAddonHgexampleTableDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/addon_hgexample_tenant_order.go b/server/internal/dao/addon_hgexample_tenant_order.go
new file mode 100755
index 0000000..d369ac6
--- /dev/null
+++ b/server/internal/dao/addon_hgexample_tenant_order.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// addonHgexampleTenantOrderDao is the data access object for the table hg_addon_hgexample_tenant_order.
+// You can define custom methods on it to extend its functionality as needed.
+type addonHgexampleTenantOrderDao struct {
+ *internal.AddonHgexampleTenantOrderDao
+}
+
+var (
+ // AddonHgexampleTenantOrder is a globally accessible object for table hg_addon_hgexample_tenant_order operations.
+ AddonHgexampleTenantOrder = addonHgexampleTenantOrderDao{internal.NewAddonHgexampleTenantOrderDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_cash.go b/server/internal/dao/admin_cash.go
new file mode 100755
index 0000000..6bda8cf
--- /dev/null
+++ b/server/internal/dao/admin_cash.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminCashDao is the data access object for the table hg_admin_cash.
+// You can define custom methods on it to extend its functionality as needed.
+type adminCashDao struct {
+ *internal.AdminCashDao
+}
+
+var (
+ // AdminCash is a globally accessible object for table hg_admin_cash operations.
+ AdminCash = adminCashDao{internal.NewAdminCashDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_credits_log.go b/server/internal/dao/admin_credits_log.go
new file mode 100755
index 0000000..b415991
--- /dev/null
+++ b/server/internal/dao/admin_credits_log.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminCreditsLogDao is the data access object for the table hg_admin_credits_log.
+// You can define custom methods on it to extend its functionality as needed.
+type adminCreditsLogDao struct {
+ *internal.AdminCreditsLogDao
+}
+
+var (
+ // AdminCreditsLog is a globally accessible object for table hg_admin_credits_log operations.
+ AdminCreditsLog = adminCreditsLogDao{internal.NewAdminCreditsLogDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_dept.go b/server/internal/dao/admin_dept.go
new file mode 100755
index 0000000..4eeced7
--- /dev/null
+++ b/server/internal/dao/admin_dept.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminDeptDao is the data access object for the table hg_admin_dept.
+// You can define custom methods on it to extend its functionality as needed.
+type adminDeptDao struct {
+ *internal.AdminDeptDao
+}
+
+var (
+ // AdminDept is a globally accessible object for table hg_admin_dept operations.
+ AdminDept = adminDeptDao{internal.NewAdminDeptDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_member.go b/server/internal/dao/admin_member.go
new file mode 100755
index 0000000..112f3f0
--- /dev/null
+++ b/server/internal/dao/admin_member.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminMemberDao is the data access object for the table hg_admin_member.
+// You can define custom methods on it to extend its functionality as needed.
+type adminMemberDao struct {
+ *internal.AdminMemberDao
+}
+
+var (
+ // AdminMember is a globally accessible object for table hg_admin_member operations.
+ AdminMember = adminMemberDao{internal.NewAdminMemberDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_member_post.go b/server/internal/dao/admin_member_post.go
new file mode 100755
index 0000000..1c4ab68
--- /dev/null
+++ b/server/internal/dao/admin_member_post.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminMemberPostDao is the data access object for the table hg_admin_member_post.
+// You can define custom methods on it to extend its functionality as needed.
+type adminMemberPostDao struct {
+ *internal.AdminMemberPostDao
+}
+
+var (
+ // AdminMemberPost is a globally accessible object for table hg_admin_member_post operations.
+ AdminMemberPost = adminMemberPostDao{internal.NewAdminMemberPostDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_member_role.go b/server/internal/dao/admin_member_role.go
new file mode 100755
index 0000000..7b48a86
--- /dev/null
+++ b/server/internal/dao/admin_member_role.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminMemberRoleDao is the data access object for the table hg_admin_member_role.
+// You can define custom methods on it to extend its functionality as needed.
+type adminMemberRoleDao struct {
+ *internal.AdminMemberRoleDao
+}
+
+var (
+ // AdminMemberRole is a globally accessible object for table hg_admin_member_role operations.
+ AdminMemberRole = adminMemberRoleDao{internal.NewAdminMemberRoleDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_menu.go b/server/internal/dao/admin_menu.go
new file mode 100755
index 0000000..8bac378
--- /dev/null
+++ b/server/internal/dao/admin_menu.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminMenuDao is the data access object for the table hg_admin_menu.
+// You can define custom methods on it to extend its functionality as needed.
+type adminMenuDao struct {
+ *internal.AdminMenuDao
+}
+
+var (
+ // AdminMenu is a globally accessible object for table hg_admin_menu operations.
+ AdminMenu = adminMenuDao{internal.NewAdminMenuDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_notice.go b/server/internal/dao/admin_notice.go
new file mode 100755
index 0000000..457c3e7
--- /dev/null
+++ b/server/internal/dao/admin_notice.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminNoticeDao is the data access object for the table hg_admin_notice.
+// You can define custom methods on it to extend its functionality as needed.
+type adminNoticeDao struct {
+ *internal.AdminNoticeDao
+}
+
+var (
+ // AdminNotice is a globally accessible object for table hg_admin_notice operations.
+ AdminNotice = adminNoticeDao{internal.NewAdminNoticeDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_notice_read.go b/server/internal/dao/admin_notice_read.go
new file mode 100755
index 0000000..1a8f484
--- /dev/null
+++ b/server/internal/dao/admin_notice_read.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminNoticeReadDao is the data access object for the table hg_admin_notice_read.
+// You can define custom methods on it to extend its functionality as needed.
+type adminNoticeReadDao struct {
+ *internal.AdminNoticeReadDao
+}
+
+var (
+ // AdminNoticeRead is a globally accessible object for table hg_admin_notice_read operations.
+ AdminNoticeRead = adminNoticeReadDao{internal.NewAdminNoticeReadDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_oauth.go b/server/internal/dao/admin_oauth.go
new file mode 100755
index 0000000..eed3b14
--- /dev/null
+++ b/server/internal/dao/admin_oauth.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminOauthDao is the data access object for the table hg_admin_oauth.
+// You can define custom methods on it to extend its functionality as needed.
+type adminOauthDao struct {
+ *internal.AdminOauthDao
+}
+
+var (
+ // AdminOauth is a globally accessible object for table hg_admin_oauth operations.
+ AdminOauth = adminOauthDao{internal.NewAdminOauthDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_order.go b/server/internal/dao/admin_order.go
new file mode 100755
index 0000000..8fd4a80
--- /dev/null
+++ b/server/internal/dao/admin_order.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminOrderDao is the data access object for the table hg_admin_order.
+// You can define custom methods on it to extend its functionality as needed.
+type adminOrderDao struct {
+ *internal.AdminOrderDao
+}
+
+var (
+ // AdminOrder is a globally accessible object for table hg_admin_order operations.
+ AdminOrder = adminOrderDao{internal.NewAdminOrderDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_post.go b/server/internal/dao/admin_post.go
new file mode 100755
index 0000000..ecf69cd
--- /dev/null
+++ b/server/internal/dao/admin_post.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminPostDao is the data access object for the table hg_admin_post.
+// You can define custom methods on it to extend its functionality as needed.
+type adminPostDao struct {
+ *internal.AdminPostDao
+}
+
+var (
+ // AdminPost is a globally accessible object for table hg_admin_post operations.
+ AdminPost = adminPostDao{internal.NewAdminPostDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_role.go b/server/internal/dao/admin_role.go
new file mode 100755
index 0000000..8315e43
--- /dev/null
+++ b/server/internal/dao/admin_role.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminRoleDao is the data access object for the table hg_admin_role.
+// You can define custom methods on it to extend its functionality as needed.
+type adminRoleDao struct {
+ *internal.AdminRoleDao
+}
+
+var (
+ // AdminRole is a globally accessible object for table hg_admin_role operations.
+ AdminRole = adminRoleDao{internal.NewAdminRoleDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_role_casbin.go b/server/internal/dao/admin_role_casbin.go
new file mode 100755
index 0000000..3557470
--- /dev/null
+++ b/server/internal/dao/admin_role_casbin.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminRoleCasbinDao is the data access object for the table hg_admin_role_casbin.
+// You can define custom methods on it to extend its functionality as needed.
+type adminRoleCasbinDao struct {
+ *internal.AdminRoleCasbinDao
+}
+
+var (
+ // AdminRoleCasbin is a globally accessible object for table hg_admin_role_casbin operations.
+ AdminRoleCasbin = adminRoleCasbinDao{internal.NewAdminRoleCasbinDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/admin_role_menu.go b/server/internal/dao/admin_role_menu.go
new file mode 100755
index 0000000..e180651
--- /dev/null
+++ b/server/internal/dao/admin_role_menu.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// adminRoleMenuDao is the data access object for the table hg_admin_role_menu.
+// You can define custom methods on it to extend its functionality as needed.
+type adminRoleMenuDao struct {
+ *internal.AdminRoleMenuDao
+}
+
+var (
+ // AdminRoleMenu is a globally accessible object for table hg_admin_role_menu operations.
+ AdminRoleMenu = adminRoleMenuDao{internal.NewAdminRoleMenuDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/app_member.go b/server/internal/dao/app_member.go
new file mode 100644
index 0000000..097db43
--- /dev/null
+++ b/server/internal/dao/app_member.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// appMemberDao is the data access object for the table hg_app_member.
+// You can define custom methods on it to extend its functionality as needed.
+type appMemberDao struct {
+ *internal.AppMemberDao
+}
+
+var (
+ // AppMember is a globally accessible object for table hg_app_member operations.
+ AppMember = appMemberDao{internal.NewAppMemberDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/app_member_address.go b/server/internal/dao/app_member_address.go
new file mode 100644
index 0000000..6cb21de
--- /dev/null
+++ b/server/internal/dao/app_member_address.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// appMemberAddressDao is the data access object for the table hg_app_member_address.
+// You can define custom methods on it to extend its functionality as needed.
+type appMemberAddressDao struct {
+ *internal.AppMemberAddressDao
+}
+
+var (
+ // AppMemberAddress is a globally accessible object for table hg_app_member_address operations.
+ AppMemberAddress = appMemberAddressDao{internal.NewAppMemberAddressDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/app_member_level.go b/server/internal/dao/app_member_level.go
new file mode 100644
index 0000000..59bcd04
--- /dev/null
+++ b/server/internal/dao/app_member_level.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// appMemberLevelDao is the data access object for the table hg_app_member_level.
+// You can define custom methods on it to extend its functionality as needed.
+type appMemberLevelDao struct {
+ *internal.AppMemberLevelDao
+}
+
+var (
+ // AppMemberLevel is a globally accessible object for table hg_app_member_level operations.
+ AppMemberLevel = appMemberLevelDao{internal.NewAppMemberLevelDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/app_member_level_version.go b/server/internal/dao/app_member_level_version.go
new file mode 100644
index 0000000..947e10e
--- /dev/null
+++ b/server/internal/dao/app_member_level_version.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// appMemberLevelVersionDao is the data access object for the table hg_app_member_level_version.
+// You can define custom methods on it to extend its functionality as needed.
+type appMemberLevelVersionDao struct {
+ *internal.AppMemberLevelVersionDao
+}
+
+var (
+ // AppMemberLevelVersion is a globally accessible object for table hg_app_member_level_version operations.
+ AppMemberLevelVersion = appMemberLevelVersionDao{internal.NewAppMemberLevelVersionDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/app_member_notice.go b/server/internal/dao/app_member_notice.go
new file mode 100644
index 0000000..731dda9
--- /dev/null
+++ b/server/internal/dao/app_member_notice.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// appMemberNoticeDao is the data access object for the table hg_app_member_notice.
+// You can define custom methods on it to extend its functionality as needed.
+type appMemberNoticeDao struct {
+ *internal.AppMemberNoticeDao
+}
+
+var (
+ // AppMemberNotice is a globally accessible object for table hg_app_member_notice operations.
+ AppMemberNotice = appMemberNoticeDao{internal.NewAppMemberNoticeDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/app_member_payment_account.go b/server/internal/dao/app_member_payment_account.go
new file mode 100644
index 0000000..e294a3b
--- /dev/null
+++ b/server/internal/dao/app_member_payment_account.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// appMemberPaymentAccountDao is the data access object for the table hg_app_member_payment_account.
+// You can define custom methods on it to extend its functionality as needed.
+type appMemberPaymentAccountDao struct {
+ *internal.AppMemberPaymentAccountDao
+}
+
+var (
+ // AppMemberPaymentAccount is a globally accessible object for table hg_app_member_payment_account operations.
+ AppMemberPaymentAccount = appMemberPaymentAccountDao{internal.NewAppMemberPaymentAccountDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/app_member_profile.go b/server/internal/dao/app_member_profile.go
new file mode 100644
index 0000000..e641453
--- /dev/null
+++ b/server/internal/dao/app_member_profile.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// appMemberProfileDao is the data access object for the table hg_app_member_profile.
+// You can define custom methods on it to extend its functionality as needed.
+type appMemberProfileDao struct {
+ *internal.AppMemberProfileDao
+}
+
+var (
+ // AppMemberProfile is a globally accessible object for table hg_app_member_profile operations.
+ AppMemberProfile = appMemberProfileDao{internal.NewAppMemberProfileDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/app_member_status_log.go b/server/internal/dao/app_member_status_log.go
new file mode 100644
index 0000000..25d7854
--- /dev/null
+++ b/server/internal/dao/app_member_status_log.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// appMemberStatusLogDao is the data access object for the table hg_app_member_status_log.
+// You can define custom methods on it to extend its functionality as needed.
+type appMemberStatusLogDao struct {
+ *internal.AppMemberStatusLogDao
+}
+
+var (
+ // AppMemberStatusLog is a globally accessible object for table hg_app_member_status_log operations.
+ AppMemberStatusLog = appMemberStatusLogDao{internal.NewAppMemberStatusLogDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/approval_action.go b/server/internal/dao/approval_action.go
new file mode 100644
index 0000000..e0e0c42
--- /dev/null
+++ b/server/internal/dao/approval_action.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// approvalActionDao is the data access object for the table hg_approval_action.
+// You can define custom methods on it to extend its functionality as needed.
+type approvalActionDao struct {
+ *internal.ApprovalActionDao
+}
+
+var (
+ // ApprovalAction is a globally accessible object for table hg_approval_action operations.
+ ApprovalAction = approvalActionDao{internal.NewApprovalActionDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/approval_request.go b/server/internal/dao/approval_request.go
new file mode 100644
index 0000000..007ce73
--- /dev/null
+++ b/server/internal/dao/approval_request.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// approvalRequestDao is the data access object for the table hg_approval_request.
+// You can define custom methods on it to extend its functionality as needed.
+type approvalRequestDao struct {
+ *internal.ApprovalRequestDao
+}
+
+var (
+ // ApprovalRequest is a globally accessible object for table hg_approval_request operations.
+ ApprovalRequest = approvalRequestDao{internal.NewApprovalRequestDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/banner.go b/server/internal/dao/banner.go
new file mode 100644
index 0000000..7dee7cc
--- /dev/null
+++ b/server/internal/dao/banner.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// bannerDao is the data access object for the table hg_banner.
+// You can define custom methods on it to extend its functionality as needed.
+type bannerDao struct {
+ *internal.BannerDao
+}
+
+var (
+ // Banner is a globally accessible object for table hg_banner operations.
+ Banner = bannerDao{internal.NewBannerDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/biz_audit_log.go b/server/internal/dao/biz_audit_log.go
new file mode 100644
index 0000000..cf33461
--- /dev/null
+++ b/server/internal/dao/biz_audit_log.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// bizAuditLogDao is the data access object for the table hg_biz_audit_log.
+// You can define custom methods on it to extend its functionality as needed.
+type bizAuditLogDao struct {
+ *internal.BizAuditLogDao
+}
+
+var (
+ // BizAuditLog is a globally accessible object for table hg_biz_audit_log operations.
+ BizAuditLog = bizAuditLogDao{internal.NewBizAuditLogDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/content.go b/server/internal/dao/content.go
new file mode 100644
index 0000000..c619866
--- /dev/null
+++ b/server/internal/dao/content.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// contentDao is the data access object for the table hg_content.
+// You can define custom methods on it to extend its functionality as needed.
+type contentDao struct {
+ *internal.ContentDao
+}
+
+var (
+ // Content is a globally accessible object for table hg_content operations.
+ Content = contentDao{internal.NewContentDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/content_version.go b/server/internal/dao/content_version.go
new file mode 100644
index 0000000..0a95d87
--- /dev/null
+++ b/server/internal/dao/content_version.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// contentVersionDao is the data access object for the table hg_content_version.
+// You can define custom methods on it to extend its functionality as needed.
+type contentVersionDao struct {
+ *internal.ContentVersionDao
+}
+
+var (
+ // ContentVersion is a globally accessible object for table hg_content_version operations.
+ ContentVersion = contentVersionDao{internal.NewContentVersionDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/customer_service.go b/server/internal/dao/customer_service.go
new file mode 100644
index 0000000..f016e2c
--- /dev/null
+++ b/server/internal/dao/customer_service.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// customerServiceDao is the data access object for the table hg_customer_service.
+// You can define custom methods on it to extend its functionality as needed.
+type customerServiceDao struct {
+ *internal.CustomerServiceDao
+}
+
+var (
+ // CustomerService is a globally accessible object for table hg_customer_service operations.
+ CustomerService = customerServiceDao{internal.NewCustomerServiceDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/dashboard_daily_stat.go b/server/internal/dao/dashboard_daily_stat.go
new file mode 100644
index 0000000..2850475
--- /dev/null
+++ b/server/internal/dao/dashboard_daily_stat.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// dashboardDailyStatDao is the data access object for the table hg_dashboard_daily_stat.
+// You can define custom methods on it to extend its functionality as needed.
+type dashboardDailyStatDao struct {
+ *internal.DashboardDailyStatDao
+}
+
+var (
+ // DashboardDailyStat is a globally accessible object for table hg_dashboard_daily_stat operations.
+ DashboardDailyStat = dashboardDailyStatDao{internal.NewDashboardDailyStatDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/finance_review.go b/server/internal/dao/finance_review.go
new file mode 100644
index 0000000..a4b70c6
--- /dev/null
+++ b/server/internal/dao/finance_review.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// financeReviewDao is the data access object for the table hg_finance_review.
+// You can define custom methods on it to extend its functionality as needed.
+type financeReviewDao struct {
+ *internal.FinanceReviewDao
+}
+
+var (
+ // FinanceReview is a globally accessible object for table hg_finance_review operations.
+ FinanceReview = financeReviewDao{internal.NewFinanceReviewDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/idempotency_record.go b/server/internal/dao/idempotency_record.go
new file mode 100644
index 0000000..56dbe87
--- /dev/null
+++ b/server/internal/dao/idempotency_record.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// idempotencyRecordDao is the data access object for the table hg_idempotency_record.
+// You can define custom methods on it to extend its functionality as needed.
+type idempotencyRecordDao struct {
+ *internal.IdempotencyRecordDao
+}
+
+var (
+ // IdempotencyRecord is a globally accessible object for table hg_idempotency_record operations.
+ IdempotencyRecord = idempotencyRecordDao{internal.NewIdempotencyRecordDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/internal/addon_hgexample_table.go b/server/internal/dao/internal/addon_hgexample_table.go
new file mode 100755
index 0000000..97a8551
--- /dev/null
+++ b/server/internal/dao/internal/addon_hgexample_table.go
@@ -0,0 +1,151 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AddonHgexampleTableDao is the data access object for the table hg_addon_hgexample_table.
+type AddonHgexampleTableDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AddonHgexampleTableColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AddonHgexampleTableColumns defines and stores column names for the table hg_addon_hgexample_table.
+type AddonHgexampleTableColumns struct {
+ Id string // ID
+ Pid string // 上级ID
+ Level string // 树等级
+ Tree string // 关系树
+ CategoryId string // 分类ID
+ Flag string // 标签
+ Title string // 标题
+ Description string // 描述
+ Content string // 内容
+ Image string // 单图
+ Images string // 多图
+ Attachfile string // 附件
+ Attachfiles string // 多附件
+ Map string // 动态键值对
+ Star string // 推荐星
+ Price string // 价格
+ Views string // 浏览次数
+ ActivityAt string // 活动时间
+ StartAt string // 开启时间
+ EndAt string // 结束时间
+ Switch string // 开关
+ Sort string // 排序
+ Avatar string // 头像
+ Sex string // 性别
+ Qq string // qq
+ Email string // 邮箱
+ Mobile string // 手机号码
+ Hobby string // 爱好
+ Channel string // 渠道
+ CityId string // 所在城市
+ Remark string // 备注
+ Status string // 状态
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+ DeletedAt string // 删除时间
+}
+
+// addonHgexampleTableColumns holds the columns for the table hg_addon_hgexample_table.
+var addonHgexampleTableColumns = AddonHgexampleTableColumns{
+ Id: "id",
+ Pid: "pid",
+ Level: "level",
+ Tree: "tree",
+ CategoryId: "category_id",
+ Flag: "flag",
+ Title: "title",
+ Description: "description",
+ Content: "content",
+ Image: "image",
+ Images: "images",
+ Attachfile: "attachfile",
+ Attachfiles: "attachfiles",
+ Map: "map",
+ Star: "star",
+ Price: "price",
+ Views: "views",
+ ActivityAt: "activity_at",
+ StartAt: "start_at",
+ EndAt: "end_at",
+ Switch: "switch",
+ Sort: "sort",
+ Avatar: "avatar",
+ Sex: "sex",
+ Qq: "qq",
+ Email: "email",
+ Mobile: "mobile",
+ Hobby: "hobby",
+ Channel: "channel",
+ CityId: "city_id",
+ Remark: "remark",
+ Status: "status",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewAddonHgexampleTableDao creates and returns a new DAO object for table data access.
+func NewAddonHgexampleTableDao(handlers ...gdb.ModelHandler) *AddonHgexampleTableDao {
+ return &AddonHgexampleTableDao{
+ group: "default",
+ table: "hg_addon_hgexample_table",
+ columns: addonHgexampleTableColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AddonHgexampleTableDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AddonHgexampleTableDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AddonHgexampleTableDao) Columns() AddonHgexampleTableColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AddonHgexampleTableDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AddonHgexampleTableDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AddonHgexampleTableDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/addon_hgexample_tenant_order.go b/server/internal/dao/internal/addon_hgexample_tenant_order.go
new file mode 100755
index 0000000..bf41fd8
--- /dev/null
+++ b/server/internal/dao/internal/addon_hgexample_tenant_order.go
@@ -0,0 +1,99 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AddonHgexampleTenantOrderDao is the data access object for the table hg_addon_hgexample_tenant_order.
+type AddonHgexampleTenantOrderDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AddonHgexampleTenantOrderColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AddonHgexampleTenantOrderColumns defines and stores column names for the table hg_addon_hgexample_tenant_order.
+type AddonHgexampleTenantOrderColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ MerchantId string // 商户ID
+ UserId string // 用户ID
+ ProductName string // 购买产品
+ OrderSn string // 订单号
+ Money string // 充值金额
+ Remark string // 备注
+ Status string // 订单状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+}
+
+// addonHgexampleTenantOrderColumns holds the columns for the table hg_addon_hgexample_tenant_order.
+var addonHgexampleTenantOrderColumns = AddonHgexampleTenantOrderColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ MerchantId: "merchant_id",
+ UserId: "user_id",
+ ProductName: "product_name",
+ OrderSn: "order_sn",
+ Money: "money",
+ Remark: "remark",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewAddonHgexampleTenantOrderDao creates and returns a new DAO object for table data access.
+func NewAddonHgexampleTenantOrderDao(handlers ...gdb.ModelHandler) *AddonHgexampleTenantOrderDao {
+ return &AddonHgexampleTenantOrderDao{
+ group: "default",
+ table: "hg_addon_hgexample_tenant_order",
+ columns: addonHgexampleTenantOrderColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AddonHgexampleTenantOrderDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AddonHgexampleTenantOrderDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AddonHgexampleTenantOrderDao) Columns() AddonHgexampleTenantOrderColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AddonHgexampleTenantOrderDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AddonHgexampleTenantOrderDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AddonHgexampleTenantOrderDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_cash.go b/server/internal/dao/internal/admin_cash.go
new file mode 100755
index 0000000..a9bdb1b
--- /dev/null
+++ b/server/internal/dao/internal/admin_cash.go
@@ -0,0 +1,97 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminCashDao is the data access object for the table hg_admin_cash.
+type AdminCashDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminCashColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminCashColumns defines and stores column names for the table hg_admin_cash.
+type AdminCashColumns struct {
+ Id string // ID
+ MemberId string // 管理员ID
+ Money string // 提现金额
+ Fee string // 手续费
+ LastMoney string // 最终到账金额
+ Ip string // 申请人IP
+ Status string // 状态码
+ Msg string // 处理结果
+ HandleAt string // 处理时间
+ CreatedAt string // 申请时间
+}
+
+// adminCashColumns holds the columns for the table hg_admin_cash.
+var adminCashColumns = AdminCashColumns{
+ Id: "id",
+ MemberId: "member_id",
+ Money: "money",
+ Fee: "fee",
+ LastMoney: "last_money",
+ Ip: "ip",
+ Status: "status",
+ Msg: "msg",
+ HandleAt: "handle_at",
+ CreatedAt: "created_at",
+}
+
+// NewAdminCashDao creates and returns a new DAO object for table data access.
+func NewAdminCashDao(handlers ...gdb.ModelHandler) *AdminCashDao {
+ return &AdminCashDao{
+ group: "default",
+ table: "hg_admin_cash",
+ columns: adminCashColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminCashDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminCashDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminCashDao) Columns() AdminCashColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminCashDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminCashDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminCashDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_credits_log.go b/server/internal/dao/internal/admin_credits_log.go
new file mode 100755
index 0000000..0b3602e
--- /dev/null
+++ b/server/internal/dao/internal/admin_credits_log.go
@@ -0,0 +1,107 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminCreditsLogDao is the data access object for the table hg_admin_credits_log.
+type AdminCreditsLogDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminCreditsLogColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminCreditsLogColumns defines and stores column names for the table hg_admin_credits_log.
+type AdminCreditsLogColumns struct {
+ Id string // 变动ID
+ MemberId string // 管理员ID
+ AppId string // 应用id
+ AddonsName string // 插件名称
+ CreditType string // 变动类型
+ CreditGroup string // 变动组别
+ BeforeNum string // 变动前
+ Num string // 变动数据
+ AfterNum string // 变动后
+ Remark string // 备注
+ Ip string // 操作人IP
+ MapId string // 关联ID
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+}
+
+// adminCreditsLogColumns holds the columns for the table hg_admin_credits_log.
+var adminCreditsLogColumns = AdminCreditsLogColumns{
+ Id: "id",
+ MemberId: "member_id",
+ AppId: "app_id",
+ AddonsName: "addons_name",
+ CreditType: "credit_type",
+ CreditGroup: "credit_group",
+ BeforeNum: "before_num",
+ Num: "num",
+ AfterNum: "after_num",
+ Remark: "remark",
+ Ip: "ip",
+ MapId: "map_id",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewAdminCreditsLogDao creates and returns a new DAO object for table data access.
+func NewAdminCreditsLogDao(handlers ...gdb.ModelHandler) *AdminCreditsLogDao {
+ return &AdminCreditsLogDao{
+ group: "default",
+ table: "hg_admin_credits_log",
+ columns: adminCreditsLogColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminCreditsLogDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminCreditsLogDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminCreditsLogDao) Columns() AdminCreditsLogColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminCreditsLogDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminCreditsLogDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminCreditsLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_dept.go b/server/internal/dao/internal/admin_dept.go
new file mode 100755
index 0000000..becb639
--- /dev/null
+++ b/server/internal/dao/internal/admin_dept.go
@@ -0,0 +1,105 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminDeptDao is the data access object for the table hg_admin_dept.
+type AdminDeptDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminDeptColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminDeptColumns defines and stores column names for the table hg_admin_dept.
+type AdminDeptColumns struct {
+ Id string // 部门ID
+ Pid string // 父部门ID
+ Name string // 部门名称
+ Code string // 部门编码
+ Type string // 部门类型
+ Leader string // 负责人
+ Phone string // 联系电话
+ Email string // 邮箱
+ Level string // 关系树等级
+ Tree string // 关系树
+ Sort string // 排序
+ Status string // 部门状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// adminDeptColumns holds the columns for the table hg_admin_dept.
+var adminDeptColumns = AdminDeptColumns{
+ Id: "id",
+ Pid: "pid",
+ Name: "name",
+ Code: "code",
+ Type: "type",
+ Leader: "leader",
+ Phone: "phone",
+ Email: "email",
+ Level: "level",
+ Tree: "tree",
+ Sort: "sort",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewAdminDeptDao creates and returns a new DAO object for table data access.
+func NewAdminDeptDao(handlers ...gdb.ModelHandler) *AdminDeptDao {
+ return &AdminDeptDao{
+ group: "default",
+ table: "hg_admin_dept",
+ columns: adminDeptColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminDeptDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminDeptDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminDeptDao) Columns() AdminDeptColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminDeptDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminDeptDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminDeptDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_member.go b/server/internal/dao/internal/admin_member.go
new file mode 100755
index 0000000..93ebaa7
--- /dev/null
+++ b/server/internal/dao/internal/admin_member.go
@@ -0,0 +1,133 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminMemberDao is the data access object for the table hg_admin_member.
+type AdminMemberDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminMemberColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminMemberColumns defines and stores column names for the table hg_admin_member.
+type AdminMemberColumns struct {
+ Id string // 管理员ID
+ DeptId string // 部门ID
+ RoleId string // 角色ID
+ RealName string // 真实姓名
+ Username string // 帐号
+ PasswordHash string // 密码
+ Salt string // 密码盐
+ PasswordResetToken string // 密码重置令牌
+ Integral string // 积分
+ Balance string // 余额
+ Avatar string // 头像
+ Sex string // 性别
+ Qq string // qq
+ Email string // 邮箱
+ Mobile string // 手机号码
+ Birthday string // 生日
+ CityId string // 城市编码
+ Address string // 联系地址
+ Pid string // 上级管理员ID
+ Level string // 关系树等级
+ Tree string // 关系树
+ InviteCode string // 邀请码
+ Cash string // 提现配置
+ LastActiveAt string // 最后活跃时间
+ Remark string // 备注
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+}
+
+// adminMemberColumns holds the columns for the table hg_admin_member.
+var adminMemberColumns = AdminMemberColumns{
+ Id: "id",
+ DeptId: "dept_id",
+ RoleId: "role_id",
+ RealName: "real_name",
+ Username: "username",
+ PasswordHash: "password_hash",
+ Salt: "salt",
+ PasswordResetToken: "password_reset_token",
+ Integral: "integral",
+ Balance: "balance",
+ Avatar: "avatar",
+ Sex: "sex",
+ Qq: "qq",
+ Email: "email",
+ Mobile: "mobile",
+ Birthday: "birthday",
+ CityId: "city_id",
+ Address: "address",
+ Pid: "pid",
+ Level: "level",
+ Tree: "tree",
+ InviteCode: "invite_code",
+ Cash: "cash",
+ LastActiveAt: "last_active_at",
+ Remark: "remark",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewAdminMemberDao creates and returns a new DAO object for table data access.
+func NewAdminMemberDao(handlers ...gdb.ModelHandler) *AdminMemberDao {
+ return &AdminMemberDao{
+ group: "default",
+ table: "hg_admin_member",
+ columns: adminMemberColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminMemberDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminMemberDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminMemberDao) Columns() AdminMemberColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminMemberDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminMemberDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminMemberDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_member_post.go b/server/internal/dao/internal/admin_member_post.go
new file mode 100755
index 0000000..8a30c9e
--- /dev/null
+++ b/server/internal/dao/internal/admin_member_post.go
@@ -0,0 +1,81 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminMemberPostDao is the data access object for the table hg_admin_member_post.
+type AdminMemberPostDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminMemberPostColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminMemberPostColumns defines and stores column names for the table hg_admin_member_post.
+type AdminMemberPostColumns struct {
+ MemberId string // 管理员ID
+ PostId string // 岗位ID
+}
+
+// adminMemberPostColumns holds the columns for the table hg_admin_member_post.
+var adminMemberPostColumns = AdminMemberPostColumns{
+ MemberId: "member_id",
+ PostId: "post_id",
+}
+
+// NewAdminMemberPostDao creates and returns a new DAO object for table data access.
+func NewAdminMemberPostDao(handlers ...gdb.ModelHandler) *AdminMemberPostDao {
+ return &AdminMemberPostDao{
+ group: "default",
+ table: "hg_admin_member_post",
+ columns: adminMemberPostColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminMemberPostDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminMemberPostDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminMemberPostDao) Columns() AdminMemberPostColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminMemberPostDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminMemberPostDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminMemberPostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_member_role.go b/server/internal/dao/internal/admin_member_role.go
new file mode 100755
index 0000000..094d663
--- /dev/null
+++ b/server/internal/dao/internal/admin_member_role.go
@@ -0,0 +1,81 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminMemberRoleDao is the data access object for the table hg_admin_member_role.
+type AdminMemberRoleDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminMemberRoleColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminMemberRoleColumns defines and stores column names for the table hg_admin_member_role.
+type AdminMemberRoleColumns struct {
+ MemberId string // 管理员ID
+ RoleId string // 角色ID
+}
+
+// adminMemberRoleColumns holds the columns for the table hg_admin_member_role.
+var adminMemberRoleColumns = AdminMemberRoleColumns{
+ MemberId: "member_id",
+ RoleId: "role_id",
+}
+
+// NewAdminMemberRoleDao creates and returns a new DAO object for table data access.
+func NewAdminMemberRoleDao(handlers ...gdb.ModelHandler) *AdminMemberRoleDao {
+ return &AdminMemberRoleDao{
+ group: "default",
+ table: "hg_admin_member_role",
+ columns: adminMemberRoleColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminMemberRoleDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminMemberRoleDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminMemberRoleDao) Columns() AdminMemberRoleColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminMemberRoleDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminMemberRoleDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminMemberRoleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_menu.go b/server/internal/dao/internal/admin_menu.go
new file mode 100755
index 0000000..3312718
--- /dev/null
+++ b/server/internal/dao/internal/admin_menu.go
@@ -0,0 +1,129 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminMenuDao is the data access object for the table hg_admin_menu.
+type AdminMenuDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminMenuColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminMenuColumns defines and stores column names for the table hg_admin_menu.
+type AdminMenuColumns struct {
+ Id string // 菜单ID
+ Pid string // 父菜单ID
+ Level string // 关系树等级
+ Tree string // 关系树
+ Title string // 菜单名称
+ Name string // 名称编码
+ Path string // 路由地址
+ Icon string // 菜单图标
+ Type string // 菜单类型(1目录 2菜单 3按钮)
+ Redirect string // 重定向地址
+ Permissions string // 菜单包含权限集合
+ PermissionName string // 权限名称
+ Component string // 组件路径
+ AlwaysShow string // 取消自动计算根路由模式
+ ActiveMenu string // 高亮菜单编码
+ IsRoot string // 是否跟路由
+ IsFrame string // 是否内嵌
+ FrameSrc string // 内联外部地址
+ KeepAlive string // 缓存该路由
+ Hidden string // 是否隐藏
+ Affix string // 是否固定
+ Sort string // 排序
+ Remark string // 备注
+ Status string // 菜单状态
+ UpdatedAt string // 更新时间
+ CreatedAt string // 创建时间
+}
+
+// adminMenuColumns holds the columns for the table hg_admin_menu.
+var adminMenuColumns = AdminMenuColumns{
+ Id: "id",
+ Pid: "pid",
+ Level: "level",
+ Tree: "tree",
+ Title: "title",
+ Name: "name",
+ Path: "path",
+ Icon: "icon",
+ Type: "type",
+ Redirect: "redirect",
+ Permissions: "permissions",
+ PermissionName: "permission_name",
+ Component: "component",
+ AlwaysShow: "always_show",
+ ActiveMenu: "active_menu",
+ IsRoot: "is_root",
+ IsFrame: "is_frame",
+ FrameSrc: "frame_src",
+ KeepAlive: "keep_alive",
+ Hidden: "hidden",
+ Affix: "affix",
+ Sort: "sort",
+ Remark: "remark",
+ Status: "status",
+ UpdatedAt: "updated_at",
+ CreatedAt: "created_at",
+}
+
+// NewAdminMenuDao creates and returns a new DAO object for table data access.
+func NewAdminMenuDao(handlers ...gdb.ModelHandler) *AdminMenuDao {
+ return &AdminMenuDao{
+ group: "default",
+ table: "hg_admin_menu",
+ columns: adminMenuColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminMenuDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminMenuDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminMenuDao) Columns() AdminMenuColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminMenuDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminMenuDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminMenuDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_notice.go b/server/internal/dao/internal/admin_notice.go
new file mode 100755
index 0000000..ecb0cb9
--- /dev/null
+++ b/server/internal/dao/internal/admin_notice.go
@@ -0,0 +1,105 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminNoticeDao is the data access object for the table hg_admin_notice.
+type AdminNoticeDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminNoticeColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminNoticeColumns defines and stores column names for the table hg_admin_notice.
+type AdminNoticeColumns struct {
+ Id string // 公告ID
+ Title string // 公告标题
+ Type string // 公告类型
+ Tag string // 标签
+ Content string // 公告内容
+ Receiver string // 接收者
+ Remark string // 备注
+ Sort string // 排序
+ Status string // 公告状态
+ CreatedBy string // 发送人
+ UpdatedBy string // 修改人
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// adminNoticeColumns holds the columns for the table hg_admin_notice.
+var adminNoticeColumns = AdminNoticeColumns{
+ Id: "id",
+ Title: "title",
+ Type: "type",
+ Tag: "tag",
+ Content: "content",
+ Receiver: "receiver",
+ Remark: "remark",
+ Sort: "sort",
+ Status: "status",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewAdminNoticeDao creates and returns a new DAO object for table data access.
+func NewAdminNoticeDao(handlers ...gdb.ModelHandler) *AdminNoticeDao {
+ return &AdminNoticeDao{
+ group: "default",
+ table: "hg_admin_notice",
+ columns: adminNoticeColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminNoticeDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminNoticeDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminNoticeDao) Columns() AdminNoticeColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminNoticeDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminNoticeDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminNoticeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_notice_read.go b/server/internal/dao/internal/admin_notice_read.go
new file mode 100755
index 0000000..2ee0f7b
--- /dev/null
+++ b/server/internal/dao/internal/admin_notice_read.go
@@ -0,0 +1,89 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminNoticeReadDao is the data access object for the table hg_admin_notice_read.
+type AdminNoticeReadDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminNoticeReadColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminNoticeReadColumns defines and stores column names for the table hg_admin_notice_read.
+type AdminNoticeReadColumns struct {
+ Id string // 记录ID
+ NoticeId string // 公告ID
+ MemberId string // 会员ID
+ Clicks string // 已读次数
+ UpdatedAt string // 更新时间
+ CreatedAt string // 阅读时间
+}
+
+// adminNoticeReadColumns holds the columns for the table hg_admin_notice_read.
+var adminNoticeReadColumns = AdminNoticeReadColumns{
+ Id: "id",
+ NoticeId: "notice_id",
+ MemberId: "member_id",
+ Clicks: "clicks",
+ UpdatedAt: "updated_at",
+ CreatedAt: "created_at",
+}
+
+// NewAdminNoticeReadDao creates and returns a new DAO object for table data access.
+func NewAdminNoticeReadDao(handlers ...gdb.ModelHandler) *AdminNoticeReadDao {
+ return &AdminNoticeReadDao{
+ group: "default",
+ table: "hg_admin_notice_read",
+ columns: adminNoticeReadColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminNoticeReadDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminNoticeReadDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminNoticeReadDao) Columns() AdminNoticeReadColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminNoticeReadDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminNoticeReadDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminNoticeReadDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_oauth.go b/server/internal/dao/internal/admin_oauth.go
new file mode 100755
index 0000000..f812ac6
--- /dev/null
+++ b/server/internal/dao/internal/admin_oauth.go
@@ -0,0 +1,107 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminOauthDao is the data access object for the table hg_admin_oauth.
+type AdminOauthDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminOauthColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminOauthColumns defines and stores column names for the table hg_admin_oauth.
+type AdminOauthColumns struct {
+ Id string // 主键
+ MemberId string // 用户ID
+ Unionid string // 唯一ID
+ OauthClient string // 授权组别
+ OauthOpenid string // 授权开放ID
+ Sex string // 性别
+ Nickname string // 昵称
+ HeadPortrait string // 头像
+ Birthday string // 生日
+ Country string // 国家
+ Province string // 省
+ City string // 市
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+}
+
+// adminOauthColumns holds the columns for the table hg_admin_oauth.
+var adminOauthColumns = AdminOauthColumns{
+ Id: "id",
+ MemberId: "member_id",
+ Unionid: "unionid",
+ OauthClient: "oauth_client",
+ OauthOpenid: "oauth_openid",
+ Sex: "sex",
+ Nickname: "nickname",
+ HeadPortrait: "head_portrait",
+ Birthday: "birthday",
+ Country: "country",
+ Province: "province",
+ City: "city",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewAdminOauthDao creates and returns a new DAO object for table data access.
+func NewAdminOauthDao(handlers ...gdb.ModelHandler) *AdminOauthDao {
+ return &AdminOauthDao{
+ group: "default",
+ table: "hg_admin_oauth",
+ columns: adminOauthColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminOauthDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminOauthDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminOauthDao) Columns() AdminOauthColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminOauthDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminOauthDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminOauthDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_order.go b/server/internal/dao/internal/admin_order.go
new file mode 100755
index 0000000..8b3df6f
--- /dev/null
+++ b/server/internal/dao/internal/admin_order.go
@@ -0,0 +1,101 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminOrderDao is the data access object for the table hg_admin_order.
+type AdminOrderDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminOrderColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminOrderColumns defines and stores column names for the table hg_admin_order.
+type AdminOrderColumns struct {
+ Id string // 主键
+ MemberId string // 管理员id
+ OrderType string // 订单类型
+ ProductId string // 产品id
+ OrderSn string // 关联订单号
+ Money string // 充值金额
+ Remark string // 备注
+ RefundReason string // 退款原因
+ RejectRefundReason string // 拒绝退款原因
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+}
+
+// adminOrderColumns holds the columns for the table hg_admin_order.
+var adminOrderColumns = AdminOrderColumns{
+ Id: "id",
+ MemberId: "member_id",
+ OrderType: "order_type",
+ ProductId: "product_id",
+ OrderSn: "order_sn",
+ Money: "money",
+ Remark: "remark",
+ RefundReason: "refund_reason",
+ RejectRefundReason: "reject_refund_reason",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewAdminOrderDao creates and returns a new DAO object for table data access.
+func NewAdminOrderDao(handlers ...gdb.ModelHandler) *AdminOrderDao {
+ return &AdminOrderDao{
+ group: "default",
+ table: "hg_admin_order",
+ columns: adminOrderColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminOrderDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminOrderDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminOrderDao) Columns() AdminOrderColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminOrderDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminOrderDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminOrderDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_post.go b/server/internal/dao/internal/admin_post.go
new file mode 100755
index 0000000..986103d
--- /dev/null
+++ b/server/internal/dao/internal/admin_post.go
@@ -0,0 +1,93 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminPostDao is the data access object for the table hg_admin_post.
+type AdminPostDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminPostColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminPostColumns defines and stores column names for the table hg_admin_post.
+type AdminPostColumns struct {
+ Id string // 岗位ID
+ Code string // 岗位编码
+ Name string // 岗位名称
+ Remark string // 备注
+ Sort string // 排序
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// adminPostColumns holds the columns for the table hg_admin_post.
+var adminPostColumns = AdminPostColumns{
+ Id: "id",
+ Code: "code",
+ Name: "name",
+ Remark: "remark",
+ Sort: "sort",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewAdminPostDao creates and returns a new DAO object for table data access.
+func NewAdminPostDao(handlers ...gdb.ModelHandler) *AdminPostDao {
+ return &AdminPostDao{
+ group: "default",
+ table: "hg_admin_post",
+ columns: adminPostColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminPostDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminPostDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminPostDao) Columns() AdminPostColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminPostDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminPostDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminPostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_role.go b/server/internal/dao/internal/admin_role.go
new file mode 100755
index 0000000..6d8a324
--- /dev/null
+++ b/server/internal/dao/internal/admin_role.go
@@ -0,0 +1,103 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminRoleDao is the data access object for the table hg_admin_role.
+type AdminRoleDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminRoleColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminRoleColumns defines and stores column names for the table hg_admin_role.
+type AdminRoleColumns struct {
+ Id string // 角色ID
+ Name string // 角色名称
+ Key string // 角色权限字符串
+ DataScope string // 数据范围
+ CustomDept string // 自定义部门权限
+ Pid string // 上级角色ID
+ Level string // 关系树等级
+ Tree string // 关系树
+ Remark string // 备注
+ Sort string // 排序
+ Status string // 角色状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// adminRoleColumns holds the columns for the table hg_admin_role.
+var adminRoleColumns = AdminRoleColumns{
+ Id: "id",
+ Name: "name",
+ Key: "key",
+ DataScope: "data_scope",
+ CustomDept: "custom_dept",
+ Pid: "pid",
+ Level: "level",
+ Tree: "tree",
+ Remark: "remark",
+ Sort: "sort",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewAdminRoleDao creates and returns a new DAO object for table data access.
+func NewAdminRoleDao(handlers ...gdb.ModelHandler) *AdminRoleDao {
+ return &AdminRoleDao{
+ group: "default",
+ table: "hg_admin_role",
+ columns: adminRoleColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminRoleDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminRoleDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminRoleDao) Columns() AdminRoleColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminRoleDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminRoleDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminRoleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_role_casbin.go b/server/internal/dao/internal/admin_role_casbin.go
new file mode 100755
index 0000000..e00b886
--- /dev/null
+++ b/server/internal/dao/internal/admin_role_casbin.go
@@ -0,0 +1,93 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminRoleCasbinDao is the data access object for the table hg_admin_role_casbin.
+type AdminRoleCasbinDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminRoleCasbinColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminRoleCasbinColumns defines and stores column names for the table hg_admin_role_casbin.
+type AdminRoleCasbinColumns struct {
+ Id string //
+ PType string //
+ V0 string //
+ V1 string //
+ V2 string //
+ V3 string //
+ V4 string //
+ V5 string //
+}
+
+// adminRoleCasbinColumns holds the columns for the table hg_admin_role_casbin.
+var adminRoleCasbinColumns = AdminRoleCasbinColumns{
+ Id: "id",
+ PType: "p_type",
+ V0: "v0",
+ V1: "v1",
+ V2: "v2",
+ V3: "v3",
+ V4: "v4",
+ V5: "v5",
+}
+
+// NewAdminRoleCasbinDao creates and returns a new DAO object for table data access.
+func NewAdminRoleCasbinDao(handlers ...gdb.ModelHandler) *AdminRoleCasbinDao {
+ return &AdminRoleCasbinDao{
+ group: "default",
+ table: "hg_admin_role_casbin",
+ columns: adminRoleCasbinColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminRoleCasbinDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminRoleCasbinDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminRoleCasbinDao) Columns() AdminRoleCasbinColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminRoleCasbinDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminRoleCasbinDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminRoleCasbinDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/admin_role_menu.go b/server/internal/dao/internal/admin_role_menu.go
new file mode 100755
index 0000000..9f9e4ff
--- /dev/null
+++ b/server/internal/dao/internal/admin_role_menu.go
@@ -0,0 +1,81 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AdminRoleMenuDao is the data access object for the table hg_admin_role_menu.
+type AdminRoleMenuDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AdminRoleMenuColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AdminRoleMenuColumns defines and stores column names for the table hg_admin_role_menu.
+type AdminRoleMenuColumns struct {
+ RoleId string // 角色ID
+ MenuId string // 菜单ID
+}
+
+// adminRoleMenuColumns holds the columns for the table hg_admin_role_menu.
+var adminRoleMenuColumns = AdminRoleMenuColumns{
+ RoleId: "role_id",
+ MenuId: "menu_id",
+}
+
+// NewAdminRoleMenuDao creates and returns a new DAO object for table data access.
+func NewAdminRoleMenuDao(handlers ...gdb.ModelHandler) *AdminRoleMenuDao {
+ return &AdminRoleMenuDao{
+ group: "default",
+ table: "hg_admin_role_menu",
+ columns: adminRoleMenuColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AdminRoleMenuDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AdminRoleMenuDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AdminRoleMenuDao) Columns() AdminRoleMenuColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AdminRoleMenuDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AdminRoleMenuDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AdminRoleMenuDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/app_member.go b/server/internal/dao/internal/app_member.go
new file mode 100644
index 0000000..abe7214
--- /dev/null
+++ b/server/internal/dao/internal/app_member.go
@@ -0,0 +1,135 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AppMemberDao is the data access object for the table hg_app_member.
+type AppMemberDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AppMemberColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AppMemberColumns defines and stores column names for the table hg_app_member.
+type AppMemberColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ MemberNo string // 会员编号
+ Username string // 用户名
+ MobileCipher string // 手机号密文(AES-GCM)
+ MobileHash string // 手机号检索哈希(HMAC-SHA256)
+ MobileMask string // 手机号脱敏值
+ PasswordHash string // 登录密码哈希(bcrypt)
+ TradePasswordHash string // 交易密码哈希
+ LevelId string // 会员等级ID
+ ParentId string // 上级会员ID
+ Level string // 团队层级
+ Tree string // 关系树
+ InviteCode string // 邀请码
+ MemberStatus string // 会员状态
+ RiskStatus string // 风控状态
+ AutoDispatch string // 自动派单
+ CreditScore string // 信用分
+ IsTestAccount string // 测试账号
+ LastLoginAt string // 最后登录时间
+ LastLoginIpCipher string // 最后登录IP密文
+ LastLoginIpMask string // 最后登录IP脱敏值
+ LastLoginRegion string // 最后登录地区
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 注销时间
+}
+
+// appMemberColumns holds the columns for the table hg_app_member.
+var appMemberColumns = AppMemberColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ MemberNo: "member_no",
+ Username: "username",
+ MobileCipher: "mobile_cipher",
+ MobileHash: "mobile_hash",
+ MobileMask: "mobile_mask",
+ PasswordHash: "password_hash",
+ TradePasswordHash: "trade_password_hash",
+ LevelId: "level_id",
+ ParentId: "parent_id",
+ Level: "level",
+ Tree: "tree",
+ InviteCode: "invite_code",
+ MemberStatus: "member_status",
+ RiskStatus: "risk_status",
+ AutoDispatch: "auto_dispatch",
+ CreditScore: "credit_score",
+ IsTestAccount: "is_test_account",
+ LastLoginAt: "last_login_at",
+ LastLoginIpCipher: "last_login_ip_cipher",
+ LastLoginIpMask: "last_login_ip_mask",
+ LastLoginRegion: "last_login_region",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewAppMemberDao creates and returns a new DAO object for table data access.
+func NewAppMemberDao(handlers ...gdb.ModelHandler) *AppMemberDao {
+ return &AppMemberDao{
+ group: "default",
+ table: "hg_app_member",
+ columns: appMemberColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AppMemberDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AppMemberDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AppMemberDao) Columns() AppMemberColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AppMemberDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AppMemberDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AppMemberDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/app_member_address.go b/server/internal/dao/internal/app_member_address.go
new file mode 100644
index 0000000..e13c2f9
--- /dev/null
+++ b/server/internal/dao/internal/app_member_address.go
@@ -0,0 +1,115 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AppMemberAddressDao is the data access object for the table hg_app_member_address.
+type AppMemberAddressDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AppMemberAddressColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AppMemberAddressColumns defines and stores column names for the table hg_app_member_address.
+type AppMemberAddressColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ MemberId string // 会员ID
+ ReceiverCipher string // 收货人密文
+ ReceiverMask string // 收货人脱敏值
+ MobileCipher string // 手机号密文
+ MobileMask string // 手机号脱敏值
+ Province string // 省
+ City string // 市
+ District string // 区县
+ AddressCipher string // 详细地址密文
+ AddressMask string // 详细地址脱敏值
+ IsDefault string // 默认地址
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// appMemberAddressColumns holds the columns for the table hg_app_member_address.
+var appMemberAddressColumns = AppMemberAddressColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ MemberId: "member_id",
+ ReceiverCipher: "receiver_cipher",
+ ReceiverMask: "receiver_mask",
+ MobileCipher: "mobile_cipher",
+ MobileMask: "mobile_mask",
+ Province: "province",
+ City: "city",
+ District: "district",
+ AddressCipher: "address_cipher",
+ AddressMask: "address_mask",
+ IsDefault: "is_default",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewAppMemberAddressDao creates and returns a new DAO object for table data access.
+func NewAppMemberAddressDao(handlers ...gdb.ModelHandler) *AppMemberAddressDao {
+ return &AppMemberAddressDao{
+ group: "default",
+ table: "hg_app_member_address",
+ columns: appMemberAddressColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AppMemberAddressDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AppMemberAddressDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AppMemberAddressDao) Columns() AppMemberAddressColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AppMemberAddressDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AppMemberAddressDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AppMemberAddressDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/app_member_level.go b/server/internal/dao/internal/app_member_level.go
new file mode 100644
index 0000000..501cff0
--- /dev/null
+++ b/server/internal/dao/internal/app_member_level.go
@@ -0,0 +1,111 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AppMemberLevelDao is the data access object for the table hg_app_member_level.
+type AppMemberLevelDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AppMemberLevelColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AppMemberLevelColumns defines and stores column names for the table hg_app_member_level.
+type AppMemberLevelColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ LevelCode string // 稳定等级编码
+ Name string // 等级名称
+ IconAttachmentId string // 图标附件ID
+ IconUrl string // 图标URL
+ CurrentVersionId string // 当前发布版本ID
+ MemberCount string // 会员数(可重建)
+ Status string // 状态 1正常 2停用
+ Sort string // 排序
+ Remark string // 备注
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// appMemberLevelColumns holds the columns for the table hg_app_member_level.
+var appMemberLevelColumns = AppMemberLevelColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ LevelCode: "level_code",
+ Name: "name",
+ IconAttachmentId: "icon_attachment_id",
+ IconUrl: "icon_url",
+ CurrentVersionId: "current_version_id",
+ MemberCount: "member_count",
+ Status: "status",
+ Sort: "sort",
+ Remark: "remark",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewAppMemberLevelDao creates and returns a new DAO object for table data access.
+func NewAppMemberLevelDao(handlers ...gdb.ModelHandler) *AppMemberLevelDao {
+ return &AppMemberLevelDao{
+ group: "default",
+ table: "hg_app_member_level",
+ columns: appMemberLevelColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AppMemberLevelDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AppMemberLevelDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AppMemberLevelDao) Columns() AppMemberLevelColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AppMemberLevelDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AppMemberLevelDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AppMemberLevelDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/app_member_level_version.go b/server/internal/dao/internal/app_member_level_version.go
new file mode 100644
index 0000000..02932dc
--- /dev/null
+++ b/server/internal/dao/internal/app_member_level_version.go
@@ -0,0 +1,119 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AppMemberLevelVersionDao is the data access object for the table hg_app_member_level_version.
+type AppMemberLevelVersionDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AppMemberLevelVersionColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AppMemberLevelVersionColumns defines and stores column names for the table hg_app_member_level_version.
+type AppMemberLevelVersionColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ LevelId string // 等级ID
+ VersionNo string // 版本号
+ UpgradeAmount string // 升级金额(分)
+ GiftAmount string // 赠送金额(分)
+ DailyOrderLimit string // 每日接单次数
+ CommissionRate string // 佣金万分比
+ DailyWithdrawLimit string // 每日提现次数
+ RuleJson string // 扩展规则快照
+ PublishStatus string // 发布状态
+ EffectiveAt string // 计划生效时间
+ PublishedAt string // 发布时间
+ ApprovalRequestId string // 审批单ID
+ BaseVersionId string // 基础版本ID
+ Version string // 乐观锁
+ Remark string // 变更说明
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// appMemberLevelVersionColumns holds the columns for the table hg_app_member_level_version.
+var appMemberLevelVersionColumns = AppMemberLevelVersionColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ LevelId: "level_id",
+ VersionNo: "version_no",
+ UpgradeAmount: "upgrade_amount",
+ GiftAmount: "gift_amount",
+ DailyOrderLimit: "daily_order_limit",
+ CommissionRate: "commission_rate",
+ DailyWithdrawLimit: "daily_withdraw_limit",
+ RuleJson: "rule_json",
+ PublishStatus: "publish_status",
+ EffectiveAt: "effective_at",
+ PublishedAt: "published_at",
+ ApprovalRequestId: "approval_request_id",
+ BaseVersionId: "base_version_id",
+ Version: "version",
+ Remark: "remark",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewAppMemberLevelVersionDao creates and returns a new DAO object for table data access.
+func NewAppMemberLevelVersionDao(handlers ...gdb.ModelHandler) *AppMemberLevelVersionDao {
+ return &AppMemberLevelVersionDao{
+ group: "default",
+ table: "hg_app_member_level_version",
+ columns: appMemberLevelVersionColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AppMemberLevelVersionDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AppMemberLevelVersionDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AppMemberLevelVersionDao) Columns() AppMemberLevelVersionColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AppMemberLevelVersionDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AppMemberLevelVersionDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AppMemberLevelVersionDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/app_member_notice.go b/server/internal/dao/internal/app_member_notice.go
new file mode 100644
index 0000000..189b660
--- /dev/null
+++ b/server/internal/dao/internal/app_member_notice.go
@@ -0,0 +1,103 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AppMemberNoticeDao is the data access object for the table hg_app_member_notice.
+type AppMemberNoticeDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AppMemberNoticeColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AppMemberNoticeColumns defines and stores column names for the table hg_app_member_notice.
+type AppMemberNoticeColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ MemberId string // 会员ID,0为全体
+ Title string // 标题
+ Content string // 内容
+ SourceType string // 来源 1真实通知 2运营模拟
+ StartAt string // 开始时间
+ EndAt string // 结束时间
+ NoticeStatus string // 状态 1有效 2撤回
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// appMemberNoticeColumns holds the columns for the table hg_app_member_notice.
+var appMemberNoticeColumns = AppMemberNoticeColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ MemberId: "member_id",
+ Title: "title",
+ Content: "content",
+ SourceType: "source_type",
+ StartAt: "start_at",
+ EndAt: "end_at",
+ NoticeStatus: "notice_status",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewAppMemberNoticeDao creates and returns a new DAO object for table data access.
+func NewAppMemberNoticeDao(handlers ...gdb.ModelHandler) *AppMemberNoticeDao {
+ return &AppMemberNoticeDao{
+ group: "default",
+ table: "hg_app_member_notice",
+ columns: appMemberNoticeColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AppMemberNoticeDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AppMemberNoticeDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AppMemberNoticeDao) Columns() AppMemberNoticeColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AppMemberNoticeDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AppMemberNoticeDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AppMemberNoticeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/app_member_payment_account.go b/server/internal/dao/internal/app_member_payment_account.go
new file mode 100644
index 0000000..6f3f3ac
--- /dev/null
+++ b/server/internal/dao/internal/app_member_payment_account.go
@@ -0,0 +1,121 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AppMemberPaymentAccountDao is the data access object for the table hg_app_member_payment_account.
+type AppMemberPaymentAccountDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AppMemberPaymentAccountColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AppMemberPaymentAccountColumns defines and stores column names for the table hg_app_member_payment_account.
+type AppMemberPaymentAccountColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ MemberId string // 会员ID
+ AccountType string // 账户类型
+ BankCode string // 银行编码
+ BankName string // 银行名称
+ HolderCipher string // 持有人密文
+ HolderMask string // 持有人脱敏值
+ MobileCipher string // 预留手机号密文
+ MobileMask string // 预留手机号脱敏值
+ AccountNoCipher string // 账号密文
+ AccountNoHash string // 账号检索哈希
+ AccountNoMask string // 账号脱敏值
+ QrAttachmentId string // 收款码附件ID
+ VerifyStatus string // 核验状态
+ IsDefault string // 默认账户
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// appMemberPaymentAccountColumns holds the columns for the table hg_app_member_payment_account.
+var appMemberPaymentAccountColumns = AppMemberPaymentAccountColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ MemberId: "member_id",
+ AccountType: "account_type",
+ BankCode: "bank_code",
+ BankName: "bank_name",
+ HolderCipher: "holder_cipher",
+ HolderMask: "holder_mask",
+ MobileCipher: "mobile_cipher",
+ MobileMask: "mobile_mask",
+ AccountNoCipher: "account_no_cipher",
+ AccountNoHash: "account_no_hash",
+ AccountNoMask: "account_no_mask",
+ QrAttachmentId: "qr_attachment_id",
+ VerifyStatus: "verify_status",
+ IsDefault: "is_default",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewAppMemberPaymentAccountDao creates and returns a new DAO object for table data access.
+func NewAppMemberPaymentAccountDao(handlers ...gdb.ModelHandler) *AppMemberPaymentAccountDao {
+ return &AppMemberPaymentAccountDao{
+ group: "default",
+ table: "hg_app_member_payment_account",
+ columns: appMemberPaymentAccountColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AppMemberPaymentAccountDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AppMemberPaymentAccountDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AppMemberPaymentAccountDao) Columns() AppMemberPaymentAccountColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AppMemberPaymentAccountDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AppMemberPaymentAccountDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AppMemberPaymentAccountDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/app_member_profile.go b/server/internal/dao/internal/app_member_profile.go
new file mode 100644
index 0000000..af5d6c5
--- /dev/null
+++ b/server/internal/dao/internal/app_member_profile.go
@@ -0,0 +1,107 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AppMemberProfileDao is the data access object for the table hg_app_member_profile.
+type AppMemberProfileDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AppMemberProfileColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AppMemberProfileColumns defines and stores column names for the table hg_app_member_profile.
+type AppMemberProfileColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ MemberId string // 会员ID
+ RealNameCipher string // 真实姓名密文
+ RealNameMask string // 真实姓名脱敏值
+ IdNoCipher string // 证件号密文
+ IdNoHash string // 证件号检索哈希
+ IdNoMask string // 证件号脱敏值
+ AvatarAttachmentId string // 头像附件ID
+ KycStatus string // 实名状态
+ KycVerifiedAt string // 实名时间
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// appMemberProfileColumns holds the columns for the table hg_app_member_profile.
+var appMemberProfileColumns = AppMemberProfileColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ MemberId: "member_id",
+ RealNameCipher: "real_name_cipher",
+ RealNameMask: "real_name_mask",
+ IdNoCipher: "id_no_cipher",
+ IdNoHash: "id_no_hash",
+ IdNoMask: "id_no_mask",
+ AvatarAttachmentId: "avatar_attachment_id",
+ KycStatus: "kyc_status",
+ KycVerifiedAt: "kyc_verified_at",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewAppMemberProfileDao creates and returns a new DAO object for table data access.
+func NewAppMemberProfileDao(handlers ...gdb.ModelHandler) *AppMemberProfileDao {
+ return &AppMemberProfileDao{
+ group: "default",
+ table: "hg_app_member_profile",
+ columns: appMemberProfileColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AppMemberProfileDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AppMemberProfileDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AppMemberProfileDao) Columns() AppMemberProfileColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AppMemberProfileDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AppMemberProfileDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AppMemberProfileDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/app_member_status_log.go b/server/internal/dao/internal/app_member_status_log.go
new file mode 100644
index 0000000..e96182d
--- /dev/null
+++ b/server/internal/dao/internal/app_member_status_log.go
@@ -0,0 +1,101 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// AppMemberStatusLogDao is the data access object for the table hg_app_member_status_log.
+type AppMemberStatusLogDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns AppMemberStatusLogColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// AppMemberStatusLogColumns defines and stores column names for the table hg_app_member_status_log.
+type AppMemberStatusLogColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ MemberId string // 会员ID
+ FromStatus string // 原状态
+ ToStatus string // 目标状态
+ ReasonCode string // 原因编码
+ ReasonText string // 原因说明
+ EffectiveAt string // 生效时间
+ ExpireAt string // 失效时间
+ ApprovalRequestId string // 审批单ID
+ OperatorId string // 执行人
+ CreatedAt string // 创建时间
+}
+
+// appMemberStatusLogColumns holds the columns for the table hg_app_member_status_log.
+var appMemberStatusLogColumns = AppMemberStatusLogColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ MemberId: "member_id",
+ FromStatus: "from_status",
+ ToStatus: "to_status",
+ ReasonCode: "reason_code",
+ ReasonText: "reason_text",
+ EffectiveAt: "effective_at",
+ ExpireAt: "expire_at",
+ ApprovalRequestId: "approval_request_id",
+ OperatorId: "operator_id",
+ CreatedAt: "created_at",
+}
+
+// NewAppMemberStatusLogDao creates and returns a new DAO object for table data access.
+func NewAppMemberStatusLogDao(handlers ...gdb.ModelHandler) *AppMemberStatusLogDao {
+ return &AppMemberStatusLogDao{
+ group: "default",
+ table: "hg_app_member_status_log",
+ columns: appMemberStatusLogColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *AppMemberStatusLogDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *AppMemberStatusLogDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *AppMemberStatusLogDao) Columns() AppMemberStatusLogColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *AppMemberStatusLogDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *AppMemberStatusLogDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *AppMemberStatusLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/approval_action.go b/server/internal/dao/internal/approval_action.go
new file mode 100644
index 0000000..d1c1353
--- /dev/null
+++ b/server/internal/dao/internal/approval_action.go
@@ -0,0 +1,101 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ApprovalActionDao is the data access object for the table hg_approval_action.
+type ApprovalActionDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns ApprovalActionColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// ApprovalActionColumns defines and stores column names for the table hg_approval_action.
+type ApprovalActionColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ ApprovalRequestId string // 审批请求ID
+ StepNo string // 节点顺序
+ ActorId string // 操作人
+ Action string // 审批动作
+ ReasonCode string // 原因编码
+ Comment string // 审批意见
+ SnapshotJson string // 操作时快照
+ ActorIpCipher string // 操作IP密文
+ MfaVerified string // 是否二次认证
+ CreatedAt string // 创建时间
+}
+
+// approvalActionColumns holds the columns for the table hg_approval_action.
+var approvalActionColumns = ApprovalActionColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ ApprovalRequestId: "approval_request_id",
+ StepNo: "step_no",
+ ActorId: "actor_id",
+ Action: "action",
+ ReasonCode: "reason_code",
+ Comment: "comment",
+ SnapshotJson: "snapshot_json",
+ ActorIpCipher: "actor_ip_cipher",
+ MfaVerified: "mfa_verified",
+ CreatedAt: "created_at",
+}
+
+// NewApprovalActionDao creates and returns a new DAO object for table data access.
+func NewApprovalActionDao(handlers ...gdb.ModelHandler) *ApprovalActionDao {
+ return &ApprovalActionDao{
+ group: "default",
+ table: "hg_approval_action",
+ columns: approvalActionColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *ApprovalActionDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *ApprovalActionDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *ApprovalActionDao) Columns() ApprovalActionColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *ApprovalActionDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *ApprovalActionDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *ApprovalActionDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/approval_request.go b/server/internal/dao/internal/approval_request.go
new file mode 100644
index 0000000..c0aed92
--- /dev/null
+++ b/server/internal/dao/internal/approval_request.go
@@ -0,0 +1,125 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ApprovalRequestDao is the data access object for the table hg_approval_request.
+type ApprovalRequestDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns ApprovalRequestColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// ApprovalRequestColumns defines and stores column names for the table hg_approval_request.
+type ApprovalRequestColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ ApprovalNo string // 审批单号
+ ApprovalType string // 审批类型
+ TargetType string // 目标类型
+ TargetId string // 目标ID
+ Action string // 拟执行动作
+ Title string // 审批标题
+ PayloadJson string // 待执行数据快照
+ DiffJson string // 前后差异
+ RiskLevel string // 风险级别
+ RequiredApprovals string // 需要通过数
+ ApprovalStatus string // 审批状态
+ ApplicantId string // 申请人
+ SubmittedAt string // 提交时间
+ DecidedAt string // 决定时间
+ ExecutedAt string // 执行时间
+ ExpireAt string // 超时时间
+ Version string // 乐观锁
+ Remark string // 备注
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// approvalRequestColumns holds the columns for the table hg_approval_request.
+var approvalRequestColumns = ApprovalRequestColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ ApprovalNo: "approval_no",
+ ApprovalType: "approval_type",
+ TargetType: "target_type",
+ TargetId: "target_id",
+ Action: "action",
+ Title: "title",
+ PayloadJson: "payload_json",
+ DiffJson: "diff_json",
+ RiskLevel: "risk_level",
+ RequiredApprovals: "required_approvals",
+ ApprovalStatus: "approval_status",
+ ApplicantId: "applicant_id",
+ SubmittedAt: "submitted_at",
+ DecidedAt: "decided_at",
+ ExecutedAt: "executed_at",
+ ExpireAt: "expire_at",
+ Version: "version",
+ Remark: "remark",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewApprovalRequestDao creates and returns a new DAO object for table data access.
+func NewApprovalRequestDao(handlers ...gdb.ModelHandler) *ApprovalRequestDao {
+ return &ApprovalRequestDao{
+ group: "default",
+ table: "hg_approval_request",
+ columns: approvalRequestColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *ApprovalRequestDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *ApprovalRequestDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *ApprovalRequestDao) Columns() ApprovalRequestColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *ApprovalRequestDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *ApprovalRequestDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *ApprovalRequestDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/banner.go b/server/internal/dao/internal/banner.go
new file mode 100644
index 0000000..d6abe64
--- /dev/null
+++ b/server/internal/dao/internal/banner.go
@@ -0,0 +1,119 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// BannerDao is the data access object for the table hg_banner.
+type BannerDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns BannerColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// BannerColumns defines and stores column names for the table hg_banner.
+type BannerColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ Name string // 后台名称
+ Position string // 投放位置
+ ImageAttachmentId string // 图片附件ID
+ ImageUrl string // 图片URL
+ AltText string // 替代文本
+ TargetType string // 跳转类型
+ TargetValue string // 跳转值
+ StartAt string // 开始时间
+ EndAt string // 结束时间
+ PublishStatus string // 发布状态
+ Sort string // 排序
+ Version string // 乐观锁
+ Remark string // 备注
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// bannerColumns holds the columns for the table hg_banner.
+var bannerColumns = BannerColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ Name: "name",
+ Position: "position",
+ ImageAttachmentId: "image_attachment_id",
+ ImageUrl: "image_url",
+ AltText: "alt_text",
+ TargetType: "target_type",
+ TargetValue: "target_value",
+ StartAt: "start_at",
+ EndAt: "end_at",
+ PublishStatus: "publish_status",
+ Sort: "sort",
+ Version: "version",
+ Remark: "remark",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewBannerDao creates and returns a new DAO object for table data access.
+func NewBannerDao(handlers ...gdb.ModelHandler) *BannerDao {
+ return &BannerDao{
+ group: "default",
+ table: "hg_banner",
+ columns: bannerColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *BannerDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *BannerDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *BannerDao) Columns() BannerColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *BannerDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *BannerDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *BannerDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/biz_audit_log.go b/server/internal/dao/internal/biz_audit_log.go
new file mode 100644
index 0000000..c5133e6
--- /dev/null
+++ b/server/internal/dao/internal/biz_audit_log.go
@@ -0,0 +1,113 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// BizAuditLogDao is the data access object for the table hg_biz_audit_log.
+type BizAuditLogDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns BizAuditLogColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// BizAuditLogColumns defines and stores column names for the table hg_biz_audit_log.
+type BizAuditLogColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ AuditNo string // 审计号
+ ActorType string // 操作人类型
+ ActorId string // 操作人ID
+ Module string // 业务模块
+ Action string // 操作动作
+ TargetType string // 目标类型
+ TargetId string // 目标ID
+ BeforeDigest string // 变更前摘要
+ AfterDigest string // 变更后摘要
+ ChangeJson string // 已脱敏差异
+ Reason string // 操作原因
+ ApprovalNo string // 审批单号
+ TraceId string // 链路ID
+ PrevHash string // 前一条哈希
+ RowHash string // 当前行哈希
+ CreatedAt string // 创建时间
+}
+
+// bizAuditLogColumns holds the columns for the table hg_biz_audit_log.
+var bizAuditLogColumns = BizAuditLogColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ AuditNo: "audit_no",
+ ActorType: "actor_type",
+ ActorId: "actor_id",
+ Module: "module",
+ Action: "action",
+ TargetType: "target_type",
+ TargetId: "target_id",
+ BeforeDigest: "before_digest",
+ AfterDigest: "after_digest",
+ ChangeJson: "change_json",
+ Reason: "reason",
+ ApprovalNo: "approval_no",
+ TraceId: "trace_id",
+ PrevHash: "prev_hash",
+ RowHash: "row_hash",
+ CreatedAt: "created_at",
+}
+
+// NewBizAuditLogDao creates and returns a new DAO object for table data access.
+func NewBizAuditLogDao(handlers ...gdb.ModelHandler) *BizAuditLogDao {
+ return &BizAuditLogDao{
+ group: "default",
+ table: "hg_biz_audit_log",
+ columns: bizAuditLogColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *BizAuditLogDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *BizAuditLogDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *BizAuditLogDao) Columns() BizAuditLogColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *BizAuditLogDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *BizAuditLogDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *BizAuditLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/content.go b/server/internal/dao/internal/content.go
new file mode 100644
index 0000000..aac7f11
--- /dev/null
+++ b/server/internal/dao/internal/content.go
@@ -0,0 +1,111 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ContentDao is the data access object for the table hg_content.
+type ContentDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns ContentColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// ContentColumns defines and stores column names for the table hg_content.
+type ContentColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ ContentKey string // 稳定内容标识
+ ContentType string // 内容类型
+ Title string // 后台标题
+ PublishedVersionId string // 当前发布版本ID
+ PublishStatus string // 发布状态
+ PublishedAt string // 发布时间
+ Sort string // 排序
+ Version string // 乐观锁
+ Remark string // 备注
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// contentColumns holds the columns for the table hg_content.
+var contentColumns = ContentColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ ContentKey: "content_key",
+ ContentType: "content_type",
+ Title: "title",
+ PublishedVersionId: "published_version_id",
+ PublishStatus: "publish_status",
+ PublishedAt: "published_at",
+ Sort: "sort",
+ Version: "version",
+ Remark: "remark",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewContentDao creates and returns a new DAO object for table data access.
+func NewContentDao(handlers ...gdb.ModelHandler) *ContentDao {
+ return &ContentDao{
+ group: "default",
+ table: "hg_content",
+ columns: contentColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *ContentDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *ContentDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *ContentDao) Columns() ContentColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *ContentDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *ContentDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *ContentDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/content_version.go b/server/internal/dao/internal/content_version.go
new file mode 100644
index 0000000..3e6268b
--- /dev/null
+++ b/server/internal/dao/internal/content_version.go
@@ -0,0 +1,107 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ContentVersionDao is the data access object for the table hg_content_version.
+type ContentVersionDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns ContentVersionColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// ContentVersionColumns defines and stores column names for the table hg_content_version.
+type ContentVersionColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ ContentId string // 内容ID
+ VersionNo string // 版本号
+ Title string // 展示标题
+ Summary string // 摘要
+ BodyHtml string // 清洗后HTML
+ BodyText string // 降级文本
+ CoverUrl string // 封面图片URL
+ AssetIds string // 引用附件ID
+ PublishStatus string // 发布状态
+ EffectiveAt string // 计划生效时间
+ ApprovalRequestId string // 审批单ID
+ CreatedBy string // 创建者
+ CreatedAt string // 创建时间
+}
+
+// contentVersionColumns holds the columns for the table hg_content_version.
+var contentVersionColumns = ContentVersionColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ ContentId: "content_id",
+ VersionNo: "version_no",
+ Title: "title",
+ Summary: "summary",
+ BodyHtml: "body_html",
+ BodyText: "body_text",
+ CoverUrl: "cover_url",
+ AssetIds: "asset_ids",
+ PublishStatus: "publish_status",
+ EffectiveAt: "effective_at",
+ ApprovalRequestId: "approval_request_id",
+ CreatedBy: "created_by",
+ CreatedAt: "created_at",
+}
+
+// NewContentVersionDao creates and returns a new DAO object for table data access.
+func NewContentVersionDao(handlers ...gdb.ModelHandler) *ContentVersionDao {
+ return &ContentVersionDao{
+ group: "default",
+ table: "hg_content_version",
+ columns: contentVersionColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *ContentVersionDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *ContentVersionDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *ContentVersionDao) Columns() ContentVersionColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *ContentVersionDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *ContentVersionDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *ContentVersionDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/customer_service.go b/server/internal/dao/internal/customer_service.go
new file mode 100644
index 0000000..f9c4e48
--- /dev/null
+++ b/server/internal/dao/internal/customer_service.go
@@ -0,0 +1,115 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// CustomerServiceDao is the data access object for the table hg_customer_service.
+type CustomerServiceDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns CustomerServiceColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// CustomerServiceColumns defines and stores column names for the table hg_customer_service.
+type CustomerServiceColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ ServiceCode string // 客服编码
+ Name string // 客服名称
+ AvatarUrl string // 头像地址
+ WorkTime string // 工作时间说明
+ OnlineStatus string // 在线状态
+ ServiceUrl string // 客服跳转URL
+ BackupContact string // 备用联系方式
+ SessionMapping string // 第三方会话映射
+ Status string // 状态
+ Sort string // 排序
+ Remark string // 备注
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// customerServiceColumns holds the columns for the table hg_customer_service.
+var customerServiceColumns = CustomerServiceColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ ServiceCode: "service_code",
+ Name: "name",
+ AvatarUrl: "avatar_url",
+ WorkTime: "work_time",
+ OnlineStatus: "online_status",
+ ServiceUrl: "service_url",
+ BackupContact: "backup_contact",
+ SessionMapping: "session_mapping",
+ Status: "status",
+ Sort: "sort",
+ Remark: "remark",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewCustomerServiceDao creates and returns a new DAO object for table data access.
+func NewCustomerServiceDao(handlers ...gdb.ModelHandler) *CustomerServiceDao {
+ return &CustomerServiceDao{
+ group: "default",
+ table: "hg_customer_service",
+ columns: customerServiceColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *CustomerServiceDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *CustomerServiceDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *CustomerServiceDao) Columns() CustomerServiceColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *CustomerServiceDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *CustomerServiceDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *CustomerServiceDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/dashboard_daily_stat.go b/server/internal/dao/internal/dashboard_daily_stat.go
new file mode 100644
index 0000000..1b8766f
--- /dev/null
+++ b/server/internal/dao/internal/dashboard_daily_stat.go
@@ -0,0 +1,99 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// DashboardDailyStatDao is the data access object for the table hg_dashboard_daily_stat.
+type DashboardDailyStatDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns DashboardDailyStatColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// DashboardDailyStatColumns defines and stores column names for the table hg_dashboard_daily_stat.
+type DashboardDailyStatColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ StatDate string // 统计日期
+ DimensionType string // 维度类型
+ DimensionValue string // 维度值
+ MetricCode string // 指标编码
+ MetricCount string // 指标数量
+ MetricAmount string // 指标金额(最小货币单位)
+ CalculatedAt string // 计算时间
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// dashboardDailyStatColumns holds the columns for the table hg_dashboard_daily_stat.
+var dashboardDailyStatColumns = DashboardDailyStatColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ StatDate: "stat_date",
+ DimensionType: "dimension_type",
+ DimensionValue: "dimension_value",
+ MetricCode: "metric_code",
+ MetricCount: "metric_count",
+ MetricAmount: "metric_amount",
+ CalculatedAt: "calculated_at",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewDashboardDailyStatDao creates and returns a new DAO object for table data access.
+func NewDashboardDailyStatDao(handlers ...gdb.ModelHandler) *DashboardDailyStatDao {
+ return &DashboardDailyStatDao{
+ group: "default",
+ table: "hg_dashboard_daily_stat",
+ columns: dashboardDailyStatColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *DashboardDailyStatDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *DashboardDailyStatDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *DashboardDailyStatDao) Columns() DashboardDailyStatColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *DashboardDailyStatDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *DashboardDailyStatDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *DashboardDailyStatDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/finance_review.go b/server/internal/dao/internal/finance_review.go
new file mode 100644
index 0000000..0ba0399
--- /dev/null
+++ b/server/internal/dao/internal/finance_review.go
@@ -0,0 +1,101 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// FinanceReviewDao is the data access object for the table hg_finance_review.
+type FinanceReviewDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns FinanceReviewColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// FinanceReviewColumns defines and stores column names for the table hg_finance_review.
+type FinanceReviewColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ ApprovalRequestId string // 审批单ID
+ BizType string // 业务类型
+ BizId string // 业务ID
+ ReviewStage string // 审核阶段
+ ReviewerId string // 审核人
+ Decision string // 审核结论
+ ReasonCode string // 原因编码
+ ReasonText string // 审核说明
+ SnapshotJson string // 审核快照
+ CreatedAt string // 创建时间
+}
+
+// financeReviewColumns holds the columns for the table hg_finance_review.
+var financeReviewColumns = FinanceReviewColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ ApprovalRequestId: "approval_request_id",
+ BizType: "biz_type",
+ BizId: "biz_id",
+ ReviewStage: "review_stage",
+ ReviewerId: "reviewer_id",
+ Decision: "decision",
+ ReasonCode: "reason_code",
+ ReasonText: "reason_text",
+ SnapshotJson: "snapshot_json",
+ CreatedAt: "created_at",
+}
+
+// NewFinanceReviewDao creates and returns a new DAO object for table data access.
+func NewFinanceReviewDao(handlers ...gdb.ModelHandler) *FinanceReviewDao {
+ return &FinanceReviewDao{
+ group: "default",
+ table: "hg_finance_review",
+ columns: financeReviewColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *FinanceReviewDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *FinanceReviewDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *FinanceReviewDao) Columns() FinanceReviewColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *FinanceReviewDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *FinanceReviewDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *FinanceReviewDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/idempotency_record.go b/server/internal/dao/internal/idempotency_record.go
new file mode 100644
index 0000000..a5ae6ab
--- /dev/null
+++ b/server/internal/dao/internal/idempotency_record.go
@@ -0,0 +1,103 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// IdempotencyRecordDao is the data access object for the table hg_idempotency_record.
+type IdempotencyRecordDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns IdempotencyRecordColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// IdempotencyRecordColumns defines and stores column names for the table hg_idempotency_record.
+type IdempotencyRecordColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ Scope string // 业务作用域
+ IdempotencyKey string // 幂等键
+ RequestDigest string // 请求摘要
+ ResourceType string // 资源类型
+ ResourceId string // 资源ID
+ ProcessStatus string // 处理状态
+ ResponseCode string // 响应码
+ ResponseDigest string // 响应摘要
+ ExpireAt string // 过期时间
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// idempotencyRecordColumns holds the columns for the table hg_idempotency_record.
+var idempotencyRecordColumns = IdempotencyRecordColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ Scope: "scope",
+ IdempotencyKey: "idempotency_key",
+ RequestDigest: "request_digest",
+ ResourceType: "resource_type",
+ ResourceId: "resource_id",
+ ProcessStatus: "process_status",
+ ResponseCode: "response_code",
+ ResponseDigest: "response_digest",
+ ExpireAt: "expire_at",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewIdempotencyRecordDao creates and returns a new DAO object for table data access.
+func NewIdempotencyRecordDao(handlers ...gdb.ModelHandler) *IdempotencyRecordDao {
+ return &IdempotencyRecordDao{
+ group: "default",
+ table: "hg_idempotency_record",
+ columns: idempotencyRecordColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *IdempotencyRecordDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *IdempotencyRecordDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *IdempotencyRecordDao) Columns() IdempotencyRecordColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *IdempotencyRecordDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *IdempotencyRecordDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *IdempotencyRecordDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/outbox_event.go b/server/internal/dao/internal/outbox_event.go
new file mode 100644
index 0000000..3d5e347
--- /dev/null
+++ b/server/internal/dao/internal/outbox_event.go
@@ -0,0 +1,103 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// OutboxEventDao is the data access object for the table hg_outbox_event.
+type OutboxEventDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns OutboxEventColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// OutboxEventColumns defines and stores column names for the table hg_outbox_event.
+type OutboxEventColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ EventNo string // 事件号
+ AggregateType string // 聚合根类型
+ AggregateId string // 聚合根ID
+ EventType string // 事件类型
+ PayloadJson string // 已脱敏事件数据
+ PublishStatus string // 发送状态
+ RetryCount string // 重试次数
+ NextRetryAt string // 下次重试时间
+ LastError string // 最后错误
+ CreatedAt string // 创建时间
+ PublishedAt string // 发送时间
+}
+
+// outboxEventColumns holds the columns for the table hg_outbox_event.
+var outboxEventColumns = OutboxEventColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ EventNo: "event_no",
+ AggregateType: "aggregate_type",
+ AggregateId: "aggregate_id",
+ EventType: "event_type",
+ PayloadJson: "payload_json",
+ PublishStatus: "publish_status",
+ RetryCount: "retry_count",
+ NextRetryAt: "next_retry_at",
+ LastError: "last_error",
+ CreatedAt: "created_at",
+ PublishedAt: "published_at",
+}
+
+// NewOutboxEventDao creates and returns a new DAO object for table data access.
+func NewOutboxEventDao(handlers ...gdb.ModelHandler) *OutboxEventDao {
+ return &OutboxEventDao{
+ group: "default",
+ table: "hg_outbox_event",
+ columns: outboxEventColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *OutboxEventDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *OutboxEventDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *OutboxEventDao) Columns() OutboxEventColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *OutboxEventDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *OutboxEventDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *OutboxEventDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/pay_log.go b/server/internal/dao/internal/pay_log.go
new file mode 100755
index 0000000..0ef4f61
--- /dev/null
+++ b/server/internal/dao/internal/pay_log.go
@@ -0,0 +1,137 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// PayLogDao is the data access object for the table hg_pay_log.
+type PayLogDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns PayLogColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// PayLogColumns defines and stores column names for the table hg_pay_log.
+type PayLogColumns struct {
+ Id string // 主键
+ MemberId string // 会员ID
+ AppId string // 应用ID
+ AddonsName string // 插件名称
+ OrderSn string // 关联订单号
+ OrderGroup string // 组别[默认统一支付类型]
+ Openid string // openid
+ MchId string // 商户支付账户
+ Subject string // 订单标题
+ Detail string // 支付商品详情
+ AuthCode string // 刷卡码
+ OutTradeNo string // 商户订单号
+ TransactionId string // 交易号
+ PayType string // 支付类型
+ PayAmount string // 支付金额
+ ActualAmount string // 实付金额
+ PayStatus string // 支付状态
+ PayAt string // 支付时间
+ TradeType string // 交易类型
+ RefundSn string // 退款单号
+ IsRefund string // 是否退款
+ Custom string // 自定义参数
+ CreateIp string // 创建者IP
+ PayIp string // 支付者IP
+ NotifyUrl string // 支付通知回调地址
+ ReturnUrl string // 买家付款成功跳转地址
+ TraceIds string // 链路ID集合
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+}
+
+// payLogColumns holds the columns for the table hg_pay_log.
+var payLogColumns = PayLogColumns{
+ Id: "id",
+ MemberId: "member_id",
+ AppId: "app_id",
+ AddonsName: "addons_name",
+ OrderSn: "order_sn",
+ OrderGroup: "order_group",
+ Openid: "openid",
+ MchId: "mch_id",
+ Subject: "subject",
+ Detail: "detail",
+ AuthCode: "auth_code",
+ OutTradeNo: "out_trade_no",
+ TransactionId: "transaction_id",
+ PayType: "pay_type",
+ PayAmount: "pay_amount",
+ ActualAmount: "actual_amount",
+ PayStatus: "pay_status",
+ PayAt: "pay_at",
+ TradeType: "trade_type",
+ RefundSn: "refund_sn",
+ IsRefund: "is_refund",
+ Custom: "custom",
+ CreateIp: "create_ip",
+ PayIp: "pay_ip",
+ NotifyUrl: "notify_url",
+ ReturnUrl: "return_url",
+ TraceIds: "trace_ids",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewPayLogDao creates and returns a new DAO object for table data access.
+func NewPayLogDao(handlers ...gdb.ModelHandler) *PayLogDao {
+ return &PayLogDao{
+ group: "default",
+ table: "hg_pay_log",
+ columns: payLogColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *PayLogDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *PayLogDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *PayLogDao) Columns() PayLogColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *PayLogDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *PayLogDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *PayLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/pay_refund.go b/server/internal/dao/internal/pay_refund.go
new file mode 100755
index 0000000..8b7684f
--- /dev/null
+++ b/server/internal/dao/internal/pay_refund.go
@@ -0,0 +1,103 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// PayRefundDao is the data access object for the table hg_pay_refund.
+type PayRefundDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns PayRefundColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// PayRefundColumns defines and stores column names for the table hg_pay_refund.
+type PayRefundColumns struct {
+ Id string // 主键ID
+ MemberId string // 会员ID
+ AppId string // 应用ID
+ OrderSn string // 业务订单号
+ RefundTradeNo string // 退款交易号
+ RefundMoney string // 退款金额
+ RefundWay string // 退款方式
+ Ip string // 申请者IP
+ Reason string // 申请退款原因
+ Remark string // 退款备注
+ Status string // 退款状态
+ CreatedAt string // 申请时间
+ UpdatedAt string // 更新时间
+}
+
+// payRefundColumns holds the columns for the table hg_pay_refund.
+var payRefundColumns = PayRefundColumns{
+ Id: "id",
+ MemberId: "member_id",
+ AppId: "app_id",
+ OrderSn: "order_sn",
+ RefundTradeNo: "refund_trade_no",
+ RefundMoney: "refund_money",
+ RefundWay: "refund_way",
+ Ip: "ip",
+ Reason: "reason",
+ Remark: "remark",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewPayRefundDao creates and returns a new DAO object for table data access.
+func NewPayRefundDao(handlers ...gdb.ModelHandler) *PayRefundDao {
+ return &PayRefundDao{
+ group: "default",
+ table: "hg_pay_refund",
+ columns: payRefundColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *PayRefundDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *PayRefundDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *PayRefundDao) Columns() PayRefundColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *PayRefundDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *PayRefundDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *PayRefundDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/payment_channel.go b/server/internal/dao/internal/payment_channel.go
new file mode 100644
index 0000000..78d87c4
--- /dev/null
+++ b/server/internal/dao/internal/payment_channel.go
@@ -0,0 +1,117 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// PaymentChannelDao is the data access object for the table hg_payment_channel.
+type PaymentChannelDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns PaymentChannelColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// PaymentChannelColumns defines and stores column names for the table hg_payment_channel.
+type PaymentChannelColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ ChannelCode string // 渠道编码
+ Name string // 渠道名称
+ ChannelType string // 渠道类型
+ Direction string // 支持方向
+ ConfigCipher string // 渠道配置密文
+ MinAmount string // 最小金额(分)
+ MaxAmount string // 最大金额(分)
+ FeeType string // 手续费类型
+ FeeFixedAmount string // 固定手续费(分)
+ FeeRate string // 费率(万分比)
+ Status string // 状态
+ Sort string // 排序
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// paymentChannelColumns holds the columns for the table hg_payment_channel.
+var paymentChannelColumns = PaymentChannelColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ ChannelCode: "channel_code",
+ Name: "name",
+ ChannelType: "channel_type",
+ Direction: "direction",
+ ConfigCipher: "config_cipher",
+ MinAmount: "min_amount",
+ MaxAmount: "max_amount",
+ FeeType: "fee_type",
+ FeeFixedAmount: "fee_fixed_amount",
+ FeeRate: "fee_rate",
+ Status: "status",
+ Sort: "sort",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewPaymentChannelDao creates and returns a new DAO object for table data access.
+func NewPaymentChannelDao(handlers ...gdb.ModelHandler) *PaymentChannelDao {
+ return &PaymentChannelDao{
+ group: "default",
+ table: "hg_payment_channel",
+ columns: paymentChannelColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *PaymentChannelDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *PaymentChannelDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *PaymentChannelDao) Columns() PaymentChannelColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *PaymentChannelDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *PaymentChannelDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *PaymentChannelDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/product.go b/server/internal/dao/internal/product.go
new file mode 100644
index 0000000..027b1b4
--- /dev/null
+++ b/server/internal/dao/internal/product.go
@@ -0,0 +1,129 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ProductDao is the data access object for the table hg_product.
+type ProductDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns ProductColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// ProductColumns defines and stores column names for the table hg_product.
+type ProductColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ ProductNo string // 商品编号
+ CategoryId string // 分类ID
+ ProductType string // 商品类型
+ PaymentType string // 支付方式
+ Name string // 商品名称
+ ShopName string // 店铺名称
+ PriceAmount string // 单价(分)
+ Currency string // 币种
+ CoverAttachmentId string // 封面附件ID
+ CoverUrl string // 封面URL
+ DetailHtml string // 商品详情
+ IsRecommended string // 是否推荐
+ PublishStatus string // 发布状态
+ StartAt string // 展示开始时间
+ EndAt string // 展示结束时间
+ Sort string // 排序
+ Version string // 乐观锁
+ Remark string // 备注
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// productColumns holds the columns for the table hg_product.
+var productColumns = ProductColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ ProductNo: "product_no",
+ CategoryId: "category_id",
+ ProductType: "product_type",
+ PaymentType: "payment_type",
+ Name: "name",
+ ShopName: "shop_name",
+ PriceAmount: "price_amount",
+ Currency: "currency",
+ CoverAttachmentId: "cover_attachment_id",
+ CoverUrl: "cover_url",
+ DetailHtml: "detail_html",
+ IsRecommended: "is_recommended",
+ PublishStatus: "publish_status",
+ StartAt: "start_at",
+ EndAt: "end_at",
+ Sort: "sort",
+ Version: "version",
+ Remark: "remark",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewProductDao creates and returns a new DAO object for table data access.
+func NewProductDao(handlers ...gdb.ModelHandler) *ProductDao {
+ return &ProductDao{
+ group: "default",
+ table: "hg_product",
+ columns: productColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *ProductDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *ProductDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *ProductDao) Columns() ProductColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *ProductDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *ProductDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *ProductDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/product_category.go b/server/internal/dao/internal/product_category.go
new file mode 100644
index 0000000..7b1ba1c
--- /dev/null
+++ b/server/internal/dao/internal/product_category.go
@@ -0,0 +1,107 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// ProductCategoryDao is the data access object for the table hg_product_category.
+type ProductCategoryDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns ProductCategoryColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// ProductCategoryColumns defines and stores column names for the table hg_product_category.
+type ProductCategoryColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ Pid string // 上级ID
+ Level string // 树等级
+ Tree string // 关系树
+ CategoryCode string // 分类编码
+ Name string // 分类名称
+ Status string // 状态
+ Sort string // 排序
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// productCategoryColumns holds the columns for the table hg_product_category.
+var productCategoryColumns = ProductCategoryColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ Pid: "pid",
+ Level: "level",
+ Tree: "tree",
+ CategoryCode: "category_code",
+ Name: "name",
+ Status: "status",
+ Sort: "sort",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewProductCategoryDao creates and returns a new DAO object for table data access.
+func NewProductCategoryDao(handlers ...gdb.ModelHandler) *ProductCategoryDao {
+ return &ProductCategoryDao{
+ group: "default",
+ table: "hg_product_category",
+ columns: productCategoryColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *ProductCategoryDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *ProductCategoryDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *ProductCategoryDao) Columns() ProductCategoryColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *ProductCategoryDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *ProductCategoryDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *ProductCategoryDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/recharge_order.go b/server/internal/dao/internal/recharge_order.go
new file mode 100644
index 0000000..5981ce5
--- /dev/null
+++ b/server/internal/dao/internal/recharge_order.go
@@ -0,0 +1,125 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// RechargeOrderDao is the data access object for the table hg_recharge_order.
+type RechargeOrderDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns RechargeOrderColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// RechargeOrderColumns defines and stores column names for the table hg_recharge_order.
+type RechargeOrderColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ RechargeNo string // 充值单号
+ MemberId string // 会员ID
+ ChannelId string // 支付渠道ID
+ RequestAmount string // 申请金额(分)
+ PaidAmount string // 实付金额(分)
+ Currency string // 币种
+ ExternalNo string // 外部支付单号
+ VoucherAttachmentIds string // 打款凭证附件
+ RechargeType string // 充值类型
+ RechargeStatus string // 充值状态
+ Remark string // 会员备注
+ ReviewReasonCode string // 审核原因编码
+ ReviewReason string // 审核意见
+ ApprovalRequestId string // 审批单ID
+ LedgerId string // 入账台账ID
+ PaidAt string // 支付时间
+ ReviewedAt string // 审核时间
+ CreditedAt string // 入账时间
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// rechargeOrderColumns holds the columns for the table hg_recharge_order.
+var rechargeOrderColumns = RechargeOrderColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ RechargeNo: "recharge_no",
+ MemberId: "member_id",
+ ChannelId: "channel_id",
+ RequestAmount: "request_amount",
+ PaidAmount: "paid_amount",
+ Currency: "currency",
+ ExternalNo: "external_no",
+ VoucherAttachmentIds: "voucher_attachment_ids",
+ RechargeType: "recharge_type",
+ RechargeStatus: "recharge_status",
+ Remark: "remark",
+ ReviewReasonCode: "review_reason_code",
+ ReviewReason: "review_reason",
+ ApprovalRequestId: "approval_request_id",
+ LedgerId: "ledger_id",
+ PaidAt: "paid_at",
+ ReviewedAt: "reviewed_at",
+ CreditedAt: "credited_at",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewRechargeOrderDao creates and returns a new DAO object for table data access.
+func NewRechargeOrderDao(handlers ...gdb.ModelHandler) *RechargeOrderDao {
+ return &RechargeOrderDao{
+ group: "default",
+ table: "hg_recharge_order",
+ columns: rechargeOrderColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *RechargeOrderDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *RechargeOrderDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *RechargeOrderDao) Columns() RechargeOrderColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *RechargeOrderDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *RechargeOrderDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *RechargeOrderDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sensitive_access_log.go b/server/internal/dao/internal/sensitive_access_log.go
new file mode 100644
index 0000000..2014fb4
--- /dev/null
+++ b/server/internal/dao/internal/sensitive_access_log.go
@@ -0,0 +1,105 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SensitiveAccessLogDao is the data access object for the table hg_sensitive_access_log.
+type SensitiveAccessLogDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SensitiveAccessLogColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SensitiveAccessLogColumns defines and stores column names for the table hg_sensitive_access_log.
+type SensitiveAccessLogColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ AccessNo string // 查看流水号
+ ActorId string // 管理员ID
+ TargetType string // 目标类型
+ TargetId string // 目标ID
+ FieldSet string // 查看字段集
+ PurposeCode string // 用途编码
+ PurposeText string // 用途说明
+ AuthorizationNo string // 授权号
+ MfaVerified string // 是否二次认证
+ Result string // 查看结果
+ TraceId string // 链路ID
+ CreatedAt string // 创建时间
+}
+
+// sensitiveAccessLogColumns holds the columns for the table hg_sensitive_access_log.
+var sensitiveAccessLogColumns = SensitiveAccessLogColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ AccessNo: "access_no",
+ ActorId: "actor_id",
+ TargetType: "target_type",
+ TargetId: "target_id",
+ FieldSet: "field_set",
+ PurposeCode: "purpose_code",
+ PurposeText: "purpose_text",
+ AuthorizationNo: "authorization_no",
+ MfaVerified: "mfa_verified",
+ Result: "result",
+ TraceId: "trace_id",
+ CreatedAt: "created_at",
+}
+
+// NewSensitiveAccessLogDao creates and returns a new DAO object for table data access.
+func NewSensitiveAccessLogDao(handlers ...gdb.ModelHandler) *SensitiveAccessLogDao {
+ return &SensitiveAccessLogDao{
+ group: "default",
+ table: "hg_sensitive_access_log",
+ columns: sensitiveAccessLogColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SensitiveAccessLogDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SensitiveAccessLogDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SensitiveAccessLogDao) Columns() SensitiveAccessLogColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SensitiveAccessLogDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SensitiveAccessLogDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SensitiveAccessLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/site_config_version.go b/server/internal/dao/internal/site_config_version.go
new file mode 100644
index 0000000..6fb2707
--- /dev/null
+++ b/server/internal/dao/internal/site_config_version.go
@@ -0,0 +1,113 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SiteConfigVersionDao is the data access object for the table hg_site_config_version.
+type SiteConfigVersionDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SiteConfigVersionColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SiteConfigVersionColumns defines and stores column names for the table hg_site_config_version.
+type SiteConfigVersionColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ ConfigNo string // 配置版本号
+ ConfigGroup string // 配置组
+ SchemaVersion string // Schema版本
+ ConfigJson string // 完整配置快照
+ ConfigDigest string // 配置摘要
+ PublishStatus string // 发布状态
+ EffectiveAt string // 计划生效时间
+ PublishedAt string // 实际发布时间
+ ApprovalRequestId string // 审批单ID
+ BaseVersionId string // 基础版本ID
+ Version string // 乐观锁
+ Remark string // 备注
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// siteConfigVersionColumns holds the columns for the table hg_site_config_version.
+var siteConfigVersionColumns = SiteConfigVersionColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ ConfigNo: "config_no",
+ ConfigGroup: "config_group",
+ SchemaVersion: "schema_version",
+ ConfigJson: "config_json",
+ ConfigDigest: "config_digest",
+ PublishStatus: "publish_status",
+ EffectiveAt: "effective_at",
+ PublishedAt: "published_at",
+ ApprovalRequestId: "approval_request_id",
+ BaseVersionId: "base_version_id",
+ Version: "version",
+ Remark: "remark",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSiteConfigVersionDao creates and returns a new DAO object for table data access.
+func NewSiteConfigVersionDao(handlers ...gdb.ModelHandler) *SiteConfigVersionDao {
+ return &SiteConfigVersionDao{
+ group: "default",
+ table: "hg_site_config_version",
+ columns: siteConfigVersionColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SiteConfigVersionDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SiteConfigVersionDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SiteConfigVersionDao) Columns() SiteConfigVersionColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SiteConfigVersionDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SiteConfigVersionDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SiteConfigVersionDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_addons_config.go b/server/internal/dao/internal/sys_addons_config.go
new file mode 100755
index 0000000..41135bb
--- /dev/null
+++ b/server/internal/dao/internal/sys_addons_config.go
@@ -0,0 +1,105 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysAddonsConfigDao is the data access object for the table hg_sys_addons_config.
+type SysAddonsConfigDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysAddonsConfigColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysAddonsConfigColumns defines and stores column names for the table hg_sys_addons_config.
+type SysAddonsConfigColumns struct {
+ Id string // 配置ID
+ AddonName string // 插件名称
+ Group string // 分组
+ Name string // 参数名称
+ Type string // 键值类型:string,int,uint,bool,datetime,date
+ Key string // 参数键名
+ Value string // 参数键值
+ DefaultValue string // 默认值
+ Sort string // 排序
+ Tip string // 变量描述
+ IsDefault string // 是否为系统默认
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysAddonsConfigColumns holds the columns for the table hg_sys_addons_config.
+var sysAddonsConfigColumns = SysAddonsConfigColumns{
+ Id: "id",
+ AddonName: "addon_name",
+ Group: "group",
+ Name: "name",
+ Type: "type",
+ Key: "key",
+ Value: "value",
+ DefaultValue: "default_value",
+ Sort: "sort",
+ Tip: "tip",
+ IsDefault: "is_default",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysAddonsConfigDao creates and returns a new DAO object for table data access.
+func NewSysAddonsConfigDao(handlers ...gdb.ModelHandler) *SysAddonsConfigDao {
+ return &SysAddonsConfigDao{
+ group: "default",
+ table: "hg_sys_addons_config",
+ columns: sysAddonsConfigColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysAddonsConfigDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysAddonsConfigDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysAddonsConfigDao) Columns() SysAddonsConfigColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysAddonsConfigDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysAddonsConfigDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysAddonsConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_addons_install.go b/server/internal/dao/internal/sys_addons_install.go
new file mode 100644
index 0000000..9611545
--- /dev/null
+++ b/server/internal/dao/internal/sys_addons_install.go
@@ -0,0 +1,89 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysAddonsInstallDao is the data access object for the table hg_sys_addons_install.
+type SysAddonsInstallDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysAddonsInstallColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysAddonsInstallColumns defines and stores column names for the table hg_sys_addons_install.
+type SysAddonsInstallColumns struct {
+ Id string // 主键
+ Name string // 插件名称
+ Version string // 版本号
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysAddonsInstallColumns holds the columns for the table hg_sys_addons_install.
+var sysAddonsInstallColumns = SysAddonsInstallColumns{
+ Id: "id",
+ Name: "name",
+ Version: "version",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysAddonsInstallDao creates and returns a new DAO object for table data access.
+func NewSysAddonsInstallDao(handlers ...gdb.ModelHandler) *SysAddonsInstallDao {
+ return &SysAddonsInstallDao{
+ group: "default",
+ table: "hg_sys_addons_install",
+ columns: sysAddonsInstallColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysAddonsInstallDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysAddonsInstallDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysAddonsInstallDao) Columns() SysAddonsInstallColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysAddonsInstallDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysAddonsInstallDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysAddonsInstallDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_attachment.go b/server/internal/dao/internal/sys_attachment.go
new file mode 100755
index 0000000..dcd6558
--- /dev/null
+++ b/server/internal/dao/internal/sys_attachment.go
@@ -0,0 +1,111 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysAttachmentDao is the data access object for the table hg_sys_attachment.
+type SysAttachmentDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysAttachmentColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysAttachmentColumns defines and stores column names for the table hg_sys_attachment.
+type SysAttachmentColumns struct {
+ Id string // 文件ID
+ AppId string // 应用ID
+ MemberId string // 管理员ID
+ CateId string // 上传分类
+ Drive string // 上传驱动
+ Name string // 文件原始名
+ Kind string // 上传类型
+ MimeType string // 扩展类型
+ NaiveType string // NaiveUI类型
+ Path string // 本地路径
+ FileUrl string // url
+ Size string // 文件大小
+ Ext string // 扩展名
+ Md5 string // md5校验码
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+}
+
+// sysAttachmentColumns holds the columns for the table hg_sys_attachment.
+var sysAttachmentColumns = SysAttachmentColumns{
+ Id: "id",
+ AppId: "app_id",
+ MemberId: "member_id",
+ CateId: "cate_id",
+ Drive: "drive",
+ Name: "name",
+ Kind: "kind",
+ MimeType: "mime_type",
+ NaiveType: "naive_type",
+ Path: "path",
+ FileUrl: "file_url",
+ Size: "size",
+ Ext: "ext",
+ Md5: "md5",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysAttachmentDao creates and returns a new DAO object for table data access.
+func NewSysAttachmentDao(handlers ...gdb.ModelHandler) *SysAttachmentDao {
+ return &SysAttachmentDao{
+ group: "default",
+ table: "hg_sys_attachment",
+ columns: sysAttachmentColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysAttachmentDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysAttachmentDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysAttachmentDao) Columns() SysAttachmentColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysAttachmentDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysAttachmentDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysAttachmentDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_blacklist.go b/server/internal/dao/internal/sys_blacklist.go
new file mode 100755
index 0000000..1838a14
--- /dev/null
+++ b/server/internal/dao/internal/sys_blacklist.go
@@ -0,0 +1,89 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysBlacklistDao is the data access object for the table hg_sys_blacklist.
+type SysBlacklistDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysBlacklistColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysBlacklistColumns defines and stores column names for the table hg_sys_blacklist.
+type SysBlacklistColumns struct {
+ Id string // 黑名单ID
+ Ip string // IP地址
+ Remark string // 备注
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysBlacklistColumns holds the columns for the table hg_sys_blacklist.
+var sysBlacklistColumns = SysBlacklistColumns{
+ Id: "id",
+ Ip: "ip",
+ Remark: "remark",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysBlacklistDao creates and returns a new DAO object for table data access.
+func NewSysBlacklistDao(handlers ...gdb.ModelHandler) *SysBlacklistDao {
+ return &SysBlacklistDao{
+ group: "default",
+ table: "hg_sys_blacklist",
+ columns: sysBlacklistColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysBlacklistDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysBlacklistDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysBlacklistDao) Columns() SysBlacklistColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysBlacklistDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysBlacklistDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysBlacklistDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_config.go b/server/internal/dao/internal/sys_config.go
new file mode 100755
index 0000000..637f6a2
--- /dev/null
+++ b/server/internal/dao/internal/sys_config.go
@@ -0,0 +1,103 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysConfigDao is the data access object for the table hg_sys_config.
+type SysConfigDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysConfigColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysConfigColumns defines and stores column names for the table hg_sys_config.
+type SysConfigColumns struct {
+ Id string // 配置ID
+ Group string // 配置分组
+ Name string // 参数名称
+ Type string // 键值类型:string,int,uint,bool,datetime,date
+ Key string // 参数键名
+ Value string // 参数键值
+ DefaultValue string // 默认值
+ Sort string // 排序
+ Tip string // 变量描述
+ IsDefault string // 是否为系统默认
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysConfigColumns holds the columns for the table hg_sys_config.
+var sysConfigColumns = SysConfigColumns{
+ Id: "id",
+ Group: "group",
+ Name: "name",
+ Type: "type",
+ Key: "key",
+ Value: "value",
+ DefaultValue: "default_value",
+ Sort: "sort",
+ Tip: "tip",
+ IsDefault: "is_default",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysConfigDao creates and returns a new DAO object for table data access.
+func NewSysConfigDao(handlers ...gdb.ModelHandler) *SysConfigDao {
+ return &SysConfigDao{
+ group: "default",
+ table: "hg_sys_config",
+ columns: sysConfigColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysConfigDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysConfigDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysConfigDao) Columns() SysConfigColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysConfigDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysConfigDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_cron.go b/server/internal/dao/internal/sys_cron.go
new file mode 100755
index 0000000..a8a8dac
--- /dev/null
+++ b/server/internal/dao/internal/sys_cron.go
@@ -0,0 +1,103 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysCronDao is the data access object for the table hg_sys_cron.
+type SysCronDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysCronColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysCronColumns defines and stores column names for the table hg_sys_cron.
+type SysCronColumns struct {
+ Id string // 任务ID
+ GroupId string // 分组ID
+ Title string // 任务标题
+ Name string // 任务方法
+ Params string // 函数参数
+ Pattern string // 表达式
+ Policy string // 策略
+ Count string // 执行次数
+ Sort string // 排序
+ Remark string // 备注
+ Status string // 任务状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysCronColumns holds the columns for the table hg_sys_cron.
+var sysCronColumns = SysCronColumns{
+ Id: "id",
+ GroupId: "group_id",
+ Title: "title",
+ Name: "name",
+ Params: "params",
+ Pattern: "pattern",
+ Policy: "policy",
+ Count: "count",
+ Sort: "sort",
+ Remark: "remark",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysCronDao creates and returns a new DAO object for table data access.
+func NewSysCronDao(handlers ...gdb.ModelHandler) *SysCronDao {
+ return &SysCronDao{
+ group: "default",
+ table: "hg_sys_cron",
+ columns: sysCronColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysCronDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysCronDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysCronDao) Columns() SysCronColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysCronDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysCronDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysCronDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_cron_group.go b/server/internal/dao/internal/sys_cron_group.go
new file mode 100755
index 0000000..983a238
--- /dev/null
+++ b/server/internal/dao/internal/sys_cron_group.go
@@ -0,0 +1,95 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysCronGroupDao is the data access object for the table hg_sys_cron_group.
+type SysCronGroupDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysCronGroupColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysCronGroupColumns defines and stores column names for the table hg_sys_cron_group.
+type SysCronGroupColumns struct {
+ Id string // 任务分组ID
+ Pid string // 父类任务分组ID
+ Name string // 分组名称
+ IsDefault string // 是否默认
+ Sort string // 排序
+ Remark string // 备注
+ Status string // 分组状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysCronGroupColumns holds the columns for the table hg_sys_cron_group.
+var sysCronGroupColumns = SysCronGroupColumns{
+ Id: "id",
+ Pid: "pid",
+ Name: "name",
+ IsDefault: "is_default",
+ Sort: "sort",
+ Remark: "remark",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysCronGroupDao creates and returns a new DAO object for table data access.
+func NewSysCronGroupDao(handlers ...gdb.ModelHandler) *SysCronGroupDao {
+ return &SysCronGroupDao{
+ group: "default",
+ table: "hg_sys_cron_group",
+ columns: sysCronGroupColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysCronGroupDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysCronGroupDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysCronGroupDao) Columns() SysCronGroupColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysCronGroupDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysCronGroupDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysCronGroupDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_dict_data.go b/server/internal/dao/internal/sys_dict_data.go
new file mode 100755
index 0000000..89b72d5
--- /dev/null
+++ b/server/internal/dao/internal/sys_dict_data.go
@@ -0,0 +1,101 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysDictDataDao is the data access object for the table hg_sys_dict_data.
+type SysDictDataDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysDictDataColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysDictDataColumns defines and stores column names for the table hg_sys_dict_data.
+type SysDictDataColumns struct {
+ Id string // 字典数据ID
+ Label string // 字典标签
+ Value string // 字典键值
+ ValueType string // 键值数据类型:string,int,uint,bool,datetime,date
+ Type string // 字典类型
+ ListClass string // 表格回显样式
+ IsDefault string // 是否为系统默认
+ Sort string // 字典排序
+ Remark string // 备注
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysDictDataColumns holds the columns for the table hg_sys_dict_data.
+var sysDictDataColumns = SysDictDataColumns{
+ Id: "id",
+ Label: "label",
+ Value: "value",
+ ValueType: "value_type",
+ Type: "type",
+ ListClass: "list_class",
+ IsDefault: "is_default",
+ Sort: "sort",
+ Remark: "remark",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysDictDataDao creates and returns a new DAO object for table data access.
+func NewSysDictDataDao(handlers ...gdb.ModelHandler) *SysDictDataDao {
+ return &SysDictDataDao{
+ group: "default",
+ table: "hg_sys_dict_data",
+ columns: sysDictDataColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysDictDataDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysDictDataDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysDictDataDao) Columns() SysDictDataColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysDictDataDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysDictDataDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysDictDataDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_dict_type.go b/server/internal/dao/internal/sys_dict_type.go
new file mode 100755
index 0000000..b0b05f7
--- /dev/null
+++ b/server/internal/dao/internal/sys_dict_type.go
@@ -0,0 +1,95 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysDictTypeDao is the data access object for the table hg_sys_dict_type.
+type SysDictTypeDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysDictTypeColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysDictTypeColumns defines and stores column names for the table hg_sys_dict_type.
+type SysDictTypeColumns struct {
+ Id string // 字典类型ID
+ Pid string // 父类字典类型ID
+ Name string // 字典类型名称
+ Type string // 字典类型
+ Sort string // 排序
+ Remark string // 备注
+ Status string // 字典类型状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysDictTypeColumns holds the columns for the table hg_sys_dict_type.
+var sysDictTypeColumns = SysDictTypeColumns{
+ Id: "id",
+ Pid: "pid",
+ Name: "name",
+ Type: "type",
+ Sort: "sort",
+ Remark: "remark",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysDictTypeDao creates and returns a new DAO object for table data access.
+func NewSysDictTypeDao(handlers ...gdb.ModelHandler) *SysDictTypeDao {
+ return &SysDictTypeDao{
+ group: "default",
+ table: "hg_sys_dict_type",
+ columns: sysDictTypeColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysDictTypeDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysDictTypeDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysDictTypeDao) Columns() SysDictTypeColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysDictTypeDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysDictTypeDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysDictTypeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_ems_log.go b/server/internal/dao/internal/sys_ems_log.go
new file mode 100755
index 0000000..3cac58d
--- /dev/null
+++ b/server/internal/dao/internal/sys_ems_log.go
@@ -0,0 +1,97 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysEmsLogDao is the data access object for the table hg_sys_ems_log.
+type SysEmsLogDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysEmsLogColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysEmsLogColumns defines and stores column names for the table hg_sys_ems_log.
+type SysEmsLogColumns struct {
+ Id string // 主键
+ Event string // 事件
+ Email string // 邮箱地址,多个用;隔开
+ Code string // 验证码
+ Times string // 验证次数
+ Content string // 邮件内容
+ Ip string // ip地址
+ Status string // 状态(1未验证,2已验证)
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysEmsLogColumns holds the columns for the table hg_sys_ems_log.
+var sysEmsLogColumns = SysEmsLogColumns{
+ Id: "id",
+ Event: "event",
+ Email: "email",
+ Code: "code",
+ Times: "times",
+ Content: "content",
+ Ip: "ip",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysEmsLogDao creates and returns a new DAO object for table data access.
+func NewSysEmsLogDao(handlers ...gdb.ModelHandler) *SysEmsLogDao {
+ return &SysEmsLogDao{
+ group: "default",
+ table: "hg_sys_ems_log",
+ columns: sysEmsLogColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysEmsLogDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysEmsLogDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysEmsLogDao) Columns() SysEmsLogColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysEmsLogDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysEmsLogDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysEmsLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_gen_codes.go b/server/internal/dao/internal/sys_gen_codes.go
new file mode 100755
index 0000000..e909a3f
--- /dev/null
+++ b/server/internal/dao/internal/sys_gen_codes.go
@@ -0,0 +1,105 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysGenCodesDao is the data access object for the table hg_sys_gen_codes.
+type SysGenCodesDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysGenCodesColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysGenCodesColumns defines and stores column names for the table hg_sys_gen_codes.
+type SysGenCodesColumns struct {
+ Id string // 生成ID
+ GenType string // 生成类型
+ GenTemplate string // 生成模板
+ VarName string // 实体命名
+ Options string // 配置选项
+ DbName string // 数据库名称
+ TableName string // 主表名称
+ TableComment string // 主表注释
+ DaoName string // 主表dao模型
+ MasterColumns string // 主表字段
+ AddonName string // 插件名称
+ Status string // 生成状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysGenCodesColumns holds the columns for the table hg_sys_gen_codes.
+var sysGenCodesColumns = SysGenCodesColumns{
+ Id: "id",
+ GenType: "gen_type",
+ GenTemplate: "gen_template",
+ VarName: "var_name",
+ Options: "options",
+ DbName: "db_name",
+ TableName: "table_name",
+ TableComment: "table_comment",
+ DaoName: "dao_name",
+ MasterColumns: "master_columns",
+ AddonName: "addon_name",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysGenCodesDao creates and returns a new DAO object for table data access.
+func NewSysGenCodesDao(handlers ...gdb.ModelHandler) *SysGenCodesDao {
+ return &SysGenCodesDao{
+ group: "default",
+ table: "hg_sys_gen_codes",
+ columns: sysGenCodesColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysGenCodesDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysGenCodesDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysGenCodesDao) Columns() SysGenCodesColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysGenCodesDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysGenCodesDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysGenCodesDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_gen_curd_demo.go b/server/internal/dao/internal/sys_gen_curd_demo.go
new file mode 100755
index 0000000..25bd694
--- /dev/null
+++ b/server/internal/dao/internal/sys_gen_curd_demo.go
@@ -0,0 +1,111 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysGenCurdDemoDao is the data access object for the table hg_sys_gen_curd_demo.
+type SysGenCurdDemoDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysGenCurdDemoColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysGenCurdDemoColumns defines and stores column names for the table hg_sys_gen_curd_demo.
+type SysGenCurdDemoColumns struct {
+ Id string // ID
+ CategoryId string // 分类ID
+ Title string // 标题
+ Description string // 描述
+ Content string // 内容
+ Image string // 单图
+ Attachfile string // 附件
+ CityId string // 所在城市
+ Switch string // 显示开关
+ Sort string // 排序
+ Status string // 状态
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+ DeletedAt string // 删除时间
+}
+
+// sysGenCurdDemoColumns holds the columns for the table hg_sys_gen_curd_demo.
+var sysGenCurdDemoColumns = SysGenCurdDemoColumns{
+ Id: "id",
+ CategoryId: "category_id",
+ Title: "title",
+ Description: "description",
+ Content: "content",
+ Image: "image",
+ Attachfile: "attachfile",
+ CityId: "city_id",
+ Switch: "switch",
+ Sort: "sort",
+ Status: "status",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewSysGenCurdDemoDao creates and returns a new DAO object for table data access.
+func NewSysGenCurdDemoDao(handlers ...gdb.ModelHandler) *SysGenCurdDemoDao {
+ return &SysGenCurdDemoDao{
+ group: "default",
+ table: "hg_sys_gen_curd_demo",
+ columns: sysGenCurdDemoColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysGenCurdDemoDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysGenCurdDemoDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysGenCurdDemoDao) Columns() SysGenCurdDemoColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysGenCurdDemoDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysGenCurdDemoDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysGenCurdDemoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_gen_tree_demo.go b/server/internal/dao/internal/sys_gen_tree_demo.go
new file mode 100755
index 0000000..5e3cdc5
--- /dev/null
+++ b/server/internal/dao/internal/sys_gen_tree_demo.go
@@ -0,0 +1,105 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysGenTreeDemoDao is the data access object for the table hg_sys_gen_tree_demo.
+type SysGenTreeDemoDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysGenTreeDemoColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysGenTreeDemoColumns defines and stores column names for the table hg_sys_gen_tree_demo.
+type SysGenTreeDemoColumns struct {
+ Id string // ID
+ Pid string // 上级ID
+ Level string // 关系树级别
+ Tree string // 关系树
+ CategoryId string // 分类ID
+ Title string // 标题
+ Description string // 描述
+ Sort string // 排序
+ Status string // 状态
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+ DeletedAt string // 删除时间
+}
+
+// sysGenTreeDemoColumns holds the columns for the table hg_sys_gen_tree_demo.
+var sysGenTreeDemoColumns = SysGenTreeDemoColumns{
+ Id: "id",
+ Pid: "pid",
+ Level: "level",
+ Tree: "tree",
+ CategoryId: "category_id",
+ Title: "title",
+ Description: "description",
+ Sort: "sort",
+ Status: "status",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewSysGenTreeDemoDao creates and returns a new DAO object for table data access.
+func NewSysGenTreeDemoDao(handlers ...gdb.ModelHandler) *SysGenTreeDemoDao {
+ return &SysGenTreeDemoDao{
+ group: "default",
+ table: "hg_sys_gen_tree_demo",
+ columns: sysGenTreeDemoColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysGenTreeDemoDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysGenTreeDemoDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysGenTreeDemoDao) Columns() SysGenTreeDemoColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysGenTreeDemoDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysGenTreeDemoDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysGenTreeDemoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_log.go b/server/internal/dao/internal/sys_log.go
new file mode 100755
index 0000000..79813b3
--- /dev/null
+++ b/server/internal/dao/internal/sys_log.go
@@ -0,0 +1,123 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysLogDao is the data access object for the table hg_sys_log.
+type SysLogDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysLogColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysLogColumns defines and stores column names for the table hg_sys_log.
+type SysLogColumns struct {
+ Id string // 日志ID
+ ReqId string // 对外ID
+ AppId string // 应用ID
+ MerchantId string // 商户ID
+ MemberId string // 用户ID
+ Method string // 提交类型
+ Module string // 访问模块
+ Url string // 提交url
+ GetData string // get数据
+ PostData string // post数据
+ HeaderData string // header数据
+ Ip string // IP地址
+ ProvinceId string // 省编码
+ CityId string // 市编码
+ ErrorCode string // 报错code
+ ErrorMsg string // 对外错误提示
+ ErrorData string // 报错日志
+ UserAgent string // UA信息
+ TakeUpTime string // 请求耗时
+ Timestamp string // 响应时间
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+}
+
+// sysLogColumns holds the columns for the table hg_sys_log.
+var sysLogColumns = SysLogColumns{
+ Id: "id",
+ ReqId: "req_id",
+ AppId: "app_id",
+ MerchantId: "merchant_id",
+ MemberId: "member_id",
+ Method: "method",
+ Module: "module",
+ Url: "url",
+ GetData: "get_data",
+ PostData: "post_data",
+ HeaderData: "header_data",
+ Ip: "ip",
+ ProvinceId: "province_id",
+ CityId: "city_id",
+ ErrorCode: "error_code",
+ ErrorMsg: "error_msg",
+ ErrorData: "error_data",
+ UserAgent: "user_agent",
+ TakeUpTime: "take_up_time",
+ Timestamp: "timestamp",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysLogDao creates and returns a new DAO object for table data access.
+func NewSysLogDao(handlers ...gdb.ModelHandler) *SysLogDao {
+ return &SysLogDao{
+ group: "default",
+ table: "hg_sys_log",
+ columns: sysLogColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysLogDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysLogDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysLogDao) Columns() SysLogColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysLogDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysLogDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_login_log.go b/server/internal/dao/internal/sys_login_log.go
new file mode 100755
index 0000000..0637049
--- /dev/null
+++ b/server/internal/dao/internal/sys_login_log.go
@@ -0,0 +1,105 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysLoginLogDao is the data access object for the table hg_sys_login_log.
+type SysLoginLogDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysLoginLogColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysLoginLogColumns defines and stores column names for the table hg_sys_login_log.
+type SysLoginLogColumns struct {
+ Id string // 日志ID
+ ReqId string // 请求ID
+ MemberId string // 用户ID
+ Username string // 用户名
+ Response string // 响应数据
+ LoginAt string // 登录时间
+ LoginIp string // 登录IP
+ ProvinceId string // 省编码
+ CityId string // 市编码
+ UserAgent string // UA信息
+ ErrMsg string // 错误提示
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+}
+
+// sysLoginLogColumns holds the columns for the table hg_sys_login_log.
+var sysLoginLogColumns = SysLoginLogColumns{
+ Id: "id",
+ ReqId: "req_id",
+ MemberId: "member_id",
+ Username: "username",
+ Response: "response",
+ LoginAt: "login_at",
+ LoginIp: "login_ip",
+ ProvinceId: "province_id",
+ CityId: "city_id",
+ UserAgent: "user_agent",
+ ErrMsg: "err_msg",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysLoginLogDao creates and returns a new DAO object for table data access.
+func NewSysLoginLogDao(handlers ...gdb.ModelHandler) *SysLoginLogDao {
+ return &SysLoginLogDao{
+ group: "default",
+ table: "hg_sys_login_log",
+ columns: sysLoginLogColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysLoginLogDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysLoginLogDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysLoginLogDao) Columns() SysLoginLogColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysLoginLogDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysLoginLogDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysLoginLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_provinces.go b/server/internal/dao/internal/sys_provinces.go
new file mode 100755
index 0000000..66f4f53
--- /dev/null
+++ b/server/internal/dao/internal/sys_provinces.go
@@ -0,0 +1,101 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysProvincesDao is the data access object for the table hg_sys_provinces.
+type SysProvincesDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysProvincesColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysProvincesColumns defines and stores column names for the table hg_sys_provinces.
+type SysProvincesColumns struct {
+ Id string // 省市区ID
+ Title string // 栏目名称
+ Pinyin string // 拼音
+ Lng string // 经度
+ Lat string // 纬度
+ Pid string // 父栏目
+ Level string // 关系树等级
+ Tree string // 关系树
+ Sort string // 排序
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysProvincesColumns holds the columns for the table hg_sys_provinces.
+var sysProvincesColumns = SysProvincesColumns{
+ Id: "id",
+ Title: "title",
+ Pinyin: "pinyin",
+ Lng: "lng",
+ Lat: "lat",
+ Pid: "pid",
+ Level: "level",
+ Tree: "tree",
+ Sort: "sort",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysProvincesDao creates and returns a new DAO object for table data access.
+func NewSysProvincesDao(handlers ...gdb.ModelHandler) *SysProvincesDao {
+ return &SysProvincesDao{
+ group: "default",
+ table: "hg_sys_provinces",
+ columns: sysProvincesColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysProvincesDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysProvincesDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysProvincesDao) Columns() SysProvincesColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysProvincesDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysProvincesDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysProvincesDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_serve_license.go b/server/internal/dao/internal/sys_serve_license.go
new file mode 100755
index 0000000..46ef2f5
--- /dev/null
+++ b/server/internal/dao/internal/sys_serve_license.go
@@ -0,0 +1,111 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysServeLicenseDao is the data access object for the table hg_sys_serve_license.
+type SysServeLicenseDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysServeLicenseColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysServeLicenseColumns defines and stores column names for the table hg_sys_serve_license.
+type SysServeLicenseColumns struct {
+ Id string // 许可ID
+ Group string // 分组
+ Name string // 许可名称
+ Appid string // 应用ID
+ SecretKey string // 应用秘钥
+ RemoteAddr string // 最后连接地址
+ OnlineLimit string // 在线限制
+ LoginTimes string // 登录次数
+ LastLoginAt string // 最后登录时间
+ LastActiveAt string // 最后心跳
+ Routes string // 路由表,空使用默认分组路由
+ AllowedIps string // IP白名单
+ EndAt string // 授权有效期
+ Remark string // 备注
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+}
+
+// sysServeLicenseColumns holds the columns for the table hg_sys_serve_license.
+var sysServeLicenseColumns = SysServeLicenseColumns{
+ Id: "id",
+ Group: "group",
+ Name: "name",
+ Appid: "appid",
+ SecretKey: "secret_key",
+ RemoteAddr: "remote_addr",
+ OnlineLimit: "online_limit",
+ LoginTimes: "login_times",
+ LastLoginAt: "last_login_at",
+ LastActiveAt: "last_active_at",
+ Routes: "routes",
+ AllowedIps: "allowed_ips",
+ EndAt: "end_at",
+ Remark: "remark",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysServeLicenseDao creates and returns a new DAO object for table data access.
+func NewSysServeLicenseDao(handlers ...gdb.ModelHandler) *SysServeLicenseDao {
+ return &SysServeLicenseDao{
+ group: "default",
+ table: "hg_sys_serve_license",
+ columns: sysServeLicenseColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysServeLicenseDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysServeLicenseDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysServeLicenseDao) Columns() SysServeLicenseColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysServeLicenseDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysServeLicenseDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysServeLicenseDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_serve_log.go b/server/internal/dao/internal/sys_serve_log.go
new file mode 100755
index 0000000..abf52f9
--- /dev/null
+++ b/server/internal/dao/internal/sys_serve_log.go
@@ -0,0 +1,97 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysServeLogDao is the data access object for the table hg_sys_serve_log.
+type SysServeLogDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysServeLogColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysServeLogColumns defines and stores column names for the table hg_sys_serve_log.
+type SysServeLogColumns struct {
+ Id string // 日志ID
+ TraceId string // 链路ID
+ LevelFormat string // 日志级别
+ Content string // 日志内容
+ Stack string // 打印堆栈
+ Line string // 调用行
+ TriggerNs string // 触发时间(ns)
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+}
+
+// sysServeLogColumns holds the columns for the table hg_sys_serve_log.
+var sysServeLogColumns = SysServeLogColumns{
+ Id: "id",
+ TraceId: "trace_id",
+ LevelFormat: "level_format",
+ Content: "content",
+ Stack: "stack",
+ Line: "line",
+ TriggerNs: "trigger_ns",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysServeLogDao creates and returns a new DAO object for table data access.
+func NewSysServeLogDao(handlers ...gdb.ModelHandler) *SysServeLogDao {
+ return &SysServeLogDao{
+ group: "default",
+ table: "hg_sys_serve_log",
+ columns: sysServeLogColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysServeLogDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysServeLogDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysServeLogDao) Columns() SysServeLogColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysServeLogDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysServeLogDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysServeLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/sys_sms_log.go b/server/internal/dao/internal/sys_sms_log.go
new file mode 100755
index 0000000..da73d87
--- /dev/null
+++ b/server/internal/dao/internal/sys_sms_log.go
@@ -0,0 +1,95 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// SysSmsLogDao is the data access object for the table hg_sys_sms_log.
+type SysSmsLogDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns SysSmsLogColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// SysSmsLogColumns defines and stores column names for the table hg_sys_sms_log.
+type SysSmsLogColumns struct {
+ Id string // 主键
+ Event string // 事件
+ Mobile string // 手机号
+ Code string // 验证码或短信内容
+ Times string // 验证次数
+ Ip string // ip地址
+ Status string // 状态(1未验证,2已验证)
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// sysSmsLogColumns holds the columns for the table hg_sys_sms_log.
+var sysSmsLogColumns = SysSmsLogColumns{
+ Id: "id",
+ Event: "event",
+ Mobile: "mobile",
+ Code: "code",
+ Times: "times",
+ Ip: "ip",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewSysSmsLogDao creates and returns a new DAO object for table data access.
+func NewSysSmsLogDao(handlers ...gdb.ModelHandler) *SysSmsLogDao {
+ return &SysSmsLogDao{
+ group: "default",
+ table: "hg_sys_sms_log",
+ columns: sysSmsLogColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *SysSmsLogDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *SysSmsLogDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *SysSmsLogDao) Columns() SysSmsLogColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *SysSmsLogDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *SysSmsLogDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *SysSmsLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/task.go b/server/internal/dao/internal/task.go
new file mode 100644
index 0000000..e4611ad
--- /dev/null
+++ b/server/internal/dao/internal/task.go
@@ -0,0 +1,127 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// TaskDao is the data access object for the table hg_task.
+type TaskDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns TaskColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// TaskColumns defines and stores column names for the table hg_task.
+type TaskColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ TaskNo string // 任务编号
+ HallId string // 任务大厅ID
+ Title string // 标题
+ Description string // 描述
+ DetailHtml string // 清洗后的任务详情
+ CoverAttachmentId string // 封面附件ID
+ CoverUrl string // 封面地址
+ CommissionAmount string // 固定佣金(分)
+ CommissionRate string // 佣金万分比
+ DailyLimit string // 每日总量
+ PerMemberLimit string // 单会员限制
+ StartAt string // 开始时间
+ EndAt string // 结束时间
+ PublishStatus string // 发布状态
+ Sort string // 排序
+ Version string // 乐观锁
+ Remark string // 备注
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// taskColumns holds the columns for the table hg_task.
+var taskColumns = TaskColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ TaskNo: "task_no",
+ HallId: "hall_id",
+ Title: "title",
+ Description: "description",
+ DetailHtml: "detail_html",
+ CoverAttachmentId: "cover_attachment_id",
+ CoverUrl: "cover_url",
+ CommissionAmount: "commission_amount",
+ CommissionRate: "commission_rate",
+ DailyLimit: "daily_limit",
+ PerMemberLimit: "per_member_limit",
+ StartAt: "start_at",
+ EndAt: "end_at",
+ PublishStatus: "publish_status",
+ Sort: "sort",
+ Version: "version",
+ Remark: "remark",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewTaskDao creates and returns a new DAO object for table data access.
+func NewTaskDao(handlers ...gdb.ModelHandler) *TaskDao {
+ return &TaskDao{
+ group: "default",
+ table: "hg_task",
+ columns: taskColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *TaskDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *TaskDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *TaskDao) Columns() TaskColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *TaskDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *TaskDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *TaskDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/task_hall.go b/server/internal/dao/internal/task_hall.go
new file mode 100644
index 0000000..83d2674
--- /dev/null
+++ b/server/internal/dao/internal/task_hall.go
@@ -0,0 +1,117 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// TaskHallDao is the data access object for the table hg_task_hall.
+type TaskHallDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns TaskHallColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// TaskHallColumns defines and stores column names for the table hg_task_hall.
+type TaskHallColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ HallCode string // 大厅编码
+ Name string // 名称
+ IconAttachmentId string // 图标附件ID
+ IconUrl string // 图标URL
+ Summary string // 简介
+ CommissionRate string // 佣金万分比
+ RateUnit string // 比例单位
+ ClientRoute string // C端跳转
+ PublishStatus string // 发布状态
+ Sort string // 排序
+ Version string // 乐观锁
+ Remark string // 备注
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ DeletedBy string // 删除者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+ DeletedAt string // 删除时间
+}
+
+// taskHallColumns holds the columns for the table hg_task_hall.
+var taskHallColumns = TaskHallColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ HallCode: "hall_code",
+ Name: "name",
+ IconAttachmentId: "icon_attachment_id",
+ IconUrl: "icon_url",
+ Summary: "summary",
+ CommissionRate: "commission_rate",
+ RateUnit: "rate_unit",
+ ClientRoute: "client_route",
+ PublishStatus: "publish_status",
+ Sort: "sort",
+ Version: "version",
+ Remark: "remark",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ DeletedBy: "deleted_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewTaskHallDao creates and returns a new DAO object for table data access.
+func NewTaskHallDao(handlers ...gdb.ModelHandler) *TaskHallDao {
+ return &TaskHallDao{
+ group: "default",
+ table: "hg_task_hall",
+ columns: taskHallColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *TaskHallDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *TaskHallDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *TaskHallDao) Columns() TaskHallColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *TaskHallDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *TaskHallDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *TaskHallDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/task_hall_level.go b/server/internal/dao/internal/task_hall_level.go
new file mode 100644
index 0000000..1df7a84
--- /dev/null
+++ b/server/internal/dao/internal/task_hall_level.go
@@ -0,0 +1,87 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// TaskHallLevelDao is the data access object for the table hg_task_hall_level.
+type TaskHallLevelDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns TaskHallLevelColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// TaskHallLevelColumns defines and stores column names for the table hg_task_hall_level.
+type TaskHallLevelColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ HallId string // 任务大厅ID
+ LevelId string // 会员等级ID
+ CreatedAt string // 创建时间
+}
+
+// taskHallLevelColumns holds the columns for the table hg_task_hall_level.
+var taskHallLevelColumns = TaskHallLevelColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ HallId: "hall_id",
+ LevelId: "level_id",
+ CreatedAt: "created_at",
+}
+
+// NewTaskHallLevelDao creates and returns a new DAO object for table data access.
+func NewTaskHallLevelDao(handlers ...gdb.ModelHandler) *TaskHallLevelDao {
+ return &TaskHallLevelDao{
+ group: "default",
+ table: "hg_task_hall_level",
+ columns: taskHallLevelColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *TaskHallLevelDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *TaskHallLevelDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *TaskHallLevelDao) Columns() TaskHallLevelColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *TaskHallLevelDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *TaskHallLevelDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *TaskHallLevelDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/task_level.go b/server/internal/dao/internal/task_level.go
new file mode 100644
index 0000000..de06484
--- /dev/null
+++ b/server/internal/dao/internal/task_level.go
@@ -0,0 +1,87 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// TaskLevelDao is the data access object for the table hg_task_level.
+type TaskLevelDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns TaskLevelColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// TaskLevelColumns defines and stores column names for the table hg_task_level.
+type TaskLevelColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ TaskId string // 任务ID
+ LevelId string // 会员等级ID
+ CreatedAt string // 创建时间
+}
+
+// taskLevelColumns holds the columns for the table hg_task_level.
+var taskLevelColumns = TaskLevelColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ TaskId: "task_id",
+ LevelId: "level_id",
+ CreatedAt: "created_at",
+}
+
+// NewTaskLevelDao creates and returns a new DAO object for table data access.
+func NewTaskLevelDao(handlers ...gdb.ModelHandler) *TaskLevelDao {
+ return &TaskLevelDao{
+ group: "default",
+ table: "hg_task_level",
+ columns: taskLevelColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *TaskLevelDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *TaskLevelDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *TaskLevelDao) Columns() TaskLevelColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *TaskLevelDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *TaskLevelDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *TaskLevelDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/task_submission.go b/server/internal/dao/internal/task_submission.go
new file mode 100644
index 0000000..6a5ee2d
--- /dev/null
+++ b/server/internal/dao/internal/task_submission.go
@@ -0,0 +1,125 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// TaskSubmissionDao is the data access object for the table hg_task_submission.
+type TaskSubmissionDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns TaskSubmissionColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// TaskSubmissionColumns defines and stores column names for the table hg_task_submission.
+type TaskSubmissionColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ SubmissionNo string // 提交编号
+ TradeOrderId string // 交易订单ID
+ TaskId string // 任务ID
+ MemberId string // 会员ID
+ MemberLevelId string // 提交时等级ID
+ EvidenceText string // 证据说明
+ EvidenceAttachmentIds string // 证据附件
+ SubmissionStatus string // 1待审 2通过 3驳回 4已结算 5已冲正
+ CommissionAmount string // 佣金快照(分)
+ SuccessRate string // 成功率万分比
+ ReviewedBy string // 审核人
+ ReviewedAt string // 审核时间
+ ReviewReasonCode string // 标准原因
+ ReviewReason string // 审核意见
+ AllowResubmit string // 是否允许重提
+ LedgerId string // 佣金台账ID
+ SettledAt string // 结算时间
+ ReversalApprovalId string // 冲正审批ID
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// taskSubmissionColumns holds the columns for the table hg_task_submission.
+var taskSubmissionColumns = TaskSubmissionColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ SubmissionNo: "submission_no",
+ TradeOrderId: "trade_order_id",
+ TaskId: "task_id",
+ MemberId: "member_id",
+ MemberLevelId: "member_level_id",
+ EvidenceText: "evidence_text",
+ EvidenceAttachmentIds: "evidence_attachment_ids",
+ SubmissionStatus: "submission_status",
+ CommissionAmount: "commission_amount",
+ SuccessRate: "success_rate",
+ ReviewedBy: "reviewed_by",
+ ReviewedAt: "reviewed_at",
+ ReviewReasonCode: "review_reason_code",
+ ReviewReason: "review_reason",
+ AllowResubmit: "allow_resubmit",
+ LedgerId: "ledger_id",
+ SettledAt: "settled_at",
+ ReversalApprovalId: "reversal_approval_id",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewTaskSubmissionDao creates and returns a new DAO object for table data access.
+func NewTaskSubmissionDao(handlers ...gdb.ModelHandler) *TaskSubmissionDao {
+ return &TaskSubmissionDao{
+ group: "default",
+ table: "hg_task_submission",
+ columns: taskSubmissionColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *TaskSubmissionDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *TaskSubmissionDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *TaskSubmissionDao) Columns() TaskSubmissionColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *TaskSubmissionDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *TaskSubmissionDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *TaskSubmissionDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/test_category.go b/server/internal/dao/internal/test_category.go
new file mode 100755
index 0000000..1ebbc81
--- /dev/null
+++ b/server/internal/dao/internal/test_category.go
@@ -0,0 +1,97 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// TestCategoryDao is the data access object for the table hg_test_category.
+type TestCategoryDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns TestCategoryColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// TestCategoryColumns defines and stores column names for the table hg_test_category.
+type TestCategoryColumns struct {
+ Id string // 分类ID
+ Name string // 分类名称
+ ShortName string // 简称
+ Description string // 描述
+ Sort string // 排序
+ Remark string // 备注
+ Status string // 状态
+ CreatedAt string // 创建时间
+ UpdatedAt string // 修改时间
+ DeletedAt string // 删除时间
+}
+
+// testCategoryColumns holds the columns for the table hg_test_category.
+var testCategoryColumns = TestCategoryColumns{
+ Id: "id",
+ Name: "name",
+ ShortName: "short_name",
+ Description: "description",
+ Sort: "sort",
+ Remark: "remark",
+ Status: "status",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+ DeletedAt: "deleted_at",
+}
+
+// NewTestCategoryDao creates and returns a new DAO object for table data access.
+func NewTestCategoryDao(handlers ...gdb.ModelHandler) *TestCategoryDao {
+ return &TestCategoryDao{
+ group: "default",
+ table: "hg_test_category",
+ columns: testCategoryColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *TestCategoryDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *TestCategoryDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *TestCategoryDao) Columns() TestCategoryColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *TestCategoryDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *TestCategoryDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *TestCategoryDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/trade_order.go b/server/internal/dao/internal/trade_order.go
new file mode 100644
index 0000000..23bab33
--- /dev/null
+++ b/server/internal/dao/internal/trade_order.go
@@ -0,0 +1,129 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// TradeOrderDao is the data access object for the table hg_trade_order.
+type TradeOrderDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns TradeOrderColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// TradeOrderColumns defines and stores column names for the table hg_trade_order.
+type TradeOrderColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ OrderNo string // 订单号
+ MemberId string // 会员ID
+ TaskId string // 任务ID
+ ProductId string // 商品ID
+ ProductName string // 商品名称快照
+ OrderType string // 订单类型
+ Quantity string // 数量
+ UnitPriceAmount string // 单价(分)
+ TotalAmount string // 订单金额(分)
+ CommissionAmount string // 佣金(分)
+ Currency string // 币种
+ MemberLevelId string // 下单等级ID
+ RuleSnapshot string // 规则快照
+ Message string // 订单消息
+ OrderStatus string // 订单状态
+ FreezeStatus string // 冻结状态
+ ApprovalRequestId string // 人工处理审批ID
+ MatchedAt string // 匹配时间
+ CompletedAt string // 完成时间
+ UnfrozenAt string // 解冻时间
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 下单时间
+ UpdatedAt string // 更新时间
+}
+
+// tradeOrderColumns holds the columns for the table hg_trade_order.
+var tradeOrderColumns = TradeOrderColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ OrderNo: "order_no",
+ MemberId: "member_id",
+ TaskId: "task_id",
+ ProductId: "product_id",
+ ProductName: "product_name",
+ OrderType: "order_type",
+ Quantity: "quantity",
+ UnitPriceAmount: "unit_price_amount",
+ TotalAmount: "total_amount",
+ CommissionAmount: "commission_amount",
+ Currency: "currency",
+ MemberLevelId: "member_level_id",
+ RuleSnapshot: "rule_snapshot",
+ Message: "message",
+ OrderStatus: "order_status",
+ FreezeStatus: "freeze_status",
+ ApprovalRequestId: "approval_request_id",
+ MatchedAt: "matched_at",
+ CompletedAt: "completed_at",
+ UnfrozenAt: "unfrozen_at",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewTradeOrderDao creates and returns a new DAO object for table data access.
+func NewTradeOrderDao(handlers ...gdb.ModelHandler) *TradeOrderDao {
+ return &TradeOrderDao{
+ group: "default",
+ table: "hg_trade_order",
+ columns: tradeOrderColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *TradeOrderDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *TradeOrderDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *TradeOrderDao) Columns() TradeOrderColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *TradeOrderDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *TradeOrderDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *TradeOrderDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/wallet_account.go b/server/internal/dao/internal/wallet_account.go
new file mode 100644
index 0000000..bd5c0a6
--- /dev/null
+++ b/server/internal/dao/internal/wallet_account.go
@@ -0,0 +1,101 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// WalletAccountDao is the data access object for the table hg_wallet_account.
+type WalletAccountDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns WalletAccountColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// WalletAccountColumns defines and stores column names for the table hg_wallet_account.
+type WalletAccountColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ MemberId string // 会员ID
+ Currency string // 币种
+ AvailableAmount string // 可用金额(分)
+ FrozenAmount string // 冻结金额(分)
+ TotalIncome string // 累计收入(分)
+ TotalExpense string // 累计支出(分)
+ AccountStatus string // 账户状态
+ Version string // 乐观锁
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// walletAccountColumns holds the columns for the table hg_wallet_account.
+var walletAccountColumns = WalletAccountColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ MemberId: "member_id",
+ Currency: "currency",
+ AvailableAmount: "available_amount",
+ FrozenAmount: "frozen_amount",
+ TotalIncome: "total_income",
+ TotalExpense: "total_expense",
+ AccountStatus: "account_status",
+ Version: "version",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewWalletAccountDao creates and returns a new DAO object for table data access.
+func NewWalletAccountDao(handlers ...gdb.ModelHandler) *WalletAccountDao {
+ return &WalletAccountDao{
+ group: "default",
+ table: "hg_wallet_account",
+ columns: walletAccountColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *WalletAccountDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *WalletAccountDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *WalletAccountDao) Columns() WalletAccountColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *WalletAccountDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *WalletAccountDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *WalletAccountDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/wallet_adjustment_request.go b/server/internal/dao/internal/wallet_adjustment_request.go
new file mode 100644
index 0000000..e8202ba
--- /dev/null
+++ b/server/internal/dao/internal/wallet_adjustment_request.go
@@ -0,0 +1,115 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// WalletAdjustmentRequestDao is the data access object for the table hg_wallet_adjustment_request.
+type WalletAdjustmentRequestDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns WalletAdjustmentRequestColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// WalletAdjustmentRequestColumns defines and stores column names for the table hg_wallet_adjustment_request.
+type WalletAdjustmentRequestColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ RequestNo string // 申请单号
+ MemberId string // 会员ID
+ AccountId string // 钱包账户ID
+ AdjustType string // 调整类型
+ Direction string // 方向 1收入 2支出
+ Amount string // 金额(分)
+ ReasonCode string // 原因编码
+ ReasonText string // 原因说明
+ EvidenceJson string // 凭证附件
+ IdempotencyKey string // 幂等键
+ RequestStatus string // 状态 1待审批 2已通过 3已拒绝 4已执行
+ ApprovalRequestId string // 审批单ID
+ LedgerId string // 账变流水ID
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 创建时间
+ UpdatedAt string // 更新时间
+}
+
+// walletAdjustmentRequestColumns holds the columns for the table hg_wallet_adjustment_request.
+var walletAdjustmentRequestColumns = WalletAdjustmentRequestColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ RequestNo: "request_no",
+ MemberId: "member_id",
+ AccountId: "account_id",
+ AdjustType: "adjust_type",
+ Direction: "direction",
+ Amount: "amount",
+ ReasonCode: "reason_code",
+ ReasonText: "reason_text",
+ EvidenceJson: "evidence_json",
+ IdempotencyKey: "idempotency_key",
+ RequestStatus: "request_status",
+ ApprovalRequestId: "approval_request_id",
+ LedgerId: "ledger_id",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewWalletAdjustmentRequestDao creates and returns a new DAO object for table data access.
+func NewWalletAdjustmentRequestDao(handlers ...gdb.ModelHandler) *WalletAdjustmentRequestDao {
+ return &WalletAdjustmentRequestDao{
+ group: "default",
+ table: "hg_wallet_adjustment_request",
+ columns: walletAdjustmentRequestColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *WalletAdjustmentRequestDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *WalletAdjustmentRequestDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *WalletAdjustmentRequestDao) Columns() WalletAdjustmentRequestColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *WalletAdjustmentRequestDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *WalletAdjustmentRequestDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *WalletAdjustmentRequestDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/wallet_ledger.go b/server/internal/dao/internal/wallet_ledger.go
new file mode 100644
index 0000000..1673f8a
--- /dev/null
+++ b/server/internal/dao/internal/wallet_ledger.go
@@ -0,0 +1,115 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// WalletLedgerDao is the data access object for the table hg_wallet_ledger.
+type WalletLedgerDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns WalletLedgerColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// WalletLedgerColumns defines and stores column names for the table hg_wallet_ledger.
+type WalletLedgerColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ LedgerNo string // 账变流水号
+ AccountId string // 钱包账户ID
+ MemberId string // 会员ID
+ BizType string // 业务类型
+ BizNo string // 业务单号
+ EntryType string // 账变类型
+ Direction string // 方向 1收入 2支出
+ Amount string // 发生金额(分)
+ BeforeAmount string // 变更前余额(分)
+ AfterAmount string // 变更后余额(分)
+ Currency string // 币种
+ ReversalOf string // 冲正原流水ID
+ IdempotencyKey string // 幂等键
+ Remark string // 说明
+ OperatorId string // 操作人
+ OccurredAt string // 发生时间
+ CreatedAt string // 创建时间
+}
+
+// walletLedgerColumns holds the columns for the table hg_wallet_ledger.
+var walletLedgerColumns = WalletLedgerColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ LedgerNo: "ledger_no",
+ AccountId: "account_id",
+ MemberId: "member_id",
+ BizType: "biz_type",
+ BizNo: "biz_no",
+ EntryType: "entry_type",
+ Direction: "direction",
+ Amount: "amount",
+ BeforeAmount: "before_amount",
+ AfterAmount: "after_amount",
+ Currency: "currency",
+ ReversalOf: "reversal_of",
+ IdempotencyKey: "idempotency_key",
+ Remark: "remark",
+ OperatorId: "operator_id",
+ OccurredAt: "occurred_at",
+ CreatedAt: "created_at",
+}
+
+// NewWalletLedgerDao creates and returns a new DAO object for table data access.
+func NewWalletLedgerDao(handlers ...gdb.ModelHandler) *WalletLedgerDao {
+ return &WalletLedgerDao{
+ group: "default",
+ table: "hg_wallet_ledger",
+ columns: walletLedgerColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *WalletLedgerDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *WalletLedgerDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *WalletLedgerDao) Columns() WalletLedgerColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *WalletLedgerDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *WalletLedgerDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *WalletLedgerDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/internal/withdrawal_order.go b/server/internal/dao/internal/withdrawal_order.go
new file mode 100644
index 0000000..648e1f4
--- /dev/null
+++ b/server/internal/dao/internal/withdrawal_order.go
@@ -0,0 +1,135 @@
+// ==========================================================================
+// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
+// ==========================================================================
+
+package internal
+
+import (
+ "context"
+
+ "github.com/gogf/gf/v2/database/gdb"
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+// WithdrawalOrderDao is the data access object for the table hg_withdrawal_order.
+type WithdrawalOrderDao struct {
+ table string // table is the underlying table name of the DAO.
+ group string // group is the database configuration group name of the current DAO.
+ columns WithdrawalOrderColumns // columns contains all the column names of Table for convenient usage.
+ handlers []gdb.ModelHandler // handlers for customized model modification.
+}
+
+// WithdrawalOrderColumns defines and stores column names for the table hg_withdrawal_order.
+type WithdrawalOrderColumns struct {
+ Id string // 主键
+ TenantId string // 租户ID
+ WithdrawalNo string // 提现单号
+ MemberId string // 会员ID
+ PaymentAccountId string // 收款账户ID
+ ChannelId string // 付款渠道ID
+ RequestAmount string // 申请金额(分)
+ FeeAmount string // 手续费(分)
+ ActualAmount string // 实际到账(分)
+ Currency string // 币种
+ AccountSnapshotCipher string // 收款账户加密快照
+ AccountMask string // 收款账户脱敏快照
+ BankName string // 银行名称快照
+ HolderMask string // 开户名脱敏快照
+ RiskResult string // 风控结果摘要
+ WithdrawalStatus string // 提现状态
+ ReviewReasonCode string // 审核原因编码
+ ReviewReason string // 审核意见
+ ApprovalRequestId string // 审批单ID
+ ExternalNo string // 外部付款单号
+ FreezeLedgerId string // 冻结台账ID
+ FinalLedgerId string // 完成或解冻台账ID
+ ReviewedAt string // 审核时间
+ ProcessedAt string // 处理时间
+ CompletedAt string // 完成时间
+ CreatedBy string // 创建者
+ UpdatedBy string // 更新者
+ CreatedAt string // 发起时间
+ UpdatedAt string // 更新时间
+}
+
+// withdrawalOrderColumns holds the columns for the table hg_withdrawal_order.
+var withdrawalOrderColumns = WithdrawalOrderColumns{
+ Id: "id",
+ TenantId: "tenant_id",
+ WithdrawalNo: "withdrawal_no",
+ MemberId: "member_id",
+ PaymentAccountId: "payment_account_id",
+ ChannelId: "channel_id",
+ RequestAmount: "request_amount",
+ FeeAmount: "fee_amount",
+ ActualAmount: "actual_amount",
+ Currency: "currency",
+ AccountSnapshotCipher: "account_snapshot_cipher",
+ AccountMask: "account_mask",
+ BankName: "bank_name",
+ HolderMask: "holder_mask",
+ RiskResult: "risk_result",
+ WithdrawalStatus: "withdrawal_status",
+ ReviewReasonCode: "review_reason_code",
+ ReviewReason: "review_reason",
+ ApprovalRequestId: "approval_request_id",
+ ExternalNo: "external_no",
+ FreezeLedgerId: "freeze_ledger_id",
+ FinalLedgerId: "final_ledger_id",
+ ReviewedAt: "reviewed_at",
+ ProcessedAt: "processed_at",
+ CompletedAt: "completed_at",
+ CreatedBy: "created_by",
+ UpdatedBy: "updated_by",
+ CreatedAt: "created_at",
+ UpdatedAt: "updated_at",
+}
+
+// NewWithdrawalOrderDao creates and returns a new DAO object for table data access.
+func NewWithdrawalOrderDao(handlers ...gdb.ModelHandler) *WithdrawalOrderDao {
+ return &WithdrawalOrderDao{
+ group: "default",
+ table: "hg_withdrawal_order",
+ columns: withdrawalOrderColumns,
+ handlers: handlers,
+ }
+}
+
+// DB retrieves and returns the underlying raw database management object of the current DAO.
+func (dao *WithdrawalOrderDao) DB() gdb.DB {
+ return g.DB(dao.group)
+}
+
+// Table returns the table name of the current DAO.
+func (dao *WithdrawalOrderDao) Table() string {
+ return dao.table
+}
+
+// Columns returns all column names of the current DAO.
+func (dao *WithdrawalOrderDao) Columns() WithdrawalOrderColumns {
+ return dao.columns
+}
+
+// Group returns the database configuration group name of the current DAO.
+func (dao *WithdrawalOrderDao) Group() string {
+ return dao.group
+}
+
+// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
+func (dao *WithdrawalOrderDao) Ctx(ctx context.Context) *gdb.Model {
+ model := dao.DB().Model(dao.table)
+ for _, handler := range dao.handlers {
+ model = handler(model)
+ }
+ return model.Safe().Ctx(ctx)
+}
+
+// Transaction wraps the transaction logic using function f.
+// It rolls back the transaction and returns the error if function f returns a non-nil error.
+// It commits the transaction and returns nil if function f returns nil.
+//
+// Note: Do not commit or roll back the transaction in function f,
+// as it is automatically handled by this function.
+func (dao *WithdrawalOrderDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
+ return dao.Ctx(ctx).Transaction(ctx, f)
+}
diff --git a/server/internal/dao/outbox_event.go b/server/internal/dao/outbox_event.go
new file mode 100644
index 0000000..f880b6b
--- /dev/null
+++ b/server/internal/dao/outbox_event.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// outboxEventDao is the data access object for the table hg_outbox_event.
+// You can define custom methods on it to extend its functionality as needed.
+type outboxEventDao struct {
+ *internal.OutboxEventDao
+}
+
+var (
+ // OutboxEvent is a globally accessible object for table hg_outbox_event operations.
+ OutboxEvent = outboxEventDao{internal.NewOutboxEventDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/pay_log.go b/server/internal/dao/pay_log.go
new file mode 100755
index 0000000..eef43f9
--- /dev/null
+++ b/server/internal/dao/pay_log.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// payLogDao is the data access object for the table hg_pay_log.
+// You can define custom methods on it to extend its functionality as needed.
+type payLogDao struct {
+ *internal.PayLogDao
+}
+
+var (
+ // PayLog is a globally accessible object for table hg_pay_log operations.
+ PayLog = payLogDao{internal.NewPayLogDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/pay_refund.go b/server/internal/dao/pay_refund.go
new file mode 100755
index 0000000..bc52795
--- /dev/null
+++ b/server/internal/dao/pay_refund.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// payRefundDao is the data access object for the table hg_pay_refund.
+// You can define custom methods on it to extend its functionality as needed.
+type payRefundDao struct {
+ *internal.PayRefundDao
+}
+
+var (
+ // PayRefund is a globally accessible object for table hg_pay_refund operations.
+ PayRefund = payRefundDao{internal.NewPayRefundDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/payment_channel.go b/server/internal/dao/payment_channel.go
new file mode 100644
index 0000000..28257f7
--- /dev/null
+++ b/server/internal/dao/payment_channel.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// paymentChannelDao is the data access object for the table hg_payment_channel.
+// You can define custom methods on it to extend its functionality as needed.
+type paymentChannelDao struct {
+ *internal.PaymentChannelDao
+}
+
+var (
+ // PaymentChannel is a globally accessible object for table hg_payment_channel operations.
+ PaymentChannel = paymentChannelDao{internal.NewPaymentChannelDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/product.go b/server/internal/dao/product.go
new file mode 100644
index 0000000..b4bf4c5
--- /dev/null
+++ b/server/internal/dao/product.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// productDao is the data access object for the table hg_product.
+// You can define custom methods on it to extend its functionality as needed.
+type productDao struct {
+ *internal.ProductDao
+}
+
+var (
+ // Product is a globally accessible object for table hg_product operations.
+ Product = productDao{internal.NewProductDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/product_category.go b/server/internal/dao/product_category.go
new file mode 100644
index 0000000..eea4d26
--- /dev/null
+++ b/server/internal/dao/product_category.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// productCategoryDao is the data access object for the table hg_product_category.
+// You can define custom methods on it to extend its functionality as needed.
+type productCategoryDao struct {
+ *internal.ProductCategoryDao
+}
+
+var (
+ // ProductCategory is a globally accessible object for table hg_product_category operations.
+ ProductCategory = productCategoryDao{internal.NewProductCategoryDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/recharge_order.go b/server/internal/dao/recharge_order.go
new file mode 100644
index 0000000..fdd09a8
--- /dev/null
+++ b/server/internal/dao/recharge_order.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// rechargeOrderDao is the data access object for the table hg_recharge_order.
+// You can define custom methods on it to extend its functionality as needed.
+type rechargeOrderDao struct {
+ *internal.RechargeOrderDao
+}
+
+var (
+ // RechargeOrder is a globally accessible object for table hg_recharge_order operations.
+ RechargeOrder = rechargeOrderDao{internal.NewRechargeOrderDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sensitive_access_log.go b/server/internal/dao/sensitive_access_log.go
new file mode 100644
index 0000000..d92dfeb
--- /dev/null
+++ b/server/internal/dao/sensitive_access_log.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sensitiveAccessLogDao is the data access object for the table hg_sensitive_access_log.
+// You can define custom methods on it to extend its functionality as needed.
+type sensitiveAccessLogDao struct {
+ *internal.SensitiveAccessLogDao
+}
+
+var (
+ // SensitiveAccessLog is a globally accessible object for table hg_sensitive_access_log operations.
+ SensitiveAccessLog = sensitiveAccessLogDao{internal.NewSensitiveAccessLogDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/site_config_version.go b/server/internal/dao/site_config_version.go
new file mode 100644
index 0000000..f64dcb4
--- /dev/null
+++ b/server/internal/dao/site_config_version.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// siteConfigVersionDao is the data access object for the table hg_site_config_version.
+// You can define custom methods on it to extend its functionality as needed.
+type siteConfigVersionDao struct {
+ *internal.SiteConfigVersionDao
+}
+
+var (
+ // SiteConfigVersion is a globally accessible object for table hg_site_config_version operations.
+ SiteConfigVersion = siteConfigVersionDao{internal.NewSiteConfigVersionDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_addons_config.go b/server/internal/dao/sys_addons_config.go
new file mode 100755
index 0000000..47c7893
--- /dev/null
+++ b/server/internal/dao/sys_addons_config.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysAddonsConfigDao is the data access object for the table hg_sys_addons_config.
+// You can define custom methods on it to extend its functionality as needed.
+type sysAddonsConfigDao struct {
+ *internal.SysAddonsConfigDao
+}
+
+var (
+ // SysAddonsConfig is a globally accessible object for table hg_sys_addons_config operations.
+ SysAddonsConfig = sysAddonsConfigDao{internal.NewSysAddonsConfigDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_addons_install.go b/server/internal/dao/sys_addons_install.go
new file mode 100644
index 0000000..3eb6bac
--- /dev/null
+++ b/server/internal/dao/sys_addons_install.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysAddonsInstallDao is the data access object for the table hg_sys_addons_install.
+// You can define custom methods on it to extend its functionality as needed.
+type sysAddonsInstallDao struct {
+ *internal.SysAddonsInstallDao
+}
+
+var (
+ // SysAddonsInstall is a globally accessible object for table hg_sys_addons_install operations.
+ SysAddonsInstall = sysAddonsInstallDao{internal.NewSysAddonsInstallDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_attachment.go b/server/internal/dao/sys_attachment.go
new file mode 100755
index 0000000..2e40b56
--- /dev/null
+++ b/server/internal/dao/sys_attachment.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysAttachmentDao is the data access object for the table hg_sys_attachment.
+// You can define custom methods on it to extend its functionality as needed.
+type sysAttachmentDao struct {
+ *internal.SysAttachmentDao
+}
+
+var (
+ // SysAttachment is a globally accessible object for table hg_sys_attachment operations.
+ SysAttachment = sysAttachmentDao{internal.NewSysAttachmentDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_blacklist.go b/server/internal/dao/sys_blacklist.go
new file mode 100755
index 0000000..84bdec1
--- /dev/null
+++ b/server/internal/dao/sys_blacklist.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysBlacklistDao is the data access object for the table hg_sys_blacklist.
+// You can define custom methods on it to extend its functionality as needed.
+type sysBlacklistDao struct {
+ *internal.SysBlacklistDao
+}
+
+var (
+ // SysBlacklist is a globally accessible object for table hg_sys_blacklist operations.
+ SysBlacklist = sysBlacklistDao{internal.NewSysBlacklistDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_config.go b/server/internal/dao/sys_config.go
new file mode 100755
index 0000000..a868a27
--- /dev/null
+++ b/server/internal/dao/sys_config.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysConfigDao is the data access object for the table hg_sys_config.
+// You can define custom methods on it to extend its functionality as needed.
+type sysConfigDao struct {
+ *internal.SysConfigDao
+}
+
+var (
+ // SysConfig is a globally accessible object for table hg_sys_config operations.
+ SysConfig = sysConfigDao{internal.NewSysConfigDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_cron.go b/server/internal/dao/sys_cron.go
new file mode 100755
index 0000000..1e0f647
--- /dev/null
+++ b/server/internal/dao/sys_cron.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysCronDao is the data access object for the table hg_sys_cron.
+// You can define custom methods on it to extend its functionality as needed.
+type sysCronDao struct {
+ *internal.SysCronDao
+}
+
+var (
+ // SysCron is a globally accessible object for table hg_sys_cron operations.
+ SysCron = sysCronDao{internal.NewSysCronDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_cron_group.go b/server/internal/dao/sys_cron_group.go
new file mode 100755
index 0000000..25e1578
--- /dev/null
+++ b/server/internal/dao/sys_cron_group.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysCronGroupDao is the data access object for the table hg_sys_cron_group.
+// You can define custom methods on it to extend its functionality as needed.
+type sysCronGroupDao struct {
+ *internal.SysCronGroupDao
+}
+
+var (
+ // SysCronGroup is a globally accessible object for table hg_sys_cron_group operations.
+ SysCronGroup = sysCronGroupDao{internal.NewSysCronGroupDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_dict_data.go b/server/internal/dao/sys_dict_data.go
new file mode 100755
index 0000000..05e78a3
--- /dev/null
+++ b/server/internal/dao/sys_dict_data.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysDictDataDao is the data access object for the table hg_sys_dict_data.
+// You can define custom methods on it to extend its functionality as needed.
+type sysDictDataDao struct {
+ *internal.SysDictDataDao
+}
+
+var (
+ // SysDictData is a globally accessible object for table hg_sys_dict_data operations.
+ SysDictData = sysDictDataDao{internal.NewSysDictDataDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_dict_type.go b/server/internal/dao/sys_dict_type.go
new file mode 100755
index 0000000..102c167
--- /dev/null
+++ b/server/internal/dao/sys_dict_type.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysDictTypeDao is the data access object for the table hg_sys_dict_type.
+// You can define custom methods on it to extend its functionality as needed.
+type sysDictTypeDao struct {
+ *internal.SysDictTypeDao
+}
+
+var (
+ // SysDictType is a globally accessible object for table hg_sys_dict_type operations.
+ SysDictType = sysDictTypeDao{internal.NewSysDictTypeDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_ems_log.go b/server/internal/dao/sys_ems_log.go
new file mode 100755
index 0000000..cad6a7b
--- /dev/null
+++ b/server/internal/dao/sys_ems_log.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysEmsLogDao is the data access object for the table hg_sys_ems_log.
+// You can define custom methods on it to extend its functionality as needed.
+type sysEmsLogDao struct {
+ *internal.SysEmsLogDao
+}
+
+var (
+ // SysEmsLog is a globally accessible object for table hg_sys_ems_log operations.
+ SysEmsLog = sysEmsLogDao{internal.NewSysEmsLogDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_gen_codes.go b/server/internal/dao/sys_gen_codes.go
new file mode 100755
index 0000000..4e82527
--- /dev/null
+++ b/server/internal/dao/sys_gen_codes.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysGenCodesDao is the data access object for the table hg_sys_gen_codes.
+// You can define custom methods on it to extend its functionality as needed.
+type sysGenCodesDao struct {
+ *internal.SysGenCodesDao
+}
+
+var (
+ // SysGenCodes is a globally accessible object for table hg_sys_gen_codes operations.
+ SysGenCodes = sysGenCodesDao{internal.NewSysGenCodesDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_gen_curd_demo.go b/server/internal/dao/sys_gen_curd_demo.go
new file mode 100755
index 0000000..e67ce1e
--- /dev/null
+++ b/server/internal/dao/sys_gen_curd_demo.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysGenCurdDemoDao is the data access object for the table hg_sys_gen_curd_demo.
+// You can define custom methods on it to extend its functionality as needed.
+type sysGenCurdDemoDao struct {
+ *internal.SysGenCurdDemoDao
+}
+
+var (
+ // SysGenCurdDemo is a globally accessible object for table hg_sys_gen_curd_demo operations.
+ SysGenCurdDemo = sysGenCurdDemoDao{internal.NewSysGenCurdDemoDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_gen_tree_demo.go b/server/internal/dao/sys_gen_tree_demo.go
new file mode 100755
index 0000000..8cc7d86
--- /dev/null
+++ b/server/internal/dao/sys_gen_tree_demo.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysGenTreeDemoDao is the data access object for the table hg_sys_gen_tree_demo.
+// You can define custom methods on it to extend its functionality as needed.
+type sysGenTreeDemoDao struct {
+ *internal.SysGenTreeDemoDao
+}
+
+var (
+ // SysGenTreeDemo is a globally accessible object for table hg_sys_gen_tree_demo operations.
+ SysGenTreeDemo = sysGenTreeDemoDao{internal.NewSysGenTreeDemoDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_log.go b/server/internal/dao/sys_log.go
new file mode 100755
index 0000000..fd4f72a
--- /dev/null
+++ b/server/internal/dao/sys_log.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysLogDao is the data access object for the table hg_sys_log.
+// You can define custom methods on it to extend its functionality as needed.
+type sysLogDao struct {
+ *internal.SysLogDao
+}
+
+var (
+ // SysLog is a globally accessible object for table hg_sys_log operations.
+ SysLog = sysLogDao{internal.NewSysLogDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_login_log.go b/server/internal/dao/sys_login_log.go
new file mode 100755
index 0000000..f158383
--- /dev/null
+++ b/server/internal/dao/sys_login_log.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysLoginLogDao is the data access object for the table hg_sys_login_log.
+// You can define custom methods on it to extend its functionality as needed.
+type sysLoginLogDao struct {
+ *internal.SysLoginLogDao
+}
+
+var (
+ // SysLoginLog is a globally accessible object for table hg_sys_login_log operations.
+ SysLoginLog = sysLoginLogDao{internal.NewSysLoginLogDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_provinces.go b/server/internal/dao/sys_provinces.go
new file mode 100755
index 0000000..7e35c53
--- /dev/null
+++ b/server/internal/dao/sys_provinces.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysProvincesDao is the data access object for the table hg_sys_provinces.
+// You can define custom methods on it to extend its functionality as needed.
+type sysProvincesDao struct {
+ *internal.SysProvincesDao
+}
+
+var (
+ // SysProvinces is a globally accessible object for table hg_sys_provinces operations.
+ SysProvinces = sysProvincesDao{internal.NewSysProvincesDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_serve_license.go b/server/internal/dao/sys_serve_license.go
new file mode 100755
index 0000000..6397152
--- /dev/null
+++ b/server/internal/dao/sys_serve_license.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysServeLicenseDao is the data access object for the table hg_sys_serve_license.
+// You can define custom methods on it to extend its functionality as needed.
+type sysServeLicenseDao struct {
+ *internal.SysServeLicenseDao
+}
+
+var (
+ // SysServeLicense is a globally accessible object for table hg_sys_serve_license operations.
+ SysServeLicense = sysServeLicenseDao{internal.NewSysServeLicenseDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_serve_log.go b/server/internal/dao/sys_serve_log.go
new file mode 100755
index 0000000..1fb569d
--- /dev/null
+++ b/server/internal/dao/sys_serve_log.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysServeLogDao is the data access object for the table hg_sys_serve_log.
+// You can define custom methods on it to extend its functionality as needed.
+type sysServeLogDao struct {
+ *internal.SysServeLogDao
+}
+
+var (
+ // SysServeLog is a globally accessible object for table hg_sys_serve_log operations.
+ SysServeLog = sysServeLogDao{internal.NewSysServeLogDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/sys_sms_log.go b/server/internal/dao/sys_sms_log.go
new file mode 100755
index 0000000..aa2c686
--- /dev/null
+++ b/server/internal/dao/sys_sms_log.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// sysSmsLogDao is the data access object for the table hg_sys_sms_log.
+// You can define custom methods on it to extend its functionality as needed.
+type sysSmsLogDao struct {
+ *internal.SysSmsLogDao
+}
+
+var (
+ // SysSmsLog is a globally accessible object for table hg_sys_sms_log operations.
+ SysSmsLog = sysSmsLogDao{internal.NewSysSmsLogDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/task.go b/server/internal/dao/task.go
new file mode 100644
index 0000000..fe97745
--- /dev/null
+++ b/server/internal/dao/task.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// taskDao is the data access object for the table hg_task.
+// You can define custom methods on it to extend its functionality as needed.
+type taskDao struct {
+ *internal.TaskDao
+}
+
+var (
+ // Task is a globally accessible object for table hg_task operations.
+ Task = taskDao{internal.NewTaskDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/task_hall.go b/server/internal/dao/task_hall.go
new file mode 100644
index 0000000..2be1816
--- /dev/null
+++ b/server/internal/dao/task_hall.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// taskHallDao is the data access object for the table hg_task_hall.
+// You can define custom methods on it to extend its functionality as needed.
+type taskHallDao struct {
+ *internal.TaskHallDao
+}
+
+var (
+ // TaskHall is a globally accessible object for table hg_task_hall operations.
+ TaskHall = taskHallDao{internal.NewTaskHallDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/task_hall_level.go b/server/internal/dao/task_hall_level.go
new file mode 100644
index 0000000..829a21a
--- /dev/null
+++ b/server/internal/dao/task_hall_level.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// taskHallLevelDao is the data access object for the table hg_task_hall_level.
+// You can define custom methods on it to extend its functionality as needed.
+type taskHallLevelDao struct {
+ *internal.TaskHallLevelDao
+}
+
+var (
+ // TaskHallLevel is a globally accessible object for table hg_task_hall_level operations.
+ TaskHallLevel = taskHallLevelDao{internal.NewTaskHallLevelDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/task_level.go b/server/internal/dao/task_level.go
new file mode 100644
index 0000000..49bd439
--- /dev/null
+++ b/server/internal/dao/task_level.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// taskLevelDao is the data access object for the table hg_task_level.
+// You can define custom methods on it to extend its functionality as needed.
+type taskLevelDao struct {
+ *internal.TaskLevelDao
+}
+
+var (
+ // TaskLevel is a globally accessible object for table hg_task_level operations.
+ TaskLevel = taskLevelDao{internal.NewTaskLevelDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/task_submission.go b/server/internal/dao/task_submission.go
new file mode 100644
index 0000000..f43d94f
--- /dev/null
+++ b/server/internal/dao/task_submission.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// taskSubmissionDao is the data access object for the table hg_task_submission.
+// You can define custom methods on it to extend its functionality as needed.
+type taskSubmissionDao struct {
+ *internal.TaskSubmissionDao
+}
+
+var (
+ // TaskSubmission is a globally accessible object for table hg_task_submission operations.
+ TaskSubmission = taskSubmissionDao{internal.NewTaskSubmissionDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/test_category.go b/server/internal/dao/test_category.go
new file mode 100755
index 0000000..d9e5ab7
--- /dev/null
+++ b/server/internal/dao/test_category.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// testCategoryDao is the data access object for the table hg_test_category.
+// You can define custom methods on it to extend its functionality as needed.
+type testCategoryDao struct {
+ *internal.TestCategoryDao
+}
+
+var (
+ // TestCategory is a globally accessible object for table hg_test_category operations.
+ TestCategory = testCategoryDao{internal.NewTestCategoryDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/trade_order.go b/server/internal/dao/trade_order.go
new file mode 100644
index 0000000..fdf1fa2
--- /dev/null
+++ b/server/internal/dao/trade_order.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// tradeOrderDao is the data access object for the table hg_trade_order.
+// You can define custom methods on it to extend its functionality as needed.
+type tradeOrderDao struct {
+ *internal.TradeOrderDao
+}
+
+var (
+ // TradeOrder is a globally accessible object for table hg_trade_order operations.
+ TradeOrder = tradeOrderDao{internal.NewTradeOrderDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/wallet_account.go b/server/internal/dao/wallet_account.go
new file mode 100644
index 0000000..89208dc
--- /dev/null
+++ b/server/internal/dao/wallet_account.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// walletAccountDao is the data access object for the table hg_wallet_account.
+// You can define custom methods on it to extend its functionality as needed.
+type walletAccountDao struct {
+ *internal.WalletAccountDao
+}
+
+var (
+ // WalletAccount is a globally accessible object for table hg_wallet_account operations.
+ WalletAccount = walletAccountDao{internal.NewWalletAccountDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/wallet_adjustment_request.go b/server/internal/dao/wallet_adjustment_request.go
new file mode 100644
index 0000000..acc84ca
--- /dev/null
+++ b/server/internal/dao/wallet_adjustment_request.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// walletAdjustmentRequestDao is the data access object for the table hg_wallet_adjustment_request.
+// You can define custom methods on it to extend its functionality as needed.
+type walletAdjustmentRequestDao struct {
+ *internal.WalletAdjustmentRequestDao
+}
+
+var (
+ // WalletAdjustmentRequest is a globally accessible object for table hg_wallet_adjustment_request operations.
+ WalletAdjustmentRequest = walletAdjustmentRequestDao{internal.NewWalletAdjustmentRequestDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/wallet_ledger.go b/server/internal/dao/wallet_ledger.go
new file mode 100644
index 0000000..373beaf
--- /dev/null
+++ b/server/internal/dao/wallet_ledger.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// walletLedgerDao is the data access object for the table hg_wallet_ledger.
+// You can define custom methods on it to extend its functionality as needed.
+type walletLedgerDao struct {
+ *internal.WalletLedgerDao
+}
+
+var (
+ // WalletLedger is a globally accessible object for table hg_wallet_ledger operations.
+ WalletLedger = walletLedgerDao{internal.NewWalletLedgerDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/dao/withdrawal_order.go b/server/internal/dao/withdrawal_order.go
new file mode 100644
index 0000000..4714fcf
--- /dev/null
+++ b/server/internal/dao/withdrawal_order.go
@@ -0,0 +1,22 @@
+// =================================================================================
+// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
+// =================================================================================
+
+package dao
+
+import (
+ "hotgo/internal/dao/internal"
+)
+
+// withdrawalOrderDao is the data access object for the table hg_withdrawal_order.
+// You can define custom methods on it to extend its functionality as needed.
+type withdrawalOrderDao struct {
+ *internal.WithdrawalOrderDao
+}
+
+var (
+ // WithdrawalOrder is a globally accessible object for table hg_withdrawal_order operations.
+ WithdrawalOrder = withdrawalOrderDao{internal.NewWithdrawalOrderDao()}
+)
+
+// Add your custom methods and functionality below.
diff --git a/server/internal/global/cluster.go b/server/internal/global/cluster.go
new file mode 100644
index 0000000..6a12ca1
--- /dev/null
+++ b/server/internal/global/cluster.go
@@ -0,0 +1,51 @@
+// Package global
+// @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 global
+
+import (
+ "context"
+ "fmt"
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/consts"
+ "hotgo/internal/library/hgrds/lock"
+ "hotgo/internal/library/hgrds/pubsub"
+ "hotgo/internal/service"
+ "hotgo/utility/simple"
+)
+
+// SubscribeClusterSync 订阅集群同步,可以用来集中同步数据、状态等
+func SubscribeClusterSync(ctx context.Context) {
+ if !simple.IsCluster(ctx) {
+ return
+ }
+
+ err := pubsub.SubscribeMap(map[string]pubsub.SubHandler{
+ consts.ClusterSyncSysconfig: service.SysConfig().ClusterSync, // 系统配置
+ consts.ClusterSyncSysBlacklist: service.SysBlacklist().ClusterSync, // 系统黑名单
+ consts.ClusterSyncSysSuperAdmin: service.AdminMember().ClusterSyncSuperAdmin, // 超管
+ })
+
+ if err != nil {
+ g.Log().Fatal(ctx, err)
+ }
+}
+
+// PublishClusterSync 推送集群同步消息,如果没有开启集群部署,则不进行推送
+func PublishClusterSync(ctx context.Context, channel string, message interface{}) {
+ if !simple.IsCluster(ctx) {
+ return
+ }
+
+ mutex := lock.Mutex(fmt.Sprintf("%s:%s", "lock", channel))
+ err := mutex.LockFunc(ctx, func() {
+ if _, err := pubsub.Publish(ctx, channel, message); err != nil {
+ g.Log().Warningf(ctx, "PublishClusterSync %v err:%v", channel, err)
+ }
+ })
+ if err != nil {
+ g.Log().Warningf(ctx, "PublishClusterSync %v LockFunc err:%v", channel, err)
+ }
+}
diff --git a/server/internal/global/global.go b/server/internal/global/global.go
new file mode 100644
index 0000000..bc2b3e1
--- /dev/null
+++ b/server/internal/global/global.go
@@ -0,0 +1,8 @@
+// Package global
+// @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 global
+
+// 在这里可以配置一些全局公用的变量
diff --git a/server/internal/global/httproutes.go b/server/internal/global/httproutes.go
new file mode 100644
index 0000000..8a4e535
--- /dev/null
+++ b/server/internal/global/httproutes.go
@@ -0,0 +1,125 @@
+// 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 (
+ "reflect"
+ "strings"
+ "sync"
+
+ "github.com/gogf/gf/v2/net/ghttp"
+ "github.com/gogf/gf/v2/util/gmeta"
+ "github.com/gogf/gf/v2/util/gtag"
+)
+
+// HTTPRouter http路由
+type HTTPRouter struct {
+ ghttp.RouterItem
+ Tags string `json:"tags" dc:"接口所属的标签,用于接口分类"`
+ Summary string `json:"summary" dc:"接口/参数概要描述"`
+ Description string `json:"description" dc:"接口/参数详细描述"`
+}
+
+var (
+ httpRoutes map[string]*HTTPRouter
+ routeMutex sync.Mutex
+ shortTypeMapForTag = map[string]string{
+ gtag.SummaryShort: gtag.Summary,
+ gtag.SummaryShort2: gtag.Summary,
+ gtag.DescriptionShort: gtag.Description,
+ gtag.DescriptionShort2: gtag.Description,
+ }
+)
+
+// GetRequestRoute 获取当前请求路由属性
+func GetRequestRoute(r *ghttp.Request) *HTTPRouter {
+ key := GenFilterRequestKey(r)
+ routes := LoadHTTPRoutes(r)
+ router, ok := routes[key]
+ if !ok {
+ return nil
+ }
+ return router
+}
+
+// GenFilterRequestKey 根据请求生成唯一key
+func GenFilterRequestKey(r *ghttp.Request) string {
+ return GenRouteKey(r.Method, r.Request.URL.Path)
+}
+
+// GenFilterRouteKey 根据路由生成唯一key
+func GenFilterRouteKey(r *ghttp.Router) string {
+ return GenRouteKey(r.Method, r.Uri)
+}
+
+// GenRouteKey 生成唯一key
+func GenRouteKey(method, path string) string {
+ return strings.ToUpper(method) + " " + path
+}
+
+func LoadHTTPRoutes(r *ghttp.Request) map[string]*HTTPRouter {
+ if httpRoutes == nil {
+ routeMutex.Lock()
+ defer routeMutex.Unlock()
+
+ if httpRoutes != nil {
+ return httpRoutes
+ }
+
+ httpRoutes = make(map[string]*HTTPRouter, len(r.Server.GetRoutes()))
+ for _, v := range r.Server.GetRoutes() {
+ key := GenFilterRouteKey(v.Handler.Router)
+ if _, ok := httpRoutes[key]; !ok {
+ router := new(HTTPRouter)
+ router.RouterItem = v
+ httpRoutes[key] = setRouterMeta(router)
+ }
+ }
+ }
+ return httpRoutes
+}
+
+func setRouterMeta(router *HTTPRouter) *HTTPRouter {
+ if !router.RouterItem.Handler.Info.IsStrictRoute {
+ return router
+ }
+
+ var reflectValue = reflect.ValueOf(router.Handler.Info.Value.Interface())
+ for reflectValue.Kind() == reflect.Ptr {
+ reflectValue = reflectValue.Elem()
+ }
+
+ if reflectValue.Kind() != reflect.Func {
+ return router
+ }
+
+ var reflectType = reflect.TypeOf(router.Handler.Info.Value.Interface())
+ if reflectType.NumIn() != 2 || reflectType.NumOut() != 2 {
+ return router
+ }
+
+ var inputObject reflect.Value
+ if reflectType.In(1).Kind() == reflect.Ptr {
+ inputObject = reflect.New(reflectType.In(1).Elem()).Elem()
+ } else {
+ inputObject = reflect.New(reflectType.In(1)).Elem()
+ }
+
+ inputMetaMap := fillMapWithShortTags(gmeta.Data(inputObject.Interface()))
+ router.Tags = inputMetaMap["tags"]
+ router.Summary = inputMetaMap[gtag.Summary]
+ router.Description = inputMetaMap[gtag.Description]
+ return router
+}
+
+func fillMapWithShortTags(m map[string]string) map[string]string {
+ for k, v := range shortTypeMapForTag {
+ if m[v] == "" && m[k] != "" {
+ m[v] = m[k]
+ }
+ }
+ return m
+}
diff --git a/server/internal/global/init.go b/server/internal/global/init.go
new file mode 100644
index 0000000..3666117
--- /dev/null
+++ b/server/internal/global/init.go
@@ -0,0 +1,168 @@
+// Package global
+// @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 global
+
+import (
+ "context"
+ "fmt"
+ "github.com/gogf/gf/contrib/trace/jaeger/v2"
+ "github.com/gogf/gf/v2"
+ "github.com/gogf/gf/v2/container/gvar"
+ "github.com/gogf/gf/v2/encoding/gjson"
+ "github.com/gogf/gf/v2/frame/g"
+ "github.com/gogf/gf/v2/os/gctx"
+ "github.com/gogf/gf/v2/os/gfile"
+ "github.com/gogf/gf/v2/os/glog"
+ "github.com/gogf/gf/v2/os/gtime"
+ "github.com/gogf/gf/v2/text/gstr"
+ "github.com/gogf/gf/v2/util/gmode"
+ "hotgo/internal/consts"
+ "hotgo/internal/library/cache"
+ "hotgo/internal/library/queue"
+ "hotgo/internal/model/entity"
+ "hotgo/internal/service"
+ "hotgo/utility/charset"
+ "hotgo/utility/simple"
+ "hotgo/utility/validate"
+ "runtime"
+ "strings"
+)
+
+func Init(ctx context.Context) {
+ // 设置gf运行模式
+ SetGFMode(ctx)
+
+ // 设置服务日志处理
+ glog.SetDefaultHandler(LoggingServeLogHandler)
+
+ // 默认上海时区
+ if err := gtime.SetTimeZone("Asia/Shanghai"); err != nil {
+ g.Log().Fatalf(ctx, "时区设置异常 err:%+v", err)
+ return
+ }
+
+ fmt.Printf("欢迎使用HotGo!\r\n当前运行环境:%v, 运行根路径为:%v \r\nHotGo版本:v%v, gf版本:%v \n", runtime.GOOS, gfile.Pwd(), consts.VersionApp, gf.VERSION)
+
+ // 初始化链路追踪
+ InitTrace(ctx)
+
+ // 设置缓存适配器
+ cache.SetAdapter(ctx)
+
+ // 初始化功能库配置
+ service.SysConfig().InitConfig(ctx)
+
+ // 加载超管数据
+ service.AdminMember().LoadSuperAdmin(ctx)
+
+ // 订阅集群同步
+ SubscribeClusterSync(ctx)
+}
+
+// LoggingServeLogHandler 服务日志处理
+// 需要将异常日志保存到服务日志时可以通过SetHandlers设置此方法
+func LoggingServeLogHandler(ctx context.Context, in *glog.HandlerInput) {
+ in.Next(ctx)
+
+ err := g.Try(ctx, func(ctx context.Context) {
+ var err error
+ defer func() {
+ if err != nil {
+ panic(err)
+ }
+ }()
+
+ // web服务日志不做记录,因为会导致重复记录
+ r := g.RequestFromCtx(ctx)
+ if r != nil && r.Server != nil && in.Logger.GetConfig().Path == r.Server.Logger().GetConfig().Path {
+ return
+ }
+
+ conf, err := service.SysConfig().GetLoadServeLog(ctx)
+ if err != nil {
+ return
+ }
+
+ if conf == nil {
+ return
+ }
+
+ if !conf.Switch {
+ return
+ }
+
+ if in.LevelFormat == "" || !gstr.InArray(conf.LevelFormat, in.LevelFormat) {
+ return
+ }
+
+ if in.Stack == "" {
+ in.Stack = in.Logger.GetStack()
+ }
+
+ if len(in.Content) == 0 {
+ in.Content = gstr.StrLimit(gvar.New(in.Values).String(), consts.MaxServeLogContentLen)
+ }
+
+ var data entity.SysServeLog
+ data.TraceId = gctx.CtxId(ctx)
+ data.LevelFormat = in.LevelFormat
+ data.Content = in.Content
+ data.Stack = gjson.New(charset.ParseStack(in.Stack))
+ data.Line = strings.TrimRight(in.CallerPath, ":")
+ data.TriggerNs = in.Time.UnixNano()
+ data.Status = consts.StatusEnabled
+
+ if gstr.Contains(in.Content, `exception recovered`) {
+ data.LevelFormat = "PANI"
+ }
+
+ if data.Stack.IsNil() {
+ data.Stack = gjson.New(consts.NilJsonToString)
+ }
+
+ if conf.Queue {
+ err = queue.Push(consts.QueueServeLogTopic, data)
+ } else {
+ err = service.SysServeLog().RealWrite(ctx, data)
+ }
+ })
+
+ if err != nil {
+ g.Dump("LoggingServeLogHandler err:", err)
+ }
+}
+
+// InitTrace 初始化链路追踪
+func InitTrace(ctx context.Context) {
+ if !g.Cfg().MustGet(ctx, "jaeger.switch").Bool() {
+ return
+ }
+
+ tp, err := jaeger.Init(simple.AppName(ctx), g.Cfg().MustGet(ctx, "jaeger.endpoint").String())
+ if err != nil {
+ g.Log().Fatal(ctx, err)
+ }
+
+ simple.Event().Register(consts.EventServerClose, func(ctx context.Context, args ...interface{}) {
+ _ = tp.Shutdown(ctx)
+ g.Log().Debug(ctx, "jaeger closed ..")
+ })
+}
+
+// SetGFMode 设置gf运行模式
+func SetGFMode(ctx context.Context) {
+ mode := g.Cfg().MustGet(ctx, "system.mode").String()
+ if len(mode) == 0 {
+ mode = gmode.NOT_SET
+ }
+
+ var modes = []string{gmode.DEVELOP, gmode.TESTING, gmode.STAGING, gmode.PRODUCT}
+
+ // 如果是有效的运行模式,就进行设置
+ if validate.InSlice(modes, mode) {
+ gmode.Set(mode)
+ }
+}
diff --git a/server/internal/library/addons/addons.go b/server/internal/library/addons/addons.go
new file mode 100644
index 0000000..dd5f128
--- /dev/null
+++ b/server/internal/library/addons/addons.go
@@ -0,0 +1,61 @@
+// Package addons
+// @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 addons
+
+import (
+ "context"
+ "github.com/gogf/gf/v2/frame/g"
+ "hotgo/internal/consts"
+)
+
+var cacheResourcePath string
+
+// GetResourcePath 获取插件资源路径
+func GetResourcePath(ctx context.Context) string {
+ if len(cacheResourcePath) > 0 {
+ return cacheResourcePath
+ }
+ basePath := g.Cfg().MustGet(ctx, "system.addonsResourcePath").String()
+ if basePath == "" {
+ g.Log().Warning(ctx, "addons GetResourcePath not config found:'system.addonsResourcePath', use default values:'resource'")
+ basePath = "resource"
+ }
+
+ cacheResourcePath = basePath
+ return basePath
+}
+
+// GetModulePath 获取指定模块相对路径
+func GetModulePath(name string) string {
+ return "./" + consts.AddonsDir + "/" + name
+}
+
+// ViewPath 默认的插件模板路径
+// 模板路径:resource/addons/插件模块名称/template
+// 例如:resource/addons/hgexample/template
+// 如果你不喜欢现在的风格,可以自行调整
+func ViewPath(name, basePath string) string {
+ return basePath + "/" + consts.AddonsDir + "/" + name + "/template"
+}
+
+// StaticPath 默认的插件静态路映射关系
+// 静态资源路径:resource/public/addons/插件模块名称/public
+// 例如访问:http://127.0.0.1:8000/addons/hgexample/default 则指向文件-> resource/addons/hgexample/public/default
+// 如果你不喜欢现在的风格,可以自行调整
+func StaticPath(name, basePath string) (string, string) {
+ return "/" + consts.AddonsDir + "/" + name, basePath + "/" + consts.AddonsDir + "/" + name + "/public"
+}
+
+// RouterPrefix 路由前缀
+// 最终效果:/应用名称/插件模块名称/xxx/xxx。
+// 如果你不喜欢现在的风格,可以自行调整
+func RouterPrefix(ctx context.Context, app, name string) string {
+ var prefix = "/"
+ if app != "" {
+ prefix = g.Cfg().MustGet(ctx, "router."+app+".prefix", "/"+app+"").String()
+ }
+ return prefix + "/" + name
+}
diff --git a/server/internal/library/addons/build.go b/server/internal/library/addons/build.go
new file mode 100644
index 0000000..6fab466
--- /dev/null
+++ b/server/internal/library/addons/build.go
@@ -0,0 +1,138 @@
+// Package addons
+// @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 addons
+
+import (
+ "context"
+ "fmt"
+ "github.com/gogf/gf/v2/errors/gerror"
+ "github.com/gogf/gf/v2/os/gfile"
+ "github.com/gogf/gf/v2/text/gstr"
+ "hotgo/internal/consts"
+ "hotgo/internal/model"
+ "hotgo/utility/validate"
+ "strconv"
+ "strings"
+)
+
+type BuildOption struct {
+ Skeleton Skeleton
+ Config *model.BuildAddonConfig
+ Extend []string `json:"extend" dc:"扩展功能"`
+}
+
+// Build 构建新插件
+func Build(ctx context.Context, option *BuildOption) (err error) {
+ var (
+ resourcePath = GetResourcePath(ctx)
+ buildPath = "./" + consts.AddonsDir + "/" + option.Skeleton.Name
+ modulesPath = "./" + consts.AddonsDir + "/modules/" + option.Skeleton.Name + ".go"
+ webApiPath = gstr.Replace(option.Config.WebApiPath, "{$name}", option.Skeleton.Name)
+ webViewsPath = gstr.Replace(option.Config.WebViewsPath, "{$name}", option.Skeleton.Name)
+ replaces = map[string]string{
+ "@{.label}": option.Skeleton.Label,
+ "@{.name}": option.Skeleton.Name,
+ "@{.group}": strconv.Itoa(option.Skeleton.Group),
+ "@{.brief}": option.Skeleton.Brief,
+ "@{.description}": option.Skeleton.Description,
+ "@{.author}": option.Skeleton.Author,
+ "@{.version}": option.Skeleton.Version,
+ "@{.hgVersion}": consts.VersionApp, // HG 版本
+ }
+ )
+
+ if resourcePath == "" {
+ err = gerror.New("请先设置一个有效的插件资源路径,配置名称:'system.addonsResourcePath'")
+ return
+ }
+
+ if err = checkBuildDir(buildPath, modulesPath, webApiPath, webViewsPath); err != nil {
+ return
+ }
+
+ // scans directory recursively
+ list, err := gfile.ScanDirFunc(option.Config.SrcPath, "*", true, func(path string) string {
+ return path
+ })
+
+ if err != nil {
+ return
+ }
+
+ for _, path := range list {
+ if !gfile.IsReadable(path) {
+ err = gerror.Newf("file:%v is unreadable, please check permissions", path)
+ return
+ }
+
+ if gfile.IsDir(path) {
+ continue
+ }
+
+ flowFile := gstr.ReplaceByMap(path, map[string]string{
+ gfile.RealPath(option.Config.SrcPath): "",
+ ".template": "",
+ })
+ flowFile = buildPath + "/" + flowFile
+
+ content := gstr.ReplaceByMap(gfile.GetContents(path), replaces)
+
+ if err = gfile.PutContents(flowFile, content); err != nil {
+ break
+ }
+ }
+
+ // 隐式注入插件
+ if err = gfile.PutContents(modulesPath, gstr.ReplaceByMap(importModules, replaces)); err != nil {
+ return
+ }
+
+ // webApi
+ if err = gfile.PutContents(webApiPath+"/config/index.ts", gstr.ReplaceByMap(webApiLayout, replaces)); err != nil {
+ return
+ }
+
+ // web插件配置主页面
+ if err = gfile.PutContents(webViewsPath+"/config/BasicSetting.vue", gstr.ReplaceByMap(webConfigBasicSetting, replaces)); err != nil {
+ return
+ }
+
+ // web插件基础配置页面
+ if err = gfile.PutContents(webViewsPath+"/config/system.vue", gstr.ReplaceByMap(webConfigSystem, replaces)); err != nil {
+ return
+ }
+
+ // 创建静态目录
+ if validate.InSlice(option.Extend, consts.AddonsExtendResourcePublic) {
+ _, staticPath := StaticPath(option.Skeleton.Name, resourcePath)
+ content := fmt.Sprintf(resourcePublicDefaultFile, option.Skeleton.Label)
+ if err = gfile.PutContents(staticPath+"/default", content); err != nil {
+ return
+ }
+ }
+
+ // 创建模板目录
+ if validate.InSlice(option.Extend, consts.AddonsExtendResourceTemplate) {
+ viewPath := ViewPath(option.Skeleton.Name, resourcePath)
+ if err = gfile.PutContents(viewPath+"/home/index.html", resourceTemplateHomeFile); err != nil {
+ return
+ }
+ }
+ return
+}
+
+func checkBuildDir(paths ...string) (err error) {
+ if len(paths) == 0 {
+ return
+ }
+
+ for _, path := range paths {
+ if gfile.Exists(path) {
+ return gerror.Newf("插件已存在,请换一个插件名称或者经确认无误后依次删除文件夹: [%v] 后重新生成", strings.Join(paths, "、\t"))
+ }
+ }
+ return
+}
diff --git a/server/internal/library/addons/build_layout.go b/server/internal/library/addons/build_layout.go
new file mode 100644
index 0000000..dd85e96
--- /dev/null
+++ b/server/internal/library/addons/build_layout.go
@@ -0,0 +1,232 @@
+// Package addons
+// @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 addons
+
+const (
+ importModules = `// Package modules
+// @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 modules
+
+import _ "hotgo/addons/@{.name}"
+`
+
+ webApiLayout = `import { http } from '@/utils/http/axios';
+
+export function getConfig(params) {
+ return http.request({
+ url: '/@{.name}/config/get',
+ method: 'get',
+ params,
+ });
+}
+
+export function updateConfig(params) {
+ return http.request({
+ url: '/@{.name}/config/update',
+ method: 'post',
+ params,
+ });
+}
+`
+
+ webConfigBasicSetting = `([\n")
+
+ // 主表
+ l.generateWebModelFormSchemaEach(buffer, in.masterFields, in)
+
+ // 关联表
+ if len(in.options.Join) > 0 {
+ for _, v := range in.options.Join {
+ if !isEffectiveJoin(v) {
+ continue
+ }
+ l.generateWebModelFormSchemaEach(buffer, v.Columns, in)
+ }
+ }
+
+ buffer.WriteString("]);\n")
+ return buffer.String()
+}
+
+// generateWebDictOption 生产字典选项
+func (l *gCurd) generateWebDictOption(typ any) string {
+ return fmt.Sprintf(`dict.getOption('%v')`, typ)
+}
+
+func (l *gCurd) generateWebModelFormSchemaEach(buffer *bytes.Buffer, fields []*sysin.GenCodesColumnListModel, in *CurdPreviewInput) {
+ for _, field := range fields {
+ if !field.IsQuery {
+ continue
+ }
+ in.options.Step.HasSearchForm = true
+
+ // 查询用户摘要
+ if field.IsQuery && in.options.Step.HasQueryMemberSummary && IsMemberSummaryField(field.Name) {
+ buffer.WriteString(fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n componentProps: {\n placeholder: '请输入ID|用户名|姓名|手机号',\n onUpdateValue: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NInput", field.Dc))
+ continue
+ }
+
+ var (
+ defaultComponent = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n componentProps: {\n placeholder: '请输入%s',\n onUpdateValue: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NInput", field.Dc, field.Dc)
+ component string
+ )
+
+ // 这里根据编辑表单组件来进行推断,如果没有则使用默认input,这可能会导致和查询条件所需参数不符的情况
+ switch field.FormMode {
+ case FormModeInput, FormModeInputTextarea, FormModeInputEditor, FormModeInputYaml:
+ component = defaultComponent
+
+ case FormModeInputNumber:
+ component = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n componentProps: {\n placeholder: '请输入%s',\n onUpdateValue: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NInputNumber", field.Dc, field.Dc)
+
+ case FormModeDate:
+ component = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n componentProps: {\n type: '%s',\n clearable: true,\n shortcuts: %s,\n onUpdateValue: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NDatePicker", field.Dc, "date", "defShortcuts()")
+ in.options.Step.ImportModel.UtilsDate = append(in.options.Step.ImportModel.UtilsDate, "defShortcuts")
+
+ case FormModeDateRange:
+ component = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n componentProps: {\n type: '%s',\n clearable: true,\n shortcuts: %s,\n onUpdateValue: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NDatePicker", field.Dc, "daterange", "defRangeShortcuts()")
+ in.options.Step.ImportModel.UtilsDate = append(in.options.Step.ImportModel.UtilsDate, "defRangeShortcuts")
+
+ case FormModeTime:
+ component = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n componentProps: {\n type: '%s',\n clearable: true,\n shortcuts: %s,\n onUpdateValue: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NDatePicker", field.Dc, "datetime", "defShortcuts()")
+ in.options.Step.ImportModel.UtilsDate = append(in.options.Step.ImportModel.UtilsDate, "defShortcuts")
+
+ case FormModeTimeRange:
+ component = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n componentProps: {\n type: '%s',\n clearable: true,\n shortcuts: %s,\n onUpdateValue: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NDatePicker", field.Dc, "datetimerange", "defRangeShortcuts()")
+ in.options.Step.ImportModel.UtilsDate = append(in.options.Step.ImportModel.UtilsDate, "defRangeShortcuts")
+
+ case FormModeSwitch:
+ fallthrough
+ case FormModeRadio:
+ component = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n giProps: {\n //span: 24,\n },\n componentProps: {\n options: %v,\n onUpdateChecked: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NRadioGroup", field.Dc, l.generateWebDictOption(in.options.dictMap[field.TsName]))
+
+ case FormModeCheckbox:
+ component = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n giProps: {\n span: 1,\n },\n componentProps: {\n placeholder: '请选择%s',\n options: %v,\n onUpdateChecked: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NCheckbox", field.Dc, field.Dc, l.generateWebDictOption(in.options.dictMap[field.TsName]))
+
+ case FormModeSelect:
+ component = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n defaultValue: null,\n componentProps: {\n placeholder: '请选择%s',\n options: %v,\n onUpdateValue: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NSelect", field.Dc, field.Dc, l.generateWebDictOption(in.options.dictMap[field.TsName]))
+
+ case FormModeSelectMultiple:
+ component = fmt.Sprintf(" {\n field: '%s',\n component: '%s',\n label: '%s',\n defaultValue: null,\n componentProps: {\n multiple: true,\n placeholder: '请选择%s',\n options: %v,\n onUpdateValue: (e: any) => {\n console.log(e);\n },\n },\n },\n", field.TsName, "NSelect", field.Dc, field.Dc, l.generateWebDictOption(in.options.dictMap[field.TsName]))
+
+ default:
+ component = defaultComponent
+ }
+
+ buffer.WriteString(component)
+ }
+}
+
+func (l *gCurd) generateWebModelColumns(ctx context.Context, in *CurdPreviewInput) (string, error) {
+ buffer := bytes.NewBuffer(nil)
+ buffer.WriteString("export const columns = [\n")
+
+ // 主表
+ if err := l.generateWebModelColumnsEach(buffer, in, in.masterFields); err != nil {
+ return "", err
+ }
+
+ // 关联表
+ if len(in.options.Join) > 0 {
+ for _, v := range in.options.Join {
+ if !isEffectiveJoin(v) {
+ continue
+ }
+ if err := l.generateWebModelColumnsEach(buffer, in, v.Columns); err != nil {
+ return "", err
+ }
+ }
+ }
+
+ buffer.WriteString("];\n")
+ return buffer.String(), nil
+}
+
+func (l *gCurd) generateWebModelColumnsEach(buffer *bytes.Buffer, in *CurdPreviewInput, fields []*sysin.GenCodesColumnListModel) (err error) {
+ for _, field := range fields {
+ if !field.IsList {
+ continue
+ }
+ var (
+ defaultComponent = fmt.Sprintf(" {\n title: '%s',\n key: '%s',\n align: '%v',\n width: %v,\n },\n", field.Dc, field.TsName, field.Align, field.Width)
+ component string
+ )
+
+ // 查询用户摘要
+ if in.options.Step.HasHookMemberSummary && IsMemberSummaryField(field.Name) {
+ buffer.WriteString(fmt.Sprintf(" {\n title: '%v',\n key: '%v',\n align: '%v',\n width: %v,\n render(row: State) {\n return renderPopoverMemberSumma(row.%vSumma);\n },\n },\n", field.Dc, field.TsName, field.Align, field.Width, field.TsName))
+ in.options.Step.ImportModel.UtilsIndex = append(in.options.Step.ImportModel.UtilsIndex, []string{"renderPopoverMemberSumma", "MemberSumma"}...)
+ continue
+ }
+
+ // 这里根据编辑表单组件来进行推断,如果没有则使用默认input,这可能会导致和查询条件所需参数不符的情况
+ switch field.FormMode {
+ case FormModeDate:
+ component = fmt.Sprintf(" {\n title: '%s',\n key: '%s',\n align: '%v',\n width: %v,\n render(row: State) {\n return formatToDate(row.%s);\n },\n },\n", field.Dc, field.TsName, field.Align, field.Width, field.TsName)
+ in.options.Step.ImportModel.UtilsDate = append(in.options.Step.ImportModel.UtilsDate, "formatToDate")
+
+ case FormModeRadio:
+ fallthrough
+ case FormModeSelect:
+ if g.IsEmpty(in.options.dictMap[field.TsName]) {
+ err = gerror.Newf("设置单选下拉框选项时,必须选择字典类型,字段名称:%v", field.Name)
+ return
+ }
+ component = fmt.Sprintf(" {\n title: '%s',\n key: '%s',\n align: '%v',\n width: %v,\n render(row: State) {\n return renderOptionTag('%v', row.%v);\n },\n },\n", field.Dc, field.TsName, field.Align, field.Width, in.options.dictMap[field.TsName], field.TsName)
+ in.options.Step.ImportModel.UtilsIndex = append(in.options.Step.ImportModel.UtilsIndex, "renderOptionTag")
+
+ case FormModeSelectMultiple:
+ if g.IsEmpty(in.options.dictMap[field.TsName]) {
+ err = gerror.Newf("设置多选下拉框选项时,必须选择字典类型,字段名称:%v", field.Name)
+ return
+ }
+ component = fmt.Sprintf(" {\n title: '%s',\n key: '%s',\n align: '%v',\n width: %v,\n render(row: State) {\n if (isNullObject(row.%s) || !Array.isArray(row.%s)) {\n return ``;\n }\n return row.%s.map((tagKey) => {\n return renderOptionTag('%s', tagKey)\n });\n },\n },\n", field.Dc, field.TsName, field.Align, field.Width, field.TsName, field.TsName, field.TsName, in.options.dictMap[field.TsName])
+ in.options.Step.ImportModel.NaiveUI = append(in.options.Step.ImportModel.NaiveUI, "NTag")
+ in.options.Step.ImportModel.UtilsIs = append(in.options.Step.ImportModel.UtilsIs, "isNullObject")
+
+ case FormModeUploadImage:
+ component = fmt.Sprintf(" {\n title: '%s',\n key: '%s',\n align: '%v',\n width: %v,\n render(row: State) {\n return renderImage(row.%v);\n },\n },\n", field.Dc, field.TsName, field.Align, field.Width, field.TsName)
+ in.options.Step.ImportModel.UtilsIndex = append(in.options.Step.ImportModel.UtilsIndex, "renderImage")
+
+ case FormModeUploadImages:
+ component = fmt.Sprintf(" {\n title: '%s',\n key: '%s',\n align: '%v',\n width: %v,\n render(row: State) {\n return renderImageGroup(row.%v);\n },\n },\n", field.Dc, field.TsName, field.Align, field.Width, field.TsName)
+ in.options.Step.ImportModel.UtilsIndex = append(in.options.Step.ImportModel.UtilsIndex, "renderImageGroup")
+
+ case FormModeUploadFile:
+ component = fmt.Sprintf(" {\n title: '%s',\n key: '%s',\n align: '%v',\n width: %v,\n render(row: State) {\n return renderFile(row.%v);\n },\n },\n", field.Dc, field.TsName, field.Align, field.Width, field.TsName)
+ in.options.Step.ImportModel.UtilsIndex = append(in.options.Step.ImportModel.UtilsIndex, "renderFile")
+
+ case FormModeUploadFiles:
+ component = fmt.Sprintf(" {\n title: '%s',\n key: '%s',\n align: '%v',\n width: %v,\n render(row: State) {\n return renderFileGroup(row.%v);\n },\n },\n", field.Dc, field.TsName, field.Align, field.Width, field.TsName)
+ in.options.Step.ImportModel.UtilsIndex = append(in.options.Step.ImportModel.UtilsIndex, "renderFileGroup")
+
+ case FormModeSwitch:
+ component = fmt.Sprintf(" {\n title: '%s',\n key: '%s',\n align: '%v',\n width: %v,\n render(row: State) {\n return h(%s, {\n value: row.%s === 1,\n checked: '开启',\n unchecked: '关闭',\n disabled: !hasPermission(['%s']),\n onUpdateValue: function (e) {\n console.log('onUpdateValue e:' + JSON.stringify(e));\n row.%s = e ? 1 : 2;\n Switch({ %s: row.%s, key: '%s', value: row.%s }).then((_res) => {\n $message.success('操作成功');\n });\n },\n });\n },\n },\n", field.Dc, field.TsName, field.Align, field.Width, "NSwitch", field.TsName, "/"+in.options.ApiPrefix+"/switch", field.TsName, in.pk.TsName, in.pk.TsName, convert.CamelCaseToUnderline(field.TsName), field.TsName)
+ in.options.Step.ImportModel.NaiveUI = append(in.options.Step.ImportModel.NaiveUI, "NSwitch")
+
+ case FormModeRate:
+ component = fmt.Sprintf(" {\n title: '%s',\n key: '%s',\n align: '%v',\n width: %v,\n render(row: State) {\n return h(%s, {\n allowHalf: true,\n readonly: true,\n defaultValue: row.%s,\n });\n },\n },\n", field.Dc, field.TsName, field.Align, field.Width, "NRate", field.TsName)
+ in.options.Step.ImportModel.NaiveUI = append(in.options.Step.ImportModel.NaiveUI, "NRate")
+
+ default:
+ component = defaultComponent
+ }
+
+ buffer.WriteString(component)
+ }
+ return
+}
+
+// isStringType 判断字段是否为字符串类型
+func isStringType(tsType, dataType string) bool {
+ // 根据 TypeScript 类型判断
+ if tsType == "string" {
+ return true
+ }
+
+ // 根据数据库数据类型判断
+ stringTypes := []string{
+ // mysql
+ "varchar", "char", "text", "longtext", "mediumtext", "tinytext",
+ "nvarchar", "nchar", "ntext",
+ "string", "enum", "set",
+ // pgsql
+ "bpchar", "date", "time", "timetz", "timestamp", "timestamptz", "interval",
+ "uuid", "bytea", "inet", "cidr", "macaddr", "macaddr8", "bit", "varbit", "json", "jsonb",
+ "point", "line", "lseg", "box", "path", "polygon", "circle", "money",
+ }
+
+ for _, t := range stringTypes {
+ if strings.EqualFold(dataType, t) {
+ return true
+ }
+ }
+ return false
+}
diff --git a/server/internal/library/hggen/views/curd_generate_web_view.go b/server/internal/library/hggen/views/curd_generate_web_view.go
new file mode 100644
index 0000000..dc932fd
--- /dev/null
+++ b/server/internal/library/hggen/views/curd_generate_web_view.go
@@ -0,0 +1,90 @@
+// Package views
+// @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 views
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+
+ "github.com/gogf/gf/v2/frame/g"
+)
+
+func (l *gCurd) webViewTplData(ctx context.Context, in *CurdPreviewInput) (data g.Map, err error) {
+ data = make(g.Map)
+ item, hasUpload := l.generateWebViewItem(ctx, in)
+ data["item"] = item
+ data["hasUploadFile"] = hasUpload
+ return
+}
+
+func (l *gCurd) generateWebViewItem(ctx context.Context, in *CurdPreviewInput) (string, bool) {
+ buffer := bytes.NewBuffer(nil)
+ hasUploadFile := false
+
+ for _, field := range in.masterFields {
+ if !field.IsEdit {
+ continue
+ }
+
+ // 检测是否使用了文件上传相关的组件
+ if field.FormMode == FormModeUploadFile || field.FormMode == FormModeUploadFiles {
+ hasUploadFile = true
+ }
+
+ var (
+ defaultComponent = fmt.Sprintf("\n %s \n {{ formValue.%s }}\n ", field.Dc, field.TsName)
+ component string
+ )
+
+ switch field.FormMode {
+ case FormModeInputTextarea, FormModeInputEditor:
+ component = fmt.Sprintf("\n %s \n \n ", field.Dc, field.TsName)
+
+ case FormModeInputYaml:
+ component = fmt.Sprintf("\n %s \n {{ formValue.%s }}\n ", field.Dc, field.TsName)
+
+ case FormModeInputDynamic:
+ component = defaultComponent
+
+ case FormModeDate:
+ component = defaultComponent
+
+ case FormModeTime:
+ component = defaultComponent
+
+ case FormModeRadio, FormModeSelect:
+ component = fmt.Sprintf("\n \n {{ dict.getLabel('%s', formValue.%s) }}\n \n ", field.Dc, in.options.dictMap[field.TsName], field.TsName, in.options.dictMap[field.TsName], field.TsName)
+
+ case FormModeCheckbox, FormModeSelectMultiple:
+ component = fmt.Sprintf("\n \n \n {{ dict.getLabel('%s', item) }}\n \n \n ", field.Dc, field.TsName, in.options.dictMap[field.TsName], in.options.dictMap[field.TsName])
+
+ case FormModeUploadImage:
+ component = fmt.Sprintf("\n %s \n \n ", field.Dc, field.TsName)
+
+ case FormModeUploadImages:
+ component = fmt.Sprintf("\n %s \n \n \n \n \n \n \n \n ", field.Dc, field.TsName)
+
+ case FormModeUploadFile:
+ component = fmt.Sprintf("\n %s \n \n
\n
\n
\n {{ getFileExt(formValue.%s) }}\n
\n
\n
\n
\n ", field.Dc, field.TsName, field.TsName, field.TsName)
+
+ case FormModeUploadFiles:
+ component = fmt.Sprintf("\n %s \n \n
\n \n
\n
\n \n {{ getFileExt(item) }}\n \n
\n
\n
\n \n
\n ", field.Dc, field.TsName)
+
+ case FormModeSwitch:
+ component = fmt.Sprintf("\n \n ", field.Dc, field.TsName)
+
+ case FormModeRate:
+ component = fmt.Sprintf("\n \n ", field.Dc, field.TsName)
+
+ default:
+ component = defaultComponent
+ }
+
+ buffer.WriteString(" " + component + "\n\n")
+ }
+ return buffer.String(), hasUploadFile
+}
diff --git a/server/internal/library/hggen/views/gohtml/consts.go b/server/internal/library/hggen/views/gohtml/consts.go
new file mode 100644
index 0000000..625118c
--- /dev/null
+++ b/server/internal/library/hggen/views/gohtml/consts.go
@@ -0,0 +1,7 @@
+package gohtml
+
+const (
+ defaultIndentString = " "
+ startIndent = 0
+ defaultLastElement = ""
+)
diff --git a/server/internal/library/hggen/views/gohtml/doc.go b/server/internal/library/hggen/views/gohtml/doc.go
new file mode 100644
index 0000000..f787ed3
--- /dev/null
+++ b/server/internal/library/hggen/views/gohtml/doc.go
@@ -0,0 +1,2 @@
+// Package gohtml provides an HTML formatting function.
+package gohtml
diff --git a/server/internal/library/hggen/views/gohtml/element.go b/server/internal/library/hggen/views/gohtml/element.go
new file mode 100644
index 0000000..a41be68
--- /dev/null
+++ b/server/internal/library/hggen/views/gohtml/element.go
@@ -0,0 +1,7 @@
+package gohtml
+
+// An element represents an HTML element.
+type element interface {
+ isInline() bool
+ write(*formattedBuffer, bool) bool
+}
diff --git a/server/internal/library/hggen/views/gohtml/formatter.go b/server/internal/library/hggen/views/gohtml/formatter.go
new file mode 100644
index 0000000..0f1e1f6
--- /dev/null
+++ b/server/internal/library/hggen/views/gohtml/formatter.go
@@ -0,0 +1,36 @@
+package gohtml
+
+import (
+ "bytes"
+ "strconv"
+ "strings"
+)
+
+// Format parses the input HTML string, formats it and returns the result.
+func Format(s string) string {
+ return parse(strings.NewReader(s)).html()
+}
+
+// FormatBytes parses input HTML as bytes, formats it and returns the result.
+func FormatBytes(b []byte) []byte {
+ return parse(bytes.NewReader(b)).bytes()
+}
+
+// Format parses the input HTML string, formats it and returns the result with line no.
+func FormatWithLineNo(s string) string {
+ return AddLineNo(Format(s))
+}
+
+func AddLineNo(s string) string {
+ lines := strings.Split(s, "\n")
+ maxLineNoStrLen := len(strconv.Itoa(len(lines)))
+ bf := &bytes.Buffer{}
+ for i, line := range lines {
+ lineNoStr := strconv.Itoa(i + 1)
+ if i > 0 {
+ bf.WriteString("\n")
+ }
+ bf.WriteString(strings.Repeat(" ", maxLineNoStrLen-len(lineNoStr)) + lineNoStr + " " + line)
+ }
+ return bf.String()
+}
diff --git a/server/internal/library/hggen/views/gohtml/html_document.go b/server/internal/library/hggen/views/gohtml/html_document.go
new file mode 100644
index 0000000..3d9e6ea
--- /dev/null
+++ b/server/internal/library/hggen/views/gohtml/html_document.go
@@ -0,0 +1,54 @@
+package gohtml
+
+import (
+ "bytes"
+ "regexp"
+)
+
+// Column to wrap lines to (disabled by default)
+var LineWrapColumn = 0
+
+// Maxmimum characters a long word can extend past LineWrapColumn without wrapping
+var LineWrapMaxSpillover = 5
+
+// An htmlDocument represents an HTML document.
+type htmlDocument struct {
+ elements []element
+}
+
+// html generates an HTML source code and returns it.
+func (htmlDoc *htmlDocument) html() string {
+ str := string(htmlDoc.bytes())
+ str = replaceMultipleNewlinesWithSpaceAndTabs(str)
+ return str
+}
+
+func replaceMultipleNewlinesWithSpaceAndTabs(input string) string {
+ re := regexp.MustCompile(`\n\s*\n+`)
+ formattedString := re.ReplaceAllString(input, "\n")
+ return formattedString
+}
+
+// bytes reads from htmlDocument's internal array of elements and returns HTML source code
+func (htmlDoc *htmlDocument) bytes() []byte {
+ bf := &formattedBuffer{
+ buffer: &bytes.Buffer{},
+
+ lineWrapColumn: LineWrapColumn,
+ lineWrapMaxSpillover: LineWrapMaxSpillover,
+
+ indentString: defaultIndentString,
+ indentLevel: startIndent,
+ }
+
+ isPreviousNodeInline := true
+ for _, child := range htmlDoc.elements {
+ isPreviousNodeInline = child.write(bf, isPreviousNodeInline)
+ }
+ return bf.buffer.Bytes()
+}
+
+// append appends an element to the htmlDocument.
+func (htmlDoc *htmlDocument) append(e element) {
+ htmlDoc.elements = append(htmlDoc.elements, e)
+}
diff --git a/server/internal/library/hggen/views/gohtml/parser.go b/server/internal/library/hggen/views/gohtml/parser.go
new file mode 100644
index 0000000..2ca7444
--- /dev/null
+++ b/server/internal/library/hggen/views/gohtml/parser.go
@@ -0,0 +1,128 @@
+package gohtml
+
+import (
+ "io"
+ "regexp"
+ "strings"
+
+ "golang.org/x/net/html"
+)
+
+// parse parses a stirng and converts it into an html.
+func parse(r io.Reader) *htmlDocument {
+ htmlDoc := &htmlDocument{}
+ tokenizer := html.NewTokenizer(r)
+ for {
+ if errorToken, _, _ := parseToken(tokenizer, htmlDoc, nil); errorToken {
+ break
+ }
+ }
+ return htmlDoc
+}
+
+// Function that identifies which tags will be treated as containing preformatted
+// content. Such tags will have the formatting of all its contents preserved
+// unchanged.
+// The opening tag html.Token is passed to this function.
+// By default, only and