GetSecondKillEvent 获取指定ID的秒杀活动
(ctx *gin.Context, req req.GetSecondKillEventReq)
| 183 | |
| 184 | // GetSecondKillEvent 获取指定ID的秒杀活动 |
| 185 | func (lh *LotteryDrawHandler) GetSecondKillEvent(ctx *gin.Context, req req.GetSecondKillEventReq) (Result, error) { |
| 186 | ke, err := lh.svc.GetSecondKillEventByID(ctx, req.ID) |
| 187 | if err != nil { |
| 188 | return Result{ |
| 189 | Code: ServerRequestError, |
| 190 | Msg: GetSecondKillEventError, |
| 191 | }, err |
| 192 | } |
| 193 | |
| 194 | return Result{ |
| 195 | Code: RequestsOK, |
| 196 | Msg: GetSecondKillEventSuccess, |
| 197 | Data: ke, |
| 198 | }, nil |
| 199 | } |
| 200 | |
| 201 | // ParticipateSecondKill 参与秒杀活动 |
| 202 | func (lh *LotteryDrawHandler) ParticipateSecondKill(ctx *gin.Context, req req.ParticipateReq) (Result, error) { |
nothing calls this directly
no test coverage detected