| | |
| | | ctx.Ok() |
| | | } |
| | | |
| | | // List |
| | | // |
| | | // @Tags FollowRecord |
| | | // @Summary 获取跟进记录列表 |
| | | // @Produce application/json |
| | | // @Success 200 {object} contextx.Response{data=response.FollowRecordResponse} |
| | | // @Router /api/followRecord/list [get] |
| | | func (fr *FollowRecordApi) List(c *gin.Context) { |
| | | ctx, ok := contextx.NewContext(c, nil) |
| | | if !ok { |
| | | return |
| | | } |
| | | |
| | | errCode, followRecordList := followRecordService.GetFollowRecordList() |
| | | if errCode != ecode.OK { |
| | | ctx.Fail(errCode) |
| | | return |
| | | } |
| | | |
| | | ctx.OkWithDetailed(response.FollowRecordResponse{ |
| | | List: followRecordList, |
| | | }) |
| | | } |
| | | |
| | | // Delete |
| | | // |
| | |
| | | |
| | | return time.Time{}, err |
| | | } |
| | | |
| | | // List |
| | | // |
| | | // @Tags FollowRecord |
| | | // @Summary 跟进记录列表 |
| | | // @Produce application/json |
| | | // @Param object body request.GetFollowRecordList true "参数" |
| | | // @Success 200 {object} contextx.Response{data=response.FollowRecordResponse} |
| | | // @Router /api/followRecord/list [post] |
| | | func (con *FollowRecordApi) List(c *gin.Context) { |
| | | var params request.GetFollowRecordList |
| | | ctx, ok := contextx.NewContext(c, ¶ms) |
| | | if !ok { |
| | | return |
| | | } |
| | | |
| | | followRecords, errCode := followRecordService.GetFollowRecordList(params.Page, params.PageSize, params.Keyword) |
| | | if errCode != ecode.OK { |
| | | ctx.Fail(errCode) |
| | | return |
| | | } |
| | | |
| | | ctx.OkWithDetailed(response.FollowRecordResponse{ |
| | | List: followRecords, |
| | | Count: len(followRecords), |
| | | }) |
| | | } |