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

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

@@ -218,6 +218,7 @@ public class ProductNewController extends BaseController {
                 }
                 }
             }
             }
         }
         }
+        cleanRedisCache();
         List<CmBrand> brandList = productService.findBrandList();
         List<CmBrand> brandList = productService.findBrandList();
         Map<String, Object> classify = productService.findClassify(1);
         Map<String, Object> classify = productService.findClassify(1);
         model.addAttribute("brandList", brandList);
         model.addAttribute("brandList", brandList);

+ 6 - 0
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -544,6 +544,9 @@
 						   costCheckFlag = #{costCheckFlag},
 						   costCheckFlag = #{costCheckFlag},
 						   precisehKey = #{precisehKey},
 						   precisehKey = #{precisehKey},
 						   actSort = #{actSort},
 						   actSort = #{actSort},
+		                   <if test="newProductType ==2">
+							   newvalidFlag=null,
+						   </if>
 						   newProductType=#{newProductType}
 						   newProductType=#{newProductType}
 
 
 		WHERE productID = #{id}
 		WHERE productID = #{id}
@@ -1710,6 +1713,9 @@
 			<if test="trainingFee != null">
 			<if test="trainingFee != null">
 				trainingFee = #{trainingFee},
 				trainingFee = #{trainingFee},
 			</if>
 			</if>
+			<if test="newProductType ==2">
+				newvalidFlag=null,
+			</if>
 			newProductType=#{newProductType},
 			newProductType=#{newProductType},
 			showFlag=#{showFlag},
 			showFlag=#{showFlag},
 			announType=#{announType},
 			announType=#{announType},

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

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