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

Method GetSecondKillEvent

internal/api/lotteryDraw.go:185–199  ·  view source on GitHub ↗

GetSecondKillEvent 获取指定ID的秒杀活动

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

Source from the content-addressed store, hash-verified

183
184// GetSecondKillEvent 获取指定ID的秒杀活动
185func (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 参与秒杀活动
202func (lh *LotteryDrawHandler) ParticipateSecondKill(ctx *gin.Context, req req.ParticipateReq) (Result, error) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected