From db7b179491e5af135b9803a3ded7829f30119d9d Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 29 Nov 2024 14:58:17 +0800 Subject: [PATCH 1/4] update --- app/hdl/financial_center/hdl_withdraw.go | 5 ++++- app/md/financial_center/md_withdraw.go | 2 ++ docs/docs.go | 17 ++++++++++++----- docs/swagger.json | 12 +++++++++--- docs/swagger.yaml | 9 +++++++-- 5 files changed, 34 insertions(+), 11 deletions(-) diff --git a/app/hdl/financial_center/hdl_withdraw.go b/app/hdl/financial_center/hdl_withdraw.go index 864ab59..0ae0af8 100644 --- a/app/hdl/financial_center/hdl_withdraw.go +++ b/app/hdl/financial_center/hdl_withdraw.go @@ -55,6 +55,7 @@ func GetWithdrawSetting(c *gin.Context) { WithdrawMultipleLimit: "", IsSupportDecimalPoint: 0, IsAuto: 0, + IsAutoAmountLimit: "", WithdrawTimeInterval: "00:00-00:00", WithdrawFeeSet: withdrawFeeSetStr, CreateAt: now.Format("2006-01-02 15:04:05"), @@ -92,6 +93,7 @@ func GetWithdrawSetting(c *gin.Context) { WithdrawMultipleLimit: setting.WithdrawMultipleLimit, IsSupportDecimalPoint: setting.IsSupportDecimalPoint, IsAuto: setting.IsAuto, + IsAutoAmountLimit: setting.IsAutoAmountLimit, WithdrawTimeInterval: withdrawTimeInterval, WithdrawFeeSet: withdrawFeeSet, CreateAt: setting.CreateAt, @@ -135,11 +137,12 @@ func UpdateWithdrawSetting(c *gin.Context) { WithdrawMultipleLimit: req.WithdrawMultipleLimit, IsSupportDecimalPoint: req.IsSupportDecimalPoint, IsAuto: req.IsAuto, + IsAutoAmountLimit: req.IsAutoAmountLimit, WithdrawTimeInterval: withdrawTimeIntervalStr, WithdrawFeeSet: withdrawFeeSetStr, } - forceColumns := []string{"withdraw_type", "is_real_name", "withdraw_nums_limit", "withdraw_amount_limit", "withdraw_multiple_limit", "is_support_decimal_point", "is_auto"} + forceColumns := []string{"withdraw_type", "is_real_name", "withdraw_nums_limit", "withdraw_amount_limit", "withdraw_multiple_limit", "is_support_decimal_point", "is_auto", ""} settingDb := implement.NewFinWithdrawSettingDb(db.Db) affected, err := settingDb.FinWithdrawSettingUpdate(req.Id, &m, forceColumns...) if err != nil { diff --git a/app/md/financial_center/md_withdraw.go b/app/md/financial_center/md_withdraw.go index 3529564..74aca85 100644 --- a/app/md/financial_center/md_withdraw.go +++ b/app/md/financial_center/md_withdraw.go @@ -19,6 +19,7 @@ type GetWithdrawSettingResp struct { WithdrawMultipleLimit string `json:"withdraw_multiple_limit"` // 提现倍数限制(0为不限制,金额限制倍数才可以申请提现 ) IsSupportDecimalPoint int `json:"is_support_decimal_point"` // 是否支持小数点(0:否 1:是) IsAuto int `json:"is_auto"` // 是否开启自动提现(0:否 1:是) + IsAutoAmountLimit string `json:"is_auto_amount_limit"` // 自动提现金额限制 WithdrawTimeInterval md.WithdrawTimeIntervalStruct `json:"withdraw_time_interval"` // 提现时段 WithdrawFeeSet md.WithdrawFeeSetStruct `json:"withdraw_fee_set"` // 提现手续费设置 CreateAt string `json:"create_at"` // 申请时间 @@ -36,6 +37,7 @@ type UpdateWithdrawSettingReq struct { WithdrawMultipleLimit string `json:"withdraw_multiple_limit"` // 提现倍数限制(0为不限制,金额限制倍数才可以申请提现 ) IsSupportDecimalPoint int `json:"is_support_decimal_point"` // 是否支持小数点(0:否 1:是) IsAuto int `json:"is_auto"` // 是否开启自动提现(0:否 1:是) + IsAutoAmountLimit string `json:"is_auto_amount_limit"` // 自动提现金额限制 WithdrawTimeInterval md.WithdrawTimeIntervalStruct `json:"withdraw_time_interval"` // 提现时段(startAt xx:xx endAt xx:xx) WithdrawFeeSet md.WithdrawFeeSetStruct `json:"withdraw_fee_set"` // 提现手续费设置 } diff --git a/docs/docs.go b/docs/docs.go index 9007650..ca6cfbc 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,5 +1,4 @@ -// Code generated by swaggo/swag. DO NOT EDIT. - +// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" @@ -1353,9 +1352,7 @@ const docTemplate = `{ "name": "req", "in": "body", "required": true, - "schema": { - "type": "object" - } + "schema": {} } ], "responses": { @@ -9388,6 +9385,10 @@ const docTemplate = `{ "description": "是否开启自动提现(0:否 1:是)", "type": "integer" }, + "is_auto_amount_limit": { + "description": "自动提现金额限制", + "type": "string" + }, "is_real_name": { "description": "是否实名(0:否 1:是)", "type": "integer" @@ -11291,6 +11292,10 @@ const docTemplate = `{ "description": "是否开启自动提现(0:否 1:是)", "type": "integer" }, + "is_auto_amount_limit": { + "description": "自动提现金额限制", + "type": "integer" + }, "is_real_name": { "description": "是否实名(0:否 1:是)", "type": "integer" @@ -12721,6 +12726,8 @@ var SwaggerInfo = &swag.Spec{ Description: "管理后台接口文档", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", } func init() { diff --git a/docs/swagger.json b/docs/swagger.json index 42b16bb..21b50a0 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1345,9 +1345,7 @@ "name": "req", "in": "body", "required": true, - "schema": { - "type": "object" - } + "schema": {} } ], "responses": { @@ -9380,6 +9378,10 @@ "description": "是否开启自动提现(0:否 1:是)", "type": "integer" }, + "is_auto_amount_limit": { + "description": "自动提现金额限制", + "type": "string" + }, "is_real_name": { "description": "是否实名(0:否 1:是)", "type": "integer" @@ -11283,6 +11285,10 @@ "description": "是否开启自动提现(0:否 1:是)", "type": "integer" }, + "is_auto_amount_limit": { + "description": "自动提现金额限制", + "type": "integer" + }, "is_real_name": { "description": "是否实名(0:否 1:是)", "type": "integer" diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 27d192a..6350207 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1983,6 +1983,9 @@ definitions: is_auto: description: 是否开启自动提现(0:否 1:是) type: integer + is_auto_amount_limit: + description: 自动提现金额限制 + type: string is_real_name: description: 是否实名(0:否 1:是) type: integer @@ -3311,6 +3314,9 @@ definitions: is_auto: description: 是否开启自动提现(0:否 1:是) type: integer + is_auto_amount_limit: + description: 自动提现金额限制 + type: integer is_real_name: description: 是否实名(0:否 1:是) type: integer @@ -5174,8 +5180,7 @@ paths: in: body name: req required: true - schema: - type: object + schema: {} produces: - application/json responses: From d3d8ad8925bbd7889559dd8fe20000598c92a7d2 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 29 Nov 2024 14:58:49 +0800 Subject: [PATCH 2/4] update --- docs/docs.go | 2 +- docs/swagger.json | 2 +- docs/swagger.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index ca6cfbc..3667baf 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -11294,7 +11294,7 @@ const docTemplate = `{ }, "is_auto_amount_limit": { "description": "自动提现金额限制", - "type": "integer" + "type": "string" }, "is_real_name": { "description": "是否实名(0:否 1:是)", diff --git a/docs/swagger.json b/docs/swagger.json index 21b50a0..f6fcb80 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -11287,7 +11287,7 @@ }, "is_auto_amount_limit": { "description": "自动提现金额限制", - "type": "integer" + "type": "string" }, "is_real_name": { "description": "是否实名(0:否 1:是)", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 6350207..58f89fc 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -3316,7 +3316,7 @@ definitions: type: integer is_auto_amount_limit: description: 自动提现金额限制 - type: integer + type: string is_real_name: description: 是否实名(0:否 1:是) type: integer From 5987dce133a5619dbf08ce452a50ff3ff8ce9940 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 29 Nov 2024 15:26:29 +0800 Subject: [PATCH 3/4] update --- app/hdl/financial_center/hdl_withdraw.go | 13 ++++++++++++- app/md/financial_center/md_withdraw.go | 2 ++ go.mod | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/hdl/financial_center/hdl_withdraw.go b/app/hdl/financial_center/hdl_withdraw.go index 0ae0af8..88f995c 100644 --- a/app/hdl/financial_center/hdl_withdraw.go +++ b/app/hdl/financial_center/hdl_withdraw.go @@ -43,8 +43,13 @@ func GetWithdrawSetting(c *gin.Context) { Kind: 0, Value: 0, } + firstWithdrawSet := md2.FirstWithdrawSet{ + IsNeedRealName: 0, + FirstWithdrawAmountLimit: "", + } frequencyStr := utils.SerializeStr(frequency) withdrawFeeSetStr := utils.SerializeStr(withdrawFeeSet) + firstWithdrawSetStr := utils.SerializeStr(firstWithdrawSet) m := model.FinWithdrawSetting{ FrequencySet: frequencyStr, WithdrawType: 0, @@ -58,6 +63,7 @@ func GetWithdrawSetting(c *gin.Context) { IsAutoAmountLimit: "", WithdrawTimeInterval: "00:00-00:00", WithdrawFeeSet: withdrawFeeSetStr, + FirstWithdrawSet: firstWithdrawSetStr, CreateAt: now.Format("2006-01-02 15:04:05"), UpdateAt: "", } @@ -75,8 +81,10 @@ func GetWithdrawSetting(c *gin.Context) { } var frequency md2.WithdrawFrequencySettingStruct var withdrawFeeSet md2.WithdrawFeeSetStruct + var firstWithdrawSet md2.FirstWithdrawSet utils.Unserialize([]byte(setting.FrequencySet), &frequency) utils.Unserialize([]byte(setting.WithdrawFeeSet), &withdrawFeeSet) + utils.Unserialize([]byte(setting.FirstWithdrawSet), &firstWithdrawSet) withdrawTimeIntervals := strings.Split(setting.WithdrawTimeInterval, "-") withdrawTimeInterval := md2.WithdrawTimeIntervalStruct{ StartAt: withdrawTimeIntervals[0], @@ -96,6 +104,7 @@ func GetWithdrawSetting(c *gin.Context) { IsAutoAmountLimit: setting.IsAutoAmountLimit, WithdrawTimeInterval: withdrawTimeInterval, WithdrawFeeSet: withdrawFeeSet, + FirstWithdrawSet: firstWithdrawSet, CreateAt: setting.CreateAt, UpdateAt: setting.UpdateAt, } @@ -122,6 +131,7 @@ func UpdateWithdrawSetting(c *gin.Context) { } frequencyStr := utils.SerializeStr(req.FrequencySet) withdrawFeeSetStr := utils.SerializeStr(req.WithdrawFeeSet) + firstWithdrawSetStr := utils.SerializeStr(req.FirstWithdrawSet) var withdrawTimeInterval []string withdrawTimeInterval = append(withdrawTimeInterval, req.WithdrawTimeInterval.StartAt) withdrawTimeInterval = append(withdrawTimeInterval, req.WithdrawTimeInterval.EndAt) @@ -140,9 +150,10 @@ func UpdateWithdrawSetting(c *gin.Context) { IsAutoAmountLimit: req.IsAutoAmountLimit, WithdrawTimeInterval: withdrawTimeIntervalStr, WithdrawFeeSet: withdrawFeeSetStr, + FirstWithdrawSet: firstWithdrawSetStr, } - forceColumns := []string{"withdraw_type", "is_real_name", "withdraw_nums_limit", "withdraw_amount_limit", "withdraw_multiple_limit", "is_support_decimal_point", "is_auto", ""} + forceColumns := []string{"withdraw_type", "is_real_name", "withdraw_nums_limit", "withdraw_amount_limit", "withdraw_multiple_limit", "is_support_decimal_point", "is_auto", "first_withdraw_set", "is_auto_amount_limit"} settingDb := implement.NewFinWithdrawSettingDb(db.Db) affected, err := settingDb.FinWithdrawSettingUpdate(req.Id, &m, forceColumns...) if err != nil { diff --git a/app/md/financial_center/md_withdraw.go b/app/md/financial_center/md_withdraw.go index 74aca85..5c1a015 100644 --- a/app/md/financial_center/md_withdraw.go +++ b/app/md/financial_center/md_withdraw.go @@ -22,6 +22,7 @@ type GetWithdrawSettingResp struct { IsAutoAmountLimit string `json:"is_auto_amount_limit"` // 自动提现金额限制 WithdrawTimeInterval md.WithdrawTimeIntervalStruct `json:"withdraw_time_interval"` // 提现时段 WithdrawFeeSet md.WithdrawFeeSetStruct `json:"withdraw_fee_set"` // 提现手续费设置 + FirstWithdrawSet md.FirstWithdrawSet `json:"first_withdraw_set"` // 首次提现设置 CreateAt string `json:"create_at"` // 申请时间 UpdateAt string `json:"update_at"` // 处理时间 } @@ -40,6 +41,7 @@ type UpdateWithdrawSettingReq struct { IsAutoAmountLimit string `json:"is_auto_amount_limit"` // 自动提现金额限制 WithdrawTimeInterval md.WithdrawTimeIntervalStruct `json:"withdraw_time_interval"` // 提现时段(startAt xx:xx endAt xx:xx) WithdrawFeeSet md.WithdrawFeeSetStruct `json:"withdraw_fee_set"` // 提现手续费设置 + FirstWithdrawSet md.FirstWithdrawSet `json:"first_withdraw_set"` // 首次提现设置 } type GetWithdrawApplyListReq struct { Uid string `json:"uid"` // 用户 ID diff --git a/go.mod b/go.mod index 1350c80..f398048 100644 --- a/go.mod +++ b/go.mod @@ -32,8 +32,8 @@ require ( ) require ( - code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241129055230-e9cbd65b0bfb - code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241129035757-6f22c03e842e + code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241129070804-d5cc77e19dcb + code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241129071929-add8a8e2196a code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 github.com/360EntSecGroup-Skylar/excelize v1.4.1 From 544d93dae058de4790a6b851df4933daa0a59151 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 29 Nov 2024 15:27:19 +0800 Subject: [PATCH 4/4] update swag --- docs/docs.go | 29 +++++++++++++++++++++++++++++ docs/swagger.json | 29 +++++++++++++++++++++++++++++ docs/swagger.yaml | 17 +++++++++++++++++ 3 files changed, 75 insertions(+) diff --git a/docs/docs.go b/docs/docs.go index 3667baf..dec688c 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -8433,6 +8433,19 @@ const docTemplate = `{ } } }, + "md.FirstWithdrawSet": { + "type": "object", + "properties": { + "first_withdraw_amount_limit": { + "description": "不需要实名时 最大提现金额", + "type": "string" + }, + "is_need_real_name": { + "description": "是否需要实名(0:不需要,1:需要)", + "type": "integer" + } + } + }, "md.FreePublishUserNode": { "type": "object", "properties": { @@ -9370,6 +9383,14 @@ const docTemplate = `{ "description": "申请时间", "type": "string" }, + "first_withdraw_set": { + "description": "首次提现设置", + "allOf": [ + { + "$ref": "#/definitions/md.FirstWithdrawSet" + } + ] + }, "frequency_set": { "description": "频率设置(0:日 1:周 2:月 3:年)", "allOf": [ @@ -11277,6 +11298,14 @@ const docTemplate = `{ "md.UpdateWithdrawSettingReq": { "type": "object", "properties": { + "first_withdraw_set": { + "description": "首次提现设置", + "allOf": [ + { + "$ref": "#/definitions/md.FirstWithdrawSet" + } + ] + }, "frequency_set": { "description": "频率设置(num 个 duration) (duration (0.天 1.小时 2.周 3.月 4.年))", "allOf": [ diff --git a/docs/swagger.json b/docs/swagger.json index f6fcb80..96e2d19 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -8426,6 +8426,19 @@ } } }, + "md.FirstWithdrawSet": { + "type": "object", + "properties": { + "first_withdraw_amount_limit": { + "description": "不需要实名时 最大提现金额", + "type": "string" + }, + "is_need_real_name": { + "description": "是否需要实名(0:不需要,1:需要)", + "type": "integer" + } + } + }, "md.FreePublishUserNode": { "type": "object", "properties": { @@ -9363,6 +9376,14 @@ "description": "申请时间", "type": "string" }, + "first_withdraw_set": { + "description": "首次提现设置", + "allOf": [ + { + "$ref": "#/definitions/md.FirstWithdrawSet" + } + ] + }, "frequency_set": { "description": "频率设置(0:日 1:周 2:月 3:年)", "allOf": [ @@ -11270,6 +11291,14 @@ "md.UpdateWithdrawSettingReq": { "type": "object", "properties": { + "first_withdraw_set": { + "description": "首次提现设置", + "allOf": [ + { + "$ref": "#/definitions/md.FirstWithdrawSet" + } + ] + }, "frequency_set": { "description": "频率设置(num 个 duration) (duration (0.天 1.小时 2.周 3.月 4.年))", "allOf": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 58f89fc..5a00b36 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1328,6 +1328,15 @@ definitions: - $ref: '#/definitions/md.SubUser' description: 上级用户信息 type: object + md.FirstWithdrawSet: + properties: + first_withdraw_amount_limit: + description: 不需要实名时 最大提现金额 + type: string + is_need_real_name: + description: 是否需要实名(0:不需要,1:需要) + type: integer + type: object md.FreePublishUserNode: properties: nickname: @@ -1974,6 +1983,10 @@ definitions: create_at: description: 申请时间 type: string + first_withdraw_set: + allOf: + - $ref: '#/definitions/md.FirstWithdrawSet' + description: 首次提现设置 frequency_set: allOf: - $ref: '#/definitions/md.WithdrawFrequencySettingStruct' @@ -3305,6 +3318,10 @@ definitions: type: object md.UpdateWithdrawSettingReq: properties: + first_withdraw_set: + allOf: + - $ref: '#/definitions/md.FirstWithdrawSet' + description: 首次提现设置 frequency_set: allOf: - $ref: '#/definitions/md.WithdrawFrequencySettingStruct'