ソースを参照

Merge branch 'feature/v1.0.5_ws' of BaseService/powerCheckCenter into feature/v1.0.5

wangshan 1 年間 前
コミット
fab36e8a24
5 ファイル変更73 行追加60 行削除
  1. 6 5
      entity/power.go
  2. 1 0
      rpc/internal/logic/checklogic.go
  3. 49 39
      rpc/pb/powerCheck.pb.go
  4. 1 0
      rpc/powerCheck.proto
  5. 16 16
      service/power.go

+ 6 - 5
entity/power.go

@@ -17,7 +17,7 @@ const (
 
 )
 
-//免费权益相关
+// 免费权益相关
 type Free struct {
 	IsFree                bool  //是否是免费用户
 	FreeHasKey            bool  //免费用户是否有关键词
@@ -36,7 +36,7 @@ type Free struct {
 	Original              int64 //查看原文次数/每月
 }
 
-//超级订阅相关
+// 超级订阅相关
 type Vip struct {
 	Status          int64   //超级订阅状态
 	StartTime       int64   //超级订阅开始时间戳
@@ -53,7 +53,7 @@ type Vip struct {
 	Original        int64   //查看原文次数/每月
 }
 
-//大会员相关
+// 大会员相关
 type Member struct {
 	Status          int64   //大会员状态
 	StartTime       int64   //开始时间戳
@@ -75,7 +75,7 @@ type Member struct {
 	Original        int64   //查看原文次数/每月
 }
 
-//商机管理相关
+// 商机管理相关
 type Entniche struct {
 	Status      int64 //商机管理相关
 	StartTime   int64 //开始时间戳
@@ -88,7 +88,7 @@ type Entniche struct {
 	Original    int64 //查看原文次数/每月
 }
 
-//企业相关
+// 企业相关
 type Ent struct {
 	Name                string //企业名称
 	EntRoleId           int64  //商机管理角色:1:企业管理员;2:部门管理员
@@ -100,6 +100,7 @@ type Ent struct {
 	PrivateGD           bool   //广东移动DICT 用户,用于查看画像
 	BuyVip              int64  //是否购买超级订阅
 	BuyMember           int64  //是否购买大会员
+	Services            bool   //是否购买企业级应用服务
 }
 
 type Power struct {

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

@@ -100,6 +100,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,

+ 49 - 39
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,6 +843,13 @@ 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
@@ -1112,7 +1120,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,
@@ -1136,44 +1144,46 @@ 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,
-	0x6d, 0x62, 0x65, 0x72, 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, 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,
+	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,
+	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

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

+ 16 - 16
service/power.go

@@ -16,12 +16,11 @@ import (
 	"github.com/zeromicro/go-zero/core/logx"
 )
 
-//权益
+// 权益
 type PowerService struct {
 	*entity.Conn
 }
 
-//
 func NewPower(conn *entity.Conn) *PowerService {
 	return &PowerService{
 		conn,
@@ -39,14 +38,14 @@ var level_map = map[int64]string{
 }
 
 /*
-	权益相关
-	userid  		//mongodb用户id
-	baseUserId 		//base_user用户id
-	accountId 		//账户id
-	entId =5;		//企业id
-	positionType    //职位类型 0个人 1企业
-	positionId		//职位id
-	切换到企业身份后,session中userId存的是企业雇员的职位id,个人身份,userId还是原来mgo库里的_id
+权益相关
+userid  		//mongodb用户id
+baseUserId 		//base_user用户id
+accountId 		//账户id
+entId =5;		//企业id
+positionType    //职位类型 0个人 1企业
+positionId		//职位id
+切换到企业身份后,session中userId存的是企业雇员的职位id,个人身份,userId还是原来mgo库里的_id
 */
 func (this *PowerService) Power(userid string, baseUserId, accountId, entId, positionType, positionId int64) *entity.Power {
 	logx.Info("-----req------", userid, baseUserId, accountId, entId, positionType, positionId)
@@ -355,6 +354,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) {
@@ -433,8 +433,8 @@ func (this *PowerService) Power(userid string, baseUserId, accountId, entId, pos
 	return &userPower
 }
 
-//免费用户体验会员功能权限
-//免费用户在企业画像/采购单位画像/附件下载留资 留资成功后用户才有功能使用次数
+// 免费用户体验会员功能权限
+// 免费用户在企业画像/采购单位画像/附件下载留资 留资成功后用户才有功能使用次数
 func FreeExperience(userId string, positionId, positionType int64) (int64, int64, int64) {
 	if positionType == 1 {
 		userId = strconv.Itoa(int(positionId))
@@ -445,7 +445,7 @@ func FreeExperience(userId string, positionId, positionType int64) (int64, int64
 	return entPortKey, buyerPortKey, fileKey
 }
 
-//获取附件下载次数
+// 获取附件下载次数
 func FileNum(uk, userid string, positionId, positionType int64) int64 {
 	if positionType == 1 {
 		userid = strconv.Itoa(int(positionId))
@@ -478,7 +478,7 @@ 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{})
@@ -489,7 +489,7 @@ func HasKey(a_items []map[string]interface{}) bool {
 	return false
 }
 
-//获取redis key
+// 获取redis key
 func GetRedisName(positionId int64) string {
 	if positionId == 0 {
 		return ""
@@ -497,7 +497,7 @@ func GetRedisName(positionId int64) string {
 	return fmt.Sprintf("user_power_info_%v", positionId)
 }
 
-//清除redis缓存
+// 清除redis缓存
 func (this *PowerService) DelRedisPower(positionId int64) bool {
 	if positionId == 0 {
 		return false