Browse Source

Merge remote-tracking branch 'origin/dev-mysql' into dev-mysql

yangc 7 years ago
parent
commit
7437fd7968

+ 3 - 3
src/main/java/com/uas/platform/b2c/trade/vendor/service/impl/VendorIntroductionServiceImpl.java

@@ -125,7 +125,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 		// 获取企业sql
 		enterpriseSql.append("select en.en_uu enUU, en.en_name enName, en.en_shortname enShortname, en.en_address enAddress, en.en_tel enTel, " +
 				"en.en_email enEmail, en.en_corporation enCorporation, en.en_businesscode enBusinesscode, en.en_industry enIndustry, en.en_Businessscope enBusinessScope " +
-				",st.st_enuu,st.st_status from sec$enterprises en left join store$info st on st.st_enuu = en.en_uu where en_name not like '%测试%' and en_name not like '%test%' and length(en_businesscode) > 12 and en_uu <> ")
+				",st.st_enuu,st.st_status from sec$enterprises en left join store$info st on st.st_enuu = en.en_uu where en_name not like '%测试%' and en_name not like '%test%' and (length(en_businesscode) > 12 or en_name like '%香港%' or en_name like '%HONG KONG%' or en_area like '%香港%') and en_uu <> ")
 			.append(enUU);
 		if (!StringUtils.isEmpty(keyword)) {
 			enterpriseSql.append(" and (en_name like '%").append(keyword).append("%' or en_address like '%").append(keyword).append("%' or en_industry like '%").append(keyword)
@@ -161,7 +161,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 			enCountSql.append("select count(1) from (").append(keywordSql);
 		} else {
 			enCountSql.append("select count(1) from (select en_uu,count(1) from sec$enterprises where en_name not like '%测试%' " +
-					" and en_name not like '%test%' and length(en_businesscode) > 12 and en_uu <> ").append(enUU);
+					" and en_name not like '%test%' and (length(en_businesscode) > 12 or en_name like '%香港%' or en_name like '%HONG KONG%' or en_area like '%香港%') and en_uu <> ").append(enUU);
 		}
 		enCountSql.append(" group by en_uu )a");
         System.out.println("en_count:" + enCountSql.toString());
@@ -176,7 +176,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 	 */
 	private String getKeywordSql(Long enUU, String keyword) {
 		return "select en_uu,count(1) as counts from sec$enterprises where en_name not like '%测试%' " +
-				"and lower(en_name) not like '%test%' and length(en_businesscode) > 12 and (en_name like '%"
+				"and lower(en_name) not like '%test%' and (length(en_businesscode) > 12 or en_name like '%香港%' or en_name like '%HONG KONG%' or en_area like '%香港%') and (en_name like '%"
 				+ keyword + "%' or en_address like '%" + keyword + "%' or en_industry like '%" + keyword
 				+ "%') and en_uu <> " + enUU;
 	}