zoujiajian 1 ano atrás
pai
commit
ef5e7684d4

+ 6 - 3
netflix-service/src/main/java/com/cyksj/service/mange/goods/GoodsDonCategoryServiceImpl.java

@@ -108,15 +108,18 @@ public class GoodsDonCategoryServiceImpl extends ServiceImpl<GoodsDonCategoryMap
 				categoryList.remove(data.getCategory());
 				ic.set(false);
 			}
-			if (Constant.THIRD_CATEGORY == data.getCategory()) {
-				isThirdGoods.set(true);
-			}
 		});
 		if (ic.get() && categoryList.size() == goodsDonCategoryRelates.size()) {
 			return;
 		}
 		saveBatchRelate(goodsId, categoryList);
+
 		//第三方商品信息更新
+		categoryList.forEach(ct->{
+			if (Constant.THIRD_CATEGORY == ct) {
+				isThirdGoods.set(true);
+			}
+		});
 		goodsDonMapper.update(null, Wrappers.lambdaUpdate(GoodsDon.class)
 				.set(GoodsDon::getIsThirdGoods, isThirdGoods.get())
 				.eq(GoodsDon::getId, goodsId));