| | |
| | | |
| | | import com.ycl.jxkg.base.BaseApiController; |
| | | import com.ycl.jxkg.base.Result; |
| | | import com.ycl.jxkg.domain.TaskExam; |
| | | import com.ycl.jxkg.domain.entity.TaskExam; |
| | | import com.ycl.jxkg.service.TaskExamService; |
| | | import com.ycl.jxkg.utils.DateTimeUtil; |
| | | import com.ycl.jxkg.utils.PageInfoHelper; |
| | | import com.ycl.jxkg.vo.admin.task.TaskPageRequestVO; |
| | | import com.ycl.jxkg.vo.admin.task.TaskPageResponseVO; |
| | | import com.ycl.jxkg.vo.admin.task.TaskRequestVO; |
| | | import com.ycl.jxkg.domain.vo.admin.task.TaskPageRequestVO; |
| | | import com.ycl.jxkg.domain.vo.admin.task.TaskPageResponseVO; |
| | | import com.ycl.jxkg.domain.vo.admin.task.TaskRequestVO; |
| | | import com.github.pagehelper.PageInfo; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | @RequiredArgsConstructor |
| | | @RestController("AdminTaskController") |
| | | @RequestMapping(value = "/api/admin/task") |
| | | public class TaskController extends BaseApiController { |
| | | |
| | | private final TaskExamService taskExamService; |
| | | |
| | | @Autowired |
| | | public TaskController(TaskExamService taskExamService) { |
| | | this.taskExamService = taskExamService; |
| | | } |
| | | |
| | | @RequestMapping(value = "/page", method = RequestMethod.POST) |
| | | public Result<PageInfo<TaskPageResponseVO>> pageList(@RequestBody TaskPageRequestVO model) { |
| | |
| | | |
| | | @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) |
| | | public Result delete(@PathVariable Integer id) { |
| | | TaskExam taskExam = taskExamService.selectById(id); |
| | | taskExam.setDeleted(true); |
| | | taskExamService.updateByIdFilter(taskExam); |
| | | TaskExam taskExam = taskExamService.getById(id); |
| | | taskExamService.updateById(taskExam); |
| | | return Result.ok(); |
| | | } |
| | | } |