|
@@ -3,43 +3,17 @@
|
|
<mapper namespace="com.qmth.themis.business.dao.TBOrgMapper">
|
|
<mapper namespace="com.qmth.themis.business.dao.TBOrgMapper">
|
|
|
|
|
|
<select id="queryByPage" resultType="com.qmth.themis.business.dto.response.TBOrgDto">
|
|
<select id="queryByPage" resultType="com.qmth.themis.business.dto.response.TBOrgDto">
|
|
- select
|
|
|
|
- t.id,
|
|
|
|
- t.logo,
|
|
|
|
- t.enableSimulate,
|
|
|
|
- t.simulatePaperId,
|
|
|
|
- t.enableMonitorRecord,
|
|
|
|
- t.enableLiveness,
|
|
|
|
- t.accessKey,
|
|
|
|
- t.accessSecret,
|
|
|
|
- t.name,
|
|
|
|
- t.code,
|
|
|
|
- t.enable,
|
|
|
|
- t.contactName,
|
|
|
|
- t.contactPhone,
|
|
|
|
- if(t.updateName is not null,t.updateName,t.createName) as updateName,
|
|
|
|
- if(t.updateTime is not null,t.updateTime,t.createTime) as updateTime
|
|
|
|
- from
|
|
|
|
- (
|
|
|
|
select
|
|
select
|
|
tbo.id, tbo.logo, tbo.enable_simulate as enableSimulate, tbo.simulate_paper_id as simulatePaperId,
|
|
tbo.id, tbo.logo, tbo.enable_simulate as enableSimulate, tbo.simulate_paper_id as simulatePaperId,
|
|
tbo.enable_monitor_record as enableMonitorRecord,tbo.enable_liveness as enableLiveness,
|
|
tbo.enable_monitor_record as enableMonitorRecord,tbo.enable_liveness as enableLiveness,
|
|
tbo.access_key as accessKey,tbo.access_secret as accessSecret,
|
|
tbo.access_key as accessKey,tbo.access_secret as accessSecret,
|
|
- tbo.name, tbo.code, tbo.enable, tbo.contact_name as contactName, tbo.contact_phone as contactPhone, (
|
|
|
|
- select
|
|
|
|
- tbu.name
|
|
|
|
- from
|
|
|
|
- t_b_user tbu
|
|
|
|
- where
|
|
|
|
- tbu.id = tbo.create_id) as createName, tbo.create_time as createTime, (
|
|
|
|
- select
|
|
|
|
- tbu.name
|
|
|
|
- from
|
|
|
|
- t_b_user tbu
|
|
|
|
- where
|
|
|
|
- tbu.id = tbo.update_id) as updateName, tbo.update_time as updateTime
|
|
|
|
|
|
+ tbo.name, tbo.code, tbo.enable, tbo.contact_name as contactName, tbo.contact_phone as contactPhone,
|
|
|
|
+ if(tbu2.name is not null,tbu2.name,tbu1.name) as updateName,
|
|
|
|
+ if(tbo.update_time is not null,tbo.update_time,tbo.create_time) as updateTime
|
|
from
|
|
from
|
|
t_b_org tbo
|
|
t_b_org tbo
|
|
|
|
+ left join t_b_user tbu1 on tbo.create_id = tbu1.id
|
|
|
|
+ left join t_b_user tbu2 on tbo.update_id = tbu2.id
|
|
<where>
|
|
<where>
|
|
<if test="code != null and code != ''">
|
|
<if test="code != null and code != ''">
|
|
and tbo.code = #{code}
|
|
and tbo.code = #{code}
|
|
@@ -50,6 +24,6 @@
|
|
<if test="enable != null and enable != '' or enable == 0">
|
|
<if test="enable != null and enable != '' or enable == 0">
|
|
and tbo.enable = #{enable}
|
|
and tbo.enable = #{enable}
|
|
</if>
|
|
</if>
|
|
- </where> ) t
|
|
|
|
|
|
+ </where>
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|