From f84d9c46574a2cd663105859035bc17891270923 Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期一, 14 八月 2023 10:41:54 +0800 Subject: [PATCH] Merge branch 'master' into fly --- api/v1/saleChance.go | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/api/v1/saleChance.go b/api/v1/saleChance.go index 5798c14..06712c1 100644 --- a/api/v1/saleChance.go +++ b/api/v1/saleChance.go @@ -201,7 +201,7 @@ return } - saleChances, total, errCode := saleChanceService.GetSaleChanceList(params.Page, params.PageSize, params.Keyword) + saleChances, total, errCode := saleChanceService.GetSaleChanceList(params.Page, params.PageSize, params.SearchMap) if errCode != ecode.OK { ctx.Fail(errCode) return @@ -212,3 +212,28 @@ Count: int(total), }) } + +// Push +// +// @Tags SaleChance +// @Summary 鎺ㄨ繘閿�鍞満浼� +// @Produce application/json +// @Param object body request.PushSaleChance true "鏌ヨ鍙傛暟" +// @Success 200 {object} contextx.Response{} +// @Router /api/saleChance/push [put] +func (s *SaleChanceApi) Push(c *gin.Context) { + var params request.PushSaleChance + ctx, ok := contextx.NewContext(c, ¶ms) + if !ok { + ctx.Fail(ecode.InvalidParams) + return + } + + errCode := saleChanceService.PushSaleChance(params.Id, params.Step) + if errCode != ecode.OK { + ctx.Fail(errCode) + return + } + + ctx.Ok() +} -- Gitblit v1.8.0