|
@@ -373,8 +373,29 @@ func dealEcpm(user model.User, ecpm string, ch *rabbit.Channel) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
func ActivityCoinToAlipayRealName(engine *xorm.Engine, uid int64, amount string) (err error) { |
|
|
func ActivityCoinToAlipayRealName(engine *xorm.Engine, uid int64, amount string) (err error) { |
|
|
amountValue, _ := decimal.NewFromString(amount) |
|
|
|
|
|
|
|
|
session := engine.NewSession() |
|
|
|
|
|
defer func() { |
|
|
|
|
|
session.Close() |
|
|
|
|
|
if err := recover(); err != nil { |
|
|
|
|
|
_ = zhios_order_relate_logx.Error(err) |
|
|
|
|
|
} |
|
|
|
|
|
}() |
|
|
|
|
|
session.Begin() |
|
|
|
|
|
|
|
|
|
|
|
err = rule.DealUserWallet(session, md.DealUserWalletReq{ |
|
|
|
|
|
Direction: "sub", |
|
|
|
|
|
Kind: int(enum.UserToAlipayRealName), |
|
|
|
|
|
Title: enum.UserToAlipayRealName.String(), |
|
|
|
|
|
Uid: uid, |
|
|
|
|
|
Amount: egg_system_rules.StrToFloat64(amount), |
|
|
|
|
|
}) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
session.Rollback() |
|
|
|
|
|
return err |
|
|
|
|
|
} |
|
|
|
|
|
return session.Commit() |
|
|
|
|
|
|
|
|
|
|
|
amountValue, _ := decimal.NewFromString(amount) |
|
|
//1、查找 `egg_energy_basic_setting` 基础设置 |
|
|
//1、查找 `egg_energy_basic_setting` 基础设置 |
|
|
eggEnergyBasicSettingDb := implement.NewEggEnergyBasicSettingDb(engine) |
|
|
eggEnergyBasicSettingDb := implement.NewEggEnergyBasicSettingDb(engine) |
|
|
eggEnergyBasicSetting, err := eggEnergyBasicSettingDb.EggEnergyBasicSettingGetOneByParams(map[string]interface{}{ |
|
|
eggEnergyBasicSetting, err := eggEnergyBasicSettingDb.EggEnergyBasicSettingGetOneByParams(map[string]interface{}{ |
|
@@ -412,7 +433,7 @@ func ActivityCoinToAlipayRealName(engine *xorm.Engine, uid int64, amount string) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//3、扣除对应个人蛋蛋积分 |
|
|
//3、扣除对应个人蛋蛋积分 |
|
|
session := engine.NewSession() |
|
|
|
|
|
|
|
|
session = engine.NewSession() |
|
|
defer func() { |
|
|
defer func() { |
|
|
session.Close() |
|
|
session.Close() |
|
|
if err := recover(); err != nil { |
|
|
if err := recover(); err != nil { |
|
|