"...java/com/ruzhoukj/sms/entity/DingAttendanceEntity.java" did not exist on "d31b5a282196b511c563aa89372070d4f04c4397"
Commit 17647892 authored by wujipeng's avatar wujipeng
Browse files

排期增删改查

parent bc8ab99d
package com.ruzhoukj.sms.controller; package com.ruzhoukj.sms.controller;
import com.ruzhoukj.sms.common.PageResponse; import com.ruzhoukj.sms.common.PageResponse;
import com.ruzhoukj.sms.common.Result;
import com.ruzhoukj.sms.pojo.dto.ScheduleDTO; import com.ruzhoukj.sms.pojo.dto.ScheduleDTO;
import com.ruzhoukj.sms.pojo.vo.ScheduleVO; import com.ruzhoukj.sms.pojo.vo.ScheduleVO;
import com.ruzhoukj.sms.service.ScheduleService; import com.ruzhoukj.sms.service.ScheduleService;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
...@@ -31,4 +29,22 @@ public class ScheduleController { ...@@ -31,4 +29,22 @@ public class ScheduleController {
List<ScheduleVO> list = scheduleService.pageSchedule(scheduleDTO); List<ScheduleVO> list = scheduleService.pageSchedule(scheduleDTO);
return PageResponse.success(list.size(), list); return PageResponse.success(list.size(), list);
} }
@ApiOperation(value = "新增或修改")
@PostMapping("/saveOrUpdate")
public Result saveOrUpdateSchedule(@RequestBody ScheduleDTO scheduleDTO) {
return Result.success(scheduleService.saveOrUpdate(scheduleDTO));
}
@ApiOperation(value = "删除")
@DeleteMapping("/{id}")
public Result saveOrUpdateSchedule(@PathVariable String id) {
return Result.success(scheduleService.removeById(id));
}
@ApiOperation(value = "查询详情")
@GetMapping("/{id}")
public Result getSchedule(@PathVariable String id) {
return Result.success(scheduleService.getById(id));
}
} }
...@@ -27,4 +27,6 @@ public interface ScheduleService extends IService<ScheduleEntity> { ...@@ -27,4 +27,6 @@ public interface ScheduleService extends IService<ScheduleEntity> {
* @return List<ScheduleVO> * @return List<ScheduleVO>
*/ */
List<ScheduleVO> pageSchedule(ScheduleDTO scheduleDTO); List<ScheduleVO> pageSchedule(ScheduleDTO scheduleDTO);
} }
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