Pārlūkot izejas kodu

p676代码提交

Jianghan 5 mēneši atpakaļ
vecāks
revīzija
b5f21dbaa3

+ 96 - 50
api/integral.api

@@ -1,37 +1,38 @@
 syntax = "v1"
 
 type purchResourcesReq {
-	AccountId    string `form:"accountId"`             //账户标识
-	CompanyId    int64  `form:"companyId,optional"`    //企业标识
+	AccountId    string `form:"accountId"` //账户标识
+	CompanyId    int64  `form:"companyId,optional"` //企业标识
 	DepartmentId int64  `form:"departmentId,optional"` //组织标识
-	Name         string `form:"name"`                  //资源名称
+	Name         string `form:"name"` //资源名称
 	ResourceType string `form:"resourceType,optional"` //资源类型
-	Number       int64  `form:"number"`                //数量
-	Spec         string `form:"spec,optional"`         //规格
-	AppId        string `form:"appId"`                 //标识
-	EndTime      string `form:"endTime,optional"`      //新增时数据包截止时间
-	VipTime      string `form:"vipTime,optional"`      //超级订阅时间
-	Remarks      string `form:"remarks,optional"`      //备注
+	Number       int64  `form:"number"` //数量
+	Spec         string `form:"spec,optional"` //规格
+	AppId        string `form:"appId"` //标识
+	EndTime      string `form:"endTime,optional"` //新增时数据包截止时间
+	VipTime      string `form:"vipTime,optional"` //超级订阅时间
+	Remarks      string `form:"remarks,optional"` //备注
 }
 
 type vipReq {
-	VipTime   string `form:"vipTime,optional"`   //超级订阅时间
+	VipTime   string `form:"vipTime,optional"` //超级订阅时间
 	AccountId string `form:"accountId,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,optional"`     //资源类型
-	Number           int64  `form:"number"`                    //数量
-	AppId            string `form:"appId"`                     //标识
-	RuleId           string `form:"ruleId,optional"`           //使用规则标识
-	UserId           string `form:"userId"`                    //用户标识
-	Remarks          string `form:"remarks,optional"`          //备注
-	InfoId           string `form:"infoId,optional"`           //信息标识
+	AccountId        string `form:"accountId"` //账户标识
+	CompanyId        int64  `form:"companyId,optional"` //企业标识
+	DepartmentId     int64  `form:"departmentId,optional"` //组织标识
+	Name             string `form:"name"` //资源名称
+	ResourceType     string `form:"resourceType,optional"` //资源类型
+	Number           int64  `form:"number"` //数量
+	AppId            string `form:"appId"` //标识
+	RuleId           string `form:"ruleId,optional"` //使用规则标识
+	UserId           string `form:"userId"` //用户标识
+	Remarks          string `form:"remarks,optional"` //备注
+	InfoId           string `form:"infoId,optional"` //信息标识
 	DuplicateRemoval int64  `form:"duplicateRemoval,optional"` //是否去重0不去1去重
-	VipState         int64  `form:"vipState,optional"`         //超级订阅状态
+	VipState         int64  `form:"vipState,optional"` //超级订阅状态
 }
 
 type resourcesRes {
@@ -39,15 +40,17 @@ type resourcesRes {
 	Code    int64  `json:"code"`
 	Message string `json:"message"`
 }
+
 type useUserResponse {
 	// TODO: add members here and delete this comment
 	Code          int64  `json:"code"`
 	Message       string `json:"message"`
 	DeductionNumb int64  `json:"deductionNumb"`
 }
+
 type previewReq {
-	InfoId       string `form:"infoId,optional"`       //信息标识
-	AccountId    string `form:"accountId,optional"`    //企业标识
+	InfoId       string `form:"infoId,optional"` //信息标识
+	AccountId    string `form:"accountId,optional"` //企业标识
 	ResourceType string `form:"resourceType,optional"` //资源类型
 }
 
@@ -62,12 +65,12 @@ type previewRes {
 //流水账请求参数返回参数
 type recordReq {
 	AccountId    string `form:"accountId,optional"` //企业标识
-	UserId       string `form:"userId,optional"`    //用户标识
+	UserId       string `form:"userId,optional"` //用户标识
 	Page         int64  `form:"page,optional"`
 	PageSize     int64  `form:"pageSize,optional"`
 	ResourceType string `form:"resourceType,optional"` //资源类型
-	State        int64  `form:"state,optional"`        //0查消耗记录 1 查充值记录 2 新增 作废 -1查询全部
-	QueryTime    string `form:"queryTime,optional"`    //查询时间
+	State        int64  `form:"state,optional"` //0查消耗记录 1 查充值记录 2 新增 作废 -1查询全部
+	QueryTime    string `form:"queryTime,optional"` //查询时间
 }
 
 type recordRes {
@@ -79,8 +82,8 @@ type recordRes {
 
 //查询用户资源权限
 type authReq {
-	AccountId    string `form:"accountId,optional"`    //企业标识
-	UserId       string `form:"userId,optional"`       //用户标识
+	AccountId    string `form:"accountId,optional"` //企业标识
+	UserId       string `form:"userId,optional"` //用户标识
 	ResourceType string `form:"resourceType,optional"` //资源类型
 }
 
@@ -92,13 +95,14 @@ type authRes {
 
 //账户余额
 type balanceReq {
-	AccountId      string `form:"accountId,optional"`      //企业标识
-	UserId         string `form:"userId,optional"`         //用户标识
-	ResourceType   string `form:"resourceType,optional"`   //资源类型
-	ResourceName   string `form:"resourceName,optional"`   //资源名字
+	AccountId      string `form:"accountId,optional"` //企业标识
+	UserId         string `form:"userId,optional"` //用户标识
+	ResourceType   string `form:"resourceType,optional"` //资源类型
+	ResourceName   string `form:"resourceName,optional"` //资源名字
 	ShowMinEndTime int64  `form:"showMinEndTime,optional"` //是否展示最近到期时间 1是 0不展示
-	VipState       int64  `form:"vipState,optional"`       //超级订阅状态
+	VipState       int64  `form:"vipState,optional"` //超级订阅状态
 }
+
 type balanceRes {
 	Code    int64                    `json:"code"`
 	Message string                   `json:"message"`
@@ -106,24 +110,24 @@ type balanceRes {
 }
 
 type mergeInfo {
-	MergeUser  string `form:"mergeUser"`  //合并用户
+	MergeUser  string `form:"mergeUser"` //合并用户
 	MergedUser string `form:"mergedUser"` //被合并用户
-	AppId      string `form:"appId"`      //身份标识
+	AppId      string `form:"appId"` //身份标识
 }
 
 type EntSourceNumAdd {
-	AccountId    string `form:"accountId,optional"`    //账户标识
-	CompanyId    int64  `form:"companyId,optional"`    //企业标识
+	AccountId    string `form:"accountId,optional"` //账户标识
+	CompanyId    int64  `form:"companyId,optional"` //企业标识
 	DepartmentId string `form:"departmentId,optional"` //组织标识
-	EmpowerId    int64  `form:"empowerId,optional"`    //套餐id
-	UserId       string `form:"userId,optional"`       //用户标识
-	Name         string `form:"name,optional"`         //资源名称
+	EmpowerId    int64  `form:"empowerId,optional"` //套餐id
+	UserId       string `form:"userId,optional"` //用户标识
+	Name         string `form:"name,optional"` //资源名称
 	ResourceType string `form:"resourceType,optional"` //资源类型
-	Number       int64  `form:"number,optional"`       //资源数量
-	Spec         string `form:"spec,optional"`         //规格
-	AppId        string `form:"appId,optional"`        //标识
-	EndTime      string `form:"endTime,optional"`      //资源有效时间
-	Remarks      string `form:"remarks,optional"`      //备注
+	Number       int64  `form:"number,optional"` //资源数量
+	Spec         string `form:"spec,optional"` //规格
+	AppId        string `form:"appId,optional"` //标识
+	EndTime      string `form:"endTime,optional"` //资源有效时间
+	Remarks      string `form:"remarks,optional"` //备注
 }
 
 type EntAccountAdd {
@@ -132,44 +136,86 @@ type EntAccountAdd {
 }
 
 type EntOperateReq {
-	CompanyId        int64  `form:"companyId,optional"`        //企业标识
-	EmpowerId        int64  `form:"empowerId,optional"`        //套餐id
-	ResourceType     string `form:"resourceType,optional"`     //资源类型
+	CompanyId        int64  `form:"companyId,optional"` //企业标识
+	EmpowerId        int64  `form:"empowerId,optional"` //套餐id
+	ResourceType     string `form:"resourceType,optional"` //资源类型
 	OperateAccountId string `form:"operateAccountId,optional"` //操作账户
 }
 
+type ChargeAccountReq {
+	EntId  int64 `form:"entId,optional"`
+	UserId int64 `form:"userId,optional"`
+}
+
+type ChargeReq {
+	EntId       int64  `form:"entId,optional"`
+	UserId      int64  `form:"userId,optional"`
+	EntUserId   int64  `form:"entUserId,optional"`
+	ExportNum   int64  `form:"exportNum,optional"`
+	DeductNum   int64  `form:"deductNum,optional"`
+	DownloadUrl string `form:"downloadUrl,optional"`
+	Filter      string `form:"filter,optional"`
+	PositionId  string `form:"positionId,optional"`
+	AccountId   string `form:"accountId,optional"`
+}
+
+type chargeResp {
+	Code    int64       `json:"code"`
+	Message string      `json:"message"`
+	Data    interface{} `json:"data"`
+}
+
 service integral-api {
 	//资源使用
 	@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 (useUserResponse)
+
 	//预览信息
 	@handler FindPreviewHandler // TODO: set handler name and delete this comment
 	post /resources/findPreview (previewReq) returns (previewRes)
+
 	//流水账
 	@handler FindRecordHandler // TODO: set handler name and delete this comment
 	post /resources/findRecord (recordReq) returns (recordRes)
+
 	//查询账户资源权限
 	@handler FindAuthHandler // TODO: set handler name and delete this comment
 	post /resources/findAuth (authReq) returns (recordRes)
+
 	//查询账户余额
 	@handler FindBalanceHandler // TODO: set handler name and delete this comment
 	post /resources/findBalance (balanceReq) returns (balanceRes)
+
 	//账号合并
 	@handler UserMergeHandler // TODO: set handler name and delete this comment
 	post /resources/userMerge (mergeInfo) returns (resourcesRes)
+
 	//账号合并
 	@handler UpdateVipTimeHandler // TODO: set handler name and delete this comment
 	post /resources/updateVipTime (vipReq) returns (resourcesRes)
 
 	@handler EntSourceNumAdd // TODO: set handler name and delete this comment
 	post /resources/entSourceNumAdd (EntSourceNumAdd) returns (resourcesRes)
+
 	@handler EntAccountAdd // TODO: set handler name and delete this comment
 	post /resources/entAccountAdd (EntAccountAdd) returns (resourcesRes)
+
 	@handler EntAccountGiven // TODO: set handler name and delete this comment
 	post /resources/entAccountGiven (EntOperateReq) returns (resourcesRes)
+
 	@handler EntAccountRecovery // TODO: set handler name and delete this comment
 	post /resources/entAccountRecovery (EntOperateReq) returns (resourcesRes)
-}
+
+	// 剑鱼定制导出扣费方式
+	@handler ExportChargeAccount
+	post /customExport/account (ChargeAccountReq) returns (chargeResp)
+
+	// 剑鱼定制导出数据扣费
+	@handler ExportCharge
+	post /customExport/charge (ChargeReq) returns (chargeResp)
+}
+

+ 28 - 0
api/internal/handler/exportchargeaccounthandler.go

@@ -0,0 +1,28 @@
+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/zeromicro/go-zero/rest/httpx"
+)
+
+func ExportChargeAccountHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.ChargeAccountReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+			return
+		}
+
+		l := logic.NewExportChargeAccountLogic(r.Context(), svcCtx)
+		resp, err := l.ExportChargeAccount(&req)
+		if err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+		} else {
+			httpx.OkJsonCtx(r.Context(), w, resp)
+		}
+	}
+}

+ 28 - 0
api/internal/handler/exportchargehandler.go

@@ -0,0 +1,28 @@
+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/zeromicro/go-zero/rest/httpx"
+)
+
+func ExportChargeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.ChargeReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+			return
+		}
+
+		l := logic.NewExportChargeLogic(r.Context(), svcCtx)
+		resp, err := l.ExportCharge(&req)
+		if err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+		} else {
+			httpx.OkJsonCtx(r.Context(), w, resp)
+		}
+	}
+}

