ListLotteryDraws 获取所有抽奖活动
(ctx *gin.Context, req req.ListLotteryDrawsReq)
| 46 | |
| 47 | // ListLotteryDraws 获取所有抽奖活动 |
| 48 | func (lh *LotteryDrawHandler) ListLotteryDraws(ctx *gin.Context, req req.ListLotteryDrawsReq) (Result, error) { |
| 49 | pagination := domain.Pagination{ |
| 50 | Page: req.Page, |
| 51 | Size: req.Size, |
| 52 | } |
| 53 | |
| 54 | ld, err := lh.svc.ListLotteryDraws(ctx, req.Status, pagination) |
| 55 | if err != nil { |
| 56 | return Result{ |
| 57 | Code: ServerRequestError, |
| 58 | Msg: ListLotteryDrawsError, |
| 59 | }, err |
| 60 | } |
| 61 | |
| 62 | return Result{ |
| 63 | Code: RequestsOK, |
| 64 | Msg: ListLotteryDrawsSuccess, |
| 65 | Data: ld, |
| 66 | }, nil |
| 67 | } |
| 68 | |
| 69 | // CreateLotteryDraw 创建新的抽奖活动 |
| 70 | func (lh *LotteryDrawHandler) CreateLotteryDraw(ctx *gin.Context, req req.CreateLotteryDrawReq) (Result, error) { |
nothing calls this directly
no test coverage detected