取消文件权限校验;用户更新状态另写方法;

This commit is contained in:
cjw 2024-04-28 16:54:17 +08:00
parent c321a92508
commit 735eefce57
11 changed files with 18 additions and 20 deletions

View File

@ -60,8 +60,7 @@ public class EvaluationRecordController extends BaseController {
*/ */
@SaCheckPermission("evaluation:record:query") @SaCheckPermission("evaluation:record:query")
@GetMapping("/{recordId}") @GetMapping("/{recordId}")
public R<SysEvaluationRecordVo> getInfo(@NotNull(message = "主键不能为空") public R<SysEvaluationRecordVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long recordId) {
@PathVariable Long recordId) {
return R.ok(sysEvaluationRecordService.queryById(recordId)); return R.ok(sysEvaluationRecordService.queryById(recordId));
} }

View File

@ -109,8 +109,7 @@ public class ScaleController extends BaseController {
@SaCheckPermission("scale:info:remove") @SaCheckPermission("scale:info:remove")
@Log(title = "心理测评量", businessType = BusinessType.DELETE) @Log(title = "心理测评量", businessType = BusinessType.DELETE)
@DeleteMapping("/{scaleIds}") @DeleteMapping("/{scaleIds}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] scaleIds) {
@PathVariable Long[] scaleIds) {
return toAjax(sysScaleService.deleteWithValidByIds(List.of(scaleIds), true)); return toAjax(sysScaleService.deleteWithValidByIds(List.of(scaleIds), true));
} }
} }

View File

@ -70,8 +70,7 @@ public class ScaleFactorController extends BaseController {
*/ */
@SaCheckPermission("scale:factor:query") @SaCheckPermission("scale:factor:query")
@GetMapping("/{factorId}") @GetMapping("/{factorId}")
public R<SysScaleFactorVo> getInfo(@NotNull(message = "主键不能为空") public R<SysScaleFactorVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long factorId) {
@PathVariable Long factorId) {
return R.ok(sysScaleFactorService.queryById(factorId)); return R.ok(sysScaleFactorService.queryById(factorId));
} }

View File

@ -50,8 +50,7 @@ public class ScaleFactorRangeController extends BaseController {
*/ */
@SaCheckPermission("scale:scaleFactorRange:query") @SaCheckPermission("scale:scaleFactorRange:query")
@GetMapping("/{rangeId}") @GetMapping("/{rangeId}")
public R<SysScaleFactorRangeVo> getInfo(@NotNull(message = "主键不能为空") public R<SysScaleFactorRangeVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long rangeId) {
@PathVariable Long rangeId) {
return R.ok(sysScaleFactorRangeService.queryById(rangeId)); return R.ok(sysScaleFactorRangeService.queryById(rangeId));
} }

View File

@ -110,8 +110,7 @@ public class ScaleQuestionController extends BaseController {
@SaCheckPermission("scale:question:remove") @SaCheckPermission("scale:question:remove")
@Log(title = "量问题内容", businessType = BusinessType.DELETE) @Log(title = "量问题内容", businessType = BusinessType.DELETE)
@DeleteMapping("/{questionIds}") @DeleteMapping("/{questionIds}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] questionIds) {
@PathVariable Long[] questionIds) {
return toAjax(sysScaleQuestionService.deleteWithValidByIds(List.of(questionIds), true)); return toAjax(sysScaleQuestionService.deleteWithValidByIds(List.of(questionIds), true));
} }
} }

View File

