|
@@ -182,11 +182,13 @@
|
|
|
|
|
|
|
|
<select id="findList" resultType="com.sckw.system.model.vo.res.FindEntListResVo" parameterType="com.sckw.system.model.vo.req.FindListReqVo">
|
|
<select id="findList" resultType="com.sckw.system.model.vo.res.FindEntListResVo" parameterType="com.sckw.system.model.vo.req.FindListReqVo">
|
|
|
select a.*,
|
|
select a.*,
|
|
|
- b.id userId,
|
|
|
|
|
- b.account,
|
|
|
|
|
- b.name
|
|
|
|
|
|
|
+ d.id userId,
|
|
|
|
|
+ d.account,
|
|
|
|
|
+ d.name
|
|
|
from kws_enterprise a
|
|
from kws_enterprise a
|
|
|
- left join kws_user b on a.phone = b.account and b.del_flag = 0
|
|
|
|
|
|
|
+ left join kws_dept b on a.id = b.ent_id and b.del_flag = 0
|
|
|
|
|
+ left join kws_user_dept c on b.id = c.dept_id
|
|
|
|
|
+ left join kws_user d on c.user_id = d.id and d.del_flag = 0 and d.status = 0
|
|
|
where a.del_flag = 0
|
|
where a.del_flag = 0
|
|
|
<if test="approval != null">
|
|
<if test="approval != null">
|
|
|
and a.approval = #{approval}
|
|
and a.approval = #{approval}
|
|
@@ -195,7 +197,7 @@
|
|
|
and a.firm_name like concat('%', #{entName}, '%')
|
|
and a.firm_name like concat('%', #{entName}, '%')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="entType != null">
|
|
<if test="entType != null">
|
|
|
- and exists (select 1 from kws_ent_type b where a.id = b.ent_id and b.type = #{entType})
|
|
|
|
|
|
|
+ and exists (select 1 from kws_ent_type e where a.id = e.ent_id and e.type = #{entType})
|
|
|
</if>
|
|
</if>
|
|
|
order by a.create_time
|
|
order by a.create_time
|
|
|
</select>
|
|
</select>
|