Bladeren bron

feat:xiugai

wangchuanjin 5 maanden geleden
bovenliggende
commit
96e73bf854

BIN
api/api.exe


+ 66 - 69
api/integral.api

@@ -1,38 +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 {
@@ -49,8 +49,8 @@ type useUserResponse {
 }
 
 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"` //资源类型
 }
 
@@ -65,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 {
@@ -82,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"` //资源类型
 }
 
@@ -95,12 +95,12 @@ 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 {
@@ -110,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 {
@@ -136,27 +136,25 @@ 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"`
+	EntId  int64  `form:"entId,optional"`
+	UserId string `form:"userId,optional"`
 }
 
 type ChargeReq {
 	EntId       int64  `form:"entId,optional"`
-	UserId      int64  `form:"userId,optional"`
+	UserId      string `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 {
@@ -169,53 +167,52 @@ 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)
-}
-
+}

+ 3 - 3
api/internal/handler/exportchargehandler.go

@@ -13,16 +13,16 @@ 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)
+			httpx.Error(w, err)
 			return
 		}
 
 		l := logic.NewExportChargeLogic(r.Context(), svcCtx)
 		resp, err := l.ExportCharge(&req)
 		if err != nil {
-			httpx.ErrorCtx(r.Context(), w, err)
+			httpx.Error(w, err)
 		} else {
-			httpx.OkJsonCtx(r.Context(), w, resp)
+			httpx.OkJson(w, resp)
 		}
 	}
 }

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

@@ -1,21 +0,0 @@
-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)
-		}
-	}
-}

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

@@ -1,21 +0,0 @@
-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)
-		}
-	}
-}

+ 28 - 28
api/internal/handler/routes.go

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

+ 97 - 99
api/internal/types/types.go

@@ -1,48 +1,80 @@
 // Code generated by goctl. DO NOT EDIT.
 package types
 
-type ChargeAccountReq struct {
-	EntId  int64 `form:"entId,optional"`
-	UserId int64 `form:"userId,optional"`
-}
-
-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 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 EntAccountAdd struct {
-	EntSourceNumAdd
-	AccountNum int64 `form:"accountNum,optional"` //新增账号数量,-1操作现有所有账户
+type VipReq struct {
+	VipTime   string `form:"vipTime,optional"`   //超级订阅时间
+	AccountId string `form:"accountId,optional"` //账户标识
 }
 
-type EntOperateReq struct {
+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 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"`         //资源名称
+type ResourcesRes struct {
+	Code    int64  `json:"code"`
+	Message string `json:"message"`
+}
+
+type UseUserResponse struct {
+	Code          int64  `json:"code"`
+	Message       string `json:"message"`
+	DeductionNumb int64  `json:"deductionNumb"`
+}
+
+type PreviewReq struct {
+	InfoId       string `form:"infoId,optional"`       //信息标识
+	AccountId    string `form:"accountId,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"`      //备注
+}
+
+type PreviewRes struct {
+	Code          int64  `json:"code"`
+	Message       string `json:"message"`
+	RepeatNumb    int64  `json:"repeatNumb"`
+	DeductionNumb int64  `json:"deductionNumb"`
+}
+
+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 RecordRes struct {
+	Code    int64                    `json:"code"`
+	Message string                   `json:"message"`
+	Data    []map[string]interface{} `json:"data"`
+	Count   int64                    `json:"count"`
 }
 
 type AuthReq struct {
@@ -72,90 +104,56 @@ 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 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"`             //账户标识
+type EntSourceNumAdd struct {
+	AccountId    string `form:"accountId,optional"`    //账户标识
 	CompanyId    int64  `form:"companyId,optional"`    //企业标识
-	DepartmentId int64  `form:"departmentId,optional"` //组织标识
-	Name         string `form:"name"`                  //资源名称
+	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"` //资源类型
-	Number       int64  `form:"number"`                //数量
+	Number       int64  `form:"number,optional"`       //资源数量
 	Spec         string `form:"spec,optional"`         //规格
-	AppId        string `form:"appId"`                 //标识
-	EndTime      string `form:"endTime,optional"`      //新增时数据包截止时间
-	VipTime      string `form:"vipTime,optional"`      //超级订阅时间
+	AppId        string `form:"appId,optional"`        //标识
+	EndTime      string `form:"endTime,optional"`      //资源有效时间
 	Remarks      string `form:"remarks,optional"`      //备注
 }
 
-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 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 EntAccountAdd struct {
+	EntSourceNumAdd
+	AccountNum int64 `form:"accountNum,optional"` //新增账号数量,-1操作现有所有账户
 }
 
-type UseResourcesReq struct {
-	AccountId        string `form:"accountId"`                 //账户标识
+type EntOperateReq struct {
 	CompanyId        int64  `form:"companyId,optional"`        //企业标识
-	DepartmentId     int64  `form:"departmentId,optional"`     //组织标识
-	Name             string `form:"name"`                      //资源名称
+	EmpowerId        int64  `form:"empowerId,optional"`        //套餐id
 	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"`         //超级订阅状态
+	OperateAccountId string `form:"operateAccountId,optional"` //操作账户
 }
 
-type UseUserResponse struct {
-	Code          int64  `json:"code"`
-	Message       string `json:"message"`
-	DeductionNumb int64  `json:"deductionNumb"`
+type ChargeAccountReq struct {
+	EntId  int64  `form:"entId,optional"`
+	UserId string `form:"userId,optional"`
 }
 
-type VipReq struct {
-	VipTime   string `form:"vipTime,optional"`   //超级订阅时间
-	AccountId string `form:"accountId,optional"` //账户标识
+type ChargeReq struct {
+	EntId       int64  `form:"entId,optional"`
+	UserId      string `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"`
+}
+
+type ChargeResp struct {
+	Code    int64       `json:"code"`
+	Message string      `json:"message"`
+	Data    interface{} `json:"data"`
 }