|
@@ -7,7 +7,6 @@ import (
|
|
|
"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
- "github.com/gogf/gf/v2/frame/g"
|
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
|
"jy/src/jfw/modules/publicapply/src/config"
|
|
|
"jy/src/jfw/modules/publicapply/src/db"
|
|
@@ -113,23 +112,24 @@ 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 {
|
|
|
- setMap := map[string]interface{}{"$set": map[string]interface{}{
|
|
|
+ updateMap := map[string]interface{}{}
|
|
|
+ setMap := map[string]interface{}{
|
|
|
"o_jy.o_area": area, //设置地区
|
|
|
"o_jy.o_district": district, //设置地区
|
|
|
"o_jy.i_newfree": 1, //老免费用户=>新订阅设置页面 20211122
|
|
|
- }}
|
|
|
+ }
|
|
|
if ppb {
|
|
|
- setMap = map[string]interface{}{"$set": map[string]interface{}{
|
|
|
+ setMap = map[string]interface{}{
|
|
|
"o_jy.o_area_p": area, //设置地区
|
|
|
"o_jy.i_newfree": 1, //老免费用户=>新订阅设置页面 20211122
|
|
|
- }}
|
|
|
+ }
|
|
|
}
|
|
|
if isHelpSub {
|
|
|
setMap["i_ts_guide"] = 1
|
|
|
}
|
|
|
- g.Dump(userId, setMap)
|
|
|
- fmt.Printf("%s -%+v", userId, setMap)
|
|
|
- updateOk := config.Compatible.Update(userId, setMap)
|
|
|
+ updateOk := config.Compatible.Update(userId, map[string]interface{}{
|
|
|
+ "$set": updateMap,
|
|
|
+ })
|
|
|
if !updateOk {
|
|
|
return false
|
|
|
}
|