照片修改代码提交
parent
78b6bc3711
commit
e00871e7b1
@ -0,0 +1,44 @@
|
|||||||
|
package com.shxy.xymanager_service.impl;
|
||||||
|
|
||||||
|
import com.shxy.xymanager_common.dto.RoleAndPermsDto;
|
||||||
|
import com.shxy.xymanager_common.dto.UserAndRoleDto;
|
||||||
|
import com.shxy.xymanager_common.entity.Perms;
|
||||||
|
import com.shxy.xymanager_dao.dao.UserDao;
|
||||||
|
import com.shxy.xymanager_service.service.UserService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户管理实现层
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class UserServiceImpl implements UserService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
UserDao userDao;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户名查找用户角色
|
||||||
|
* @param username
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserAndRoleDto findRoleByUsername(String username) {
|
||||||
|
return userDao.findRolesByUserName(username);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleAndPermsDto findPermByRoleId(Integer id) {
|
||||||
|
return userDao.findPermByRoleId(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Perms> findPermsByRoleId2(String id) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.shxy.xymanager_service.service;
|
||||||
|
|
||||||
|
import com.shxy.xymanager_common.dto.RoleAndPermsDto;
|
||||||
|
import com.shxy.xymanager_common.dto.UserAndRoleDto;
|
||||||
|
import com.shxy.xymanager_common.entity.Perms;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户管理接口
|
||||||
|
*
|
||||||
|
* @author 晶晶
|
||||||
|
*/
|
||||||
|
public interface UserService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户名查用户角色
|
||||||
|
* @param username
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
UserAndRoleDto findRoleByUsername(String username);
|
||||||
|
|
||||||
|
//根据角色id查询权限集合
|
||||||
|
RoleAndPermsDto findPermByRoleId(Integer id);
|
||||||
|
|
||||||
|
//根据角色id查询权限集合
|
||||||
|
List<Perms> findPermsByRoleId2(String id);
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue