v4.0 优化查询未同步记录sql慢的问题
This commit is contained in:
parent
ce9efa70ab
commit
5c1536d342
|
@ -478,7 +478,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getNotSync" resultType="net.shapelight.modules.ten.entity.TenRecordEntity">
|
||||
|
||||
<!--
|
||||
select tr.* from ten_record_${tenantId} tr left join ten_person tp
|
||||
on tr.person_id = tp.person_id
|
||||
where tr.cell_id = #{cellId}
|
||||
|
@ -486,8 +486,15 @@
|
|||
and tr.record_face is not null
|
||||
and TO_DAYS(tr.record_time) = TO_DAYS(NOW())
|
||||
and tp.xa_sync_card = 1
|
||||
-->
|
||||
|
||||
|
||||
select tr.* from (select * from ten_record_${tenantId}
|
||||
where cell_id = #{cellId}
|
||||
and xa_sync = 0
|
||||
and TO_DAYS(record_time) = TO_DAYS(NOW())
|
||||
and record_face is not null) as tr left join ten_person tp
|
||||
on tr.person_id = tp.person_id
|
||||
and tp.xa_sync_card = 1
|
||||
</select>
|
||||
|
||||
<select id="getNotSyncImage" resultType="net.shapelight.modules.ten.entity.TenRecordEntity">
|
||||
|
|
Loading…
Reference in New Issue