| | |
| | | // @Summary 销售机会列表
|
| | | // @Produce application/json
|
| | | // @Param object body request.GetSaleChanceList true "参数"
|
| | | // |
| | | // @Success 200 {object} contextx.Response{data=response.SaleChanceResponse}
|
| | | // |
| | | // @Router /api/saleChance/list [post]
|
| | | func (con *SaleChanceApi) List(c *gin.Context) {
|
| | | var params request.GetSaleChanceList
|
| | |
| | | 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() |
| | | } |