Commit 3b3d5631 authored by wujipeng's avatar wujipeng
Browse files

优化

parent 2f2fc3cf
...@@ -4,6 +4,8 @@ import com.platform.controller.BaseController; ...@@ -4,6 +4,8 @@ import com.platform.controller.BaseController;
import com.platform.page.TableDataInfo; import com.platform.page.TableDataInfo;
import com.ruzhoukj.sms.model.dto.KzWorkDTO; import com.ruzhoukj.sms.model.dto.KzWorkDTO;
import com.ruzhoukj.sms.service.KzWorkService; import com.ruzhoukj.sms.service.KzWorkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -16,6 +18,7 @@ import java.util.Date; ...@@ -16,6 +18,7 @@ import java.util.Date;
* @Version: 1.0 * @Version: 1.0
* @Desc : 描述信息 * @Desc : 描述信息
*/ */
@Api(tags = "运维工单管理")
@RestController @RestController
@RequestMapping("/kz/work") @RequestMapping("/kz/work")
public class KzWorkController extends BaseController { public class KzWorkController extends BaseController {
...@@ -23,18 +26,22 @@ public class KzWorkController extends BaseController { ...@@ -23,18 +26,22 @@ public class KzWorkController extends BaseController {
@Resource @Resource
private KzWorkService kzWorkService; private KzWorkService kzWorkService;
@ApiOperation(value = "分页查询")
@PostMapping("/page") @PostMapping("/page")
public TableDataInfo page(@RequestBody KzWorkDTO kzWorkDTO) { public TableDataInfo page(@RequestBody KzWorkDTO kzWorkDTO) {
startPage(kzWorkDTO.getPageNum(), kzWorkDTO.getPageSize()); startPage(kzWorkDTO.getPageNum(), kzWorkDTO.getPageSize());
return getDataTable(kzWorkService.pageInfo(kzWorkDTO)); return getDataTable(kzWorkService.pageInfo(kzWorkDTO));
} }
@ApiOperation(value = "编辑")
@PutMapping("/update") @PutMapping("/update")
public boolean update(@RequestBody KzWorkDTO kzWorkDTO) { public boolean update(@RequestBody KzWorkDTO kzWorkDTO) {
kzWorkDTO.setOperationTime(new Date()); kzWorkDTO.setOperationTime(new Date());
return kzWorkService.updateById(kzWorkDTO); return kzWorkService.updateById(kzWorkDTO);
} }
@ApiOperation(value = "导出")
@PostMapping("/export") @PostMapping("/export")
public void export(@RequestBody KzWorkDTO kzWorkDTO, HttpServletResponse response) { public void export(@RequestBody KzWorkDTO kzWorkDTO, HttpServletResponse response) {
kzWorkService.export(kzWorkDTO, response); kzWorkService.export(kzWorkDTO, response);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment