shenjiachi před 9 hodinami
rodič
revize
727a01c51a
3 změnil soubory, kde provedl 43 přidání a 32 odebrání
  1. +13
    -4
      app/hdl/financial_center/hdl_withdraw.go
  2. +28
    -26
      app/md/financial_center/md_withdraw.go
  3. +2
    -2
      go.mod

+ 13
- 4
app/hdl/financial_center/hdl_withdraw.go Zobrazit soubor

@@ -4,8 +4,10 @@ import (
"applet/app/db"
"applet/app/e"
md "applet/app/md/financial_center"
"applet/app/utils"
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
"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"
"time"
)
@@ -30,8 +32,13 @@ func GetWithdrawSetting(c *gin.Context) {
// 不存在则初始化
if setting == nil {
now := time.Now()
frequency := md2.WithdrawFrequencySettingStruct{
Duration: 0,
Num: 0,
}
frequencyStr := utils.SerializeStr(frequency)
m := model.FinWithdrawSetting{
FrequencySet: 0,
FrequencySet: frequencyStr,
WithdrawType: 0,
VipLevelLimit: 0,
IsRealName: 0,
@@ -57,9 +64,11 @@ func GetWithdrawSetting(c *gin.Context) {
return
}
}
var frequency md2.WithdrawFrequencySettingStruct
utils.Unserialize([]byte(setting.FrequencySet), &frequency)
resp := md.GetWithdrawSettingResp{
Id: setting.Id,
FrequencySet: setting.FrequencySet,
FrequencySet: frequency,
WithdrawType: setting.WithdrawType,
VipLevelLimit: setting.VipLevelLimit,
IsRealName: setting.IsRealName,
@@ -94,10 +103,10 @@ func UpdateWithdrawSetting(c *gin.Context) {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
return
}
frequencyStr := utils.SerializeStr(req.FrequencySet)
m := model.FinWithdrawSetting{
Id: req.Id,
FrequencySet: req.FrequencySet,
FrequencySet: frequencyStr,
WithdrawType: req.WithdrawType,
VipLevelLimit: req.VipLevelLimit,
IsRealName: req.IsRealName,


+ 28
- 26
app/md/financial_center/md_withdraw.go Zobrazit soubor

@@ -1,33 +1,35 @@
package md

import "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md"

type GetWithdrawSettingResp struct {
Id int64 `json:"id"`
FrequencySet int `json:"frequency_set"` // 频率设置(0:日 1:周 2:月 3:年)
WithdrawType int `json:"withdraw_type"` // 提现方式(1:支付宝 2:微信)
VipLevelLimit int `json:"vip_level_limit"` // 提现等级限制
IsRealName int `json:"is_real_name"` // 是否实名(0:否 1:是)
WithdrawNumsLimit int `json:"withdraw_nums_limit"` // 提现次数限制(对应上方设置周期,0为不限制,失败、驳回不计数 )
WithdrawAmountLimit string `json:"withdraw_amount_limit"` // 提现金额限制(0为不限制,大于等于该金额才可以申请提现 )
WithdrawMultipleLimit string `json:"withdraw_multiple_limit"` // 提现倍数限制(0为不限制,金额限制倍数才可以申请提现 )
IsSupportDecimalPoint int `json:"is_support_decimal_point"` // 是否支持小数点(0:否 1:是)
IsAuto int `json:"is_auto"` // 是否开启自动提现(0:否 1:是)
WithdrawTimeInterval string `json:"withdraw_time_interval"` // 提现时段
WithdrawFeeSet string `json:"withdraw_fee_set"` // 提现手续费设置
CreateAt string `json:"create_at"` // 申请时间
UpdateAt string `json:"update_at"` // 处理时间
Id int64 `json:"id"`
FrequencySet md.WithdrawFrequencySettingStruct `json:"frequency_set"` // 频率设置(0:日 1:周 2:月 3:年)
WithdrawType int `json:"withdraw_type"` // 提现方式(1:支付宝 2:微信)
VipLevelLimit int `json:"vip_level_limit"` // 提现等级限制
IsRealName int `json:"is_real_name"` // 是否实名(0:否 1:是)
WithdrawNumsLimit int `json:"withdraw_nums_limit"` // 提现次数限制(对应上方设置周期,0为不限制,失败、驳回不计数 )
WithdrawAmountLimit string `json:"withdraw_amount_limit"` // 提现金额限制(0为不限制,大于等于该金额才可以申请提现 )
WithdrawMultipleLimit string `json:"withdraw_multiple_limit"` // 提现倍数限制(0为不限制,金额限制倍数才可以申请提现 )
IsSupportDecimalPoint int `json:"is_support_decimal_point"` // 是否支持小数点(0:否 1:是)
IsAuto int `json:"is_auto"` // 是否开启自动提现(0:否 1:是)
WithdrawTimeInterval string `json:"withdraw_time_interval"` // 提现时段
WithdrawFeeSet string `json:"withdraw_fee_set"` // 提现手续费设置
CreateAt string `json:"create_at"` // 申请时间
UpdateAt string `json:"update_at"` // 处理时间
}

type UpdateWithdrawSettingReq struct {
Id int64 `json:"id,required"`
FrequencySet int `json:"frequency_set"` // 频率设置(0:日 1:周 2:月 3:年)
WithdrawType int `json:"withdraw_type"` // 提现方式(1:支付宝 2:微信)
VipLevelLimit int `json:"vip_level_limit"` // 提现等级限制
IsRealName int `json:"is_real_name"` // 是否实名(0:否 1:是)
WithdrawNumsLimit int `json:"withdraw_nums_limit"` // 提现次数限制(对应上方设置周期,0为不限制,失败、驳回不计数 )
WithdrawAmountLimit string `json:"withdraw_amount_limit"` // 提现金额限制(0为不限制,大于等于该金额才可以申请提现 )
WithdrawMultipleLimit string `json:"withdraw_multiple_limit"` // 提现倍数限制(0为不限制,金额限制倍数才可以申请提现 )
IsSupportDecimalPoint int `json:"is_support_decimal_point"` // 是否支持小数点(0:否 1:是)
IsAuto int `json:"is_auto"` // 是否开启自动提现(0:否 1:是)
WithdrawTimeInterval string `json:"withdraw_time_interval"` // 提现时段
WithdrawFeeSet string `json:"withdraw_fee_set"` // 提现手续费设置
Id int64 `json:"id,required"`
FrequencySet md.WithdrawFrequencySettingStruct `json:"frequency_set"` // 频率设置(num 个 duration)
WithdrawType int `json:"withdraw_type"` // 提现方式(1:支付宝 2:微信)
VipLevelLimit int `json:"vip_level_limit"` // 提现等级限制
IsRealName int `json:"is_real_name"` // 是否实名(0:否 1:是)
WithdrawNumsLimit int `json:"withdraw_nums_limit"` // 提现次数限制(对应上方设置周期,0为不限制,失败、驳回不计数 )
WithdrawAmountLimit string `json:"withdraw_amount_limit"` // 提现金额限制(0为不限制,大于等于该金额才可以申请提现 )
WithdrawMultipleLimit string `json:"withdraw_multiple_limit"` // 提现倍数限制(0为不限制,金额限制倍数才可以申请提现 )
IsSupportDecimalPoint int `json:"is_support_decimal_point"` // 是否支持小数点(0:否 1:是)
IsAuto int `json:"is_auto"` // 是否开启自动提现(0:否 1:是)
WithdrawTimeInterval string `json:"withdraw_time_interval"` // 提现时段
WithdrawFeeSet string `json:"withdraw_fee_set"` // 提现手续费设置
}

+ 2
- 2
go.mod Zobrazit soubor

@@ -33,8 +33,8 @@ require (
)

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241125075604-63fa853aeb33
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241125064517-f490fbb9b9a0
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241125081046-9b9bbf3c491f
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241125081706-0915be3f4144
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/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible


Načítá se…
Zrušit
Uložit