Преглед изворни кода

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

hejq пре 8 година
родитељ
комит
9ab2bd3b82
1 измењених фајлова са 6 додато и 1 уклоњено
  1. 6 1
      src/main/java/com/uas/platform/b2b/service/impl/VendorsServiceImpl.java

+ 6 - 1
src/main/java/com/uas/platform/b2b/service/impl/VendorsServiceImpl.java

@@ -353,7 +353,12 @@ public class VendorsServiceImpl implements VendorService {
 		enterpriseProdSaleSql.append(
 		enterpriseProdSaleSql.append(
 				" select en_uu,0 as hitNums from (select en_uu from sec$enterprises left join v$products on en_uu = pr_enuu " +
 				" select en_uu,0 as hitNums from (select en_uu from sec$enterprises left join v$products on en_uu = pr_enuu " +
 				" where pr_issale = 1 and pr_b2bdisabled <> 1 and en_uu <> ").append(enUU).append(" and en_uu not in (")
 				" where pr_issale = 1 and pr_b2bdisabled <> 1 and en_uu <> ").append(enUU).append(" and en_uu not in (")
-                .append(enUUSql).append(") group by en_uu order by count(pr_issale) desc) b");
+                .append(enUUSql).append(")");
+		if (null != enterpriseMatchCondition && !"".equals(enterpriseMatchCondition)) {
+			enterpriseProdSaleSql.append(" and ").append(enterpriseMatchCondition);
+//			vendorRecommendUuNumSql.append(" and ").append(enterpriseMatchCondition);
+		}
+		enterpriseProdSaleSql.append(" group by en_uu order by count(pr_issale) desc) b");
 		vendorRecommendUusSql.append(" union all ").append(enterpriseProdSaleSql);
 		vendorRecommendUusSql.append(" union all ").append(enterpriseProdSaleSql);
 		vendorRecommendUusSql.append(rownumSql);
 		vendorRecommendUusSql.append(rownumSql);
 		// 因为需求更改为所有有销售产品的企业都会被返回,所以total直接取除本企业外其他有销售产品的企业数即可,之前的匹配企业数不再返回
 		// 因为需求更改为所有有销售产品的企业都会被返回,所以total直接取除本企业外其他有销售产品的企业数即可,之前的匹配企业数不再返回