Ver código fonte

update

master
dengbiao 6 meses atrás
pai
commit
1a3e6771b4
1 arquivos alterados com 15 adições e 4 exclusões
  1. +15
    -4
      rule/small_public_platoon_relate_commission.go

+ 15
- 4
rule/small_public_platoon_relate_commission.go Ver arquivo

@@ -46,6 +46,17 @@ func AddSmallPublicPlatoonRelateCommission(engine *xorm.Engine, AddSmallPublicPl
return nil, err
}
for _, param := range AddSmallPublicPlatoonRelateCommissionReqList {
isHasPublicPlatoonUserRelation, err11 := db.UserSmallPublicPlatoonRelationGetOneByParams(engine, map[string]interface{}{
"key": "uid",
"value": param.Uid,
})
if err11 != nil {
return nil, err11
}
if isHasPublicPlatoonUserRelation != nil {
return nil, errors.New("当前用户已加入公排")
}

//1、判断是否有推荐人
if param.RecommendUid != "" {
//2、有推荐人
@@ -915,7 +926,7 @@ func SmallDealCommonWealthPunish(engine *xorm.Engine, uid int, reason string) (e
return
}

//2、查询出 `user_public_platoon_relation` 中相关记录 && 将该记录的uid置为 -1
//2、查询出 `user_small_public_platoon_relation` 中相关记录 && 将该记录的uid置为 -1
params, err := db.UserSmallPublicPlatoonRelationGetOneByParams(engine, map[string]interface{}{
"key": "uid",
"value": uid,
@@ -925,15 +936,15 @@ func SmallDealCommonWealthPunish(engine *xorm.Engine, uid int, reason string) (e
return
}
if params == nil {
err = errors.New("未查询到公排关系记录")
fmt.Println("未查询到公排关系记录!!!!!!!", uid)
_ = session.Rollback()
}

//TODO::判断是否为推荐用户
if params.RecommendUid == 0 {
params.Uid = params.Uid - 2147483648
params.Uid = params.Uid - int(time.Now().Unix())
} else {
params.Uid = params.Uid - 2147483648
params.Uid = params.Uid - int(time.Now().Unix())
}

for n := 1; n <= 9; n++ {


Carregando…
Cancelar
Salvar