WH01243 4 лет назад
Родитель
Сommit
7ed32816a4

+ 19 - 11
api/integral.api

@@ -1,24 +1,29 @@
 syntax = "v1"
 
-type resourcesReq {
+type purchResourcesReq {
+	AccountId    string `form:"accountId"`             //账户标识
+	CompanyId    int64  `form:"companyId,optional"`    //企业标识
+	DepartmentId int64  `form:"departmentId,optional"` //组织标识
+	Name         string `form:"name"`                  //资源名称
+	ResourceType string `form:"resourceType"`          //资源类型
+	Number       int64  `form:"number"`                //数量
+	Spec         string `form:"spec,optional"`         //规格
+	AppId        string `form:"appId"`                 //标识
+	EndTime      string `form:"endTime,optional"`      //新增时数据包截止时间
+}
+type useResourcesReq {
 	AccountId        string `form:"accountId"`                 //账户标识
 	CompanyId        int64  `form:"companyId,optional"`        //企业标识
 	DepartmentId     int64  `form:"departmentId,optional"`     //组织标识
 	Name             string `form:"name"`                      //资源名称
 	ResourceType     string `form:"resourceType"`              //资源类型
 	Number           int64  `form:"number"`                    //数量
-	Spec             string `form:"spec,optional"`             //规格
 	AppId            string `form:"appId"`                     //标识
-	Model            int64  `form:"model"`                     //操作类型0使用1新增
 	RuleId           string `form:"ruleId,optional"`           //使用规则标识
 	UserId           string `form:"userId"`                    //用户标识
-	Url              string `form:"url,optional"`              //下载地址
-	SearchCriteria   string `form:"searchCriteria,optional"`   //搜索条件
-	Source           string `form:"source,optional"`           //数据来源
-	EndTime          string `form:"endTime,optional"`          //新增时数据包截止时间
+	Remarks          string `form:"remarks,optional"`          //备注
 	InfoId           string `form:"infoId,optional"`           //信息标识
 	DuplicateRemoval int64  `form:"duplicateRemoval,optional"` //是否去重0不去1去重
-	DeductionType    string `form:"deductionType,optional"`    //扣费类型(1高级字段包)
 }
 
 type resourcesRes {
@@ -80,9 +85,12 @@ type balanceRes {
 }
 
 service integral-api {
-	//资源操作
-	@handler UpdateUserBalanceHandler // TODO: set handler name and delete this comment
-	post /resources/updateUserBalance (resourcesReq) returns(resourcesRes)
+	//资源使用
+	@handler UseUserDetailedHandler // TODO: set handler name and delete this comment
+	post /resources/useUserDetailed (useResourcesReq) returns(resourcesRes)
+	//购买资源
+	@handler PurchaseUserBalanceHandler // TODO: set handler name and delete this comment
+	post /resources/purchaseUserBalance (purchResourcesReq) returns(resourcesRes)
 	//预览信息
 	@handler FindPreviewHandler // TODO: set handler name and delete this comment
 	post /findPreview (previewReq) returns(previewRes)

+ 29 - 0
api/internal/handler/purchaseuserbalancehandler.go

@@ -0,0 +1,29 @@
+package handler
+
+import (
+	"net/http"
+
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/logic"
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/svc"
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/types"
+
+	"github.com/tal-tech/go-zero/rest/httpx"
+)
+
+func PurchaseUserBalanceHandler(ctx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.PurchResourcesReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.Error(w, err)
+			return
+		}
+
+		l := logic.NewPurchaseUserBalanceLogic(r.Context(), ctx)
+		resp, err := l.PurchaseUserBalance(req)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 7 - 2
api/internal/handler/routes.go

@@ -14,8 +14,13 @@ func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
 		[]rest.Route{
 			{
 				Method:  http.MethodPost,
-				Path:    "/resources/updateUserBalance",
-				Handler: UpdateUserBalanceHandler(serverCtx),
+				Path:    "/resources/useUserDetailed",
+				Handler: UseUserDetailedHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/resources/purchaseUserBalance",
+				Handler: PurchaseUserBalanceHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,

+ 4 - 4
api/internal/handler/updateuserbalancehandler.go → api/internal/handler/useuserdetailedhandler.go

@@ -10,16 +10,16 @@ import (
 	"github.com/tal-tech/go-zero/rest/httpx"
 )
 
-func UpdateUserBalanceHandler(ctx *svc.ServiceContext) http.HandlerFunc {
+func UseUserDetailedHandler(ctx *svc.ServiceContext) http.HandlerFunc {
 	return func(w http.ResponseWriter, r *http.Request) {
-		var req types.ResourcesReq
+		var req types.UseResourcesReq
 		if err := httpx.Parse(r, &req); err != nil {
 			httpx.Error(w, err)
 			return
 		}
 
-		l := logic.NewUpdateUserBalanceLogic(r.Context(), ctx)
-		resp, err := l.UpdateUserBalance(req)
+		l := logic.NewUseUserDetailedLogic(r.Context(), ctx)
+		resp, err := l.UseUserDetailed(req)
 		if err != nil {
 			httpx.Error(w, err)
 		} else {

+ 51 - 0
api/internal/logic/purchaseuserbalancelogic.go

@@ -0,0 +1,51 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jyResourcesCenter/rpc/resourcesCenterclient"
+	"context"
+
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/svc"
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/types"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type PurchaseUserBalanceLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewPurchaseUserBalanceLogic(ctx context.Context, svcCtx *svc.ServiceContext) PurchaseUserBalanceLogic {
+	return PurchaseUserBalanceLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *PurchaseUserBalanceLogic) PurchaseUserBalance(req types.PurchResourcesReq) (*types.ResourcesRes, error) {
+	// todo: add your logic here and delete this line
+	result := &types.ResourcesRes{}
+	lsi := l.svcCtx.ResourcesCenter
+	var err error
+	resp := &resourcesCenterclient.Response{}
+	resp, err = lsi.PurchaseUserBalance(l.ctx, &resourcesCenterclient.Resources{
+		AccountId:    req.AccountId,
+		CompanyId:    req.CompanyId,
+		DepartmentId: req.DepartmentId,
+		Name:         req.Name,
+		ResourceType: req.ResourceType,
+		Number:       req.Number,
+		AppId:        req.AppId,
+		EndTime:      req.EndTime,
+		Spec:         req.Spec,
+	})
+	if err != nil {
+		return nil, err
+	}
+	result.Code = resp.Code
+	result.Message = resp.Message
+	return result, nil
+	return &types.ResourcesRes{}, nil
+}

+ 0 - 70
api/internal/logic/updateuserbalancelogic.go

@@ -1,70 +0,0 @@
-package logic
-
-import (
-	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/svc"
-	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/types"
-	"app.yhyue.com/moapp/jyResourcesCenter/rpc/resourcesCenterclient"
-	"context"
-
-	"github.com/tal-tech/go-zero/core/logx"
-)
-
-type UpdateUserBalanceLogic struct {
-	logx.Logger
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-}
-
-func NewUpdateUserBalanceLogic(ctx context.Context, svcCtx *svc.ServiceContext) UpdateUserBalanceLogic {
-	return UpdateUserBalanceLogic{
-		Logger: logx.WithContext(ctx),
-		ctx:    ctx,
-		svcCtx: svcCtx,
-	}
-}
-
-func (l *UpdateUserBalanceLogic) UpdateUserBalance(req types.ResourcesReq) (*types.ResourcesRes, error) {
-	// todo: add your logic here and delete this line
-	result := &types.ResourcesRes{}
-	lsi := l.svcCtx.ResourcesCenter
-	var err error
-	resp := &resourcesCenterclient.Response{}
-	if req.Model == 0 {
-		resp, err = lsi.UseUserDetailed(l.ctx, &resourcesCenterclient.Resources{
-			AccountId:        req.AccountId,
-			CompanyId:        req.CompanyId,
-			DepartmentId:     req.DepartmentId,
-			Name:             req.Name,
-			ResourceType:     req.ResourceType,
-			Number:           req.Number,
-			Spec:             req.Spec,
-			AppId:            req.AppId,
-			Model:            req.Model,
-			Url:              req.Url,
-			SearchCriteria:   req.SearchCriteria,
-			Source:           req.Source,
-			InfoId:           req.InfoId,
-			DuplicateRemoval: req.DuplicateRemoval,
-			RuleId:           req.RuleId,
-			UserId:           req.UserId,
-		})
-	} else {
-		resp, err = lsi.PurchaseUserBalance(l.ctx, &resourcesCenterclient.Resources{
-			AccountId:    req.AccountId,
-			CompanyId:    req.CompanyId,
-			DepartmentId: req.DepartmentId,
-			Name:         req.Name,
-			ResourceType: req.ResourceType,
-			Number:       req.Number,
-			Spec:         req.Spec,
-			AppId:        req.AppId,
-			EndTime:      req.EndTime,
-		})
-	}
-	if err != nil {
-		return nil, err
-	}
-	result.Code = resp.Code
-	result.Message = resp.Message
-	return result, nil
-}

+ 55 - 0
api/internal/logic/useuserdetailedlogic.go

@@ -0,0 +1,55 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jyResourcesCenter/rpc/resourcesCenterclient"
+	"context"
+
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/svc"
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/types"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type UseUserDetailedLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewUseUserDetailedLogic(ctx context.Context, svcCtx *svc.ServiceContext) UseUserDetailedLogic {
+	return UseUserDetailedLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *UseUserDetailedLogic) UseUserDetailed(req types.UseResourcesReq) (*types.ResourcesRes, error) {
+	// todo: add your logic here and delete this line
+	result := &types.ResourcesRes{}
+	lsi := l.svcCtx.ResourcesCenter
+	var err error
+	resp := &resourcesCenterclient.Response{}
+	resp, err = lsi.UseUserDetailed(l.ctx, &resourcesCenterclient.Resources{
+
+		AccountId:        req.AccountId,
+		CompanyId:        req.CompanyId,
+		DepartmentId:     req.DepartmentId,
+		Name:             req.Name,
+		ResourceType:     req.ResourceType,
+		Number:           req.Number,
+		AppId:            req.AppId,
+		Remarks:          req.Remarks,
+		InfoId:           req.InfoId,
+		DuplicateRemoval: req.DuplicateRemoval,
+		RuleId:           req.RuleId,
+		UserId:           req.UserId,
+	})
+	if err != nil {
+		return nil, err
+	}
+	result.Code = resp.Code
+	result.Message = resp.Message
+	return result, nil
+	return &types.ResourcesRes{}, nil
+}

+ 14 - 8
api/internal/types/types.go

@@ -1,25 +1,31 @@
 // Code generated by goctl. DO NOT EDIT.
 package types
 
-type ResourcesReq struct {
+type PurchResourcesReq struct {
+	AccountId    string `form:"accountId"`             //账户标识
+	CompanyId    int64  `form:"companyId,optional"`    //企业标识
+	DepartmentId int64  `form:"departmentId,optional"` //组织标识
+	Name         string `form:"name"`                  //资源名称
+	ResourceType string `form:"resourceType"`          //资源类型
+	Number       int64  `form:"number"`                //数量
+	Spec         string `form:"spec,optional"`         //规格
+	AppId        string `form:"appId"`                 //标识
+	EndTime      string `form:"endTime,optional"`      //新增时数据包截止时间
+}
+
+type UseResourcesReq struct {
 	AccountId        string `form:"accountId"`                 //账户标识
 	CompanyId        int64  `form:"companyId,optional"`        //企业标识
 	DepartmentId     int64  `form:"departmentId,optional"`     //组织标识
 	Name             string `form:"name"`                      //资源名称
 	ResourceType     string `form:"resourceType"`              //资源类型
 	Number           int64  `form:"number"`                    //数量
-	Spec             string `form:"spec,optional"`             //规格
 	AppId            string `form:"appId"`                     //标识
-	Model            int64  `form:"model"`                     //操作类型0使用1新增
 	RuleId           string `form:"ruleId,optional"`           //使用规则标识
 	UserId           string `form:"userId"`                    //用户标识
-	Url              string `form:"url,optional"`              //下载地址
-	SearchCriteria   string `form:"searchCriteria,optional"`   //搜索条件
-	Source           string `form:"source,optional"`           //数据来源
-	EndTime          string `form:"endTime,optional"`          //新增时数据包截止时间
+	Remarks          string `form:"remarks,optional"`          //备注
 	InfoId           string `form:"infoId,optional"`           //信息标识
 	DuplicateRemoval int64  `form:"duplicateRemoval,optional"` //是否去重0不去1去重
-	DeductionType    string `form:"deductionType,optional"`    //扣费类型(1高级字段包)
 }
 
 type ResourcesRes struct {

+ 1 - 3
entity/detailed.go

@@ -13,9 +13,7 @@ type Detailed struct {
 	ExportTime     time.Time `xorm:"exportTime" form:"exportTime" json:"exportTime"`             //导出时间
 	UserType       int64     `xorm:"userType" form:"userType" json:"userType"`                   //流水类型0使用1新增
 	DeductionNumb  int64     `xorm:"deductionNumb" form:"deductionNumb" json:"deductionNumb"`    //扣除数量
-	Url            string    `xorm:"url" form:"url" json:"url"`                                  //下载地址
-	SearchCriteria string    `xorm:"searchCriteria" form:"searchCriteria" json:"searchCriteria"` //搜索条件
-	Source         string    `xorm:"source" form:"source" json:"source"`                         //数据来源
+	Remarks        string    `xorm:"remarks" form:"remarks" json:"remarks"`                      //备注
 	UserId         string    `xorm:"userId" form:"userId" json:"userId"`                         //用户标识
 	Name           string    `xorm:"name" form:"name" json:"name"`                               //资源名称
 }

+ 1 - 3
entity/resources.go

@@ -28,7 +28,5 @@ type ConsumeRecord struct {
 	RuleId         int64  `xorm:"ruleId" form:"ruleId" json:"ruleId"`
 	ExportTime     string `xorm:"exportTime" form:"exportTime" json:"exportTime"`
 	UserType       int64  `xorm:"userType" form:"userType" json:"userType"`
-	Url            string `xorm:"url" form:"url" json:"url"`
-	SearchCriteria string `xorm:"searchCriteria" form:"searchCriteria" json:"searchCriteria"`
-	Source         string `xorm:"source" form:"source" json:"source"`
+	Remarks        string `xorm:"remarks" form:"remarks" json:"remarks"`
 }

+ 1 - 3
rpc/internal/logic/useuserdetailedlogic.go

@@ -48,9 +48,7 @@ func (l *UseUserDetailedLogic) UseUserDetailed(in *resourcesCenter.Resources) (*
 		Name:           in.Name,
 		UserId:         in.UserId,
 		UserType:       in.Model,
-		Url:            in.Url,
-		SearchCriteria: in.SearchCriteria,
-		Source:         in.Source,
+		Remarks:        in.Remarks,
 		RuleId:         in.RuleId,
 	}
 	code, msg := balanceService.UseUserDetailed(in.DuplicateRemoval, balance, detailed, in.InfoId, config.ConfigJson.DedupUrl)

+ 7 - 13
rpc/resourcesCenter.proto

@@ -1,7 +1,7 @@
 syntax = "proto3";
 
 package resourcesCenter;
-//option go_package = "resourcesCenter/";
+option go_package = "resourcesCenter/";
 message Response {
     int64 code = 1; //响应代码
     string message = 2; //响应消息
@@ -29,12 +29,10 @@ message Resources {
     string appId = 8; //标识
     int64 model = 9; //操作类型0使用1新增
     string endTime = 10; //截止时间
-    string url = 12; //下载地址
-    string searchCriteria = 13; //搜索条件
-    string source = 14; //数据来源
-    string infoId = 15; //信息标识
-    int64 duplicateRemoval = 16; //是否去重0不去1去重
-    string ruleId = 17; //使用规则标识
+    string Remarks = 12; //备注
+    string infoId = 13; //信息标识
+    int64 duplicateRemoval = 14; //是否去重0不去1去重
+    string ruleId = 15; //使用规则标识
     string userId = 11; //用户标识
 }
 message Detailed {
@@ -48,9 +46,7 @@ message Detailed {
     int64 departmentId = 9; //组织标识
     string userId = 10; //用户标识
     int64 deductionNumb = 11; //扣除数量
-    string url = 12; //下载地址
-    string searchCriteria = 13; //搜索条件
-    string source = 14; //数据来源
+    string remarks = 12; //备注
     string name = 5; //资源名称
 
 }
@@ -82,9 +78,7 @@ message ConsumeRecord {
     int64 ruleId = 7; //导出规则标识
     string exportTime = 8; //导出时间
     int64 userType = 9; //消费、充值
-    string url = 10; //下载地址
-    string searchCriteria = 11; //导出搜索条件
-    string source = 12; //数据来源
+    string remarks = 10; //备注
 }
 
 

+ 149 - 212
rpc/resourcesCenter/resourcesCenter.pb.go

@@ -1,6 +1,6 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.25.0
+// 	protoc-gen-go v1.26.0
 // 	protoc        v3.15.1
 // source: resourcesCenter.proto
 
@@ -8,7 +8,6 @@ package resourcesCenter
 
 import (
 	context "context"
-	proto "github.com/golang/protobuf/proto"
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
@@ -25,11 +24,6 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
-// This is a compile-time assertion that a sufficiently up-to-date version
-// of the legacy proto package is being used.
-const _ = proto.ProtoPackageIsVersion4
-
-//option go_package = "resourcesCenter/";
 type Response struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -219,12 +213,10 @@ type Resources struct {
 	AppId            string `protobuf:"bytes,8,opt,name=appId,proto3" json:"appId,omitempty"`                         //标识
 	Model            int64  `protobuf:"varint,9,opt,name=model,proto3" json:"model,omitempty"`                        //操作类型0使用1新增
 	EndTime          string `protobuf:"bytes,10,opt,name=endTime,proto3" json:"endTime,omitempty"`                    //截止时间
-	Url              string `protobuf:"bytes,12,opt,name=url,proto3" json:"url,omitempty"`                            //下载地址
-	SearchCriteria   string `protobuf:"bytes,13,opt,name=searchCriteria,proto3" json:"searchCriteria,omitempty"`      //搜索条件
-	Source           string `protobuf:"bytes,14,opt,name=source,proto3" json:"source,omitempty"`                      //数据来源
-	InfoId           string `protobuf:"bytes,15,opt,name=infoId,proto3" json:"infoId,omitempty"`                      //信息标识
-	DuplicateRemoval int64  `protobuf:"varint,16,opt,name=duplicateRemoval,proto3" json:"duplicateRemoval,omitempty"` //是否去重0不去1去重
-	RuleId           string `protobuf:"bytes,17,opt,name=ruleId,proto3" json:"ruleId,omitempty"`                      //使用规则标识
+	Remarks          string `protobuf:"bytes,12,opt,name=Remarks,proto3" json:"Remarks,omitempty"`                    //备注
+	InfoId           string `protobuf:"bytes,13,opt,name=infoId,proto3" json:"infoId,omitempty"`                      //信息标识
+	DuplicateRemoval int64  `protobuf:"varint,14,opt,name=duplicateRemoval,proto3" json:"duplicateRemoval,omitempty"` //是否去重0不去1去重
+	RuleId           string `protobuf:"bytes,15,opt,name=ruleId,proto3" json:"ruleId,omitempty"`                      //使用规则标识
 	UserId           string `protobuf:"bytes,11,opt,name=userId,proto3" json:"userId,omitempty"`                      //用户标识
 }
 
@@ -330,23 +322,9 @@ func (x *Resources) GetEndTime() string {
 	return ""
 }
 
-func (x *Resources) GetUrl() string {
-	if x != nil {
-		return x.Url
-	}
-	return ""
-}
-
-func (x *Resources) GetSearchCriteria() string {
-	if x != nil {
-		return x.SearchCriteria
-	}
-	return ""
-}
-
-func (x *Resources) GetSource() string {
+func (x *Resources) GetRemarks() string {
 	if x != nil {
-		return x.Source
+		return x.Remarks
 	}
 	return ""
 }
@@ -384,20 +362,18 @@ type Detailed struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	AccountId      string `protobuf:"bytes,1,opt,name=accountId,proto3" json:"accountId,omitempty"`            //账户标识
-	CompanyId      int64  `protobuf:"varint,2,opt,name=companyId,proto3" json:"companyId,omitempty"`           //企业标识
-	ResourceType   string `protobuf:"bytes,3,opt,name=resourceType,proto3" json:"resourceType,omitempty"`      //资源类型
-	ExportNum      int64  `protobuf:"varint,4,opt,name=exportNum,proto3" json:"exportNum,omitempty"`           //导出数量/购买数量
-	RuleId         string `protobuf:"bytes,6,opt,name=ruleId,proto3" json:"ruleId,omitempty"`                  //使用规则标识
-	ExportTime     int64  `protobuf:"varint,7,opt,name=exportTime,proto3" json:"exportTime,omitempty"`         //导出时间/购买时间
-	UserType       int64  `protobuf:"varint,8,opt,name=userType,proto3" json:"userType,omitempty"`             //流水类型0使用1新增
-	DepartmentId   int64  `protobuf:"varint,9,opt,name=departmentId,proto3" json:"departmentId,omitempty"`     //组织标识
-	UserId         string `protobuf:"bytes,10,opt,name=userId,proto3" json:"userId,omitempty"`                 //用户标识
-	DeductionNumb  int64  `protobuf:"varint,11,opt,name=deductionNumb,proto3" json:"deductionNumb,omitempty"`  //扣除数量
-	Url            string `protobuf:"bytes,12,opt,name=url,proto3" json:"url,omitempty"`                       //下载地址
-	SearchCriteria string `protobuf:"bytes,13,opt,name=searchCriteria,proto3" json:"searchCriteria,omitempty"` //搜索条件
-	Source         string `protobuf:"bytes,14,opt,name=source,proto3" json:"source,omitempty"`                 //数据来源
-	Name           string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`                      //资源名称
+	AccountId     string `protobuf:"bytes,1,opt,name=accountId,proto3" json:"accountId,omitempty"`           //账户标识
+	CompanyId     int64  `protobuf:"varint,2,opt,name=companyId,proto3" json:"companyId,omitempty"`          //企业标识
+	ResourceType  string `protobuf:"bytes,3,opt,name=resourceType,proto3" json:"resourceType,omitempty"`     //资源类型
+	ExportNum     int64  `protobuf:"varint,4,opt,name=exportNum,proto3" json:"exportNum,omitempty"`          //导出数量/购买数量
+	RuleId        string `protobuf:"bytes,6,opt,name=ruleId,proto3" json:"ruleId,omitempty"`                 //使用规则标识
+	ExportTime    int64  `protobuf:"varint,7,opt,name=exportTime,proto3" json:"exportTime,omitempty"`        //导出时间/购买时间
+	UserType      int64  `protobuf:"varint,8,opt,name=userType,proto3" json:"userType,omitempty"`            //流水类型0使用1新增
+	DepartmentId  int64  `protobuf:"varint,9,opt,name=departmentId,proto3" json:"departmentId,omitempty"`    //组织标识
+	UserId        string `protobuf:"bytes,10,opt,name=userId,proto3" json:"userId,omitempty"`                //用户标识
+	DeductionNumb int64  `protobuf:"varint,11,opt,name=deductionNumb,proto3" json:"deductionNumb,omitempty"` //扣除数量
+	Remarks       string `protobuf:"bytes,12,opt,name=remarks,proto3" json:"remarks,omitempty"`              //备注
+	Name          string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`                     //资源名称
 }
 
 func (x *Detailed) Reset() {
@@ -502,23 +478,9 @@ func (x *Detailed) GetDeductionNumb() int64 {
 	return 0
 }
 
-func (x *Detailed) GetUrl() string {
+func (x *Detailed) GetRemarks() string {
 	if x != nil {
-		return x.Url
-	}
-	return ""
-}
-
-func (x *Detailed) GetSearchCriteria() string {
-	if x != nil {
-		return x.SearchCriteria
-	}
-	return ""
-}
-
-func (x *Detailed) GetSource() string {
-	if x != nil {
-		return x.Source
+		return x.Remarks
 	}
 	return ""
 }
@@ -701,18 +663,16 @@ type ConsumeRecord struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Id             int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
-	UserId         string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`                  //用户标识
-	Name           string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`                      //资源名称
-	ResourceType   string `protobuf:"bytes,4,opt,name=resourceType,proto3" json:"resourceType,omitempty"`      //资源代码
-	ExportNum      int64  `protobuf:"varint,5,opt,name=exportNum,proto3" json:"exportNum,omitempty"`           //导出数量
-	DeductionNumb  int64  `protobuf:"varint,6,opt,name=deductionNumb,proto3" json:"deductionNumb,omitempty"`   //扣除数量
-	RuleId         int64  `protobuf:"varint,7,opt,name=ruleId,proto3" json:"ruleId,omitempty"`                 //导出规则标识
-	ExportTime     string `protobuf:"bytes,8,opt,name=exportTime,proto3" json:"exportTime,omitempty"`          //导出时间
-	UserType       int64  `protobuf:"varint,9,opt,name=userType,proto3" json:"userType,omitempty"`             //消费、充值
-	Url            string `protobuf:"bytes,10,opt,name=url,proto3" json:"url,omitempty"`                       //下载地址
-	SearchCriteria string `protobuf:"bytes,11,opt,name=searchCriteria,proto3" json:"searchCriteria,omitempty"` //导出搜索条件
-	Source         string `protobuf:"bytes,12,opt,name=source,proto3" json:"source,omitempty"`                 //数据来源
+	Id            int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+	UserId        string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`                //用户标识
+	Name          string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`                    //资源名称
+	ResourceType  string `protobuf:"bytes,4,opt,name=resourceType,proto3" json:"resourceType,omitempty"`    //资源代码
+	ExportNum     int64  `protobuf:"varint,5,opt,name=exportNum,proto3" json:"exportNum,omitempty"`         //导出数量
+	DeductionNumb int64  `protobuf:"varint,6,opt,name=deductionNumb,proto3" json:"deductionNumb,omitempty"` //扣除数量
+	RuleId        int64  `protobuf:"varint,7,opt,name=ruleId,proto3" json:"ruleId,omitempty"`               //导出规则标识
+	ExportTime    string `protobuf:"bytes,8,opt,name=exportTime,proto3" json:"exportTime,omitempty"`        //导出时间
+	UserType      int64  `protobuf:"varint,9,opt,name=userType,proto3" json:"userType,omitempty"`           //消费、充值
+	Remarks       string `protobuf:"bytes,10,opt,name=remarks,proto3" json:"remarks,omitempty"`             //备注
 }
 
 func (x *ConsumeRecord) Reset() {
@@ -810,23 +770,9 @@ func (x *ConsumeRecord) GetUserType() int64 {
 	return 0
 }
 
-func (x *ConsumeRecord) GetUrl() string {
-	if x != nil {
-		return x.Url
-	}
-	return ""
-}
-
-func (x *ConsumeRecord) GetSearchCriteria() string {
+func (x *ConsumeRecord) GetRemarks() string {
 	if x != nil {
-		return x.SearchCriteria
-	}
-	return ""
-}
-
-func (x *ConsumeRecord) GetSource() string {
-	if x != nil {
-		return x.Source
+		return x.Remarks
 	}
 	return ""
 }
@@ -1317,7 +1263,7 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65,
 	0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x18,
 	0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xdb, 0x03, 0x0a, 0x09, 0x52, 0x65, 0x73,
+	0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xa3, 0x03, 0x0a, 0x09, 0x52, 0x65, 0x73,
 	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
 	0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75,
 	0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x49,
@@ -1335,44 +1281,37 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
 	0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d,
 	0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65,
-	0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
-	0x72, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x72, 0x69, 0x74,
-	0x65, 0x72, 0x69, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x61, 0x72,
-	0x63, 0x68, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f,
-	0x75, 0x72, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72,
-	0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x75,
-	0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x10,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52,
-	0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64,
-	0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16,
-	0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
-	0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xa4, 0x03, 0x0a, 0x08, 0x44, 0x65, 0x74, 0x61, 0x69,
-	0x6c, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64,
-	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49,
-	0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x02,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x49, 0x64, 0x12,
-	0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18,
-	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
-	0x79, 0x70, 0x65, 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, 0x16, 0x0a, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70,
-	0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65,
-	0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65,
-	0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65,
-	0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d,
-	0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x64, 0x65, 0x70,
-	0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65,
-	0x72, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
-	0x64, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75,
-	0x6d, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74,
-	0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0c,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x61,
-	0x72, 0x63, 0x68, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69,
-	0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+	0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x07, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e,
+	0x66, 0x6f, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x66, 0x6f,
+	0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52,
+	0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x64, 0x75,
+	0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x16,
+	0x0a, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+	0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xec,
+	0x02, 0x0a, 0x08, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61,
+	0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+	0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d,
+	0x70, 0x61, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6f,
+	0x6d, 0x70, 0x61, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72,
+	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 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, 0x16, 0x0a, 0x06, 0x72, 0x75, 0x6c,
+	0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49,
+	0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18,
+	0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d,
+	0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a,
+	0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x09, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49,
+	0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x64,
+	0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x12,
+	0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x07, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
 	0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa1, 0x01,
 	0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74, 0x68, 0x12,
 	0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12,
@@ -1392,7 +1331,7 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x72, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
 	0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
 	0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x06, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xd9, 0x02, 0x0a, 0x0d, 0x43, 0x6f,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xa1, 0x02, 0x0a, 0x0d, 0x43, 0x6f,
 	0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69,
 	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75,
 	0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65,
@@ -1409,94 +1348,92 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70,
 	0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,
 	0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,
-	0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43,
-	0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73,
-	0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x16, 0x0a,
-	0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73,
-	0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x2c, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
-	0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
-	0x74, 0x49, 0x64, 0x22, 0x66, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65,
-	0x71, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x69, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63,
-	0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63,
-	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75,
-	0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x0a,
-	0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 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, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x65,
-	0x61, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65,
-	0x70, 0x65, 0x61, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x64, 0x75,
-	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x12, 0x1c,
-	0x0a, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x4e, 0x75, 0x6d, 0x22, 0x74, 0x0a, 0x10,
-	0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73,
-	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, 0x32,
-	0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 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, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x64, 0x61,
-	0x74, 0x61, 0x22, 0x77, 0x0a, 0x11, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c,
-	0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 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, 0x34, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20,
-	0x03, 0x28, 0x0b, 0x32, 0x20, 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, 0x42, 0x61,
-	0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x71, 0x0a, 0x09, 0x52,
-	0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f,
-	0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63,
-	0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a,
-	0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
-	0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0x8a,
-	0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
-	0x52, 0x65, 0x73, 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, 0x32, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
-	0x1e, 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,
-	0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xf7, 0x03, 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,
+	0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x18, 0x0a,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x22, 0x2c, 0x0a,
+	0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a,
+	0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x66, 0x0a, 0x0a, 0x50,
+	0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x66,
+	0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x66, 0x6f, 0x49,
+	0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12,
+	0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
+	0x79, 0x70, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52,
+	0x65, 0x73, 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, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x4e, 0x75, 0x6d, 0x62,
+	0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d,
+	0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69,
+	0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e,
+	0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69,
+	0x6e, 0x4e, 0x75, 0x6d, 0x22, 0x74, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+	0x73, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 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, 0x32, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03,
+	0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 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,
+	0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x77, 0x0a, 0x11, 0x41, 0x63,
+	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 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, 0x34, 0x0a,
+	0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 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, 0x48, 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, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x64,
+	0x61, 0x74, 0x61, 0x22, 0x71, 0x0a, 0x09, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71,
+	0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16,
+	0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+	0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
+	0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
+	0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x73, 0x75,
+	0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 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, 0x32, 0x0a, 0x04, 0x64, 0x61, 0x74,
+	0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 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, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a,
+	0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f,
+	0x75, 0x6e, 0x74, 0x32, 0xf7, 0x03, 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, 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, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	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, 0x48, 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, 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, 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, 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 (

+ 10 - 10
rpc/resourcesCenterclient/resourcescenter.go

@@ -1,7 +1,7 @@
 // Code generated by goctl. DO NOT EDIT!
 // Source: resourcesCenter.proto
 
-//go:generate mockgen -destination ./resourcescenter_mock.go -package resourcescenterclient -source $GOFILE
+//go:generate mockgen -destination ./resourcescenter_mock.go -package resourcescenter -source $GOFILE
 
 package resourcesCenterclient
 
@@ -14,20 +14,20 @@ import (
 )
 
 type (
-	ResourcesAuth     = resourcesCenter.ResourcesAuth
-	RecordReq         = resourcesCenter.RecordReq
-	ConsumeRecordRes  = resourcesCenter.ConsumeRecordRes
-	PreviewReq        = resourcesCenter.PreviewReq
-	PreviewRes        = resourcesCenter.PreviewRes
+	ResourcesAuthRes  = resourcesCenter.ResourcesAuthRes
 	Response          = resourcesCenter.Response
 	Balance           = resourcesCenter.Balance
 	Detailed          = resourcesCenter.Detailed
-	ConsumeRecord     = resourcesCenter.ConsumeRecord
 	ResourcesReq      = resourcesCenter.ResourcesReq
-	Resources         = resourcesCenter.Resources
-	ResourceBalance   = resourcesCenter.ResourceBalance
-	ResourcesAuthRes  = resourcesCenter.ResourcesAuthRes
 	AccountBalanceRes = resourcesCenter.AccountBalanceRes
+	ResourceBalance   = resourcesCenter.ResourceBalance
+	PreviewReq        = resourcesCenter.PreviewReq
+	PreviewRes        = resourcesCenter.PreviewRes
+	Resources         = resourcesCenter.Resources
+	ResourcesAuth     = resourcesCenter.ResourcesAuth
+	ConsumeRecord     = resourcesCenter.ConsumeRecord
+	RecordReq         = resourcesCenter.RecordReq
+	ConsumeRecordRes  = resourcesCenter.ConsumeRecordRes
 
 	ResourcesCenter interface {
 		// 查询账户资源权限

+ 6 - 8
service/balanceService.go

@@ -42,7 +42,7 @@ func (service *BalanceService) PurchaseUserBalance(balanceData *resourcesCenter.
 		RuleId:       detailedData.RuleId,
 		Name:         detailedData.Name,
 		ExportTime:   time.Now().Local(),
-		UserType:     detailedData.UserType,
+		UserType:     1,
 	}
 	insertNumb, err := orm.Table(ConsumeRecord).Insert(&detailed)
 	if err != nil {
@@ -122,8 +122,8 @@ func (service *BalanceService) UseUserDetailed(duplicateRemoval int64, balanceDa
 	//去重
 	deductionNumb := detailedData.ExportNum
 	if duplicateRemoval == 1 {
-		url=url+"/data/dedupAndSave?personId="+detailedData.UserId+"&infoId="+infoId+"&accountId="+detailedData.AccountId
-		res, urlerr := http.PostForm( url, nil)
+		url = url + "/data/dedupAndSave?personId=" + detailedData.UserId + "&infoId=" + infoId + "&accountId=" + detailedData.AccountId
+		res, urlerr := http.PostForm(url, nil)
 		fmt.Println(url, urlerr)
 		defer res.Body.Close()
 		body, _ := ioutil.ReadAll(res.Body)
@@ -162,11 +162,9 @@ func (service *BalanceService) UseUserDetailed(duplicateRemoval int64, balanceDa
 		ExportNum:      detailedData.ExportNum,
 		RuleId:         detailedData.RuleId,
 		ExportTime:     time.Now().Local(),
-		UserType:       detailedData.UserType,
+		UserType:       0,
 		UserId:         detailedData.UserId,
-		Url:            detailedData.Url,
-		Source:         detailedData.Source,
-		SearchCriteria: detailedData.SearchCriteria,
+		Remarks:        detailedData.Remarks,
 		DeductionNumb:  deductionNumb,
 		Name:           detailedData.Name,
 	}
@@ -180,7 +178,7 @@ func (service *BalanceService) UseUserDetailed(duplicateRemoval int64, balanceDa
 		orm.Rollback()
 		return entity.ErrorCode, "新增流水失败"
 	}
-	if deductionNumb==0{
+	if deductionNumb == 0 {
 		return entity.SuccessCode, "修改结存成功"
 	}
 	//修改结存

+ 1 - 3
service/resourceManageService.go

@@ -73,9 +73,7 @@ func (service *ResourceManageService) FindConsumeRecord(in *resourcesCenter.Reco
 			ExportTime:     v.ExportTime,
 			UserType:       v.UserType,
 			DeductionNumb:  v.DeductionNumb,
-			Url:            v.Url,
-			SearchCriteria: v.SearchCriteria,
-			Source:         v.Source,
+			Remarks:        v.Remarks,
 		})
 	}
 	return dataList, nil