Browse Source

提现加入实名判断

master
huangjiajun 5 days ago
parent
commit
ecb2792420
2 changed files with 29 additions and 6 deletions
  1. +25
    -2
      app/hdl/hdl_wallet.go
  2. +4
    -4
      go.mod

+ 25
- 2
app/hdl/hdl_wallet.go View File

@@ -160,6 +160,26 @@ func WithdrawApply(c *gin.Context) {
return
}
user := svc.GetUser(c)
//1. 判断是否为第一次提现
isFirst := false
has, err := db.Db.Where("uid = ?", user.Id).
Get(model.FinWithdrawApply{})
if !has { //第一次提现
isFirst = true
}
settingDb := implement.NewFinWithdrawSettingDb(db.Db)
setting, err := settingDb.FinWithdrawSettingGetOne()
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err)
return
}
resp := svc.GetWithdrawCondition(user, setting, isFirst)
//判断实名
IsRealName := svc.CheckRealName(user.Id)
if IsRealName != "1" && resp.IsNeedRealName {
e.OutErr(c, 400, e.NewErr(400, "请先前往实名认证"))
return
}
var userId, openId string
var kind int
//sysCfgDb := implement.NewSysCfgDb(db.Db, cache.GetPool().Get())
@@ -346,9 +366,12 @@ func GetWithdrawCondition(c *gin.Context) {
if !has { //第一次提现
isFirst = true
}

resp := svc.GetWithdrawCondition(user, setting, isFirst)

//判断实名
IsRealName := svc.CheckRealName(user.Id)
if IsRealName == "1" && resp.IsNeedRealName {
resp.IsNeedRealName = false
}
alipayUserInfoDb := implement.NewAlipayUserInfoDb(db.Db)
alipayInfo, err := alipayUserInfoDb.GetAlipayUserInfo(user.Id)
if err != nil {


+ 4
- 4
go.mod View File

@@ -2,12 +2,11 @@ module applet

go 1.19

replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models
//replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models

replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules
//replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules

require (
github.com/jinzhu/copier v0.4.0
github.com/boombuler/barcode v1.0.1
github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5
github.com/dgrijalva/jwt-go v3.2.0+incompatible
@@ -17,6 +16,7 @@ require (
github.com/go-playground/validator/v10 v10.20.0
github.com/go-redis/redis v6.15.9+incompatible
github.com/gomodule/redigo v2.0.0+incompatible
github.com/jinzhu/copier v0.4.0
github.com/makiuchi-d/gozxing v0.0.0-20210324052758-57132e828831
github.com/qiniu/api.v7/v7 v7.8.2
github.com/robfig/cron/v3 v3.0.1
@@ -32,7 +32,7 @@ require (
)

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241128142331-4b15dd7d7320
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241129082300-a528fb63b590
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241129083357-e0e1afc0ff46
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


Loading…
Cancel
Save