Browse Source

update 一个圈圈

master
DengBiao 10 months ago
parent
commit
7351dd6fa2
2 changed files with 12 additions and 1 deletions
  1. +11
    -0
      rule/one_circles/one_circles_public_platoon_user_relation_commission.go
  2. +1
    -1
      rule/one_circles/one_circles_sign_in_green_energy_settlement.go

+ 11
- 0
rule/one_circles/one_circles_public_platoon_user_relation_commission.go View File

@@ -32,6 +32,17 @@ func AddOneCirclesPublicPlatoonUserRelationCommission(engine *xorm.Engine, AddOn
}

for _, param := range AddOneCirclesPublicPlatoonUserRelationCommissionReqList {
isHasOneCirclesPublicPlatoonUserRelation, err11 := db.OneCirclesPublicPlatoonUserRelationGetOneByParams(engine, map[string]interface{}{
"key": "uid",
"value": param.Uid,
})
if err11 != nil {
return nil, err11
}
if isHasOneCirclesPublicPlatoonUserRelation == nil {
return nil, errors.New("当前用户已加入公排")
}

//1、判断是否有推荐人
if param.RecommendUid != "" {
//2、有推荐人


+ 1
- 1
rule/one_circles/one_circles_sign_in_green_energy_settlement.go View File

@@ -100,6 +100,7 @@ func SettlementSignInGreenEnergy(engine *xorm.Engine, masterId string) (err erro
if parentRewardValue <= rewardEndValue {
break
}
parentRewardValue = parentRewardValue * rewardDecrement
//TODO::判断是否活跃
var m model.OneCirclesGreenEnergySignIn
has, err3333333 := engine.Where("uid =?", relate.ParentUid).And("start_time >=?", time.Now().Format("2006-01-02")+" 00:00:00").Get(&m)
@@ -112,7 +113,6 @@ func SettlementSignInGreenEnergy(engine *xorm.Engine, masterId string) (err erro
//不活跃不需要奖励
continue
}
parentRewardValue = parentRewardValue * rewardDecrement
err = DealUserCoin(session, md.DealUserCoinReq{
Kind: "add",
Mid: masterId,


Loading…
Cancel
Save