|
@@ -37,10 +37,17 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="listByUser" resultType="org.jeecg.modules.base.entity.InterlockBaseLimit">
|
|
<select id="listByUser" resultType="org.jeecg.modules.base.entity.InterlockBaseLimit">
|
|
- select b.*,qxnr.limit_type from interlock_base b
|
|
|
|
- inner join (select l.* from interlock_system_limit l where l.interlock_user_id in
|
|
|
|
- (select u.id from interlock_user u where u.username=#{wiseUser})) qxnr
|
|
|
|
- on b.id=qxnr.interlock_system_id
|
|
|
|
|
|
+ select DISTINCT b2.*, '' as limit_type from interlock_base b2
|
|
|
|
+ left join (select l2.* from interlock_system_limit l2 where l2.interlock_user_id in
|
|
|
|
+ (select u2.id from interlock_user u2 where u2.username=#{wiseUser})) qxnr2
|
|
|
|
+ on b2.id = qxnr2.interlock_apparatus_id
|
|
|
|
+ where qxnr2.limit_type='0' or qxnr2.limit_type='1'
|
|
|
|
+ union
|
|
|
|
+ select b1.*,qxnr1.limit_type as limit_type from interlock_base b1
|
|
|
|
+ left join (select l1.* from interlock_system_limit l1 where l1.interlock_user_id in
|
|
|
|
+ (select u1.id from interlock_user u1 where u1.username=#{wiseUser})) qxnr1
|
|
|
|
+ on b1.id=qxnr1.interlock_system_id
|
|
|
|
+ where qxnr1.limit_type='0' or qxnr1.limit_type='1'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|