|
|
@ -140,7 +140,20 @@ public class SystemSettingServiceImpl implements SystemSetttingService { |
|
|
|
String roleIds = result.getRoleId(); |
|
|
|
String roleIds = result.getRoleId(); |
|
|
|
String[] splitOld = staffVo.getRoleId().split(","); |
|
|
|
String[] splitOld = staffVo.getRoleId().split(","); |
|
|
|
String[] splitNew = roleIds.split(","); |
|
|
|
String[] splitNew = roleIds.split(","); |
|
|
|
if (splitOld.length == splitNew.length && splitNew.length < 3) { |
|
|
|
|
|
|
|
|
|
|
|
//根据userId删除数据,再新增
|
|
|
|
|
|
|
|
//List<Integer> staffIdList = systemSetttingDao.queryStaffId(staffVo.getUserId());
|
|
|
|
|
|
|
|
boolean b = systemSetttingDao.deleteStaffInfo(staffVo.getUserId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (StaffEntity entity: staff) { |
|
|
|
|
|
|
|
entity.setPlatformId(1); |
|
|
|
|
|
|
|
entity.setUserId(staffVo.getUserId()); |
|
|
|
|
|
|
|
entity.setSchoolId(staffVo.getSchoolId()); |
|
|
|
|
|
|
|
systemSetttingDao.addStaffN(entity); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* if (splitOld.length == splitNew.length && splitNew.length < 3) { |
|
|
|
for (int i = 0; i < splitNew.length; i++) { |
|
|
|
for (int i = 0; i < splitNew.length; i++) { |
|
|
|
boolean a = systemSetttingDao.updateStaff(staff.get(i)); |
|
|
|
boolean a = systemSetttingDao.updateStaff(staff.get(i)); |
|
|
|
if (!a) { |
|
|
|
if (!a) { |
|
|
@ -157,11 +170,12 @@ public class SystemSettingServiceImpl implements SystemSetttingService { |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (splitNew.length < splitOld.length) { |
|
|
|
} else if (splitNew.length < splitOld.length) { |
|
|
|
boolean a = systemSetttingDao.deleteStaffOnly(staffVo.getUserId());//删除roleId最大的数据
|
|
|
|
boolean a = systemSetttingDao.deleteStaffOnly(staffVo.getUserId());//删除roleId最大的数据
|
|
|
|
|
|
|
|
System.out.println("roleId=========="+staffVo.getRoleId()); |
|
|
|
staffVo.setStaffRoleId(Integer.parseInt(staffVo.getRoleId())); |
|
|
|
staffVo.setStaffRoleId(Integer.parseInt(staffVo.getRoleId())); |
|
|
|
boolean b = systemSetttingDao.updateStaffOnly(staffVo);//修改仅剩的数据
|
|
|
|
boolean b = systemSetttingDao.updateStaffOnly(staffVo);//修改仅剩的数据
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return R.error(400, "不存在此账号"); |
|
|
|
return R.error(400, "不存在此账号"); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
userInfoDao.setNUM(staffVo.getUserId());//重置账号、手机号码为00
|
|
|
|
userInfoDao.setNUM(staffVo.getUserId());//重置账号、手机号码为00
|
|
|
|
// systemSetttingDao.deleteStaffInfo(staffVo.getUserId());//
|
|
|
|
// systemSetttingDao.deleteStaffInfo(staffVo.getUserId());//
|
|
|
|