63 lines
1.5 KiB
Go
63 lines
1.5 KiB
Go
package controller
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"service/api/errcode"
|
|
vasproto "service/api/proto/vas/proto"
|
|
zoneproto "service/api/proto/zone/proto"
|
|
"service/app/mix/service"
|
|
"service/bizcommon/util"
|
|
"service/library/logger"
|
|
)
|
|
|
|
func OpCoinOrderList(ctx *gin.Context) {
|
|
req := ctx.MustGet("client_req").(*vasproto.OpCoinOrderListReq)
|
|
if req.Limit <= 0 {
|
|
req.Limit = 1000
|
|
}
|
|
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)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
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)
|
|
}
|