|
|
|
package controller
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"tyj_admin/api/v1/game"
|
|
|
|
"tyj_admin/internal/serviceGame"
|
|
|
|
)
|
|
|
|
|
|
|
|
var GameOrder = orderController{}
|
|
|
|
|
|
|
|
type orderController struct {
|
|
|
|
BaseController
|
|
|
|
}
|
|
|
|
|
|
|
|
// order 列表
|
|
|
|
func (c *orderController) OrderList(ctx context.Context, req *game.OrderSearchReq) (res *game.OrderSearchRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().GetOrders(ctx, req)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// 订单统计数据
|
|
|
|
func (c *orderController) OrderCount(ctx context.Context, req *game.OrderCountReq) (res *game.OrderCountRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().GetOrderCount(ctx, req)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// 修改金币
|
|
|
|
func (c *orderController) ChangeCoin(ctx context.Context, req *game.AddCoinReq) (res *game.AddCoinRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().ChangeCoin(ctx, req)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// 充值
|
|
|
|
func (c *orderController) Deposit(ctx context.Context, req *game.OrderDepositReq) (res *game.OrderDepositRes, err error) {
|
|
|
|
//if req.Platform == 1 {
|
|
|
|
res, err = serviceGame.GameOrder().Deposit(ctx, req)
|
|
|
|
//} else {
|
|
|
|
// //res, err = serviceGame.GameOrder().IosDeposit(ctx, req)
|
|
|
|
//}
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *orderController) GetOrderLog(ctx context.Context, req *game.OrderLogReq) (res *game.OrderLogRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().GetOrderLog(ctx, req)
|
|
|
|
return res, err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *orderController) GetOrderLogPlatform(ctx context.Context, req *game.OrderLogPlatformReq) (res *game.OrderLogPlatformRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().GetOrderLogPlatform(ctx, req)
|
|
|
|
return res, err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *orderController) GetOrderBehavior(ctx context.Context, req *game.OrderBehaviorReq) (res *game.OrderBehaviorRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().GetOrderBehavior(ctx, req)
|
|
|
|
return res, err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *orderController) GetRechargePer(ctx context.Context, req *game.RechargePerReq) (res *game.RechargePerRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().GetRechargePer(ctx, req)
|
|
|
|
return res, err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *orderController) GetRechargeControl(ctx context.Context, req *game.GetRechargeControlReq) (res *game.GetRechargeControlRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().GetRechargeControl(ctx, req)
|
|
|
|
return res, err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *orderController) AddRechargeControl(ctx context.Context, req *game.AddRechargeControlReq) (res *game.AddRechargeControlRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().AddRechargeControl(ctx, req)
|
|
|
|
return res, err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *orderController) DeleteRechargeControl(ctx context.Context, req *game.DeleteRechargeControlReq) (res *game.DeleteRechargeControlRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().DeleteRechargeControl(ctx, req)
|
|
|
|
return res, err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *orderController) ChangeOrderState(ctx context.Context, req *game.ChangeOrderStateReq) (res *game.ChangeOrderStateRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().ChangeOrderState(ctx, req)
|
|
|
|
return res, err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *orderController) GetGMOrderList(ctx context.Context, req *game.GetGMOrderListReq) (res *game.GetGMOrderListRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().GetGMOrderList(ctx, req)
|
|
|
|
return res, err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *orderController) ResetRechargeSign(ctx context.Context, req *game.ResetRechargeSignReq) (res *game.ResetRechargeSignRes, err error) {
|
|
|
|
res, err = serviceGame.GameOrder().ResetRechargeSign(ctx, req)
|
|
|
|
return
|
|
|
|
}
|