From 9e42257e4eadb57b76b8d8ff9cef08ec77ed3c9c Mon Sep 17 00:00:00 2001 From: 18278715334 <18278715334@163.com> Date: Mon, 5 Jan 2026 12:49:57 +0800 Subject: [PATCH] add config --- app/main/api/desc/admin/admin_agent.api | 25 ++++++- app/main/api/etc/main.dev.yaml | 1 + app/main/api/etc/main.yaml | 1 + app/main/api/internal/config/config.go | 3 +- ...dminbatchunfreezeagentcommissionhandler.go | 3 +- .../admingetsystemconfighandler.go | 17 +++++ .../adminupdatesystemconfighandler.go | 30 +++++++++ app/main/api/internal/handler/routes.go | 10 +++ .../admin_agent/admingetsystemconfiglogic.go | 31 +++++++++ .../adminupdatesystemconfiglogic.go | 37 +++++++++++ app/main/api/internal/service/agentService.go | 47 +++++++++---- app/main/api/internal/types/types.go | 12 ++++ go.mod | 30 +++++---- go.sum | 66 ++++++++++--------- 14 files changed, 253 insertions(+), 60 deletions(-) create mode 100644 app/main/api/internal/handler/admin_agent/admingetsystemconfighandler.go create mode 100644 app/main/api/internal/handler/admin_agent/adminupdatesystemconfighandler.go create mode 100644 app/main/api/internal/logic/admin_agent/admingetsystemconfiglogic.go create mode 100644 app/main/api/internal/logic/admin_agent/adminupdatesystemconfiglogic.go diff --git a/app/main/api/desc/admin/admin_agent.api b/app/main/api/desc/admin/admin_agent.api index 76dd028..4d49416 100644 --- a/app/main/api/desc/admin/admin_agent.api +++ b/app/main/api/desc/admin/admin_agent.api @@ -98,7 +98,15 @@ service main { @handler AdminGetAgentLinkProductStatistics get /agent-link/product-statistics (AdminGetAgentLinkProductStatisticsReq) returns (AdminGetAgentLinkProductStatisticsResp) -} + // 获取系统配置 + @handler AdminGetSystemConfig + get /system-config (AdminGetSystemConfigResp) + + // 更新系统配置 + @handler AdminUpdateSystemConfig + post /system-config (AdminUpdateSystemConfigReq) returns (AdminUpdateSystemConfigResp) + + } type ( // 代理分页查询请求 @@ -537,4 +545,19 @@ type ( Balance float64 `json:"balance"` // 修改后的余额 } + // 更新系统配置请求 + AdminUpdateSystemConfigReq { + CommissionSafeMode *bool `json:"commission_safe_mode,optional"` // 佣金安全防御模式:true-冻结模式,false-直接结算模式 + } + + // 更新系统配置响应 + AdminUpdateSystemConfigResp { + Success bool `json:"success"` // 是否成功 + } + + // 获取系统配置响应 + AdminGetSystemConfigResp { + CommissionSafeMode bool `json:"commission_safe_mode"` // 佣金安全防御模式 + } + ) \ No newline at end of file diff --git a/app/main/api/etc/main.dev.yaml b/app/main/api/etc/main.dev.yaml index 0ed2e9c..30994a3 100644 --- a/app/main/api/etc/main.dev.yaml +++ b/app/main/api/etc/main.dev.yaml @@ -62,6 +62,7 @@ Ali: Code: "d55b58829efb41c8aa8e86769cba4844" SystemConfig: ThreeVerify: false + CommissionSafeMode: false # 佣金安全防御模式:true-冻结模式,false-直接结算模式 WechatH5: AppID: "wxa581992dc74d860e" AppSecret: "4de1fbf521712247542d49907fcd5dbf" diff --git a/app/main/api/etc/main.yaml b/app/main/api/etc/main.yaml index 4a8d068..084ccf0 100644 --- a/app/main/api/etc/main.yaml +++ b/app/main/api/etc/main.yaml @@ -63,6 +63,7 @@ Ali: Code: "d55b58829efb41c8aa8e86769cba4844" SystemConfig: ThreeVerify: true + CommissionSafeMode: false # 佣金安全防御模式:true-冻结模式,false-直接结算模式 WechatH5: AppID: "wxa581992dc74d860e" AppSecret: "4de1fbf521712247542d49907fcd5dbf" diff --git a/app/main/api/internal/config/config.go b/app/main/api/internal/config/config.go index 11ae3e8..b8fac11 100644 --- a/app/main/api/internal/config/config.go +++ b/app/main/api/internal/config/config.go @@ -92,7 +92,8 @@ type YushanConfig struct { Url string } type SystemConfig struct { - ThreeVerify bool + ThreeVerify bool // 是否开启三级实名认证 + CommissionSafeMode bool // 佣金安全防御模式:true-冻结模式(status=1,进入frozen_balance),false-直接结算(status=0,进入balance) } type WechatH5Config struct { AppID string diff --git a/app/main/api/internal/handler/admin_agent/adminbatchunfreezeagentcommissionhandler.go b/app/main/api/internal/handler/admin_agent/adminbatchunfreezeagentcommissionhandler.go index df48f1d..757b3d8 100644 --- a/app/main/api/internal/handler/admin_agent/adminbatchunfreezeagentcommissionhandler.go +++ b/app/main/api/internal/handler/admin_agent/adminbatchunfreezeagentcommissionhandler.go @@ -3,12 +3,13 @@ package admin_agent import ( "net/http" - "github.com/zeromicro/go-zero/rest/httpx" "tydata-server/app/main/api/internal/logic/admin_agent" "tydata-server/app/main/api/internal/svc" "tydata-server/app/main/api/internal/types" "tydata-server/common/result" "tydata-server/pkg/lzkit/validator" + + "github.com/zeromicro/go-zero/rest/httpx" ) func AdminBatchUnfreezeAgentCommissionHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { diff --git a/app/main/api/internal/handler/admin_agent/admingetsystemconfighandler.go b/app/main/api/internal/handler/admin_agent/admingetsystemconfighandler.go new file mode 100644 index 0000000..a03c412 --- /dev/null +++ b/app/main/api/internal/handler/admin_agent/admingetsystemconfighandler.go @@ -0,0 +1,17 @@ +package admin_agent + +import ( + "net/http" + + "tydata-server/app/main/api/internal/logic/admin_agent" + "tydata-server/app/main/api/internal/svc" + "tydata-server/common/result" +) + +func AdminGetSystemConfigHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + l := admin_agent.NewAdminGetSystemConfigLogic(r.Context(), svcCtx) + resp, err := l.AdminGetSystemConfig() + result.HttpResult(r, w, resp, err) + } +} diff --git a/app/main/api/internal/handler/admin_agent/adminupdatesystemconfighandler.go b/app/main/api/internal/handler/admin_agent/adminupdatesystemconfighandler.go new file mode 100644 index 0000000..91d6eb7 --- /dev/null +++ b/app/main/api/internal/handler/admin_agent/adminupdatesystemconfighandler.go @@ -0,0 +1,30 @@ +package admin_agent + +import ( + "net/http" + + "tydata-server/app/main/api/internal/logic/admin_agent" + "tydata-server/app/main/api/internal/svc" + "tydata-server/app/main/api/internal/types" + "tydata-server/common/result" + "tydata-server/pkg/lzkit/validator" + + "github.com/zeromicro/go-zero/rest/httpx" +) + +func AdminUpdateSystemConfigHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + var req types.AdminUpdateSystemConfigReq + if err := httpx.Parse(r, &req); err != nil { + result.ParamErrorResult(r, w, err) + return + } + if err := validator.Validate(req); err != nil { + result.ParamValidateErrorResult(r, w, err) + return + } + l := admin_agent.NewAdminUpdateSystemConfigLogic(r.Context(), svcCtx) + resp, err := l.AdminUpdateSystemConfig(&req) + result.HttpResult(r, w, resp, err) + } +} diff --git a/app/main/api/internal/handler/routes.go b/app/main/api/internal/handler/routes.go index f61b267..570e990 100644 --- a/app/main/api/internal/handler/routes.go +++ b/app/main/api/internal/handler/routes.go @@ -132,6 +132,16 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Path: "/statistics", Handler: admin_agent.AdminGetAgentStatisticsHandler(serverCtx), }, + { + Method: http.MethodGet, + Path: "/system-config", + Handler: admin_agent.AdminGetSystemConfigHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/system-config", + Handler: admin_agent.AdminUpdateSystemConfigHandler(serverCtx), + }, { Method: http.MethodGet, Path: "/wallet/:agent_id", diff --git a/app/main/api/internal/logic/admin_agent/admingetsystemconfiglogic.go b/app/main/api/internal/logic/admin_agent/admingetsystemconfiglogic.go new file mode 100644 index 0000000..af251b0 --- /dev/null +++ b/app/main/api/internal/logic/admin_agent/admingetsystemconfiglogic.go @@ -0,0 +1,31 @@ +package admin_agent + +import ( + "context" + + "tydata-server/app/main/api/internal/svc" + "tydata-server/app/main/api/internal/types" + + "github.com/zeromicro/go-zero/core/logx" +) + +type AdminGetSystemConfigLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +func NewAdminGetSystemConfigLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AdminGetSystemConfigLogic { + return &AdminGetSystemConfigLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *AdminGetSystemConfigLogic) AdminGetSystemConfig() (resp *types.AdminGetSystemConfigResp, err error) { + resp = &types.AdminGetSystemConfigResp{ + CommissionSafeMode: l.svcCtx.Config.SystemConfig.CommissionSafeMode, + } + return +} diff --git a/app/main/api/internal/logic/admin_agent/adminupdatesystemconfiglogic.go b/app/main/api/internal/logic/admin_agent/adminupdatesystemconfiglogic.go new file mode 100644 index 0000000..78dc5ec --- /dev/null +++ b/app/main/api/internal/logic/admin_agent/adminupdatesystemconfiglogic.go @@ -0,0 +1,37 @@ +package admin_agent + +import ( + "context" + + "tydata-server/app/main/api/internal/svc" + "tydata-server/app/main/api/internal/types" + + "github.com/zeromicro/go-zero/core/logx" +) + +type AdminUpdateSystemConfigLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +func NewAdminUpdateSystemConfigLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AdminUpdateSystemConfigLogic { + return &AdminUpdateSystemConfigLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *AdminUpdateSystemConfigLogic) AdminUpdateSystemConfig(req *types.AdminUpdateSystemConfigReq) (resp *types.AdminUpdateSystemConfigResp, err error) { + // 更新佣金安全防御模式配置 + if req.CommissionSafeMode != nil { + l.svcCtx.Config.SystemConfig.CommissionSafeMode = *req.CommissionSafeMode + logx.Infof("更新系统配置:佣金安全防御模式设置为 %v", *req.CommissionSafeMode) + } + + resp = &types.AdminUpdateSystemConfigResp{ + Success: true, + } + return +} diff --git a/app/main/api/internal/service/agentService.go b/app/main/api/internal/service/agentService.go index 9e43024..effb19e 100644 --- a/app/main/api/internal/service/agentService.go +++ b/app/main/api/internal/service/agentService.go @@ -142,19 +142,28 @@ func (l *AgentService) AgentProcess(ctx context.Context, order *model.Order) err if findAgentWalletModelErr != nil { return findAgentWalletModelErr } - // 奖励不冻结 + // 奖励不冻结,直接进入balance ancestorWallet.Balance += ancestorCommissionReward - // 冻结 - ancestorWallet.FrozenBalance += ancestorCommissionAmount + // 根据安全防御模式配置决定佣金处理方式 + var commissionStatus int64 + if l.config.SystemConfig.CommissionSafeMode { + // 安全防御模式:佣金冻结在frozen_balance中 + ancestorWallet.FrozenBalance += ancestorCommissionAmount + commissionStatus = 1 // 冻结状态 + } else { + // 非安全防御模式:佣金直接进入balance + ancestorWallet.Balance += ancestorCommissionAmount + commissionStatus = 0 // 已结算状态 + } - // 为上级创建佣金记录(冻结金额) + // 为上级创建佣金记录 ancestorCommissionRecord := model.AgentCommission{ AgentId: AncestorId, OrderId: order.Id, Amount: ancestorCommissionAmount, ProductId: order.ProductId, - Status: 1, // 设置为冻结状态 + Status: commissionStatus, } _, insertAncestorCommissionErr := l.AgentCommissionModel.Insert(transCtx, session, &ancestorCommissionRecord) if insertAncestorCommissionErr != nil { @@ -182,13 +191,15 @@ func (l *AgentService) AgentProcess(ctx context.Context, order *model.Order) err return transErr } - // 在事务提交后,触发解冻任务(3天后自动解冻) - // 注意:这里发送的是任务,实际解冻将在3天后由队列处理 - if l.AsynqService != nil { + // 在事务提交后,仅在安全防御模式下触发解冻任务 + // 注意:这里发送的是任务,实际解冻将在指定时间后由队列处理 + if l.AsynqService != nil && l.config.SystemConfig.CommissionSafeMode { + // 仅在安全防御模式下,才需要发送解冻任务 // 获取刚创建的佣金记录ID // 由于我们需要佣金记录ID来触发解冻任务,但事务中无法获取,我们可以在事务后查询 builder := l.AgentCommissionModel.SelectBuilder(). Where("order_id = ?", order.Id). + Where("status = ?", 1). // 只查询状态为冻结的佣金 Where("del_state = ?", globalkey.DelStateNo) commissions, findErr := l.AgentCommissionModel.FindAll(ctx, builder, "") @@ -198,7 +209,7 @@ func (l *AgentService) AgentProcess(ctx context.Context, order *model.Order) err } if len(commissions) > 0 { - // 为所有新创建的佣金记录触发解冻任务 + // 为所有新创建的冻结佣金记录触发解冻任务 for _, commission := range commissions { // 发送解冻任务,将在10小时后执行 sendTaskErr := l.AsynqService.SendUnfreezeCommissionTask(commission.Id) @@ -224,15 +235,29 @@ func (l *AgentService) AgentCommission(ctx context.Context, agentID int64, order } // 推广人最终获得代理佣金 finalCommission := order.Amount - deductedAmount - agentWalletModel.FrozenBalance += finalCommission + + // 根据安全防御模式配置决定佣金状态和钱包操作 + if l.config.SystemConfig.CommissionSafeMode { + // 安全防御模式:佣金冻结在frozen_balance中 + agentWalletModel.FrozenBalance += finalCommission + } else { + // 非安全防御模式:佣金直接进入balance + agentWalletModel.Balance += finalCommission + } agentWalletModel.TotalEarnings += finalCommission + // 根据安全防御模式配置决定佣金状态 + commissionStatus := int64(1) // 默认为冻结状态 + if !l.config.SystemConfig.CommissionSafeMode { + commissionStatus = 0 // 非安全模式直接设置为已结算 + } + agentCommission := model.AgentCommission{ AgentId: agentID, OrderId: order.Id, Amount: finalCommission, ProductId: order.ProductId, - Status: 1, // 设置为冻结状态 + Status: commissionStatus, } insertResult, insertAgentCommissionErr := l.AgentCommissionModel.Insert(ctx, session, &agentCommission) if insertAgentCommissionErr != nil { diff --git a/app/main/api/internal/types/types.go b/app/main/api/internal/types/types.go index 4b5c5d6..c083c68 100644 --- a/app/main/api/internal/types/types.go +++ b/app/main/api/internal/types/types.go @@ -691,6 +691,10 @@ type AdminGetRoleApiListResp struct { Items []AdminRoleApiInfo `json:"items"` } +type AdminGetSystemConfigResp struct { + CommissionSafeMode bool `json:"commission_safe_mode"` // 佣金安全防御模式 +} + type AdminGetUserDetailReq struct { Id int64 `path:"id"` // 用户ID } @@ -976,6 +980,14 @@ type AdminUpdateRoleApiResp struct { Success bool `json:"success"` } +type AdminUpdateSystemConfigReq struct { + CommissionSafeMode *bool `json:"commission_safe_mode,optional"` // 佣金安全防御模式:true-冻结模式,false-直接结算模式 +} + +type AdminUpdateSystemConfigResp struct { + Success bool `json:"success"` // 是否成功 +} + type AdminUpdateUserReq struct { Id int64 `path:"id"` // 用户ID Username *string `json:"username,optional"` // 用户名 diff --git a/go.mod b/go.mod index 9fb9d6d..60b1a55 100644 --- a/go.mod +++ b/go.mod @@ -14,23 +14,23 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/fogleman/gg v1.3.0 github.com/go-playground/validator/v10 v10.22.1 - github.com/golang-jwt/jwt/v4 v4.5.0 + github.com/golang-jwt/jwt/v4 v4.5.2 github.com/google/uuid v1.6.0 github.com/hibiken/asynq v0.25.0 github.com/jinzhu/copier v0.4.0 github.com/jung-kurt/gofpdf v1.16.2 github.com/pkg/errors v0.9.1 - github.com/redis/go-redis/v9 v9.7.0 + github.com/redis/go-redis/v9 v9.17.2 github.com/samber/lo v1.50.0 github.com/shopspring/decimal v1.4.0 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e github.com/smartwalle/alipay/v3 v3.2.23 github.com/sony/sonyflake v1.2.0 - github.com/stretchr/testify v1.10.0 + github.com/stretchr/testify v1.11.1 github.com/tidwall/gjson v1.18.0 github.com/wechatpay-apiv3/wechatpay-go v0.2.20 - github.com/zeromicro/go-zero v1.7.3 - golang.org/x/crypto v0.28.0 + github.com/zeromicro/go-zero v1.9.4 + golang.org/x/crypto v0.33.0 google.golang.org/grpc v1.67.1 ) @@ -50,17 +50,19 @@ require ( github.com/cloudwego/base64x v0.1.5 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/fatih/color v1.17.0 // indirect + github.com/fatih/color v1.18.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-sql-driver/mysql v1.8.1 // indirect + github.com/go-sql-driver/mysql v1.9.0 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect + github.com/grafana/pyroscope-go v1.2.7 // indirect + github.com/grafana/pyroscope-go/godeltaprof v0.1.9 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/compress v1.17.11 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect @@ -73,9 +75,9 @@ require ( github.com/openzipkin/zipkin-go v0.4.3 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.20.5 // indirect + github.com/prometheus/client_golang v1.21.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.62.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect github.com/smartwalle/ncrypto v1.0.4 // indirect @@ -102,13 +104,13 @@ require ( go.uber.org/automaxprocs v1.6.0 // indirect golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect golang.org/x/image v0.28.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sys v0.26.0 // indirect + golang.org/x/net v0.35.0 // indirect + golang.org/x/sys v0.30.0 // indirect golang.org/x/text v0.26.0 // indirect - golang.org/x/time v0.7.0 // indirect + golang.org/x/time v0.10.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect - google.golang.org/protobuf v1.35.1 // indirect + google.golang.org/protobuf v1.36.5 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 0fa02f5..d94c2f9 100644 --- a/go.sum +++ b/go.sum @@ -57,10 +57,8 @@ github.com/alibabacloud-go/tea-utils/v2 v2.0.7/go.mod h1:qxn986l+q33J5VkialKMqT/ github.com/alibabacloud-go/tea-xml v1.1.2/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= github.com/alibabacloud-go/tea-xml v1.1.3 h1:7LYnm+JbOq2B+T/B0fHC4Ies4/FofC4zHzYtqw7dgt0= github.com/alibabacloud-go/tea-xml v1.1.3/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= -github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 h1:uvdUDbHQHO85qeSydJtItA4T55Pw6BtAejd0APRJOCE= -github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= -github.com/alicebob/miniredis/v2 v2.33.0 h1:uvTF0EDeu9RLnUEG27Db5I68ESoIxTiXbNUiji6lZrA= -github.com/alicebob/miniredis/v2 v2.33.0/go.mod h1:MhP4a3EU7aENRi9aO+tHfTBZicLqQevyi/DJpoj6mi0= +github.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI= +github.com/alicebob/miniredis/v2 v2.35.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM= github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw= github.com/aliyun/credentials-go v1.3.1/go.mod h1:8jKYhQuDawt8x2+fusqa1Y6mPxemTsBEN04dgcAcYz0= github.com/aliyun/credentials-go v1.3.6/go.mod h1:1LxUuX7L5YrZUWzBrRyk0SwSdH4OmPrib8NVePL3fxM= @@ -98,8 +96,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -119,10 +117,10 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA= github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= -github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= -github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/go-sql-driver/mysql v1.9.0 h1:Y0zIbQXhQKmQgTp44Y1dp3wTXcn804QoTptLZT1vtvo= +github.com/go-sql-driver/mysql v1.9.0/go.mod h1:pDetrLJeA3oMujJuvXc8RJoasr589B6A9fwzD3QMrqw= +github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= +github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -147,6 +145,10 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/grafana/pyroscope-go v1.2.7 h1:VWBBlqxjyR0Cwk2W6UrE8CdcdD80GOFNutj0Kb1T8ac= +github.com/grafana/pyroscope-go v1.2.7/go.mod h1:o/bpSLiJYYP6HQtvcoVKiE9s5RiNgjYTj1DhiddP2Pc= +github.com/grafana/pyroscope-go/godeltaprof v0.1.9 h1:c1Us8i6eSmkW+Ez05d3co8kasnuOY813tbMN8i/a3Og= +github.com/grafana/pyroscope-go/godeltaprof v0.1.9/go.mod h1:2+l7K7twW49Ct4wFluZD3tZ6e0SjanjcUUBPVD/UuGU= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= @@ -162,8 +164,8 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.16.2 h1:jgbatWHfRlPYiK85qgevsZTHviWXKwB1TTiKdz5PtRc= github.com/jung-kurt/gofpdf v1.16.2/go.mod h1:1hl7y57EsiPAkLbOwzpzqgx1A30nQCk/YmFV8S2vmK0= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= @@ -210,17 +212,17 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= -github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk= +github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= +github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E= -github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw= +github.com/redis/go-redis/v9 v9.17.2 h1:P2EGsA4qVIM3Pp+aPocCJ7DguDHhqrXNhVcEp4ViluI= +github.com/redis/go-redis/v9 v9.17.2/go.mod h1:u410H11HMLoB+TP67dz8rL9s6QW2j76l0//kSOd3370= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= @@ -266,8 +268,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= @@ -287,8 +289,8 @@ github.com/yuin/goldmark v1.1.30/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= -github.com/zeromicro/go-zero v1.7.3 h1:yDUQF2DXDhUHc77/NZF6mzsoRPMBfldjPmG2O/ZSzss= -github.com/zeromicro/go-zero v1.7.3/go.mod h1:9JIW3gHBGuc9LzvjZnNwINIq9QdiKu3AigajLtkJamQ= +github.com/zeromicro/go-zero v1.9.4 h1:aRLFoISqAYijABtkbliQC5SsI5TbizJpQvoHc9xup8k= +github.com/zeromicro/go-zero v1.9.4/go.mod h1:a17JOTch25SWxBcUgJZYps60hygK3pIYdw7nGwlcS38= go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= @@ -328,8 +330,8 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= +golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.28.0 h1:gdem5JW1OLS4FbkWgLO+7ZeFzYtL3xClb97GaUzYMFE= @@ -358,8 +360,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= +golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -386,8 +388,8 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -406,8 +408,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= +golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -441,8 +443,8 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=