feat:启用

pg_adapter
wangxy 9 months ago
parent f5cedc3967
commit dc3c8fa7e6

@ -117,13 +117,12 @@ public class ExamController extends BaseController {
return success(examManager.detail(id)); 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); 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();
}
} }

Loading…
Cancel
Save