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