|
|
@@ -76,15 +76,16 @@ public class PartyRoleProviderService {
|
|
|
for (String userId : userIds) {
|
|
|
String jobs = new String();
|
|
|
//通过用户id,查询出JOB_字段内容(即该用户所属角色)
|
|
|
- // List<String> jobList = partyRoleProviderDao.getUserRoleJobByUserId(userId);
|
|
|
- String seJob = " select JOB_ from IBPS_PARTY_EMPLOYEE where ID_ = '" + userId+ "'";
|
|
|
- List<Map<String, Object>> listEmployee = (List<Map<String, Object>>) commonDao.query(seJob);
|
|
|
+ List<String> jobList = partyRoleProviderDao.getUserRoleJobByUserId(userId);
|
|
|
+// String seJob = " select JOB_ from IBPS_PARTY_EMPLOYEE where ID_ = '" + userId+ "'";
|
|
|
+// List<Map<String, Object>> listEmployee = (List<Map<String, Object>>) commonDao.query(seJob);
|
|
|
|
|
|
|
|
|
//如果该用户已有角色,则删除对应的角色
|
|
|
- if(null != listEmployee && !listEmployee.isEmpty()){
|
|
|
+ if(null != jobList && !jobList.isEmpty()){
|
|
|
//JOB_字段内容为多个角色id(roleId)用逗号拼接而成,转成list
|
|
|
- List<String> list = Stream.of(listEmployee.get(0).get("JOB_").toString().split(",")).collect(Collectors.toList());
|
|
|
+// List<String> list = Stream.of(listEmployee.get(0).get("JOB_").toString().split(",")).collect(Collectors.toList());
|
|
|
+ List<String> list = Stream.of(jobList.get(0).split(",")).collect(Collectors.toList());
|
|
|
if(list.contains(roleId)){
|
|
|
list.remove(roleId);
|
|
|
}
|