diff --git a/rule/public_platoon_relate_commission.go b/rule/public_platoon_relate_commission.go index 57e1e1a..47d9f7e 100644 --- a/rule/public_platoon_relate_commission.go +++ b/rule/public_platoon_relate_commission.go @@ -213,7 +213,8 @@ func makeSearchPid(position int, row int) (pid int) { func FindWaitForDealUsers(engine *xorm.Engine, page, pageSize int) (err error, resp []int) { now := time.Now().Format("2006-01-02") lists, err := db.UserPublicPlatoonRelationFindByParamsByPage(engine, map[string]interface{}{ - "wait_for_settlement_date": now, + "key": "wait_for_settlement_date", + "value": now, }, page, pageSize) if err != nil { return @@ -245,6 +246,7 @@ func DealCommonWealthReward(engine *xorm.Engine, uid int, isCompleteReward bool) _ = zhios_order_relate_logx.Error(err) } }() + session.Begin() //1、查询出 `user_public_platoon_amount` 中相关记录 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) } }() + session.Begin() + //1、查找 `user_public_platoon_setting` 基础设置 userPublicPlatoonSetting, err := db.UserPublicPlatoonSettingGetOneByParams(engine, map[string]interface{}{ "key": "is_open", diff --git a/svc/public_platoon_relate_commission.go b/svc/public_platoon_relate_commission.go index 642f186..96ed594 100644 --- a/svc/public_platoon_relate_commission.go +++ b/svc/public_platoon_relate_commission.go @@ -59,9 +59,9 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId var selfRateList = make(map[string]string) var commonWealthSystem = make(map[string]string) 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::本次消费产生的共富收益给到谁