瀏覽代碼

Merge branch 'master' into feature/v1.1.63

yuelujie 7 月之前
父節點
當前提交
4411e63746

+ 1 - 0
go.mod

@@ -153,3 +153,4 @@ require (
 	sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
 	sigs.k8s.io/yaml v1.3.0 // indirect
 )
+replace github.com/go-xorm/xorm v0.7.9 => gitea.com/xorm/xorm v0.7.9

+ 34 - 18
jyBXSubscribe/api/bxsubscribe.api

@@ -3,8 +3,6 @@ syntax = "v1"
 info (
 	title:  "剑鱼标讯" // TODO: add title
 	desc:   "订阅模块" // TODO: add description
-	author: "wangshan"
-	email:  "wangshan@topnet.net.cn"
 )
 
 type (
@@ -54,6 +52,21 @@ type (
 		PositionType string `header:"positionType,optional"`
 		PositionId   string `header:"positionId,optional"`
 	}
+	saveTsGuideReq {
+		AppId        string   `header:"appId"`
+		UserType     string   `path:"userType"`
+		UserId       string   `header:"userId,optional"`
+		NewUserId    string   `header:"newUserId,optional"`
+		EntId        string   `header:"entId,optional"`
+		AccountId    string   `header:"accountId,optional"`
+		PositionType string   `header:"positionType,optional"`
+		PositionId   string   `header:"positionId,optional"`
+		Area         string   `json:"area"`                // 省份、城市  格式  {"福建" : ["福州市","厦门市",]}
+		District     string   `json:"district,optional"`   // 区县 格式  {"莆田市" : ["城厢区","荔城区","秀屿区","仙游县"]}
+		Keywords     []string `json:"keywords"`            // 关键词 ["关键词1 附加词","关键词2"]
+		AppSwitch    bool     `json:"app_switch,optional"` // app提醒总开关
+
+	}
 	//
 	commonResp {
 		Err_code int64       `json:"error_code"`
@@ -86,6 +99,7 @@ type (
 		ISwitch         int64                    `json:"iSwitch,optional"`
 		Amount          string                   `json:"amount,optional"`
 		Matchmode       string                   `json:"matchmode,optional"`
+		MgoUserId       string                   `header:"mgoUserId,optional"` //原userId
 	}
 	SetReadReq {
 		AppId        string `header:"appId"`
@@ -212,52 +226,54 @@ type (
 service bxsubscribe-api {
 	@handler subscribeList
 	post /jybx/subscribe/:userType/list (subscribeReq) returns (commonResp)
-
+	
 	@handler someInfo
 	post /jybx/subscribe/:userType/someInfo (someInfoReq) returns (commonResp)
-
+	
 	@handler subscribeUpdate
 	post /jybx/subscribe/:userType/update (subscribeUpdateReq) returns (commonResp)
-
+	
 	@handler ByPushHistory
 	post /jybx/subscribe/:userType/byPushHistory (subscribeReq) returns (commonResp)
-
+	
 	@handler SetRead
 	post /jybx/subscribe/:userType/setRead (SetReadReq) returns (commonResp)
-
+	
 	@handler getKey
 	post /jybx/subscribe/:userType/getKey (GetKeyReq) returns (commonResp)
-
+	
 	@handler distributor
 	post /jybx/subscribe/:userType/distributor (DistributorReq) returns (commonResp)
-
+	
 	@handler viewStatus
 	post /jybx/subscribe/:userType/viewStatus (viewStatusReq) returns (commonResp)
-
+	
 	@handler msgDistributor
 	post /jybx/subscribe/msgDistributor (msgDistributor) returns (commonResp)
-
+	
 	@handler getUser //查询用户信息
 	post /jybx/subscribe/getUser (GetUserReq) returns (commonResp)
-
+	
 	@handler setUser //设置用户信息
 	post /jybx/subscribe/setUser (SetUserReq) returns (commonResp)
-
+	
 	@handler getPushSet //推送设置查询
 	post /jybx/subscribe/getPushSet (GetUserReq) returns (commonResp)
-
+	
 	@handler setPushSet //推送设置修改
 	post /jybx/subscribe/setPushSet (SetPushSetReq) returns (commonResp)
-
+	
 	@handler getStaffSubscribeList //查询企业员工订阅状态
 	post /jybx/subscribe/getStaffSubscribe (GetStaffSubscribeListReq) returns (StaffSubscribeCommonResp)
-
+	
 	@handler getStaffSubscribeDetail //查询企业员工订阅详情
 	post /jybx/subscribe/getStaffSubscribeDetail (GetStaffSubscribeDetailReq) returns (StaffSubscribeCommonResp)
-
+	
 	@handler bidDistributor //标讯分发
 	post /jybx/subscribe/bidDistributor (BidDistributor) returns (commonResp)
-
+	
 	@handler bidRecList // 订阅推荐列表
 	post /jybx/subscribe/getRecList (BidRecListReq) returns (commonResp)
+	@handler saveTSGuide  // 保存订阅向导设置信息
+	post /jybx/subscribe/:userType/saveTSGuide (saveTsGuideReq) returns (commonResp)
 }

+ 5 - 0
jyBXSubscribe/api/internal/handler/routes.go

@@ -97,6 +97,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/jybx/subscribe/getRecList",
 				Handler: bidRecListHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/subscribe/:userType/saveTSGuide",
+				Handler: saveTSGuideHandler(serverCtx),
+			},
 		},
 	)
 }

+ 28 - 0
jyBXSubscribe/api/internal/handler/saveTSGuideHandler.go

@@ -0,0 +1,28 @@
+package handler
+
+import (
+	"net/http"
+
+	"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/api/internal/logic"
+	"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/api/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/api/internal/types"
+	"github.com/zeromicro/go-zero/rest/httpx"
+)
+
+func saveTSGuideHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.SaveTsGuideReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.Error(w, err)
+			return
+		}
+
+		l := logic.NewSaveTSGuideLogic(r.Context(), svcCtx)
+		resp, err := l.SaveTSGuide(&req)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 52 - 0
jyBXSubscribe/api/internal/logic/saveTSGuideLogic.go

