jiaojiao7 4 년 전
부모
커밋
c7ae7edfb8

+ 8 - 0
api/etc/integral-api.yaml

@@ -0,0 +1,8 @@
+Name: integral-api
+Host: 0.0.0.0
+Port: 8888
+resources:
+  Etcd:
+    Hosts:
+      - 127.0.0.1:2379
+    Key: resourcescenter.rpc

+ 45 - 0
api/integral.api

@@ -0,0 +1,45 @@
+syntax = "v1"
+
+type resourcesReq {
+	AccountId      string `json:"accountId"`               //账户标识
+	CompanyId      int64  `json:"companyId,optional"`      //企业标识
+	DepartmentId   int64  `json:"departmentId,optional"`   //组织标识
+	Name           string `json:"name"`                    //资源名称
+	ResourceType   string `json:"resourceType"`            //资源类型
+	Number         int64  `json:"number"`                  //数量
+	Spec           string `json:"spec,optional"`           //规格
+	AppId          string `json:"appId"`                   //标识
+	Model          int64  `json:"model"`                   //操作类型0使用1新增
+	RuleId         string `json:"ruleId,optional"`         //使用规则标识
+	UserId         string `json:"userId"`                  //用户标识
+	Url            string `json:"url,optional"`            //下载地址
+	SearchCriteria string `json:"searchCriteria,optional"` //搜索条件
+	Source         string `json:"source,optional"`         //数据来源
+}
+
+type resourcesRes {
+	// TODO: add members here and delete this comment
+	Code    int64  `form:"code"`
+	Message string `form:"message"`
+}
+type previewReq {
+	InfoId        string `json:"infoId,optional"`        //信息标识
+	AccountId     string `json:"accountId,optional"`     //企业标识
+	DeductionType string `json:"deductionType,optional"` //资源代码
+}
+
+type previewRes {
+	// TODO: add members here and delete this comment
+	Code          int64  `form:"code"`
+	Message       string `form:"message"`
+	RepeatNumb    int64  `form:"repeatNumb"`
+	DeductionNumb int64  `form:"deductionNumb"`
+}
+service integral-api {
+	//资源操作
+	@handler UpdateUserBalanceHandler // TODO: set handler name and delete this comment
+	post /updateUserBalance (resourcesReq) returns(previewRes)
+	//预览信息
+	@handler FindPreviewHandler // TODO: set handler name and delete this comment
+	post /findPreview (previewReq) returns(previewRes)
+}

+ 31 - 0
api/integral.go

@@ -0,0 +1,31 @@
+package main
+
+import (
+	"flag"
+	"fmt"
+
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/config"
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/handler"
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/svc"
+
+	"github.com/tal-tech/go-zero/core/conf"
+	"github.com/tal-tech/go-zero/rest"
+)
+
+var configFile = flag.String("f", "etc/integral-api.yaml", "the config file")
+
+func main() {
+	flag.Parse()
+
+	var c config.Config
+	conf.MustLoad(*configFile, &c)
+
+	ctx := svc.NewServiceContext(c)
+	server := rest.MustNewServer(c.RestConf)
+	defer server.Stop()
+
+	handler.RegisterHandlers(server, ctx)
+
+	fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
+	server.Start()
+}

+ 7 - 0
api/internal/config/config.go

@@ -0,0 +1,7 @@
+package config
+
+import "github.com/tal-tech/go-zero/rest"
+
+type Config struct {
+	rest.RestConf
+}

+ 29 - 0
api/internal/handler/findpreviewhandler.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 FindPreviewHandler(ctx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.PreviewReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.Error(w, err)
+			return
+		}
+
+		l := logic.NewFindPreviewLogic(r.Context(), ctx)
+		resp, err := l.FindPreview(req)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 27 - 0
api/internal/handler/routes.go

@@ -0,0 +1,27 @@
+// Code generated by goctl. DO NOT EDIT.
+package handler
+
+import (
+	"net/http"
+
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/svc"
+
+	"github.com/tal-tech/go-zero/rest"
+)
+
+func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
+	engine.AddRoutes(
+		[]rest.Route{
+			{
+				Method:  http.MethodPost,
+				Path:    "/updateUserBalance",
+				Handler: UpdateUserBalanceHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/findPreview",
+				Handler: FindPreviewHandler(serverCtx),
+			},
+		},
+	)
+}

+ 29 - 0
api/internal/handler/updateuserbalancehandler.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 UpdateUserBalanceHandler(ctx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.ResourcesReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.Error(w, err)
+			return
+		}
+
+		l := logic.NewUpdateUserBalanceLogic(r.Context(), ctx)
+		resp, err := l.UpdateUserBalance(req)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 30 - 0
api/internal/logic/findpreviewlogic.go

@@ -0,0 +1,30 @@
+package logic
+
+import (
+	"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 FindPreviewLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewFindPreviewLogic(ctx context.Context, svcCtx *svc.ServiceContext) FindPreviewLogic {
+	return FindPreviewLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *FindPreviewLogic) FindPreview(req types.PreviewReq) (*types.PreviewRes, error) {
+	// todo: add your logic here and delete this line
+
+	return &types.PreviewRes{}, nil
+}

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

