Browse Source

update

tags/v4.3.0
DengBiao 1 year ago
parent
commit
8b26aa45ef
2 changed files with 2 additions and 2 deletions
  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 View File

@@ -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 View File

@@ -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


Loading…
Cancel
Save