CourierTaskController.java
1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.sl.ms.search.controller;
import com.sl.ms.search.domain.dto.CourierTaskDTO;
import com.sl.ms.search.domain.dto.CourierTaskPageQueryDTO;
import com.sl.ms.search.service.CourierTaskService;
import com.sl.transport.common.util.PageResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 快递员任务Controller
**/
@RestController
@Api(tags = "快递员任务")
@RequestMapping("courierSearch")
public class CourierTaskController {
@Resource
private CourierTaskService courierTaskService;
@PostMapping("pageQuery")
@ApiOperation(value = "分页查询")
public PageResponse<CourierTaskDTO> pageQuery(@RequestBody CourierTaskPageQueryDTO pageQueryDTO) {
return courierTaskService.pageQuery(pageQueryDTO);
}
@PostMapping
@ApiOperation(value = "新增/全量修改快递员任务")
public void saveOrUpdate(@RequestBody CourierTaskDTO courierTaskDTO) {
courierTaskService.saveOrUpdate(courierTaskDTO);
}
@GetMapping("/{id}")
@ApiOperation(value = "根据取派件id查询快递员任务")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "取派件id", required = true, dataTypeClass = Long.class)
})
public CourierTaskDTO findById(@PathVariable("id") Long id) {
return courierTaskService.findById(id);
}
}