添加字段

This commit is contained in:
GYJ 2024-06-24 15:05:26 +08:00
parent c1790a3198
commit fa2668ed1c
3 changed files with 84 additions and 59 deletions

View File

@ -126,6 +126,8 @@ public class TbProduct implements Serializable {
private String specTableHeaders;
private Integer stockNumber;
@Transient
private int orderCount;
@ -642,4 +644,12 @@ public class TbProduct implements Serializable {
public void setOrderCount(int orderCount) {
this.orderCount = orderCount;
}
public Integer getStockNumber() {
return stockNumber;
}
public void setStockNumber(Integer stockNumber) {
this.stockNumber = stockNumber;
}
}

View File

@ -49,5 +49,7 @@ public class TbProductSku implements Serializable {
private Long updatedAt;
private Integer isPauseSale = 0;
private static final long serialVersionUID = 1L;
}

View File

@ -62,6 +62,7 @@
<result column="enable_label" jdbcType="TINYINT" property="enableLabel" />
<result column="tax_config_id" jdbcType="VARCHAR" property="taxConfigId" />
<result column="spec_table_headers" jdbcType="VARCHAR" property="specTableHeaders" />
<result column="stock_number" jdbcType="INTEGER" property="stockNumber" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
<result column="images" jdbcType="LONGVARCHAR" property="images" />
@ -80,7 +81,7 @@
created_at, updated_at, base_sales_number, real_sales_number, sales_number, thumb_count,
store_count, furnish_meal, furnish_express, furnish_draw, furnish_vir, is_combo,
is_show_cash, is_show_mall, is_need_examine, show_on_mall_status, show_on_mall_time,
show_on_mall_error_msg, enable_label, tax_config_id, spec_table_headers
show_on_mall_error_msg, enable_label, tax_config_id, spec_table_headers, stock_number
</sql>
<sql id="Blob_Column_List">
images, video, notice, group_snap, spec_info, select_spec
@ -119,7 +120,7 @@
show_on_mall_status, show_on_mall_time, show_on_mall_error_msg,
enable_label, tax_config_id, spec_table_headers,
images, video, notice,
group_snap, spec_info, select_spec
group_snap, spec_info, select_spec, stock_number
)
values (#{id,jdbcType=INTEGER}, #{categoryId,jdbcType=VARCHAR}, #{specId,jdbcType=INTEGER},
#{sourcePath,jdbcType=VARCHAR}, #{brandId,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR},
@ -142,7 +143,8 @@
#{showOnMallStatus,jdbcType=TINYINT}, #{showOnMallTime,jdbcType=BIGINT}, #{showOnMallErrorMsg,jdbcType=VARCHAR},
#{enableLabel,jdbcType=TINYINT}, #{taxConfigId,jdbcType=VARCHAR}, #{specTableHeaders,jdbcType=VARCHAR},
#{images,jdbcType=LONGVARCHAR}, #{video,jdbcType=LONGVARCHAR}, #{notice,jdbcType=LONGVARCHAR},
#{groupSnap,jdbcType=LONGVARCHAR}, #{specInfo,jdbcType=LONGVARCHAR}, #{selectSpec,jdbcType=LONGVARCHAR}
#{groupSnap,jdbcType=LONGVARCHAR}, #{specInfo,jdbcType=LONGVARCHAR}, #{selectSpec,jdbcType=LONGVARCHAR},
#{stockNumber,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
@ -346,6 +348,9 @@
<if test="selectSpec != null">
select_spec,
</if>
<if test="stockNumber != null">
stock_number,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -546,6 +551,9 @@
<if test="selectSpec != null">
#{selectSpec,jdbcType=LONGVARCHAR},
</if>
<if test="stockNumber != null">
#{stockNumber,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
@ -746,6 +754,9 @@
<if test="selectSpec != null">
select_spec = #{selectSpec,jdbcType=LONGVARCHAR},
</if>
<if test="stockNumber != null">
stock_number = #{stockNumber,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
@ -815,7 +826,8 @@
notice = #{notice,jdbcType=LONGVARCHAR},
group_snap = #{groupSnap,jdbcType=LONGVARCHAR},
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
select_spec = #{selectSpec,jdbcType=LONGVARCHAR}
select_spec = #{selectSpec,jdbcType=LONGVARCHAR},
stock_number = #{stockNumber,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProduct">
@ -878,7 +890,8 @@
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
enable_label = #{enableLabel,jdbcType=TINYINT},
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR}
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
stock_number = #{stockNumber,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>