diff --git a/src/main/java/com/rymcu/forest/dto/ProductDTO.java b/src/main/java/com/rymcu/forest/dto/ProductDTO.java index dd8c3cc..7123d04 100644 --- a/src/main/java/com/rymcu/forest/dto/ProductDTO.java +++ b/src/main/java/com/rymcu/forest/dto/ProductDTO.java @@ -2,6 +2,7 @@ package com.rymcu.forest.dto; import com.rymcu.forest.entity.Product; import lombok.Data; +import lombok.EqualsAndHashCode; /** * Created on 2022/6/21 9:38. @@ -11,6 +12,7 @@ import lombok.Data; * @packageName com.rymcu.forest.dto */ @Data +@EqualsAndHashCode(callSuper=false) public class ProductDTO extends Product { /** * 文章内容 diff --git a/src/main/java/com/rymcu/forest/entity/Product.java b/src/main/java/com/rymcu/forest/entity/Product.java index b5e312d..0686465 100644 --- a/src/main/java/com/rymcu/forest/entity/Product.java +++ b/src/main/java/com/rymcu/forest/entity/Product.java @@ -57,4 +57,6 @@ public class Product implements Serializable, Cloneable { */ @JSONField(format = "yyyy-MM-dd HH:mm:ss") private Date updatedTime; + + private String tags; } 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 3e62b56..b6ddaa6 100644 --- a/src/main/java/com/rymcu/forest/service/impl/ProductServiceImpl.java +++ b/src/main/java/com/rymcu/forest/service/impl/ProductServiceImpl.java @@ -30,7 +30,6 @@ public class ProductServiceImpl extends AbstractService implements Prod @Override public ProductDTO findProductDTOById(Integer idProduct, Integer type) { - ProductDTO productDTO = productMapper.selectProductDTOById(idProduct, type); - return productDTO; + return productMapper.selectProductDTOById(idProduct, type); } } diff --git a/src/main/java/mapper/ProductMapper.xml b/src/main/java/mapper/ProductMapper.xml index 438aca3..3a8230f 100644 --- a/src/main/java/mapper/ProductMapper.xml +++ b/src/main/java/mapper/ProductMapper.xml @@ -8,6 +8,7 @@ + insert into forest_product_content(id_product, @@ -27,7 +28,7 @@ order by weights - \ No newline at end of file +