登录 增加1.6
parent
671aea09cb
commit
af18a097e7
|
@ -188,21 +188,26 @@ public class SysUserController extends BaseController
|
|||
{
|
||||
|
||||
System.out.println("userId是"+SecurityUtils.getUserId());
|
||||
SysUser user = userService.selectUserById(SecurityUtils.getUserId());
|
||||
//---------------------------------------------------------------
|
||||
CommonBody commonBody=userService.selectCommonbodyByUserId(SecurityUtils.getUserId());
|
||||
//-------------------------------------------------------------------------
|
||||
// SysUser user = userService.selectUserById(SecurityUtils.getUserId());
|
||||
System.out.println();
|
||||
// 角色集合
|
||||
Set<String> roles = permissionService.getRolePermission(user);
|
||||
Set<String> roles = permissionService.getEmailRolePermission(commonBody);
|
||||
// 权限集合
|
||||
Set<String> permissions = permissionService.getMenuPermission(user);
|
||||
// Set<String> permissions = permissionService.getMenuPermission(user);
|
||||
Result result = Result.success();
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("user", user);
|
||||
map.put("user", commonBody);
|
||||
map.put("roles", roles);
|
||||
map.put("permissions", permissions);
|
||||
// map.put("permissions", permissions);
|
||||
result.setData(map);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户编号获取详细信息
|
||||
*/
|
||||
|
|
|
@ -148,4 +148,7 @@ public interface SysUserMapper {
|
|||
|
||||
//------------------------------------------
|
||||
CommonBody selectUserByUserEmail(EmailLoginUser emailLoginUser);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
CommonBody selectCommonbodyByUserId(@Param("userId1") int userId1);
|
||||
}
|
||||
|
|
|
@ -214,4 +214,6 @@ public interface ISysUserService
|
|||
|
||||
//-------------------------
|
||||
CommonBody selectByEmail(EmailLoginUser emailLoginUser);
|
||||
|
||||
CommonBody selectCommonbodyByUserId(Long userId);
|
||||
}
|
||||
|
|
|
@ -588,4 +588,11 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
return commonBody;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonBody selectCommonbodyByUserId(Long userId) {
|
||||
int userId1 = userId.intValue();
|
||||
CommonBody commonBody= userMapper.selectCommonbodyByUserId(userId1);
|
||||
return commonBody;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -150,6 +150,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select * from tb_doctor where email=#{email}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectCommonbodyByUserId" resultType="com.health.common.core.user.CommonBody">
|
||||
select * from tb_patient where user_id=#{userId1}
|
||||
</select>
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
|
|
Loading…
Reference in New Issue