Browse Source

add reverse:for v1.5.0 公排直推要除100

tags/v1.5.1
huangjiajun 2 years ago
parent
commit
bf2451c6a1
2 changed files with 8 additions and 4 deletions
  1. +5
    -1
      rule/public_platoon_relate_commission.go
  2. +3
    -3
      svc/public_platoon_relate_commission.go

+ 5
- 1
rule/public_platoon_relate_commission.go View File

@@ -213,7 +213,8 @@ func makeSearchPid(position int, row int) (pid int) {
func FindWaitForDealUsers(engine *xorm.Engine, page, pageSize int) (err error, resp []int) { func FindWaitForDealUsers(engine *xorm.Engine, page, pageSize int) (err error, resp []int) {
now := time.Now().Format("2006-01-02") now := time.Now().Format("2006-01-02")
lists, err := db.UserPublicPlatoonRelationFindByParamsByPage(engine, map[string]interface{}{ lists, err := db.UserPublicPlatoonRelationFindByParamsByPage(engine, map[string]interface{}{
"wait_for_settlement_date": now,
"key": "wait_for_settlement_date",
"value": now,
}, page, pageSize) }, page, pageSize)
if err != nil { if err != nil {
return return
@@ -245,6 +246,7 @@ func DealCommonWealthReward(engine *xorm.Engine, uid int, isCompleteReward bool)
_ = zhios_order_relate_logx.Error(err) _ = zhios_order_relate_logx.Error(err)
} }
}() }()
session.Begin()


//1、查询出 `user_public_platoon_amount` 中相关记录 //1、查询出 `user_public_platoon_amount` 中相关记录
params, err := db.UserPublicPlatoonAmountFindByParams(engine, map[string]interface{}{ params, err := db.UserPublicPlatoonAmountFindByParams(engine, map[string]interface{}{
@@ -340,6 +342,8 @@ func DealCommonWealthPunish(engine *xorm.Engine, uid int, reason string) (err er
_ = zhios_order_relate_logx.Error(err) _ = zhios_order_relate_logx.Error(err)
} }
}() }()
session.Begin()

//1、查找 `user_public_platoon_setting` 基础设置 //1、查找 `user_public_platoon_setting` 基础设置
userPublicPlatoonSetting, err := db.UserPublicPlatoonSettingGetOneByParams(engine, map[string]interface{}{ userPublicPlatoonSetting, err := db.UserPublicPlatoonSettingGetOneByParams(engine, map[string]interface{}{
"key": "is_open", "key": "is_open",


+ 3
- 3
svc/public_platoon_relate_commission.go View File

@@ -59,9 +59,9 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId
var selfRateList = make(map[string]string) var selfRateList = make(map[string]string)
var commonWealthSystem = make(map[string]string) var commonWealthSystem = make(map[string]string)
for _, coinId := range lvGrade.ReturnType { for _, coinId := range lvGrade.ReturnType {
selfRateList[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100)
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100)
directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount))
selfRateList[coinId] = zhios_order_relate_utils.Float64ToStrPrec4(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100)
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrPrec4(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100)
directPush[coinId] = zhios_order_relate_utils.Float64ToStrPrec4(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100)
} }


//TODO::本次消费产生的共富收益给到谁 //TODO::本次消费产生的共富收益给到谁


Loading…
Cancel
Save