Duan_xu 2 年之前
父节点
当前提交
c27721ce3b

+ 10 - 1
src/main/java/com/caimei/modules/product/web/ProductNewController.java

@@ -218,7 +218,6 @@ public class ProductNewController extends BaseController {
                 }
             }
         }
-        cleanRedisCache();
         List<CmBrand> brandList = productService.findBrandList();
         Map<String, Object> classify = productService.findClassify(1);
         model.addAttribute("brandList", brandList);
@@ -242,11 +241,21 @@ public class ProductNewController extends BaseController {
             // 单个商品搜索
             model.addAttribute("editFlag", "1");
         }
+
         if ("1".equals(product.getProductCategory())) {
+            /**
+             * 初始化回显字段
+             */
+            product =new Product();
             return "modules/product-new/productList";
         } else {
+            /**
+             * 初始化回显字段
+             */
+            product =new Product();
             return "modules/product-new/secondHand";
         }
+
     }
 
     @RequestMapping(value = "productAdd")

+ 1 - 1
src/main/resources/mappings/modules/product/ProductNewMapper.xml

@@ -231,7 +231,7 @@
             <if test="publishIdentity != null and publishIdentity !=''">
                 AND cshd.publishIdentity = #{publishIdentity}
             </if>
-            <if test="announType !=null and announType!= '' and productCategory == 2">
+            <if test="announType != null and announType!= '' and productCategory == 2">
                 AND a.announType=#{announType}
             </if>
             <if test="newvalidFlag !=null and newvalidFlag!= ''">