|
@@ -165,10 +165,27 @@
|
|
|
<if test="searchParams.matchMsg != null">
|
|
|
and a.match_msg like #{searchParams.matchMsg}
|
|
|
</if>
|
|
|
+ <if test="searchParams.distinct">
|
|
|
+ and a.rownum_ in (
|
|
|
+ SELECT max(rownum_)
|
|
|
+ from base_person_device_log
|
|
|
+ <where>
|
|
|
+ del_flag=0
|
|
|
+ <if test="searchParams.beginTime != null">
|
|
|
+ <![CDATA[
|
|
|
+ and record_time >= #{searchParams.beginTime}
|
|
|
+ ]]>
|
|
|
+ </if>
|
|
|
+ <if test="searchParams.endTime != null">
|
|
|
+ <![CDATA[
|
|
|
+ and record_time <= #{searchParams.endTime}
|
|
|
+ ]]>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ GROUP BY person_id
|
|
|
+ )
|
|
|
+ </if>
|
|
|
</where>
|
|
|
- <if test="searchParams.distinct">
|
|
|
- group by a.person_id
|
|
|
- </if>
|
|
|
<foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
|
${sort.name} ${sort.order}
|
|
|
</foreach>
|