|
@@ -55,25 +55,32 @@
|
|
<select id="getListByCondition" parameterType="Map"
|
|
<select id="getListByCondition" parameterType="Map"
|
|
resultType="com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyInfo">
|
|
resultType="com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyInfo">
|
|
SELECT
|
|
SELECT
|
|
|
|
+ *
|
|
|
|
+ FROM
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
id,
|
|
id,
|
|
- comp_name as compName,
|
|
|
|
- create_phone as createPhone,
|
|
|
|
- main_business_type as mainBusinessType,
|
|
|
|
|
|
+ comp_name AS compName,
|
|
|
|
+ create_phone AS createPhone,
|
|
|
|
+ main_business_type AS mainBusinessType,
|
|
title,
|
|
title,
|
|
- company_profile as companyProfile,
|
|
|
|
|
|
+ company_profile AS companyProfile,
|
|
longitude,
|
|
longitude,
|
|
latitude,
|
|
latitude,
|
|
province,
|
|
province,
|
|
city,
|
|
city,
|
|
area,
|
|
area,
|
|
- detailed_address as detailedAddress,
|
|
|
|
- attachment_address as attachmentAddress,
|
|
|
|
- status,
|
|
|
|
- status_flag as statusFlag,
|
|
|
|
- show_flag as showFlag,
|
|
|
|
- update_date as updateDate
|
|
|
|
- FROM settled_company_info
|
|
|
|
- WHERE delete_flag = '0'
|
|
|
|
|
|
+ detailed_address AS detailedAddress,
|
|
|
|
+ attachment_address AS attachmentAddress,
|
|
|
|
+ STATUS,
|
|
|
|
+ status_flag AS statusFlag,
|
|
|
|
+ show_flag AS showFlag,
|
|
|
|
+ update_date AS updateDate,
|
|
|
|
+ case when city like CONCAT('%',#{location},'%')) then 1 else 0 end AS flag
|
|
|
|
+ FROM
|
|
|
|
+ settled_company_info a
|
|
|
|
+ WHERE
|
|
|
|
+ delete_flag = '0'
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
AND (lower(comp_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
AND (lower(comp_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
OR lower(create_phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
OR lower(create_phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
@@ -114,9 +121,13 @@
|
|
AND (lower(main_business_type) like lower(CONCAT('%',#{mainBusinessType},'%')))
|
|
AND (lower(main_business_type) like lower(CONCAT('%',#{mainBusinessType},'%')))
|
|
</if>
|
|
</if>
|
|
ORDER BY status_flag asc , update_date DESC
|
|
ORDER BY status_flag asc , update_date DESC
|
|
|
|
+ ) b
|
|
|
|
+ ORDER BY
|
|
|
|
+ b.flag desc
|
|
<if test="currentPage != null and currentPage != ''">
|
|
<if test="currentPage != null and currentPage != ''">
|
|
LIMIT ${startRecord}, ${pageSize}
|
|
LIMIT ${startRecord}, ${pageSize}
|
|
</if>
|
|
</if>
|
|
|
|
+
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|