@ -65,8 +65,7 @@ public class WarnController extends BaseController {
*/ */
@SaCheckPermission("warn:record:query") @SaCheckPermission("warn:record:query")
@GetMapping("/{warnId}") @GetMapping("/{warnId}")
public R<SysWarnRecordVo> getInfo(@NotNull(message = "主键不能为空") public R<SysWarnRecordVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long warnId) {
@PathVariable Long warnId) {
return R.ok(sysWarnRecordService.queryById(warnId)); return R.ok(sysWarnRecordService.queryById(warnId));
} }
@ -100,8 +99,7 @@ public class WarnController extends BaseController {
@Log(title = "预警配置", businessType = BusinessType.UPDATE) @Log(title = "预警配置", businessType = BusinessType.UPDATE)
@RepeatSubmit() @RepeatSubmit()
@PutMapping("/config/{ids}") @PutMapping("/config/{ids}")
public R<Void> config(@NotEmpty(message = "主键不能为空") public R<Void> config(@NotEmpty(message = "主键不能为空") @PathVariable Integer[] ids) {
@PathVariable Integer[] ids) {
return toAjax(sysWarnRecordService.updateWarnConfig(ids)); return toAjax(sysWarnRecordService.updateWarnConfig(ids));
} }

View File

@ -46,8 +46,7 @@ public class WebController extends BaseController {
* 查询量表答案选项 * 查询量表答案选项
*/ */
@GetMapping("/answer/{id}") @GetMapping("/answer/{id}")
public R<List<QuestionAnswerVo>> queryAnswer(@NotNull(message = "主键不能为空") public R<List<QuestionAnswerVo>> queryAnswer(@NotNull(message = "主键不能为空") @PathVariable Long id) {
@PathVariable Long id) {
return R.ok(webService.queryQuestionAnswerListByScaleId(id)); return R.ok(webService.queryQuestionAnswerListByScaleId(id));
} }
@ -57,8 +56,7 @@ public class WebController extends BaseController {
@Log(title = "量测记录", businessType = BusinessType.INSERT) @Log(title = "量测记录", businessType = BusinessType.INSERT)
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/record/{id}") @PostMapping("/record/{id}")
public R<Void> addRecord(@NotNull(message = "主键不能为空") public R<Void> addRecord(@NotNull(message = "主键不能为空") @PathVariable Long id) {
@PathVariable Long id) {
return toAjax(webService.newRecord(id)); return toAjax(webService.newRecord(id));
} }

View File

@ -84,7 +84,7 @@ public class SysWarnRecordServiceImpl implements ISysWarnRecordService {
SysUser record = new SysUser(); SysUser record = new SysUser();
record.setUserId(add.getUserId()); record.setUserId(add.getUserId());
record.setInterveneStatus(StatusEnum.IN_USE.getValue()); record.setInterveneStatus(StatusEnum.IN_USE.getValue());
userMapper.updateById(record); userMapper.updateInterveneById(record);
return baseMapper.insert(add) > 0; return baseMapper.insert(add) > 0;
} else { } else {
//取最高严重等级 //取最高严重等级

View File

@ -53,7 +53,7 @@ public class SysOssController extends BaseController {
* *
* @param ossIds OSS对象ID串 * @param ossIds OSS对象ID串
*/ */
@SaCheckPermission("system:oss:list") //@SaCheckPermission("system:oss:list")
@GetMapping("/listByIds/{ossIds}") @GetMapping("/listByIds/{ossIds}")
public R<List<SysOssVo>> listByIds(@NotEmpty(message = "主键不能为空") public R<List<SysOssVo>> listByIds(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ossIds) { @PathVariable Long[] ossIds) {

View File

@ -114,9 +114,12 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser, SysUserVo> {
int updateById(@Param(Constants.ENTITY) SysUser user); int updateById(@Param(Constants.ENTITY) SysUser user);
List<SysUserVo> selectStudentListByDeptId(Long deptId); List<SysUserVo> selectStudentListByDeptId(Long deptId);
int updatePasswordBatchById(List<SysUserVo> list); int updatePasswordBatchById(List<SysUserVo> list);
List<SysUser> selectStudentListByDeptIds(String deptIds); List<SysUser> selectStudentListByDeptIds(String deptIds);
int updateInterveneById(@Param(Constants.ENTITY) SysUser user);
} }

View File

@ -190,4 +190,8 @@
where u.user_type = 'student' where u.user_type = 'student'
and find_in_set(d.dept_id, #{deptIds}) and find_in_set(d.dept_id, #{deptIds})
</select> </select>
<update id="updateInterveneById">
update sys_user set intervene_status = #{et.interveneStatus} where user_id = #{et.userId}
</update>
</mapper> </mapper>