This commit is contained in:
2026-02-05 19:17:43 +08:00
parent a389a7c5cd
commit c822959a24
4 changed files with 70 additions and 14 deletions

View File

@@ -8,19 +8,19 @@
<result column="spu_sn" property="spuSn"/>
<result column="spu_name" property="spuName"/>
<result column="main_img" property="mainImg"/>
<result column="detail_img" property="detailImg" typeHandler="org.springblade.common.handler.TextArrayTypeHandler"/>
<result column="top_img" property="topImg" typeHandler="org.springblade.common.handler.TextArrayTypeHandler"/>
<result column="attribute" property="attribute"/>
<result column="detail_img" property="detailImg" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
<result column="top_img" property="topImg" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
<result column="attribute" property="attribute" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
<result column="unit" property="unit"/>
<result column="category_id" property="categoryId"/>
<result column="category_ids" property="categoryIds"/>
<result column="category_ids" property="categoryIds" typeHandler="org.springblade.common.handler.PgBigIntArrayToListTypeHandler"/>
<result column="cost_price" property="costPrice"/>
<result column="original_price" property="originalPrice"/>
<result column="retail_price" property="retailPrice"/>
<result column="profit" property="profit"/>
<result column="sales" property="sales"/>
<result column="spu_qty" property="spuQty"/>
<result column="tags" property="tags"/>
<result column="tags" property="tags" typeHandler="org.springblade.common.handler.PgStringArrayToListTypeHandler"/>
<result column="status" property="status"/>
<result column="create_user" property="createUser"/>
<result column="create_dept" property="createDept"/>

View File

@@ -31,7 +31,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import lombok.EqualsAndHashCode;
import org.springblade.common.handler.TextArrayTypeHandler;
import org.springblade.common.handler.PgBigIntArrayToListTypeHandler;
import org.springblade.common.handler.PgStringArrayToListTypeHandler;
import org.springblade.core.mp.base.BaseEntity;
import java.io.Serial;
import java.util.List;
@@ -69,19 +70,19 @@ public class MallProductEntity extends BaseEntity {
/**
* 详情图(多图,逗号分割)
*/
@TableField(typeHandler = TextArrayTypeHandler.class)
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
@Schema(description = "详情图")
private List<String> detailImg;
/**
* 顶图(多图,逗号分割)
*/
@TableField(typeHandler = TextArrayTypeHandler.class)
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
@Schema(description = "详情页顶图")
private List<String> topImg;
/**
* 规格详情
*/
@TableField(typeHandler = TextArrayTypeHandler.class)
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
@Schema(description = "规格详情")
private List<String> attribute;
/**
@@ -97,8 +98,9 @@ public class MallProductEntity extends BaseEntity {
/**
* cate_id分类
*/
@TableField(typeHandler = PgBigIntArrayToListTypeHandler.class)
@Schema(description = "cate_id分类")
private String categoryIds;
private List<Long> categoryIds;
/**
* 成本价
*/
@@ -132,7 +134,8 @@ public class MallProductEntity extends BaseEntity {
/**
* 标签(多标签,逗号分割 )
*/
@Schema(description = "标签(多标签,逗号分割 )")
private String tags;
@TableField(typeHandler = PgStringArrayToListTypeHandler.class)
@Schema(description = "标签")
private List<String> tags;
}