| | |
| | | import org.springblade.modules.exam.service.ExamScoreService; |
| | | import org.springblade.modules.exam.util.SecurityPaperUtil; |
| | | import org.springblade.modules.exam.vo.ExamScoreVO; |
| | | import org.springblade.modules.system.entity.Role; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IRoleService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private final IUserService userService; |
| | | |
| | | private final ExamPaperService examPaperService; |
| | | |
| | | private final IRoleService roleService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | |
| | | result = pre + (decimalFormat.format(count++)); |
| | | } |
| | | user.setSecuritynumber(result); |
| | | //修改为持证保安 |
| | | user.setHold("1"); |
| | | //分配保安角色 |
| | | Role role = new Role(); |
| | | role.setRoleAlias("保安"); |
| | | Role oneRole = roleService.getOne(Condition.getQueryWrapper(role)); |
| | | user.setRoleId(oneRole.getId().toString()); |
| | | //更新保安数据 |
| | | userService.updateById(user); |
| | | } |