From bf2451c6a13ce918af8f60f03dc2ca1e6311ede8 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 19 Jul 2022 15:38:36 +0800 Subject: [PATCH] =?UTF-8?q?add=20reverse:for=20v1.5.0=20=E5=85=AC=E6=8E=92?= =?UTF-8?q?=E7=9B=B4=E6=8E=A8=E8=A6=81=E9=99=A4100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rule/public_platoon_relate_commission.go | 6 +++++- svc/public_platoon_relate_commission.go | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) 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::本次消费产生的共富收益给到谁