From 96e36b89891d32c5b469a80d5ac77771151f235e Mon Sep 17 00:00:00 2001 From: ronger Date: Sat, 3 Feb 2024 11:16:51 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BA=A7=E5=93=81=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=87=E7=AD=BE=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/rymcu/forest/dto/ProductDTO.java | 2 ++ src/main/java/com/rymcu/forest/entity/Product.java | 2 ++ .../com/rymcu/forest/service/impl/ProductServiceImpl.java | 3 +-- src/main/java/mapper/ProductMapper.xml | 5 +++-- 4 files changed, 8 insertions(+), 4 deletions(-) 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 +