Bläddra i källkod

feat: 新增ojy长度

zhangxinlei1996 2 år sedan
förälder
incheckning
bdffc8362a
5 ändrade filer med 23 tillägg och 9 borttagningar
  1. 1 0
      entity/power.go
  2. 1 0
      rpc/internal/logic/checklogic.go
  3. 18 9
      rpc/pb/powerCheck.pb.go
  4. 1 0
      rpc/powerCheck.proto
  5. 2 0
      service/power.go

+ 1 - 0
entity/power.go

@@ -32,6 +32,7 @@ type Free struct {
 	MemberApppushunread   int64 //已读未读
 	EntnicheApppushunread int64 //已读未读
 	Apppushunread         int64 //已读未读
+	OjyLength             int64 //ojy的长度
 }
 
 //超级订阅相关

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

@@ -80,6 +80,7 @@ func (l *CheckLogic) Check(in *pb.CheckReq) (*pb.CheckResp, error) {
 			IsUpgrade:     data.Free.IsUpgrade,
 			Mail:          data.Free.Mail,
 			Phone:         data.Free.Phone,
+			OjyLength:     data.Free.OjyLength,
 		}
 		resp.Ent = &pb.Ent{
 			Name:                data.Ent.Name,

+ 18 - 9
rpc/pb/powerCheck.pb.go

@@ -837,6 +837,7 @@ type Free struct {
 	MemberApppushunread   int64  `protobuf:"varint,11,opt,name=memberApppushunread,proto3" json:"memberApppushunread,omitempty"`     //已读未读
 	EntnicheApppushunread int64  `protobuf:"varint,12,opt,name=entnicheApppushunread,proto3" json:"entnicheApppushunread,omitempty"` //已读未读
 	Apppushunread         int64  `protobuf:"varint,13,opt,name=apppushunread,proto3" json:"apppushunread,omitempty"`                 //已读未读
+	OjyLength             int64  `protobuf:"varint,14,opt,name=ojyLength,proto3" json:"ojyLength,omitempty"`                         //ojy的长度
 }
 
 func (x *Free) Reset() {
@@ -962,6 +963,13 @@ func (x *Free) GetApppushunread() int64 {
 	return 0
 }
 
+func (x *Free) GetOjyLength() int64 {
+	if x != nil {
+		return x.OjyLength
+	}
+	return 0
+}
+
 var File_powerCheck_proto protoreflect.FileDescriptor
 
 var file_powerCheck_proto_rawDesc = []byte{
@@ -1091,7 +1099,7 @@ var file_powerCheck_proto_rawDesc = []byte{
 	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, 0xb4, 0x03, 0x0a, 0x04, 0x46, 0x72, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x46,
+	0x22, 0xd2, 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,
@@ -1118,14 +1126,15 @@ var file_powerCheck_proto_rawDesc = []byte{
 	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, 0x32, 0x59, 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, 0x12, 0x2b, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x43, 0x68, 0x65, 0x63,
-	0x6b, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x09, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
-	0x71, 0x1a, 0x0f, 0x2e, 0x50, 0x6f, 0x77, 0x65, 0x72, 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,
+	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, 0x32, 0x59, 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, 0x12, 0x2b, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
+	0x65, 0x64, 0x69, 0x73, 0x12, 0x09, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a,
+	0x0f, 0x2e, 0x50, 0x6f, 0x77, 0x65, 0x72, 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 (

+ 1 - 0
rpc/powerCheck.proto

@@ -109,6 +109,7 @@ message Free {
     int64 memberApppushunread = 11; //已读未读
 	int64 entnicheApppushunread = 12; //已读未读
 	int64 apppushunread =13; //已读未读
+	int64 ojyLength =14;//ojy的长度
 
 }
 

+ 2 - 0
service/power.go

@@ -112,6 +112,7 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 				o_jy, _ := (*data)["o_jy"].(map[string]interface{})
 				a_key, _ := o_jy["a_key"].([]interface{})
 				free.FreeHasKey = len(a_key) > 0
+				free.OjyLength = int64(len(o_jy))
 				if common.IntAll((o_jy)["i_newfree"]) > 0 || entity.IsNewFreeTimeCell < registeDate {
 					//IsNewFreeTimeCell dev3.6.4版本之前发了个紧急版本处理老用户订阅问题,i_newfree字段必须用户选择地区才能生成,不能作为判断是否是新用户得唯一标识,在此版本添加了常量:IsNewFreeTimeCell作为判断标准;--ws
 					free.IsUpgrade = true //新免费用户
@@ -187,6 +188,7 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 					"i_type":   2, //0:商机管理 1:超级订阅/大会员 2:免费
 				})
 				o_jy, _ := (*fdata)["o_entniche"].(map[string]interface{})
+				free.OjyLength = int64(len(o_jy))
 				a_key, _ := o_jy["a_key"].([]interface{})
 				free.FreeHasKey = len(a_key) > 0
 				if common.IntAll((o_jy)["i_newfree"]) > 0 || entity.IsNewFreeTimeCell < registeDate { //IsNewFreeTimeCell dev3.6.4版本之前发了个紧急版本处理老用户订阅问题,i_newfree字段必须用户选择地区才能生成,不能作为判断是否是新用户得唯一标识,在此版本添加了常量:IsNewFreeTimeCell作为判断标准;--ws