提交
This commit is contained in:
918
src/main/resources/mapper/TbProductMapper.xml
Normal file
918
src/main/resources/mapper/TbProductMapper.xml
Normal file
@@ -0,0 +1,918 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.TbProductMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbProduct">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="category_id" jdbcType="VARCHAR" property="categoryId" />
|
||||
<result column="spec_id" jdbcType="INTEGER" property="specId" />
|
||||
<result column="source_path" jdbcType="VARCHAR" property="sourcePath" />
|
||||
<result column="brand_id" jdbcType="INTEGER" property="brandId" />
|
||||
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
|
||||
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="short_title" jdbcType="VARCHAR" property="shortTitle" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="pack_fee" jdbcType="DECIMAL" property="packFee" />
|
||||
<result column="low_price" jdbcType="DECIMAL" property="lowPrice" />
|
||||
<result column="low_member_price" jdbcType="DECIMAL" property="lowMemberPrice" />
|
||||
<result column="unit_id" jdbcType="VARCHAR" property="unitId" />
|
||||
<result column="unit_snap" jdbcType="VARCHAR" property="unitSnap" />
|
||||
<result column="cover_img" jdbcType="VARCHAR" property="coverImg" />
|
||||
<result column="share_img" jdbcType="VARCHAR" property="shareImg" />
|
||||
<result column="video_cover_img" jdbcType="VARCHAR" property="videoCoverImg" />
|
||||
<result column="sort" jdbcType="INTEGER" property="sort" />
|
||||
<result column="limit_number" jdbcType="INTEGER" property="limitNumber" />
|
||||
<result column="product_score" jdbcType="INTEGER" property="productScore" />
|
||||
<result column="status" jdbcType="TINYINT" property="status" />
|
||||
<result column="fail_msg" jdbcType="VARCHAR" property="failMsg" />
|
||||
<result column="is_recommend" jdbcType="TINYINT" property="isRecommend" />
|
||||
<result column="is_hot" jdbcType="TINYINT" property="isHot" />
|
||||
<result column="is_new" jdbcType="TINYINT" property="isNew" />
|
||||
<result column="is_on_sale" jdbcType="TINYINT" property="isOnSale" />
|
||||
<result column="is_show" jdbcType="TINYINT" property="isShow" />
|
||||
<result column="type_enum" jdbcType="VARCHAR" property="typeEnum" />
|
||||
<result column="is_distribute" jdbcType="TINYINT" property="isDistribute" />
|
||||
<result column="is_del" jdbcType="TINYINT" property="isDel" />
|
||||
<result column="is_stock" jdbcType="TINYINT" property="isStock" />
|
||||
<result column="is_pause_sale" jdbcType="TINYINT" property="isPauseSale" />
|
||||
<result column="is_free_freight" jdbcType="TINYINT" property="isFreeFreight" />
|
||||
<result column="freight_id" jdbcType="BIGINT" property="freightId" />
|
||||
<result column="strategy_type" jdbcType="VARCHAR" property="strategyType" />
|
||||
<result column="strategy_id" jdbcType="INTEGER" property="strategyId" />
|
||||
<result column="is_vip" jdbcType="TINYINT" property="isVip" />
|
||||
<result column="is_delete" jdbcType="TINYINT" property="isDelete" />
|
||||
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
|
||||
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
|
||||
<result column="base_sales_number" jdbcType="DOUBLE" property="baseSalesNumber" />
|
||||
<result column="real_sales_number" jdbcType="INTEGER" property="realSalesNumber" />
|
||||
<result column="sales_number" jdbcType="INTEGER" property="salesNumber" />
|
||||
<result column="thumb_count" jdbcType="INTEGER" property="thumbCount" />
|
||||
<result column="store_count" jdbcType="INTEGER" property="storeCount" />
|
||||
<result column="furnish_meal" jdbcType="INTEGER" property="furnishMeal" />
|
||||
<result column="furnish_express" jdbcType="INTEGER" property="furnishExpress" />
|
||||
<result column="furnish_draw" jdbcType="INTEGER" property="furnishDraw" />
|
||||
<result column="furnish_vir" jdbcType="INTEGER" property="furnishVir" />
|
||||
<result column="is_combo" jdbcType="TINYINT" property="isCombo" />
|
||||
<result column="is_show_cash" jdbcType="TINYINT" property="isShowCash" />
|
||||
<result column="is_show_mall" jdbcType="TINYINT" property="isShowMall" />
|
||||
<result column="is_need_examine" jdbcType="TINYINT" property="isNeedExamine" />
|
||||
<result column="show_on_mall_status" jdbcType="TINYINT" property="showOnMallStatus" />
|
||||
<result column="show_on_mall_time" jdbcType="BIGINT" property="showOnMallTime" />
|
||||
<result column="show_on_mall_error_msg" jdbcType="VARCHAR" property="showOnMallErrorMsg" />
|
||||
<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" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||
<result column="images" jdbcType="LONGVARCHAR" property="images" />
|
||||
<result column="video" jdbcType="LONGVARCHAR" property="video" />
|
||||
<result column="notice" jdbcType="LONGVARCHAR" property="notice" />
|
||||
<result column="group_snap" jdbcType="LONGVARCHAR" property="groupSnap" />
|
||||
<result column="spec_info" jdbcType="LONGVARCHAR" property="specInfo" />
|
||||
<result column="select_spec" jdbcType="LONGVARCHAR" property="selectSpec" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, category_id, spec_id, source_path, brand_id, merchant_id, shop_id, name, short_title,
|
||||
type, pack_fee, low_price, low_member_price, unit_id, unit_snap, cover_img, share_img,
|
||||
video_cover_img, sort, limit_number, product_score, status, fail_msg, is_recommend,
|
||||
is_hot, is_new, is_on_sale, is_show, type_enum, is_distribute, is_del, is_stock,
|
||||
is_pause_sale, is_free_freight, freight_id, strategy_type, strategy_id, is_vip, is_delete,
|
||||
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
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
images, video, notice, group_snap, spec_info, select_spec
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from tb_product
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_product
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||
insert into tb_product (id, category_id, spec_id,
|
||||
source_path, brand_id, merchant_id,
|
||||
shop_id, name, short_title,
|
||||
type, pack_fee, low_price,
|
||||
low_member_price, unit_id, unit_snap,
|
||||
cover_img, share_img, video_cover_img,
|
||||
sort, limit_number, product_score,
|
||||
status, fail_msg, is_recommend,
|
||||
is_hot, is_new, is_on_sale,
|
||||
is_show, type_enum, is_distribute,
|
||||
is_del, is_stock, is_pause_sale,
|
||||
is_free_freight, freight_id, strategy_type,
|
||||
strategy_id, is_vip, is_delete,
|
||||
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,
|
||||
images, video, notice,
|
||||
group_snap, spec_info, select_spec
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{categoryId,jdbcType=VARCHAR}, #{specId,jdbcType=INTEGER},
|
||||
#{sourcePath,jdbcType=VARCHAR}, #{brandId,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR},
|
||||
#{shopId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{shortTitle,jdbcType=VARCHAR},
|
||||
#{type,jdbcType=VARCHAR}, #{packFee,jdbcType=DECIMAL}, #{lowPrice,jdbcType=DECIMAL},
|
||||
#{lowMemberPrice,jdbcType=DECIMAL}, #{unitId,jdbcType=VARCHAR}, #{unitSnap,jdbcType=VARCHAR},
|
||||
#{coverImg,jdbcType=VARCHAR}, #{shareImg,jdbcType=VARCHAR}, #{videoCoverImg,jdbcType=VARCHAR},
|
||||
#{sort,jdbcType=INTEGER}, #{limitNumber,jdbcType=INTEGER}, #{productScore,jdbcType=INTEGER},
|
||||
#{status,jdbcType=TINYINT}, #{failMsg,jdbcType=VARCHAR}, #{isRecommend,jdbcType=TINYINT},
|
||||
#{isHot,jdbcType=TINYINT}, #{isNew,jdbcType=TINYINT}, #{isOnSale,jdbcType=TINYINT},
|
||||
#{isShow,jdbcType=TINYINT}, #{typeEnum,jdbcType=VARCHAR}, #{isDistribute,jdbcType=TINYINT},
|
||||
#{isDel,jdbcType=TINYINT}, #{isStock,jdbcType=TINYINT}, #{isPauseSale,jdbcType=TINYINT},
|
||||
#{isFreeFreight,jdbcType=TINYINT}, #{freightId,jdbcType=BIGINT}, #{strategyType,jdbcType=VARCHAR},
|
||||
#{strategyId,jdbcType=INTEGER}, #{isVip,jdbcType=TINYINT}, #{isDelete,jdbcType=TINYINT},
|
||||
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{baseSalesNumber,jdbcType=DOUBLE},
|
||||
#{realSalesNumber,jdbcType=INTEGER}, #{salesNumber,jdbcType=INTEGER}, #{thumbCount,jdbcType=INTEGER},
|
||||
#{storeCount,jdbcType=INTEGER}, #{furnishMeal,jdbcType=INTEGER}, #{furnishExpress,jdbcType=INTEGER},
|
||||
#{furnishDraw,jdbcType=INTEGER}, #{furnishVir,jdbcType=INTEGER}, #{isCombo,jdbcType=TINYINT},
|
||||
#{isShowCash,jdbcType=TINYINT}, #{isShowMall,jdbcType=TINYINT}, #{isNeedExamine,jdbcType=TINYINT},
|
||||
#{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}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||
insert into tb_product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="categoryId != null">
|
||||
category_id,
|
||||
</if>
|
||||
<if test="specId != null">
|
||||
spec_id,
|
||||
</if>
|
||||
<if test="sourcePath != null">
|
||||
source_path,
|
||||
</if>
|
||||
<if test="brandId != null">
|
||||
brand_id,
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
merchant_id,
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="shortTitle != null">
|
||||
short_title,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="packFee != null">
|
||||
pack_fee,
|
||||
</if>
|
||||
<if test="lowPrice != null">
|
||||
low_price,
|
||||
</if>
|
||||
<if test="lowMemberPrice != null">
|
||||
low_member_price,
|
||||
</if>
|
||||
<if test="unitId != null">
|
||||
unit_id,
|
||||
</if>
|
||||
<if test="unitSnap != null">
|
||||
unit_snap,
|
||||
</if>
|
||||
<if test="coverImg != null">
|
||||
cover_img,
|
||||
</if>
|
||||
<if test="shareImg != null">
|
||||
share_img,
|
||||
</if>
|
||||
<if test="videoCoverImg != null">
|
||||
video_cover_img,
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort,
|
||||
</if>
|
||||
<if test="limitNumber != null">
|
||||
limit_number,
|
||||
</if>
|
||||
<if test="productScore != null">
|
||||
product_score,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="failMsg != null">
|
||||
fail_msg,
|
||||
</if>
|
||||
<if test="isRecommend != null">
|
||||
is_recommend,
|
||||
</if>
|
||||
<if test="isHot != null">
|
||||
is_hot,
|
||||
</if>
|
||||
<if test="isNew != null">
|
||||
is_new,
|
||||
</if>
|
||||
<if test="isOnSale != null">
|
||||
is_on_sale,
|
||||
</if>
|
||||
<if test="isShow != null">
|
||||
is_show,
|
||||
</if>
|
||||
<if test="typeEnum != null">
|
||||
type_enum,
|
||||
</if>
|
||||
<if test="isDistribute != null">
|
||||
is_distribute,
|
||||
</if>
|
||||
<if test="isDel != null">
|
||||
is_del,
|
||||
</if>
|
||||
<if test="isStock != null">
|
||||
is_stock,
|
||||
</if>
|
||||
<if test="isPauseSale != null">
|
||||
is_pause_sale,
|
||||
</if>
|
||||
<if test="isFreeFreight != null">
|
||||
is_free_freight,
|
||||
</if>
|
||||
<if test="freightId != null">
|
||||
freight_id,
|
||||
</if>
|
||||
<if test="strategyType != null">
|
||||
strategy_type,
|
||||
</if>
|
||||
<if test="strategyId != null">
|
||||
strategy_id,
|
||||
</if>
|
||||
<if test="isVip != null">
|
||||
is_vip,
|
||||
</if>
|
||||
<if test="isDelete != null">
|
||||
is_delete,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="baseSalesNumber != null">
|
||||
base_sales_number,
|
||||
</if>
|
||||
<if test="realSalesNumber != null">
|
||||
real_sales_number,
|
||||
</if>
|
||||
<if test="salesNumber != null">
|
||||
sales_number,
|
||||
</if>
|
||||
<if test="thumbCount != null">
|
||||
thumb_count,
|
||||
</if>
|
||||
<if test="storeCount != null">
|
||||
store_count,
|
||||
</if>
|
||||
<if test="furnishMeal != null">
|
||||
furnish_meal,
|
||||
</if>
|
||||
<if test="furnishExpress != null">
|
||||
furnish_express,
|
||||
</if>
|
||||
<if test="furnishDraw != null">
|
||||
furnish_draw,
|
||||
</if>
|
||||
<if test="furnishVir != null">
|
||||
furnish_vir,
|
||||
</if>
|
||||
<if test="isCombo != null">
|
||||
is_combo,
|
||||
</if>
|
||||
<if test="isShowCash != null">
|
||||
is_show_cash,
|
||||
</if>
|
||||
<if test="isShowMall != null">
|
||||
is_show_mall,
|
||||
</if>
|
||||
<if test="isNeedExamine != null">
|
||||
is_need_examine,
|
||||
</if>
|
||||
<if test="showOnMallStatus != null">
|
||||
show_on_mall_status,
|
||||
</if>
|
||||
<if test="showOnMallTime != null">
|
||||
show_on_mall_time,
|
||||
</if>
|
||||
<if test="showOnMallErrorMsg != null">
|
||||
show_on_mall_error_msg,
|
||||
</if>
|
||||
<if test="enableLabel != null">
|
||||
enable_label,
|
||||
</if>
|
||||
<if test="taxConfigId != null">
|
||||
tax_config_id,
|
||||
</if>
|
||||
<if test="specTableHeaders != null">
|
||||
spec_table_headers,
|
||||
</if>
|
||||
<if test="images != null">
|
||||
images,
|
||||
</if>
|
||||
<if test="video != null">
|
||||
video,
|
||||
</if>
|
||||
<if test="notice != null">
|
||||
notice,
|
||||
</if>
|
||||
<if test="groupSnap != null">
|
||||
group_snap,
|
||||
</if>
|
||||
<if test="specInfo != null">
|
||||
spec_info,
|
||||
</if>
|
||||
<if test="selectSpec != null">
|
||||
select_spec,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="categoryId != null">
|
||||
#{categoryId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="specId != null">
|
||||
#{specId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sourcePath != null">
|
||||
#{sourcePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="brandId != null">
|
||||
#{brandId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
#{merchantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
#{shopId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shortTitle != null">
|
||||
#{shortTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="packFee != null">
|
||||
#{packFee,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="lowPrice != null">
|
||||
#{lowPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="lowMemberPrice != null">
|
||||
#{lowMemberPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="unitId != null">
|
||||
#{unitId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="unitSnap != null">
|
||||
#{unitSnap,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="coverImg != null">
|
||||
#{coverImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shareImg != null">
|
||||
#{shareImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="videoCoverImg != null">
|
||||
#{videoCoverImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
#{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="limitNumber != null">
|
||||
#{limitNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="productScore != null">
|
||||
#{productScore,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="failMsg != null">
|
||||
#{failMsg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isRecommend != null">
|
||||
#{isRecommend,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isHot != null">
|
||||
#{isHot,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isNew != null">
|
||||
#{isNew,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isOnSale != null">
|
||||
#{isOnSale,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShow != null">
|
||||
#{isShow,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="typeEnum != null">
|
||||
#{typeEnum,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isDistribute != null">
|
||||
#{isDistribute,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isDel != null">
|
||||
#{isDel,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isStock != null">
|
||||
#{isStock,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isPauseSale != null">
|
||||
#{isPauseSale,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isFreeFreight != null">
|
||||
#{isFreeFreight,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="freightId != null">
|
||||
#{freightId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="strategyType != null">
|
||||
#{strategyType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="strategyId != null">
|
||||
#{strategyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isVip != null">
|
||||
#{isVip,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isDelete != null">
|
||||
#{isDelete,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="baseSalesNumber != null">
|
||||
#{baseSalesNumber,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="realSalesNumber != null">
|
||||
#{realSalesNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="salesNumber != null">
|
||||
#{salesNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="thumbCount != null">
|
||||
#{thumbCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="storeCount != null">
|
||||
#{storeCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishMeal != null">
|
||||
#{furnishMeal,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishExpress != null">
|
||||
#{furnishExpress,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishDraw != null">
|
||||
#{furnishDraw,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishVir != null">
|
||||
#{furnishVir,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isCombo != null">
|
||||
#{isCombo,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShowCash != null">
|
||||
#{isShowCash,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShowMall != null">
|
||||
#{isShowMall,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isNeedExamine != null">
|
||||
#{isNeedExamine,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="showOnMallStatus != null">
|
||||
#{showOnMallStatus,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="showOnMallTime != null">
|
||||
#{showOnMallTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="showOnMallErrorMsg != null">
|
||||
#{showOnMallErrorMsg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="enableLabel != null">
|
||||
#{enableLabel,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="taxConfigId != null">
|
||||
#{taxConfigId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="specTableHeaders != null">
|
||||
#{specTableHeaders,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="images != null">
|
||||
#{images,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="video != null">
|
||||
#{video,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="notice != null">
|
||||
#{notice,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="groupSnap != null">
|
||||
#{groupSnap,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="specInfo != null">
|
||||
#{specInfo,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="selectSpec != null">
|
||||
#{selectSpec,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||
update tb_product
|
||||
<set>
|
||||
<if test="categoryId != null">
|
||||
category_id = #{categoryId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="specId != null">
|
||||
spec_id = #{specId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sourcePath != null">
|
||||
source_path = #{sourcePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="brandId != null">
|
||||
brand_id = #{brandId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shortTitle != null">
|
||||
short_title = #{shortTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="packFee != null">
|
||||
pack_fee = #{packFee,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="lowPrice != null">
|
||||
low_price = #{lowPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="lowMemberPrice != null">
|
||||
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="unitId != null">
|
||||
unit_id = #{unitId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="unitSnap != null">
|
||||
unit_snap = #{unitSnap,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="coverImg != null">
|
||||
cover_img = #{coverImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shareImg != null">
|
||||
share_img = #{shareImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="videoCoverImg != null">
|
||||
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="limitNumber != null">
|
||||
limit_number = #{limitNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="productScore != null">
|
||||
product_score = #{productScore,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="failMsg != null">
|
||||
fail_msg = #{failMsg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isRecommend != null">
|
||||
is_recommend = #{isRecommend,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isHot != null">
|
||||
is_hot = #{isHot,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isNew != null">
|
||||
is_new = #{isNew,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isOnSale != null">
|
||||
is_on_sale = #{isOnSale,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShow != null">
|
||||
is_show = #{isShow,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="typeEnum != null">
|
||||
type_enum = #{typeEnum,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isDistribute != null">
|
||||
is_distribute = #{isDistribute,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isDel != null">
|
||||
is_del = #{isDel,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isStock != null">
|
||||
is_stock = #{isStock,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isPauseSale != null">
|
||||
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isFreeFreight != null">
|
||||
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="freightId != null">
|
||||
freight_id = #{freightId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="strategyType != null">
|
||||
strategy_type = #{strategyType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="strategyId != null">
|
||||
strategy_id = #{strategyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isVip != null">
|
||||
is_vip = #{isVip,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isDelete != null">
|
||||
is_delete = #{isDelete,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="baseSalesNumber != null">
|
||||
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="realSalesNumber != null">
|
||||
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="salesNumber != null">
|
||||
sales_number = #{salesNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="thumbCount != null">
|
||||
thumb_count = #{thumbCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="storeCount != null">
|
||||
store_count = #{storeCount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishMeal != null">
|
||||
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishExpress != null">
|
||||
furnish_express = #{furnishExpress,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishDraw != null">
|
||||
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="furnishVir != null">
|
||||
furnish_vir = #{furnishVir,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isCombo != null">
|
||||
is_combo = #{isCombo,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShowCash != null">
|
||||
is_show_cash = #{isShowCash,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isShowMall != null">
|
||||
is_show_mall = #{isShowMall,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="isNeedExamine != null">
|
||||
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="showOnMallStatus != null">
|
||||
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="showOnMallTime != null">
|
||||
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="showOnMallErrorMsg != null">
|
||||
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="enableLabel != null">
|
||||
enable_label = #{enableLabel,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="taxConfigId != null">
|
||||
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="specTableHeaders != null">
|
||||
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="images != null">
|
||||
images = #{images,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="video != null">
|
||||
video = #{video,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="notice != null">
|
||||
notice = #{notice,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="groupSnap != null">
|
||||
group_snap = #{groupSnap,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="specInfo != null">
|
||||
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="selectSpec != null">
|
||||
select_spec = #{selectSpec,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
||||
update tb_product
|
||||
set category_id = #{categoryId,jdbcType=VARCHAR},
|
||||
spec_id = #{specId,jdbcType=INTEGER},
|
||||
source_path = #{sourcePath,jdbcType=VARCHAR},
|
||||
brand_id = #{brandId,jdbcType=INTEGER},
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
short_title = #{shortTitle,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
pack_fee = #{packFee,jdbcType=DECIMAL},
|
||||
low_price = #{lowPrice,jdbcType=DECIMAL},
|
||||
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
|
||||
unit_id = #{unitId,jdbcType=VARCHAR},
|
||||
unit_snap = #{unitSnap,jdbcType=VARCHAR},
|
||||
cover_img = #{coverImg,jdbcType=VARCHAR},
|
||||
share_img = #{shareImg,jdbcType=VARCHAR},
|
||||
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
limit_number = #{limitNumber,jdbcType=INTEGER},
|
||||
product_score = #{productScore,jdbcType=INTEGER},
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
fail_msg = #{failMsg,jdbcType=VARCHAR},
|
||||
is_recommend = #{isRecommend,jdbcType=TINYINT},
|
||||
is_hot = #{isHot,jdbcType=TINYINT},
|
||||
is_new = #{isNew,jdbcType=TINYINT},
|
||||
is_on_sale = #{isOnSale,jdbcType=TINYINT},
|
||||
is_show = #{isShow,jdbcType=TINYINT},
|
||||
type_enum = #{typeEnum,jdbcType=VARCHAR},
|
||||
is_distribute = #{isDistribute,jdbcType=TINYINT},
|
||||
is_del = #{isDel,jdbcType=TINYINT},
|
||||
is_stock = #{isStock,jdbcType=TINYINT},
|
||||
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
|
||||
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
|
||||
freight_id = #{freightId,jdbcType=BIGINT},
|
||||
strategy_type = #{strategyType,jdbcType=VARCHAR},
|
||||
strategy_id = #{strategyId,jdbcType=INTEGER},
|
||||
is_vip = #{isVip,jdbcType=TINYINT},
|
||||
is_delete = #{isDelete,jdbcType=TINYINT},
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
|
||||
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
|
||||
sales_number = #{salesNumber,jdbcType=INTEGER},
|
||||
thumb_count = #{thumbCount,jdbcType=INTEGER},
|
||||
store_count = #{storeCount,jdbcType=INTEGER},
|
||||
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
|
||||
furnish_express = #{furnishExpress,jdbcType=INTEGER},
|
||||
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
|
||||
furnish_vir = #{furnishVir,jdbcType=INTEGER},
|
||||
is_combo = #{isCombo,jdbcType=TINYINT},
|
||||
is_show_cash = #{isShowCash,jdbcType=TINYINT},
|
||||
is_show_mall = #{isShowMall,jdbcType=TINYINT},
|
||||
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
|
||||
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
|
||||
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
|
||||
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},
|
||||
images = #{images,jdbcType=LONGVARCHAR},
|
||||
video = #{video,jdbcType=LONGVARCHAR},
|
||||
notice = #{notice,jdbcType=LONGVARCHAR},
|
||||
group_snap = #{groupSnap,jdbcType=LONGVARCHAR},
|
||||
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
|
||||
select_spec = #{selectSpec,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProduct">
|
||||
update tb_product
|
||||
set category_id = #{categoryId,jdbcType=VARCHAR},
|
||||
spec_id = #{specId,jdbcType=INTEGER},
|
||||
source_path = #{sourcePath,jdbcType=VARCHAR},
|
||||
brand_id = #{brandId,jdbcType=INTEGER},
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
shop_id = #{shopId,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
short_title = #{shortTitle,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
pack_fee = #{packFee,jdbcType=DECIMAL},
|
||||
low_price = #{lowPrice,jdbcType=DECIMAL},
|
||||
low_member_price = #{lowMemberPrice,jdbcType=DECIMAL},
|
||||
unit_id = #{unitId,jdbcType=VARCHAR},
|
||||
unit_snap = #{unitSnap,jdbcType=VARCHAR},
|
||||
cover_img = #{coverImg,jdbcType=VARCHAR},
|
||||
share_img = #{shareImg,jdbcType=VARCHAR},
|
||||
video_cover_img = #{videoCoverImg,jdbcType=VARCHAR},
|
||||
sort = #{sort,jdbcType=INTEGER},
|
||||
limit_number = #{limitNumber,jdbcType=INTEGER},
|
||||
product_score = #{productScore,jdbcType=INTEGER},
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
fail_msg = #{failMsg,jdbcType=VARCHAR},
|
||||
is_recommend = #{isRecommend,jdbcType=TINYINT},
|
||||
is_hot = #{isHot,jdbcType=TINYINT},
|
||||
is_new = #{isNew,jdbcType=TINYINT},
|
||||
is_on_sale = #{isOnSale,jdbcType=TINYINT},
|
||||
is_show = #{isShow,jdbcType=TINYINT},
|
||||
type_enum = #{typeEnum,jdbcType=VARCHAR},
|
||||
is_distribute = #{isDistribute,jdbcType=TINYINT},
|
||||
is_del = #{isDel,jdbcType=TINYINT},
|
||||
is_stock = #{isStock,jdbcType=TINYINT},
|
||||
is_pause_sale = #{isPauseSale,jdbcType=TINYINT},
|
||||
is_free_freight = #{isFreeFreight,jdbcType=TINYINT},
|
||||
freight_id = #{freightId,jdbcType=BIGINT},
|
||||
strategy_type = #{strategyType,jdbcType=VARCHAR},
|
||||
strategy_id = #{strategyId,jdbcType=INTEGER},
|
||||
is_vip = #{isVip,jdbcType=TINYINT},
|
||||
is_delete = #{isDelete,jdbcType=TINYINT},
|
||||
created_at = #{createdAt,jdbcType=BIGINT},
|
||||
updated_at = #{updatedAt,jdbcType=BIGINT},
|
||||
base_sales_number = #{baseSalesNumber,jdbcType=DOUBLE},
|
||||
real_sales_number = #{realSalesNumber,jdbcType=INTEGER},
|
||||
sales_number = #{salesNumber,jdbcType=INTEGER},
|
||||
thumb_count = #{thumbCount,jdbcType=INTEGER},
|
||||
store_count = #{storeCount,jdbcType=INTEGER},
|
||||
furnish_meal = #{furnishMeal,jdbcType=INTEGER},
|
||||
furnish_express = #{furnishExpress,jdbcType=INTEGER},
|
||||
furnish_draw = #{furnishDraw,jdbcType=INTEGER},
|
||||
furnish_vir = #{furnishVir,jdbcType=INTEGER},
|
||||
is_combo = #{isCombo,jdbcType=TINYINT},
|
||||
is_show_cash = #{isShowCash,jdbcType=TINYINT},
|
||||
is_show_mall = #{isShowMall,jdbcType=TINYINT},
|
||||
is_need_examine = #{isNeedExamine,jdbcType=TINYINT},
|
||||
show_on_mall_status = #{showOnMallStatus,jdbcType=TINYINT},
|
||||
show_on_mall_time = #{showOnMallTime,jdbcType=BIGINT},
|
||||
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}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<select id="selectByShopId" resultMap="ResultMapWithBLOBs">
|
||||
select * from tb_product where shop_id=#{shopId} and status=1 and is_show_cash = 1
|
||||
<if test="commdityName != null and commdityName!='' ">
|
||||
and name like CONCAT('%',#{commdityName},'%')
|
||||
</if>
|
||||
order by `sort` asc
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectByShopIdAndShopType" resultMap="ResultMapWithBLOBs">
|
||||
|
||||
select * from tb_product where shop_id=#{shopId} and status=1 and category_id=#{categoryId} and is_show_cash = 1
|
||||
|
||||
<if test="commdityName != null and commdityName!='' ">
|
||||
and name like CONCAT('%',#{commdityName},'%')
|
||||
</if>
|
||||
|
||||
order by `sort` asc
|
||||
|
||||
</select>
|
||||
|
||||
<select id="countOrderByshopIdAndProductId" resultType="INTEGER">
|
||||
SELECT
|
||||
IFNULL(sum( number ) ,0)
|
||||
FROM
|
||||
tb_cashier_cart
|
||||
WHERE
|
||||
shop_id = #{shopId}
|
||||
AND product_id = #{productId}
|
||||
AND `status` = 'create'
|
||||
and master_id = #{masterId}
|
||||
group by shop_id,product_id
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user