+ 21 - 0
api/internal/handler/exportentchargehandler.go

@@ -0,0 +1,21 @@
+package handler
+
+import (
+	"net/http"
+
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/logic"
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/svc"
+	"github.com/zeromicro/go-zero/rest/httpx"
+)
+
+func ExportEntChargeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		l := logic.NewExportEntChargeLogic(r.Context(), svcCtx)
+		resp, err := l.ExportEntCharge()
+		if err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+		} else {
+			httpx.OkJsonCtx(r.Context(), w, resp)
+		}
+	}
+}

+ 21 - 0
api/internal/handler/exportpersonalchargehandler.go

@@ -0,0 +1,21 @@
+package handler
+
+import (
+	"net/http"
+
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/logic"
+	"app.yhyue.com/moapp/jyResourcesCenter/api/internal/svc"
+	"github.com/zeromicro/go-zero/rest/httpx"
+)
+
+func ExportPersonalChargeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		l := logic.NewExportPersonalChargeLogic(r.Context(), svcCtx)
+		resp, err := l.ExportPersonalCharge()
+		if err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+		} else {
+			httpx.OkJsonCtx(r.Context(), w, resp)
+		}
+	}
+}

+ 30 - 20
api/internal/handler/routes.go

@@ -14,23 +14,33 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 		[]rest.Route{
 			{
 				Method:  http.MethodPost,
-				Path:    "/resources/useUserDetailed",
-				Handler: UseUserDetailedHandler(serverCtx),
+				Path:    "/customExport/account",
+				Handler: ExportChargeAccountHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/resources/purchaseUserBalance",
-				Handler: PurchaseUserBalanceHandler(serverCtx),
+				Path:    "/customExport/charge",
+				Handler: ExportChargeHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/resources/findPreview",
-				Handler: FindPreviewHandler(serverCtx),
+				Path:    "/resources/entAccountAdd",
+				Handler: EntAccountAddHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/resources/findRecord",
-				Handler: FindRecordHandler(serverCtx),
+				Path:    "/resources/entAccountGiven",
+				Handler: EntAccountGivenHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/resources/entAccountRecovery",
+				Handler: EntAccountRecoveryHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/resources/entSourceNumAdd",
+				Handler: EntSourceNumAddHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
@@ -44,33 +54,33 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/resources/userMerge",
-				Handler: UserMergeHandler(serverCtx),
+				Path:    "/resources/findPreview",
+				Handler: FindPreviewHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/resources/updateVipTime",
-				Handler: UpdateVipTimeHandler(serverCtx),
+				Path:    "/resources/findRecord",
+				Handler: FindRecordHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/resources/entSourceNumAdd",
-				Handler: EntSourceNumAddHandler(serverCtx),
+				Path:    "/resources/purchaseUserBalance",
+				Handler: PurchaseUserBalanceHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/resources/entAccountAdd",
-				Handler: EntAccountAddHandler(serverCtx),
+				Path:    "/resources/updateVipTime",
+				Handler: UpdateVipTimeHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/resources/entAccountGiven",
-				Handler: EntAccountGivenHandler(serverCtx),
+				Path:    "/resources/useUserDetailed",
+				Handler: UseUserDetailedHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/resources/entAccountRecovery",
-				Handler: EntAccountRecoveryHandler(serverCtx),
+				Path:    "/resources/userMerge",
+				Handler: UserMergeHandler(serverCtx),
 			},
 		},
 	)

+ 41 - 0
api/internal/logic/exportchargeaccountlogic.go

@@ -0,0 +1,41 @@
+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/zeromicro/go-zero/core/logx"
+)
+
+type ExportChargeAccountLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewExportChargeAccountLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ExportChargeAccountLogic {
+	return &ExportChargeAccountLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *ExportChargeAccountLogic) ExportChargeAccount(req *types.ChargeAccountReq) (resp *types.ChargeResp, err error) {
+	var (
+		lsi      = l.svcCtx.ResourcesCenter
+		respData *resourcesCenterclient.ChargeAccountResp
+	)
+	respData, err = lsi.JyExportChargeAmount(l.ctx, &resourcesCenterclient.ChargeAccountReq{
+		EntId:  req.EntId,
+		UserId: req.UserId,
+	})
+	return &types.ChargeResp{
+		Code:    respData.Code,
+		Message: respData.Message,
+		Data:    respData.Data,
+	}, nil
+}

+ 30 - 0
api/internal/logic/exportchargelogic.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/zeromicro/go-zero/core/logx"
+)
+
+type ExportChargeLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewExportChargeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ExportChargeLogic {
+	return &ExportChargeLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *ExportChargeLogic) ExportCharge(req *types.ChargeReq) (resp *types.ChargeResp, err error) {
+	// todo: add your logic here and delete this line
+
+	return
+}

+ 103 - 80
api/internal/types/types.go

@@ -1,80 +1,48 @@
 // Code generated by goctl. DO NOT EDIT.
 package types
 
