| | |
| | | @ManagerAuth(memo = "系统用户编辑") |
| | | public R edit(User user) { |
| | | if (Cools.isEmpty(user)){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | if (null == user.getId()){ |
| | | user.setStatus(1); |
| | |
| | | @ManagerAuth(memo = "系统用户修改") |
| | | public R update(User user){ |
| | | if (Cools.isEmpty(user) || null==user.getId()){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | User entity = userService.selectById(user.getId()); |
| | | if (user.getPassword()!=null) { |
| | |
| | | if (user.getMobile()!=null) { |
| | | entity.setMobile(user.getMobile()); |
| | | } |
| | | if (user.getRoleId() !=null) { |
| | | entity.setRoleId(user.getRoleId()); |
| | | } |
| | | userService.updateById(entity); |
| | | return R.ok(); |
| | | } |