改为sys_role and sys_user_role
This commit is contained in:
parent
84936608f7
commit
d71c8b3b2d
|
|
@ -237,8 +237,13 @@
|
||||||
left join alloc_stall a on mr.stall_id = a.stall_id
|
left join alloc_stall a on mr.stall_id = a.stall_id
|
||||||
left join mkt_effective me on mr.eff_id = me.eff_id
|
left join mkt_effective me on mr.eff_id = me.eff_id
|
||||||
left join alloc_area aa on ac.area_id = aa.area_id
|
left join alloc_area aa on ac.area_id = aa.area_id
|
||||||
|
LEFT JOIN sys_role sr ON aa.area_id = sr.area_id
|
||||||
|
LEFT JOIN sys_user_role sur ON sr.role_id = sur.role_id
|
||||||
where
|
where
|
||||||
mr.del_flag = #{delFlag}
|
mr.del_flag = #{delFlag}
|
||||||
|
AND sr.del_flag = 0
|
||||||
|
AND sr.role_key = #{authPO.roleCode}
|
||||||
|
AND sur.user_id = #{authPO.userId}
|
||||||
<if test="content.recipeId != null ">
|
<if test="content.recipeId != null ">
|
||||||
and mr.recipe_id = #{content.recipeId}
|
and mr.recipe_id = #{content.recipeId}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -281,34 +286,34 @@
|
||||||
<if test="content.recipeType != null">
|
<if test="content.recipeType != null">
|
||||||
and mr.recipe_type = #{content.recipeType}
|
and mr.recipe_type = #{content.recipeType}
|
||||||
</if>
|
</if>
|
||||||
<if test="'3'.toString() == authPO.roleType.toString()">
|
<!-- <if test="'3'.toString() == authPO.roleType.toString()">-->
|
||||||
and exists(
|
<!-- and exists(-->
|
||||||
select
|
<!-- select-->
|
||||||
null
|
<!-- null-->
|
||||||
from mgr_role_canteen it1
|
<!-- from mgr_role_canteen it1-->
|
||||||
left join mgr_role it2 on it2.role_id = it1.role_id
|
<!-- left join mgr_role it2 on it2.role_id = it1.role_id-->
|
||||||
left join mgr_user_role it3 on it1.role_id = it3.role_id
|
<!-- left join mgr_user_role it3 on it1.role_id = it3.role_id-->
|
||||||
where
|
<!-- where-->
|
||||||
it2.del_flag = 2
|
<!-- it2.del_flag = 2-->
|
||||||
and it2.role_code = #{authPO.roleCode}
|
<!-- and it2.role_code = #{authPO.roleCode}-->
|
||||||
and it1.half_select = 1
|
<!-- and it1.half_select = 1-->
|
||||||
and it3.user_id = #{authPO.userId}
|
<!-- and it3.user_id = #{authPO.userId}-->
|
||||||
and mr.stall_id = it1.data_id
|
<!-- and mr.stall_id = it1.data_id-->
|
||||||
)
|
<!-- )-->
|
||||||
</if>
|
<!-- </if>-->
|
||||||
<if test="'-1'.toString() != authPO.roleType.toString() ">
|
<!-- <if test="'-1'.toString() != authPO.roleType.toString() ">-->
|
||||||
and EXISTS (
|
<!-- and EXISTS (-->
|
||||||
SELECT null
|
<!-- SELECT null-->
|
||||||
FROM mgr_role_area it1
|
<!-- FROM mgr_role_area it1-->
|
||||||
LEFT JOIN mgr_role it2 ON it2.role_id = it1.role_id
|
<!-- LEFT JOIN mgr_role it2 ON it2.role_id = it1.role_id-->
|
||||||
LEFT JOIN mgr_user_role it3 ON it1.role_id = it3.role_id
|
<!-- LEFT JOIN mgr_user_role it3 ON it1.role_id = it3.role_id-->
|
||||||
WHERE it2.del_flag = 2
|
<!-- WHERE it2.del_flag = 2-->
|
||||||
AND it2.role_code = #{authPO.roleCode}
|
<!-- AND it2.role_code = #{authPO.roleCode}-->
|
||||||
AND it1.half_select = 1
|
<!-- AND it1.half_select = 1-->
|
||||||
AND it3.user_id = #{authPO.userId}
|
<!-- AND it3.user_id = #{authPO.userId}-->
|
||||||
AND aa.area_id = it1.data_id
|
<!-- AND aa.area_id = it1.data_id-->
|
||||||
)
|
<!-- )-->
|
||||||
</if>
|
<!-- </if>-->
|
||||||
|
|
||||||
order by
|
order by
|
||||||
mr.crtime desc
|
mr.crtime desc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue