🎨 产品信息增加标签字段

This commit is contained in:
ronger 2024-02-03 11:16:51 +08:00
parent f048c86338
commit 96e36b8989
4 changed files with 8 additions and 4 deletions

View File

@ -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 {
/**
* 文章内容

View File

@ -57,4 +57,6 @@ public class Product implements Serializable, Cloneable {
*/
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
private String tags;
}

View File

@ -30,7 +30,6 @@ public class ProductServiceImpl extends AbstractService<Product> implements Prod
@Override
public ProductDTO findProductDTOById(Integer idProduct, Integer type) {
ProductDTO productDTO = productMapper.selectProductDTOById(idProduct, type);
return productDTO;
return productMapper.selectProductDTOById(idProduct, type);
}
}

View File

@ -8,6 +8,7 @@
<result column="product_description" property="productDescription"></result>
<result column="product_price" property="productPrice"></result>
<result column="product_content" property="productContent"></result>
<result column="tags" property="tags"></result>
</resultMap>
<insert id="insertProductContent">
insert into forest_product_content(id_product,
@ -27,7 +28,7 @@
order by weights
</select>
<select id="selectProductDTOById" resultMap="DTOResultMap">
select id, product_title,
select id, product_title, tags,
<choose>
<when test="type == 1">
product_content_html as product_content,