@@ -10,6 +10,7 @@ import ( | |||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" | "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | ||||
md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md" | md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md" | ||||
"github.com/gin-gonic/gin" | "github.com/gin-gonic/gin" | ||||
"strings" | |||||
"time" | "time" | ||||
) | ) | ||||
@@ -54,7 +55,7 @@ func GetWithdrawSetting(c *gin.Context) { | |||||
WithdrawMultipleLimit: "", | WithdrawMultipleLimit: "", | ||||
IsSupportDecimalPoint: 0, | IsSupportDecimalPoint: 0, | ||||
IsAuto: 0, | IsAuto: 0, | ||||
WithdrawTimeInterval: "", | |||||
WithdrawTimeInterval: "00:00-00:00", | |||||
WithdrawFeeSet: withdrawFeeSetStr, | WithdrawFeeSet: withdrawFeeSetStr, | ||||
CreateAt: now.Format("2006-01-02 15:04:05"), | CreateAt: now.Format("2006-01-02 15:04:05"), | ||||
UpdateAt: "", | UpdateAt: "", | ||||
@@ -75,6 +76,11 @@ func GetWithdrawSetting(c *gin.Context) { | |||||
var withdrawFeeSet md2.WithdrawFeeSetStruct | var withdrawFeeSet md2.WithdrawFeeSetStruct | ||||
utils.Unserialize([]byte(setting.FrequencySet), &frequency) | utils.Unserialize([]byte(setting.FrequencySet), &frequency) | ||||
utils.Unserialize([]byte(setting.WithdrawFeeSet), &withdrawFeeSet) | utils.Unserialize([]byte(setting.WithdrawFeeSet), &withdrawFeeSet) | ||||
withdrawTimeIntervals := strings.Split(setting.WithdrawTimeInterval, "-") | |||||
withdrawTimeInterval := md2.WithdrawTimeIntervalStruct{ | |||||
StartAt: withdrawTimeIntervals[0], | |||||
EndAt: withdrawTimeIntervals[1], | |||||
} | |||||
resp := md.GetWithdrawSettingResp{ | resp := md.GetWithdrawSettingResp{ | ||||
Id: setting.Id, | Id: setting.Id, | ||||
FrequencySet: frequency, | FrequencySet: frequency, | ||||
@@ -86,7 +92,7 @@ func GetWithdrawSetting(c *gin.Context) { | |||||
WithdrawMultipleLimit: setting.WithdrawMultipleLimit, | WithdrawMultipleLimit: setting.WithdrawMultipleLimit, | ||||
IsSupportDecimalPoint: setting.IsSupportDecimalPoint, | IsSupportDecimalPoint: setting.IsSupportDecimalPoint, | ||||
IsAuto: setting.IsAuto, | IsAuto: setting.IsAuto, | ||||
WithdrawTimeInterval: setting.WithdrawTimeInterval, | |||||
WithdrawTimeInterval: withdrawTimeInterval, | |||||
WithdrawFeeSet: withdrawFeeSet, | WithdrawFeeSet: withdrawFeeSet, | ||||
CreateAt: setting.CreateAt, | CreateAt: setting.CreateAt, | ||||
UpdateAt: setting.UpdateAt, | UpdateAt: setting.UpdateAt, | ||||
@@ -114,6 +120,10 @@ 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) | ||||
var withdrawTimeInterval []string | |||||
withdrawTimeInterval = append(withdrawTimeInterval, req.WithdrawTimeInterval.StartAt) | |||||
withdrawTimeInterval = append(withdrawTimeInterval, req.WithdrawTimeInterval.EndAt) | |||||
withdrawTimeIntervalStr := strings.Join(withdrawTimeInterval, "-") | |||||
m := model.FinWithdrawSetting{ | m := model.FinWithdrawSetting{ | ||||
Id: req.Id, | Id: req.Id, | ||||
FrequencySet: frequencyStr, | FrequencySet: frequencyStr, | ||||
@@ -125,7 +135,7 @@ func UpdateWithdrawSetting(c *gin.Context) { | |||||
WithdrawMultipleLimit: req.WithdrawMultipleLimit, | WithdrawMultipleLimit: req.WithdrawMultipleLimit, | ||||
IsSupportDecimalPoint: req.IsSupportDecimalPoint, | IsSupportDecimalPoint: req.IsSupportDecimalPoint, | ||||
IsAuto: req.IsAuto, | IsAuto: req.IsAuto, | ||||
WithdrawTimeInterval: req.WithdrawTimeInterval, | |||||
WithdrawTimeInterval: withdrawTimeIntervalStr, | |||||
WithdrawFeeSet: withdrawFeeSetStr, | WithdrawFeeSet: withdrawFeeSetStr, | ||||
} | } | ||||
@@ -19,7 +19,7 @@ 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:是) | ||||
WithdrawTimeInterval string `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"` // 提现手续费设置 | ||||
CreateAt string `json:"create_at"` // 申请时间 | CreateAt string `json:"create_at"` // 申请时间 | ||||
UpdateAt string `json:"update_at"` // 处理时间 | UpdateAt string `json:"update_at"` // 处理时间 | ||||
@@ -36,7 +36,7 @@ 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:是) | ||||
WithdrawTimeInterval string `json:"withdraw_time_interval"` // 提现时段 | |||||
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"` // 提现手续费设置 | ||||
} | } | ||||
type GetWithdrawApplyListReq struct { | type GetWithdrawApplyListReq struct { | ||||
@@ -34,7 +34,7 @@ require ( | |||||
require ( | require ( | ||||
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241128093644-212e906d846c | code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241128093644-212e906d846c | ||||
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241128100543-0057e61676e7 | |||||
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241128103224-bc1f94e24dd9 | |||||
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 | ||||
@@ -88,7 +88,6 @@ require ( | |||||
github.com/leodido/go-urn v1.4.0 // indirect | github.com/leodido/go-urn v1.4.0 // indirect | ||||
github.com/mailru/easyjson v0.7.7 // indirect | github.com/mailru/easyjson v0.7.7 // indirect | ||||
github.com/mattn/go-isatty v0.0.20 // indirect | github.com/mattn/go-isatty v0.0.20 // indirect | ||||
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect | |||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||||
github.com/modern-go/reflect2 v1.0.2 // indirect | github.com/modern-go/reflect2 v1.0.2 // indirect | ||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect | github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect | ||||