ParticipateLotteryDraw 参与抽奖活动
(ctx *gin.Context, req req.ParticipateReq)
| 114 | |
| 115 | // ParticipateLotteryDraw 参与抽奖活动 |
| 116 | func (lh *LotteryDrawHandler) ParticipateLotteryDraw(ctx *gin.Context, req req.ParticipateReq) (Result, error) { |
| 117 | uc, ok := requireUser(ctx) |
| 118 | if !ok { |
| 119 | return Result{ |
| 120 | Code: ServerRequestError, |
| 121 | Msg: "未登录或登录已过期", |
| 122 | }, nil |
| 123 | } |
| 124 | |
| 125 | err := lh.svc.ParticipateLotteryDraw(ctx, req.ActivityID, uc.Uid) |
| 126 | if err != nil { |
| 127 | return Result{ |
| 128 | Code: ServerRequestError, |
| 129 | Msg: ParticipateLotteryDrawError, |
| 130 | }, err |
| 131 | } |
| 132 | |
| 133 | return Result{ |
| 134 | Code: RequestsOK, |
| 135 | Msg: ParticipateLotteryDrawSuccess, |
| 136 | }, nil |
| 137 | } |
| 138 | |
| 139 | // ListKillEvents 获取所有秒杀活动 |
| 140 | func (lh *LotteryDrawHandler) ListKillEvents(ctx *gin.Context, req req.GetAllSecondKillEventsReq) (Result, error) { |
nothing calls this directly
no test coverage detected