@@ -43,8 +43,13 @@ func GetWithdrawSetting(c *gin.Context) { | |||||
Kind: 0, | Kind: 0, | ||||
Value: 0, | Value: 0, | ||||
} | } | ||||
firstWithdrawSet := md2.FirstWithdrawSet{ | |||||
IsNeedRealName: 0, | |||||
FirstWithdrawAmountLimit: "", | |||||
} | |||||
frequencyStr := utils.SerializeStr(frequency) | frequencyStr := utils.SerializeStr(frequency) | ||||
withdrawFeeSetStr := utils.SerializeStr(withdrawFeeSet) | withdrawFeeSetStr := utils.SerializeStr(withdrawFeeSet) | ||||
firstWithdrawSetStr := utils.SerializeStr(firstWithdrawSet) | |||||
m := model.FinWithdrawSetting{ | m := model.FinWithdrawSetting{ | ||||
FrequencySet: frequencyStr, | FrequencySet: frequencyStr, | ||||
WithdrawType: 0, | WithdrawType: 0, | ||||
@@ -55,8 +60,10 @@ func GetWithdrawSetting(c *gin.Context) { | |||||
WithdrawMultipleLimit: "", | WithdrawMultipleLimit: "", | ||||
IsSupportDecimalPoint: 0, | IsSupportDecimalPoint: 0, | ||||
IsAuto: 0, | IsAuto: 0, | ||||
IsAutoAmountLimit: "", | |||||
WithdrawTimeInterval: "00:00-00:00", | WithdrawTimeInterval: "00:00-00:00", | ||||
WithdrawFeeSet: withdrawFeeSetStr, | WithdrawFeeSet: withdrawFeeSetStr, | ||||
FirstWithdrawSet: firstWithdrawSetStr, | |||||
CreateAt: now.Format("2006-01-02 15:04:05"), | CreateAt: now.Format("2006-01-02 15:04:05"), | ||||
UpdateAt: "", | UpdateAt: "", | ||||
} | } | ||||
@@ -74,8 +81,10 @@ func GetWithdrawSetting(c *gin.Context) { | |||||
} | } | ||||
var frequency md2.WithdrawFrequencySettingStruct | var frequency md2.WithdrawFrequencySettingStruct | ||||
var withdrawFeeSet md2.WithdrawFeeSetStruct | var withdrawFeeSet md2.WithdrawFeeSetStruct | ||||
var firstWithdrawSet md2.FirstWithdrawSet | |||||
utils.Unserialize([]byte(setting.FrequencySet), &frequency) | utils.Unserialize([]byte(setting.FrequencySet), &frequency) | ||||
utils.Unserialize([]byte(setting.WithdrawFeeSet), &withdrawFeeSet) | utils.Unserialize([]byte(setting.WithdrawFeeSet), &withdrawFeeSet) | ||||
utils.Unserialize([]byte(setting.FirstWithdrawSet), &firstWithdrawSet) | |||||
withdrawTimeIntervals := strings.Split(setting.WithdrawTimeInterval, "-") | withdrawTimeIntervals := strings.Split(setting.WithdrawTimeInterval, "-") | ||||
withdrawTimeInterval := md2.WithdrawTimeIntervalStruct{ | withdrawTimeInterval := md2.WithdrawTimeIntervalStruct{ | ||||
StartAt: withdrawTimeIntervals[0], | StartAt: withdrawTimeIntervals[0], | ||||
@@ -92,8 +101,10 @@ func GetWithdrawSetting(c *gin.Context) { | |||||
WithdrawMultipleLimit: setting.WithdrawMultipleLimit, | WithdrawMultipleLimit: setting.WithdrawMultipleLimit, | ||||
IsSupportDecimalPoint: setting.IsSupportDecimalPoint, | IsSupportDecimalPoint: setting.IsSupportDecimalPoint, | ||||
IsAuto: setting.IsAuto, | IsAuto: setting.IsAuto, | ||||
IsAutoAmountLimit: setting.IsAutoAmountLimit, | |||||
WithdrawTimeInterval: withdrawTimeInterval, | WithdrawTimeInterval: withdrawTimeInterval, | ||||
WithdrawFeeSet: withdrawFeeSet, | WithdrawFeeSet: withdrawFeeSet, | ||||
FirstWithdrawSet: firstWithdrawSet, | |||||
CreateAt: setting.CreateAt, | CreateAt: setting.CreateAt, | ||||
UpdateAt: setting.UpdateAt, | UpdateAt: setting.UpdateAt, | ||||
} | } | ||||
@@ -120,6 +131,7 @@ func UpdateWithdrawSetting(c *gin.Context) { | |||||
} | } | ||||
frequencyStr := utils.SerializeStr(req.FrequencySet) | frequencyStr := utils.SerializeStr(req.FrequencySet) | ||||
withdrawFeeSetStr := utils.SerializeStr(req.WithdrawFeeSet) | withdrawFeeSetStr := utils.SerializeStr(req.WithdrawFeeSet) | ||||
firstWithdrawSetStr := utils.SerializeStr(req.FirstWithdrawSet) | |||||
var withdrawTimeInterval []string | var withdrawTimeInterval []string | ||||
withdrawTimeInterval = append(withdrawTimeInterval, req.WithdrawTimeInterval.StartAt) | withdrawTimeInterval = append(withdrawTimeInterval, req.WithdrawTimeInterval.StartAt) | ||||
withdrawTimeInterval = append(withdrawTimeInterval, req.WithdrawTimeInterval.EndAt) | withdrawTimeInterval = append(withdrawTimeInterval, req.WithdrawTimeInterval.EndAt) | ||||
@@ -135,11 +147,13 @@ func UpdateWithdrawSetting(c *gin.Context) { | |||||
WithdrawMultipleLimit: req.WithdrawMultipleLimit, | WithdrawMultipleLimit: req.WithdrawMultipleLimit, | ||||
IsSupportDecimalPoint: req.IsSupportDecimalPoint, | IsSupportDecimalPoint: req.IsSupportDecimalPoint, | ||||
IsAuto: req.IsAuto, | IsAuto: req.IsAuto, | ||||
IsAutoAmountLimit: req.IsAutoAmountLimit, | |||||
WithdrawTimeInterval: withdrawTimeIntervalStr, | WithdrawTimeInterval: withdrawTimeIntervalStr, | ||||
WithdrawFeeSet: withdrawFeeSetStr, | 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) | settingDb := implement.NewFinWithdrawSettingDb(db.Db) | ||||
affected, err := settingDb.FinWithdrawSettingUpdate(req.Id, &m, forceColumns...) | affected, err := settingDb.FinWithdrawSettingUpdate(req.Id, &m, forceColumns...) | ||||
if err != nil { | if err != nil { | ||||
@@ -19,8 +19,10 @@ type GetWithdrawSettingResp struct { | |||||
WithdrawMultipleLimit string `json:"withdraw_multiple_limit"` // 提现倍数限制(0为不限制,金额限制倍数才可以申请提现 ) | WithdrawMultipleLimit string `json:"withdraw_multiple_limit"` // 提现倍数限制(0为不限制,金额限制倍数才可以申请提现 ) | ||||
IsSupportDecimalPoint int `json:"is_support_decimal_point"` // 是否支持小数点(0:否 1:是) | IsSupportDecimalPoint int `json:"is_support_decimal_point"` // 是否支持小数点(0:否 1:是) | ||||
IsAuto int `json:"is_auto"` // 是否开启自动提现(0:否 1:是) | IsAuto int `json:"is_auto"` // 是否开启自动提现(0:否 1:是) | ||||
IsAutoAmountLimit string `json:"is_auto_amount_limit"` // 自动提现金额限制 | |||||
WithdrawTimeInterval md.WithdrawTimeIntervalStruct `json:"withdraw_time_interval"` // 提现时段 | WithdrawTimeInterval md.WithdrawTimeIntervalStruct `json:"withdraw_time_interval"` // 提现时段 | ||||
WithdrawFeeSet md.WithdrawFeeSetStruct `json:"withdraw_fee_set"` // 提现手续费设置 | WithdrawFeeSet md.WithdrawFeeSetStruct `json:"withdraw_fee_set"` // 提现手续费设置 | ||||
FirstWithdrawSet md.FirstWithdrawSet `json:"first_withdraw_set"` // 首次提现设置 | |||||
CreateAt string `json:"create_at"` // 申请时间 | CreateAt string `json:"create_at"` // 申请时间 | ||||
UpdateAt string `json:"update_at"` // 处理时间 | UpdateAt string `json:"update_at"` // 处理时间 | ||||
} | } | ||||
@@ -36,8 +38,10 @@ type UpdateWithdrawSettingReq struct { | |||||
WithdrawMultipleLimit string `json:"withdraw_multiple_limit"` // 提现倍数限制(0为不限制,金额限制倍数才可以申请提现 ) | WithdrawMultipleLimit string `json:"withdraw_multiple_limit"` // 提现倍数限制(0为不限制,金额限制倍数才可以申请提现 ) | ||||
IsSupportDecimalPoint int `json:"is_support_decimal_point"` // 是否支持小数点(0:否 1:是) | IsSupportDecimalPoint int `json:"is_support_decimal_point"` // 是否支持小数点(0:否 1:是) | ||||
IsAuto int `json:"is_auto"` // 是否开启自动提现(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) | WithdrawTimeInterval md.WithdrawTimeIntervalStruct `json:"withdraw_time_interval"` // 提现时段(startAt xx:xx endAt xx:xx) | ||||
WithdrawFeeSet md.WithdrawFeeSetStruct `json:"withdraw_fee_set"` // 提现手续费设置 | WithdrawFeeSet md.WithdrawFeeSetStruct `json:"withdraw_fee_set"` // 提现手续费设置 | ||||
FirstWithdrawSet md.FirstWithdrawSet `json:"first_withdraw_set"` // 首次提现设置 | |||||
} | } | ||||
type GetWithdrawApplyListReq struct { | type GetWithdrawApplyListReq struct { | ||||
Uid string `json:"uid"` // 用户 ID | Uid string `json:"uid"` // 用户 ID | ||||
@@ -1,5 +1,4 @@ | |||||
// Code generated by swaggo/swag. DO NOT EDIT. | |||||
// Package docs Code generated by swaggo/swag. DO NOT EDIT | |||||
package docs | package docs | ||||
import "github.com/swaggo/swag" | import "github.com/swaggo/swag" | ||||
@@ -1353,9 +1352,7 @@ const docTemplate = `{ | |||||
"name": "req", | "name": "req", | ||||
"in": "body", | "in": "body", | ||||
"required": true, | "required": true, | ||||
"schema": { | |||||
"type": "object" | |||||
} | |||||
"schema": {} | |||||
} | } | ||||
], | ], | ||||
"responses": { | "responses": { | ||||
@@ -8436,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": { | "md.FreePublishUserNode": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -9373,6 +9383,14 @@ const docTemplate = `{ | |||||
"description": "申请时间", | "description": "申请时间", | ||||
"type": "string" | "type": "string" | ||||
}, | }, | ||||
"first_withdraw_set": { | |||||
"description": "首次提现设置", | |||||
"allOf": [ | |||||
{ | |||||
"$ref": "#/definitions/md.FirstWithdrawSet" | |||||
} | |||||
] | |||||
}, | |||||
"frequency_set": { | "frequency_set": { | ||||
"description": "频率设置(0:日 1:周 2:月 3:年)", | "description": "频率设置(0:日 1:周 2:月 3:年)", | ||||
"allOf": [ | "allOf": [ | ||||
@@ -9388,6 +9406,10 @@ const docTemplate = `{ | |||||
"description": "是否开启自动提现(0:否 1:是)", | "description": "是否开启自动提现(0:否 1:是)", | ||||
"type": "integer" | "type": "integer" | ||||
}, | }, | ||||
"is_auto_amount_limit": { | |||||
"description": "自动提现金额限制", | |||||
"type": "string" | |||||
}, | |||||
"is_real_name": { | "is_real_name": { | ||||
"description": "是否实名(0:否 1:是)", | "description": "是否实名(0:否 1:是)", | ||||
"type": "integer" | "type": "integer" | ||||
@@ -11276,6 +11298,14 @@ const docTemplate = `{ | |||||
"md.UpdateWithdrawSettingReq": { | "md.UpdateWithdrawSettingReq": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
"first_withdraw_set": { | |||||
"description": "首次提现设置", | |||||
"allOf": [ | |||||
{ | |||||
"$ref": "#/definitions/md.FirstWithdrawSet" | |||||
} | |||||
] | |||||
}, | |||||
"frequency_set": { | "frequency_set": { | ||||
"description": "频率设置(num 个 duration) (duration (0.天 1.小时 2.周 3.月 4.年))", | "description": "频率设置(num 个 duration) (duration (0.天 1.小时 2.周 3.月 4.年))", | ||||
"allOf": [ | "allOf": [ | ||||
@@ -11291,6 +11321,10 @@ const docTemplate = `{ | |||||
"description": "是否开启自动提现(0:否 1:是)", | "description": "是否开启自动提现(0:否 1:是)", | ||||
"type": "integer" | "type": "integer" | ||||
}, | }, | ||||
"is_auto_amount_limit": { | |||||
"description": "自动提现金额限制", | |||||
"type": "string" | |||||
}, | |||||
"is_real_name": { | "is_real_name": { | ||||
"description": "是否实名(0:否 1:是)", | "description": "是否实名(0:否 1:是)", | ||||
"type": "integer" | "type": "integer" | ||||
@@ -12721,6 +12755,8 @@ var SwaggerInfo = &swag.Spec{ | |||||
Description: "管理后台接口文档", | Description: "管理后台接口文档", | ||||
InfoInstanceName: "swagger", | InfoInstanceName: "swagger", | ||||
SwaggerTemplate: docTemplate, | SwaggerTemplate: docTemplate, | ||||
LeftDelim: "{{", | |||||
RightDelim: "}}", | |||||
} | } | ||||
func init() { | func init() { | ||||
@@ -1345,9 +1345,7 @@ | |||||
"name": "req", | "name": "req", | ||||
"in": "body", | "in": "body", | ||||
"required": true, | "required": true, | ||||
"schema": { | |||||
"type": "object" | |||||
} | |||||
"schema": {} | |||||
} | } | ||||
], | ], | ||||
"responses": { | "responses": { | ||||
@@ -8428,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": { | "md.FreePublishUserNode": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -9365,6 +9376,14 @@ | |||||
"description": "申请时间", | "description": "申请时间", | ||||
"type": "string" | "type": "string" | ||||
}, | }, | ||||
"first_withdraw_set": { | |||||
"description": "首次提现设置", | |||||
"allOf": [ | |||||
{ | |||||
"$ref": "#/definitions/md.FirstWithdrawSet" | |||||
} | |||||
] | |||||
}, | |||||
"frequency_set": { | "frequency_set": { | ||||
"description": "频率设置(0:日 1:周 2:月 3:年)", | "description": "频率设置(0:日 1:周 2:月 3:年)", | ||||
"allOf": [ | "allOf": [ | ||||
@@ -9380,6 +9399,10 @@ | |||||
"description": "是否开启自动提现(0:否 1:是)", | "description": "是否开启自动提现(0:否 1:是)", | ||||
"type": "integer" | "type": "integer" | ||||
}, | }, | ||||
"is_auto_amount_limit": { | |||||
"description": "自动提现金额限制", | |||||
"type": "string" | |||||
}, | |||||
"is_real_name": { | "is_real_name": { | ||||
"description": "是否实名(0:否 1:是)", | "description": "是否实名(0:否 1:是)", | ||||
"type": "integer" | "type": "integer" | ||||
@@ -11268,6 +11291,14 @@ | |||||
"md.UpdateWithdrawSettingReq": { | "md.UpdateWithdrawSettingReq": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
"first_withdraw_set": { | |||||
"description": "首次提现设置", | |||||
"allOf": [ | |||||
{ | |||||
"$ref": "#/definitions/md.FirstWithdrawSet" | |||||
} | |||||
] | |||||
}, | |||||
"frequency_set": { | "frequency_set": { | ||||
"description": "频率设置(num 个 duration) (duration (0.天 1.小时 2.周 3.月 4.年))", | "description": "频率设置(num 个 duration) (duration (0.天 1.小时 2.周 3.月 4.年))", | ||||
"allOf": [ | "allOf": [ | ||||
@@ -11283,6 +11314,10 @@ | |||||
"description": "是否开启自动提现(0:否 1:是)", | "description": "是否开启自动提现(0:否 1:是)", | ||||
"type": "integer" | "type": "integer" | ||||
}, | }, | ||||
"is_auto_amount_limit": { | |||||
"description": "自动提现金额限制", | |||||
"type": "string" | |||||
}, | |||||
"is_real_name": { | "is_real_name": { | ||||
"description": "是否实名(0:否 1:是)", | "description": "是否实名(0:否 1:是)", | ||||
"type": "integer" | "type": "integer" | ||||
@@ -1328,6 +1328,15 @@ definitions: | |||||
- $ref: '#/definitions/md.SubUser' | - $ref: '#/definitions/md.SubUser' | ||||
description: 上级用户信息 | description: 上级用户信息 | ||||
type: object | 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: | md.FreePublishUserNode: | ||||
properties: | properties: | ||||
nickname: | nickname: | ||||
@@ -1974,6 +1983,10 @@ definitions: | |||||
create_at: | create_at: | ||||
description: 申请时间 | description: 申请时间 | ||||
type: string | type: string | ||||
first_withdraw_set: | |||||
allOf: | |||||
- $ref: '#/definitions/md.FirstWithdrawSet' | |||||
description: 首次提现设置 | |||||
frequency_set: | frequency_set: | ||||
allOf: | allOf: | ||||
- $ref: '#/definitions/md.WithdrawFrequencySettingStruct' | - $ref: '#/definitions/md.WithdrawFrequencySettingStruct' | ||||
@@ -1983,6 +1996,9 @@ definitions: | |||||
is_auto: | is_auto: | ||||
description: 是否开启自动提现(0:否 1:是) | description: 是否开启自动提现(0:否 1:是) | ||||
type: integer | type: integer | ||||
is_auto_amount_limit: | |||||
description: 自动提现金额限制 | |||||
type: string | |||||
is_real_name: | is_real_name: | ||||
description: 是否实名(0:否 1:是) | description: 是否实名(0:否 1:是) | ||||
type: integer | type: integer | ||||
@@ -3302,6 +3318,10 @@ definitions: | |||||
type: object | type: object | ||||
md.UpdateWithdrawSettingReq: | md.UpdateWithdrawSettingReq: | ||||
properties: | properties: | ||||
first_withdraw_set: | |||||
allOf: | |||||
- $ref: '#/definitions/md.FirstWithdrawSet' | |||||
description: 首次提现设置 | |||||
frequency_set: | frequency_set: | ||||
allOf: | allOf: | ||||
- $ref: '#/definitions/md.WithdrawFrequencySettingStruct' | - $ref: '#/definitions/md.WithdrawFrequencySettingStruct' | ||||
@@ -3311,6 +3331,9 @@ definitions: | |||||
is_auto: | is_auto: | ||||
description: 是否开启自动提现(0:否 1:是) | description: 是否开启自动提现(0:否 1:是) | ||||
type: integer | type: integer | ||||
is_auto_amount_limit: | |||||
description: 自动提现金额限制 | |||||
type: string | |||||
is_real_name: | is_real_name: | ||||
description: 是否实名(0:否 1:是) | description: 是否实名(0:否 1:是) | ||||
type: integer | type: integer | ||||
@@ -5174,8 +5197,7 @@ paths: | |||||
in: body | in: body | ||||
name: req | name: req | ||||
required: true | required: true | ||||
schema: | |||||
type: object | |||||
schema: {} | |||||
produces: | produces: | ||||
- application/json | - application/json | ||||
responses: | responses: | ||||
@@ -32,8 +32,8 @@ require ( | |||||
) | ) | ||||
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_es.git v1.0.1-0.20241118083738-0f22da9ba0be | ||||
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 | code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 | ||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1 | github.com/360EntSecGroup-Skylar/excelize v1.4.1 | ||||