Jianghan 6 months ago
parent
commit
143e6509e2

+ 4 - 4
entity/exportCharge.go

@@ -2,10 +2,10 @@ package entity
 
 type PersonLimit struct {
 	Id            int64 `xorm:"pk autoincr id" form:"id" json:"id"`
-	DataLimit     int64 `xorm:"data_limit" form:"data_limit" json:"data_limit"` //每日导出限额
-	MaxNums       int64 `xorm:"max_nums" form:"max_nums" json:"max_nums"`       //导出总量限额
-	ExportNums    int64 `xorm:"export_nums" json:"export_nums"`                 //当日已导出条数
-	AllExportNums int64 `xorm:"all_export_nums" json:"all_export_nums"`         //全部已导出条数
+	DataLimit     int64 `xorm:"data_limit" json:"data_limit"`           //每日导出限额
+	MaxNums       int64 `xorm:"max_nums" json:"max_nums"`               //导出总量限额
+	ExportNums    int64 `xorm:"export_nums" json:"export_nums"`         //当日已导出条数
+	AllExportNums int64 `xorm:"all_export_nums" json:"all_export_nums"` //全部已导出条数
 }
 
 type ExportLog struct {

+ 3 - 3
rpc/etc/resourcescenter.yaml

@@ -2,7 +2,7 @@ Name: resourcescenter.rpc
 ListenOn: :8088
 Etcd:
   Hosts:
-    - 192.168.3.206:2379
+    - 127.0.0.1:2379
   Key: resourcescenter.rpc
 Timeout: 200000
 DataSource: root:=PDT49#80Z!RVv52_z@tcp(192.168.3.217:4000)/jy_user_center?charset=utf8mb4&parseTime=true&loc=Local
@@ -13,11 +13,11 @@ DedupUrl: http://192.168.3.206:8888
 FileSystemConf:
   Etcd:
     Hosts:
-      - 192.168.3.206:2379
+      - 127.0.0.1:2379
     Key: resourcescenter.rpc
 ProductStr: "附件下载包,采购单位画像包,企业中标分析报告下载包,业主采购分析报告下载包,市场分析定制报告下载包"
 TimeSource: 1 0 0 * * ?
 Mongo:
-  Address: 192.168.3.206:27002
+  Address: 192.168.3.149:27180
   Size: 5
   DbName: jyqyfw

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

@@ -13,7 +13,7 @@ type Config struct {
 	ProductMap     map[string]interface{}
 	ProductStr     string
 	TimeSource     string //定时任务
-	Mgo            MgoConf
+	Mongo          *MgoConf
 }
 
 var ConfigJson Config
@@ -21,5 +21,5 @@ var ConfigJson Config
 type MgoConf struct {
 	Address string `json:",optional"`
 	Size    int    `json:",optional"`
-	Dbname  string `json:",optional"`
+	DbName  string `json:",optional"`
 }

+ 3 - 3
rpc/resourcesCenter.go

@@ -62,9 +62,9 @@ func init() {
 
 	//mongo实例
 	entity.Mgo = &mongodb.MongodbSim{
-		MongodbAddr: config.ConfigJson.Mgo.Address,
-		Size:        config.ConfigJson.Mgo.Size,
-		DbName:      config.ConfigJson.Mgo.Dbname,
+		MongodbAddr: config.ConfigJson.Mongo.Address,
+		Size:        config.ConfigJson.Mongo.Size,
+		DbName:      config.ConfigJson.Mongo.DbName,
 	}
 	entity.Mgo.InitPool()
 

+ 1 - 0
rpc/resourcesCenter.proto

@@ -200,6 +200,7 @@ message EntOperateReq {
 message ChargeAccountReq {
   int64 entId = 1;
   int64 UserId = 2;
+  int64 entUserId = 3;
 }
 
 message ChargeReq {

+ 121 - 111
rpc/resourcesCenter/resourcesCenter.pb.go

@@ -1912,8 +1912,9 @@ type ChargeAccountReq struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	EntId  int64 `protobuf:"varint,1,opt,name=entId,proto3" json:"entId,omitempty"`
-	UserId int64 `protobuf:"varint,2,opt,name=UserId,proto3" json:"UserId,omitempty"`
+	EntId     int64 `protobuf:"varint,1,opt,name=entId,proto3" json:"entId,omitempty"`
+	UserId    int64 `protobuf:"varint,2,opt,name=UserId,proto3" json:"UserId,omitempty"`
+	EntUserId int64 `protobuf:"varint,3,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
 }
 
 func (x *ChargeAccountReq) Reset() {
@@ -1962,6 +1963,13 @@ func (x *ChargeAccountReq) GetUserId() int64 {
 	return 0
 }
 
+func (x *ChargeAccountReq) GetEntUserId() int64 {
+	if x != nil {
+		return x.EntUserId
+	}
+	return 0
+}
+
 type ChargeReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -2514,122 +2522,124 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
 	0x12, 0x2a, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
 	0x6e, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x72,
-	0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x40, 0x0a, 0x10,
+	0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x5e, 0x0a, 0x10,
 	0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71,
 	0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
 	0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xab,
-	0x02, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05,
-	0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74,
-	0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e,
-	0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65,
-	0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x6f,
-	0x72, 0x74, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70,
-	0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74,
-	0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x64, 0x75, 0x63,
-	0x74, 0x4e, 0x75, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64,
-	0x55, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x6c,
-	0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
-	0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1e,
-	0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1c,
-	0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a,
-	0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05,
-	0x52, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x69, 0x0a, 0x0a,
-	0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
-	0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18,
-	0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66,
-	0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xcc, 0x01, 0x0a, 0x08, 0x53, 0x6f, 0x6d, 0x65,
-	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79,
-	0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65,
-	0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65,
-	0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72,
-	0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c,
-	0x4d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x4d,
-	0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x04, 0x6e, 0x75, 0x6d, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x32, 0x18, 0x05,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6e, 0x75, 0x6d, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75,
-	0x6d, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6e, 0x75, 0x6d, 0x33, 0x12, 0x12,
-	0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x34, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6e, 0x75,
-	0x6d, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x35, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x04, 0x6e, 0x75, 0x6d, 0x35, 0x32, 0xeb, 0x08, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75,
-	0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x11, 0x66, 0x69,
-	0x6e, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74, 0x68, 0x12,
-	0x1d, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65,
-	0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22,
-	0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72,
-	0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52,
-	0x65, 0x73, 0x12, 0x57, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
-	0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
-	0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
-	0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
-	0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
-	0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x11, 0x66,
-	0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
-	0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74,
-	0x65, 0x72, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x72,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43,
-	0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x12,
-	0x4c, 0x0a, 0x13, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42,
-	0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x73, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a,
-	0x0f, 0x75, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64,
-	0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74,
-	0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x20, 0x2e, 0x72,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x55,
-	0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47,
-	0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x64, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x1b, 0x2e,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c,
+	0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xab, 0x02, 0x0a,
+	0x09, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e,
+	0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64,
+	0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74,
+	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74,
+	0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x6f, 0x72,
+	0x74, 0x4e, 0x75, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x75,
+	0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x4e,
+	0x75, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72,
+	0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61,
+	0x64, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x07,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a,
+	0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09,
+	0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68,
+	0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
+	0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x69, 0x0a, 0x0a, 0x43, 0x68,
+	0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07,
+	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
+	0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xcc, 0x01, 0x0a, 0x08, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e,
+	0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79,
+	0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75,
+	0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65,
+	0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x4d, 0x73,
+	0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x4d, 0x73, 0x67,
+	0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
+	0x6e, 0x75, 0x6d, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x32, 0x18, 0x05, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x04, 0x6e, 0x75, 0x6d, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x33,
+	0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6e, 0x75, 0x6d, 0x33, 0x12, 0x12, 0x0a, 0x04,
+	0x6e, 0x75, 0x6d, 0x34, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6e, 0x75, 0x6d, 0x34,
+	0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x35, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
+	0x6e, 0x75, 0x6d, 0x35, 0x32, 0xeb, 0x08, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64,
+	0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1d, 0x2e,
 	0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
-	0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x72, 0x65, 0x73,
-	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x65,
-	0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4d,
-	0x65, 0x72, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
-	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f,
+	0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x72,
+	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x41,
+	0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73,
+	0x12, 0x57, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42,
+	0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+	0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+	0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42,
+	0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x11, 0x66, 0x69, 0x6e,
+	0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1a,
+	0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x72, 0x65, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e,
+	0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x12, 0x4c, 0x0a,
+	0x13, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x6c,
+	0x61, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
 	0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74,
-	0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x75,
-	0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x69, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x17, 0x2e, 0x72,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x56,
-	0x69, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
-	0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
-	0x12, 0x51, 0x0a, 0x0f, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x75, 0x6d,
-	0x41, 0x64, 0x64, 0x12, 0x23, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43,
-	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e,
-	0x75, 0x6d, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
-	0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
-	0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
-	0x74, 0x41, 0x64, 0x64, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
-	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
-	0x74, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
-	0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
-	0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
-	0x47, 0x69, 0x76, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
-	0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61,
-	0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
-	0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
-	0x12, 0x4f, 0x0a, 0x12, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
-	0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72,
-	0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+	0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0f, 0x75,
+	0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x1a,
+	0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x20, 0x2e, 0x72, 0x65, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65,
+	0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0b,
+	0x66, 0x69, 0x6e, 0x64, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x1b, 0x2e, 0x72, 0x65,
+	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x72,
+	0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69,
+	0x65, 0x77, 0x52, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x72,
+	0x67, 0x65, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x19,
+	0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x75, 0x70, 0x64,
+	0x61, 0x74, 0x65, 0x56, 0x69, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x17, 0x2e, 0x72, 0x65, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x56, 0x69, 0x70,
+	0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43,
+	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51,
+	0x0a, 0x0f, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x41, 0x64,
+	0x64, 0x12, 0x23, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e,
+	0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x75, 0x6d,
+	0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
 	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
-	0x65, 0x12, 0x56, 0x0a, 0x14, 0x6a, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x68, 0x61,
-	0x72, 0x67, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x73, 0x6f,
-	0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x72,
-	0x67, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x72,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43,
-	0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0e, 0x6a, 0x79, 0x45,
-	0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x72, 0x65,
-	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68,
-	0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+	0x65, 0x12, 0x4d, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41,
+	0x64, 0x64, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41,
+	0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+	0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+	0x12, 0x4c, 0x0a, 0x0f, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x47, 0x69,
+	0x76, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43,
+	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65,
+	0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43,
+	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f,
+	0x0a, 0x12, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f,
+	0x76, 0x65, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
+	0x65, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+	0x56, 0x0a, 0x14, 0x6a, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67,
+	0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
 	0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65,
-	0x52, 0x65, 0x73, 0x70, 0x42, 0x12, 0x5a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
-	0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x72, 0x65, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61,
+	0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0e, 0x6a, 0x79, 0x45, 0x78, 0x70,
+	0x6f, 0x72, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f,
+	0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x72,
+	0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+	0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65,
+	0x73, 0x70, 0x42, 0x12, 0x5a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43,
+	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 15 - 52
service/exportChargeService.go

@@ -4,6 +4,7 @@ import (
 	"app.yhyue.com/moapp/jyResourcesCenter/entity"
 	"app.yhyue.com/moapp/jyResourcesCenter/rpc/resourcesCenter"
 	"app.yhyue.com/moapp/jybase/common"
+	"log"
 	"strings"
 	"time"
 )
@@ -23,27 +24,31 @@ func ChargeAccount(data *resourcesCenter.ChargeAccountReq) (resp *resourcesCente
 	entInfo, b := entity.Mgo.FindOne("user", map[string]interface{}{"entid": data.EntId})
 	var entNums int64
 	if b && len(*entInfo) > 0 && (*entInfo)["plan"] != nil {
-		entNums = common.Int64All((*entInfo)["current"])
+		plan := (*entInfo)["plan"].(map[string]interface{})
+		entNums = common.Int64All(plan["current"])
 	} else {
-		return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "未查询到企业数据流量"}
+		return &resourcesCenter.ChargeResp{Code: entity.SuccessCode, Message: "未查询到企业数据流量"}
 	}
 	var personNums int64
 	_ = centerOrm.Table("account_resources").Cols("SUM(number) AS totalNum").
 		Where("accountId = ? and endTime >= ? and resourceType = ?", data.EntId, now, "高级字段包").Find(&personNums)
 	if exportPower == 1 && (entNums > 0 || personNums == 0) {
 		// 企业流量包扣除
-		var personLimit *entity.PersonLimit
-		_ = jyOrm.Table("entniche_export_limit").Select("*").
-			Where("ent_id = ? and user_id =  ?", data.EntId, data.UserId).Find(&personLimit)
+		var personLimit []*entity.PersonLimit
+		err := jyOrm.Table("entniche_export_limit").Select("*").
+			Where("ent_id = ? and user_id = ?", data.EntId, data.EntUserId).Find(&personLimit)
+		if err != nil || personLimit == nil || len(personLimit) == 0 {
+			return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "企业个人账号限额查询失败"}
+		}
 		return &resourcesCenter.ChargeResp{
 			Code: entity.SuccessCode,
 			Data: &resourcesCenter.SomeInfo{
 				ChargeType: 0,
 				Num1:       entNums,
-				Num2:       personLimit.DataLimit,
-				Num3:       common.Int64All(common.If(personLimit.DataLimit == 0 && personLimit.MaxNums == 0, 0, personLimit.DataLimit-personLimit.ExportNums)),
-				Num4:       personLimit.MaxNums,
-				Num5:       common.Int64All(common.If(personLimit.DataLimit == 0 && personLimit.MaxNums == 0, 0, personLimit.MaxNums-personLimit.AllExportNums)),
+				Num2:       personLimit[0].DataLimit,
+				Num3:       common.Int64All(common.If(personLimit[0].DataLimit == 0 && personLimit[0].MaxNums == 0, 0, personLimit[0].DataLimit-personLimit[0].ExportNums)),
+				Num4:       personLimit[0].MaxNums,
+				Num5:       common.Int64All(common.If(personLimit[0].DataLimit == 0 && personLimit[0].MaxNums == 0, 0, personLimit[0].MaxNums-personLimit[0].AllExportNums)),
 			},
 		}
 	} else {
@@ -75,7 +80,6 @@ func ChargeFunc(data *resourcesCenter.ChargeReq) (resp *resourcesCenter.ChargeRe
 }
 
 func entCharge(data *resourcesCenter.ChargeReq) (resp *resourcesCenter.ChargeResp) {
-	now := time.Now().Format("2006-01-02 15:04:05")
 	souceOrm := entity.Engine.NewSession()
 	jyOrm := entity.JyEngine.NewSession()
 	var personLimit *entity.PersonLimit
@@ -83,6 +87,7 @@ func entCharge(data *resourcesCenter.ChargeReq) (resp *resourcesCenter.ChargeRes
 		Where("ent_id = ? and user_id = ?", data.EntId, data.UserId).Find(&personLimit)
 	var entNums int64
 	entInfo, b := entity.Mgo.FindOne("user", map[string]interface{}{"entid": data.EntId})
+	log.Println(*entInfo)
 	if b && len(*entInfo) > 0 && (*entInfo)["plan"] != nil {
 		entNums = common.Int64All((*entInfo)["current"])
 	} else {
@@ -173,27 +178,6 @@ func entCharge(data *resourcesCenter.ChargeReq) (resp *resourcesCenter.ChargeRes
 			}
 		}
 	}
-	//保存导出日志
-	var username, phone string
-	_ = souceOrm.Table("entniche_user").Cols("name, phone").
-		Where("id = ?", data.UserId).Find(&username, &phone)
-	exportLog := &entity.ExportLog{
-		UserName:    username,
-		ExportTime:  now,
-		DataSource:  "3",
-		ExportNum:   data.ExportNum,
-		DeductNum:   data.ExportNum, //去重
-		DownloadUrl: data.DownloadUrl,
-		EntId:       data.EntId,
-		Phone:       phone,
-		UserId:      data.UserId,
-		Filter:      data.Filter,
-	}
-	updateNum, err = jyOrm.Table("entniche_export_log").Insert(&exportLog)
-	if err != nil || updateNum <= 0 {
-		_ = jyOrm.Rollback()
-		return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "导出日志保存失败"}
-	}
 	//保存账号使用明细
 	detailed := entity.Detailed{
 		AccountId:    data.AccountId,
@@ -304,27 +288,6 @@ func personCharge(data *resourcesCenter.ChargeReq) (resp *resourcesCenter.Charge
 		_ = jyOrm.Rollback()
 		return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "事务提交失败"}
 	}
-	//保存导出日志
-	var username, phone string
-	_ = jyOrm.Table("entniche_user").Cols("name, phone").
-		Where("id = ?", data.UserId).Find(&username, &phone)
-	exportLog := &entity.ExportLog{
-		UserName:    username,
-		ExportTime:  now,
-		DataSource:  "3",
-		ExportNum:   data.ExportNum,
-		DeductNum:   data.ExportNum, //去重
-		DownloadUrl: data.DownloadUrl,
-		EntId:       data.EntId,
-		Phone:       phone,
-		UserId:      data.UserId,
-		Filter:      data.Filter,
-	}
-	updateNum, err = jyOrm.Table("entniche_export_log").Insert(&exportLog)
-	if err != nil || updateNum <= 0 {
-		_ = jyOrm.Rollback()
-		return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "导出日志保存失败"}
-	}
 	return &resourcesCenter.ChargeResp{
 		Code:    entity.SuccessCode,
 		Message: "",