zhijiezhao 3 years ago
parent
commit
8899d536d4

+ 2 - 2
src/main/java/com/caimei365/commodity/service/impl/SearchProductServiceImpl.java

@@ -81,7 +81,7 @@ public class SearchProductServiceImpl implements SearchProductService {
         if (promotionFlag == 1) {
             filterList.add("p_promotions_id > 0");
         }
-        if (!StringUtils.isEmpty(brandIds) && brandIds != "null") {
+        if (!StringUtils.isEmpty(brandIds) && !"null".equals(brandIds)) {
             StringBuffer brandBuilder = new StringBuffer();
             if (brandIds.contains(",")) {
                 String[] split = brandIds.split(",");
@@ -240,7 +240,7 @@ public class SearchProductServiceImpl implements SearchProductService {
         if (promotionFlag == 1) {
             filterList.add("p_promotions_id > 0");
         }
-        if (!StringUtils.isEmpty(brandIds) && brandIds != "null") {
+        if (!StringUtils.isEmpty(brandIds) && !"null".equals(brandIds)) {
             StringBuffer brandBuilder = new StringBuffer();
             if (brandIds.contains(",")) {
                 String[] split = brandIds.split(",");