Browse Source

Merge remote-tracking branch 'origin/master'

master
huangjiajun 1 month ago
parent
commit
9f7ff6c9f0
3 changed files with 29 additions and 16 deletions
  1. +1
    -0
      src/dao/fin_withdraw_apply_dao.go
  2. +10
    -0
      src/implement/fin_withdraw_apply_implement.go
  3. +18
    -16
      src/model/fin_withdraw_setting.go

+ 1
- 0
src/dao/fin_withdraw_apply_dao.go View File

@@ -8,4 +8,5 @@ import (
type FinWithdrawApplyDao interface {
FinWithdrawApplyGetBySession(session *xorm.Session, startAt, endAt string, params map[string]interface{}) (*[]model.FinWithdrawApply, error)
FinWithdrawApplyInsertOneBySession(session *xorm.Session, m *model.FinWithdrawApply) (int64, error)
FinWithdrawApplyAmountGetByParams(params map[string]interface{}) (float64, error)
}

+ 10
- 0
src/implement/fin_withdraw_apply_implement.go View File

@@ -44,3 +44,13 @@ func (f FinWithdrawApplyDb) FinWithdrawApplyGetBySession(session *xorm.Session,

return m, nil
}

func (f FinWithdrawApplyDb) FinWithdrawApplyAmountGetByParams(params map[string]interface{}) (float64, error) {
var m model.FinWithdrawApply
var query = fmt.Sprintf("%s =?", params["key"])
total, err := f.Db.Where(query, params["value"]).Sum(m, "amount")
if err != nil {
return 0, err
}
return total, nil
}

+ 18
- 16
src/model/fin_withdraw_setting.go View File

@@ -1,20 +1,22 @@
package model

type FinWithdrawSetting struct {
Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"`
FrequencySet string `json:"frequency_set" xorm:"not null comment('频率设置') TEXT"`
WithdrawType int `json:"withdraw_type" xorm:"not null default 1 comment('提现方式(1:支付宝 2:微信)') TINYINT(1)"`
VipLevelLimit int `json:"vip_level_limit" xorm:"not null default 0 comment('提现等级限制') INT(11)"`
IsRealName int `json:"is_real_name" xorm:"not null default 0 comment('是否实名(0:否 1:是)') TINYINT(1)"`
WithdrawNumsLimit int `json:"withdraw_nums_limit" xorm:"not null default 0 comment('提现次数限制(对应上方设置周期,0为不限制,失败、驳回不计数 )') TINYINT(3)"`
WithdrawAmountLimit string `json:"withdraw_amount_limit" xorm:"not null comment('提现金额限制(0为不限制,大于等于该金额才可以申请提现 )') DECIMAL(10,2)"`
WithdrawMultipleLimit string `json:"withdraw_multiple_limit" xorm:"not null comment('提现倍数限制(0为不限制,金额限制倍数才可以申请提现 )') DECIMAL(10,2)"`
IsSupportDecimalPoint int `json:"is_support_decimal_point" xorm:"not null default 0 comment('是否支持小数点(0:否 1:是)') TINYINT(1)"`
IsAuto int `json:"is_auto" xorm:"not null default 0 comment('是否开启自动提现(0:否 1:是)') TINYINT(1)"`
IsAutoAmountLimit string `json:"is_auto_amount_limit" xorm:"not null default 0.00 comment('自动提现金额限制') DECIMAL(10,2)"`
WithdrawTimeInterval string `json:"withdraw_time_interval" xorm:"not null default '' comment('提现时段') VARCHAR(255)"`
WithdrawFeeSet string `json:"withdraw_fee_set" xorm:"not null comment('提现手续费设置') TEXT"`
FirstWithdrawSet string `json:"first_withdraw_set" xorm:"not null comment('首次提现设置') TEXT"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('申请时间') TIMESTAMP"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('处理时间') TIMESTAMP"`
Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"`
FrequencySet string `json:"frequency_set" xorm:"not null comment('频率设置') TEXT"`
WithdrawType int `json:"withdraw_type" xorm:"not null default 1 comment('提现方式(1:支付宝 2:微信)') TINYINT(1)"`
VipLevelLimit int `json:"vip_level_limit" xorm:"not null default 0 comment('提现等级限制') INT(11)"`
IsRealName int `json:"is_real_name" xorm:"not null default 0 comment('是否实名(0:否 1:是)') TINYINT(1)"`
WithdrawNumsLimit int `json:"withdraw_nums_limit" xorm:"not null default 0 comment('提现次数限制(对应上方设置周期,0为不限制,失败、驳回不计数 )') TINYINT(3)"`
WithdrawAmountLimit string `json:"withdraw_amount_limit" xorm:"not null comment('提现金额限制(0为不限制,大于等于该金额才可以申请提现 )') DECIMAL(10,2)"`
WithdrawMultipleLimit string `json:"withdraw_multiple_limit" xorm:"not null comment('提现倍数限制(0为不限制,金额限制倍数才可以申请提现 )') DECIMAL(10,2)"`
IsSupportDecimalPoint int `json:"is_support_decimal_point" xorm:"not null default 0 comment('是否支持小数点(0:否 1:是)') TINYINT(1)"`
IsAuto int `json:"is_auto" xorm:"not null default 0 comment('是否开启自动提现(0:否 1:是)') TINYINT(1)"`
IsAutoAmountLimit string `json:"is_auto_amount_limit" xorm:"not null default 0.00 comment('自动提现金额限制') DECIMAL(10,2)"`
WithdrawTimeInterval string `json:"withdraw_time_interval" xorm:"not null default '' comment('提现时段') VARCHAR(255)"`
WithdrawFeeSet string `json:"withdraw_fee_set" xorm:"not null comment('提现手续费设置') TEXT"`
PendingOrdersIsCanApply int `json:"pending_orders_is_can_apply" xorm:"not null comment('存在待处理记录是否允许再次申请提现(0:禁止,1:允许)') TINYINT(1)"`
ConditionIsOpen int `json:"condition_is_open" xorm:"not null comment('提现条件是否开启(0:关闭, 1:开启)') TINYINT(1)"`
FirstWithdrawSet string `json:"first_withdraw_set" xorm:"not null comment('首次提现设置') TEXT"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('申请时间') TIMESTAMP"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('处理时间') TIMESTAMP"`
}

Loading…
Cancel
Save