You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

333 lines
11 KiB

package game
import (
"github.com/gogf/gf/v2/frame/g"
"tyj_admin/api/v1/common"
"tyj_admin/internal/model/entity"
)
type OrderSearchReq struct {
g.Meta `path:"/order/list" tags:"订单" method:"get" summary:"订单列表"`
common.Page64Req
Account string `p:"account"`
Id string `p:"id"`
Uid int32 `p:"uid"`
Status int32 `p:"status"`
OrderId string `p:"orderId"`
ExternalOrderId string `p:"externalOrderId"`
Channel string `p:"channel"` //渠道
}
type OrderSearchRes struct {
g.Meta `mime:"application/json"`
Orders []*entity.Order `json:"list"`
common.ListRes
}
type OrderCountReq struct {
g.Meta `path:"/order/count" tags:"订单" method:"get" summary:"订单列表"`
Account string `p:"account"`
Amount int `p:"amount"`
CompareType int `p:"compareType"`
GM int `p:"GM"`
Server int `p:"server"`
common.PageReq
}
type OrderCountRes struct {
g.Meta `mime:"application/json"`
Orders []*entity.OrderCount `json:"list"`
common.ListRes
}
type OrderLogReq struct {
g.Meta `path:"/order/log" tags:"订单" method:"get" summary:"订单列表记录"`
Channel string `p:"channel"`
StartTime int64 `p:"startTime"`
EndTime int64 `p:"endTime"`
CompareType int `p:"compareType"`
CompareType1 int `p:"compareType1"`
RechargeMin int `p:"rechargeMin"`
RechargeTotal int `p:"rechargeTotal"`
ServerId int `p:"server"`
}
type AmountTotal struct {
Channel string `json:"channel" description:""`
CreateTime string `json:"createTime" description:""`
Config int `json:"config" description:""`
TotalAmount int `json:"totalAmount" description:""`
Platform int `json:"platform" description:""`
}
type AccountTotal struct {
Channel string `json:"channel" description:""`
Config int `json:"config" description:""`
CreateTime string `json:"createTime" description:""`
TotalAccount int `json:"totalAccount" description:""`
}
type ConfigCount struct {
Channel string `json:"channel" description:""`
Config int `json:"config" description:""`
TotalConfig int `json:"totalConfig" description:""`
}
type OrderLogRes struct {
g.Meta `mime:"application/json"`
AccountTotal []AccountTotal `json:"accountTotal"`
AmountTotal []AmountTotal `json:"amountTotal"`
RechargeAccountTotal []AccountTotal `json:"rechargeAccountTotal"`
}
type OrderLogPlatformReq struct {
g.Meta `path:"/order/logPlatform" tags:"订单" method:"get" summary:"订单列表记录"`
Channel string `p:"channel"`
StartTime int64 `p:"startTime"`
EndTime int64 `p:"endTime"`
CompareType int `p:"compareType"`
CompareType1 int `p:"compareType1"`
RechargeMin int `p:"rechargeMin"`
RechargeTotal int `p:"rechargeTotal"`
ServerId int `p:"server"`
}
type OrderLogPlatformRes struct {
g.Meta `mime:"application/json"`
AccountTotal []AccountTotal `json:"accountTotal"`
AmountTotal []AmountTotal `json:"amountTotal"`
RechargeAccountTotal []AccountTotal `json:"rechargeAccountTotal"`
}
type OrderBehaviorReq struct {
g.Meta `path:"/order/behavior" tags:"订单" method:"get" summary:"订单记录"`
StartTime string `p:"startTime"`
}
type OrderBehaviorRes struct {
g.Meta `mime:"application/json"`
Account []AccountTotal `json:"account"`
RechargeAccount []AccountTotal `json:"rechargeAccount"`
AmountList []AmountTotal `json:"amountList"`
}
type RechargePerReq struct {
g.Meta `path:"/order/rechargePer" tags:"订单" method:"get" summary:"订单记录"`
StartTime string `p:"startTime"`
EndTime string `p:"endTime"`
}
type RechargePerRes struct {
g.Meta `mime:"application/json"`
Account []AccountTotal `json:"account"`
RechargeAccount []AccountTotal `json:"rechargeAccount"`
}
// 充值
type OrderDepositReq struct {
g.Meta `path:"/order/deposit" tags:"订单" method:"post" summary:"补单充值"`
Uid int64 `p:"account"`
DepositId int32 `p:"depositId"`
Amount int32 `p:"amount"`
Count int32 `p:"count"`
Platform int `p:"platform"`
ServerId int `p:"serverId"`
//Channel string `p:"channel"`
}
type OrderDepositRes struct {
}
// 加游戏币
type AddCoinReq struct {
g.Meta `path:"/order/addcoin" tags:"订单" method:"post" summary:"修改游戏币"`
Uid string `p:"uid"`
Amount int32 `p:"amount"`
AmountType int32 `p:"amountType"`
//ServerId int `p:"serverId"`
}
type AddCoinRes struct {
}
// 充值控制
type RechargeControlReq struct {
g.Meta `path:"/order/rechargeControl" tags:"订单" method:"get" summary:"充值控制"`
Channel string `p:"channel"`
}
type RechargeControlRes struct {
g.Meta `mime:"application/json"`
State int32 `json:"state" description:"0-无法充值,1-允许充值"`
}
// 获取充值控制
type GetRechargeControlReq struct {
g.Meta `path:"/order/control/get" tags:"订单" method:"get" summary:"获取充值控制"`
}
type GetRechargeControlRes struct {
g.Meta `mime:"application/json"`
Control []*entity.GameRechargeControl `json:"list"`
}
// 更新充值控制
type AddRechargeControlReq struct {
g.Meta `path:"/order/control/add" tags:"订单" method:"get" summary:"更新充值控制"`
Channel string `p:"channel"`
}
type AddRechargeControlRes struct {
}
// 删除充值控制
type DeleteRechargeControlReq struct {
g.Meta `path:"/order/control/del" tags:"订单" method:"get" summary:"删除充值控制"`
Channel string `p:"channel"`
}
type DeleteRechargeControlRes struct {
}
// 修改订单状态
type ChangeOrderStateReq struct {
g.Meta `path:"/order/changeState" tags:"订单" method:"get" summary:"修改订单状态"`
State int `p:"state"`
Order string `p:"order"`
Remark string `p:"remark"`
}
type ChangeOrderStateRes struct {
g.Meta `mime:"application/json"`
ResData int `json:"data"`
}
// 修改订单状态
type GetGMOrderListReq struct {
g.Meta `path:"/order/gmList" tags:"订单" method:"get" summary:"获取订单"`
Uid int32 `p:"uid"`
ServerId int32 `p:"server"`
Config int32 `p:"config"`
TradeNo string `p:"tradeNo"`
CTime string `p:"cTime"`
ETime string `p:"eTime"`
User string `p:"user"`
Channel string `p:"channel"`
common.PageReq
}
type GetGMOrderListRes struct {
g.Meta `mime:"application/json"`
List []entity.GameRechargeLog `json:"list"`
common.ListRes
}
// 查询充值情况
type CheckRechargeSignReq struct {
g.Meta `path:"/getOrderLevel" tags:"订单" method:"get" summary:"查询充值情况"`
Id int64 `p:"unitId"`
ServerId int32 `p:"server"`
}
type CheckRechargeSignRes struct {
g.Meta `mime:"application/json"`
List []int `json:"CfgIds"`
}
// 插入充值情况
type AddRechargeSignReq struct {
g.Meta `path:"/setOrderLevel" tags:"订单" method:"get" summary:"插入充值情况"`
Id int64 `p:"unitId"`
ServerId int32 `p:"server"`
Config int32 `p:"config"`
Time int64 `p:"time"`
Token string `p:"token"`
}
type AddRechargeSignRes struct {
g.Meta `mime:"application/json"`
}
// 重置充值情况
type ResetRechargeSignReq struct {
g.Meta `path:"/order/resetSign" tags:"订单" method:"get" summary:"重置充值情况"`
Password string `p:"password"`
}
type ResetRechargeSignRes struct {
g.Meta `mime:"application/json"`
}
// 获取订单号
type GetTransactionIdReq struct {
g.Meta `path:"/order/getTransactionId" tags:"订单" method:"get" summary:"获取订单号"`
Order string `p:"order"`
}
// 订单查询响应结构体
type SignedTransaction struct {
TransactionID string `json:"transactionId"` // 苹果交易唯一标识
OriginalTxID string `json:"originalTransactionId"` // 原始交易号(用于续订跟踪)
BundleId string `json:"bundleId"` // bundleId
Quantity int `json:"quantity"` // bundleId
Price int `json:"price"` // bundleId
Type string `json:"type"` // bundleId
InAppOwnershipType string `json:"inAppOwnershipType"` // bundleId
SignedDate int64 `json:"signedDate"` // bundleId
TransactionReason string `json:"transactionReason"` // bundleId
Storefront string `json:"storefront"` // bundleId
StorefrontId string `json:"storefrontId"` // bundleId
Currency string `json:"currency"` // bundleId
AppTransactionId string `json:"appTransactionId"` // bundleId
ProductID string `json:"productId"` // 商品ID(如:com.game.diamond100)
PurchaseDate int64 `json:"purchaseDate"` // 购买时间戳(毫秒)
OriginalPurchaseDate int64 `json:"originalPurchaseDate"` // 购买时间戳(毫秒)
Environment string `json:"environment"` // 环境类型(Production/Sandbox)
}
type GetTransactionIdRes struct {
g.Meta `mime:"application/json"`
Order *SignedTransaction `json:"order"`
}
// 获取订单号
type GetHuaWeiOrderListReq struct {
g.Meta `path:"/order/getHuaWeiOrderList" tags:"订单" method:"get" summary:"获取订单号"`
ContinuationToken string `p:"continuationToken"`
StartAt string `p:"startAt"`
EndAt string `p:"endAt"`
}
type HuaWeiOrderResponse struct {
ResponseCode string `json:"responseCode"`
ResponseMessage string `json:"responseMessage"`
ContinuationToken string `json:"continuationToken"`
OrderInfoList []HuaWeiOrderInfo `json:"orderInfoList"`
}
type HuaWeiOrderInfo struct {
OrderNo string `json:"orderNo"`
RequestId string `json:"requestId"`
Country string `json:"country"`
MerchantId string `json:"merchantId"`
ApplicationId string `json:"applicationId"`
OrderTime int64 `json:"orderTime"`
TradeTime int64 `json:"tradeTime"`
ProductId string `json:"productId"`
ProductName string `json:"productName"`
PayMoney string `json:"payMoney"`
CouponAmt string `json:"couponAmt"`
MpAmt string `json:"mpAmt"`
MpRfdAmt string `json:"mpRfdAmt"`
Currency string `json:"currency"`
PayType int32 `json:"payType"`
TradeState int32 `json:"tradeState"` //订单状态,取值如下: 0:成功 2:失败 4:未支付
TradeType string `json:"tradeType"`
OriOrderNo string `json:"oriOrderNo"`
RefundTime int64 `json:"refundTime"`
RefundMoney string `json:"refundMoney"`
}
type GetHuaWeiOrderListRes struct {
g.Meta `mime:"application/json"`
Order HuaWeiOrderResponse `json:"order"`
}