浏览代码

wip:提交

wkyuer 2 周之前
父节点
当前提交
cfa3aae4b4

+ 1 - 1
src/jfw/modules/publicapply/src/subscribe/service/service.go

@@ -63,7 +63,7 @@ func (this *ServiceStruct) SubscribeMsg() {
 			return Result{Data: nil, Error_msg: Error_msg_1005}
 		}
 		//校验是否剑鱼员工
-		if entId == g.Cfg().MustGet(this.Request.Context(), "powerEntId", 25917).Int64() {
+		if entId == g.Cfg().MustGet(this.Request.Context(), "powerEntId", 25917).Int64() && strings.Index(this.Refer(), "/free/help/set_subscribe") > -1 {
 			if helpUserId := this.Cookie("usrDewkYanV3"); helpUserId != "" {
 				if identityInfo := util.HelpSubscribeDecode(helpUserId); identityInfo.UserId != "" {
 					userId = identityInfo.UserId

+ 1 - 2
src/jfw/modules/publicapply/src/subscribePush/entity/setting.go

@@ -112,7 +112,6 @@ 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 {
-	updateMap := map[string]interface{}{}
 	setMap := map[string]interface{}{
 		"o_jy.o_area":     area,     //设置地区
 		"o_jy.o_district": district, //设置地区
@@ -128,7 +127,7 @@ func FreeSubChange(userId string, area, district *map[string]interface{}, indust
 		setMap["i_ts_guide"] = 1
 	}
 	updateOk := config.Compatible.Update(userId, map[string]interface{}{
-		"$set": updateMap,
+		"$set": setMap,
 	})
 	if !updateOk {
 		return false

+ 2 - 2
src/jfw/modules/publicapply/src/subscribePush/service/subscribe.go

@@ -33,7 +33,7 @@ func (s *Subscribe) Update() {
 		vSwitch    = s.GetString("vSwitch")
 	)
 	//校验是否剑鱼员工
-	if ent_id == g.Cfg().MustGet(s.Request.Context(), "powerEntId", 25917).Int() {
+	if ent_id == g.Cfg().MustGet(s.Request.Context(), "powerEntId", 25917).Int() && strings.Index(s.Refer(), "/free/help/set_subscribe") > -1 {
 		if helpUserId := s.Cookie("usrDewkYanV3"); helpUserId != "" {
 			if identityInfo := util.HelpSubscribeDecode(helpUserId); identityInfo.UserId != "" {
 				userId = identityInfo.UserId
@@ -88,7 +88,7 @@ func (s *Subscribe) SetUserInfo() {
 		sessionMap = s.Session().GetMultiple()
 	)
 	//校验是否剑鱼员工
-	if entId == g.Cfg().MustGet(s.Request.Context(), "powerEntId", 25917).Int() {
+	if entId == g.Cfg().MustGet(s.Request.Context(), "powerEntId", 25917).Int() && strings.Index(s.Refer(), "/free/help/set_subscribe") > -1 {
 		if helpUserId := s.Cookie("usrDewkYanV3"); helpUserId != "" {
 			if identityInfo := util.HelpSubscribeDecode(helpUserId); identityInfo.UserId != "" {
 				userId = identityInfo.UserId