@@ -0,0 +1,30 @@
+package logic
+
+import (
+	"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 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.PreviewRes, error) {
+	// todo: add your logic here and delete this line
+
+	return &types.PreviewRes{}, nil
+}

+ 15 - 0
api/internal/svc/servicecontext.go

@@ -0,0 +1,15 @@
+package svc
+
+import (
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/config"
+)
+
+type ServiceContext struct {
+	Config config.Config
+}
+
+func NewServiceContext(c config.Config) *ServiceContext {
+	return &ServiceContext{
+		Config: c,
+	}
+}

+ 37 - 0
api/internal/types/types.go

@@ -0,0 +1,37 @@
+// Code generated by goctl. DO NOT EDIT.
+package types
+
+type ResourcesReq struct {
+	AccountId      string `json:"accountId"`               //账户标识
+	CompanyId      int64  `json:"companyId,optional"`      //企业标识
+	DepartmentId   int64  `json:"departmentId,optional"`   //组织标识
+	Name           string `json:"name"`                    //资源名称
+	ResourceType   string `json:"resourceType"`            //资源类型
+	Number         int64  `json:"number"`                  //数量
+	Spec           string `json:"spec,optional"`           //规格
+	AppId          string `json:"appId"`                   //标识
+	Model          int64  `json:"model"`                   //操作类型0使用1新增
+	RuleId         string `json:"ruleId,optional"`         //使用规则标识
+	UserId         string `json:"userId"`                  //用户标识
+	Url            string `json:"url,optional"`            //下载地址
+	SearchCriteria string `json:"searchCriteria,optional"` //搜索条件
+	Source         string `json:"source,optional"`         //数据来源
+}
+
+type ResourcesRes struct {
+	Code    int64  `form:"code"`
+	Message string `form:"message"`
+}
+
+type PreviewReq struct {
+	InfoId        string `json:"infoId,optional"`        //信息标识
+	AccountId     string `json:"accountId,optional"`     //企业标识
+	DeductionType string `json:"deductionType,optional"` //资源代码
+}
+
+type PreviewRes struct {
+	Code          int64  `form:"code"`
+	Message       string `form:"message"`
+	RepeatNumb    int64  `form:"repeatNumb"`
+	DeductionNumb int64  `form:"deductionNumb"`
+}

+ 0 - 17
entity/department.go

@@ -1,17 +0,0 @@
-package entity
-
-import "time"
-
-type Department struct {
-	Id            int64     `xorm:"pk autoincr id" form:"id" json:"id"`
-	Name          string    `xorm:"name" form:"name" json:"name"`                            //组织名称
-	ShortName     string    `xorm:"shortName" form:"shortName" json:"shortName"`             //组织简称
-	ContactPerson string    `xorm:"contactPerson" form:"contactPerson" json:"contactPerson"` //联系人
-	ContactPhone  string    `xorm:"contactPhone" form:"contactPhone" json:"contactPhone"`    //联系人手机号
-	CompanyId     int64     `xorm:"companyId" form:"companyId" json:"companyId"`             //企业信息ID
-	ParentId      int64     `xorm:"parentId" form:"parentId" json:"parentId"`                //上级部门ID
-	CreateAt      time.Time `xorm:"createAt" form:"createAt" json:"createAt"`                //创建时间
-	UpdateAt      time.Time `xorm:"updateAt" form:"updateAt" json:"updateAt"`                //创建时间
-	DeleteAt      time.Time `xorm:"deleteAt" form:"deleteAt" json:"deleteAt"`                //创建时间
-	State         int64      `xorm:"state" form:"state" json:"state"`                         //状态(0-禁用,1-启用)
-}

+ 15 - 11
entity/detailed.go

@@ -3,15 +3,19 @@ package entity
 import "time"
 
 type Detailed struct {
-	Id            int64     `xorm:"pk autoincr id" form:"id" json:"id"`
-	AccountId     string     `xorm:"accountId" form:"accountId" json:"accountId"`             //账户标识
-	CompanyId     int64     `xorm:"companyId" form:"companyId" json:"companyId"`             //企业标识
-	DepartmentId  int64     `xorm:"departmentId" form:"departmentId" json:"departmentId"`    //组织标识
-	ResourceType  string    `xorm:"resourceType" form:"resourceType" json:"resourceType"`    //资源类型
-	ExportNum     int64     `xorm:"exportNum" form:"exportNum" json:"exportNum"`             //导出数量
-	DeductionType int64     `xorm:"deductionType" form:"deductionType" json:"deductionType"` //扣费类型(1高级字段包)
-	RuleId        int64     `xorm:"ruleId" form:"ruleId" json:"ruleId"`                      //使用规则标识
-	ExportTime    time.Time `xorm:"exportTime" form:"exportTime" json:"exportTime"`          //导出时间
-	UserType      int64     `xorm:"userType" form:"userType" json:"userType"`                //流水类型0使用1新增
-	UserId        string    `xorm:"userId" form:"userId" json:"userId"`                      //用户标识
+	Id             int64     `xorm:"pk autoincr id" form:"id" json:"id"`
+	AccountId      string    `xorm:"accountId" form:"accountId" json:"accountId"`                //账户标识
+	CompanyId      int64     `xorm:"companyId" form:"companyId" json:"companyId"`                //企业标识
+	DepartmentId   int64     `xorm:"departmentId" form:"departmentId" json:"departmentId"`       //组织标识
+	ResourceType   string    `xorm:"resourceType" form:"resourceType" json:"resourceType"`       //资源类型
+	ExportNum      int64     `xorm:"exportNum" form:"exportNum" json:"exportNum"`                //导出数量
+	DeductionType  int64     `xorm:"deductionType" form:"deductionType" json:"deductionType"`    //扣费类型(1高级字段包)
+	RuleId         string    `xorm:"ruleId" form:"ruleId" json:"ruleId"`                         //使用规则标识
+	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"`                         //数据来源
+	UserId         string    `xorm:"userId" form:"userId" json:"userId"`                         //用户标识
 }

