2024-01-04 18:10:19 +08:00
|
|
|
package controller
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gin-gonic/gin"
|
2024-01-17 21:57:45 +08:00
|
|
|
"service/api/errcode"
|
|
|
|
vasproto "service/api/proto/vas/proto"
|
2024-04-29 17:39:49 +08:00
|
|
|
zoneproto "service/api/proto/zone/proto"
|
2024-01-17 21:57:45 +08:00
|
|
|
"service/app/mix/service"
|
|
|
|
"service/bizcommon/util"
|
|
|
|
"service/library/logger"
|
2024-01-04 18:10:19 +08:00
|
|
|
)
|
|
|
|
|
2024-03-21 16:02:41 +08:00
|
|
|
func OpCoinOrderList(ctx *gin.Context) {
|
2024-01-17 21:57:45 +08:00
|
|
|
req := ctx.MustGet("client_req").(*vasproto.OpCoinOrderListReq)
|
2024-03-21 16:02:41 +08:00
|
|
|
if req.Limit <= 0 {
|
|
|
|
req.Limit = 1000
|
|
|
|
}
|
2024-01-17 21:57:45 +08:00
|
|
|
list, ec := service.DefaultService.OpCoinOrderList(ctx, req)
|
|
|
|
if ec != errcode.ErrCodeVasSrvOk {
|
|
|
|
logger.Error("OpCoinOrderList fail, req: %v, ec: %v", util.ToJson(req), ec)
|
|
|
|
ReplyErrCodeMsg(ctx, ec)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
data := &vasproto.OpCoinOrderListData{
|
|
|
|
List: list,
|
|
|
|
}
|
|
|
|
ReplyOk(ctx, data)
|
2024-01-04 18:10:19 +08:00
|
|
|
}
|
2024-03-21 16:02:41 +08:00
|
|
|
|
|
|
|
func OpOrderList(ctx *gin.Context) {
|
|
|
|
req := ctx.MustGet("client_req").(*vasproto.OpOrderListReq)
|
|
|
|
if req.Limit <= 0 {
|
|
|
|
req.Limit = 1000
|
|
|
|
}
|
|
|
|
list, ec := service.DefaultService.OpOrderList(ctx, req)
|
|
|
|
if ec != errcode.ErrCodeVasSrvOk {
|
|
|
|
logger.Error("OpOrderList fail, req: %v, ec: %v", util.ToJson(req), ec)
|
|
|
|
ReplyErrCodeMsg(ctx, ec)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
data := &vasproto.OpOrderListData{
|
|
|
|
List: list,
|
|
|
|
}
|
|
|
|
ReplyOk(ctx, data)
|
|
|
|
}
|
2024-04-29 17:39:49 +08:00
|
|
|
|
|
|
|
func OpZoneRefundList(ctx *gin.Context) {
|
|
|
|
req := ctx.MustGet("client_req").(*zoneproto.OpZoneRefundListParam)
|
|
|
|
if req.Limit <= 0 {
|
|
|
|
req.Limit = 1000
|
|
|
|
}
|
|
|
|
list, ec := service.DefaultService.OpZoneRefundList(ctx, req)
|
|
|
|
if ec != errcode.ErrCodeVasSrvOk {
|
|
|
|
logger.Error("OpOrderList fail, req: %v, ec: %v", util.ToJson(req), ec)
|
|
|
|
ReplyErrCodeMsg(ctx, ec)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
data := &zoneproto.OpZoneRefundListData{
|
|
|
|
List: list,
|
|
|
|
}
|
|
|
|
ReplyOk(ctx, data)
|
|
|
|
}
|