/** * 更新用户组 */ @CacheEvict(cacheNames = "MyBatisCache", key = "'SysUserGroup' + #groupId") public String updateById(long groupId, SysUserGroup group, Long roleId, int roleType) { group.setId(groupId); userGroupDao.updateSampleById(group); if (roleId != null) { userGroupRoleDao.replace(groupId, roleType, roleId); } return Result.success(); } /** * 查询用户组 */ @Cacheable(cacheNames = "MyBatisCache", key = "'SysUserGroup' + #id") public SysUserGroup queryById(long id) { return userGroupDao.selectById(id); }