|
|
@@ -22,7 +22,7 @@ func GetRealNameAuthBase(c *gin.Context) { |
|
|
|
var res = &md.RealNameAuthBasicData{ |
|
|
|
AuthState: "0", |
|
|
|
IsNeedGetEnergy: "1", |
|
|
|
TipStr: "请前往蛋蛋乐园获取能量", |
|
|
|
TipStr: "请先前往积分中心使用部分能量值兑换余额", |
|
|
|
} |
|
|
|
|
|
|
|
res.AuthState = "0" |
|
|
@@ -31,8 +31,9 @@ func GetRealNameAuthBase(c *gin.Context) { |
|
|
|
user := GetUser(c) |
|
|
|
egg_system_rules.Init(cfg.RedisAddr) |
|
|
|
amount := GetSysCfgStr("user_real_name_money") |
|
|
|
_, can := egg_energy.CheckActivityCoinToAlipayRealName(db.Db, user.Id, amount) |
|
|
|
if can { |
|
|
|
NewUserWalletDb := implement.NewUserWalletDb(db.Db) |
|
|
|
wallet, _ := NewUserWalletDb.GetUserVirtualWallet(user.Id) |
|
|
|
if wallet != nil && utils.StrToFloat64(wallet.Amount) >= utils.StrToFloat64(amount) { |
|
|
|
res.IsNeedGetEnergy = "0" |
|
|
|
} |
|
|
|
NewUserRealNameAuthDb := implement.NewUserRealNameAuthDb(eg) |
|
|
@@ -70,7 +71,7 @@ func GetRealNameAuthState(c *gin.Context) { |
|
|
|
var res = &md.RealNameAuthBasicData{ |
|
|
|
AuthState: "0", |
|
|
|
IsNeedGetEnergy: "1", |
|
|
|
TipStr: "请前往蛋蛋乐园获取能量", |
|
|
|
TipStr: "请先前往积分中心使用部分能量值兑换余额", |
|
|
|
} |
|
|
|
res.AuthState = "0" |
|
|
|
//判断审核状态 |
|
|
@@ -78,8 +79,9 @@ func GetRealNameAuthState(c *gin.Context) { |
|
|
|
user := GetUser(c) |
|
|
|
egg_system_rules.Init(cfg.RedisAddr) |
|
|
|
amount := GetSysCfgStr("user_real_name_money") |
|
|
|
_, can := egg_energy.CheckActivityCoinToAlipayRealName(db.Db, user.Id, amount) |
|
|
|
if can { |
|
|
|
NewUserWalletDb := implement.NewUserWalletDb(db.Db) |
|
|
|
wallet, _ := NewUserWalletDb.GetUserVirtualWallet(user.Id) |
|
|
|
if wallet != nil && utils.StrToFloat64(wallet.Amount) >= utils.StrToFloat64(amount) { |
|
|
|
res.IsNeedGetEnergy = "0" |
|
|
|
} |
|
|
|
NewUserRealNameAuthDb := implement.NewUserRealNameAuthDb(eg) |
|
|
|