Parcourir la source

update

tags/v4.3.0
DengBiao il y a 1 an
Parent
révision
8b26aa45ef
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. +1
    -1
      db/db_user_small_public_platoon_relation.go
  2. +1
    -1
      rule/small_public_platoon_relate_commission.go

+ 1
- 1
db/db_user_small_public_platoon_relation.go Voir le fichier

@@ -95,7 +95,7 @@ func UserSmallPublicPlatoonRelationFindByEmptyPosition(Db *xorm.Engine) (*model.
func UserSmallPublicPlatoonRelationGetOneByPid(Db *xorm.Engine, recommendUid string, params map[string]interface{}) (*model.UserSmallPublicPlatoonRelation, error) {
var m model.UserSmallPublicPlatoonRelation
var query = fmt.Sprintf("%s <=?", params["key"])
if has, err := Db.Where("recommend_uid = ?", recommendUid).And(query, params["value"]).Get(&m); err != nil || has == false {
if has, err := Db.Where("recommend_uid = ?", recommendUid).And(query, params["value"]).OrderBy("id ASC").Get(&m); err != nil || has == false {
return nil, zhios_order_relate_logx.Error(err)
}
return &m, nil


+ 1
- 1
rule/small_public_platoon_relate_commission.go Voir le fichier

@@ -246,7 +246,7 @@ func smallPublicPlatoon(engine *xorm.Engine, uid, recommendUid int, userPublicPl
standardSmallPublicPlatoonRelation.LevelTotal = m.LevelTotal + 1
} else {
//TODO::判断直属下级是否排满
if len(userSmallPublicPlatoonRelations) == userPublicPlatoonSetting.SeveralTimes {
if len(userSmallPublicPlatoonRelations) >= userPublicPlatoonSetting.SeveralTimes {
var fatherLevel float64
smallMakeSearchLevel(&m.Position, float64(userPublicPlatoonSetting.SeveralTimes), &fatherLevel)
var times = 0


Chargement…
Annuler
Enregistrer