syntax = "v1" type purchResourcesReq { 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 { 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"` //信息标识 DuplicateRemoval int64 `form:"duplicateRemoval,optional"` //是否去重0不去1去重 } type resourcesRes { // TODO: add members here and delete this comment 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"` //企业标识 ResourceType string `form:"resourceType,optional"` //资源类型 } type previewRes { // TODO: add members here and delete this comment Code int64 `json:"code"` Message string `json:"message"` RepeatNumb int64 `json:"repeatNumb"` DeductionNumb int64 `json:"deductionNumb"` } //流水账请求参数返回参数 type recordReq { 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 新增 作废 QueryTime string `form:"queryTime,optional"` //查询时间 } type recordRes { Code int64 `json:"code"` Message string `json:"message"` Data []map[string]interface{} `json:"data"` Count int64 `json:"count"` } //查询用户资源权限 type authReq { AccountId string `form:"accountId,optional"` //企业标识 UserId string `form:"userId,optional"` //用户标识 ResourceType string `form:"resourceType,optional"` //资源类型 } type authRes { Code int64 `json:"code"` Message string `json:"message"` Data []map[string]interface{} `json:"data"` } //账户余额 type balanceReq { AccountId string `form:"accountId,optional"` //企业标识 UserId string `form:"userId,optional"` //用户标识 ResourceType string `form:"resourceType,optional"` //资源类型 } type balanceRes { Code int64 `json:"code"` Message string `json:"message"` Data []map[string]interface{} `json:"data"` } type mergeInfo { MergeUser string `form:"mergeUser"` //合并用户 MergedUser string `form:"mergedUser"` //被合并用户 AppId string `form:"appId"` //身份标识 } 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) }