service/app/mix/controller/vas_op.go

45 lines
1.0 KiB
Go
Raw Normal View History

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"
"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)
}