diff --git a/city-sjdz-services-biz/city-sjdz-base/city-sjdz-base-biz/src/main/resources/mapper/CallInformationMapper.xml b/city-sjdz-services-biz/city-sjdz-base/city-sjdz-base-biz/src/main/resources/mapper/CallInformationMapper.xml index a2f71541571e77d51dbb076ea2d37277a1bc5e48..472c0d514f9b8d5755a0d37380ecbab331ae7b40 100644 --- a/city-sjdz-services-biz/city-sjdz-base/city-sjdz-base-biz/src/main/resources/mapper/CallInformationMapper.xml +++ b/city-sjdz-services-biz/city-sjdz-base/city-sjdz-base-biz/src/main/resources/mapper/CallInformationMapper.xml @@ -34,19 +34,20 @@ call_information - and (title like concat('%',#{keyWord},'%') or call_content like concat('%',#{keyWord},'%')) + and (title like '%'|| #{keyWord}||'%' + or call_content like '%'|| #{keyWord}||'%' ) - and area LIKE CONCAT('%', #{area}, '%') + and area like '%'|| #{area}||'%' - and DATE_FORMAT(report_time, '%Y-%m')>=#{time} + and TO_CHAR(report_time, 'YYYY-MM')=#{time} 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' - 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}||'%') - and DATE_FORMAT(ei.report_time, '%Y-%m')>=#{time} + and TO_CHAR(ei.report_time, 'YYYY-MM')=#{time} - 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} ) @@ -99,10 +100,10 @@ FROM call_information - and area LIKE CONCAT('%', #{area}, '%') + and area LIKE '%'|| #{area} || '%' - and DATE_FORMAT(report_time, '%Y-%m')>=#{time} + and TO_CHAR(report_time, 'YYYY-MM')=#{time} GROUP BY id @@ -117,15 +118,15 @@ where ei.cancel_flag='0' and eie.del_flag='0' and ei.collection_mode=0 - 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} ) - and DATE_FORMAT(ei.report_time, '%Y-%m')>=#{time} + and TO_CHAR(ei.report_time, 'YYYY-MM')>=#{time} GROUP BY eie.id) aa