fix userhome bug
This commit is contained in:
parent
48f5556d1c
commit
9380151d1c
|
@ -405,13 +405,13 @@ public class AccountController {
|
|||
HttpServletRequest request) {
|
||||
HttpSession session = request.getSession();
|
||||
UserRolesVo userRolesVo = (UserRolesVo) session.getAttribute("userInfo");
|
||||
// 如果没有uid,默认查询当前登录用户的
|
||||
if (uid == null && userRolesVo != null) {
|
||||
uid = userRolesVo.getUid();
|
||||
}
|
||||
|
||||
// 如果没有uid和username,默认查询当前登录用户的
|
||||
if (StringUtils.isEmpty(uid) && StringUtils.isEmpty(username)) {
|
||||
return CommonResult.errorResponse("请求参数错误:uid和username不能都为空!");
|
||||
if (userRolesVo != null){
|
||||
uid = userRolesVo.getUid();
|
||||
}else {
|
||||
return CommonResult.errorResponse("查询参数错误:uid和username不能都为空!");
|
||||
}
|
||||
}
|
||||
|
||||
UserHomeVo userHomeInfo = userRecordDao.getUserHomeInfo(uid, username);
|
||||
|
|
|
@ -75,9 +75,9 @@
|
|||
<if test="uid!=null">
|
||||
AND u.uuid = #{uid}
|
||||
</if>
|
||||
<if test="username!=null">
|
||||
AND u.username = #{username}
|
||||
</if>
|
||||
<if test="username!=null">
|
||||
AND u.username = #{username}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue