Browse Source

update

master
shenjiachi 1 day ago
parent
commit
5987dce133
3 changed files with 16 additions and 3 deletions
  1. +12
    -1
      app/hdl/financial_center/hdl_withdraw.go
  2. +2
    -0
      app/md/financial_center/md_withdraw.go
  3. +2
    -2
      go.mod

+ 12
- 1
app/hdl/financial_center/hdl_withdraw.go View File

@@ -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,
@@ -58,6 +63,7 @@ func GetWithdrawSetting(c *gin.Context) {
IsAutoAmountLimit: "", 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: "",
} }
@@ -75,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],
@@ -96,6 +104,7 @@ func GetWithdrawSetting(c *gin.Context) {
IsAutoAmountLimit: setting.IsAutoAmountLimit, 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,
} }
@@ -122,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)
@@ -140,9 +150,10 @@ func UpdateWithdrawSetting(c *gin.Context) {
IsAutoAmountLimit: req.IsAutoAmountLimit, 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 {


+ 2
- 0
app/md/financial_center/md_withdraw.go View File

@@ -22,6 +22,7 @@ type GetWithdrawSettingResp struct {
IsAutoAmountLimit string `json:"is_auto_amount_limit"` // 自动提现金额限制 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"` // 处理时间
} }
@@ -40,6 +41,7 @@ type UpdateWithdrawSettingReq struct {
IsAutoAmountLimit string `json:"is_auto_amount_limit"` // 自动提现金额限制 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


+ 2
- 2
go.mod View File

@@ -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


Loading…
Cancel
Save