-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,optional"` //资源类型
-	Number       int64  `form:"number"`                //数量
-	Spec         string `form:"spec,optional"`         //规格
-	AppId        string `form:"appId"`                 //标识
-	EndTime      string `form:"endTime,optional"`      //新增时数据包截止时间
-	VipTime      string `form:"vipTime,optional"`      //超级订阅时间
-	Remarks      string `form:"remarks,optional"`      //备注
-}
-
-type VipReq struct {
-	VipTime   string `form:"vipTime,optional"`   //超级订阅时间
-	AccountId string `form:"accountId,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,optional"`     //资源类型
-	Number           int64  `form:"number"`                    //数量
-	AppId            string `form:"appId"`                     //标识
-	RuleId           string `form:"ruleId,optional"`           //使用规则标识
-	UserId           string `form:"userId"`                    //用户标识
-	Remarks          string `form:"remarks,optional"`          //备注
-	InfoId           string `form:"infoId,optional"`           //信息标识
-	DuplicateRemoval int64  `form:"duplicateRemoval,optional"` //是否去重0不去1去重
-	VipState         int64  `form:"vipState,optional"`         //超级订阅状态
-}
-
-type ResourcesRes struct {
-	Code    int64  `json:"code"`
-	Message string `json:"message"`
+type ChargeAccountReq struct {
+	EntId  int64 `form:"entId,optional"`
+	UserId int64 `form:"userId,optional"`
 }
 
-type UseUserResponse struct {
-	Code          int64  `json:"code"`
-	Message       string `json:"message"`
-	DeductionNumb int64  `json:"deductionNumb"`
+type ChargeReq struct {
+	EntId       int64  `form:"entId,optional"`
+	UserId      int64  `form:"userId,optional"`
+	EntUserId   int64  `form:"entUserId,optional"`
+	ExportNum   int64  `form:"exportNum,optional"`
+	DeductNum   int64  `form:"deductNum,optional"`
+	DownloadUrl string `form:"downloadUrl,optional"`
+	Filter      string `form:"filter,optional"`
+	PositionId  string `form:"positionId,optional"`
+	AccountId   string `form:"accountId,optional"`
 }
 
-type PreviewReq struct {
-	InfoId       string `form:"infoId,optional"`       //信息标识
-	AccountId    string `form:"accountId,optional"`    //企业标识
-	ResourceType string `form:"resourceType,optional"` //资源类型
+type EntAccountAdd struct {
+	EntSourceNumAdd
+	AccountNum int64 `form:"accountNum,optional"` //新增账号数量,-1操作现有所有账户
 }
 
-type PreviewRes struct {
-	Code          int64  `json:"code"`
-	Message       string `json:"message"`
-	RepeatNumb    int64  `json:"repeatNumb"`
-	DeductionNumb int64  `json:"deductionNumb"`
+type EntOperateReq struct {
+	CompanyId        int64  `form:"companyId,optional"`        //企业标识
+	EmpowerId        int64  `form:"empowerId,optional"`        //套餐id
+	ResourceType     string `form:"resourceType,optional"`     //资源类型
+	OperateAccountId string `form:"operateAccountId,optional"` //操作账户
 }
 
-type RecordReq struct {
-	AccountId    string `form:"accountId,optional"` //企业标识
-	UserId       string `form:"userId,optional"`    //用户标识
-	Page         int64  `form:"page,optional"`
-	PageSize     int64  `form:"pageSize,optional"`
+type EntSourceNumAdd struct {
+	AccountId    string `form:"accountId,optional"`    //账户标识
+	CompanyId    int64  `form:"companyId,optional"`    //企业标识
+	DepartmentId string `form:"departmentId,optional"` //组织标识
+	EmpowerId    int64  `form:"empowerId,optional"`    //套餐id
+	UserId       string `form:"userId,optional"`       //用户标识
+	Name         string `form:"name,optional"`         //资源名称
 	ResourceType string `form:"resourceType,optional"` //资源类型
-	State        int64  `form:"state,optional"`        //0查消耗记录 1 查充值记录 2 新增 作废 -1查询全部
-	QueryTime    string `form:"queryTime,optional"`    //查询时间
-}
-
-type RecordRes struct {
-	Code    int64                    `json:"code"`
-	Message string                   `json:"message"`
-	Data    []map[string]interface{} `json:"data"`
-	Count   int64                    `json:"count"`
+	Number       int64  `form:"number,optional"`       //资源数量
+	Spec         string `form:"spec,optional"`         //规格
+	AppId        string `form:"appId,optional"`        //标识
+	EndTime      string `form:"endTime,optional"`      //资源有效时间
+	Remarks      string `form:"remarks,optional"`      //备注
 }
 
 type AuthReq struct {
@@ -104,35 +72,90 @@ type BalanceRes struct {
 	Data    []map[string]interface{} `json:"data"`
 }
 
+type ChargeResp struct {
+	Code    int64       `json:"code"`
+	Message string      `json:"message"`
+	Data    interface{} `json:"data"`
+}
+
 type MergeInfo struct {
 	MergeUser  string `form:"mergeUser"`  //合并用户
 	MergedUser string `form:"mergedUser"` //被合并用户
 	AppId      string `form:"appId"`      //身份标识
 }
 
-type EntSourceNumAdd struct {
-	AccountId    string `form:"accountId,optional"`    //账户标识
+type PreviewReq struct {
+	InfoId       string `form:"infoId,optional"`       //信息标识
+	AccountId    string `form:"accountId,optional"`    //企业标识
+	ResourceType string `form:"resourceType,optional"` //资源类型
+}
+
+type PreviewRes struct {
+	Code          int64  `json:"code"`
+	Message       string `json:"message"`
+	RepeatNumb    int64  `json:"repeatNumb"`
+	DeductionNumb int64  `json:"deductionNumb"`
+}
+
+type PurchResourcesReq struct {
+	AccountId    string `form:"accountId"`             //账户标识
 	CompanyId    int64  `form:"companyId,optional"`    //企业标识
-	DepartmentId string `form:"departmentId,optional"` //组织标识
-	EmpowerId    int64  `form:"empowerId,optional"`    //套餐id
-	UserId       string `form:"userId,optional"`       //用户标识
-	Name         string `form:"name,optional"`         //资源名称
+	DepartmentId int64  `form:"departmentId,optional"` //组织标识
+	Name         string `form:"name"`                  //资源名称
 	ResourceType string `form:"resourceType,optional"` //资源类型
-	Number       int64  `form:"number,optional"`       //资源数量
+	Number       int64  `form:"number"`                //数量
 	Spec         string `form:"spec,optional"`         //规格
-	AppId        string `form:"appId,optional"`        //标识
-	EndTime      string `form:"endTime,optional"`      //资源有效时间
+	AppId        string `form:"appId"`                 //标识
+	EndTime      string `form:"endTime,optional"`      //新增时数据包截止时间
+	VipTime      string `form:"vipTime,optional"`      //超级订阅时间
 	Remarks      string `form:"remarks,optional"`      //备注
 }
 
-type EntAccountAdd struct {
-	EntSourceNumAdd
-	AccountNum int64 `form:"accountNum,optional"` //新增账号数量,-1操作现有所有账户
+type RecordReq struct {
+	AccountId    string `form:"accountId,optional"` //企业标识
+	UserId       string `form:"userId,optional"`    //用户标识
+	Page         int64  `form:"page,optional"`
+	PageSize     int64  `form:"pageSize,optional"`
+	ResourceType string `form:"resourceType,optional"` //资源类型
+	State        int64  `form:"state,optional"`        //0查消耗记录 1 查充值记录 2 新增 作废 -1查询全部
+	QueryTime    string `form:"queryTime,optional"`    //查询时间
 }
 
-type EntOperateReq struct {
+type RecordRes struct {
+	Code    int64                    `json:"code"`
+	Message string                   `json:"message"`
+	Data    []map[string]interface{} `json:"data"`
+	Count   int64                    `json:"count"`
+}
+
+type ResourcesRes struct {
+	Code    int64  `json:"code"`
+	Message string `json:"message"`
+}
+
+type UseResourcesReq struct {
+	AccountId        string `form:"accountId"`                 //账户标识
 	CompanyId        int64  `form:"companyId,optional"`        //企业标识
-	EmpowerId        int64  `form:"empowerId,optional"`        //套餐id
+	DepartmentId     int64  `form:"departmentId,optional"`     //组织标识
+	Name             string `form:"name"`                      //资源名称
 	ResourceType     string `form:"resourceType,optional"`     //资源类型
-	OperateAccountId string `form:"operateAccountId,optional"` //操作账户
+	Number           int64  `form:"number"`                    //数量
+	AppId            string `form:"appId"`                     //标识
+	RuleId           string `form:"ruleId,optional"`           //使用规则标识
+	UserId           string `form:"userId"`                    //用户标识
+	Remarks          string `form:"remarks,optional"`          //备注
+	InfoId           string `form:"infoId,optional"`           //信息标识
+	DuplicateRemoval int64  `form:"duplicateRemoval,optional"` //是否去重0不去1去重
+	VipState         int64  `form:"vipState,optional"`         //超级订阅状态
+}
+
+type UseUserResponse struct {
+	Code          int64  `json:"code"`
+	Message       string `json:"message"`
+	DeductionNumb int64  `json:"deductionNumb"`
+}
+
+type VipReq struct {
+	VipTime   string `form:"vipTime,optional"`   //超级订阅时间
+	AccountId string `form:"accountId,optional"` //账户标识
 }

+ 2 - 0
entity/detailed.go

@@ -17,4 +17,6 @@ type Detailed struct {
 	Remarks       string    `xorm:"remarks" form:"remarks" json:"remarks"`                   //备注
 	UserId        string    `xorm:"userId" form:"userId" json:"userId"`                      //用户标识
 	Name          string    `xorm:"name" form:"name" json:"name"`                            //资源名称
+	AccountType   int       `xorm:"accountType" form:"accountType" json:"accountType"`
+	EntId         int64     `xorm:"entId" form:"entId" json:"entId"`
 }

+ 22 - 0
entity/exportCharge.go

@@ -0,0 +1,22 @@
+package entity
+
+type PersonLimit struct {
+	Id            int64 `xorm:"pk autoincr id" form:"id" json:"id"`
+	DataLimit     int64 `xorm:"data_limit" form:"data_limit" json:"data_limit"` //每日导出限额
+	MaxNums       int64 `xorm:"max_nums" form:"max_nums" json:"max_nums"`       //导出总量限额
+	ExportNums    int64 `xorm:"export_nums" json:"export_nums"`                 //当日已导出条数
+	AllExportNums int64 `xorm:"all_export_nums" json:"all_export_nums"`         //全部已导出条数
+}
+
+type ExportLog struct {
+	UserName    string `xorm:"user_name" form:"user_name" json:"user_name"`
+	ExportTime  string `xorm:"export_time" form:"export_time" json:"export_time"`
+	DataSource  string `xorm:"data_source" form:"data_source" json:"data_source"`
+	ExportNum   int64  `xorm:"export_num" form:"export_num" json:"export_num"`
+	DeductNum   int64  `xorm:"deduct_num" form:"deduct_num" json:"deduct_num"`
+	DownloadUrl string `xorm:"download_url" form:"download_url" json:"download_url"`
+	EntId       int64  `xorm:"ent_id" form:"ent_id" json:"ent_id"`
+	Phone       string `xorm:"phone" form:"phone" json:"phone"`
+	UserId      int64  `xorm:"user_id" form:"user_id" json:"user_id"`
+	Filter      string `xorm:"filter" form:"filter" json:"filter"`
+}

+ 21 - 3
entity/user.go

@@ -1,14 +1,20 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/mongodb"
 	"github.com/go-xorm/xorm"
 	"strings"
 )
 
-//定义orm引擎
-var Engine *xorm.Engine
+var Mgo *mongodb.MongodbSim
 
-//定义返回状态
+// 定义orm引擎
+var (
+	Engine   *xorm.Engine
+	JyEngine *xorm.Engine
+)
+
+// 定义返回状态
 const (
 	SuccessCode           int64 = 1
 	ErrorCode             int64 = 0
@@ -35,3 +41,15 @@ func GetInForComma(data map[string]interface{}) (string, string) {
 	}
 	return strings.Join(args, ","), strings.Join(ws, ",")
 }
+
+type MongoStruct struct {
+	Address        string `json:"address"`
+	Size           int    `json:"size"`
+	DbName         string `json:"dbName"`
+	UserName       string `json:"userName,optional"`
+	Password       string `json:"password,optional"`
+	Collection     string `json:"collection,optional"`
+	CollectionBack string `json:"collectionBack,optional"`
+	MaxOpenConns   int    `json:"maxOpenConns,optional"`
+	MaxIdleConns   int    `json:"maxIdleConns,optional"`
+}

+ 5 - 4
go.mod

@@ -1,14 +1,15 @@
 module app.yhyue.com/moapp/jyResourcesCenter
 
-go 1.13
+go 1.23
 
 require (
+	app.yhyue.com/moapp/jybase v0.0.0-20240226084952-7e7b38ef8a66
 	github.com/go-sql-driver/mysql v1.7.1
 	github.com/go-xorm/xorm v0.7.9
 	github.com/gogf/gf/v2 v2.5.5
-	github.com/google/uuid v1.3.0
+	github.com/google/uuid v1.6.0
 	github.com/robfig/cron v1.2.0
 	github.com/zeromicro/go-zero v1.5.5
-	google.golang.org/grpc v1.57.0
-	google.golang.org/protobuf v1.31.0
+	google.golang.org/grpc v1.63.2
+	google.golang.org/protobuf v1.33.0
 )

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 594 - 0
go.sum


+ 5 - 0
rpc/etc/resourcescenter.yaml

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

+ 8 - 0
rpc/internal/config/config.go

@@ -5,6 +5,7 @@ import "github.com/zeromicro/go-zero/zrpc"
 type Config struct {
 	zrpc.RpcServerConf
 	DataSource     string // 手动代码
+	JyDbSource     string
 	Node           int    // 节点
 	CalleeId       string // 服务名字
 	DedupUrl       string
@@ -12,6 +13,13 @@ type Config struct {
 	ProductMap     map[string]interface{}
 	ProductStr     string
 	TimeSource     string //定时任务
+	Mgo            MgoConf
 }
 
 var ConfigJson Config
+
+type MgoConf struct {
+	Address string `json:",optional"`
+	Size    int    `json:",optional"`
+	Dbname  string `json:",optional"`
+}

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

@@ -0,0 +1,31 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jyResourcesCenter/service"
+	"context"
+
+	"app.yhyue.com/moapp/jyResourcesCenter/rpc/internal/svc"
+	"app.yhyue.com/moapp/jyResourcesCenter/rpc/resourcesCenter"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type JyExportChargeAmountLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewJyExportChargeAmountLogic(ctx context.Context, svcCtx *svc.ServiceContext) *JyExportChargeAmountLogic {
+	return &JyExportChargeAmountLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 剑鱼定制导出扣费方式
+func (l *JyExportChargeAmountLogic) JyExportChargeAmount(in *resourcesCenter.ChargeAccountReq) (*resourcesCenter.ChargeAccountResp, error) {
+	resp := service.ChargeAccount(in)
+	return resp, nil
+}

+ 31 - 0
rpc/internal/logic/jyexportchargelogic.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/zeromicro/go-zero/core/logx"
+)
+
+type JyExportChargeLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewJyExportChargeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *JyExportChargeLogic {
+	return &JyExportChargeLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 剑鱼定制导出数据扣费
+func (l *JyExportChargeLogic) JyExportCharge(in *resourcesCenter.ChargeReq) (*resourcesCenter.Response, error) {
+	// todo: add your logic here and delete this line
+
+	return &resourcesCenter.Response{}, nil
+}

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

@@ -93,3 +93,15 @@ func (s *ResourcesCenterServer) EntAccountRecovery(ctx context.Context, in *reso
 	l := logic.NewEntAccountRecoveryLogic(ctx, s.svcCtx)
 	return l.EntAccountRecovery(in)
 }
+
+// 剑鱼定制导出扣费方式
+func (s *ResourcesCenterServer) JyExportChargeAmount(ctx context.Context, in *resourcesCenter.ChargeAccountReq) (*resourcesCenter.ChargeAccountResp, error) {
+	l := logic.NewJyExportChargeAmountLogic(ctx, s.svcCtx)
+	return l.JyExportChargeAmount(in)
+}
+
+// 剑鱼定制导出数据扣费
+func (s *ResourcesCenterServer) JyExportCharge(ctx context.Context, in *resourcesCenter.ChargeReq) (*resourcesCenter.ChargeResp, error) {
+	l := logic.NewJyExportChargeLogic(ctx, s.svcCtx)
+	return l.JyExportCharge(in)
+}

+ 15 - 1
rpc/resourcesCenter.go

@@ -7,6 +7,7 @@ import (
 	"app.yhyue.com/moapp/jyResourcesCenter/rpc/internal/svc"
 	"app.yhyue.com/moapp/jyResourcesCenter/rpc/resourcesCenter"
 	"app.yhyue.com/moapp/jyResourcesCenter/service"
+	"app.yhyue.com/moapp/jybase/mongodb"
 	"flag"
 	"fmt"
 	_ "github.com/go-sql-driver/mysql"
@@ -54,7 +55,20 @@ func init() {
 	if err != nil {
 		log.Fatal("数据库连接失败:", err)
 	}
-	fmt.Println(config.ConfigJson.DataSource + "链接成功")
+	entity.JyEngine, err = xorm.NewEngine("mysql", config.ConfigJson.JyDbSource)
+	if err != nil {
+		log.Fatal("数据库连接失败:", err)
+	}
+
+	//mongo实例
+	entity.Mgo = &mongodb.MongodbSim{
+		MongodbAddr: config.ConfigJson.Mgo.Address,
+		Size:        config.ConfigJson.Mgo.Size,
+		DbName:      config.ConfigJson.Mgo.Dbname,
+	}
+	entity.Mgo.InitPool()
+
+	fmt.Println("db链接成功")
 }
 func timeDask() {
 	balanceService.ExpireHandle()

+ 46 - 0
rpc/resourcesCenter.proto

@@ -197,6 +197,47 @@ message EntOperateReq {
   string operateAccountId = 4; //操作账户
 }
 
+message ChargeAccountReq {
+  int64 entId = 1;
+  int64 UserId = 2;
+}
+
+message ChargeAccountResp {
+  int64 code = 1;
+  string message = 2;
+  SomeInfo data = 3;
+}
+
+message ChargeReq {
+  int64 entId = 1;
+  int64 userId = 2;
+  int64 entUserId = 3;
+  int64 exportNum = 4;
+  int64 deductNum = 5;  // 实际扣除条数
+  string downloadUrl = 6;
+  string filter = 7;  // 数据筛选条件
+  string positionId = 8;
+  string accountId = 9;
+  int32 chargeType = 10;  //扣费方式,0: 企业,1: 个人
+}
+
+message ChargeResp {
+  int64 code = 1;
+  string message = 2;
+  SomeInfo data = 3;
+}
+
+message SomeInfo {
+  int32 chargeType = 1;   // 扣费方式,0: 企业, 1: 个人(高级字段包)
+  int32 chargeResult = 2; // 扣费结果,0: 失败, 1: 成功
+  string failMsg = 3; // 扣费失败原因
+  int64 num1 = 4;   // 企业流量包余额/个人(高级流量包)余额
+  int64 num2 = 5;   // 企业扣费时 每日导出限额
+  int64 num3 = 6;   // 企业扣费时 当日可导出余额
+  int64 num4 = 7;   // 企业扣费时 可导出总限额
+  int64 num5 = 8;   // 企业扣费时 可导出余额
+}
+
 service ResourcesCenter {
   //查询账户资源权限
   rpc findResourcesAuth (ResourcesReq) returns (AccountBalanceRes);
@@ -224,4 +265,9 @@ service ResourcesCenter {
   rpc entAccountGiven (EntOperateReq) returns (Response);
   // 权益收回
   rpc entAccountRecovery (EntOperateReq) returns (Response);
+
+  // 剑鱼定制导出扣费方式
+  rpc jyExportChargeAmount(ChargeAccountReq) returns(ChargeAccountResp);
+  // 剑鱼定制导出数据扣费
+  rpc jyExportCharge (ChargeReq) returns (ChargeResp);
 }

+ 628 - 94
rpc/resourcesCenter/resourcesCenter.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.30.0
-// 	protoc        v3.21.12
+// 	protoc-gen-go v1.32.0
+// 	protoc        v5.27.1
 // source: resourcesCenter.proto
 
 package resourcesCenter
@@ -1907,6 +1907,409 @@ func (x *EntOperateReq) GetOperateAccountId() string {
 	return ""
 }
 
+type ChargeAccountReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	EntId  int64 `protobuf:"varint,1,opt,name=entId,proto3" json:"entId,omitempty"`
+	UserId int64 `protobuf:"varint,2,opt,name=UserId,proto3" json:"UserId,omitempty"`
+}
+
+func (x *ChargeAccountReq) Reset() {
+	*x = ChargeAccountReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_resourcesCenter_proto_msgTypes[20]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ChargeAccountReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ChargeAccountReq) ProtoMessage() {}
+
+func (x *ChargeAccountReq) ProtoReflect() protoreflect.Message {
+	mi := &file_resourcesCenter_proto_msgTypes[20]
+	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 ChargeAccountReq.ProtoReflect.Descriptor instead.
+func (*ChargeAccountReq) Descriptor() ([]byte, []int) {
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *ChargeAccountReq) GetEntId() int64 {
+	if x != nil {
+		return x.EntId
+	}
+	return 0
+}
+
+func (x *ChargeAccountReq) GetUserId() int64 {
+	if x != nil {
+		return x.UserId
+	}
+	return 0
+}
+
+type ChargeAccountResp 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"`
+	Data    *SomeInfo `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+}
+
+func (x *ChargeAccountResp) Reset() {
+	*x = ChargeAccountResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_resourcesCenter_proto_msgTypes[21]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ChargeAccountResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ChargeAccountResp) ProtoMessage() {}
+
+func (x *ChargeAccountResp) ProtoReflect() protoreflect.Message {
+	mi := &file_resourcesCenter_proto_msgTypes[21]
+	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 ChargeAccountResp.ProtoReflect.Descriptor instead.
+func (*ChargeAccountResp) Descriptor() ([]byte, []int) {
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *ChargeAccountResp) GetCode() int64 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *ChargeAccountResp) GetMessage() string {
+	if x != nil {
+		return x.Message
+	}
+	return ""
+}
+
+func (x *ChargeAccountResp) GetData() *SomeInfo {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+type ChargeReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	EntId       int64  `protobuf:"varint,1,opt,name=entId,proto3" json:"entId,omitempty"`
+	UserId      int64  `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"`
+	EntUserId   int64  `protobuf:"varint,3,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
+	ExportNum   int64  `protobuf:"varint,4,opt,name=exportNum,proto3" json:"exportNum,omitempty"`
+	DeductNum   int64  `protobuf:"varint,5,opt,name=deductNum,proto3" json:"deductNum,omitempty"` // 实际扣除条数
+	DownloadUrl string `protobuf:"bytes,6,opt,name=downloadUrl,proto3" json:"downloadUrl,omitempty"`
+	Filter      string `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"` // 数据筛选条件
+	PositionId  string `protobuf:"bytes,8,opt,name=positionId,proto3" json:"positionId,omitempty"`
+	AccountId   string `protobuf:"bytes,9,opt,name=accountId,proto3" json:"accountId,omitempty"`
+	ChargeType  int32  `protobuf:"varint,10,opt,name=chargeType,proto3" json:"chargeType,omitempty"` //扣费方式
+}
+
+func (x *ChargeReq) Reset() {
+	*x = ChargeReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_resourcesCenter_proto_msgTypes[22]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ChargeReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ChargeReq) ProtoMessage() {}
+
+func (x *ChargeReq) ProtoReflect() protoreflect.Message {
+	mi := &file_resourcesCenter_proto_msgTypes[22]
+	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 ChargeReq.ProtoReflect.Descriptor instead.
+func (*ChargeReq) Descriptor() ([]byte, []int) {
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *ChargeReq) GetEntId() int64 {
+	if x != nil {
+		return x.EntId
+	}
+	return 0
+}
+
+func (x *ChargeReq) GetUserId() int64 {
+	if x != nil {
+		return x.UserId
+	}
+	return 0
+}
+
+func (x *ChargeReq) GetEntUserId() int64 {
+	if x != nil {
+		return x.EntUserId
+	}
+	return 0
+}
+
+func (x *ChargeReq) GetExportNum() int64 {
+	if x != nil {
+		return x.ExportNum
+	}
+	return 0
+}
+
+func (x *ChargeReq) GetDeductNum() int64 {
+	if x != nil {
+		return x.DeductNum
+	}
+	return 0
+}
+
+func (x *ChargeReq) GetDownloadUrl() string {
+	if x != nil {
+		return x.DownloadUrl
+	}
+	return ""
+}
+
+func (x *ChargeReq) GetFilter() string {
+	if x != nil {
+		return x.Filter
+	}
+	return ""
+}
+
+func (x *ChargeReq) GetPositionId() string {
+	if x != nil {
+		return x.PositionId
+	}
+	return ""
+}
+
+func (x *ChargeReq) GetAccountId() string {
+	if x != nil {
+		return x.AccountId
+	}
+	return ""
+}
+
+func (x *ChargeReq) GetChargeType() int32 {
+	if x != nil {
+		return x.ChargeType
+	}
+	return 0
+}
+
+type ChargeResp 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"`
+	Data    *SomeInfo `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+}
+
+func (x *ChargeResp) Reset() {
+	*x = ChargeResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_resourcesCenter_proto_msgTypes[23]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ChargeResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ChargeResp) ProtoMessage() {}
+
+func (x *ChargeResp) ProtoReflect() protoreflect.Message {
+	mi := &file_resourcesCenter_proto_msgTypes[23]
+	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 ChargeResp.ProtoReflect.Descriptor instead.
+func (*ChargeResp) Descriptor() ([]byte, []int) {
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *ChargeResp) GetCode() int64 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *ChargeResp) GetMessage() string {
+	if x != nil {
+		return x.Message
+	}
+	return ""
+}
+
+func (x *ChargeResp) GetData() *SomeInfo {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+type SomeInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ChargeType   int32  `protobuf:"varint,1,opt,name=chargeType,proto3" json:"chargeType,omitempty"`     // 扣费方式,0: 企业, 1: 个人(高级字段包)
+	ChargeResult int32  `protobuf:"varint,2,opt,name=chargeResult,proto3" json:"chargeResult,omitempty"` // 扣费结果,0: 失败, 1: 成功
+	FailMsg      string `protobuf:"bytes,3,opt,name=failMsg,proto3" json:"failMsg,omitempty"`            // 扣费失败原因
+	Num1         int64  `protobuf:"varint,4,opt,name=num1,proto3" json:"num1,omitempty"`                 // 企业流量包余额/个人(高级流量包)余额
+	Num2         int64  `protobuf:"varint,5,opt,name=num2,proto3" json:"num2,omitempty"`                 // 企业扣费时 每日导出限额
+	Num3         int64  `protobuf:"varint,6,opt,name=num3,proto3" json:"num3,omitempty"`                 // 企业扣费时 当日可导出余额
+	Num4         int64  `protobuf:"varint,7,opt,name=num4,proto3" json:"num4,omitempty"`                 // 企业扣费时 可导出总限额
+	Num5         int64  `protobuf:"varint,8,opt,name=num5,proto3" json:"num5,omitempty"`                 // 企业扣费时 可导出余额
+}
+
+func (x *SomeInfo) Reset() {
+	*x = SomeInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_resourcesCenter_proto_msgTypes[24]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SomeInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SomeInfo) ProtoMessage() {}
+
+func (x *SomeInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_resourcesCenter_proto_msgTypes[24]
+	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 SomeInfo.ProtoReflect.Descriptor instead.
+func (*SomeInfo) Descriptor() ([]byte, []int) {
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *SomeInfo) GetChargeType() int32 {
+	if x != nil {
+		return x.ChargeType
+	}
+	return 0
+}
+
+func (x *SomeInfo) GetChargeResult() int32 {
+	if x != nil {
+		return x.ChargeResult
+	}
+	return 0
+}
+
+func (x *SomeInfo) GetFailMsg() string {
+	if x != nil {
+		return x.FailMsg
+	}
+	return ""
+}
+
+func (x *SomeInfo) GetNum1() int64 {
+	if x != nil {
+		return x.Num1
+	}
+	return 0
+}
+
+func (x *SomeInfo) GetNum2() int64 {
+	if x != nil {
+		return x.Num2
+	}
+	return 0
+}
+
+func (x *SomeInfo) GetNum3() int64 {
+	if x != nil {
+		return x.Num3
+	}
+	return 0
+}
+
+func (x *SomeInfo) GetNum4() int64 {
+	if x != nil {
+		return x.Num4
+	}
+	return 0
+}
+
+func (x *SomeInfo) GetNum5() int64 {
+	if x != nil {
+		return x.Num5
+	}
+	return 0
+}
+
 var File_resourcesCenter_proto protoreflect.FileDescriptor
 
 var file_resourcesCenter_proto_rawDesc = []byte{
@@ -2174,70 +2577,130 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
 	0x12, 0x2a, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
 	0x6e, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x72,
-	0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x32, 0xc8, 0x07, 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,
+	0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x40, 0x0a, 0x10,
+	0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71,
+	0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x70,
+	0x0a, 0x11, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
+	0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65,
+	0x72, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
+	0x22, 0xab, 0x02, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14,
+	0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65,
+	0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09,
+	0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78,
+	0x70, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65,
+	0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x64, 0x75,
+	0x63, 0x74, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x64,
+	0x75, 0x63, 0x74, 0x4e, 0x75, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f,
+	0x61, 0x64, 0x55, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x77,
+	0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74,
+	0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
+	0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x08,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64,
+	0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x09, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e,
+	0x0a, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01,
+	0x28, 0x05, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x69,
+	0x0a, 0x0a, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04,
+	0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
+	0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x61,
+	0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49,
+	0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xcc, 0x01, 0x0a, 0x08, 0x53, 0x6f,
+	0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65,
+	0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x72,
+	0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65,
+	0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x68,
+	0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61,
+	0x69, 0x6c, 0x4d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x69,
+	0x6c, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x31, 0x18, 0x04, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x04, 0x6e, 0x75, 0x6d, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x32,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6e, 0x75, 0x6d, 0x32, 0x12, 0x12, 0x0a, 0x04,
+	0x6e, 0x75, 0x6d, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6e, 0x75, 0x6d, 0x33,
+	0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x34, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
+	0x6e, 0x75, 0x6d, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x75, 0x6d, 0x35, 0x18, 0x08, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x04, 0x6e, 0x75, 0x6d, 0x35, 0x32, 0xf2, 0x08, 0x0a, 0x0f, 0x52, 0x65, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x11,
+	0x66, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74,
+	0x68, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e,
+	0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71,
+	0x1a, 0x22, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74,
+	0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
+	0x65, 0x52, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f,
+	0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x72, 0x65, 0x73, 0x6f,
+	0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f,
+	0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x12, 0x52, 0x0a,
+	0x11, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f,
+	0x72, 0x64, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x21,
 	0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72,
-	0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e,
-	0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
-	0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65,
-	0x73, 0x12, 0x52, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65,
-	0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52,
-	0x65, 0x71, 0x1a, 0x21, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f,
-	0x72, 0x64, 0x52, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x13, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73,
-	0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x72,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
+	0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65,
+	0x73, 0x12, 0x4c, 0x0a, 0x13, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65,
+	0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x73, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+	0x4f, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
+	0x65, 0x64, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x20,
+	0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x55, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+	0x12, 0x47, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x64, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12,
+	0x1b, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65,
+	0x72, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x72,
+	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x50,
+	0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x75, 0x73, 0x65,
+	0x72, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x49, 0x6e,
+	0x66, 0x6f, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a,
+	0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x69, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x17,
+	0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x56, 0x69, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+	0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+	0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e,
+	0x75, 0x6d, 0x41, 0x64, 0x64, 0x12, 0x23, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+	0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63,
+	0x65, 0x4e, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f,
+	0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f,
+	0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f,
+	0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70,
+	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
+	0x6e, 0x74, 0x47, 0x69, 0x76, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+	0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x4f, 0x70, 0x65,
+	0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+	0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+	0x73, 0x65, 0x12, 0x4f, 0x0a, 0x12, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+	0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x4f, 0x70,
+	0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
 	0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
-	0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65,
-	0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x73, 0x1a, 0x20, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
-	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x64, 0x50, 0x72, 0x65, 0x76,
-	0x69, 0x65, 0x77, 0x12, 0x1b, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43,
-	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71,
-	0x1a, 0x1b, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74,
-	0x65, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x12, 0x42, 0x0a,
-	0x09, 0x75, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73,
-	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x72,
-	0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
-	0x65, 0x12, 0x43, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x69, 0x70, 0x54, 0x69,
-	0x6d, 0x65, 0x12, 0x17, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x56, 0x69, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65,
-	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65,
-	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75,
-	0x72, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x12, 0x23, 0x2e, 0x72, 0x65, 0x73, 0x6f,
-	0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x53,
-	0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19,
+	0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x14, 0x6a, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43,
+	0x68, 0x61, 0x72, 0x67, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x72, 0x65,
+	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68,
+	0x61, 0x72, 0x67, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x22,
 	0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72,
-	0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0d, 0x65, 0x6e, 0x74,
-	0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x73,
-	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74,
-	0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e,
-	0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
-	0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0f, 0x65, 0x6e, 0x74, 0x41,
-	0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x47, 0x69, 0x76, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x72, 0x65,
-	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e,
-	0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72, 0x65,
-	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65,
-	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x12, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63,
-	0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x72,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45,
-	0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x72,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52,
-	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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,
+	0x2e, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
+	0x73, 0x70, 0x12, 0x49, 0x0a, 0x0e, 0x6a, 0x79, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x68,
+	0x61, 0x72, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x71,
+	0x1a, 0x1b, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74,
+	0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x12, 0x5a,
+	0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -2252,7 +2715,7 @@ func file_resourcesCenter_proto_rawDescGZIP() []byte {
 	return file_resourcesCenter_proto_rawDescData
 }
 
-var file_resourcesCenter_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
+var file_resourcesCenter_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
 var file_resourcesCenter_proto_goTypes = []interface{}{
 	(*Response)(nil),           // 0: resourcesCenter.Response
 	(*UseUserResponse)(nil),    // 1: resourcesCenter.UseUserResponse
@@ -2274,40 +2737,51 @@ var file_resourcesCenter_proto_goTypes = []interface{}{
 	(*EntAccountAddReq)(nil),   // 17: resourcesCenter.EntAccountAddReq
 	(*EntSourceNumAddReq)(nil), // 18: resourcesCenter.EntSourceNumAddReq
 	(*EntOperateReq)(nil),      // 19: resourcesCenter.EntOperateReq
+	(*ChargeAccountReq)(nil),   // 20: resourcesCenter.ChargeAccountReq
+	(*ChargeAccountResp)(nil),  // 21: resourcesCenter.ChargeAccountResp
+	(*ChargeReq)(nil),          // 22: resourcesCenter.ChargeReq
+	(*ChargeResp)(nil),         // 23: resourcesCenter.ChargeResp
+	(*SomeInfo)(nil),           // 24: resourcesCenter.SomeInfo
 }
 var file_resourcesCenter_proto_depIdxs = []int32{
 	6,  // 0: resourcesCenter.ResourcesAuthRes.data:type_name -> resourcesCenter.ResourcesAuth
 	7,  // 1: resourcesCenter.AccountBalanceRes.data:type_name -> resourcesCenter.ResourceBalance
 	8,  // 2: resourcesCenter.ConsumeRecordRes.data:type_name -> resourcesCenter.ConsumeRecord
-	9,  // 3: resourcesCenter.ResourcesCenter.findResourcesAuth:input_type -> resourcesCenter.ResourcesReq
-	9,  // 4: resourcesCenter.ResourcesCenter.findAccountBalance:input_type -> resourcesCenter.ResourcesReq
-	14, // 5: resourcesCenter.ResourcesCenter.findConsumeRecord:input_type -> resourcesCenter.RecordReq
-	4,  // 6: resourcesCenter.ResourcesCenter.purchaseUserBalance:input_type -> resourcesCenter.Resources
-	4,  // 7: resourcesCenter.ResourcesCenter.useUserDetailed:input_type -> resourcesCenter.Resources
-	10, // 8: resourcesCenter.ResourcesCenter.findPreview:input_type -> resourcesCenter.PreviewReq
-	16, // 9: resourcesCenter.ResourcesCenter.userMerge:input_type -> resourcesCenter.mergeInfo
-	3,  // 10: resourcesCenter.ResourcesCenter.updateVipTime:input_type -> resourcesCenter.VipReq
-	18, // 11: resourcesCenter.ResourcesCenter.entSourceNumAdd:input_type -> resourcesCenter.EntSourceNumAddReq
-	17, // 12: resourcesCenter.ResourcesCenter.entAccountAdd:input_type -> resourcesCenter.EntAccountAddReq
-	19, // 13: resourcesCenter.ResourcesCenter.entAccountGiven:input_type -> resourcesCenter.EntOperateReq
-	19, // 14: resourcesCenter.ResourcesCenter.entAccountRecovery:input_type -> resourcesCenter.EntOperateReq
-	13, // 15: resourcesCenter.ResourcesCenter.findResourcesAuth:output_type -> resourcesCenter.AccountBalanceRes
-	13, // 16: resourcesCenter.ResourcesCenter.findAccountBalance:output_type -> resourcesCenter.AccountBalanceRes
-	15, // 17: resourcesCenter.ResourcesCenter.findConsumeRecord:output_type -> resourcesCenter.ConsumeRecordRes
-	0,  // 18: resourcesCenter.ResourcesCenter.purchaseUserBalance:output_type -> resourcesCenter.Response
-	1,  // 19: resourcesCenter.ResourcesCenter.useUserDetailed:output_type -> resourcesCenter.UseUserResponse
-	11, // 20: resourcesCenter.ResourcesCenter.findPreview:output_type -> resourcesCenter.PreviewRes
-	0,  // 21: resourcesCenter.ResourcesCenter.userMerge:output_type -> resourcesCenter.Response
-	0,  // 22: resourcesCenter.ResourcesCenter.updateVipTime:output_type -> resourcesCenter.Response
-	0,  // 23: resourcesCenter.ResourcesCenter.entSourceNumAdd:output_type -> resourcesCenter.Response
-	0,  // 24: resourcesCenter.ResourcesCenter.entAccountAdd:output_type -> resourcesCenter.Response
-	0,  // 25: resourcesCenter.ResourcesCenter.entAccountGiven:output_type -> resourcesCenter.Response
-	0,  // 26: resourcesCenter.ResourcesCenter.entAccountRecovery:output_type -> resourcesCenter.Response
-	15, // [15:27] is the sub-list for method output_type
-	3,  // [3:15] 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
+	24, // 3: resourcesCenter.ChargeAccountResp.data:type_name -> resourcesCenter.SomeInfo
+	24, // 4: resourcesCenter.ChargeResp.data:type_name -> resourcesCenter.SomeInfo
+	9,  // 5: resourcesCenter.ResourcesCenter.findResourcesAuth:input_type -> resourcesCenter.ResourcesReq
+	9,  // 6: resourcesCenter.ResourcesCenter.findAccountBalance:input_type -> resourcesCenter.ResourcesReq
+	14, // 7: resourcesCenter.ResourcesCenter.findConsumeRecord:input_type -> resourcesCenter.RecordReq
+	4,  // 8: resourcesCenter.ResourcesCenter.purchaseUserBalance:input_type -> resourcesCenter.Resources
+	4,  // 9: resourcesCenter.ResourcesCenter.useUserDetailed:input_type -> resourcesCenter.Resources
+	10, // 10: resourcesCenter.ResourcesCenter.findPreview:input_type -> resourcesCenter.PreviewReq
+	16, // 11: resourcesCenter.ResourcesCenter.userMerge:input_type -> resourcesCenter.mergeInfo
+	3,  // 12: resourcesCenter.ResourcesCenter.updateVipTime:input_type -> resourcesCenter.VipReq
+	18, // 13: resourcesCenter.ResourcesCenter.entSourceNumAdd:input_type -> resourcesCenter.EntSourceNumAddReq
+	17, // 14: resourcesCenter.ResourcesCenter.entAccountAdd:input_type -> resourcesCenter.EntAccountAddReq
+	19, // 15: resourcesCenter.ResourcesCenter.entAccountGiven:input_type -> resourcesCenter.EntOperateReq
+	19, // 16: resourcesCenter.ResourcesCenter.entAccountRecovery:input_type -> resourcesCenter.EntOperateReq
+	20, // 17: resourcesCenter.ResourcesCenter.jyExportChargeAmount:input_type -> resourcesCenter.ChargeAccountReq
+	22, // 18: resourcesCenter.ResourcesCenter.jyExportCharge:input_type -> resourcesCenter.ChargeReq
+	13, // 19: resourcesCenter.ResourcesCenter.findResourcesAuth:output_type -> resourcesCenter.AccountBalanceRes
+	13, // 20: resourcesCenter.ResourcesCenter.findAccountBalance:output_type -> resourcesCenter.AccountBalanceRes
+	15, // 21: resourcesCenter.ResourcesCenter.findConsumeRecord:output_type -> resourcesCenter.ConsumeRecordRes
+	0,  // 22: resourcesCenter.ResourcesCenter.purchaseUserBalance:output_type -> resourcesCenter.Response
+	1,  // 23: resourcesCenter.ResourcesCenter.useUserDetailed:output_type -> resourcesCenter.UseUserResponse
+	11, // 24: resourcesCenter.ResourcesCenter.findPreview:output_type -> resourcesCenter.PreviewRes
+	0,  // 25: resourcesCenter.ResourcesCenter.userMerge:output_type -> resourcesCenter.Response
+	0,  // 26: resourcesCenter.ResourcesCenter.updateVipTime:output_type -> resourcesCenter.Response
+	0,  // 27: resourcesCenter.ResourcesCenter.entSourceNumAdd:output_type -> resourcesCenter.Response
+	0,  // 28: resourcesCenter.ResourcesCenter.entAccountAdd:output_type -> resourcesCenter.Response
+	0,  // 29: resourcesCenter.ResourcesCenter.entAccountGiven:output_type -> resourcesCenter.Response
+	0,  // 30: resourcesCenter.ResourcesCenter.entAccountRecovery:output_type -> resourcesCenter.Response
+	21, // 31: resourcesCenter.ResourcesCenter.jyExportChargeAmount:output_type -> resourcesCenter.ChargeAccountResp
+	23, // 32: resourcesCenter.ResourcesCenter.jyExportCharge:output_type -> resourcesCenter.ChargeResp
+	19, // [19:33] is the sub-list for method output_type
+	5,  // [5:19] is the sub-list for method input_type
+	5,  // [5:5] is the sub-list for extension type_name
+	5,  // [5:5] is the sub-list for extension extendee
+	0,  // [0:5] is the sub-list for field type_name
 }
 
 func init() { file_resourcesCenter_proto_init() }
@@ -2556,6 +3030,66 @@ func file_resourcesCenter_proto_init() {
 				return nil
 			}
 		}
+		file_resourcesCenter_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ChargeAccountReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_resourcesCenter_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ChargeAccountResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_resourcesCenter_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ChargeReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_resourcesCenter_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ChargeResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_resourcesCenter_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SomeInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -2563,7 +3097,7 @@ func file_resourcesCenter_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_resourcesCenter_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   20,
+			NumMessages:   25,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 91 - 13
rpc/resourcesCenter/resourcesCenter_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.3.0
-// - protoc             v3.21.12
+// - protoc             v5.27.1
 // source: resourcesCenter.proto
 
 package resourcesCenter
@@ -19,18 +19,20 @@ import (
 const _ = grpc.SupportPackageIsVersion7
 
 const (
-	ResourcesCenter_FindResourcesAuth_FullMethodName   = "/resourcesCenter.ResourcesCenter/findResourcesAuth"
-	ResourcesCenter_FindAccountBalance_FullMethodName  = "/resourcesCenter.ResourcesCenter/findAccountBalance"
-	ResourcesCenter_FindConsumeRecord_FullMethodName   = "/resourcesCenter.ResourcesCenter/findConsumeRecord"
-	ResourcesCenter_PurchaseUserBalance_FullMethodName = "/resourcesCenter.ResourcesCenter/purchaseUserBalance"
-	ResourcesCenter_UseUserDetailed_FullMethodName     = "/resourcesCenter.ResourcesCenter/useUserDetailed"
-	ResourcesCenter_FindPreview_FullMethodName         = "/resourcesCenter.ResourcesCenter/findPreview"
-	ResourcesCenter_UserMerge_FullMethodName           = "/resourcesCenter.ResourcesCenter/userMerge"
-	ResourcesCenter_UpdateVipTime_FullMethodName       = "/resourcesCenter.ResourcesCenter/updateVipTime"
-	ResourcesCenter_EntSourceNumAdd_FullMethodName     = "/resourcesCenter.ResourcesCenter/entSourceNumAdd"
-	ResourcesCenter_EntAccountAdd_FullMethodName       = "/resourcesCenter.ResourcesCenter/entAccountAdd"
-	ResourcesCenter_EntAccountGiven_FullMethodName     = "/resourcesCenter.ResourcesCenter/entAccountGiven"
-	ResourcesCenter_EntAccountRecovery_FullMethodName  = "/resourcesCenter.ResourcesCenter/entAccountRecovery"
+	ResourcesCenter_FindResourcesAuth_FullMethodName    = "/resourcesCenter.ResourcesCenter/findResourcesAuth"
+	ResourcesCenter_FindAccountBalance_FullMethodName   = "/resourcesCenter.ResourcesCenter/findAccountBalance"
+	ResourcesCenter_FindConsumeRecord_FullMethodName    = "/resourcesCenter.ResourcesCenter/findConsumeRecord"
+	ResourcesCenter_PurchaseUserBalance_FullMethodName  = "/resourcesCenter.ResourcesCenter/purchaseUserBalance"
+	ResourcesCenter_UseUserDetailed_FullMethodName      = "/resourcesCenter.ResourcesCenter/useUserDetailed"
+	ResourcesCenter_FindPreview_FullMethodName          = "/resourcesCenter.ResourcesCenter/findPreview"
+	ResourcesCenter_UserMerge_FullMethodName            = "/resourcesCenter.ResourcesCenter/userMerge"
+	ResourcesCenter_UpdateVipTime_FullMethodName        = "/resourcesCenter.ResourcesCenter/updateVipTime"
+	ResourcesCenter_EntSourceNumAdd_FullMethodName      = "/resourcesCenter.ResourcesCenter/entSourceNumAdd"
+	ResourcesCenter_EntAccountAdd_FullMethodName        = "/resourcesCenter.ResourcesCenter/entAccountAdd"
+	ResourcesCenter_EntAccountGiven_FullMethodName      = "/resourcesCenter.ResourcesCenter/entAccountGiven"
+	ResourcesCenter_EntAccountRecovery_FullMethodName   = "/resourcesCenter.ResourcesCenter/entAccountRecovery"
+	ResourcesCenter_JyExportChargeAmount_FullMethodName = "/resourcesCenter.ResourcesCenter/jyExportChargeAmount"
+	ResourcesCenter_JyExportCharge_FullMethodName       = "/resourcesCenter.ResourcesCenter/jyExportCharge"
 )
 
 // ResourcesCenterClient is the client API for ResourcesCenter service.
@@ -61,6 +63,10 @@ type ResourcesCenterClient interface {
 	EntAccountGiven(ctx context.Context, in *EntOperateReq, opts ...grpc.CallOption) (*Response, error)
 	// 权益收回
 	EntAccountRecovery(ctx context.Context, in *EntOperateReq, opts ...grpc.CallOption) (*Response, error)
+	// 剑鱼定制导出扣费方式
+	JyExportChargeAmount(ctx context.Context, in *ChargeAccountReq, opts ...grpc.CallOption) (*ChargeAccountResp, error)
+	// 剑鱼定制导出数据扣费
+	JyExportCharge(ctx context.Context, in *ChargeReq, opts ...grpc.CallOption) (*ChargeResp, error)
 }
 
 type resourcesCenterClient struct {
@@ -179,6 +185,24 @@ func (c *resourcesCenterClient) EntAccountRecovery(ctx context.Context, in *EntO
 	return out, nil
 }
 
+func (c *resourcesCenterClient) JyExportChargeAmount(ctx context.Context, in *ChargeAccountReq, opts ...grpc.CallOption) (*ChargeAccountResp, error) {
+	out := new(ChargeAccountResp)
+	err := c.cc.Invoke(ctx, ResourcesCenter_JyExportChargeAmount_FullMethodName, in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *resourcesCenterClient) JyExportCharge(ctx context.Context, in *ChargeReq, opts ...grpc.CallOption) (*ChargeResp, error) {
+	out := new(ChargeResp)
+	err := c.cc.Invoke(ctx, ResourcesCenter_JyExportCharge_FullMethodName, in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // ResourcesCenterServer is the server API for ResourcesCenter service.
 // All implementations must embed UnimplementedResourcesCenterServer
 // for forward compatibility
@@ -207,6 +231,10 @@ type ResourcesCenterServer interface {
 	EntAccountGiven(context.Context, *EntOperateReq) (*Response, error)
 	// 权益收回
 	EntAccountRecovery(context.Context, *EntOperateReq) (*Response, error)
+	// 剑鱼定制导出扣费方式
+	JyExportChargeAmount(context.Context, *ChargeAccountReq) (*ChargeAccountResp, error)
+	// 剑鱼定制导出数据扣费
+	JyExportCharge(context.Context, *ChargeReq) (*ChargeResp, error)
 	mustEmbedUnimplementedResourcesCenterServer()
 }
 
@@ -250,6 +278,12 @@ func (UnimplementedResourcesCenterServer) EntAccountGiven(context.Context, *EntO
 func (UnimplementedResourcesCenterServer) EntAccountRecovery(context.Context, *EntOperateReq) (*Response, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method EntAccountRecovery not implemented")
 }
+func (UnimplementedResourcesCenterServer) JyExportChargeAmount(context.Context, *ChargeAccountReq) (*ChargeAccountResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method JyExportChargeAmount not implemented")
+}
+func (UnimplementedResourcesCenterServer) JyExportCharge(context.Context, *ChargeReq) (*ChargeResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method JyExportCharge not implemented")
+}
 func (UnimplementedResourcesCenterServer) mustEmbedUnimplementedResourcesCenterServer() {}
 
 // UnsafeResourcesCenterServer may be embedded to opt out of forward compatibility for this service.
@@ -479,6 +513,42 @@ func _ResourcesCenter_EntAccountRecovery_Handler(srv interface{}, ctx context.Co
 	return interceptor(ctx, in, info, handler)
 }
 
+func _ResourcesCenter_JyExportChargeAmount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ChargeAccountReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ResourcesCenterServer).JyExportChargeAmount(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: ResourcesCenter_JyExportChargeAmount_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ResourcesCenterServer).JyExportChargeAmount(ctx, req.(*ChargeAccountReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _ResourcesCenter_JyExportCharge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ChargeReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ResourcesCenterServer).JyExportCharge(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: ResourcesCenter_JyExportCharge_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ResourcesCenterServer).JyExportCharge(ctx, req.(*ChargeReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // ResourcesCenter_ServiceDesc is the grpc.ServiceDesc for ResourcesCenter service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -534,6 +604,14 @@ var ResourcesCenter_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "entAccountRecovery",
 			Handler:    _ResourcesCenter_EntAccountRecovery_Handler,
 		},
+		{
+			MethodName: "jyExportChargeAmount",
+			Handler:    _ResourcesCenter_JyExportChargeAmount_Handler,
+		},
+		{
+			MethodName: "jyExportCharge",
+			Handler:    _ResourcesCenter_JyExportCharge_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "resourcesCenter.proto",

+ 22 - 1
rpc/resourcesCenterclient/resourcescenter.go

@@ -1,7 +1,7 @@
 // Code generated by goctl. DO NOT EDIT.
 // Source: resourcesCenter.proto
 
-package resourcesCenterclient
+package resourcescenterclient
 
 import (
 	"context"
@@ -15,6 +15,10 @@ import (
 type (
 	AccountBalanceRes  = resourcesCenter.AccountBalanceRes
 	Balance            = resourcesCenter.Balance
+	ChargeAccountReq   = resourcesCenter.ChargeAccountReq
+	ChargeAccountResp  = resourcesCenter.ChargeAccountResp
+	ChargeReq          = resourcesCenter.ChargeReq
+	ChargeResp         = resourcesCenter.ChargeResp
 	ConsumeRecord      = resourcesCenter.ConsumeRecord
 	ConsumeRecordRes   = resourcesCenter.ConsumeRecordRes
 	Detailed           = resourcesCenter.Detailed
@@ -31,6 +35,7 @@ type (
 	ResourcesAuthRes   = resourcesCenter.ResourcesAuthRes
 	ResourcesReq       = resourcesCenter.ResourcesReq
 	Response           = resourcesCenter.Response
+	SomeInfo           = resourcesCenter.SomeInfo
 	UseUserResponse    = resourcesCenter.UseUserResponse
 	VipReq             = resourcesCenter.VipReq
 
@@ -59,6 +64,10 @@ type (
 		EntAccountGiven(ctx context.Context, in *EntOperateReq, opts ...grpc.CallOption) (*Response, error)
 		// 权益收回
 		EntAccountRecovery(ctx context.Context, in *EntOperateReq, opts ...grpc.CallOption) (*Response, error)
+		// 剑鱼定制导出扣费方式
+		JyExportChargeAmount(ctx context.Context, in *ChargeAccountReq, opts ...grpc.CallOption) (*ChargeAccountResp, error)
+		// 剑鱼定制导出数据扣费
+		JyExportCharge(ctx context.Context, in *ChargeReq, opts ...grpc.CallOption) (*ChargeResp, error)
 	}
 
 	defaultResourcesCenter struct {
@@ -143,3 +152,15 @@ func (m *defaultResourcesCenter) EntAccountRecovery(ctx context.Context, in *Ent
 	client := resourcesCenter.NewResourcesCenterClient(m.cli.Conn())
 	return client.EntAccountRecovery(ctx, in, opts...)
 }
+
+// 剑鱼定制导出扣费方式
+func (m *defaultResourcesCenter) JyExportChargeAmount(ctx context.Context, in *ChargeAccountReq, opts ...grpc.CallOption) (*ChargeAccountResp, error) {
+	client := resourcesCenter.NewResourcesCenterClient(m.cli.Conn())
+	return client.JyExportChargeAmount(ctx, in, opts...)
+}
+
+// 剑鱼定制导出数据扣费
+func (m *defaultResourcesCenter) JyExportCharge(ctx context.Context, in *ChargeReq, opts ...grpc.CallOption) (*ChargeResp, error) {
+	client := resourcesCenter.NewResourcesCenterClient(m.cli.Conn())
+	return client.JyExportCharge(ctx, in, opts...)
+}

+ 16 - 0
rpc/test/test1_test.go

@@ -108,3 +108,19 @@ func Test_userMerge(t *testing.T) {
 	log.Println("err ", err)
 	log.Println("req ", res)
 }
+
+// 账号资源余额
+func Test_Balance(t *testing.T) {
+	ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
+	FileSystem := resourcesCenterclient.NewResourcesCenter(zrpc.MustNewClient(c.FileSystemConf))
+	req := &resourcesCenterclient.ResourcesReq{
+		AccountId:      "6230219119963964eb6f4ad9",
+		ResourceType:   "数据流包",
+		Vipstate:       0,
+		ResourceName:   "高级字段包",
+		ShowMinEndTime: 0,
+	}
+	res, err := FileSystem.FindAccountBalance(ctx, req)
+	log.Println("err ", err)
+	log.Println("req ", res)
+}

+ 238 - 0
service/exportChargeService.go

@@ -0,0 +1,238 @@
+package service
+
+import (
+	"app.yhyue.com/moapp/jyResourcesCenter/entity"
+	"app.yhyue.com/moapp/jyResourcesCenter/rpc/resourcesCenter"
+	"app.yhyue.com/moapp/jybase/common"
+	"strings"
+	"time"
+)
+
+// @Author jianghan
+// @Date 2025/2/7
+// @Description 查询可扣费方式
+func ChargeAccount(data *resourcesCenter.ChargeAccountReq) (resp *resourcesCenter.ChargeAccountResp) {
+	now := time.Now().Format("2006-01-02")
+	jyOrm := entity.JyEngine.NewSession()
+	souceOrm := entity.Engine.NewSession()
+	var exportPower int
+	has, _ := jyOrm.Table("entniche_user").Cols("export_power").Where("id = ?", data.UserId).Get(&exportPower)
+	if has && exportPower == 0 {
+		return &resourcesCenter.ChargeAccountResp{Code: entity.ErrorCode, Message: "该人员没有数据定制导出权限"}
+	}
+	entInfo, b := entity.Mgo.FindOne("user", map[string]interface{}{"entid": data.EntId})
+	var entNums int64
+	if b && len(*entInfo) > 0 && (*entInfo)["plan"] != nil {
+		entNums = common.Int64All((*entInfo)["current"])
+	} else {
+		return &resourcesCenter.ChargeAccountResp{Code: entity.ErrorCode, Message: "未查询到企业数据流量"}
+	}
+	var personNums int64
+	_ = souceOrm.Table("account_resources").Cols("SUM(number) AS totalNum").
+		Where("accountId = ? and endTime >= ? and resourceType = ?", data.EntId, now, "高级字段包").Find(&personNums)
+	if exportPower == 1 && (entNums > 0 || personNums == 0) {
+		// 企业流量包扣除
+		var personLimit *entity.PersonLimit
+		_ = jyOrm.Table("entniche_export_limit").Select("*").
+			Where("ent_id = ? and user_id =  ?", data.EntId, data.UserId).Find(&personLimit)
+		return &resourcesCenter.ChargeAccountResp{
+			Code: entity.SuccessCode,
+			Data: &resourcesCenter.SomeInfo{
+				ChargeType: 0,
+				Num1:       entNums,
+				Num2:       personLimit.DataLimit,
+				Num3:       common.Int64All(common.If(personLimit.DataLimit == 0 && personLimit.MaxNums == 0, 0, personLimit.DataLimit-personLimit.ExportNums)),
+				Num4:       personLimit.MaxNums,
+				Num5:       common.Int64All(common.If(personLimit.DataLimit == 0 && personLimit.MaxNums == 0, 0, personLimit.MaxNums-personLimit.AllExportNums)),
+			},
+		}
+	} else {
+		// 个人高级字段包扣除
+		return &resourcesCenter.ChargeAccountResp{
+			Code: entity.SuccessCode,
+			Data: &resourcesCenter.SomeInfo{
+				ChargeType: 1,
+				Num1:       personNums,
+			},
+		}
+	}
+}
+
+// @Author jianghan
+// @Date 2025/2/7
+// @Description
+//
+//	剑鱼定制导出企业流量包扣费,优先使用企业流量包扣费(个人账号有权限且企业下有可导出数量)
+//	个人流量包扣费只使用 高级流量包余额
+func ChargeFunc(data *resourcesCenter.ChargeReq) (resp *resourcesCenter.ChargeResp) {
+	if data.ChargeType == 0 {
+		// 扣除企业数据包
+		return entCharge(data)
+	} else {
+		// 扣除个人数据包
+		return personCharge(data)
+	}
+}
+
+func entCharge(data *resourcesCenter.ChargeReq) (resp *resourcesCenter.ChargeResp) {
+	now := time.Now().Format("2006-01-02 15:04:05")
+	souceOrm := entity.Engine.NewSession()
+	jyOrm := entity.JyEngine.NewSession()
+	var personLimit *entity.PersonLimit
+	_ = jyOrm.Table("entniche_export_limit").Select("*").
+		Where("ent_id = ? and user_id = ?", data.EntId, data.UserId).Find(&personLimit)
+	var entNums int64
+	entInfo, b := entity.Mgo.FindOne("user", map[string]interface{}{"entid": data.EntId})
+	if b && len(*entInfo) > 0 && (*entInfo)["plan"] != nil {
+		entNums = common.Int64All((*entInfo)["current"])
+	} else {
+		return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "未查询到企业数据流量"}
+	}
+	if entNums < data.DeductNum {
+		return &resourcesCenter.ChargeResp{
+			Code:    entity.SuccessCode,
+			Message: "",
+			Data: &resourcesCenter.SomeInfo{
+				ChargeType:   0,
+				ChargeResult: 0,
+				FailMsg:      "企业数据流量包余额不足",
+				Num1:         entNums,
+				Num2:         personLimit.DataLimit,
+				Num3:         common.Int64All(common.If(personLimit.DataLimit == 0 && personLimit.MaxNums == 0, 0, personLimit.DataLimit-personLimit.ExportNums)),
+				Num4:         personLimit.MaxNums,
+				Num5:         common.Int64All(common.If(personLimit.DataLimit == 0 && personLimit.MaxNums == 0, 0, personLimit.MaxNums-personLimit.AllExportNums)),
+			},
+		}
+	}
+	// 先更新mgo企业数据总量
+	query := map[string]interface{}{
+		"entid": data.EntId,
+		"plan.current": map[string]interface{}{
+			"$gte": data.DeductNum,
+		},
+	}
+	update := map[string]interface{}{
+		"$inc": map[string]interface{}{
+			"plan.current": -data.DeductNum,
+		},
+	}
+	b = entity.Mgo.Update("user", query, update, false, false)
+	if !b {
+		return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "操作失败"}
+	}
+	err := jyOrm.Begin()
+	//更新限额
+	if err != nil {
+		return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "操作失败"}
+	}
+	var updateNum = int64(0)
+	if personLimit.DataLimit == 0 && personLimit.MaxNums == 0 {
+		// 当前账号没有限额
+		updateNum, err = jyOrm.Table("entniche_export_limit").Where("id = ?", personLimit.Id).
+			Incr("export_nums", data.ExportNum).
+			Incr("all_export_nums", data.ExportNum).Update(nil)
+		if err != nil || updateNum <= 0 {
+			_ = jyOrm.Rollback()
+			return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "操作失败"}
+		}
+	} else {
+		updateNum, err = jyOrm.Table("entniche_export_limit").Where("id = ? and data_limit >=", 0, data.DeductNum).
+			Decr("data_limit", data.DeductNum).
+			Decr("max_nums", data.DeductNum).
+			Incr("export_nums", data.ExportNum).
+			Incr("all_export_nums", data.ExportNum).
+			Update(nil)
+		if err != nil {
+			_ = jyOrm.Rollback()
+			return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "操作失败"}
+		}
+		if updateNum <= 0 {
+			_ = jyOrm.Rollback()
+			_ = jyOrm.Table("entniche_export_limit").Select("*").
+				Where("ent_id = ? and user_id =  ?", data.EntId, data.UserId).Find(&personLimit)
+			var msg []string
+			if personLimit.DataLimit < data.DeductNum {
+				msg = append(msg, "超出您的每日导出限额")
+			}
+			if personLimit.MaxNums < data.DeductNum {
+				msg = append(msg, "超出您的数据导出总量限额")
+			}
+			return &resourcesCenter.ChargeResp{
+				Code:    entity.SuccessCode,
+				Message: "",
+				Data: &resourcesCenter.SomeInfo{
+					ChargeType:   0,
+					ChargeResult: 0,
+					FailMsg:      common.ObjToString(common.If(len(msg) > 0, strings.Join(msg, "、"), "")),
+					Num1:         entNums,
+					Num2:         personLimit.DataLimit,
+					Num3:         personLimit.DataLimit - personLimit.ExportNums,
+					Num4:         personLimit.MaxNums,
+					Num5:         personLimit.MaxNums - personLimit.AllExportNums,
+				},
+			}
+		}
+	}
+	//保存导出日志
+	var username, phone string
+	_ = souceOrm.Table("entniche_user").Cols("name, phone").
+		Where("id = ?", data.UserId).Find(&username, &phone)
+	exportLog := &entity.ExportLog{
+		UserName:    username,
+		ExportTime:  now,
+		DataSource:  "3",
+		ExportNum:   data.ExportNum,
+		DeductNum:   data.ExportNum, //去重
+		DownloadUrl: data.DownloadUrl,
+		EntId:       data.EntId,
+		Phone:       phone,
+		UserId:      data.UserId,
+		Filter:      data.Filter,
+	}
+	_, err = jyOrm.Table("entniche_export_log").Insert(&exportLog)
+	if err != nil {
+		_ = jyOrm.Rollback()
+		return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "操作失败"}
+	}
+	//保存账号使用明细
+	detailed := entity.Detailed{
+		AccountId:    data.AccountId,
+		CompanyId:    data.EntId,
+		ResourceType: "高级字段包",
+		Number:       data.DeductNum,
+		Name:         "数据流包",
+		CreateTime:   time.Now().Local(),
+		Remarks:      "",
+		UserType:     0,
+		UserId:       data.PositionId,
+		AccountType:  1,
+		EntId:        data.EntId,
+	}
+	_, err = souceOrm.Table(ConsumeRecord).Insert(&detailed)
+	if err != nil {
+		_ = jyOrm.Rollback()
+		return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "操作失败"}
+	}
+	err = jyOrm.Commit()
+	if err != nil {
+		_ = jyOrm.Rollback()
+		return &resourcesCenter.ChargeResp{Code: entity.ErrorCode, Message: "事务提交失败"}
+	}
+	return &resourcesCenter.ChargeResp{
+		Code:    entity.SuccessCode,
+		Message: "",
+		Data: &resourcesCenter.SomeInfo{
+			ChargeType:   0,
+			ChargeResult: 1,
+			Num1:         entNums,
+			Num2:         personLimit.DataLimit,
+			Num3:         personLimit.DataLimit - personLimit.ExportNums,
+			Num4:         personLimit.MaxNums,
+			Num5:         personLimit.MaxNums - personLimit.AllExportNums,
+		},
+	}
+}
+
+func personCharge(data *resourcesCenter.ChargeReq) (resp *resourcesCenter.ChargeResp) {
+	return nil
+}

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels