|
@@ -75,8 +75,10 @@ func freeSet(area map[string]interface{}, industry []string, userId string) *Fun
|
|
|
// log.Println(areacount, "---", ppnum)
|
|
|
// log.Println(jy.BaseAreaNum, "---", fpnum)
|
|
|
if ppb {
|
|
|
- if areacount > ppnum {
|
|
|
+ if areacount+jy.BaseAreaNum > ppnum {
|
|
|
redis.Put(jy.PowerCacheDb, fmt.Sprintf(jy.UserUpdateAreaKey, userId, ym), ppnum+1, 31*24*60*60)
|
|
|
+ } else {
|
|
|
+ log.Println(fmt.Sprintf("免费用户购买省份订阅包设置地区 扣除次数异常 userId:%s", userId))
|
|
|
}
|
|
|
} else if jy.BaseAreaNum > fpnum {
|
|
|
redis.Put(jy.PowerCacheDb, fmt.Sprintf(jy.UserUpdateAreaKey, userId, year), fpnum+1, 365*24*60*60)
|