Kaynağa Gözat

1

tags/v1.7.4
DengBiao 2 yıl önce
ebeveyn
işleme
a3e7d2a38e
1 değiştirilmiş dosya ile 3 ekleme ve 5 silme
  1. +3
    -5
      rule/small_public_platoon_relate_commission.go

+ 3
- 5
rule/small_public_platoon_relate_commission.go Dosyayı Görüntüle

@@ -258,12 +258,11 @@ func smallPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, userPublicPl

//唯一标识符(父级id-uid-等级-位置)
var uniqueIdentifier = zhios_order_relate_utils.IntToStr(pid) + "-" + zhios_order_relate_utils.IntToStr(uid) + "-" + zhios_order_relate_utils.IntToStr(int(level)) + "-" + zhios_order_relate_utils.IntToStr(position)
<<<<<<< HEAD
if userPublicPlatoonSetting.SettleDay == 0 {
userPublicPlatoonSetting.SettleDay = 30
}
// 3、插入 user_public_platoon_relation 记录
=======

// 3、改变直属父级的 has_son_num 数量
update, err := engine.Where("position = ?", pid).SetExpr("has_son_num", "has_son_num + 1").Update(new(model.UserSmallPublicPlatoonRelation))
if err != nil {
@@ -272,8 +271,8 @@ func smallPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, userPublicPl
if update == 0 {
return userSmallPublicPlatoonRelation, errors.New("更新has_son_num数据出错")
}

// 4、插入 user_public_platoon_relation 记录
>>>>>>> 64fd8a9 (update)
now := time.Now()
userSmallPublicPlatoonRelation.Uid = uid
userSmallPublicPlatoonRelation.FatherUid = fatherUid
@@ -375,7 +374,6 @@ func smallReverseDeductionPosition(calcPosition, levelFirstPosition, severalTime
return
}


func smallFindSuitablePosition(engine *xorm.Engine, position *int, severalTimes float64, fatherLevel int) (suitablePosition, pid int, level float64, err error) {
firstSonPosition := smallSearchPositionFirstSonPosition(*position, int(severalTimes))
var tempLevel float64


Yükleniyor…
İptal
Kaydet