| | |
| | | import cn.gistack.sm.intelligentCall.entity.CallNotFillRecord; |
| | | import cn.gistack.sm.intelligentCall.service.ICallNotFillRecordService; |
| | | import cn.gistack.sm.intelligentCall.vo.CallNotFillRecordVO; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 外呼未接信息填报记录 |
| | | * @author zhongrj |
| | | * @date 2023-06-13 |
| | | */ |
| | | * 外呼未接信息填报记录 |
| | | * |
| | | * @author zhongrj |
| | | * @date 2023-06-13 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags="外呼未接信息填报记录") |
| | | @Api(tags = "外呼未接信息填报记录") |
| | | @RestController |
| | | @RequestMapping("/callNotFillRecord/callNotFillRecord") |
| | | @AllArgsConstructor |
| | | public class CallNotFillRecordController{ |
| | | public class CallNotFillRecordController { |
| | | |
| | | private ICallNotFillRecordService callNotFillRecordService; |
| | | private ICallNotFillRecordService callNotFillRecordService; |
| | | |
| | | /** |
| | | * 分页列表查询 |
| | | * |
| | | * @param callNotFillRecord |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="外呼未接信息填报记录-分页列表查询", notes="外呼未接信息填报记录-分页列表查询") |
| | | @GetMapping(value = "/list") |
| | | public R queryPageList(CallNotFillRecord callNotFillRecord, Query query) { |
| | | IPage<CallNotFillRecord> pageList = callNotFillRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(callNotFillRecord)); |
| | | return R.data(pageList); |
| | | } |
| | | /** |
| | | * 分页列表查询 |
| | | * |
| | | * @param callNotFillRecord |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "外呼未接信息填报记录-分页列表查询", notes = "外呼未接信息填报记录-分页列表查询") |
| | | @GetMapping(value = "/list") |
| | | public R queryPageList(CallNotFillRecord callNotFillRecord, Query query) { |
| | | IPage<CallNotFillRecord> pageList = callNotFillRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(callNotFillRecord)); |
| | | return R.data(pageList); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 自定义分页列表查询 |
| | | * @param query |
| | | * @param callNotFillRecord |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="外呼未接信息填报记录-自定义分页列表查询", notes="外呼未接信息填报记录-自定义分页列表查询") |
| | | @GetMapping(value = "/page") |
| | | public R page(CallNotFillRecordVO callNotFillRecord, Query query) { |
| | | return R.data(callNotFillRecordService.selectCallNotFillRecordPage(Condition.getPage(query),callNotFillRecord)); |
| | | } |
| | | /** |
| | | * 自定义分页列表查询 |
| | | * |
| | | * @param query |
| | | * @param callNotFillRecord |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "外呼未接信息填报记录-自定义分页列表查询", notes = "外呼未接信息填报记录-自定义分页列表查询") |
| | | @GetMapping(value = "/page") |
| | | public R page(CallNotFillRecordVO callNotFillRecord, Query query) { |
| | | return R.data(callNotFillRecordService.selectCallNotFillRecordPage(Condition.getPage(query), callNotFillRecord)); |
| | | } |
| | | |
| | | /** |
| | | * 获取全部 |
| | | */ |
| | | @ApiOperation(value="外呼未接信息填报记录-获取全部", notes="外呼未接信息填报记录-获取全部") |
| | | @GetMapping(value = "/all") |
| | | public R getAll(CallNotFillRecord callNotFillRecord) { |
| | | return R.data(callNotFillRecordService.list(Condition.getQueryWrapper(callNotFillRecord))); |
| | | } |
| | | /** |
| | | * 获取全部 |
| | | */ |
| | | @ApiOperation(value = "外呼未接信息填报记录-获取全部", notes = "外呼未接信息填报记录-获取全部") |
| | | @GetMapping(value = "/all") |
| | | public R getAll(CallNotFillRecord callNotFillRecord) { |
| | | return R.data(callNotFillRecordService.list(Condition.getQueryWrapper(callNotFillRecord))); |
| | | } |
| | | |
| | | /** |
| | | * 添加 |
| | | * |
| | | * @param callNotFillRecord |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="外呼未接信息填报记录-添加", notes="外呼未接信息填报记录-添加") |
| | | @PostMapping(value = "/add") |
| | | public R add(@RequestBody CallNotFillRecord callNotFillRecord) { |
| | | callNotFillRecord.setCreateTime(new Date()); |
| | | return R.data(callNotFillRecordService.save(callNotFillRecord)); |
| | | } |
| | | /** |
| | | * 添加 |
| | | * |
| | | * @param callNotFillRecord |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "外呼未接信息填报记录-添加", notes = "外呼未接信息填报记录-添加") |
| | | @PostMapping(value = "/add") |
| | | public R add(@RequestBody CallNotFillRecord callNotFillRecord) { |
| | | callNotFillRecord.setCreateTime(new Date()); |
| | | // 判断是否已填报,如果已填报,则不新增 |
| | | CallNotFillRecord notFillRecord = callNotFillRecordService.getOne(new QueryWrapper<CallNotFillRecord>().eq("call_id", callNotFillRecord.getCallId())); |
| | | if (notFillRecord != null){ |
| | | return R.data("已填报,请勿再填报"); |
| | | } |
| | | return R.data(callNotFillRecordService.save(callNotFillRecord)); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * |
| | | * @param callNotFillRecord |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="外呼未接信息填报记录-编辑", notes="外呼未接信息填报记录-编辑") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public R edit(@RequestBody CallNotFillRecord callNotFillRecord) { |
| | | return R.data(callNotFillRecordService.updateById(callNotFillRecord)); |
| | | } |
| | | /** |
| | | * 编辑 |
| | | * |
| | | * @param callNotFillRecord |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "外呼未接信息填报记录-编辑", notes = "外呼未接信息填报记录-编辑") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public R edit(@RequestBody CallNotFillRecord callNotFillRecord) { |
| | | return R.data(callNotFillRecordService.updateById(callNotFillRecord)); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="外呼未接信息填报记录-通过id删除", notes="外呼未接信息填报记录-通过id删除") |
| | | @PostMapping(value = "/delete") |
| | | public R delete(@RequestParam(name="id",required=true) String id) { |
| | | return R.data(callNotFillRecordService.removeById(id)); |
| | | } |
| | | /** |
| | | * 通过id删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "外呼未接信息填报记录-通过id删除", notes = "外呼未接信息填报记录-通过id删除") |
| | | @PostMapping(value = "/delete") |
| | | public R delete(@RequestParam(name = "id", required = true) String id) { |
| | | return R.data(callNotFillRecordService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="外呼未接信息填报记录-批量删除", notes="外呼未接信息填报记录-批量删除") |
| | | @PostMapping(value = "/deleteBatch") |
| | | public R deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | return R.data(this.callNotFillRecordService.removeByIds(Arrays.asList(ids.split(",")))); |
| | | } |
| | | /** |
| | | * 批量删除 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "外呼未接信息填报记录-批量删除", notes = "外呼未接信息填报记录-批量删除") |
| | | @PostMapping(value = "/deleteBatch") |
| | | public R deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | return R.data(this.callNotFillRecordService.removeByIds(Arrays.asList(ids.split(",")))); |
| | | } |
| | | |
| | | /** |
| | | * 通过id查询 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="外呼未接信息填报记录-通过id查询", notes="外呼未接信息填报记录-通过id查询") |
| | | @GetMapping(value = "/queryById") |
| | | public R queryById(@RequestParam(name="id",required=true) String id) { |
| | | CallNotFillRecord callNotFillRecord = callNotFillRecordService.getById(id); |
| | | return R.data(callNotFillRecord); |
| | | } |
| | | /** |
| | | * 通过id查询 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "外呼未接信息填报记录-通过id查询", notes = "外呼未接信息填报记录-通过id查询") |
| | | @GetMapping(value = "/queryById") |
| | | public R queryById(@RequestParam(name = "id", required = true) String id) { |
| | | CallNotFillRecord callNotFillRecord = callNotFillRecordService.getById(id); |
| | | return R.data(callNotFillRecord); |
| | | } |
| | | |
| | | } |