|
|
@@ -1,15 +1,17 @@
|
|
|
package com.xunmei.system.service.impl;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.xunmei.common.core.web.page.TableDataInfo;
|
|
|
-import com.xunmei.system.mapper.SysUserRoleMapper;
|
|
|
import com.xunmei.system.domain.SysUserRole;
|
|
|
+import com.xunmei.system.domain.vo.UserRoleVo;
|
|
|
+import com.xunmei.system.mapper.SysUserRoleMapper;
|
|
|
import com.xunmei.system.service.ISysUserRoleService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 用户和角色关联Service业务层处理
|
|
|
@@ -25,9 +27,9 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
|
|
|
@Override
|
|
|
public TableDataInfo<SysUserRole> selectPage(SysUserRole sysUserRole) {
|
|
|
Page<SysUserRole> page;
|
|
|
- if (sysUserRole.getPageNum() != null &&sysUserRole.getPageSize() != null){
|
|
|
+ if (sysUserRole.getPageNum() != null && sysUserRole.getPageSize() != null) {
|
|
|
page = new Page<>(sysUserRole.getPageNum(), sysUserRole.getPageSize());
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
page = new Page<>();
|
|
|
}
|
|
|
QueryWrapper<SysUserRole> where = new QueryWrapper<>(sysUserRole);
|
|
|
@@ -36,6 +38,11 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<UserRoleVo> selectUserRoleVoList(Long userId) {
|
|
|
+
|
|
|
+ return sysUserRoleMapper.selectUserRoleVoList(userId);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 查询用户和角色关联
|
|
|
@@ -73,7 +80,7 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
|
|
|
*/
|
|
|
@Override
|
|
|
public int insertSysUserRole(SysUserRole sysUserRole) {
|
|
|
- return sysUserRoleMapper.insert(sysUserRole);
|
|
|
+ return sysUserRoleMapper.insert(sysUserRole);
|
|
|
}
|
|
|
|
|
|
/**
|