Skip to content
Snippets Groups Projects
Commit a15053c7 authored by zhaoting's avatar zhaoting
Browse files

feat: 达梦的修改

parent 5db8bde0
No related branches found
No related tags found
No related merge requests found
......@@ -34,19 +34,20 @@
call_information
<where>
<if test="keyWord!=null and keyWord!=''">
and (title like concat('%',#{keyWord},'%') or call_content like concat('%',#{keyWord},'%'))
and (title like '%'|| #{keyWord}||'%'
or call_content like '%'|| #{keyWord}||'%' )
</if>
<if test="area!=null and area!=''">
and area LIKE CONCAT('%', #{area}, '%')
and area like '%'|| #{area}||'%'
</if>
<if test="time!=null and time!=''">
and DATE_FORMAT(report_time, '%Y-%m')>=#{time}
and TO_CHAR(report_time, 'YYYY-MM')=#{time}
</if>
</where>
UNION ALL
select
ei.id as id,
"2" as type,
'2' as "type",
'群众反馈'as call_type ,
ei.standard_event_title title,
ei.standard_event_content call_content,
......@@ -63,16 +64,16 @@
where
ei.cancel_flag='0' and eie.del_flag='0'
<if test="keyWord!=null and keyWord!=''">
and (ei.standard_event_title like concat('%',#{keyWord},'%') or ei.standard_event_content like concat('%',#{keyWord},'%'))
and (ei.standard_event_title like '%' || #{keyWord}||'%' or ei.standard_event_content like '%'||#{keyWord}||'%')
</if>
<if test="time!=null and time!=''">
and DATE_FORMAT(ei.report_time, '%Y-%m')>=#{time}
and TO_CHAR(ei.report_time, 'YYYY-MM')=#{time}
</if>
<if test="area!=null and area!=''">
and (eie.city_name LIKE CONCAT('%', #{area}, '%')
or eie.district_name LIKE CONCAT('%', #{area}, '%')
or eie.street_name LIKE CONCAT('%', #{area}, '%')
or eie.cell_name LIKE CONCAT('%', #{area}, '%')
and (eie.city_name LIKE '%' || #{area}||'%'
or eie.district_name LIKE '%' || #{area}||'%'
or eie.street_name LIKE '%' || #{area}||'%'
or eie.cell_name LIKE '%' || #{area}||'%'
or eie.community_name=#{area}
)
</if>
......@@ -99,10 +100,10 @@
FROM call_information
<where>
<if test="area!=null and area!=''">
and area LIKE CONCAT('%', #{area}, '%')
and area LIKE '%'|| #{area} || '%'
</if>
<if test="time!=null and time!=''">
and DATE_FORMAT(report_time, '%Y-%m')>=#{time}
and TO_CHAR(report_time, 'YYYY-MM')=#{time}
</if>
</where>
GROUP BY id
......@@ -117,15 +118,15 @@
where
ei.cancel_flag='0' and eie.del_flag='0' and ei.collection_mode=0
<if test="area!=null and area!=''">
and (eie.city_name LIKE CONCAT('%', #{area}, '%')
or eie.district_name LIKE CONCAT('%', #{area}, '%')
or eie.street_name LIKE CONCAT('%', #{area}, '%')
or eie.cell_name LIKE CONCAT('%', #{area}, '%')
and (eie.city_name LIKE '%'|| #{area} || '%'
or eie.district_name LIKE '%'|| #{area} || '%'
or eie.street_name LIKE '%'|| #{area} || '%'
or eie.cell_name LIKE '%'|| #{area} || '%'
or eie.community_name=#{area}
)
</if>
<if test="time!=null and time!=''">
and DATE_FORMAT(ei.report_time, '%Y-%m')>=#{time}
and TO_CHAR(ei.report_time, 'YYYY-MM')>=#{time}
</if>
GROUP BY eie.id) aa
</select>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment