|
@@ -173,7 +173,7 @@ func (l *BusinessIntelligence) MeListCount(classify string, userid string, data
|
|
|
userid = qutil.If(userInfo.Pid != "", userInfo.Pid, userid).(string)
|
|
|
userSession := util.GetUserBaseInfo(l.Session())
|
|
|
BigMsg := config.Middleground.PowerCheckCenter.Check("10000", userSession.MgoUserId, userSession.BaseUserId, userSession.AccountId, userSession.EntId, userSession.PositionType, userSession.PositionId)
|
|
|
- maxCount, _ := getCustomerLimit(BigMsg)
|
|
|
+ maxCount := getCustomerLimit(BigMsg)
|
|
|
if maxCount > 0 {
|
|
|
allCount := db.Mgo.Count("follow_customer", map[string]interface{}{
|
|
|
"userId": userid,
|
|
@@ -186,35 +186,35 @@ func (l *BusinessIntelligence) MeListCount(classify string, userid string, data
|
|
|
|
|
|
// 获取关注项目数量限制
|
|
|
// limitStatus 1 -超级订阅用户 2-非超级订阅(例如:大会员、新老版商机管理、企业管理服务用户)
|
|
|
-func getCustomerLimit(userInfo *powercheck.CheckResp) (count int, limitStatus int) {
|
|
|
+func getCustomerLimit(userInfo *powercheck.CheckResp) (count int) {
|
|
|
if userInfo.Free.IsFree {
|
|
|
- return config.Config.FollowCustomer.Free, 0
|
|
|
+ return config.Config.FollowCustomer.Free
|
|
|
}
|
|
|
- limitStatus = 2
|
|
|
+
|
|
|
// 大会员
|
|
|
- if userInfo.Member.Status > 0 {
|
|
|
- //P303 业主监控 老版大会员权限调整2024.2.4 发版之前的大会员
|
|
|
- if userInfo.Member.StartTime < 1707051600 {
|
|
|
- for i := 0; i < len(userInfo.Member.MemberPowerList); i++ {
|
|
|
- if userInfo.Member.MemberPowerList[i] == 7 {
|
|
|
- userInfo.Member.MemberPowerList = append(userInfo.Member.MemberPowerList, 25) //业主监控专家版500
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- var flag bool
|
|
|
- for i := 0; i < len(userInfo.Member.MemberPowerList); i++ {
|
|
|
- serviceId := userInfo.Member.MemberPowerList[i]
|
|
|
- if c, b := config.Config.FollowCustomer.Member[fmt.Sprintf("%v", serviceId)]; b {
|
|
|
- count = c
|
|
|
- flag = true
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- if !flag {
|
|
|
- count = config.Config.FollowCustomer.Member["default"]
|
|
|
- }
|
|
|
- }
|
|
|
+ //if userInfo.Member.Status > 0 {
|
|
|
+ // //P303 业主监控 老版大会员权限调整2024.2.4 发版之前的大会员
|
|
|
+ // if userInfo.Member.StartTime < 1707051600 {
|
|
|
+ // for i := 0; i < len(userInfo.Member.MemberPowerList); i++ {
|
|
|
+ // if userInfo.Member.MemberPowerList[i] == 7 {
|
|
|
+ // userInfo.Member.MemberPowerList = append(userInfo.Member.MemberPowerList, 25) //业主监控专家版500
|
|
|
+ // break
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // var flag bool
|
|
|
+ // for i := 0; i < len(userInfo.Member.MemberPowerList); i++ {
|
|
|
+ // serviceId := userInfo.Member.MemberPowerList[i]
|
|
|
+ // if c, b := config.Config.FollowCustomer.Member[fmt.Sprintf("%v", serviceId)]; b {
|
|
|
+ // count = c
|
|
|
+ // flag = true
|
|
|
+ // break
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if !flag {
|
|
|
+ // count = config.Config.FollowCustomer.Member["default"]
|
|
|
+ // }
|
|
|
+ //}
|
|
|
// 商机管理
|
|
|
if userInfo.Entniche.Status > 0 && userInfo.Entniche.PowerSource < 1 {
|
|
|
// 新商机管理
|
|
@@ -224,7 +224,8 @@ func getCustomerLimit(userInfo *powercheck.CheckResp) (count int, limitStatus in
|
|
|
}
|
|
|
} else if config.Config.FollowCustomer.Ent.Old > count {
|
|
|
// 旧商机管理
|
|
|
- count = config.Config.FollowCustomer.Ent.Old
|
|
|
+ //count = config.Config.FollowCustomer.Ent.Old
|
|
|
+ count = 0
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -235,19 +236,17 @@ func getCustomerLimit(userInfo *powercheck.CheckResp) (count int, limitStatus in
|
|
|
}
|
|
|
}
|
|
|
// 超级订阅
|
|
|
- if userInfo.Vip.Status > 0 {
|
|
|
- // 新超级订阅
|
|
|
- if userInfo.Vip.Upgrade > 0 {
|
|
|
- if config.Config.FollowCustomer.Vip.New > count {
|
|
|
- limitStatus = 1
|
|
|
- count = config.Config.FollowCustomer.Vip.New
|
|
|
- }
|
|
|
- } else if config.Config.FollowCustomer.Vip.Old > count {
|
|
|
- // 旧超级订阅
|
|
|
- limitStatus = 1
|
|
|
- count = config.Config.FollowCustomer.Vip.Old
|
|
|
- }
|
|
|
- }
|
|
|
+ //if userInfo.Vip.Status > 0 {
|
|
|
+ // // 新超级订阅
|
|
|
+ // if userInfo.Vip.Upgrade > 0 {
|
|
|
+ // if config.Config.FollowCustomer.Vip.New > count {
|
|
|
+ // count = config.Config.FollowCustomer.Vip.New
|
|
|
+ // }
|
|
|
+ // } else if config.Config.FollowCustomer.Vip.Old > count {
|
|
|
+ // // 旧超级订阅
|
|
|
+ // count = config.Config.FollowCustomer.Vip.Old
|
|
|
+ // }
|
|
|
+ //}
|
|
|
return
|
|
|
}
|
|
|
|