@@ -0,0 +1,52 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/api/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/api/internal/types"
+	"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/rpc/type/bxsubscribe"
+	"context"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type SaveTSGuideLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewSaveTSGuideLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SaveTSGuideLogic {
+	return &SaveTSGuideLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *SaveTSGuideLogic) SaveTSGuide(req *types.SaveTsGuideReq) (resp *types.CommonResp, err error) {
+	// todo: add your logic here and delete this line
+	_, err = l.svcCtx.Suscribe.SaveTSGuide(l.ctx, &bxsubscribe.SaveTSGuideReq{
+		AppId:        req.AppId,
+		UserType:     req.UserType,
+		UserId:       req.UserId,
+		NewUserId:    req.NewUserId,
+		EntId:        req.EntId,
+		PositionId:   req.PositionId,
+		AccountId:    req.AccountId,
+		PositionType: req.PositionType,
+		Area:         req.Area,
+		District:     req.District,
+		Keywords:     req.Keywords,
+		AppSwitch:    req.AppSwitch,
+	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: -1,
+			Err_msg:  err.Error(),
+			Data:     nil,
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: 0,
+	}, nil
+}

+ 1 - 0
jyBXSubscribe/api/internal/logic/subscribeupdatelogic.go

@@ -65,6 +65,7 @@ func (l *SubscribeUpdateLogic) SubscribeUpdate(req *types.SubscribeUpdateReq) (r
 		BaseUserId:   req.NewUserId,
 		PositionId:   req.PositionId,
 		UserType:     req.UserType,
+		MgoUserId:    req.MgoUserId,
 	})
 	if err != nil {
 		resp.Err_code, resp.Err_msg = -1, "修改失败"

+ 16 - 0
jyBXSubscribe/api/internal/types/types.go

@@ -47,6 +47,21 @@ type SomeInfoReq struct {
 	PositionId   string `header:"positionId,optional"`
 }
 
+type SaveTsGuideReq struct {
+	AppId        string   `header:"appId"`
+	UserType     string   `path:"userType"`
+	UserId       string   `header:"userId,optional"`
+	NewUserId    string   `header:"newUserId,optional"`
+	EntId        string   `header:"entId,optional"`
+	AccountId    string   `header:"accountId,optional"`
+	PositionType string   `header:"positionType,optional"`
+	PositionId   string   `header:"positionId,optional"`
+	Area         string   `json:"area"`                // 省份、城市  格式  {"福建" : ["福州市","厦门市",]}
+	District     string   `json:"district,optional"`   // 区县 格式  {"莆田市" : ["城厢区","荔城区","秀屿区","仙游县"]}
+	Keywords     []string `json:"keywords"`            // 关键词 ["关键词1 附加词","关键词2"]
+	AppSwitch    bool     `json:"app_switch,optional"` // app提醒总开关
+}
+
 type CommonResp struct {
 	Err_code int64       `json:"error_code"`
 	Err_msg  string      `json:"error_msg"`
@@ -78,6 +93,7 @@ type SubscribeUpdateReq struct {
 	ISwitch         int64                    `json:"iSwitch,optional"`
 	Amount          string                   `json:"amount,optional"`
 	Matchmode       string                   `json:"matchmode,optional"`
+	MgoUserId       string                   `header:"mgoUserId,optional"` //原userId
 }
 
 type SetReadReq struct {

+ 26 - 1
jyBXSubscribe/rpc/bxsubscribe.proto

@@ -49,6 +49,7 @@ message subscribeData{
   bool hasNextPage = 2;
   repeated subscribeInfo list = 3;
   string isRecommend = 4;
+  string subListTip = 5;//订阅列表顶部提示信息
 }
 
 message subscribeInfo {
@@ -126,8 +127,15 @@ message SomeInfo{
   bool isRead = 7;//某个通知??是否已读
   repeated string  industry = 8;//会员订阅的行业
   string userId = 9;//用户id
+  SubSetInfo subsetinfo = 10;// 订阅设置信息
 }
 //
+message SubSetInfo {
+    string  area =1;  // 地区
+    string    district = 2;  // 区县
+    repeated string key = 3; // 关键词
+    int64 areacount =4;  // 地区数量限制
+}
 message StatusResp{
   string error_msg = 1;
   int64 error_code = 2;
@@ -146,7 +154,8 @@ message UpdateSubScribeInfoReq{
   int64  PositionType = 3;
   int64 positionId = 4;
   int64 baseUserId = 5;
-  string  userType = 6;
+  string userType = 6;
+  string mgoUserId=7;
 }
 
 //城市
@@ -425,6 +434,20 @@ message BidRecListReq {
   string  entUserId = 5;
   int64  positionType = 6;
 }
+message SaveTSGuideReq {
+  string  appId = 1;
+  string  userId = 2;
+  string  userType = 3;
+  string  newUserId = 4;
+  string  entId = 5;
+  string  accountId = 6;
+  string  positionType = 7;
+  string  positionId = 8;
+  string  area = 9 ; // 省份、城市  格式  {"福建" : ["福州市","厦门市",]}
+  string  district = 10 ;// 区县 格式  {"莆田市" : ["城厢区","荔城区","秀屿区","仙游县"]}
+  repeated string keywords = 11 ; // 关键词 ["关键词1 附加词","关键词2"]
+  bool  appSwitch = 12 ; // app提醒总开关
+}
 
 
 service Bxsubscribe {
@@ -464,4 +487,6 @@ service Bxsubscribe {
   rpc bidDistributor(BidDistributorReq)returns(StatusResp);
   // 订阅推荐列表
   rpc bidRecList(BidRecListReq)returns(SubscribeInfosResp);
+  // 保存订阅向导设置
+  rpc SaveTSGuide(SaveTSGuideReq)returns(StatusResp);
 }

+ 11 - 1
jyBXSubscribe/rpc/bxsubscribe/bxsubscribe.go

@@ -34,6 +34,7 @@ type (
 	List                    = bxsubscribe.List
 	MsgDistributorReq       = bxsubscribe.MsgDistributorReq
 	PushSet                 = bxsubscribe.PushSet
+	SaveTSGuideReq          = bxsubscribe.SaveTSGuideReq
 	SetPushSetReq           = bxsubscribe.SetPushSetReq
 	SetReadReq              = bxsubscribe.SetReadReq
 	SetUserInfoReq          = bxsubscribe.SetUserInfoReq
@@ -46,6 +47,7 @@ type (
 	StaffSubscribeListResp  = bxsubscribe.StaffSubscribeListResp
 	StaffSubscribeReq       = bxsubscribe.StaffSubscribeReq
 	StatusResp              = bxsubscribe.StatusResp
+	SubSetInfo              = bxsubscribe.SubSetInfo
 	Subscribe               = bxsubscribe.Subscribe
 	SubscribeData           = bxsubscribe.SubscribeData
 	SubscribeInfo           = bxsubscribe.SubscribeInfo
@@ -97,6 +99,8 @@ type (
 		BidDistributor(ctx context.Context, in *BidDistributorReq, opts ...grpc.CallOption) (*StatusResp, error)
 		//  订阅推荐列表
 		BidRecList(ctx context.Context, in *BidRecListReq, opts ...grpc.CallOption) (*SubscribeInfosResp, error)
+		//  保存订阅向导设置
+		SaveTSGuide(ctx context.Context, in *SaveTSGuideReq, opts ...grpc.CallOption) (*StatusResp, error)
 	}
 
 	defaultBxsubscribe struct {
@@ -212,8 +216,14 @@ func (m *defaultBxsubscribe) BidDistributor(ctx context.Context, in *BidDistribu
 	return client.BidDistributor(ctx, in, opts...)
 }
 
-// 订阅推荐列表
+//  订阅推荐列表
 func (m *defaultBxsubscribe) BidRecList(ctx context.Context, in *BidRecListReq, opts ...grpc.CallOption) (*SubscribeInfosResp, error) {
 	client := bxsubscribe.NewBxsubscribeClient(m.cli.Conn())
 	return client.BidRecList(ctx, in, opts...)
 }
+
+//  保存订阅向导设置
+func (m *defaultBxsubscribe) SaveTSGuide(ctx context.Context, in *SaveTSGuideReq, opts ...grpc.CallOption) (*StatusResp, error) {
+	client := bxsubscribe.NewBxsubscribeClient(m.cli.Conn())
+	return client.SaveTSGuide(ctx, in, opts...)
+}

+ 4 - 2
jyBXSubscribe/rpc/etc/bxsubscribe.yaml

@@ -2,7 +2,7 @@ Name: bxsubscribe.rpc
 ListenOn: 0.0.0.0:8010
 Etcd:
   Hosts:
-  - 127.0.0.1:2379
+    - 127.0.0.1:2379
   Key: bxsubscribe.rpc
 Timeout: 100000
 Webrpcport: 8013
@@ -23,4 +23,6 @@ EntManageApplication: "entmanageapplication.rpc" #企业管理中台
 AppUrl: "/front/downloadJyApp/qr?page=%&source=%s"
 Nsq: 192.168.3.240:4260
 NsqTopic: jy_event
-Registedate: 1705556502
+Registedate: 1705556502
+GuideRegistedate: 1735034400  #该时间之前注册的付费用户不用进订阅向导
+SubListTip: "-为您预加载最近15天发布的%s商机-"

+ 2 - 0
jyBXSubscribe/rpc/internal/config/config.go

@@ -22,6 +22,8 @@ type Config struct {
 	Nsq                  string
 	NsqTopic             string
 	Registedate          int64
+	GuideRegistedate     int64 // 付费用户判断注册向导的时间
+	SubListTip           string
 }
 
 type Db struct {

+ 6 - 2
jyBXSubscribe/rpc/internal/logic/bidreclistlogic.go

@@ -27,8 +27,12 @@ func NewBidRecListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *BidRec
 
 // 订阅推荐列表
 func (l *BidRecListLogic) BidRecList(in *bxsubscribe.BidRecListReq) (*bxsubscribe.SubscribeInfosResp, error) {
-	var list []*bxsubscribe.SubscribeInfo
-	hasNextPage, total, list := model.NewSubscribePush("").SubRecList(common.ObjToString(common.If(in.PositionType == 0, in.UserId, in.EntUserId)), []model.ViewKeyWord{})
+	var (
+		list        []*bxsubscribe.SubscribeInfo
+		hasNextPage bool
+		total       int64
+	)
+	hasNextPage, total, list = model.NewSubscribePush("").SubRecList(common.ObjToString(common.If(in.PositionType == 0, in.UserId, in.EntUserId)), []model.ViewKeyWord{}, model.PageSize)
 	if len(list) == 0 { // 订阅更多
 		hasNextPage, total, list = model.NewSubscribePush("").GetRecListByEs()
 	}

+ 19 - 6
jyBXSubscribe/rpc/internal/logic/getsublistlogic.go

@@ -33,6 +33,9 @@ func NewGetSubListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetSub
 // GetSubList 获取订阅推送列表
 func (l *GetSubListLogic) GetSubList(in *bxsubscribe.SubscribeInfosReq) (*bxsubscribe.SubscribeInfosResp, error) {
 	start := time.Now().Unix()
+	if in.PageNum <= 0 {
+		in.PageNum = 1
+	}
 	//1、推送信息已读标识
 	//超级订阅 i_apppushunread=0
 	//大会员 i_member_apppushunread=0
@@ -111,7 +114,9 @@ func (l *GetSubListLogic) GetSubList(in *bxsubscribe.SubscribeInfosReq) (*bxsubs
 	if in.UserType == model.EntnicheFlag {
 		spqp.UserId = common.InterfaceToStr(spqp.EntUserId)
 	}
-
+	var (
+		tip string
+	)
 	sp := model.NewSubscribePush(in.UserType)
 	//用户信息
 	bsp := sp.GetUserInfo(spqp)
@@ -120,8 +125,8 @@ func (l *GetSubListLogic) GetSubList(in *bxsubscribe.SubscribeInfosReq) (*bxsubs
 	logx.Info("1、查询数据用户", start1-start)
 	/*
 	 *无推送记录生成推送记录
-	 *免费用户默认推送50条
-	 *大会员、新版商机管理、超级订阅用户 默认推送1000条记录
+	 *免费用户默认推送 50 
+	 *大会员、新版商机管理、超级订阅用户 默认推送 1000 条记录
 	 */
 	isRecommend := "1" //1:老数据 2:历史(clickhouse) 3:新数据
 	if in.PageNum == 1 && spqp.IsEmpty() && (len(list) == 0 || (in.PositionType == 0 && spqp.SubPushInactive == -1)) && in.IsEnt == false {
@@ -129,15 +134,22 @@ func (l *GetSubListLogic) GetSubList(in *bxsubscribe.SubscribeInfosReq) (*bxsubs
 		if in.Stag == "home" {
 			if len(list) == 0 {
 				isRecommend = "2"
-				hasNextPage, total, list = model.NewSubscribePush(in.UserType).SubRecList(common.ObjToString(common.If(in.PositionType == 0, spqp.UserId, spqp.EntUserId)), bsp.Keyword)
+				hasNextPage, total, list = model.NewSubscribePush(in.UserType).SubRecList(common.ObjToString(common.If(in.PositionType == 0, spqp.UserId, spqp.EntUserId)), bsp.Keyword, bsp.Size)
 			}
 			if len(list) == 0 {
 				isRecommend = "3"
 				hasNextPage, total, list = model.NewSubscribePush(in.UserType).GetRecListByEs()
 			}
 		}
+		//P618 增加预加载数据提示:为您预加载最近15天发布的【X】商机
+		//1、首次访问;2、无推送数据;3、数据量满足免费50条,付费用户1000条;4、非活跃用户不参与
+		if len(list) > 0 {
+			tip = fmt.Sprintf(IC.C.SubListTip, "")
+			if total >= int64(bsp.Size) {
+				tip = fmt.Sprintf(IC.C.SubListTip, fmt.Sprintf("%d条", bsp.Size))
+			}
+		}
 	}
-
 	start2 := time.Now().Unix()
 	logx.Info("2、查询数据用户", start2-start1)
 	//查询是否收藏
@@ -149,8 +161,9 @@ func (l *GetSubListLogic) GetSubList(in *bxsubscribe.SubscribeInfosReq) (*bxsubs
 		Data: &bxsubscribe.SubscribeData{
 			List:        list,
 			Count:       total,
-			HasNextPage: hasNextPage,
+			HasNextPage: hasNextPage, //前端没用到这个字段
 			IsRecommend: isRecommend,
+			SubListTip:  tip,
 		},
 	}, nil
 }

+ 110 - 14
jyBXSubscribe/rpc/internal/logic/getsubsomeinfologic.go

@@ -3,9 +3,11 @@ package logic
 import (
 	"app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/redis"
-	"context"
 	IC "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/rpc/init"
+	"context"
+	"fmt"
 	"strconv"
+	"strings"
 	"time"
 
 	"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/rpc/internal/svc"
@@ -29,10 +31,11 @@ func NewGetSubSomeInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
 }
 
 const (
-	SubFreeFlag  = "fType"
-	SubVipFlag   = "vType"
-	MemberFlag   = "mType"
-	EntnicheFlag = "eType"
+	SubFreeFlag     = "fType"
+	SubVipFlag      = "vType"
+	MemberFlag      = "mType"
+	EntnicheFlag    = "eType"
+	tsGuideFinished = 1
 )
 
 // 获取订阅推送相关信息
@@ -48,6 +51,7 @@ func (l *GetSubSomeInfoLogic) GetSubSomeInfo(in *bxsubscribe.SomeInfoReq) (*bxsu
 			IsRead:      false,
 			Industry:    nil,
 			UserId:      "",
+			Subsetinfo:  &bxsubscribe.SubSetInfo{},
 		},
 	}
 	baseUserId, _ := strconv.ParseInt(in.NewUserId, 10, 64)
@@ -109,17 +113,109 @@ func (l *GetSubSomeInfoLogic) GetSubSomeInfo(in *bxsubscribe.SomeInfoReq) (*bxsu
 			}
 			resp.Data.IsPassCount = redis.GetInt("pushcache_2_a", "oncecount_"+todayNum+"_"+in.UserId) >= 150
 		}
-		//是否进入向导查询
-		resp.Data.IsInTSguide = func() bool {
-			//付费用户无免费订阅,不进入订阅向导页面
-			if user.Member.Status > 0 || user.Vip.Status > 0 {
-				return false
+		//  查询订阅信息中的关键词和向导查询
+		var field string
+		switch in.UserType {
+		case SubFreeFlag:
+			field = "o_jy"
+			resp.Data.Subsetinfo.Areacount = 1 // 地区数量
+		case SubVipFlag:
+			field = "o_vipjy"
+			resp.Data.Subsetinfo.Areacount = 1 //  后面查到再修改
+		case MemberFlag:
+			field = "o_member_jy"
+			resp.Data.Subsetinfo.Areacount = -1
+		case EntnicheFlag:
+			field = "o_entniche"
+			resp.Data.Subsetinfo.Areacount = -1
+		}
+		data := IC.Compatible.Select(in.UserId, fmt.Sprintf(`{"%s":1,"i_ts_guide":1,"l_registedate":1}`, field))
+		if data != nil && len(*data) > 0 {
+			subinfo, b := (*data)[field].(map[string]interface{})
+			if b && subinfo != nil {
+				if area, ok := subinfo["o_area"].(map[string]interface{}); ok {
+					resp.Data.Subsetinfo.Area = common.MapToJson(area)
+				}
+				if district, ok := subinfo["o_district"].(map[string]interface{}); ok {
+					resp.Data.Subsetinfo.District = common.MapToJson(district)
+				}
+				switch in.UserType {
+				case SubFreeFlag:
+					resp.Data.Subsetinfo.Key = freegetsubKey(subinfo)
+					// 判断有没有省份订阅包
+					o_buyset_p, o_buyset_p_b := subinfo["o_buyset_p"].(map[string]interface{})
+					if o_buyset_p != nil && o_buyset_p_b {
+						resp.Data.Subsetinfo.Areacount += common.Int64All(o_buyset_p["areacount"])
+						if o_area_p, ok := subinfo["o_area_p"].(map[string]interface{}); ok {
+							resp.Data.Subsetinfo.Area = common.MapToJson(o_area_p)
+						}
+					}
+				case SubVipFlag:
+					o_buyset := common.ObjToMap(subinfo["o_buyset"])
+					if o_buyset != nil {
+						resp.Data.Subsetinfo.Areacount = common.Int64All((*o_buyset)["areacount"])
+					}
+					resp.Data.Subsetinfo.Key = paygetsubKey(subinfo)
+				case MemberFlag:
+					if common.Int64All(subinfo["i_areacount"]) > 0 {
+						resp.Data.Subsetinfo.Areacount = common.Int64All(subinfo["i_areacount"]) // 单省版大会员
+					}
+					resp.Data.Subsetinfo.Key = paygetsubKey(subinfo)
+				case EntnicheFlag:
+					resp.Data.Subsetinfo.Key = paygetsubKey(subinfo)
+				}
 			}
-			if !user.Vip.HasKey {
-				return true
+			registedate := common.Int64All((*data)["l_registedate"])
+			if in.UserType == SubFreeFlag || registedate > IC.C.GuideRegistedate {
+				if common.Int64All((*data)["i_ts_guide"]) != tsGuideFinished { // 判断字段未完成
+					resp.Data.IsInTSguide = true
+				}
 			}
-			return false
-		}()
+		}
 	}
 	return resp, nil
 }
+
+// 处理订阅词
+func freegetsubKey(subinfo map[string]interface{}) (arr []string) {
+	a_key, b := subinfo["a_key"].([]interface{})
+	if !b {
+		return
+	}
+	for i := 0; i < len(a_key); i++ {
+		a_keyi := common.ObjToMap(a_key[i])
+		if a_keyi != nil {
+			a_keyiarr := (*a_keyi)["key"].([]interface{})
+			arr = append(arr, common.ObjToString(a_keyiarr[0]))
+		}
+	}
+	return arr
+}
+func paygetsubKey(subinfo map[string]interface{}) (arr []string) {
+
+	a_items, b := subinfo["a_items"].([]interface{})
+	if !b || len(a_items) == 0 {
+		return
+	}
+	a_items0, b1 := a_items[0].(map[string]interface{})
+	if !b1 {
+		return
+	}
+	a_key, b3 := a_items0["a_key"].([]interface{})
+	if a_key == nil || !b3 {
+		return
+	}
+	for i := 0; i < len(a_key); i++ {
+		a_keyi := common.ObjToMap(a_key[i])
+		if a_keyi != nil {
+			if a_keyiarr, ok := (*a_keyi)["key"].([]interface{}); ok {
+				s := strings.Join(common.ObjArrToStringArr(a_keyiarr), " ")
+				if a_appendkeyiarr, ok := (*a_keyi)["appendkey"].([]interface{}); ok {
+					s += " " + strings.Join(common.ObjArrToStringArr(a_appendkeyiarr), " ")
+				}
+				arr = append(arr, s)
+			}
+		}
+	}
+	return
+}

+ 211 - 0
jyBXSubscribe/rpc/internal/logic/savetsguidelogic.go

@@ -0,0 +1,211 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	IC "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/rpc/init"
+	"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/rpc/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXSubscribe/rpc/type/bxsubscribe"
+	"context"
+	"encoding/json"
+	"errors"
+	"fmt"
+	"regexp"
+	"strconv"
+	"strings"
+	"time"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type SaveTSGuideLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewSaveTSGuideLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SaveTSGuideLogic {
+	return &SaveTSGuideLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 保存订阅向导设置
+func (l *SaveTSGuideLogic) SaveTSGuide(in *bxsubscribe.SaveTSGuideReq) (*bxsubscribe.StatusResp, error) {
+
+	// 校验用户身份
+	baseUserId, _ := strconv.ParseInt(in.NewUserId, 10, 64)
+	accountId, _ := strconv.ParseInt(in.AccountId, 10, 64)
+	positionType, _ := strconv.ParseInt(in.PositionType, 10, 64)
+	positionId, _ := strconv.ParseInt(in.PositionId, 10, 64)
+	entId, _ := strconv.ParseInt(in.EntId, 10, 64)
+	// 校验是否已经完成过订阅向导
+	//  查询订阅信息中的关键词和向导查询
+	data := IC.Compatible.Select(in.UserId, `{"i_ts_guide":1,"l_registedate":1,"o_member_jy":1,"o_jy":1}`)
+	if data != nil && len(*data) > 0 {
+		registedate := common.Int64All((*data)["l_registedate"])
+		if (in.UserType != SubFreeFlag && registedate < IC.C.GuideRegistedate) || common.Int64All((*data)["i_ts_guide"]) == tsGuideFinished {
+			// 已经设置过
+			return nil, errors.New("重复设置向导")
+		}
+	}
+	user := IC.Compatible.Middleground.PowerCheckCenter.Check(in.AppId, in.UserId, baseUserId, accountId, entId, positionType, positionId)
+	if user == nil {
+		return nil, errors.New("身份异常")
+	}
+	var field string
+	countLimit := 0
+	areaCountLimit := 0
+	switch in.UserType {
+	case SubFreeFlag:
+		if !user.Free.IsFree {
+			return nil, errors.New("身份异常")
+		}
+		countLimit = 10
+		field = "o_jy.%s"
+		areaCountLimit = 1 // 免费用户
+		// 省份订阅包
+		o_jy, o_jyb := (*data)["o_jy"].(map[string]interface{})
+		if o_jy != nil && o_jyb {
+			o_buyset_p, o_buyset_p_b := o_jy["o_buyset_p"].(map[string]interface{})
+			if o_buyset_p != nil && o_buyset_p_b {
+				areaCountLimit += common.IntAll(o_buyset_p["areacount"])
+			}
+		}
+	case SubVipFlag:
+		if user.Vip.Status <= 0 {
+			return nil, errors.New("身份异常")
+		}
+		field = "o_vipjy.%s"
+		areaCountLimit = int(user.Vip.Areacount)
+		countLimit = 300
+	case MemberFlag:
+		if user.Member.Status <= 0 {
+			return nil, errors.New("身份异常")
+		}
+		field = "o_member_jy.%s"
+		countLimit = 300
+		areaCountLimit = -1
+		//  判断单省版
+		o_member_jy, o_member_jyb := (*data)["o_member_jy"].(map[string]interface{})
+		if o_member_jy != nil && o_member_jyb {
+			if common.IntAll(o_member_jy["i_areacount"]) > 0 {
+				areaCountLimit = common.IntAll(o_member_jy["i_areacount"])
+			}
+		}
+	case EntnicheFlag:
+		if user.Entniche.Status <= 0 {
+			return nil, errors.New("身份异常")
+		}
+		field = "o_entniche.%s"
+		countLimit = 300
+		areaCountLimit = -1
+
+	}
+	updateMap := map[string]interface{}{}
+	area := map[string]interface{}{}
+	err := json.Unmarshal([]byte(in.Area), &area)
+	//  验证地区数量   //会有没有走过订阅向导买过省份订阅包的情况吗? 暂时不考虑
+	if err != nil {
+		logx.Error("反序列化失败", in.Area, err)
+		return nil, errors.New("地区有误")
+	} else {
+		updateMap[fmt.Sprintf(field, "o_area")] = area
+	}
+	if areaCountLimit > 0 && len(area) > areaCountLimit {
+		return nil, errors.New("地区数量有误")
+	}
+	// 处理地区
+	if in.District != "" {
+		district := map[string]interface{}{}
+		err = json.Unmarshal([]byte(in.District), &district)
+		if err != nil {
+			logx.Error("反序列化失败", in.District, err)
+			return nil, errors.New("地区有误")
+		} else {
+			updateMap[fmt.Sprintf(field, "o_district")] = district
+		}
+	}
+
+	// 处理关键词
+	// 免费 处理掉空格
+	arryMap := []interface{}{}
+	key := []string{}
+	if in.UserType == SubFreeFlag {
+		for i := 0; i < len(in.Keywords); i++ {
+			tmp := processKeyword(in.Keywords[i])
+			if len(tmp) > 0 {
+				arryMap = append(arryMap, map[string]interface{}{"matchway": 1, "key": tmp[0:1], "notkey": nil, "updatetime": time.Now().Unix()})
+			}
+			if len(key) >= countLimit {
+				break
+			}
+		}
+		updateMap[fmt.Sprintf(field, "a_key")] = arryMap
+	} else {
+		// 付费 按一组词
+		for i := 0; i < len(in.Keywords); i++ {
+			tmp := processKeyword(in.Keywords[i])
+			if len(tmp) > 0 {
+				arryMap = append(arryMap, map[string]interface{}{"matchway": 0, "key": tmp, "notkey": nil, "updatetime": time.Now().Unix()})
+			}
+			if len(key) >= countLimit {
+				break
+			}
+		}
+		item := map[string]interface{}{
+			"a_key":      arryMap,
+			"s_item":     "未分类",
+			"updatetime": date.NowFormat(date.Date_Full_Layout),
+		}
+		updateMap[fmt.Sprintf(field, "a_items")] = []map[string]interface{}{item}
+	}
+
+	updateMap[fmt.Sprintf(field, "l_modifydate")] = time.Now().Unix()
+	updateMap["i_ts_guide"] = tsGuideFinished
+	//  判断app提醒总开关是否打开  如果打开 我的订阅APP提醒初始值为“开启”状态。
+	if in.AppSwitch {
+		updateMap["o_pushset.o_subset.i_apppush"] = 1
+	}
+	go SetLog(in.UserId, strings.ReplaceAll(field, ".%s", ""))
+	if !IC.Compatible.Update(in.UserId, map[string]interface{}{
+		"$set": updateMap,
+	}) {
+		logx.Error("设置订阅向导更新失败", in.UserId, updateMap)
+		return nil, errors.New("设置订阅向导更新失败")
+	}
+	go jy.Publish(IC.MgoLog, IC.C.Nsq, IC.C.NsqTopic, "task", in.UserId, jy.Jyweb_node2, map[string]interface{}{
+		"code":       1015, //首次订阅
+		"types":      "subscribeKeyWords",
+		"num":        50,
+		"baseUserId": baseUserId,
+		"positionId": positionId,
+	})
+	return &bxsubscribe.StatusResp{}, nil
+}
+
+// SetLog 订阅设置记录
+func SetLog(userid, types string) {
+	if data := IC.Compatible.Select(userid, `{"o_vipjy":1,"o_member_jy":1,"o_jy":1}`); len(*data) > 0 && data != nil {
+		(*data)["userid"] = userid
+		(*data)["type"] = types
+		(*data)["createtime"] = time.Now().Unix()
+		IC.MgoLog.Save("ovipjy_log", data)
+	}
+}
+
+// 保存入库之前,处理订阅的关键词
+func processKeyword(keyword string) []string {
+	keywordReg := regexp.MustCompile("([\\s\u3000\u2003\u00a0+,,])+")
+	spaceReg := regexp.MustCompile("\\s+")
+	keyword = keywordReg.ReplaceAllString(keyword, " ")
+	keyword = spaceReg.ReplaceAllString(keyword, " ")
+	keyword = strings.Trim(keyword, " ")
+	if keyword == "" {
+		return nil
+	}
+	return strings.Split(keyword, " ")
+}

+ 5 - 0
jyBXSubscribe/rpc/internal/logic/updatesubscribeinfologic.go

@@ -44,8 +44,13 @@ func (l *UpdateSubScribeInfoLogic) UpdateSubScribeInfo(inc *bxsubscribe.UpdateSu
 		BaseUserId:      inc.BaseUserId,
 		MgoLog:          IC.MgoLog,
 		UserType:        inc.UserType,
+		MgoUserId:       inc.MgoUserId,
 	}
 	status, err := subService.Update()
+	//P618:移动端,招标采购搜索列表页 根据搜索关键词和地区信息 完成订阅
+	if subService.Area != nil && len(subService.Items) > 0 {
+		go subService.UpdateGuide()
+	}
 	if err != nil || status == 0 {
 		l.Error(fmt.Sprintf("%+v", in), err.Error())
 		resp.ErrorMsg = err.Error()

+ 8 - 2
jyBXSubscribe/rpc/internal/server/bxsubscribeserver.go

@@ -1,4 +1,4 @@
-// Code generated by goctl. DO NOT EDIT.
+// Code generated by goctl. DO NOT EDIT!
 // Source: bxsubscribe.proto
 
 package server
@@ -124,8 +124,14 @@ func (s *BxsubscribeServer) BidDistributor(ctx context.Context, in *bxsubscribe.
 	return l.BidDistributor(in)
 }
 
-// 订阅推荐列表
+//  订阅推荐列表
 func (s *BxsubscribeServer) BidRecList(ctx context.Context, in *bxsubscribe.BidRecListReq) (*bxsubscribe.SubscribeInfosResp, error) {
 	l := logic.NewBidRecListLogic(ctx, s.svcCtx)
 	return l.BidRecList(in)
 }
+
+//  保存订阅向导设置
+func (s *BxsubscribeServer) SaveTSGuide(ctx context.Context, in *bxsubscribe.SaveTSGuideReq) (*bxsubscribe.StatusResp, error) {
+	l := logic.NewSaveTSGuideLogic(ctx, s.svcCtx)
+	return l.SaveTSGuide(in)
+}

+ 29 - 18
jyBXSubscribe/rpc/model/push.go

@@ -32,7 +32,7 @@ import (
 )
 
 const (
-	pageSize            = 100
+	PageSize            = 100
 	AllSubPushCacheSize = 200
 	query               = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area","city", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext","spidercode","site","buyertel","buyerperson","agency","agencyperson","agencytel","winnerperson","winnertel","signendtime","bidendtime","entidlist","isValidFile","district"],"from":0,"size":%d}`
 	query1              = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area","city", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext","spidercode","site","buyertel","buyerperson","agency","agencyperson","agencytel","winnerperson","winnertel","signendtime","bidendtime","entidlist","isValidFile", "detail","district"],"from":0,"size":%d}`
@@ -328,16 +328,16 @@ func subStrDetail(matchKey, detail string) string {
 	return strings.TrimSpace(detail)
 }
 func (s *subscribePush) Datas(spqp *SubPushQueryParam, bsp *ViewCondition) (hasNextPage bool, total int64, result []*bxsubscribe.SubscribeInfo) {
-	logx.Info(spqp.UserId, spqp.NewUserId, s.ModuleFlag, "subscribePush query param:", "SelectTime:", spqp.SelectTime, "Area:", spqp.Area, "District:", spqp.District, "City:", spqp.City, "Subtype:", spqp.Subtype, "Subscopeclass:", spqp.Subscopeclass, "Buyerclass:", spqp.Buyerclass, "Key:", spqp.Key, "PageNum:", spqp.PageNum, "Price:", spqp.Price, "FileExists:", spqp.FileExists)
+	logx.Info(spqp.UserId, spqp.NewUserId, s.ModuleFlag, "subscribePush query param:", "SelectTime:", spqp.SelectTime, "Area:", spqp.Area, "District:", spqp.District, "City:", spqp.City, "Subtype:", spqp.Subtype, "Subscopeclass:", spqp.Subscopeclass, "Buyerclass:", spqp.Buyerclass, "Key:", spqp.Key, "PageNum:", spqp.PageNum, "Price:", spqp.Price, "FileExists:", spqp.FileExists, "SubPushInactive:", spqp.SubPushInactive)
 	if spqp.UserId == "" {
 		return
 	}
 	if spqp.PageNum < 1 {
 		spqp.PageNum = 1
 	}
-	if spqp.PageSize < 1 || spqp.PageSize > pageSize {
+	if spqp.PageSize <= 1 || spqp.PageSize > PageSize {
 		if !spqp.Export {
-			spqp.PageSize = pageSize
+			spqp.PageSize = PageSize
 		} else { //数据导出查询20000条限制
 			if spqp.PageSize < 1 || spqp.PageSize > 20000 {
 				spqp.PageSize = 20000
@@ -392,6 +392,9 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam, bsp *ViewCondition) (hasN
 		if err != nil || subPush == nil || subPush.Date != nowFormat || len(subPush.Datas) == 0 {
 			list, countSearch := s.getDatasFromMysql(spqp, starttime, endtime, spqp.PageSize, false,
 				common.If(strings.Contains(strings.Join(bsp.SelectType, ","), "detail"), true, false).(bool))
+			if len(list) == 0 {
+				return
+			}
 			subPush = &SubPush{
 				Date:  nowFormat,
 				Datas: list,
@@ -438,7 +441,9 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam, bsp *ViewCondition) (hasN
 			} else {
 				spqp.PageNum = 1
 				list, countSearch = s.getDatasFromMysql(spqp, starttime, endtime, AllSubPushCacheSize, true, common.If(strings.Contains(strings.Join(bsp.SelectType, ","), "detail"), true, false).(bool))
-
+			}
+			if len(list) == 0 {
+				return
 			}
 			allCache = &SubPush{
 				Date:  nowFormat,
@@ -470,7 +475,7 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam, bsp *ViewCondition) (hasN
 		result = []*bxsubscribe.SubscribeInfo{}
 	}
 
-	hasNextPage = len(result) >= spqp.PageSize
+	hasNextPage = total > int64(end)
 	return
 }
 func (s *subscribePush) inactiveQuery(spqp *SubPushQueryParam, bsp *ViewCondition) ([]*bxsubscribe.SubscribeInfo, int64) {
@@ -810,8 +815,10 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		if spqp.FileExists != "" {
 			if spqp.FileExists == "1" {
 				querys = append(querys, fmt.Sprintf("a.attachment_count is not null"))
+				querys = append(querys, fmt.Sprintf("a.attachment_count > 0"))
 			} else if spqp.FileExists == "-1" {
-				querys = append(querys, fmt.Sprintf("a.attachment_count is null"))
+				//querys = append(querys, fmt.Sprintf("a.attachment_count is null"))
+				querys = append(querys, fmt.Sprintf("(a.attachment_count is null OR a.attachment_count = 0)"))
 			}
 		}
 		// 是否已读
@@ -1317,12 +1324,12 @@ const (
 )
 
 // 首次访问推送页面 默认生成推送数据
-// 默认匹配es 7天内数据
+// 默认匹配es 15天内数据
 func (s *subscribePush) DefaultDatas(spqp *SubPushQueryParam, bsp *ViewCondition, userType string) (hasNextPage bool, total int64, result []*bxsubscribe.SubscribeInfo) {
 	if spqp.UserId == "" {
 		return false, 0, nil
 	}
-	logx.Info("userId:", spqp.UserId, "newUserId:", spqp.NewUserId)
+	logx.Info("---userId:", spqp.UserId, "newUserId:", spqp.NewUserId)
 	t1 := time.Now()
 	if len(bsp.Keyword) > 0 {
 		logx.Info("--bsp:", bsp)
@@ -1346,8 +1353,8 @@ func (s *subscribePush) DefaultDatas(spqp *SubPushQueryParam, bsp *ViewCondition
 			logx.Info(time.Since(t1), "mlist count:", len(mlist))
 			total = int64(len(mlist))
 			result = s.listManager(spqp, mlist, bsp.Keyword)
-			if len(result) > pageSize {
-				result = result[:pageSize]
+			if len(result) > PageSize {
+				result = result[:PageSize]
 				hasNextPage = true
 			}
 		}
@@ -1625,7 +1632,7 @@ func (s *subscribePush) getFreeDatasSQL(bsp *ViewCondition, startTime, endTime i
 		}
 	}
 
-	qstr := fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(bools, ","), boolsNum, bidField, startNumb, size)
+	qstr := fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(bools, ","), boolsNum, bidField, startNumb, bsp.Size)
 	logx.Info("----", qstr)
 	return qstr
 }
@@ -2456,8 +2463,9 @@ func (s *SubPushQueryParam) ExportPushFormat() (ids, keyWords []string) {
 // @Author jianghan
 // @Description	clickhouse获取推荐的列表数据
 // @Date 2024/3/11
-func (s *subscribePush) SubRecList(userId string, keyword []ViewKeyWord) (hasNextPage bool, total int64, resultList []*bxsubscribe.SubscribeInfo) {
-	infos := IC.BaseServiceMysql.SelectBySql(`select autoid from push.sub_recommend_list where userid=? order by create_time desc limit ?`, userId, pageSize)
+// 根据用户身份获取数据量:免费50,付费1000
+func (s *subscribePush) SubRecList(userId string, keyword []ViewKeyWord, size int) (hasNextPage bool, total int64, resultList []*bxsubscribe.SubscribeInfo) {
+	infos := IC.BaseServiceMysql.SelectBySql(`select autoid from push.sub_recommend_list where userid=? order by create_time desc limit ?`, userId, PageSize)
 	ids := []int64{}
 	if infos != nil && len(*infos) > 0 {
 		for _, v := range *infos {
@@ -2468,9 +2476,12 @@ func (s *subscribePush) SubRecList(userId string, keyword []ViewKeyWord) (hasNex
 		length := len(ids)
 		resultList = []*bxsubscribe.SubscribeInfo{}
 		esq := `{"query": {"bool": {"must": [{"terms": {"autoid": [` + strings.Join(gconv.Strings(ids), ",") + ` ]}}]}}}`
-		binfo := elastic.GetAllByNgram(INDEX, TYPE, esq, findfields, bidSort, bidField, 0, pageSize, length, false)
+		binfo := elastic.GetAllByNgram(INDEX, TYPE, esq, findfields, bidSort, bidField, 0, size, length, false)
 		if binfo != nil && len(*binfo) > 0 {
-			for _, m := range *binfo {
+			for n, m := range *binfo {
+				if n > PageSize {
+					break
+				}
 				title := strings.Replace(common.ObjToString(m["title"]), " ", "", -1)
 				matchkeys := getKeys(title, keyword)
 				resultList = append(resultList, s.InfoFormat(&PushCa{
@@ -2516,8 +2527,8 @@ func (s *subscribePush) GetRecListByEs() (hasNextPage bool, total int64, resultL
 		}
 	}
 	total = int64(len(resultList))
-	if total > pageSize {
-		resultList = resultList[:pageSize]
+	if total > PageSize {
+		resultList = resultList[:PageSize]
 		hasNextPage = true
 	}
 	return

+ 12 - 0
jyBXSubscribe/rpc/model/service/subscribe.go

@@ -11,6 +11,7 @@ import (
 	"fmt"
 	"github.com/gogf/gf/v2/util/gconv"
 	"github.com/zeromicro/go-zero/core/logx"
+	"log"
 	"strconv"
 	"strings"
 	"time"
@@ -26,6 +27,7 @@ type SubseribeService struct {
 	BaseUserId int64
 	MgoLog     mongodb.MongodbSim
 	UserType   string
+	MgoUserId  string
 }
 
 // @description  	订阅设置相关修改
@@ -184,3 +186,13 @@ func GetKeyWordLen(a_items []map[string]interface{}) (count int) {
 	}
 	return
 }
+
+// 更新订阅向导标识
+func (s *SubseribeService) UpdateGuide() {
+	if s.UserId != "" {
+		ok := IC.Compatible.Update(s.UserId, map[string]interface{}{"$set": map[string]interface{}{"i_ts_guide": 1}})
+		if !ok {
+			log.Println("update guide false", s.UserId)
+		}
+	}
+}

File diff suppressed because it is too large
+ 201 - 103
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go


+ 110 - 95
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe_grpc.pb.go

@@ -1,11 +1,9 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
-// - protoc-gen-go-grpc v1.3.0
-// - protoc             v3.15.1
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v3.19.4
 // source: bxsubscribe.proto
 
-//import "google/protobuf/struct.proto";
-
 package bxsubscribe
 
 import (
@@ -20,67 +18,48 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
-const (
-	Bxsubscribe_GetSubList_FullMethodName              = "/bxsubscribe.Bxsubscribe/GetSubList"
-	Bxsubscribe_GetSubSomeInfo_FullMethodName          = "/bxsubscribe.Bxsubscribe/GetSubSomeInfo"
-	Bxsubscribe_UpdateSubScribeInfo_FullMethodName     = "/bxsubscribe.Bxsubscribe/UpdateSubScribeInfo"
-	Bxsubscribe_ByPushHistory_FullMethodName           = "/bxsubscribe.Bxsubscribe/ByPushHistory"
-	Bxsubscribe_SetRead_FullMethodName                 = "/bxsubscribe.Bxsubscribe/SetRead"
-	Bxsubscribe_GetKey_FullMethodName                  = "/bxsubscribe.Bxsubscribe/GetKey"
-	Bxsubscribe_GetSubScribeInfo_FullMethodName        = "/bxsubscribe.Bxsubscribe/GetSubScribeInfo"
-	Bxsubscribe_MsgDistributor_FullMethodName          = "/bxsubscribe.Bxsubscribe/MsgDistributor"
-	Bxsubscribe_GetDistributor_FullMethodName          = "/bxsubscribe.Bxsubscribe/GetDistributor"
-	Bxsubscribe_GetViewStatus_FullMethodName           = "/bxsubscribe.Bxsubscribe/GetViewStatus"
-	Bxsubscribe_UserInfo_FullMethodName                = "/bxsubscribe.Bxsubscribe/userInfo"
-	Bxsubscribe_SetUser_FullMethodName                 = "/bxsubscribe.Bxsubscribe/setUser"
-	Bxsubscribe_GetPushSet_FullMethodName              = "/bxsubscribe.Bxsubscribe/getPushSet"
-	Bxsubscribe_SetPushSet_FullMethodName              = "/bxsubscribe.Bxsubscribe/setPushSet"
-	Bxsubscribe_GetStaffSubscribeList_FullMethodName   = "/bxsubscribe.Bxsubscribe/getStaffSubscribeList"
-	Bxsubscribe_GetStaffSubscribeDetail_FullMethodName = "/bxsubscribe.Bxsubscribe/getStaffSubscribeDetail"
-	Bxsubscribe_BidDistributor_FullMethodName          = "/bxsubscribe.Bxsubscribe/bidDistributor"
-	Bxsubscribe_BidRecList_FullMethodName              = "/bxsubscribe.Bxsubscribe/bidRecList"
-)
-
 // BxsubscribeClient is the client API for Bxsubscribe service.
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
 type BxsubscribeClient interface {
-	// 获取订阅推送列表
+	//获取订阅推送列表
 	GetSubList(ctx context.Context, in *SubscribeInfosReq, opts ...grpc.CallOption) (*SubscribeInfosResp, error)
-	// 获取订阅推送相关信息
+	//获取订阅推送相关信息
 	GetSubSomeInfo(ctx context.Context, in *SomeInfoReq, opts ...grpc.CallOption) (*SomeInfoResp, error)
-	// 修改订阅信息接口
+	//修改订阅信息接口
 	UpdateSubScribeInfo(ctx context.Context, in *UpdateSubScribeInfoReq, opts ...grpc.CallOption) (*StatusResp, error)
-	// 推送页面筛选导出
+	//推送页面筛选导出
 	ByPushHistory(ctx context.Context, in *SubscribeInfosReq, opts ...grpc.CallOption) (*ByPushHistoryResp, error)
-	// 推送数据浏览状态修改
+	//推送数据浏览状态修改
 	SetRead(ctx context.Context, in *SetReadReq, opts ...grpc.CallOption) (*StatusResp, error)
-	// 关键词获取
+	//关键词获取
 	GetKey(ctx context.Context, in *GetKeyReq, opts ...grpc.CallOption) (*KeyResp, error)
-	// 订阅设置获取
+	//订阅设置获取
 	GetSubScribeInfo(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserResq, error)
-	// 信息分发
+	//信息分发
 	MsgDistributor(ctx context.Context, in *MsgDistributorReq, opts ...grpc.CallOption) (*StatusResp, error)
-	// 手动分发人员查询
+	//手动分发人员查询
 	GetDistributor(ctx context.Context, in *GetDistributorReq, opts ...grpc.CallOption) (*DistributorResp, error)
-	// 查看状态
+	//查看状态
 	GetViewStatus(ctx context.Context, in *GetViewStatusReq, opts ...grpc.CallOption) (*ViewStatusResp, error)
-	// 用户推送信息查看
+	//用户推送信息查看
 	UserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResq, error)
-	// 用户邮箱保存
+	//用户邮箱保存
 	SetUser(ctx context.Context, in *SetUserInfoReq, opts ...grpc.CallOption) (*StatusResp, error)
-	// 用户推送设置查看
+	//用户推送设置查看
 	GetPushSet(ctx context.Context, in *GetPushSetReq, opts ...grpc.CallOption) (*GetPushSetResp, error)
-	// 用户推送设置修改
+	//用户推送设置修改
 	SetPushSet(ctx context.Context, in *SetPushSetReq, opts ...grpc.CallOption) (*StatusResp, error)
-	// 查看企业员工用户订阅
+	//查看企业员工用户订阅
 	GetStaffSubscribeList(ctx context.Context, in *StaffSubscribeReq, opts ...grpc.CallOption) (*StaffSubscribeListResp, error)
-	// 查看企业员工用户订阅详情
+	//查看企业员工用户订阅详情
 	GetStaffSubscribeDetail(ctx context.Context, in *StaffSubscribeDetailReq, opts ...grpc.CallOption) (*StaffSubscribeDetail, error)
-	// 标讯信息分发
+	//标讯信息分发
 	BidDistributor(ctx context.Context, in *BidDistributorReq, opts ...grpc.CallOption) (*StatusResp, error)
 	// 订阅推荐列表
 	BidRecList(ctx context.Context, in *BidRecListReq, opts ...grpc.CallOption) (*SubscribeInfosResp, error)
+	// 保存订阅向导设置
+	SaveTSGuide(ctx context.Context, in *SaveTSGuideReq, opts ...grpc.CallOption) (*StatusResp, error)
 }
 
 type bxsubscribeClient struct {
@@ -93,7 +72,7 @@ func NewBxsubscribeClient(cc grpc.ClientConnInterface) BxsubscribeClient {
 
 func (c *bxsubscribeClient) GetSubList(ctx context.Context, in *SubscribeInfosReq, opts ...grpc.CallOption) (*SubscribeInfosResp, error) {
 	out := new(SubscribeInfosResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_GetSubList_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/GetSubList", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -102,7 +81,7 @@ func (c *bxsubscribeClient) GetSubList(ctx context.Context, in *SubscribeInfosRe
 
 func (c *bxsubscribeClient) GetSubSomeInfo(ctx context.Context, in *SomeInfoReq, opts ...grpc.CallOption) (*SomeInfoResp, error) {
 	out := new(SomeInfoResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_GetSubSomeInfo_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/GetSubSomeInfo", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -111,7 +90,7 @@ func (c *bxsubscribeClient) GetSubSomeInfo(ctx context.Context, in *SomeInfoReq,
 
 func (c *bxsubscribeClient) UpdateSubScribeInfo(ctx context.Context, in *UpdateSubScribeInfoReq, opts ...grpc.CallOption) (*StatusResp, error) {
 	out := new(StatusResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_UpdateSubScribeInfo_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/UpdateSubScribeInfo", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -120,7 +99,7 @@ func (c *bxsubscribeClient) UpdateSubScribeInfo(ctx context.Context, in *UpdateS
 
 func (c *bxsubscribeClient) ByPushHistory(ctx context.Context, in *SubscribeInfosReq, opts ...grpc.CallOption) (*ByPushHistoryResp, error) {
 	out := new(ByPushHistoryResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_ByPushHistory_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/ByPushHistory", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -129,7 +108,7 @@ func (c *bxsubscribeClient) ByPushHistory(ctx context.Context, in *SubscribeInfo
 
 func (c *bxsubscribeClient) SetRead(ctx context.Context, in *SetReadReq, opts ...grpc.CallOption) (*StatusResp, error) {
 	out := new(StatusResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_SetRead_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/SetRead", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -138,7 +117,7 @@ func (c *bxsubscribeClient) SetRead(ctx context.Context, in *SetReadReq, opts ..
 
 func (c *bxsubscribeClient) GetKey(ctx context.Context, in *GetKeyReq, opts ...grpc.CallOption) (*KeyResp, error) {
 	out := new(KeyResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_GetKey_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/GetKey", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -147,7 +126,7 @@ func (c *bxsubscribeClient) GetKey(ctx context.Context, in *GetKeyReq, opts ...g
 
 func (c *bxsubscribeClient) GetSubScribeInfo(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserResq, error) {
 	out := new(UserResq)
-	err := c.cc.Invoke(ctx, Bxsubscribe_GetSubScribeInfo_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/GetSubScribeInfo", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -156,7 +135,7 @@ func (c *bxsubscribeClient) GetSubScribeInfo(ctx context.Context, in *UserReq, o
 
 func (c *bxsubscribeClient) MsgDistributor(ctx context.Context, in *MsgDistributorReq, opts ...grpc.CallOption) (*StatusResp, error) {
 	out := new(StatusResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_MsgDistributor_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/MsgDistributor", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -165,7 +144,7 @@ func (c *bxsubscribeClient) MsgDistributor(ctx context.Context, in *MsgDistribut
 
 func (c *bxsubscribeClient) GetDistributor(ctx context.Context, in *GetDistributorReq, opts ...grpc.CallOption) (*DistributorResp, error) {
 	out := new(DistributorResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_GetDistributor_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/GetDistributor", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -174,7 +153,7 @@ func (c *bxsubscribeClient) GetDistributor(ctx context.Context, in *GetDistribut
 
 func (c *bxsubscribeClient) GetViewStatus(ctx context.Context, in *GetViewStatusReq, opts ...grpc.CallOption) (*ViewStatusResp, error) {
 	out := new(ViewStatusResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_GetViewStatus_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/GetViewStatus", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -183,7 +162,7 @@ func (c *bxsubscribeClient) GetViewStatus(ctx context.Context, in *GetViewStatus
 
 func (c *bxsubscribeClient) UserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResq, error) {
 	out := new(GetUserInfoResq)
-	err := c.cc.Invoke(ctx, Bxsubscribe_UserInfo_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/userInfo", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -192,7 +171,7 @@ func (c *bxsubscribeClient) UserInfo(ctx context.Context, in *GetUserInfoReq, op
 
 func (c *bxsubscribeClient) SetUser(ctx context.Context, in *SetUserInfoReq, opts ...grpc.CallOption) (*StatusResp, error) {
 	out := new(StatusResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_SetUser_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/setUser", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -201,7 +180,7 @@ func (c *bxsubscribeClient) SetUser(ctx context.Context, in *SetUserInfoReq, opt
 
 func (c *bxsubscribeClient) GetPushSet(ctx context.Context, in *GetPushSetReq, opts ...grpc.CallOption) (*GetPushSetResp, error) {
 	out := new(GetPushSetResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_GetPushSet_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/getPushSet", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -210,7 +189,7 @@ func (c *bxsubscribeClient) GetPushSet(ctx context.Context, in *GetPushSetReq, o
 
 func (c *bxsubscribeClient) SetPushSet(ctx context.Context, in *SetPushSetReq, opts ...grpc.CallOption) (*StatusResp, error) {
 	out := new(StatusResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_SetPushSet_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/setPushSet", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -219,7 +198,7 @@ func (c *bxsubscribeClient) SetPushSet(ctx context.Context, in *SetPushSetReq, o
 
 func (c *bxsubscribeClient) GetStaffSubscribeList(ctx context.Context, in *StaffSubscribeReq, opts ...grpc.CallOption) (*StaffSubscribeListResp, error) {
 	out := new(StaffSubscribeListResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_GetStaffSubscribeList_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/getStaffSubscribeList", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -228,7 +207,7 @@ func (c *bxsubscribeClient) GetStaffSubscribeList(ctx context.Context, in *Staff
 
 func (c *bxsubscribeClient) GetStaffSubscribeDetail(ctx context.Context, in *StaffSubscribeDetailReq, opts ...grpc.CallOption) (*StaffSubscribeDetail, error) {
 	out := new(StaffSubscribeDetail)
-	err := c.cc.Invoke(ctx, Bxsubscribe_GetStaffSubscribeDetail_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/getStaffSubscribeDetail", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -237,7 +216,7 @@ func (c *bxsubscribeClient) GetStaffSubscribeDetail(ctx context.Context, in *Sta
 
 func (c *bxsubscribeClient) BidDistributor(ctx context.Context, in *BidDistributorReq, opts ...grpc.CallOption) (*StatusResp, error) {
 	out := new(StatusResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_BidDistributor_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/bidDistributor", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -246,7 +225,16 @@ func (c *bxsubscribeClient) BidDistributor(ctx context.Context, in *BidDistribut
 
 func (c *bxsubscribeClient) BidRecList(ctx context.Context, in *BidRecListReq, opts ...grpc.CallOption) (*SubscribeInfosResp, error) {
 	out := new(SubscribeInfosResp)
-	err := c.cc.Invoke(ctx, Bxsubscribe_BidRecList_FullMethodName, in, out, opts...)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/bidRecList", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *bxsubscribeClient) SaveTSGuide(ctx context.Context, in *SaveTSGuideReq, opts ...grpc.CallOption) (*StatusResp, error) {
+	out := new(StatusResp)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/SaveTSGuide", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -257,42 +245,44 @@ func (c *bxsubscribeClient) BidRecList(ctx context.Context, in *BidRecListReq, o
 // All implementations must embed UnimplementedBxsubscribeServer
 // for forward compatibility
 type BxsubscribeServer interface {
-	// 获取订阅推送列表
+	//获取订阅推送列表
 	GetSubList(context.Context, *SubscribeInfosReq) (*SubscribeInfosResp, error)
-	// 获取订阅推送相关信息
+	//获取订阅推送相关信息
 	GetSubSomeInfo(context.Context, *SomeInfoReq) (*SomeInfoResp, error)
-	// 修改订阅信息接口
+	//修改订阅信息接口
 	UpdateSubScribeInfo(context.Context, *UpdateSubScribeInfoReq) (*StatusResp, error)
-	// 推送页面筛选导出
+	//推送页面筛选导出
 	ByPushHistory(context.Context, *SubscribeInfosReq) (*ByPushHistoryResp, error)
-	// 推送数据浏览状态修改
+	//推送数据浏览状态修改
 	SetRead(context.Context, *SetReadReq) (*StatusResp, error)
-	// 关键词获取
+	//关键词获取
 	GetKey(context.Context, *GetKeyReq) (*KeyResp, error)
-	// 订阅设置获取
+	//订阅设置获取
 	GetSubScribeInfo(context.Context, *UserReq) (*UserResq, error)
-	// 信息分发
+	//信息分发
 	MsgDistributor(context.Context, *MsgDistributorReq) (*StatusResp, error)
-	// 手动分发人员查询
+	//手动分发人员查询
 	GetDistributor(context.Context, *GetDistributorReq) (*DistributorResp, error)
-	// 查看状态
+	//查看状态
 	GetViewStatus(context.Context, *GetViewStatusReq) (*ViewStatusResp, error)
-	// 用户推送信息查看
+	//用户推送信息查看
 	UserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResq, error)
-	// 用户邮箱保存
+	//用户邮箱保存
 	SetUser(context.Context, *SetUserInfoReq) (*StatusResp, error)
-	// 用户推送设置查看
+	//用户推送设置查看
 	GetPushSet(context.Context, *GetPushSetReq) (*GetPushSetResp, error)
-	// 用户推送设置修改
+	//用户推送设置修改
 	SetPushSet(context.Context, *SetPushSetReq) (*StatusResp, error)
-	// 查看企业员工用户订阅
+	//查看企业员工用户订阅
 	GetStaffSubscribeList(context.Context, *StaffSubscribeReq) (*StaffSubscribeListResp, error)
-	// 查看企业员工用户订阅详情
+	//查看企业员工用户订阅详情
 	GetStaffSubscribeDetail(context.Context, *StaffSubscribeDetailReq) (*StaffSubscribeDetail, error)
-	// 标讯信息分发
+	//标讯信息分发
 	BidDistributor(context.Context, *BidDistributorReq) (*StatusResp, error)
 	// 订阅推荐列表
 	BidRecList(context.Context, *BidRecListReq) (*SubscribeInfosResp, error)
+	// 保存订阅向导设置
+	SaveTSGuide(context.Context, *SaveTSGuideReq) (*StatusResp, error)
 	mustEmbedUnimplementedBxsubscribeServer()
 }
 
@@ -354,6 +344,9 @@ func (UnimplementedBxsubscribeServer) BidDistributor(context.Context, *BidDistri
 func (UnimplementedBxsubscribeServer) BidRecList(context.Context, *BidRecListReq) (*SubscribeInfosResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method BidRecList not implemented")
 }
+func (UnimplementedBxsubscribeServer) SaveTSGuide(context.Context, *SaveTSGuideReq) (*StatusResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SaveTSGuide not implemented")
+}
 func (UnimplementedBxsubscribeServer) mustEmbedUnimplementedBxsubscribeServer() {}
 
 // UnsafeBxsubscribeServer may be embedded to opt out of forward compatibility for this service.
@@ -377,7 +370,7 @@ func _Bxsubscribe_GetSubList_Handler(srv interface{}, ctx context.Context, dec f
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_GetSubList_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/GetSubList",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).GetSubList(ctx, req.(*SubscribeInfosReq))
@@ -395,7 +388,7 @@ func _Bxsubscribe_GetSubSomeInfo_Handler(srv interface{}, ctx context.Context, d
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_GetSubSomeInfo_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/GetSubSomeInfo",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).GetSubSomeInfo(ctx, req.(*SomeInfoReq))
@@ -413,7 +406,7 @@ func _Bxsubscribe_UpdateSubScribeInfo_Handler(srv interface{}, ctx context.Conte
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_UpdateSubScribeInfo_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/UpdateSubScribeInfo",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).UpdateSubScribeInfo(ctx, req.(*UpdateSubScribeInfoReq))
@@ -431,7 +424,7 @@ func _Bxsubscribe_ByPushHistory_Handler(srv interface{}, ctx context.Context, de
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_ByPushHistory_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/ByPushHistory",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).ByPushHistory(ctx, req.(*SubscribeInfosReq))
@@ -449,7 +442,7 @@ func _Bxsubscribe_SetRead_Handler(srv interface{}, ctx context.Context, dec func
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_SetRead_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/SetRead",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).SetRead(ctx, req.(*SetReadReq))
@@ -467,7 +460,7 @@ func _Bxsubscribe_GetKey_Handler(srv interface{}, ctx context.Context, dec func(
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_GetKey_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/GetKey",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).GetKey(ctx, req.(*GetKeyReq))
@@ -485,7 +478,7 @@ func _Bxsubscribe_GetSubScribeInfo_Handler(srv interface{}, ctx context.Context,
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_GetSubScribeInfo_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/GetSubScribeInfo",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).GetSubScribeInfo(ctx, req.(*UserReq))
@@ -503,7 +496,7 @@ func _Bxsubscribe_MsgDistributor_Handler(srv interface{}, ctx context.Context, d
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_MsgDistributor_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/MsgDistributor",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).MsgDistributor(ctx, req.(*MsgDistributorReq))
@@ -521,7 +514,7 @@ func _Bxsubscribe_GetDistributor_Handler(srv interface{}, ctx context.Context, d
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_GetDistributor_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/GetDistributor",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).GetDistributor(ctx, req.(*GetDistributorReq))
@@ -539,7 +532,7 @@ func _Bxsubscribe_GetViewStatus_Handler(srv interface{}, ctx context.Context, de
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_GetViewStatus_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/GetViewStatus",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).GetViewStatus(ctx, req.(*GetViewStatusReq))
@@ -557,7 +550,7 @@ func _Bxsubscribe_UserInfo_Handler(srv interface{}, ctx context.Context, dec fun
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_UserInfo_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/userInfo",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).UserInfo(ctx, req.(*GetUserInfoReq))
@@ -575,7 +568,7 @@ func _Bxsubscribe_SetUser_Handler(srv interface{}, ctx context.Context, dec func
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_SetUser_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/setUser",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).SetUser(ctx, req.(*SetUserInfoReq))
@@ -593,7 +586,7 @@ func _Bxsubscribe_GetPushSet_Handler(srv interface{}, ctx context.Context, dec f
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_GetPushSet_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/getPushSet",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).GetPushSet(ctx, req.(*GetPushSetReq))
@@ -611,7 +604,7 @@ func _Bxsubscribe_SetPushSet_Handler(srv interface{}, ctx context.Context, dec f
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_SetPushSet_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/setPushSet",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).SetPushSet(ctx, req.(*SetPushSetReq))
@@ -629,7 +622,7 @@ func _Bxsubscribe_GetStaffSubscribeList_Handler(srv interface{}, ctx context.Con
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_GetStaffSubscribeList_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/getStaffSubscribeList",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).GetStaffSubscribeList(ctx, req.(*StaffSubscribeReq))
@@ -647,7 +640,7 @@ func _Bxsubscribe_GetStaffSubscribeDetail_Handler(srv interface{}, ctx context.C
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_GetStaffSubscribeDetail_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/getStaffSubscribeDetail",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).GetStaffSubscribeDetail(ctx, req.(*StaffSubscribeDetailReq))
@@ -665,7 +658,7 @@ func _Bxsubscribe_BidDistributor_Handler(srv interface{}, ctx context.Context, d
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_BidDistributor_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/bidDistributor",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).BidDistributor(ctx, req.(*BidDistributorReq))
@@ -683,7 +676,7 @@ func _Bxsubscribe_BidRecList_Handler(srv interface{}, ctx context.Context, dec f
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: Bxsubscribe_BidRecList_FullMethodName,
+		FullMethod: "/bxsubscribe.Bxsubscribe/bidRecList",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BxsubscribeServer).BidRecList(ctx, req.(*BidRecListReq))
@@ -691,6 +684,24 @@ func _Bxsubscribe_BidRecList_Handler(srv interface{}, ctx context.Context, dec f
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Bxsubscribe_SaveTSGuide_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(SaveTSGuideReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxsubscribeServer).SaveTSGuide(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxsubscribe.Bxsubscribe/SaveTSGuide",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxsubscribeServer).SaveTSGuide(ctx, req.(*SaveTSGuideReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Bxsubscribe_ServiceDesc is the grpc.ServiceDesc for Bxsubscribe service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -770,6 +781,10 @@ var Bxsubscribe_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "bidRecList",
 			Handler:    _Bxsubscribe_BidRecList_Handler,
 		},
+		{
+			MethodName: "SaveTSGuide",
+			Handler:    _Bxsubscribe_SaveTSGuide_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "bxsubscribe.proto",

+ 41 - 0
jyBXSubscribe/test/618.http

@@ -0,0 +1,41 @@
+POST https://jybx3-webtest.jydev.jianyu360.com/jyapi/jybx/subscribe/fType/someInfo
+Content-Type: application/json
+Cookie: SESSIONID=5696788f98bb1cc7e24b9d2e6c4ba58c0ee38ddd
+
+###
+POST https://jybx3-webtest.jydev.jianyu360.com/jyapi/jybx/subscribe/mType/someInfo
+Content-Type: application/json
+Cookie: SESSIONID=5696788f98bb1cc7e24b9d2e6c4ba58c0ee38ddd
+
+###
+POST https://jybx3-webtest.jydev.jianyu360.com/jyapi/jybx/subscribe/vType/someInfo
+Content-Type: application/json
+Cookie: SESSIONID=5696788f98bb1cc7e24b9d2e6c4ba58c0ee38ddd
+
+###
+POST https://jybx3-webtest.jydev.jianyu360.com/jyapi/jybx/subscribe/eType/someInfo
+Content-Type: application/json
+Cookie: SESSIONID=5696788f98bb1cc7e24b9d2e6c4ba58c0ee38ddd
+
+###
+POST https://jybx3-webtest.jydev.jianyu360.com/jyapi/jybx/subscribe/fType/saveTSGuide
+Content-Type: application/json
+Cookie: SESSIONID=5696788f98bb1cc7e24b9d2e6c4ba58c0ee38ddd
+
+{
+  "area": "{\"福建\" : [\"福州市\",\"厦门市\"]}",
+  "keywords": ["设备"]
+}
+
+
+###
+POST https://jybx3-webtest.jydev.jianyu360.com/jyapi/jybx/subscribe/mType/saveTSGuide
+Content-Type: application/json
+Cookie: SESSIONID=5696788f98bb1cc7e24b9d2e6c4ba58c0ee38ddd
+
+{
+  "area": "{\"福建\" : [\"福州市\",\"厦门市\"],\"河南\" : []}",
+  "keywords": ["设备"]
+}
+
+

Some files were not shown because too many files changed in this diff