Explorar o código

feat:新增需要字段

zhangxinlei1996 %!s(int64=2) %!d(string=hai) anos
pai
achega
5b9c9f9202
Modificáronse 4 ficheiros con 160 adicións e 79 borrados
  1. 4 0
      entity/power.go
  2. 116 78
      rpc/pb/powerCheck.pb.go
  3. 4 0
      rpc/powerCheck.proto
  4. 36 1
      service/power.go

+ 4 - 0
entity/power.go

@@ -25,6 +25,7 @@ type Free struct {
 	Registedate   int64 //注册时间
 	Mail          string
 	Phone         string
+	TsGuide       int64
 }
 
 //超级订阅相关
@@ -39,6 +40,7 @@ type Vip struct {
 	PowerType       int64 //超级订阅权益类型;0无 1个人 2企业
 	VipPower        int64 //是否分配了超级订阅;0:否 1:是
 	FileNum         int64 //超级订阅用户附件下载包的剩余次数
+	HasKey          bool  //是否有关键词
 }
 
 //大会员相关
@@ -59,6 +61,7 @@ type Member struct {
 	Customers       int64   //潜在客户数量
 	Pid             string  //主帐号id
 	Used            bool    //是否使用过大会员初始化
+	HasKey          bool    //是否有关键词
 }
 
 //商机管理相关
@@ -69,6 +72,7 @@ type Entniche struct {
 	PowerSource int64 //商机管理权限开通来源;1:赠送的商机管理服务
 	IsEntPower  int64 //是否分配权限;0:未分配,1:已分配
 	IsNew       int64 //是否是新版商机管理 0不是 1是
+	HasKey      bool  //是否有关键词
 }
 
 //企业相关

+ 116 - 78
rpc/pb/powerCheck.pb.go

