添加商品分组排序方式字段

This commit is contained in:
谭凯凯
2024-11-12 09:29:55 +08:00
committed by Tankaikai
parent 5131c6bfb6
commit 589a3de1ee
2 changed files with 28 additions and 3 deletions

View File

@@ -23,6 +23,11 @@ public class TbProductGroup implements Serializable {
private String style;
/**
* 排序方式 0-默认 1-价格从高到低 2-销量由高到低
*/
private String sortMode;
private Integer sort;
private Long createdAt;
@@ -186,4 +191,12 @@ public class TbProductGroup implements Serializable {
public void setIsSale(Integer isSale) {
this.isSale = isSale;
}
public String getSortMode() {
return sortMode;
}
public void setSortMode(String sortMode) {
this.sortMode = sortMode;
}
}

View File

@@ -11,6 +11,7 @@
<result column="detail" jdbcType="VARCHAR" property="detail" />
<result column="style" jdbcType="VARCHAR" property="style" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="sort_mode" jdbcType="VARCHAR" property="sortMode" />
<result column="use_time" jdbcType="INTEGER" property="useTime" />
<result column="sale_start_time" jdbcType="INTEGER" property="saleStartTime" />
<result column="sale_end_time" jdbcType="INTEGER" property="saleEndTime" />
@@ -21,7 +22,7 @@
<result column="product_ids" jdbcType="LONGVARCHAR" property="productIds" />
</resultMap>
<sql id="Base_Column_List">
id, name, merchant_id, shop_id, pic, is_show, detail, style, sort, created_at, updated_at , use_time, sale_start_time, sale_end_time
id, name, merchant_id, shop_id, pic, is_show, detail, style, sort, sort_mode, created_at, updated_at , use_time, sale_start_time, sale_end_time
</sql>
<sql id="Blob_Column_List">
product_ids
@@ -41,12 +42,12 @@
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductGroup">
insert into tb_product_group (id, name, merchant_id,
shop_id, pic, is_show,
detail, style, sort,
detail, style, sort, sort_mode,
created_at, updated_at, product_ids
)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR},
#{shopId,jdbcType=INTEGER}, #{pic,jdbcType=VARCHAR}, #{isShow,jdbcType=TINYINT},
#{detail,jdbcType=VARCHAR}, #{style,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{detail,jdbcType=VARCHAR}, #{style,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{sortMode,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{productIds,jdbcType=LONGVARCHAR}
)
</insert>
@@ -80,6 +81,9 @@
<if test="sort != null">
sort,
</if>
<if test="sortMode != null">
sort_mode,
</if>
<if test="createdAt != null">
created_at,
</if>
@@ -118,6 +122,9 @@
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="sortMode != null">
#{sortMode,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
@@ -156,6 +163,9 @@
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="sortMode != null">
sort_mode = #{sort,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
@@ -178,6 +188,7 @@
detail = #{detail,jdbcType=VARCHAR},
style = #{style,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
sort_mode = #{sortMode,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
product_ids = #{productIds,jdbcType=LONGVARCHAR}
@@ -193,6 +204,7 @@
detail = #{detail,jdbcType=VARCHAR},
style = #{style,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
sort_mode = #{sortMode,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}