32 lines
1.1 KiB
Go
32 lines
1.1 KiB
Go
package logic
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
vasproto "service/api/proto/vas/proto"
|
|
zoneproto "service/api/proto/zone/proto"
|
|
"service/dbstruct"
|
|
)
|
|
|
|
// 获取金币订单
|
|
func (v *Vas) OpCoinOrderList(ctx *gin.Context, req *vasproto.OpCoinOrderListReq) ([]*dbstruct.CoinOrder, error) {
|
|
if len(req.OrderId) > 0 {
|
|
o, err := v.store.GetCoinOrderById(ctx, nil, req.OrderId)
|
|
return []*dbstruct.CoinOrder{o}, err
|
|
}
|
|
return v.store.GetCoinOrders(ctx, nil, req.Mid, req.St, req.Et, req.Offset, req.Limit)
|
|
}
|
|
|
|
// 获取订单
|
|
func (v *Vas) OpOrderList(ctx *gin.Context, req *vasproto.OpOrderListReq) ([]*dbstruct.Order, error) {
|
|
if len(req.OrderId) > 0 {
|
|
o, err := v.store.GetOrderById(ctx, nil, req.OrderId)
|
|
return []*dbstruct.Order{o}, err
|
|
}
|
|
return v.store.GetOrders(ctx, nil, req.Mid, req.St, req.Et, req.Offset, req.Limit)
|
|
}
|
|
|
|
// 获取订单
|
|
func (v *Vas) OpZoneRefundList(ctx *gin.Context, req *zoneproto.OpZoneRefundListParam) ([]*dbstruct.ZoneRefundHis, error) {
|
|
return v.store.GetZoneRefundHisList(ctx, nil, req.Mid, req.Zid, req.OrderId, req.St, req.Et, req.Offset, req.Limit)
|
|
}
|