@ -117,13 +117,12 @@ public class ExamController extends BaseController {
return success(examManager.detail(id));
}
@Log(title = "考试", businessType = BusinessType.UPDATE)
@PostMapping("/changeStatus")
@ResponseBody
public AjaxResult changeStatus(ExamDTO examDTO) {
return success(examManager.changeStatus(examDTO));
@ -187,4 +187,18 @@ public class ExamManager {
reqDTO.setTotalScore(objScore);
/**
*
* 启用,禁用
* @param examDTO
* @return boolean
*/
public boolean changeStatus(ExamDTO examDTO) {
return elExamService.lambdaUpdate()
.eq(ElExam::getId, examDTO.getId())
.set(ElExam::getState, examDTO.getState())
.update();