|
@@ -5,20 +5,19 @@
|
|
|
|
|
|
<select id="getInstalledApp" resultType="com.dragon.tj.portal.entity.BusinessInfo">
|
|
|
select * from business_info t1
|
|
|
- where t1.del_flag = 0
|
|
|
- and t1.id in (
|
|
|
- select business_id from install_info t2
|
|
|
- <where>
|
|
|
- business_id != 0
|
|
|
- <if test="map.idcard != null and map.idcard != ''">
|
|
|
- and t2.user_idcard = #{map.idcard}
|
|
|
- </if>
|
|
|
- <if test="map.delFlag != null">
|
|
|
- and t2.del_flag = #{map.delFlag}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
+ right join install_info t2 on t1.id = t2.business_id
|
|
|
+ <where>
|
|
|
+ t1.del_flag = 0
|
|
|
+ and t2.business_id != 0
|
|
|
+ <if test="map.idcard != null and map.idcard != ''">
|
|
|
+ and t2.user_idcard = #{map.idcard}
|
|
|
+ </if>
|
|
|
+ <if test="map.delFlag != null">
|
|
|
+ and t2.del_flag = #{map.delFlag}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
|
|
|
- )
|
|
|
+ order by t2.seq desc
|
|
|
</select>
|
|
|
|
|
|
|