库存警戒线
This commit is contained in:
@@ -140,6 +140,9 @@ public class TbProduct implements Serializable {
|
|||||||
//是否可售 1 可售 0非可售
|
//是否可售 1 可售 0非可售
|
||||||
private Integer isSale = 1;
|
private Integer isSale = 1;
|
||||||
|
|
||||||
|
private Integer warnLine = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getImages() {
|
public String getImages() {
|
||||||
return images;
|
return images;
|
||||||
@@ -683,4 +686,12 @@ public class TbProduct implements Serializable {
|
|||||||
public void setIsSale(Integer isSale) {
|
public void setIsSale(Integer isSale) {
|
||||||
this.isSale = isSale;
|
this.isSale = isSale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getWarnLine() {
|
||||||
|
return warnLine;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWarnLine(Integer warnLine) {
|
||||||
|
this.warnLine = warnLine;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ public class TbProductSku implements Serializable {
|
|||||||
|
|
||||||
private String coverImg;
|
private String coverImg;
|
||||||
|
|
||||||
private Integer warnLine;
|
|
||||||
|
|
||||||
private Double weight;
|
private Double weight;
|
||||||
|
|
||||||
@@ -175,14 +174,6 @@ public class TbProductSku implements Serializable {
|
|||||||
this.coverImg = coverImg == null ? null : coverImg.trim();
|
this.coverImg = coverImg == null ? null : coverImg.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getWarnLine() {
|
|
||||||
return warnLine;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWarnLine(Integer warnLine) {
|
|
||||||
this.warnLine = warnLine;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Double getWeight() {
|
public Double getWeight() {
|
||||||
return weight;
|
return weight;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -567,22 +567,9 @@ public class CartService {
|
|||||||
* @param num 库存数
|
* @param num 库存数
|
||||||
*/
|
*/
|
||||||
private void updateProductStock(TbProduct product, TbProductSkuWithBLOBs productSku, Integer num) {
|
private void updateProductStock(TbProduct product, TbProductSkuWithBLOBs productSku, Integer num) {
|
||||||
String key = RedisCst.PRODUCT + product.getShopId() + ":product" + product.getId();
|
|
||||||
double stock = num;
|
|
||||||
if (product.getIsDistribute() == 1) {
|
|
||||||
productMapper.updateStockById(product.getId().toString(), num);
|
|
||||||
stock = (double) (product.getStockNumber() - num);
|
|
||||||
} else {
|
|
||||||
key = RedisCst.PRODUCT + product.getShopId() + ":" + productSku.getId();
|
|
||||||
productSkuMapper.updateStockById(productSku.getId().toString(), num);
|
|
||||||
stock = productSku.getStockNumber() - num;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (num > 0) {
|
productMapper.updateStockById(product.getId().toString(), num);
|
||||||
redisUtil.getIncrNum(key, "1");
|
|
||||||
} else {
|
|
||||||
redisUtil.getIncrNum(key, "2");
|
|
||||||
}
|
|
||||||
|
|
||||||
CompletableFuture.runAsync(() -> checkWarnLineAndSendMsg(productSku, product, num));
|
CompletableFuture.runAsync(() -> checkWarnLineAndSendMsg(productSku, product, num));
|
||||||
|
|
||||||
@@ -594,7 +581,7 @@ public class CartService {
|
|||||||
* @param productSku sku
|
* @param productSku sku
|
||||||
*/
|
*/
|
||||||
private void checkWarnLineAndSendMsg(TbProductSku productSku, TbProduct product, Integer num) {
|
private void checkWarnLineAndSendMsg(TbProductSku productSku, TbProduct product, Integer num) {
|
||||||
if (productSku.getWarnLine() == null) {
|
if (product.getWarnLine() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -608,23 +595,17 @@ public class CartService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (productSku.getStockNumber() == null) {
|
|
||||||
productSku.setStockNumber((double) 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (product.getStockNumber() == null) {
|
if (product.getStockNumber() == null) {
|
||||||
product.setStockNumber(0);
|
product.setStockNumber(0);
|
||||||
}
|
}
|
||||||
if (
|
if (product.getStockNumber() - num <= product.getWarnLine()) {
|
||||||
(product.getIsDistribute() == 1 && product.getStockNumber() - num <= productSku.getWarnLine())
|
|
||||||
|| (product.getIsDistribute() != 1) && productSku.getStockNumber() - num <= productSku.getWarnLine()
|
|
||||||
) {
|
|
||||||
List<TbShopOpenId> shopOpenIds = shopOpenIdMapper.selectStateByShopIdAndType(product.getShopId(), ShopWxMsgTypeEnum.STOCK_MSG.getType());
|
List<TbShopOpenId> shopOpenIds = shopOpenIdMapper.selectStateByShopIdAndType(product.getShopId(), ShopWxMsgTypeEnum.STOCK_MSG.getType());
|
||||||
shopOpenIds.forEach(item -> {
|
shopOpenIds.forEach(item -> {
|
||||||
String message = redisUtil.getMessage(RedisCst.SEND_STOCK_WARN_MSG + product.getId() + ":" + item.getOpenId());
|
String message = redisUtil.getMessage(RedisCst.SEND_STOCK_WARN_MSG + product.getId() + ":" + item.getOpenId());
|
||||||
if (message == null) {
|
if (message == null) {
|
||||||
wxAccountUtil.sendStockWarnMsg("商品库存不足", product.getName(),
|
wxAccountUtil.sendStockWarnMsg("商品库存不足", product.getName(),
|
||||||
product.getIsDistribute() == 1 ? product.getStockNumber() - num : (int) (productSku.getStockNumber() - num)
|
product.getStockNumber() - num
|
||||||
, item.getOpenId(), ShopWxMsgTypeEnum.STOCK_MSG, shopInfo.getId());
|
, item.getOpenId(), ShopWxMsgTypeEnum.STOCK_MSG, shopInfo.getId());
|
||||||
redisUtil.saveMessage(RedisCst.SEND_STOCK_WARN_MSG + product.getId() + ":" + item.getOpenId(), product.getId().toString(), 60 * 30L);
|
redisUtil.saveMessage(RedisCst.SEND_STOCK_WARN_MSG + product.getId() + ":" + item.getOpenId(), product.getId().toString(), 60 * 30L);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
<result column="spec_table_headers" jdbcType="VARCHAR" property="specTableHeaders" />
|
<result column="spec_table_headers" jdbcType="VARCHAR" property="specTableHeaders" />
|
||||||
<result column="group_category_id" jdbcType="VARCHAR" property="groupCategoryId" />
|
<result column="group_category_id" jdbcType="VARCHAR" property="groupCategoryId" />
|
||||||
<result column="stock_number" jdbcType="INTEGER" property="stockNumber" />
|
<result column="stock_number" jdbcType="INTEGER" property="stockNumber" />
|
||||||
|
<result column="warn_line" jdbcType="INTEGER" property="warnLine" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||||
<result column="images" jdbcType="LONGVARCHAR" property="images" />
|
<result column="images" jdbcType="LONGVARCHAR" property="images" />
|
||||||
@@ -82,7 +83,7 @@
|
|||||||
created_at, updated_at, base_sales_number, real_sales_number, sales_number, thumb_count,
|
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,
|
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,
|
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,group_category_id,stock_number
|
show_on_mall_error_msg, enable_label, tax_config_id, spec_table_headers,group_category_id,stock_number,warn_line
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
images, video, notice, group_snap, spec_info, select_spec
|
images, video, notice, group_snap, spec_info, select_spec
|
||||||
@@ -121,7 +122,7 @@
|
|||||||
show_on_mall_status, show_on_mall_time, show_on_mall_error_msg,
|
show_on_mall_status, show_on_mall_time, show_on_mall_error_msg,
|
||||||
enable_label, tax_config_id, spec_table_headers,
|
enable_label, tax_config_id, spec_table_headers,
|
||||||
images, video, notice,
|
images, video, notice,
|
||||||
group_snap, spec_info, select_spec,group_category_id,stock_number
|
group_snap, spec_info, select_spec,group_category_id,stock_number,warn_line
|
||||||
)
|
)
|
||||||
values (#{id,jdbcType=INTEGER}, #{categoryId,jdbcType=VARCHAR}, #{specId,jdbcType=INTEGER},
|
values (#{id,jdbcType=INTEGER}, #{categoryId,jdbcType=VARCHAR}, #{specId,jdbcType=INTEGER},
|
||||||
#{sourcePath,jdbcType=VARCHAR}, #{brandId,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR},
|
#{sourcePath,jdbcType=VARCHAR}, #{brandId,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR},
|
||||||
@@ -145,8 +146,7 @@
|
|||||||
#{enableLabel,jdbcType=TINYINT}, #{taxConfigId,jdbcType=VARCHAR}, #{specTableHeaders,jdbcType=VARCHAR},
|
#{enableLabel,jdbcType=TINYINT}, #{taxConfigId,jdbcType=VARCHAR}, #{specTableHeaders,jdbcType=VARCHAR},
|
||||||
#{images,jdbcType=LONGVARCHAR}, #{video,jdbcType=LONGVARCHAR}, #{notice,jdbcType=LONGVARCHAR},
|
#{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},
|
||||||
#{groupCategoryId,jdbcType=VARCHAR},#{stockNumber,jdbcType=INTEGER},
|
#{groupCategoryId,jdbcType=VARCHAR},#{stockNumber,jdbcType=INTEGER},#{warnLine,jdbcType=INTEGER}
|
||||||
#{groupCategoryId,jdbcType=VARCHAR},#{stockNumber,jdbcType=INTEGER}
|
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||||
@@ -356,6 +356,9 @@
|
|||||||
<if test="stockNumber != null">
|
<if test="stockNumber != null">
|
||||||
stock_number,
|
stock_number,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="warnLine != null">
|
||||||
|
warn_line,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
@@ -556,12 +559,15 @@
|
|||||||
<if test="selectSpec != null">
|
<if test="selectSpec != null">
|
||||||
#{selectSpec,jdbcType=LONGVARCHAR},
|
#{selectSpec,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="groupCategoryId != null">
|
<if test="groupCategoryId != null">
|
||||||
#{groupCategoryId,jdbcType=VARCHAR},
|
#{groupCategoryId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="stockNumber != null">
|
<if test="stockNumber != null">
|
||||||
#{stockNumber,jdbcType=INTEGER},
|
#{stockNumber,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="warnLine != null">
|
||||||
|
#{warnLine,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||||
@@ -768,143 +774,148 @@
|
|||||||
<if test="stockNumber != null">
|
<if test="stockNumber != null">
|
||||||
stock_number = #{stockNumber,jdbcType=INTEGER},
|
stock_number = #{stockNumber,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="warnLine != null">
|
||||||
|
warn_line = #{warnLine,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||||
update tb_product
|
update tb_product
|
||||||
set category_id = #{categoryId,jdbcType=VARCHAR},
|
set category_id = #{categoryId,jdbcType=VARCHAR},
|
||||||
spec_id = #{specId,jdbcType=INTEGER},
|
spec_id = #{specId,jdbcType=INTEGER},
|
||||||
source_path = #{sourcePath,jdbcType=VARCHAR},
|
source_path = #{sourcePath,jdbcType=VARCHAR},
|
||||||
brand_id = #{brandId,jdbcType=INTEGER},
|
brand_id = #{brandId,jdbcType=INTEGER},
|
||||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||||
name = #{name,jdbcType=VARCHAR},
|
name = #{name,jdbcType=VARCHAR},
|
||||||
short_title = #{shortTitle,jdbcType=VARCHAR},
|
short_title = #{shortTitle,jdbcType=VARCHAR},
|
||||||
type = #{type,jdbcType=VARCHAR},
|
type = #{type,jdbcType=VARCHAR},
|
||||||
pack_fee = #{packFee,jdbcType=DECIMAL},
|
pack_fee = #{packFee,jdbcType=DECIMAL},
|
||||||
low_price = #{lowPrice,jdbcType=DECIMAL},
|
low_price = #{lowPrice,jdbcType=DECIMAL},
|
||||||
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
|
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
|
||||||
unit_id = #{unitId,jdbcType=VARCHAR},
|
unit_id = #{unitId,jdbcType=VARCHAR},
|
||||||
unit_snap = #{unitSnap,jdbcType=VARCHAR},
|
unit_snap = #{unitSnap,jdbcType=VARCHAR},
|
||||||
cover_img = #{coverImg,jdbcType=VARCHAR},
|
cover_img = #{coverImg,jdbcType=VARCHAR},
|
||||||
share_img = #{shareImg,jdbcType=VARCHAR},
|
share_img = #{shareImg,jdbcType=VARCHAR},
|
||||||
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
|
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
|
||||||
sort = #{sort,jdbcType=INTEGER},
|
sort = #{sort,jdbcType=INTEGER},
|
||||||
limit_number = #{limitNumber,jdbcType=INTEGER},
|
limit_number = #{limitNumber,jdbcType=INTEGER},
|
||||||
product_score = #{productScore,jdbcType=INTEGER},
|
product_score = #{productScore,jdbcType=INTEGER},
|
||||||
status = #{status,jdbcType=TINYINT},
|
status = #{status,jdbcType=TINYINT},
|
||||||
fail_msg = #{failMsg,jdbcType=VARCHAR},
|
fail_msg = #{failMsg,jdbcType=VARCHAR},
|
||||||
is_recommend = #{isRecommend,jdbcType=TINYINT},
|
is_recommend = #{isRecommend,jdbcType=TINYINT},
|
||||||
is_hot = #{isHot,jdbcType=TINYINT},
|
is_hot = #{isHot,jdbcType=TINYINT},
|
||||||
is_new = #{isNew,jdbcType=TINYINT},
|
is_new = #{isNew,jdbcType=TINYINT},
|
||||||
is_on_sale = #{isOnSale,jdbcType=TINYINT},
|
is_on_sale = #{isOnSale,jdbcType=TINYINT},
|
||||||
is_show = #{isShow,jdbcType=TINYINT},
|
is_show = #{isShow,jdbcType=TINYINT},
|
||||||
type_enum = #{typeEnum,jdbcType=VARCHAR},
|
type_enum = #{typeEnum,jdbcType=VARCHAR},
|
||||||
is_distribute = #{isDistribute,jdbcType=TINYINT},
|
is_distribute = #{isDistribute,jdbcType=TINYINT},
|
||||||
is_del = #{isDel,jdbcType=TINYINT},
|
is_del = #{isDel,jdbcType=TINYINT},
|
||||||
is_stock = #{isStock,jdbcType=TINYINT},
|
is_stock = #{isStock,jdbcType=TINYINT},
|
||||||
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
|
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
|
||||||
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
|
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
|
||||||
freight_id = #{freightId,jdbcType=BIGINT},
|
freight_id = #{freightId,jdbcType=BIGINT},
|
||||||
strategy_type = #{strategyType,jdbcType=VARCHAR},
|
strategy_type = #{strategyType,jdbcType=VARCHAR},
|
||||||
strategy_id = #{strategyId,jdbcType=INTEGER},
|
strategy_id = #{strategyId,jdbcType=INTEGER},
|
||||||
is_vip = #{isVip,jdbcType=TINYINT},
|
is_vip = #{isVip,jdbcType=TINYINT},
|
||||||
is_delete = #{isDelete,jdbcType=TINYINT},
|
is_delete = #{isDelete,jdbcType=TINYINT},
|
||||||
created_at = #{createdAt,jdbcType=BIGINT},
|
created_at = #{createdAt,jdbcType=BIGINT},
|
||||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||||
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
|
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
|
||||||
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
|
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
|
||||||
sales_number = #{salesNumber,jdbcType=INTEGER},
|
sales_number = #{salesNumber,jdbcType=INTEGER},
|
||||||
thumb_count = #{thumbCount,jdbcType=INTEGER},
|
thumb_count = #{thumbCount,jdbcType=INTEGER},
|
||||||
store_count = #{storeCount,jdbcType=INTEGER},
|
store_count = #{storeCount,jdbcType=INTEGER},
|
||||||
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
|
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
|
||||||
furnish_express = #{furnishExpress,jdbcType=INTEGER},
|
furnish_express = #{furnishExpress,jdbcType=INTEGER},
|
||||||
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
|
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
|
||||||
furnish_vir = #{furnishVir,jdbcType=INTEGER},
|
furnish_vir = #{furnishVir,jdbcType=INTEGER},
|
||||||
is_combo = #{isCombo,jdbcType=TINYINT},
|
is_combo = #{isCombo,jdbcType=TINYINT},
|
||||||
is_show_cash = #{isShowCash,jdbcType=TINYINT},
|
is_show_cash = #{isShowCash,jdbcType=TINYINT},
|
||||||
is_show_mall = #{isShowMall,jdbcType=TINYINT},
|
is_show_mall = #{isShowMall,jdbcType=TINYINT},
|
||||||
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
|
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
|
||||||
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
|
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
|
||||||
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
|
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
|
||||||
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
||||||
enable_label = #{enableLabel,jdbcType=TINYINT},
|
enable_label = #{enableLabel,jdbcType=TINYINT},
|
||||||
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
|
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
|
||||||
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
|
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
|
||||||
images = #{images,jdbcType=LONGVARCHAR},
|
images = #{images,jdbcType=LONGVARCHAR},
|
||||||
video = #{video,jdbcType=LONGVARCHAR},
|
video = #{video,jdbcType=LONGVARCHAR},
|
||||||
notice = #{notice,jdbcType=LONGVARCHAR},
|
notice = #{notice,jdbcType=LONGVARCHAR},
|
||||||
group_snap = #{groupSnap,jdbcType=LONGVARCHAR},
|
group_snap = #{groupSnap,jdbcType=LONGVARCHAR},
|
||||||
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
|
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
|
||||||
select_spec = #{selectSpec,jdbcType=LONGVARCHAR},
|
select_spec = #{selectSpec,jdbcType=LONGVARCHAR},
|
||||||
group_category_id = #{groupCategoryId,jdbcType=VARCHAR},
|
group_category_id = #{groupCategoryId,jdbcType=VARCHAR},
|
||||||
stock_number = #{stockNumber,jdbcType=INTEGER}
|
stock_number = #{stockNumber,jdbcType=INTEGER},
|
||||||
|
warn_line = #{warnLine,jdbcType=INTEGER}
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProduct">
|
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProduct">
|
||||||
update tb_product
|
update tb_product
|
||||||
set category_id = #{categoryId,jdbcType=VARCHAR},
|
set category_id = #{categoryId,jdbcType=VARCHAR},
|
||||||
spec_id = #{specId,jdbcType=INTEGER},
|
spec_id = #{specId,jdbcType=INTEGER},
|
||||||
source_path = #{sourcePath,jdbcType=VARCHAR},
|
source_path = #{sourcePath,jdbcType=VARCHAR},
|
||||||
brand_id = #{brandId,jdbcType=INTEGER},
|
brand_id = #{brandId,jdbcType=INTEGER},
|
||||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||||
name = #{name,jdbcType=VARCHAR},
|
name = #{name,jdbcType=VARCHAR},
|
||||||
short_title = #{shortTitle,jdbcType=VARCHAR},
|
short_title = #{shortTitle,jdbcType=VARCHAR},
|
||||||
type = #{type,jdbcType=VARCHAR},
|
type = #{type,jdbcType=VARCHAR},
|
||||||
pack_fee = #{packFee,jdbcType=DECIMAL},
|
pack_fee = #{packFee,jdbcType=DECIMAL},
|
||||||
low_price = #{lowPrice,jdbcType=DECIMAL},
|
low_price = #{lowPrice,jdbcType=DECIMAL},
|
||||||
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
|
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
|
||||||
unit_id = #{unitId,jdbcType=VARCHAR},
|
unit_id = #{unitId,jdbcType=VARCHAR},
|
||||||
unit_snap = #{unitSnap,jdbcType=VARCHAR},
|
unit_snap = #{unitSnap,jdbcType=VARCHAR},
|
||||||
cover_img = #{coverImg,jdbcType=VARCHAR},
|
cover_img = #{coverImg,jdbcType=VARCHAR},
|
||||||
share_img = #{shareImg,jdbcType=VARCHAR},
|
share_img = #{shareImg,jdbcType=VARCHAR},
|
||||||
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
|
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
|
||||||
sort = #{sort,jdbcType=INTEGER},
|
sort = #{sort,jdbcType=INTEGER},
|
||||||
limit_number = #{limitNumber,jdbcType=INTEGER},
|
limit_number = #{limitNumber,jdbcType=INTEGER},
|
||||||
product_score = #{productScore,jdbcType=INTEGER},
|
product_score = #{productScore,jdbcType=INTEGER},
|
||||||
status = #{status,jdbcType=TINYINT},
|
status = #{status,jdbcType=TINYINT},
|
||||||
fail_msg = #{failMsg,jdbcType=VARCHAR},
|
fail_msg = #{failMsg,jdbcType=VARCHAR},
|
||||||
is_recommend = #{isRecommend,jdbcType=TINYINT},
|
is_recommend = #{isRecommend,jdbcType=TINYINT},
|
||||||
is_hot = #{isHot,jdbcType=TINYINT},
|
is_hot = #{isHot,jdbcType=TINYINT},
|
||||||
is_new = #{isNew,jdbcType=TINYINT},
|
is_new = #{isNew,jdbcType=TINYINT},
|
||||||
is_on_sale = #{isOnSale,jdbcType=TINYINT},
|
is_on_sale = #{isOnSale,jdbcType=TINYINT},
|
||||||
is_show = #{isShow,jdbcType=TINYINT},
|
is_show = #{isShow,jdbcType=TINYINT},
|
||||||
type_enum = #{typeEnum,jdbcType=VARCHAR},
|
type_enum = #{typeEnum,jdbcType=VARCHAR},
|
||||||
is_distribute = #{isDistribute,jdbcType=TINYINT},
|
is_distribute = #{isDistribute,jdbcType=TINYINT},
|
||||||
is_del = #{isDel,jdbcType=TINYINT},
|
is_del = #{isDel,jdbcType=TINYINT},
|
||||||
is_stock = #{isStock,jdbcType=TINYINT},
|
is_stock = #{isStock,jdbcType=TINYINT},
|
||||||
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
|
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
|
||||||
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
|
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
|
||||||
freight_id = #{freightId,jdbcType=BIGINT},
|
freight_id = #{freightId,jdbcType=BIGINT},
|
||||||
strategy_type = #{strategyType,jdbcType=VARCHAR},
|
strategy_type = #{strategyType,jdbcType=VARCHAR},
|
||||||
strategy_id = #{strategyId,jdbcType=INTEGER},
|
strategy_id = #{strategyId,jdbcType=INTEGER},
|
||||||
is_vip = #{isVip,jdbcType=TINYINT},
|
is_vip = #{isVip,jdbcType=TINYINT},
|
||||||
is_delete = #{isDelete,jdbcType=TINYINT},
|
is_delete = #{isDelete,jdbcType=TINYINT},
|
||||||
created_at = #{createdAt,jdbcType=BIGINT},
|
created_at = #{createdAt,jdbcType=BIGINT},
|
||||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||||
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
|
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
|
||||||
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
|
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
|
||||||
sales_number = #{salesNumber,jdbcType=INTEGER},
|
sales_number = #{salesNumber,jdbcType=INTEGER},
|
||||||
thumb_count = #{thumbCount,jdbcType=INTEGER},
|
thumb_count = #{thumbCount,jdbcType=INTEGER},
|
||||||
store_count = #{storeCount,jdbcType=INTEGER},
|
store_count = #{storeCount,jdbcType=INTEGER},
|
||||||
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
|
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
|
||||||
furnish_express = #{furnishExpress,jdbcType=INTEGER},
|
furnish_express = #{furnishExpress,jdbcType=INTEGER},
|
||||||
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
|
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
|
||||||
furnish_vir = #{furnishVir,jdbcType=INTEGER},
|
furnish_vir = #{furnishVir,jdbcType=INTEGER},
|
||||||
is_combo = #{isCombo,jdbcType=TINYINT},
|
is_combo = #{isCombo,jdbcType=TINYINT},
|
||||||
is_show_cash = #{isShowCash,jdbcType=TINYINT},
|
is_show_cash = #{isShowCash,jdbcType=TINYINT},
|
||||||
is_show_mall = #{isShowMall,jdbcType=TINYINT},
|
is_show_mall = #{isShowMall,jdbcType=TINYINT},
|
||||||
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
|
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
|
||||||
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
|
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
|
||||||
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
|
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
|
||||||
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
||||||
enable_label = #{enableLabel,jdbcType=TINYINT},
|
enable_label = #{enableLabel,jdbcType=TINYINT},
|
||||||
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
|
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
|
||||||
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
|
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
|
||||||
group_category_id = #{groupCategoryId,jdbcType=VARCHAR},
|
group_category_id = #{groupCategoryId,jdbcType=VARCHAR},
|
||||||
stock_number = #{stockNumber,jdbcType=INTEGER}
|
stock_number = #{stockNumber,jdbcType=INTEGER},
|
||||||
|
warn_line = #{warnLine,jdbcType=INTEGER}
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</update>
|
</update>
|
||||||
<update id="upGroupRealSalesNumber">
|
<update id="upGroupRealSalesNumber">
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
<result column="strategy_price" jdbcType="DECIMAL" property="strategyPrice" />
|
<result column="strategy_price" jdbcType="DECIMAL" property="strategyPrice" />
|
||||||
<result column="stock_number" jdbcType="DOUBLE" property="stockNumber" />
|
<result column="stock_number" jdbcType="DOUBLE" property="stockNumber" />
|
||||||
<result column="cover_img" jdbcType="VARCHAR" property="coverImg" />
|
<result column="cover_img" jdbcType="VARCHAR" property="coverImg" />
|
||||||
<result column="warn_line" jdbcType="INTEGER" property="warnLine" />
|
|
||||||
<result column="weight" jdbcType="DOUBLE" property="weight" />
|
<result column="weight" jdbcType="DOUBLE" property="weight" />
|
||||||
<result column="volume" jdbcType="REAL" property="volume" />
|
<result column="volume" jdbcType="REAL" property="volume" />
|
||||||
<result column="real_sales_number" jdbcType="DOUBLE" property="realSalesNumber" />
|
<result column="real_sales_number" jdbcType="DOUBLE" property="realSalesNumber" />
|
||||||
@@ -70,7 +69,7 @@
|
|||||||
#{productId,jdbcType=VARCHAR}, #{originPrice,jdbcType=DECIMAL}, #{costPrice,jdbcType=DECIMAL},
|
#{productId,jdbcType=VARCHAR}, #{originPrice,jdbcType=DECIMAL}, #{costPrice,jdbcType=DECIMAL},
|
||||||
#{memberPrice,jdbcType=DECIMAL}, #{mealPrice,jdbcType=DECIMAL}, #{salePrice,jdbcType=DECIMAL},
|
#{memberPrice,jdbcType=DECIMAL}, #{mealPrice,jdbcType=DECIMAL}, #{salePrice,jdbcType=DECIMAL},
|
||||||
#{guidePrice,jdbcType=DECIMAL}, #{strategyPrice,jdbcType=DECIMAL}, #{stockNumber,jdbcType=DOUBLE},
|
#{guidePrice,jdbcType=DECIMAL}, #{strategyPrice,jdbcType=DECIMAL}, #{stockNumber,jdbcType=DOUBLE},
|
||||||
#{coverImg,jdbcType=VARCHAR}, #{warnLine,jdbcType=INTEGER}, #{weight,jdbcType=DOUBLE},
|
#{coverImg,jdbcType=VARCHAR}, #{weight,jdbcType=DOUBLE},
|
||||||
#{volume,jdbcType=REAL}, #{realSalesNumber,jdbcType=DOUBLE}, #{firstShared,jdbcType=DECIMAL},
|
#{volume,jdbcType=REAL}, #{realSalesNumber,jdbcType=DOUBLE}, #{firstShared,jdbcType=DECIMAL},
|
||||||
#{secondShared,jdbcType=DECIMAL}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
|
#{secondShared,jdbcType=DECIMAL}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
|
||||||
#{specInfo,jdbcType=LONGVARCHAR}, #{specSnap,jdbcType=LONGVARCHAR}),
|
#{specInfo,jdbcType=LONGVARCHAR}, #{specSnap,jdbcType=LONGVARCHAR}),
|
||||||
@@ -118,9 +117,6 @@
|
|||||||
<if test="coverImg != null">
|
<if test="coverImg != null">
|
||||||
cover_img,
|
cover_img,
|
||||||
</if>
|
</if>
|
||||||
<if test="warnLine != null">
|
|
||||||
warn_line,
|
|
||||||
</if>
|
|
||||||
<if test="weight != null">
|
<if test="weight != null">
|
||||||
weight,
|
weight,
|
||||||
</if>
|
</if>
|
||||||
@@ -192,9 +188,6 @@
|
|||||||
<if test="coverImg != null">
|
<if test="coverImg != null">
|
||||||
#{coverImg,jdbcType=VARCHAR},
|
#{coverImg,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="warnLine != null">
|
|
||||||
#{warnLine,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="weight != null">
|
<if test="weight != null">
|
||||||
#{weight,jdbcType=DOUBLE},
|
#{weight,jdbcType=DOUBLE},
|
||||||
</if>
|
</if>
|
||||||
@@ -266,9 +259,6 @@
|
|||||||
<if test="coverImg != null">
|
<if test="coverImg != null">
|
||||||
cover_img = #{coverImg,jdbcType=VARCHAR},
|
cover_img = #{coverImg,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="warnLine != null">
|
|
||||||
warn_line = #{warnLine,jdbcType=INTEGER},
|
|
||||||
</if>
|
|
||||||
<if test="weight != null">
|
<if test="weight != null">
|
||||||
weight = #{weight,jdbcType=DOUBLE},
|
weight = #{weight,jdbcType=DOUBLE},
|
||||||
</if>
|
</if>
|
||||||
@@ -316,7 +306,6 @@
|
|||||||
strategy_price = #{strategyPrice,jdbcType=DECIMAL},
|
strategy_price = #{strategyPrice,jdbcType=DECIMAL},
|
||||||
stock_number = #{stockNumber,jdbcType=DOUBLE},
|
stock_number = #{stockNumber,jdbcType=DOUBLE},
|
||||||
cover_img = #{coverImg,jdbcType=VARCHAR},
|
cover_img = #{coverImg,jdbcType=VARCHAR},
|
||||||
warn_line = #{warnLine,jdbcType=INTEGER},
|
|
||||||
weight = #{weight,jdbcType=DOUBLE},
|
weight = #{weight,jdbcType=DOUBLE},
|
||||||
volume = #{volume,jdbcType=REAL},
|
volume = #{volume,jdbcType=REAL},
|
||||||
real_sales_number = #{realSalesNumber,jdbcType=DOUBLE},
|
real_sales_number = #{realSalesNumber,jdbcType=DOUBLE},
|
||||||
@@ -343,7 +332,6 @@
|
|||||||
strategy_price = #{strategyPrice,jdbcType=DECIMAL},
|
strategy_price = #{strategyPrice,jdbcType=DECIMAL},
|
||||||
stock_number = #{stockNumber,jdbcType=DOUBLE},
|
stock_number = #{stockNumber,jdbcType=DOUBLE},
|
||||||
cover_img = #{coverImg,jdbcType=VARCHAR},
|
cover_img = #{coverImg,jdbcType=VARCHAR},
|
||||||
warn_line = #{warnLine,jdbcType=INTEGER},
|
|
||||||
weight = #{weight,jdbcType=DOUBLE},
|
weight = #{weight,jdbcType=DOUBLE},
|
||||||
volume = #{volume,jdbcType=REAL},
|
volume = #{volume,jdbcType=REAL},
|
||||||
real_sales_number = #{realSalesNumber,jdbcType=DOUBLE},
|
real_sales_number = #{realSalesNumber,jdbcType=DOUBLE},
|
||||||
|
|||||||
Reference in New Issue
Block a user