智慧保安后台管理-外网项目备份
zengh
2021-08-19 8b464ee379c5b35ac8b22b4e5dde25c4f6fb75cf
src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java
@@ -20,7 +20,9 @@
import org.springblade.modules.exam.util.SecurityPaperUtil;
import org.springblade.modules.exam.vo.ExamResultVO;
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.springblade.modules.training.entity.TrainingRegistration;
@@ -52,6 +54,8 @@
   private final ApplyService applyService;
   private final TrainingRegistrationService trainingRegistrationService;
   private final IRoleService roleService;
   /**
    * 自定义分页数据
@@ -235,6 +239,13 @@
                           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);
                     }