|
|
@@ -10,6 +10,7 @@ import ( |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" |
|
|
|
md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md" |
|
|
|
"github.com/gin-gonic/gin" |
|
|
|
"strings" |
|
|
|
"time" |
|
|
|
) |
|
|
|
|
|
|
@@ -54,7 +55,7 @@ func GetWithdrawSetting(c *gin.Context) { |
|
|
|
WithdrawMultipleLimit: "", |
|
|
|
IsSupportDecimalPoint: 0, |
|
|
|
IsAuto: 0, |
|
|
|
WithdrawTimeInterval: "", |
|
|
|
WithdrawTimeInterval: "00:00-00:00", |
|
|
|
WithdrawFeeSet: withdrawFeeSetStr, |
|
|
|
CreateAt: now.Format("2006-01-02 15:04:05"), |
|
|
|
UpdateAt: "", |
|
|
@@ -75,6 +76,11 @@ func GetWithdrawSetting(c *gin.Context) { |
|
|
|
var withdrawFeeSet md2.WithdrawFeeSetStruct |
|
|
|
utils.Unserialize([]byte(setting.FrequencySet), &frequency) |
|
|
|
utils.Unserialize([]byte(setting.WithdrawFeeSet), &withdrawFeeSet) |
|
|
|
withdrawTimeIntervals := strings.Split(setting.WithdrawTimeInterval, "-") |
|
|
|
withdrawTimeInterval := md2.WithdrawTimeIntervalStruct{ |
|
|
|
StartAt: withdrawTimeIntervals[0], |
|
|
|
EndAt: withdrawTimeIntervals[1], |
|
|
|
} |
|
|
|
resp := md.GetWithdrawSettingResp{ |
|
|
|
Id: setting.Id, |
|
|
|
FrequencySet: frequency, |
|
|
@@ -86,7 +92,7 @@ func GetWithdrawSetting(c *gin.Context) { |
|
|
|
WithdrawMultipleLimit: setting.WithdrawMultipleLimit, |
|
|
|
IsSupportDecimalPoint: setting.IsSupportDecimalPoint, |
|
|
|
IsAuto: setting.IsAuto, |
|
|
|
WithdrawTimeInterval: setting.WithdrawTimeInterval, |
|
|
|
WithdrawTimeInterval: withdrawTimeInterval, |
|
|
|
WithdrawFeeSet: withdrawFeeSet, |
|
|
|
CreateAt: setting.CreateAt, |
|
|
|
UpdateAt: setting.UpdateAt, |
|
|
@@ -114,6 +120,10 @@ func UpdateWithdrawSetting(c *gin.Context) { |
|
|
|
} |
|
|
|
frequencyStr := utils.SerializeStr(req.FrequencySet) |
|
|
|
withdrawFeeSetStr := utils.SerializeStr(req.WithdrawFeeSet) |
|
|
|
var withdrawTimeInterval []string |
|
|
|
withdrawTimeInterval = append(withdrawTimeInterval, req.WithdrawTimeInterval.StartAt) |
|
|
|
withdrawTimeInterval = append(withdrawTimeInterval, req.WithdrawTimeInterval.EndAt) |
|
|
|
withdrawTimeIntervalStr := strings.Join(withdrawTimeInterval, "-") |
|
|
|
m := model.FinWithdrawSetting{ |
|
|
|
Id: req.Id, |
|
|
|
FrequencySet: frequencyStr, |
|
|
@@ -125,7 +135,7 @@ func UpdateWithdrawSetting(c *gin.Context) { |
|
|
|
WithdrawMultipleLimit: req.WithdrawMultipleLimit, |
|
|
|
IsSupportDecimalPoint: req.IsSupportDecimalPoint, |
|
|
|
IsAuto: req.IsAuto, |
|
|
|
WithdrawTimeInterval: req.WithdrawTimeInterval, |
|
|
|
WithdrawTimeInterval: withdrawTimeIntervalStr, |
|
|
|
WithdrawFeeSet: withdrawFeeSetStr, |
|
|
|
} |
|
|
|
|
|
|
|