diff --git a/src/main/java/com/rymcu/forest/service/impl/ProductServiceImpl.java b/src/main/java/com/rymcu/forest/service/impl/ProductServiceImpl.java index 789cf93..f3b4845 100644 --- a/src/main/java/com/rymcu/forest/service/impl/ProductServiceImpl.java +++ b/src/main/java/com/rymcu/forest/service/impl/ProductServiceImpl.java @@ -67,6 +67,7 @@ public class ProductServiceImpl extends AbstractService implements Prod newProduct = new Product(); BeanCopierUtil.convert(product, newProduct); newProduct.setCreatedTime(new Date()); + productMapper.insertSelective(newProduct); // 创建产品详情 productMapper.insertProductContent(newProduct.getIdProduct(), product.getProductContent(), product.getProductContentHtml()); }