提交修改
This commit is contained in:
parent
248912ffdc
commit
0b6ba66212
@ -399,9 +399,15 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
|||||||
staffRoleMenuService.deleteStaffRoleMenuByRoleId(staffRole.getId());
|
staffRoleMenuService.deleteStaffRoleMenuByRoleId(staffRole.getId());
|
||||||
staffRoleEvaluationGroupService.deleteStaffRoleEvaluationGroupByRoleId(staffRole.getId());
|
staffRoleEvaluationGroupService.deleteStaffRoleEvaluationGroupByRoleId(staffRole.getId());
|
||||||
com.lz.modules.app.utils.BeanUtils.copyProperty(staffRole, roleModel);
|
com.lz.modules.app.utils.BeanUtils.copyProperty(staffRole, roleModel);
|
||||||
staffEntity = staffDao.selectStaffById(staffRole.getStaffId());
|
staffEntity = staffDao.selectStaffById(roleModel.getStaffId());
|
||||||
staffRole.setStaffName(staffEntity.getName());
|
staffRole.setStaffName(staffEntity.getName());
|
||||||
|
//如果当前子管理员修改成主管理员
|
||||||
|
if (RoleEnums.MASTER_PM.getName().equals(roleModel.getDepartmentLevel())) {
|
||||||
|
StaffRole data = staffRoleMapper.selectStaffRolesByStaffIdDepartmentLevelList(roleModel.getStaffId(), Arrays.asList(new String[]{RoleEnums.CHILD_PM.getName()}));
|
||||||
|
if(data !=null){
|
||||||
|
staffRoleMapper.deleteStaffRoleById(data.getId()); //删除子管理员
|
||||||
|
}
|
||||||
|
}
|
||||||
staffRoleMapper.updateStaffRoleById(staffRole);
|
staffRoleMapper.updateStaffRoleById(staffRole);
|
||||||
if (RoleEnums.BOSS.getName().equals(staffRole.getDepartmentLevel()) ||
|
if (RoleEnums.BOSS.getName().equals(staffRole.getDepartmentLevel()) ||
|
||||||
RoleEnums.MASTER_PM.getName().equals(staffRole.getDepartmentLevel())) {
|
RoleEnums.MASTER_PM.getName().equals(staffRole.getDepartmentLevel())) {
|
||||||
|
|||||||
@ -201,8 +201,7 @@ public class SysLoginController extends AbstractController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//测试环境将不进行短信验证码,
|
//测试环境将不进行短信验证码,
|
||||||
// if (!StringUtil.equals(environment, Constant.INVELOMENT_TYPE_TEST)) {
|
if (true) {
|
||||||
if (false) {
|
|
||||||
//账号不存在、密码错误
|
//账号不存在、密码错误
|
||||||
if (!user.getPassword().equals(new Sha256Hash(form.getPassword(), user.getSalt()).toHex())) {
|
if (!user.getPassword().equals(new Sha256Hash(form.getPassword(), user.getSalt()).toHex())) {
|
||||||
return R.error("密码不正确!");
|
return R.error("密码不正确!");
|
||||||
@ -226,11 +225,6 @@ public class SysLoginController extends AbstractController {
|
|||||||
return r.put("data",map);
|
return r.put("data",map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退出
|
* 退出
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -95,9 +95,6 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByStaffId" resultType="com.lz.modules.flow.entity.StaffRole">
|
<select id="selectByStaffId" resultType="com.lz.modules.flow.entity.StaffRole">
|
||||||
select * from lz_staff_role where is_delete = 0 and staff_id = #{staffId} limit 1
|
select * from lz_staff_role where is_delete = 0 and staff_id = #{staffId} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user