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

优化

parent 2f2fc3cf
......@@ -4,6 +4,8 @@ import com.platform.controller.BaseController;
import com.platform.page.TableDataInfo;
import com.ruzhoukj.sms.model.dto.KzWorkDTO;
import com.ruzhoukj.sms.service.KzWorkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
......@@ -16,6 +18,7 @@ import java.util.Date;
* @Version: 1.0
* @Desc : 描述信息
*/
@Api(tags = "运维工单管理")
@RestController
@RequestMapping("/kz/work")
public class KzWorkController extends BaseController {
......@@ -23,18 +26,22 @@ public class KzWorkController extends BaseController {
@Resource
private KzWorkService kzWorkService;
@ApiOperation(value = "分页查询")
@PostMapping("/page")
public TableDataInfo page(@RequestBody KzWorkDTO kzWorkDTO) {
startPage(kzWorkDTO.getPageNum(), kzWorkDTO.getPageSize());
return getDataTable(kzWorkService.pageInfo(kzWorkDTO));
}
@ApiOperation(value = "编辑")
@PutMapping("/update")
public boolean update(@RequestBody KzWorkDTO kzWorkDTO) {
kzWorkDTO.setOperationTime(new Date());
return kzWorkService.updateById(kzWorkDTO);
}
@ApiOperation(value = "导出")
@PostMapping("/export")
public void export(@RequestBody KzWorkDTO kzWorkDTO, HttpServletResponse 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