|
@@ -84,12 +84,10 @@ func freeSet(area, district map[string]interface{}, industry []string, userId st
|
|
|
})
|
|
|
config.Middleground.PowerCheckCenter.DelCheckRedis("10000", qutil.Int64All(positionId))
|
|
|
|
|
|
- if !FreeSubChange(userId, &area, &district, industry, ppb, isfirst, gconv.Bool(sessionMap["isHelpSub"])) {
|
|
|
+ if !FreeSubChange(userId, &area, &district, industry, ppb, isfirst, sessionMap) {
|
|
|
return &FuncResult{false, errors.New("保存修改出错"), nil}
|
|
|
} else if issetredis { //更新调整次数 非全国(第一次 不消耗次数)
|
|
|
//优先使用省份订阅包次数
|
|
|
- // log.Println(areacount, "---", ppnum)
|
|
|
- // log.Println(jy.BaseAreaNum, "---", fpnum)
|
|
|
if !isHelpSub {
|
|
|
if ppb {
|
|
|
if areacount+jy.BaseAreaNum > ppnum {
|
|
@@ -111,7 +109,7 @@ func freeSet(area, district map[string]interface{}, industry []string, userId st
|
|
|
}
|
|
|
|
|
|
// 免费用户地区调整
|
|
|
-func FreeSubChange(userId string, area, district *map[string]interface{}, industry []string, ppb, isfirst, isHelpSub bool) bool {
|
|
|
+func FreeSubChange(userId string, area, district *map[string]interface{}, industry []string, ppb bool, sessionMap map[string]interface{}) bool {
|
|
|
setMap := map[string]interface{}{
|
|
|
"o_jy.o_area": area, //设置地区
|
|
|
"o_jy.o_district": district, //设置地区
|
|
@@ -123,8 +121,8 @@ func FreeSubChange(userId string, area, district *map[string]interface{}, indust
|
|
|
"o_jy.i_newfree": 1, //老免费用户=>新订阅设置页面 20211122
|
|
|
}
|
|
|
}
|
|
|
- if isHelpSub {
|
|
|
- setMap["i_ts_guide"] = 1
|
|
|
+ if gconv.Bool(sessionMap["isHelpSub"]) {
|
|
|
+ setMap["i_ts_guide"] = FreeIsInTsGuide(userId)
|
|
|
}
|
|
|
updateOk := config.Compatible.Update(userId, map[string]interface{}{
|
|
|
"$set": setMap,
|