|
@@ -1,35 +1,35 @@
|
|
|
package entity
|
|
|
|
|
|
import (
|
|
|
- "fmt"
|
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
|
"jy/src/jfw/modules/publicapply/src/config"
|
|
|
)
|
|
|
|
|
|
// FreeIsInTsGuide 2有向导 1跳过向导
|
|
|
-func FreeIsInTsGuide(userid string) int {
|
|
|
+// changeType 1修改订阅次 2设置修改城市
|
|
|
+func FreeIsInTsGuide(userid string, changeType int) int {
|
|
|
data := config.Compatible.Select(userid, `{"o_jy":1,"i_ts_guide":1,"l_registedate":1}`)
|
|
|
if data == nil || len(*data) == 0 {
|
|
|
return 0
|
|
|
}
|
|
|
- fmt.Printf("FreeIsInTsGuide %v %+v", userid, data)
|
|
|
+ //fmt.Printf("FreeIsInTsGuide %v %+v", userid, data)
|
|
|
var (
|
|
|
o_jy = gconv.Map((*data)["o_jy"])
|
|
|
i_ts_guide = gconv.Int64((*data)["i_ts_guide"])
|
|
|
a_key = gconv.Interfaces(o_jy["a_key"])
|
|
|
o_area = gconv.Map(o_jy["o_area"])
|
|
|
)
|
|
|
- fmt.Printf("FreeIsInTsGuide %v \ni_ts_guide:%v \n len(o_jy) == 0:%v\n a_key == nil || len(a_key) == 0 :%v\n o_area == nil || len(o_area) == 0: %v", userid, i_ts_guide, len(o_jy) == 0, a_key == nil || len(a_key) == 0, o_area == nil || len(o_area) == 0)
|
|
|
+ //fmt.Printf("FreeIsInTsGuide %v \ni_ts_guide:%v \n len(o_jy) == 0:%v\n a_key == nil || len(a_key) == 0 :%v\n o_area == nil || len(o_area) == 0: %v", userid, i_ts_guide, len(o_jy) == 0, a_key == nil || len(a_key) == 0, o_area == nil || len(o_area) == 0)
|
|
|
if i_ts_guide == 1 {
|
|
|
return 0
|
|
|
}
|
|
|
if len(o_jy) == 0 {
|
|
|
return 2
|
|
|
}
|
|
|
- if a_key == nil || len(a_key) == 0 {
|
|
|
+ if (a_key == nil || len(a_key) == 0) && changeType != 1 {
|
|
|
return 2
|
|
|
}
|
|
|
- if o_area == nil || len(o_area) == 0 {
|
|
|
+ if (o_area == nil || len(o_area) == 0) && changeType != 2 {
|
|
|
return 2
|
|
|
}
|
|
|
return 1
|