|
@@ -42,14 +42,14 @@ func (s *Subscribe) FreeUserSubscribe() {
|
|
|
var isVip, isMember, isEntNiche, isEntNicheNew, iPpStatus, searchPrompt, promptBool, isAreaConfig bool
|
|
|
userId := qutil.ObjToString(s.GetSession("userId"))
|
|
|
if userId == "" {
|
|
|
- fmt.Println("用户未登录,搜索词不进行校验")
|
|
|
+ log.Println("用户未登录,搜索词不进行校验")
|
|
|
s.ServeJson(Result{Data: M{"prompt": false, "areaSet": false, "freeArea": false}})
|
|
|
return
|
|
|
}
|
|
|
t := time.Now()
|
|
|
redisKey := fmt.Sprintf("%d_%s_%d_freeSubscription_%s", t.Year(), t.Month(), t.Day(), userId)
|
|
|
bigMsg := jy.GetBigVipUserBaseMsg(s.Session(), *config.Middleground)
|
|
|
- res := config.Compatible.Select(userId, `{"i_vip_status":1,"i_member_status":1,"s_m_phone":1,"s_phone":1,"o_jy":1,""l_search_prompt":1}`)
|
|
|
+ res := config.Compatible.Select(userId, `{"i_vip_status":1,"i_member_status":1,"s_m_phone":1,"s_phone":1,"o_jy":1,"l_search_prompt":1}`)
|
|
|
isVip = qutil.IntAll((*res)["i_vip_status"]) > 0
|
|
|
oJy, _ := (*res)["o_jy"].(map[string]interface{})
|
|
|
//oJy, _ := (*res)["o_jy"].(map[string]interface{})
|
|
@@ -223,7 +223,7 @@ func (s *Subscribe) Key_update() {
|
|
|
s.ServeJson(r)
|
|
|
}
|
|
|
|
|
|
-//修改地区
|
|
|
+// 修改地区
|
|
|
func (s *Subscribe) Area_update() {
|
|
|
r := func() Result {
|
|
|
area := map[string]interface{}{}
|
|
@@ -243,7 +243,7 @@ func (s *Subscribe) Area_update() {
|
|
|
s.ServeJson(r)
|
|
|
}
|
|
|
|
|
|
-//修改信息类型设置
|
|
|
+// 修改信息类型设置
|
|
|
func (s *Subscribe) Infotype_update() {
|
|
|
r := func() Result {
|
|
|
infotype_map := map[string]interface{}{}
|
|
@@ -267,7 +267,7 @@ func (s *Subscribe) Infotype_update() {
|
|
|
s.ServeJson(r)
|
|
|
}
|
|
|
|
|
|
-//修改采购单位行业设置
|
|
|
+// 修改采购单位行业设置
|
|
|
func (s *Subscribe) Buyerclass_update() {
|
|
|
r := func() Result {
|
|
|
buyerclass_map := map[string]interface{}{}
|
|
@@ -291,7 +291,7 @@ func (s *Subscribe) Buyerclass_update() {
|
|
|
s.ServeJson(r)
|
|
|
}
|
|
|
|
|
|
-//修改项目匹配
|
|
|
+// 修改项目匹配
|
|
|
func (s *Subscribe) Projectmatch_update() {
|
|
|
r := func() Result {
|
|
|
projectmatch, _ := s.GetInteger("projectmatch")
|
|
@@ -303,7 +303,7 @@ func (s *Subscribe) Projectmatch_update() {
|
|
|
s.ServeJson(r)
|
|
|
}
|
|
|
|
|
|
-//修改“其他”采购单位行业
|
|
|
+// 修改“其他”采购单位行业
|
|
|
func (s *Subscribe) Otherbuyclass_update() {
|
|
|
r := func() Result {
|
|
|
otherbuyclass, _ := s.GetInteger("otherbuyclass")
|
|
@@ -315,7 +315,7 @@ func (s *Subscribe) Otherbuyclass_update() {
|
|
|
s.ServeJson(r)
|
|
|
}
|
|
|
|
|
|
-//匹配方式
|
|
|
+// 匹配方式
|
|
|
func (s *Subscribe) Matchtype_update() {
|
|
|
r := func() Result {
|
|
|
matchtype, _ := s.GetInteger("matchtype")
|
|
@@ -327,7 +327,7 @@ func (s *Subscribe) Matchtype_update() {
|
|
|
s.ServeJson(r)
|
|
|
}
|
|
|
|
|
|
-//推送预览
|
|
|
+// 推送预览
|
|
|
func (s *Subscribe) GetPushView() {
|
|
|
r := func() Result {
|
|
|
userId, _ := s.GetSession("userId").(string)
|
|
@@ -396,7 +396,7 @@ func (s *Subscribe) GetPushView() {
|
|
|
s.ServeJson(Result{Data: M{"status": 1}})
|
|
|
}*/
|
|
|
|
|
|
-//判断同一个数组是否重复
|
|
|
+// 判断同一个数组是否重复
|
|
|
func isRepeat(slice1 []string) bool {
|
|
|
m := make(map[string]int)
|
|
|
for _, v := range slice1 {
|
|
@@ -408,7 +408,7 @@ func isRepeat(slice1 []string) bool {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
-//修改订阅信息 parameter_name参数名 parameter参数
|
|
|
+// 修改订阅信息 parameter_name参数名 parameter参数
|
|
|
func (s *Subscribe) UpdateSub(parameter_name string, parameter interface{}) bool {
|
|
|
ok := false
|
|
|
ok = config.Compatible.Update(qutil.ObjToString(s.GetSession("userId")), map[string]interface{}{
|