瀏覽代碼

分支合并

lianbingjie 1 年之前
父節點
當前提交
1cab030368
共有 5 個文件被更改,包括 51 次插入2 次删除
  1. 1 0
      entity/power.go
  2. 1 0
      rpc/internal/logic/checklogic.go
  3. 47 2
      rpc/pb/powerCheck.pb.go
  4. 1 0
      rpc/powerCheck.proto
  5. 1 0
      service/power.go

+ 1 - 0
entity/power.go

@@ -103,6 +103,7 @@ type Ent struct {
 	PrivateGD           bool   //广东移动DICT 用户,用于查看画像
 	BuyVip              int64  //是否购买超级订阅
 	BuyMember           int64  //是否购买大会员
+	Services            bool   //是否购买企业级应用服务
 }
 
 type Power struct {

+ 1 - 0
rpc/internal/logic/checklogic.go

@@ -103,6 +103,7 @@ func (l *CheckLogic) Check(in *pb.CheckReq) (*pb.CheckResp, error) {
 			BuyVip:              data.Ent.BuyVip,
 			BuyMember:           data.Ent.BuyMember,
 			PrivateGD:           data.Ent.PrivateGD,
+			Services:            data.Ent.Services,
 		}
 		resp.Entniche = &pb.Entniche{
 			Status:      data.Entniche.Status,

+ 47 - 2
rpc/pb/powerCheck.pb.go

@@ -731,6 +731,7 @@ type Ent struct {
 	PrivateGD           bool   `protobuf:"varint,9,opt,name=privateGD,proto3" json:"privateGD,omitempty"`                     //广东移动DICT 用户,用于查看画像
 	BuyVip              int64  `protobuf:"varint,10,opt,name=buyVip,proto3" json:"buyVip,omitempty"`                          //是否购买超级订阅
 	BuyMember           int64  `protobuf:"varint,11,opt,name=buyMember,proto3" json:"buyMember,omitempty"`                    //是否购买大会员
+	Services            bool   `protobuf:"varint,12,opt,name=Services,proto3" json:"Services,omitempty"`                      //是否购买企业级应用服务
 }
 
 func (x *Ent) Reset() {
@@ -842,7 +843,14 @@ func (x *Ent) GetBuyMember() int64 {
 	return 0
 }
 
-// 免费权益相关
+func (x *Ent) GetServices() bool {
+	if x != nil {
+		return x.Services
+	}
+	return false
+}
+
+//免费权益相关
 type Free struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1136,7 +1144,7 @@ var file_powerCheck_proto_rawDesc = []byte{
 	0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f,
 	0x64, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
 	0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x22, 0xf5, 0x02, 0x0a,
+	0x28, 0x03, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x22, 0x91, 0x03, 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,
@@ -1160,6 +1168,7 @@ var file_powerCheck_proto_rawDesc = []byte{
 	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,
+<<<<<<< HEAD
 	0x6d, 0x62, 0x65, 0x72, 0x22, 0xca, 0x04, 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,
@@ -1198,6 +1207,42 @@ var file_powerCheck_proto_rawDesc = []byte{
 	0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x70, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65,
 	0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x70, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d,
 	0x65, 0x32, 0x59, 0x0a, 0x0a, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12,
+=======
+	0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
+	0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
+	0x22, 0xee, 0x03, 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, 0x12, 0x30, 0x0a, 0x13, 0x6d, 0x65, 0x6d,
+	0x62, 0x65, 0x72, 0x41, 0x70, 0x70, 0x70, 0x75, 0x73, 0x68, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64,
+	0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 0x70,
+	0x70, 0x70, 0x75, 0x73, 0x68, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x12, 0x34, 0x0a, 0x15, 0x65,
+	0x6e, 0x74, 0x6e, 0x69, 0x63, 0x68, 0x65, 0x41, 0x70, 0x70, 0x70, 0x75, 0x73, 0x68, 0x75, 0x6e,
+	0x72, 0x65, 0x61, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x65, 0x6e, 0x74, 0x6e,
+	0x69, 0x63, 0x68, 0x65, 0x41, 0x70, 0x70, 0x70, 0x75, 0x73, 0x68, 0x75, 0x6e, 0x72, 0x65, 0x61,
+	0x64, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x70, 0x70, 0x70, 0x75, 0x73, 0x68, 0x75, 0x6e, 0x72, 0x65,
+	0x61, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x70, 0x75, 0x73,
+	0x68, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6a, 0x79, 0x4c, 0x65,
+	0x6e, 0x67, 0x74, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6f, 0x6a, 0x79, 0x4c,
+	0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61,
+	0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61,
+	0x6c, 0x32, 0x59, 0x0a, 0x0a, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12,
+>>>>>>> master
 	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, 0x12,
 	0x2b, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x64, 0x69, 0x73,

+ 1 - 0
rpc/powerCheck.proto

@@ -95,6 +95,7 @@ message Ent {
     bool privateGD = 9; //广东移动DICT 用户,用于查看画像
 	int64 buyVip=10;  //是否购买超级订阅
 	int64 buyMember =11; //是否购买大会员
+	bool Services =12; //是否购买企业级应用服务
 }
 
 //免费权益相关

+ 1 - 0
service/power.go

@@ -358,6 +358,7 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 						//判断企业是否购买企业版相关
 						eweData := this.Conn.Mysql.SelectBySql(`select * from entniche_wait_empower where ent_id=? and end_time>?`, entId, time.Now().Format(date.Date_Full_Layout))
 						if eweData != nil && len(*eweData) > 0 {
+							ent.Services = true
 							for _, v := range *eweData {
 								product_type := common.ObjToString(v["product_type"])
 								if strings.Contains(product_type, entity.ProductType_member) {