@@ -290,6 +290,7 @@ type Vip struct {
 	PowerType       int64 `protobuf:"varint,8,opt,name=powerType,proto3" json:"powerType,omitempty"`             //超级订阅权益类型;0无 1个人 2企业
 	VipPower        int64 `protobuf:"varint,9,opt,name=vipPower,proto3" json:"vipPower,omitempty"`               //是否分配了超级订阅;0:否 1:是
 	FileNum         int64 `protobuf:"varint,10,opt,name=fileNum,proto3" json:"fileNum,omitempty"`                //超级订阅用户附件下载包的剩余次数
+	HasKey          bool  `protobuf:"varint,11,opt,name=hasKey,proto3" json:"hasKey,omitempty"`                  //是否有关键词
 }
 
 func (x *Vip) Reset() {
@@ -394,6 +395,13 @@ func (x *Vip) GetFileNum() int64 {
 	return 0
 }
 
+func (x *Vip) GetHasKey() bool {
+	if x != nil {
+		return x.HasKey
+	}
+	return false
+}
+
 //大会员相关
 type Member struct {
 	state         protoimpl.MessageState
@@ -416,6 +424,7 @@ type Member struct {
 	Customers       int64   `protobuf:"varint,14,opt,name=customers,proto3" json:"customers,omitempty"`                   //潜在客户数量
 	Pid             string  `protobuf:"bytes,15,opt,name=pid,proto3" json:"pid,omitempty"`                                //主帐号id
 	Used            bool    `protobuf:"varint,16,opt,name=used,proto3" json:"used,omitempty"`                             //是否使用过大会员初始化
+	HasKey          bool    `protobuf:"varint,17,opt,name=hasKey,proto3" json:"hasKey,omitempty"`                         //是否有关键词
 }
 
 func (x *Member) Reset() {
@@ -562,6 +571,13 @@ func (x *Member) GetUsed() bool {
 	return false
 }
 
+func (x *Member) GetHasKey() bool {
+	if x != nil {
+		return x.HasKey
+	}
+	return false
+}
+
 //商机管理相关
 type Entniche struct {
 	state         protoimpl.MessageState
@@ -574,6 +590,7 @@ type Entniche struct {
 	PowerSource int64 `protobuf:"varint,4,opt,name=powerSource,proto3" json:"powerSource,omitempty"` //商机管理权限开通来源;1:赠送的商机管理服务
 	IsEntPower  int64 `protobuf:"varint,5,opt,name=isEntPower,proto3" json:"isEntPower,omitempty"`   //是否分配权限;0:未分配,1:已分配
 	IsNew       int64 `protobuf:"varint,6,opt,name=isNew,proto3" json:"isNew,omitempty"`             //是否是新版商机管理 0不是 1是
+	HasKey      bool  `protobuf:"varint,7,opt,name=hasKey,proto3" json:"hasKey,omitempty"`           //是否有关键词
 }
 
 func (x *Entniche) Reset() {
@@ -650,6 +667,13 @@ func (x *Entniche) GetIsNew() int64 {
 	return 0
 }
 
+func (x *Entniche) GetHasKey() bool {
+	if x != nil {
+		return x.HasKey
+	}
+	return false
+}
+
 //企业相关
 type Ent struct {
 	state         protoimpl.MessageState
@@ -792,7 +816,8 @@ type Free struct {
 	Registedate   int64  `protobuf:"varint,6,opt,name=registedate,proto3" json:"registedate,omitempty"`     //注册时间
 	IsUpgrade     bool   `protobuf:"varint,7,opt,name=isUpgrade,proto3" json:"isUpgrade,omitempty"`         //是否是新免费用户
 	Mail          string `protobuf:"bytes,8,opt,name=mail,proto3" json:"mail,omitempty"`
-	Phone         string `protobuf:"bytes,9,opt,name=phone,proto3" json:"phone,omitempty"` //手机号
+	Phone         string `protobuf:"bytes,9,opt,name=phone,proto3" json:"phone,omitempty"`       //手机号
+	TsGuide       int64  `protobuf:"varint,10,opt,name=tsGuide,proto3" json:"tsGuide,omitempty"` //pc订阅关键词,不再走向导页
 }
 
 func (x *Free) Reset() {
@@ -890,6 +915,13 @@ func (x *Free) GetPhone() string {
 	return ""
 }
 
+func (x *Free) GetTsGuide() int64 {
+	if x != nil {
+		return x.TsGuide
+	}
+	return 0
+}
+
 var File_powerCheck_proto protoreflect.FileDescriptor
 
 var file_powerCheck_proto_rawDesc = []byte{
@@ -926,7 +958,7 @@ var file_powerCheck_proto_rawDesc = []byte{
 	0x65, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x6e, 0x69, 0x63, 0x68, 0x65, 0x12, 0x16, 0x0a, 0x03, 0x65,
 	0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x45, 0x6e, 0x74, 0x52, 0x03,
 	0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
-	0x0b, 0x32, 0x05, 0x2e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x22, 0xaf,
+	0x0b, 0x32, 0x05, 0x2e, 0x46, 0x72, 0x65, 0x65, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x22, 0xc7,
 	0x02, 0x0a, 0x03, 0x56, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
 	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c,
 	0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
@@ -946,37 +978,40 @@ var file_powerCheck_proto_rawDesc = []byte{
 	0x70, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76, 0x69,
 	0x70, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x75,
 	0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x75, 0x6d,
-	0x22, 0xdc, 0x03, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73,
-	0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61,
-	0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d,
-	0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6d,
-	0x65, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x6d,
-	0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x05,
-	0x20, 0x03, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65,
-	0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65,
-	0x72, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x69, 0x73,
-	0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x70,
-	0x6f, 0x77, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
-	0x70, 0x6f, 0x77, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x6d,
-	0x62, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
-	0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x69,
-	0x73, 0x53, 0x75, 0x62, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x0a, 0x69, 0x73, 0x53, 0x75, 0x62, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6d,
-	0x61, 0x78, 0x4b, 0x65, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x4b, 0x65, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12,
-	0x16, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x06, 0x65, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x4e, 0x75,
-	0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x4e, 0x75, 0x6d, 0x12,
-	0x1a, 0x0a, 0x08, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x08, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x63,
-	0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
-	0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64,
-	0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75,
-	0x73, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x22,
-	0xb2, 0x01, 0x0a, 0x08, 0x45, 0x6e, 0x74, 0x6e, 0x69, 0x63, 0x68, 0x65, 0x12, 0x16, 0x0a, 0x06,
+	0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08,
+	0x52, 0x06, 0x68, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x22, 0xf4, 0x03, 0x0a, 0x06, 0x4d, 0x65, 0x6d,
+	0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73,
+	0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
+	0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64,
+	0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54,
+	0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x61, 0x6d,
+	0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4e,
+	0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x77,
+	0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x65,
+	0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a,
+	0x0d, 0x69, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x54, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x06,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x69, 0x73, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x54, 0x72,
+	0x69, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65,
+	0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x54, 0x79, 0x70,
+	0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72,
+	0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f,
+	0x77, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x53, 0x75, 0x62, 0x43, 0x6f, 0x75, 0x6e,
+	0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x73, 0x53, 0x75, 0x62, 0x43, 0x6f,
+	0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x4b, 0x65, 0x79, 0x4c, 0x65, 0x6e,
+	0x67, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x4b, 0x65,
+	0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x4e, 0x75,
+	0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x12,
+	0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x4e, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x06, 0x70, 0x72, 0x6f, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x69, 0x6c, 0x79,
+	0x4e, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x61, 0x69, 0x6c, 0x79,
+	0x4e, 0x75, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73,
+	0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
+	0x73, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
+	0x70, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28,
+	0x08, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x4b, 0x65,
+	0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x22,
+	0xca, 0x01, 0x0a, 0x08, 0x45, 0x6e, 0x74, 0x6e, 0x69, 0x63, 0x68, 0x65, 0x12, 0x16, 0x0a, 0x06,
 	0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74,
 	0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d,
 	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69,
@@ -987,51 +1022,54 @@ var file_powerCheck_proto_rawDesc = []byte{
 	0x0a, 0x0a, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01,
 	0x28, 0x03, 0x52, 0x0a, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x14,
 	0x0a, 0x05, 0x69, 0x73, 0x4e, 0x65, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69,
-	0x73, 0x4e, 0x65, 0x77, 0x22, 0xf5, 0x02, 0x0a, 0x03, 0x45, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04,
-	0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
-	0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x24,
-	0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
-	0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74,
-	0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x52,
-	0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x74,
-	0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e,
-	0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x0c, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x30,
-	0x0a, 0x13, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61,
-	0x6e, 0x61, 0x67, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x65, 0x6e, 0x74,
-	0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
-	0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
-	0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72,
-	0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
-	0x69, 0x62, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x74, 0x53,
-	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x76,
-	0x61, 0x74, 0x65, 0x47, 0x44, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x72, 0x69,
-	0x76, 0x61, 0x74, 0x65, 0x47, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x79, 0x56, 0x69, 0x70,
-	0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x75, 0x79, 0x56, 0x69, 0x70, 0x12, 0x1c,
-	0x0a, 0x09, 0x62, 0x75, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x09, 0x62, 0x75, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x8c, 0x02, 0x0a,
-	0x04, 0x46, 0x72, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x46, 0x72, 0x65, 0x65, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x46, 0x72, 0x65, 0x65, 0x12, 0x1e, 0x0a,
-	0x0a, 0x66, 0x72, 0x65, 0x65, 0x48, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x08, 0x52, 0x0a, 0x66, 0x72, 0x65, 0x65, 0x48, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a,
-	0x0b, 0x66, 0x72, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x0b, 0x66, 0x72, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12,
-	0x24, 0x0a, 0x0d, 0x66, 0x72, 0x65, 0x65, 0x42, 0x75, 0x79, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74,
-	0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x66, 0x72, 0x65, 0x65, 0x42, 0x75, 0x79, 0x65,
-	0x72, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x65, 0x65, 0x46, 0x69, 0x6c,
-	0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66, 0x72, 0x65, 0x65, 0x46, 0x69, 0x6c,
-	0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x64, 0x61, 0x74, 0x65,
-	0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x64,
-	0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65,
-	0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64,
-	0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x04, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x09,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x32, 0x2c, 0x0a, 0x0a, 0x70,
-	0x6f, 0x77, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x05, 0x43, 0x68, 0x65,
-	0x63, 0x6b, 0x12, 0x09, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e,
-	0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
-	0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x73, 0x4e, 0x65, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x07,
+	0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x22, 0xf5, 0x02, 0x0a,
+	0x03, 0x45, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x52,
+	0x6f, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74,
+	0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74,
+	0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x65,
+	0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d,
+	0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x61, 0x73,
+	0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
+	0x62, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62,
+	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62,
+	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x13, 0x65, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
+	0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6f, 0x77, 0x65,
+	0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70,
+	0x6f, 0x77, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65,
+	0x70, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
+	0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x47, 0x44, 0x18, 0x09, 0x20,
+	0x01, 0x28, 0x08, 0x52, 0x09, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x47, 0x44, 0x12, 0x16,
+	0x0a, 0x06, 0x62, 0x75, 0x79, 0x56, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
+	0x62, 0x75, 0x79, 0x56, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x75, 0x79, 0x4d, 0x65, 0x6d,
+	0x62, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x75, 0x79, 0x4d, 0x65,
+	0x6d, 0x62, 0x65, 0x72, 0x22, 0xa6, 0x02, 0x0a, 0x04, 0x46, 0x72, 0x65, 0x65, 0x12, 0x16, 0x0a,
+	0x06, 0x69, 0x73, 0x46, 0x72, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69,
+	0x73, 0x46, 0x72, 0x65, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x72, 0x65, 0x65, 0x48, 0x61, 0x73,
+	0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x72, 0x65, 0x65, 0x48,
+	0x61, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x72, 0x65, 0x65, 0x45, 0x6e, 0x74,
+	0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x66, 0x72, 0x65, 0x65,
+	0x45, 0x6e, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x72, 0x65, 0x65, 0x42,
+	0x75, 0x79, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d,
+	0x66, 0x72, 0x65, 0x65, 0x42, 0x75, 0x79, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a,
+	0x08, 0x66, 0x72, 0x65, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x08, 0x66, 0x72, 0x65, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x67,
+	0x69, 0x73, 0x74, 0x65, 0x64, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
+	0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69,
+	0x73, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
+	0x69, 0x73, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x69,
+	0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a,
+	0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68,
+	0x6f, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x73, 0x47, 0x75, 0x69, 0x64, 0x65, 0x18, 0x0a,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x73, 0x47, 0x75, 0x69, 0x64, 0x65, 0x32, 0x2c, 0x0a,
+	0x0a, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1e, 0x0a, 0x05, 0x43,
+	0x68, 0x65, 0x63, 0x6b, 0x12, 0x09, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a,
+	0x0a, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e,
+	0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 4 - 0
rpc/powerCheck.proto

@@ -42,6 +42,7 @@ message Vip {
 	int64 powerType =8;//超级订阅权益类型;0无 1个人 2企业
 	int64 vipPower=9; //是否分配了超级订阅;0:否 1:是 
 	int64 fileNum=10;//超级订阅用户附件下载包的剩余次数
+	bool hasKey=11;//是否有关键词
 }
 
 //大会员相关
@@ -62,6 +63,7 @@ message Member {
 	int64 customers =14;//潜在客户数量
 	string pid  =15;  //主帐号id
 	bool used  =16; //是否使用过大会员初始化   
+	bool hasKey=17; //是否有关键词
 }
 
 //商机管理相关
@@ -72,6 +74,7 @@ message Entniche {
 	int64 powerSource=4; //商机管理权限开通来源;1:赠送的商机管理服务
 	int64 isEntPower=5; //是否分配权限;0:未分配,1:已分配
 	int64 isNew=6;        //是否是新版商机管理 0不是 1是
+	bool hasKey=7 ;//是否有关键词
 }
 
 //企业相关
@@ -100,6 +103,7 @@ message Free {
     bool isUpgrade = 7;//是否是新免费用户
     string mail=8; 
     string phone=9; //手机号
+    int64 tsGuide=10; //pc订阅关键词,不再走向导页
 }
 
 service powerCheck {

+ 36 - 1
service/power.go

@@ -71,7 +71,9 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 		mgoUserFields["s_member_mainid"] = 1
 		mgoUserFields["i_member_sub_status"] = 1
 		mgoUserFields["i_member_trial"] = 1
+		mgoUserFields["o_member_jy"] = 1
 		mgoUserFields["o_jy"] = 1
+		mgoUserFields["i_ts_guide"] = 1
 	} else {
 		bigmemberServiceUserQuery["s_userid"] = positionId
 	}
@@ -81,9 +83,11 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 		registeDate := common.Int64All((*data)["l_registedate"])                                            //注册时间
 		phone, _ := common.If((*data)["s_phone"] != nil, (*data)["s_phone"], (*data)["s_m_phone"]).(string) //
 		mail := common.ObjToString((*data)["s_myemail"])
+		i_ts_guide := common.Int64All((*data)["i_ts_guide"])
 		free.Mail = mail
 		free.Registedate = registeDate
 		free.Phone = phone
+		free.TsGuide = i_ts_guide
 		//个人权益
 		if positionType == 0 {
 			o_jy, _ := (*data)["o_jy"].(map[string]interface{})
@@ -98,7 +102,7 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 			vipEndTime := common.Int64All((*data)["l_vip_endtime"])
 			ovipjy := common.ObjToMap((*data)["o_vipjy"])
 			oBuyset := common.ObjToMap((*ovipjy)["o_buyset"])
-			upgrade := common.Int64All((*oBuyset)["oBuyset"])
+			upgrade := common.Int64All((*oBuyset)["upgrade"])
 			areacount := common.Int64All((*oBuyset)["areacount"])
 			buyerclasscount := common.Int64All((*oBuyset)["buyerclasscount"])
 			vip = &entity.Vip{
@@ -112,6 +116,10 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 				PowerType:       common.Int64All(common.If(vipStatus > 0, 1, 0)),
 				//TODO 附件下载次数
 			}
+			if (*ovipjy)["a_items"] != nil {
+				a_items := common.ObjArrToMapArr((*ovipjy)["a_items"].([]interface{}))
+				vip.HasKey = HasKey(a_items)
+			}
 			//个人member
 			i_member_sub_status := common.IntAllDef((*data)["i_member_sub_status"], 0)
 
@@ -125,6 +133,13 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 				MaxKeyLength: 300, //最大关键词数量限制
 				PowerType:    common.Int64All(common.If(memberStatus > 0, 1, 0)),
 			}
+			omemberjy := common.ObjToMap((*data)["o_member_jy"])
+			if (*omemberjy)["a_items"] != nil {
+				if arr, ok := (*omemberjy)["a_items"].([]interface{}); ok {
+					a_items := common.ObjArrToMapArr(arr)
+					member.HasKey = HasKey(a_items)
+				}
+			}
 			if memberStatus > 0 {
 				member.MemberPower = 1 //是否分配了大会员;0:否 1:是
 			}
@@ -164,10 +179,17 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 				},
 			})
 			if ok && edata != nil && len(*edata) > 0 {
+				haskey := false
 				status := common.Int64All((*edata)["i_status"])
 				starttime := common.Int64All((*edata)["l_starttime"])
 				endtime := common.Int64All((*edata)["l_endtime"])
 				o_entniche := common.ObjToMap((*edata)["o_entniche"])
+				if (*o_entniche)["a_items"] != nil {
+					if arr, ok := (*o_entniche)["a_items"].([]interface{}); ok {
+						a_items := common.ObjArrToMapArr(arr)
+						haskey = HasKey(a_items)
+					}
+				}
 				//获取用户是什么版本权益
 				//用于判断是否含有企业主体的超级订阅、大会员服务
 				epowerData := this.Conn.Mysql.SelectBySql(`SELECT c.product_type FROM entniche_user a INNER JOIN entniche_power b 
@@ -191,6 +213,7 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 								Buyerclasscount: buyerclasscount,
 								MaxKeyLength:    300,
 								PowerType:       2,
+								HasKey:          haskey,
 							}
 						} else if strings.Contains(product_type, entity.ProductType_member) {
 							member.PowerType = 2
@@ -200,6 +223,7 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 								EndTime:    endtime,
 								MemberName: level_map[status],
 								PowerType:  2,
+								HasKey:     haskey,
 							}
 							//是否试用
 							if this.Conn.MgoJy.Count("member", map[string]interface{}{"userid": positionId}) > 0 {
@@ -330,3 +354,14 @@ func (this *PowerService) GetEntnicheUserId(entId int64, phone string) int64 {
 	}
 	return -1
 }
+
+//是否有关键词
+func HasKey(a_items []map[string]interface{}) bool {
+	for _, v := range a_items {
+		akey, _ := v["a_key"].([]interface{})
+		if len(akey) > 0 {
+			return true
+		}
+	}
+	return false
+}