| | |
| | | import com.oying.exception.EntityExistException; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | // 清除缓存 |
| | | delCaches(user.getId(), user.getUsername()); |
| | | // 更新用户角色 |
| | | userRoleMapper.deleteByUserId(resources.getId()); |
| | | userRoleMapper.insertData(resources.getId(), resources.getRoles()); |
| | | if (!ObjectUtils.isEmpty(resources.getRoles())) { |
| | | userRoleMapper.deleteByUserId(resources.getId()); |
| | | userRoleMapper.insertData(resources.getId(), resources.getRoles()); |
| | | } |
| | | } |
| | | |
| | | @Override |