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.
43 lines
1.1 KiB
43 lines
1.1 KiB
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().AndroidDeposit(ctx, req) |
|
} else { |
|
res, err = serviceGame.GameOrder().IosDeposit(ctx, req) |
|
} |
|
|
|
return |
|
}
|
|
|