MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / ListLotteryDraws

Method ListLotteryDraws

internal/api/lotteryDraw.go:48–67  ·  view source on GitHub ↗

ListLotteryDraws 获取所有抽奖活动

(ctx *gin.Context, req req.ListLotteryDrawsReq)

Source from the content-addressed store, hash-verified

46
47// ListLotteryDraws 获取所有抽奖活动
48func (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 创建新的抽奖活动
70func (lh *LotteryDrawHandler) CreateLotteryDraw(ctx *gin.Context, req req.CreateLotteryDrawReq) (Result, error) {

Callers

nothing calls this directly

Calls 1

ListLotteryDrawsMethod · 0.65

Tested by

no test coverage detected