zoujiajian 1 년 전
부모
커밋
ef5e7684d4
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      netflix-service/src/main/java/com/cyksj/service/mange/goods/GoodsDonCategoryServiceImpl.java

+ 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));