|
|
@@ -65,8 +65,6 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
|
|
|
// 拼接查询条件
|
|
|
if (!StringUtils.isEmpty(keyword)) {
|
|
|
keyword = keyword.trim();
|
|
|
- enterpriseCondition = "(en_name like '%" + keyword + "%' or en_address like '%" + keyword + "%' or en_industry like '% "
|
|
|
- + keyword + "%')";
|
|
|
if (!StringUtils.isEmpty(field)) {
|
|
|
switch (field) {
|
|
|
case KIND_EQUAL :
|
|
|
@@ -78,8 +76,15 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
|
|
|
case PBRANDEN_EQUAL :
|
|
|
productCondition = "pr_pbranden = '" + keyword + "'";
|
|
|
break;
|
|
|
+ default :
|
|
|
+ enterpriseCondition = "(en_name like '%" + keyword + "%' or en_address like '%" + keyword + "%' or en_industry like '% "
|
|
|
+ + keyword + "%')";
|
|
|
+ break;
|
|
|
}
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ enterpriseCondition = "(en_name like '%" + keyword + "%' or en_address like '%" + keyword + "%' or en_industry like '% "
|
|
|
+ + keyword + "%')";
|
|
|
+ }
|
|
|
}
|
|
|
Long enUU = 0L;
|
|
|
if (null != SystemSession.getUser() && null != SystemSession.getUser().getEnterprise()) {
|
|
|
@@ -161,7 +166,7 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
|
|
|
StringBuilder vendorIntroductionUusSql = new StringBuilder();
|
|
|
// 行数 控制
|
|
|
String rownumSql = ") s order by isStore desc,prodCounts desc,enUU asc limit " + (page - 1) * size + "," + size ;
|
|
|
- vendorIntroductionUusSql.append("select s.*, if( st_uuid is not null and st_status = 'OPENED', 1, 0) isStore");
|
|
|
+ vendorIntroductionUusSql.append("select s.*, if( st_uuid is not null and st_status = 'OPENED', 1, null) isStore");
|
|
|
vendorIntroductionUusSql.append(",(select count(1) from ( select pr_enuu from v$product$private where ").append(productCondition)
|
|
|
.append(" and ifnull(pr_b2cenabled, 1) = 1 and pr_pbranden is not null and pr_pcmpcode is not null) p1 where pr_enuu = enUU) prodCounts");
|
|
|
vendorIntroductionUusSql.append(" from (").append(enterpriseSql).append(rownumSql);
|