Dao切面加入tenantId属性,来自token
This commit is contained in:
parent
ae7f95db44
commit
883b1730c9
@ -120,9 +120,7 @@ public class UserDaoAspect {
|
|||||||
BeanUtils.setProperty(arg, UPDATE_TIME, date);
|
BeanUtils.setProperty(arg, UPDATE_TIME, date);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isProperty(arg, TENANT_ID) && StringUtils.isEmpty(BeanUtils.getProperty(arg, TENANT_ID))) {
|
BeanUtils.setProperty(arg, TENANT_ID, loginUser.getTenantId());
|
||||||
BeanUtils.setProperty(arg, TENANT_ID, date);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@ -50,6 +50,9 @@
|
|||||||
<if test="null != avatar and '' != avatar">
|
<if test="null != avatar and '' != avatar">
|
||||||
avatar,
|
avatar,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != tenantId ">
|
||||||
|
tenant_id,
|
||||||
|
</if>
|
||||||
<if test="null != balance and '' != balance">
|
<if test="null != balance and '' != balance">
|
||||||
balance,
|
balance,
|
||||||
</if>
|
</if>
|
||||||
@ -106,6 +109,9 @@
|
|||||||
<if test="null != avatar and '' != avatar">
|
<if test="null != avatar and '' != avatar">
|
||||||
#{avatar},
|
#{avatar},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != tenantId and '' != tenantId">
|
||||||
|
#{tenantId},
|
||||||
|
</if>
|
||||||
<if test="null != balance and '' != balance">
|
<if test="null != balance and '' != balance">
|
||||||
#{balance},
|
#{balance},
|
||||||
</if>
|
</if>
|
||||||
@ -241,6 +247,9 @@
|
|||||||
<if test="null != userType ">
|
<if test="null != userType ">
|
||||||
user_type,
|
user_type,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != tenantId ">
|
||||||
|
tenant_id,
|
||||||
|
</if>
|
||||||
<if test="null != openId and '' != openId">
|
<if test="null != openId and '' != openId">
|
||||||
open_id,
|
open_id,
|
||||||
</if>
|
</if>
|
||||||
@ -295,12 +304,11 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getUserLoginTime" resultType="map">
|
<select id="getUserLoginTime" resultType="map">
|
||||||
select
|
select app_user_id as appUserId,
|
||||||
app_user_id as appUserId,
|
account as account,
|
||||||
account as account,
|
user_type as userType,
|
||||||
user_type as userType,
|
open_id as openId,
|
||||||
open_id as openId,
|
status as status
|
||||||
status as status
|
|
||||||
from xhpc_user_login type=#{type} and open_id=#{openid}
|
from xhpc_user_login type=#{type} and open_id=#{openid}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user