예제 #1
0
 @Override
 public boolean addAssemblyUsers(int assemblyId, List<UserGroup> userGroupList) {
   List<AssemblyUserCfgDO> list = new ArrayList<AssemblyUserCfgDO>();
   for (UserGroup ug : userGroupList) {
     AssemblyUserCfgDO dO = new AssemblyUserCfgDO();
     dO.setAssemblyId(assemblyId);
     dO.setUserId(ug.getUserId());
     dO.setRoleName(ug.getRoleName());
     list.add(dO);
   }
   int count = assemblyUserCfgDOMapper.insertBatch(list);
   return count > 0 ? true : false;
 }
예제 #2
0
 private void loadAssemblyUsers(AssemblyVO vo) {
   String developers = "", testers = "";
   int assemblyId = vo.getAssemblyId();
   List<AssemblyUserCfgDO> users =
       assemblyUserCfgDOMapper.selectAssemblyUsersByAssemblyId(assemblyId);
   for (AssemblyUserCfgDO user : users) {
     switch (RoleEnum.valueOf(user.getRoleName())) {
       case DEV:
         developers += user.getRealName() + " ";
         break;
       case TEST:
         testers += user.getRealName() + " ";
         break;
       default:
         break;
     }
   }
   vo.setDevelopers(developers);
   vo.setTesters(testers);
 }