From 5fc752b5ea519295574af8356e843bc2a3dfa6bc Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Fri, 8 Jul 2022 17:12:51 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=85=B1=E5=AF=8C=E5=88=B6=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rule/public_platoon_relate_commission.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rule/public_platoon_relate_commission.go b/rule/public_platoon_relate_commission.go index 7934fb3..93343c0 100644 --- a/rule/public_platoon_relate_commission.go +++ b/rule/public_platoon_relate_commission.go @@ -129,7 +129,7 @@ func AddPublicPlatoonRelateCommission(engine *xorm.Engine, masterId string, AddP publicPlatoon 公排方法 TODO 相关公式: 1: 每个等级的起始值(1+5^0+5^1+5^2+...+5^x-2), 每个等级的结束值(`5^0+5^1+5^2+...+5^x-1) - 2: 根据position查找pid { (position-1)/5 } + 2: 根据position查找父级position { (position-1)/5 } 3: 根据position查找等级level {position-5^0-5^1-5^2-...-5^x 是否 <0 ? => x+1 } */ func publicPlatoon(engine *xorm.Engine, uid, recommendUid int, userPublicPlatoonSetting model.UserPublicPlatoonSetting) (model.UserPublicPlatoonRelation, error) { @@ -148,7 +148,7 @@ func publicPlatoon(engine *xorm.Engine, uid, recommendUid int, userPublicPlatoon //2、查找对应pid的 user_public_platoon_relation 记录 var m1 model.UserPublicPlatoonRelation - if has, err := engine.Where("uid=?", pid).Get(&m1); err != nil || has == false { + if has, err := engine.Where("position=?", pid).Get(&m1); err != nil || has == false { return userPublicPlatoonRelation, err } var fatherUid string