+ 0 - 16
entity/employee.go

@@ -1,16 +0,0 @@
-package entity
-
-import "time"
-
-type Employee struct {
-	Id        int64     `xorm:"pk autoincr id" form:"id" json:"id"`
-	Name      string    `xorm:"name" form:"name" json:"name"`                //姓名
-	Sex       int64      `xorm:"sex" form:"sex" json:"sex"`                   //性别1男0女
-	Phone     string    `xorm:"phone" form:"phone" json:"phone"`             //手机号
-	Age       int64     `xorm:"age" form:"age" json:"age"`                   //年龄
-	State     int64      `xorm:"state" form:"state" json:"state"`             //公司状态(0-禁用,1-启用)
-	AuthState int64      `xorm:"authState" form:"authState" json:"authState"` //认证状态(0-未认证,1-已认证)
-	CreateAt  time.Time `xorm:"createAt" form:"createAt" json:"createAt"`    //创建时间
-	UpdateAt  time.Time `xorm:"updateAt" form:"updateAt" json:"updateAt"`    //创建时间
-	DeleteAt  time.Time `xorm:"deleteAt" form:"deleteAt" json:"deleteAt"`    //创建时间
-}

+ 31 - 0
rpc/internal/logic/findpreviewlogic.go

@@ -0,0 +1,31 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jyResourcesCenter/rpc/internal/svc"
+	"app.yhyue.com/moapp/jyResourcesCenter/rpc/resourcesCenter"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type FindPreviewLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewFindPreviewLogic(ctx context.Context, svcCtx *svc.ServiceContext) *FindPreviewLogic {
+	return &FindPreviewLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 预览信息
+func (l *FindPreviewLogic) FindPreview(in *resourcesCenter.PreviewReq) (*resourcesCenter.ConsumeRecordRes, error) {
+	// todo: add your logic here and delete this line
+
+	return &resourcesCenter.ConsumeRecordRes{}, nil
+}

+ 6 - 0
rpc/internal/server/resourcescenterserver.go

@@ -50,3 +50,9 @@ func (s *ResourcesCenterServer) UpdateUserDetailed(ctx context.Context, in *reso
 	l := logic.NewUpdateUserDetailedLogic(ctx, s.svcCtx)
 	return l.UpdateUserDetailed(in)
 }
+
+// 预览信息
+func (s *ResourcesCenterServer) FindPreview(ctx context.Context, in *resourcesCenter.PreviewReq) (*resourcesCenter.ConsumeRecordRes, error) {
+	l := logic.NewFindPreviewLogic(ctx, s.svcCtx)
+	return l.FindPreview(in)
+}

+ 19 - 1
rpc/resourcesCenter.proto

@@ -23,11 +23,16 @@ message Detailed {
     string resourceType = 3; //资源类型
     int64 exportNum = 4; //导出数量
     string deductionType = 5; //扣费类型(1高级字段包)
-    int64 ruleId = 6; //使用规则标识
+    string ruleId = 6; //使用规则标识
     int64 exportTime = 7; //导出时间
     int64 userType = 8; //流水类型0使用1新增
     int64 departmentId = 9; //组织标识
     string userId = 10; //用户标识
+    int64 deductionNumb = 11; //扣除数量
+    string url = 12; //下载地址
+    string searchCriteria = 13; //搜索条件
+    string source = 14; //数据来源
+
 }
 
 message ResourcesAuth {
@@ -70,6 +75,17 @@ message ResourcesReq {
     string accountId = 1;
 }
 
+message PreviewReq {
+    string infoId  = 1; //信息标识
+    string accountId = 2;  //企业标识
+    string deductionType = 3;  //资源代码
+}
+message PreviewRes {
+     int64 code = 1; //响应代码
+     string message = 2; //响应消息
+     int64  repeatNumb=3;//重复数量
+     int64  deductionNumb=4;//扣除数量
+}
 //根据账户标识查询资源权限请求参数
 message ResourcesAuthRes {
     int64 code = 1; //响应代码
@@ -112,4 +128,6 @@ service ResourcesCenter {
     rpc updateUserBalance (Balance) returns (Response);
     //根据账户标识记录资源使用流水账
     rpc updateUserDetailed (Detailed) returns (Response);
+    //预览信息
+    rpc findPreview (PreviewReq) returns (ConsumeRecordRes);
 }

+ 413 - 154
rpc/resourcesCenter/resourcesCenter.pb.go

@@ -201,16 +201,20 @@ 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"`        //导出数量
-	DeductionType string `protobuf:"bytes,5,opt,name=deductionType,proto3" json:"deductionType,omitempty"` //扣费类型(1高级字段包)
-	RuleId        int64  `protobuf:"varint,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"`              //用户标识
+	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"`           //导出数量
+	DeductionType  string `protobuf:"bytes,5,opt,name=deductionType,proto3" json:"deductionType,omitempty"`    //扣费类型(1高级字段包)
+	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"`                 //数据来源
 }
 
 func (x *Detailed) Reset() {
@@ -280,11 +284,11 @@ func (x *Detailed) GetDeductionType() string {
 	return ""
 }
 
-func (x *Detailed) GetRuleId() int64 {
+func (x *Detailed) GetRuleId() string {
 	if x != nil {
 		return x.RuleId
 	}
-	return 0
+	return ""
 }
 
 func (x *Detailed) GetExportTime() int64 {
@@ -315,6 +319,34 @@ func (x *Detailed) GetUserId() string {
 	return ""
 }
 
+func (x *Detailed) GetDeductionNumb() int64 {
+	if x != nil {
+		return x.DeductionNumb
+	}
+	return 0
+}
+
+func (x *Detailed) GetUrl() 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 ""
+}
+
 type ResourcesAuth struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -687,6 +719,140 @@ func (x *ResourcesReq) GetAccountId() string {
 	return ""
 }
 
+type PreviewReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	InfoId        string `protobuf:"bytes,1,opt,name=infoId,proto3" json:"infoId,omitempty"`               //信息标识
+	AccountId     string `protobuf:"bytes,2,opt,name=accountId,proto3" json:"accountId,omitempty"`         //企业标识
+	DeductionType string `protobuf:"bytes,3,opt,name=deductionType,proto3" json:"deductionType,omitempty"` //资源代码
+}
+
+func (x *PreviewReq) Reset() {
+	*x = PreviewReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_resourcesCenter_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *PreviewReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PreviewReq) ProtoMessage() {}
+
+func (x *PreviewReq) ProtoReflect() protoreflect.Message {
+	mi := &file_resourcesCenter_proto_msgTypes[7]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use PreviewReq.ProtoReflect.Descriptor instead.
+func (*PreviewReq) Descriptor() ([]byte, []int) {
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *PreviewReq) GetInfoId() string {
+	if x != nil {
+		return x.InfoId
+	}
+	return ""
+}
+
+func (x *PreviewReq) GetAccountId() string {
+	if x != nil {
+		return x.AccountId
+	}
+	return ""
+}
+
+func (x *PreviewReq) GetDeductionType() string {
+	if x != nil {
+		return x.DeductionType
+	}
+	return ""
+}
+
+type PreviewRes struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Code          int64  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`                   //响应代码
+	Message       string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`              //响应消息
+	RepeatNumb    int64  `protobuf:"varint,3,opt,name=repeatNumb,proto3" json:"repeatNumb,omitempty"`       //重复数量
+	DeductionNumb int64  `protobuf:"varint,4,opt,name=deductionNumb,proto3" json:"deductionNumb,omitempty"` //扣除数量
+}
+
+func (x *PreviewRes) Reset() {
+	*x = PreviewRes{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_resourcesCenter_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *PreviewRes) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PreviewRes) ProtoMessage() {}
+
+func (x *PreviewRes) ProtoReflect() protoreflect.Message {
+	mi := &file_resourcesCenter_proto_msgTypes[8]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use PreviewRes.ProtoReflect.Descriptor instead.
+func (*PreviewRes) Descriptor() ([]byte, []int) {
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *PreviewRes) GetCode() int64 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *PreviewRes) GetMessage() string {
+	if x != nil {
+		return x.Message
+	}
+	return ""
+}
+
+func (x *PreviewRes) GetRepeatNumb() int64 {
+	if x != nil {
+		return x.RepeatNumb
+	}
+	return 0
+}
+
+func (x *PreviewRes) GetDeductionNumb() int64 {
+	if x != nil {
+		return x.DeductionNumb
+	}
+	return 0
+}
+
 //根据账户标识查询资源权限请求参数
 type ResourcesAuthRes struct {
 	state         protoimpl.MessageState
@@ -701,7 +867,7 @@ type ResourcesAuthRes struct {
 func (x *ResourcesAuthRes) Reset() {
 	*x = ResourcesAuthRes{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resourcesCenter_proto_msgTypes[7]
+		mi := &file_resourcesCenter_proto_msgTypes[9]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -714,7 +880,7 @@ func (x *ResourcesAuthRes) String() string {
 func (*ResourcesAuthRes) ProtoMessage() {}
 
 func (x *ResourcesAuthRes) ProtoReflect() protoreflect.Message {
-	mi := &file_resourcesCenter_proto_msgTypes[7]
+	mi := &file_resourcesCenter_proto_msgTypes[9]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -727,7 +893,7 @@ func (x *ResourcesAuthRes) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ResourcesAuthRes.ProtoReflect.Descriptor instead.
 func (*ResourcesAuthRes) Descriptor() ([]byte, []int) {
-	return file_resourcesCenter_proto_rawDescGZIP(), []int{7}
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{9}
 }
 
 func (x *ResourcesAuthRes) GetCode() int64 {
@@ -765,7 +931,7 @@ type AccountBalanceRes struct {
 func (x *AccountBalanceRes) Reset() {
 	*x = AccountBalanceRes{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resourcesCenter_proto_msgTypes[8]
+		mi := &file_resourcesCenter_proto_msgTypes[10]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -778,7 +944,7 @@ func (x *AccountBalanceRes) String() string {
 func (*AccountBalanceRes) ProtoMessage() {}
 
 func (x *AccountBalanceRes) ProtoReflect() protoreflect.Message {
-	mi := &file_resourcesCenter_proto_msgTypes[8]
+	mi := &file_resourcesCenter_proto_msgTypes[10]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -791,7 +957,7 @@ func (x *AccountBalanceRes) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use AccountBalanceRes.ProtoReflect.Descriptor instead.
 func (*AccountBalanceRes) Descriptor() ([]byte, []int) {
-	return file_resourcesCenter_proto_rawDescGZIP(), []int{8}
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{10}
 }
 
 func (x *AccountBalanceRes) GetCode() int64 {
@@ -830,7 +996,7 @@ type RecordReq struct {
 func (x *RecordReq) Reset() {
 	*x = RecordReq{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resourcesCenter_proto_msgTypes[9]
+		mi := &file_resourcesCenter_proto_msgTypes[11]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -843,7 +1009,7 @@ func (x *RecordReq) String() string {
 func (*RecordReq) ProtoMessage() {}
 
 func (x *RecordReq) ProtoReflect() protoreflect.Message {
-	mi := &file_resourcesCenter_proto_msgTypes[9]
+	mi := &file_resourcesCenter_proto_msgTypes[11]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -856,7 +1022,7 @@ func (x *RecordReq) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use RecordReq.ProtoReflect.Descriptor instead.
 func (*RecordReq) Descriptor() ([]byte, []int) {
-	return file_resourcesCenter_proto_rawDescGZIP(), []int{9}
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{11}
 }
 
 func (x *RecordReq) GetAccountId() string {
@@ -901,7 +1067,7 @@ type ConsumeRecordRes struct {
 func (x *ConsumeRecordRes) Reset() {
 	*x = ConsumeRecordRes{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resourcesCenter_proto_msgTypes[10]
+		mi := &file_resourcesCenter_proto_msgTypes[12]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -914,7 +1080,7 @@ func (x *ConsumeRecordRes) String() string {
 func (*ConsumeRecordRes) ProtoMessage() {}
 
 func (x *ConsumeRecordRes) ProtoReflect() protoreflect.Message {
-	mi := &file_resourcesCenter_proto_msgTypes[10]
+	mi := &file_resourcesCenter_proto_msgTypes[12]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -927,7 +1093,7 @@ func (x *ConsumeRecordRes) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ConsumeRecordRes.ProtoReflect.Descriptor instead.
 func (*ConsumeRecordRes) Descriptor() ([]byte, []int) {
-	return file_resourcesCenter_proto_rawDescGZIP(), []int{10}
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{12}
 }
 
 func (x *ConsumeRecordRes) GetCode() int64 {
@@ -982,8 +1148,8 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70,
 	0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28,
 	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, 0x22, 0xbe,
-	0x02, 0x0a, 0x08, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61,
+	0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0xb6,
+	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,
@@ -994,7 +1160,7 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x64,
 	0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
 	0x52, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12,
-	0x16, 0x0a, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52,
+	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,
@@ -1002,116 +1168,143 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	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, 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, 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,
-	0x20, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x49, 0x64, 0x18, 0x03,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x49,
-	0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f,
-	0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x14, 0x0a,
-	0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74,
-	0x61, 0x74, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
-	0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d,
-	0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65,
-	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, 0xa5, 0x03, 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, 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, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d,
-	0x70, 0x61, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x03, 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, 0x04, 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, 0x05, 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, 0x03, 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, 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, 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, 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,
-	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, 0xac,
-	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, 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, 0x48, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74,
-	0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x72,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x42,
-	0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 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, 0x4a, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44,
-	0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
-	0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
-	0x65, 0x64, 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, 0x62, 0x06, 0x70,
-	0x72, 0x6f, 0x74, 0x6f, 0x33,
+	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, 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, 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, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x73, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65,
+	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x6f,
+	0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x12,
+	0x14, 0x0a, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
+	0x72, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x0f,
+	0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12,
+	0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 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, 0x12, 0x0a,
+	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+	0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 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, 0xa5, 0x03, 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, 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, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x03,
+	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,
+	0x04, 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, 0x05, 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,
+	0x03, 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, 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, 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, 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, 0x68, 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, 0x24, 0x0a, 0x0d, 0x64,
+	0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
+	0x65, 0x22, 0x80, 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, 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, 0xfb, 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, 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, 0x48, 0x0a, 0x11,
+	0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
+	0x65, 0x12, 0x18, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e,
+	0x74, 0x65, 0x72, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 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, 0x4a, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
+	0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x19, 0x2e, 0x72,
+	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x44,
+	0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 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, 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, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -1126,7 +1319,7 @@ func file_resourcesCenter_proto_rawDescGZIP() []byte {
 	return file_resourcesCenter_proto_rawDescData
 }
 
-var file_resourcesCenter_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
+var file_resourcesCenter_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
 var file_resourcesCenter_proto_goTypes = []interface{}{
 	(*Response)(nil),          // 0: resourcesCenter.Response
 	(*Balance)(nil),           // 1: resourcesCenter.Balance
@@ -1135,10 +1328,12 @@ var file_resourcesCenter_proto_goTypes = []interface{}{
 	(*ResourceBalance)(nil),   // 4: resourcesCenter.ResourceBalance
 	(*ConsumeRecord)(nil),     // 5: resourcesCenter.ConsumeRecord
 	(*ResourcesReq)(nil),      // 6: resourcesCenter.ResourcesReq
-	(*ResourcesAuthRes)(nil),  // 7: resourcesCenter.ResourcesAuthRes
-	(*AccountBalanceRes)(nil), // 8: resourcesCenter.AccountBalanceRes
-	(*RecordReq)(nil),         // 9: resourcesCenter.RecordReq
-	(*ConsumeRecordRes)(nil),  // 10: resourcesCenter.ConsumeRecordRes
+	(*PreviewReq)(nil),        // 7: resourcesCenter.PreviewReq
+	(*PreviewRes)(nil),        // 8: resourcesCenter.PreviewRes
+	(*ResourcesAuthRes)(nil),  // 9: resourcesCenter.ResourcesAuthRes
+	(*AccountBalanceRes)(nil), // 10: resourcesCenter.AccountBalanceRes
+	(*RecordReq)(nil),         // 11: resourcesCenter.RecordReq
+	(*ConsumeRecordRes)(nil),  // 12: resourcesCenter.ConsumeRecordRes
 }
 var file_resourcesCenter_proto_depIdxs = []int32{
 	3,  // 0: resourcesCenter.ResourcesAuthRes.data:type_name -> resourcesCenter.ResourcesAuth
@@ -1146,16 +1341,18 @@ var file_resourcesCenter_proto_depIdxs = []int32{
 	5,  // 2: resourcesCenter.ConsumeRecordRes.data:type_name -> resourcesCenter.ConsumeRecord
 	6,  // 3: resourcesCenter.ResourcesCenter.findResourcesAuth:input_type -> resourcesCenter.ResourcesReq
 	6,  // 4: resourcesCenter.ResourcesCenter.findAccountBalance:input_type -> resourcesCenter.ResourcesReq
-	9,  // 5: resourcesCenter.ResourcesCenter.findConsumeRecord:input_type -> resourcesCenter.RecordReq
+	11, // 5: resourcesCenter.ResourcesCenter.findConsumeRecord:input_type -> resourcesCenter.RecordReq
 	1,  // 6: resourcesCenter.ResourcesCenter.updateUserBalance:input_type -> resourcesCenter.Balance
 	2,  // 7: resourcesCenter.ResourcesCenter.updateUserDetailed:input_type -> resourcesCenter.Detailed
-	8,  // 8: resourcesCenter.ResourcesCenter.findResourcesAuth:output_type -> resourcesCenter.AccountBalanceRes
-	8,  // 9: resourcesCenter.ResourcesCenter.findAccountBalance:output_type -> resourcesCenter.AccountBalanceRes
-	10, // 10: resourcesCenter.ResourcesCenter.findConsumeRecord:output_type -> resourcesCenter.ConsumeRecordRes
-	0,  // 11: resourcesCenter.ResourcesCenter.updateUserBalance:output_type -> resourcesCenter.Response
-	0,  // 12: resourcesCenter.ResourcesCenter.updateUserDetailed:output_type -> resourcesCenter.Response
-	8,  // [8:13] is the sub-list for method output_type
-	3,  // [3:8] is the sub-list for method input_type
+	7,  // 8: resourcesCenter.ResourcesCenter.findPreview:input_type -> resourcesCenter.PreviewReq
+	10, // 9: resourcesCenter.ResourcesCenter.findResourcesAuth:output_type -> resourcesCenter.AccountBalanceRes
+	10, // 10: resourcesCenter.ResourcesCenter.findAccountBalance:output_type -> resourcesCenter.AccountBalanceRes
+	12, // 11: resourcesCenter.ResourcesCenter.findConsumeRecord:output_type -> resourcesCenter.ConsumeRecordRes
+	0,  // 12: resourcesCenter.ResourcesCenter.updateUserBalance:output_type -> resourcesCenter.Response
+	0,  // 13: resourcesCenter.ResourcesCenter.updateUserDetailed:output_type -> resourcesCenter.Response
+	12, // 14: resourcesCenter.ResourcesCenter.findPreview:output_type -> resourcesCenter.ConsumeRecordRes
+	9,  // [9:15] is the sub-list for method output_type
+	3,  // [3:9] is the sub-list for method input_type
 	3,  // [3:3] is the sub-list for extension type_name
 	3,  // [3:3] is the sub-list for extension extendee
 	0,  // [0:3] is the sub-list for field type_name
@@ -1252,7 +1449,7 @@ func file_resourcesCenter_proto_init() {
 			}
 		}
 		file_resourcesCenter_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*ResourcesAuthRes); i {
+			switch v := v.(*PreviewReq); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1264,7 +1461,7 @@ func file_resourcesCenter_proto_init() {
 			}
 		}
 		file_resourcesCenter_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*AccountBalanceRes); i {
+			switch v := v.(*PreviewRes); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1276,7 +1473,7 @@ func file_resourcesCenter_proto_init() {
 			}
 		}
 		file_resourcesCenter_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*RecordReq); i {
+			switch v := v.(*ResourcesAuthRes); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -1288,6 +1485,30 @@ func file_resourcesCenter_proto_init() {
 			}
 		}
 		file_resourcesCenter_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AccountBalanceRes); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_resourcesCenter_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*RecordReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_resourcesCenter_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*ConsumeRecordRes); i {
 			case 0:
 				return &v.state
@@ -1306,7 +1527,7 @@ func file_resourcesCenter_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_resourcesCenter_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   11,
+			NumMessages:   13,
 			NumExtensions: 0,
 			NumServices:   1,
 		},
@@ -1342,6 +1563,8 @@ type ResourcesCenterClient interface {
 	UpdateUserBalance(ctx context.Context, in *Balance, opts ...grpc.CallOption) (*Response, error)
 	//根据账户标识记录资源使用流水账
 	UpdateUserDetailed(ctx context.Context, in *Detailed, opts ...grpc.CallOption) (*Response, error)
+	//预览信息
+	FindPreview(ctx context.Context, in *PreviewReq, opts ...grpc.CallOption) (*ConsumeRecordRes, error)
 }
 
 type resourcesCenterClient struct {
@@ -1397,6 +1620,15 @@ func (c *resourcesCenterClient) UpdateUserDetailed(ctx context.Context, in *Deta
 	return out, nil
 }
 
+func (c *resourcesCenterClient) FindPreview(ctx context.Context, in *PreviewReq, opts ...grpc.CallOption) (*ConsumeRecordRes, error) {
+	out := new(ConsumeRecordRes)
+	err := c.cc.Invoke(ctx, "/resourcesCenter.ResourcesCenter/findPreview", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // ResourcesCenterServer is the server API for ResourcesCenter service.
 type ResourcesCenterServer interface {
 	//查询账户资源权限
@@ -1409,6 +1641,8 @@ type ResourcesCenterServer interface {
 	UpdateUserBalance(context.Context, *Balance) (*Response, error)
 	//根据账户标识记录资源使用流水账
 	UpdateUserDetailed(context.Context, *Detailed) (*Response, error)
+	//预览信息
+	FindPreview(context.Context, *PreviewReq) (*ConsumeRecordRes, error)
 }
 
 // UnimplementedResourcesCenterServer can be embedded to have forward compatible implementations.
@@ -1430,6 +1664,9 @@ func (*UnimplementedResourcesCenterServer) UpdateUserBalance(context.Context, *B
 func (*UnimplementedResourcesCenterServer) UpdateUserDetailed(context.Context, *Detailed) (*Response, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method UpdateUserDetailed not implemented")
 }
+func (*UnimplementedResourcesCenterServer) FindPreview(context.Context, *PreviewReq) (*ConsumeRecordRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method FindPreview not implemented")
+}
 
 func RegisterResourcesCenterServer(s *grpc.Server, srv ResourcesCenterServer) {
 	s.RegisterService(&_ResourcesCenter_serviceDesc, srv)
@@ -1525,6 +1762,24 @@ func _ResourcesCenter_UpdateUserDetailed_Handler(srv interface{}, ctx context.Co
 	return interceptor(ctx, in, info, handler)
 }
 
+func _ResourcesCenter_FindPreview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PreviewReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ResourcesCenterServer).FindPreview(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/resourcesCenter.ResourcesCenter/FindPreview",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ResourcesCenterServer).FindPreview(ctx, req.(*PreviewReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 var _ResourcesCenter_serviceDesc = grpc.ServiceDesc{
 	ServiceName: "resourcesCenter.ResourcesCenter",
 	HandlerType: (*ResourcesCenterServer)(nil),
@@ -1549,6 +1804,10 @@ var _ResourcesCenter_serviceDesc = grpc.ServiceDesc{
 			MethodName: "updateUserDetailed",
 			Handler:    _ResourcesCenter_UpdateUserDetailed_Handler,
 		},
+		{
+			MethodName: "findPreview",
+			Handler:    _ResourcesCenter_FindPreview_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "resourcesCenter.proto",

+ 15 - 5
rpc/resourcesCenterclient/resourcescenter.go

@@ -14,17 +14,19 @@ import (
 )
 
 type (
+	Balance           = resourcesCenter.Balance
+	ResourcesAuth     = resourcesCenter.ResourcesAuth
+	ResourceBalance   = resourcesCenter.ResourceBalance
 	ResourcesAuthRes  = resourcesCenter.ResourcesAuthRes
+	AccountBalanceRes = resourcesCenter.AccountBalanceRes
+	RecordReq         = resourcesCenter.RecordReq
 	ConsumeRecordRes  = resourcesCenter.ConsumeRecordRes
 	Response          = resourcesCenter.Response
-	Balance           = resourcesCenter.Balance
 	Detailed          = resourcesCenter.Detailed
-	ResourcesAuth     = resourcesCenter.ResourcesAuth
 	ConsumeRecord     = resourcesCenter.ConsumeRecord
-	ResourceBalance   = resourcesCenter.ResourceBalance
 	ResourcesReq      = resourcesCenter.ResourcesReq
-	AccountBalanceRes = resourcesCenter.AccountBalanceRes
-	RecordReq         = resourcesCenter.RecordReq
+	PreviewReq        = resourcesCenter.PreviewReq
+	PreviewRes        = resourcesCenter.PreviewRes
 
 	ResourcesCenter interface {
 		// 查询账户资源权限
@@ -37,6 +39,8 @@ type (
 		UpdateUserBalance(ctx context.Context, in *Balance) (*Response, error)
 		// 根据账户标识记录资源使用流水账
 		UpdateUserDetailed(ctx context.Context, in *Detailed) (*Response, error)
+		// 预览信息
+		FindPreview(ctx context.Context, in *PreviewReq) (*ConsumeRecordRes, error)
 	}
 
 	defaultResourcesCenter struct {
@@ -79,3 +83,9 @@ func (m *defaultResourcesCenter) UpdateUserDetailed(ctx context.Context, in *Det
 	client := resourcesCenter.NewResourcesCenterClient(m.cli.Conn())
 	return client.UpdateUserDetailed(ctx, in)
 }
+
+// 预览信息
+func (m *defaultResourcesCenter) FindPreview(ctx context.Context, in *PreviewReq) (*ConsumeRecordRes, error) {
+	client := resourcesCenter.NewResourcesCenterClient(m.cli.Conn())
+	return client.FindPreview(ctx, in)
+}

+ 13 - 9
service/balanceService.go

@@ -88,15 +88,19 @@ func (service *BalanceService) UpdateUserDetailed(in *resourcesCenter.Detailed)
 	orm := entity.Engine
 	//新增流水记录
 	detailed := entity.Detailed{
-		AccountId:    in.AccountId,
-		CompanyId:    in.CompanyId,
-		DepartmentId: in.DepartmentId,
-		ResourceType: in.ResourceType,
-		ExportNum:    in.ExportNum,
-		RuleId:       in.RuleId,
-		ExportTime:   time.Now().Local(),
-		UserType:     in.UserType,
-		UserId:       in.UserId,
+		AccountId:      in.AccountId,
+		CompanyId:      in.CompanyId,
+		DepartmentId:   in.DepartmentId,
+		ResourceType:   in.ResourceType,
+		ExportNum:      in.ExportNum,
+		RuleId:         in.RuleId,
+		ExportTime:     time.Now().Local(),
+		UserType:       in.UserType,
+		UserId:         in.UserId,
+		Url:            in.Url,
+		Source:         in.Source,
+		SearchCriteria: in.SearchCriteria,
+		DeductionNumb:  in.DeductionNumb,
 	}
 	insertNumb, err := orm.Table(ConsumeRecord).Insert(&detailed)
 	if err != nil {

+ 0 - 32
util/iterator.go

@@ -1,32 +0,0 @@
-package util
-
-import "app.yhyue.com/moapp/jyResourcesCenter/entity"
-
-type Iterator struct {
-	*Iter
-	data []*entity.Employee
-}
-
-func New(data []*entity.Employee) *Iterator {
-	return &Iterator{data: data, Iter: &Iter{len: len(data)}}
-}
-
-func (this *Iterator) Next() *entity.Employee {
-	defer func() {
-		this.index++
-	}()
-	return this.data[this.index]
-}
-
-/*公用*/
-type Iter struct {
-	index int
-	len   int
-}
-
-func (this *Iter) HasNext() bool {
-	if this.len == 0 {
-		return false
-	}
-	return this.index < this.len
-}