This commit is contained in:
2024-11-19 10:37:28 +08:00
parent 20aebe1f4d
commit aae4ecc9f7

View File

@@ -532,7 +532,7 @@ public class TbProductServiceImpl implements TbProductService {
if (resources.getCategoryId() == null) throw new BadRequestException("商品分类不可为空"); if (resources.getCategoryId() == null) throw new BadRequestException("商品分类不可为空");
product.setIsCombo(0); product.setIsCombo(0);
product.setGroupSnap(null); product.setGroupSnap(null);
if (resources.getNotices() != null && resources.getNotices().getId() != null) { if (resources.getNotices() != null && resources.getNotices().getId() != null && resources.getNotices().getId() > 0) {
noticeRepository.deleteById(resources.getNotices().getId()); noticeRepository.deleteById(resources.getNotices().getId());
} }
} }