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 8c7152e..3b5f277 100644 --- a/src/main/java/com/rymcu/forest/service/impl/ProductServiceImpl.java +++ b/src/main/java/com/rymcu/forest/service/impl/ProductServiceImpl.java @@ -53,6 +53,7 @@ public class ProductServiceImpl extends AbstractService implements Prod if (FileDataType.BASE64.equals(product.getProductImgType())) { String headImgUrl = UploadController.uploadBase64File(product.getProductImgUrl(), FilePath.PRODUCT); product.setProductImgUrl(headImgUrl); + product.setProductImgType(FileDataType.URL); } Product newProduct; if (isUpdate) { @@ -60,7 +61,9 @@ public class ProductServiceImpl extends AbstractService implements Prod newProduct.setProductImgUrl(product.getProductImgUrl()); newProduct.setProductTitle(product.getProductTitle()); newProduct.setProductPrice(product.getProductPrice()); + newProduct.setTags(product.getTags()); newProduct.setProductDescription(product.getProductDescription()); + newProduct.setUpdatedTime(new Date()); productMapper.updateByPrimaryKeySelective(newProduct); // 更新产品详情 productMapper.updateProductContent(newProduct.getIdProduct(), product.getProductContent(), product.getProductContentHtml()); diff --git a/src/main/java/mapper/ProductMapper.xml b/src/main/java/mapper/ProductMapper.xml index ddf51f6..ca94d19 100644 --- a/src/main/java/mapper/ProductMapper.xml +++ b/src/main/java/mapper/ProductMapper.xml @@ -37,7 +37,7 @@ where id_product = #{idProduct} @@ -57,7 +57,7 @@