|
|
@ -8,11 +8,13 @@ import com.yxt.anrui.portal.api.sysrole.SysRoleDto; |
|
|
|
import com.yxt.anrui.portal.api.sysrole.SysRoleQuery; |
|
|
|
import com.yxt.anrui.portal.api.sysrole.SysRoleVo; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.SysMenuRoleVoList; |
|
|
|
import com.yxt.anrui.portal.biz.sysuserrole.SysUserRoleService; |
|
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
|
|
import com.yxt.common.base.utils.PagerUtil; |
|
|
|
import com.yxt.common.core.query.PagerQuery; |
|
|
|
import com.yxt.common.core.vo.PagerVo; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
@ -33,6 +35,8 @@ import java.util.List; |
|
|
|
*/ |
|
|
|
@Service |
|
|
|
public class SysRoleService extends MybatisBaseService<SysRoleMapper, SysRole> { |
|
|
|
@Autowired |
|
|
|
private SysUserRoleService sysUserRoleService; |
|
|
|
public PagerVo<SysRole> listPage(PagerQuery<SysRoleQuery> pq) { |
|
|
|
SysRoleQuery query = pq.getParams(); |
|
|
|
QueryWrapper<SysRole> qw = createQueryWrapper(query); |
|
|
@ -129,6 +133,8 @@ public class SysRoleService extends MybatisBaseService<SysRoleMapper, SysRole> { |
|
|
|
if (split.length < 1) { |
|
|
|
return 0; |
|
|
|
} else if (split.length == 1) { |
|
|
|
//删除该角色下的用户关联
|
|
|
|
sysUserRoleService.deleteByRoleSid(sids); |
|
|
|
return baseMapper.deleteBySid(sids); |
|
|
|
} else { |
|
|
|
List<String> list = new ArrayList<>(); |
|
|
|