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