Merge branch '1.0.1' into dev

This commit is contained in:
韩鹏辉
2024-06-26 14:28:36 +08:00
32 changed files with 1440 additions and 23 deletions

View File

@@ -102,7 +102,7 @@
and uuid = #{uuid}
</if>
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart" useGeneratedKeys="true" keyProperty="id">
insert into tb_cashier_cart (id, master_id, order_id,
ref_order_id, total_amount, product_id,
cover_img, is_sku, sku_id,

View File

@@ -0,0 +1,178 @@
<?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.TbConsInfoFlowMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbConsInfoFlow">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="cons_id" jdbcType="INTEGER" property="consId" />
<result column="con_name" jdbcType="VARCHAR" property="conName" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="balance" jdbcType="DECIMAL" property="balance" />
<result column="biz_code" jdbcType="VARCHAR" property="bizCode" />
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
<result column="biz_type" jdbcType="VARCHAR" property="bizType" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, cons_id, con_name, amount, balance, biz_code, biz_name, biz_type, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_cons_info_flow
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_cons_info_flow
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbConsInfoFlow">
insert into tb_cons_info_flow (id, shop_id, cons_id,
con_name, amount, balance,
biz_code, biz_name, biz_type,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{consId,jdbcType=INTEGER},
#{conName,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{balance,jdbcType=DECIMAL},
#{bizCode,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR}, #{bizType,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbConsInfoFlow">
insert into tb_cons_info_flow
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="consId != null">
cons_id,
</if>
<if test="conName != null">
con_name,
</if>
<if test="amount != null">
amount,
</if>
<if test="balance != null">
balance,
</if>
<if test="bizCode != null">
biz_code,
</if>
<if test="bizName != null">
biz_name,
</if>
<if test="bizType != null">
biz_type,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="consId != null">
#{consId,jdbcType=INTEGER},
</if>
<if test="conName != null">
#{conName,jdbcType=VARCHAR},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="balance != null">
#{balance,jdbcType=DECIMAL},
</if>
<if test="bizCode != null">
#{bizCode,jdbcType=VARCHAR},
</if>
<if test="bizName != null">
#{bizName,jdbcType=VARCHAR},
</if>
<if test="bizType != null">
#{bizType,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbConsInfoFlow">
update tb_cons_info_flow
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="consId != null">
cons_id = #{consId,jdbcType=INTEGER},
</if>
<if test="conName != null">
con_name = #{conName,jdbcType=VARCHAR},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="balance != null">
balance = #{balance,jdbcType=DECIMAL},
</if>
<if test="bizCode != null">
biz_code = #{bizCode,jdbcType=VARCHAR},
</if>
<if test="bizName != null">
biz_name = #{bizName,jdbcType=VARCHAR},
</if>
<if test="bizType != null">
biz_type = #{bizType,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbConsInfoFlow">
update tb_cons_info_flow
set shop_id = #{shopId,jdbcType=INTEGER},
cons_id = #{consId,jdbcType=INTEGER},
con_name = #{conName,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL},
balance = #{balance,jdbcType=DECIMAL},
biz_code = #{bizCode,jdbcType=VARCHAR},
biz_name = #{bizName,jdbcType=VARCHAR},
biz_type = #{bizType,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="insertBatch">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
insert into tb_cons_info_flow (shop_id, cons_id,
con_name, amount, balance,
biz_code, biz_name, biz_type,
create_time, update_time)
values #{item.shopId,jdbcType=INTEGER}, #{item.consId,jdbcType=INTEGER},
#{item.conName,jdbcType=VARCHAR}, #{item.amount,jdbcType=DECIMAL}, #{item.balance,jdbcType=DECIMAL},
#{item.bizCode,jdbcType=VARCHAR}, #{item.bizName,jdbcType=VARCHAR}, #{item.bizType,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP})
</foreach>
</insert>
</mapper>

View File

@@ -0,0 +1,187 @@
<?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.TbConsInfoMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbConsInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="con_type_id" jdbcType="INTEGER" property="conTypeId" />
<result column="con_type_name" jdbcType="VARCHAR" property="conTypeName" />
<result column="con_code" jdbcType="VARCHAR" property="conCode" />
<result column="con_name" jdbcType="VARCHAR" property="conName" />
<result column="stock_number" jdbcType="DECIMAL" property="stockNumber" />
<result column="con_unit" jdbcType="VARCHAR" property="conUnit" />
<result column="surplus_stock" jdbcType="DECIMAL" property="surplusStock" />
<result column="laster_in_stock" jdbcType="DECIMAL" property="lasterInStock" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, con_type_id, con_type_name, con_code, con_name, stock_number, con_unit,
surplus_stock, laster_in_stock, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_cons_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_cons_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbConsInfo">
insert into tb_cons_info (id, shop_id, con_type_id,
con_type_name, con_code, con_name,
stock_number, con_unit, surplus_stock,
laster_in_stock, create_time, update_time
)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{conTypeId,jdbcType=INTEGER},
#{conTypeName,jdbcType=VARCHAR}, #{conCode,jdbcType=VARCHAR}, #{conName,jdbcType=VARCHAR},
#{stockNumber,jdbcType=DECIMAL}, #{conUnit,jdbcType=VARCHAR}, #{surplusStock,jdbcType=DECIMAL},
#{lasterInStock,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbConsInfo">
insert into tb_cons_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="conTypeId != null">
con_type_id,
</if>
<if test="conTypeName != null">
con_type_name,
</if>
<if test="conCode != null">
con_code,
</if>
<if test="conName != null">
con_name,
</if>
<if test="stockNumber != null">
stock_number,
</if>
<if test="conUnit != null">
con_unit,
</if>
<if test="surplusStock != null">
surplus_stock,
</if>
<if test="lasterInStock != null">
laster_in_stock,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="conTypeId != null">
#{conTypeId,jdbcType=INTEGER},
</if>
<if test="conTypeName != null">
#{conTypeName,jdbcType=VARCHAR},
</if>
<if test="conCode != null">
#{conCode,jdbcType=VARCHAR},
</if>
<if test="conName != null">
#{conName,jdbcType=VARCHAR},
</if>
<if test="stockNumber != null">
#{stockNumber,jdbcType=DECIMAL},
</if>
<if test="conUnit != null">
#{conUnit,jdbcType=VARCHAR},
</if>
<if test="surplusStock != null">
#{surplusStock,jdbcType=DECIMAL},
</if>
<if test="lasterInStock != null">
#{lasterInStock,jdbcType=DECIMAL},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbConsInfo">
update tb_cons_info
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="conTypeId != null">
con_type_id = #{conTypeId,jdbcType=INTEGER},
</if>
<if test="conTypeName != null">
con_type_name = #{conTypeName,jdbcType=VARCHAR},
</if>
<if test="conCode != null">
con_code = #{conCode,jdbcType=VARCHAR},
</if>
<if test="conName != null">
con_name = #{conName,jdbcType=VARCHAR},
</if>
<if test="stockNumber != null">
stock_number = #{stockNumber,jdbcType=DECIMAL},
</if>
<if test="conUnit != null">
con_unit = #{conUnit,jdbcType=VARCHAR},
</if>
<if test="surplusStock != null">
surplus_stock = #{surplusStock,jdbcType=DECIMAL},
</if>
<if test="lasterInStock != null">
laster_in_stock = #{lasterInStock,jdbcType=DECIMAL},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbConsInfo">
update tb_cons_info
set shop_id = #{shopId,jdbcType=INTEGER},
con_type_id = #{conTypeId,jdbcType=INTEGER},
con_type_name = #{conTypeName,jdbcType=VARCHAR},
con_code = #{conCode,jdbcType=VARCHAR},
con_name = #{conName,jdbcType=VARCHAR},
stock_number = #{stockNumber,jdbcType=DECIMAL},
con_unit = #{conUnit,jdbcType=VARCHAR},
surplus_stock = #{surplusStock,jdbcType=DECIMAL},
laster_in_stock = #{lasterInStock,jdbcType=DECIMAL},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="batchStock">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update tb_cons_info
set stock_number= stock_number- #{item.amount},
update_time = now()
where id = #{item.id}
</foreach>
</update>
</mapper>

View File

@@ -0,0 +1,93 @@
<?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.TbCouponCategoryMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbCouponCategory">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
</resultMap>
<sql id="Base_Column_List">
id, name, create_time, update_time, status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_coupon_category
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_coupon_category
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbCouponCategory">
insert into tb_coupon_category (id, name, create_time,
update_time, status)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbCouponCategory">
insert into tb_coupon_category
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbCouponCategory">
update tb_coupon_category
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbCouponCategory">
update tb_coupon_category
set name = #{name,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -65,11 +65,24 @@
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAllByShop" resultType="com.chaozhanggui.system.cashierservice.entity.po.OrderPo">
select toi.created_at as createAt,toi.id,toi.order_no as orderNo,toi.order_amount as orderAmount,count(*) as
productNum,toi.order_type as orderType,
ifnull(TRIM(TRAILING ', ' FROM GROUP_CONCAT(tod.product_name ORDER BY tod.id SEPARATOR ', ')),'') AS productName,
toi.status from tb_order_info toi left join tb_order_detail tod on tod.order_id = toi.id
where toi.shop_id = #{shopId}
SELECT
toi.created_at AS createAt,
toi.id,
toi.order_no AS orderNo,
toi.order_amount AS orderAmount,
count(*) AS productNum,
toi.order_type AS orderType,
GROUP_CONCAT(tod.product_name) AS productName,
toi.STATUS,
toi.out_number AS outNumber,
toi.table_name AS tableName
FROM
tb_order_info toi
LEFT JOIN tb_order_detail tod ON tod.order_id = toi.id
WHERE
toi.shop_id = #{shopId}
<choose>
<when test="orderType == 'return'">
and toi.order_type = 'return' and toi.status in ('refund','closed')
@@ -87,7 +100,7 @@
<if test="orderNo != null and orderNo != ''">
and toi.order_no = #{orderNo}
</if>
group by toi.shop_id,toi.order_no
group by toi.id,toi.shop_id
order by toi.id desc
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
@@ -566,4 +579,17 @@ select * from tb_order_info where trade_day = #{day} and table_id = #{masterId}
GROUP BY
d.order_id
</select>
<select id="selectSkuByOrderId" resultType="com.chaozhanggui.system.cashierservice.entity.po.SkuInfoPo">
SELECT
d.product_name AS productName,
d.num,
d.product_sku_name AS productSkuName,
c.category_id AS categoryId
FROM
tb_order_detail d
LEFT JOIN tb_cashier_cart c ON d.order_id = c.order_id
AND d.product_sku_id = c.sku_id
where c.order_id=#{orderId}
</select>
</mapper>

View File

@@ -0,0 +1,110 @@
<?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.TbProskuConMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbProskuCon">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="product_sku_id" jdbcType="INTEGER" property="productSkuId" />
<result column="con_info_id" jdbcType="INTEGER" property="conInfoId" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, product_sku_id, con_info_id, status, create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_prosku_con
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_prosku_con
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProskuCon">
insert into tb_prosku_con (id, shop_id, product_sku_id,
con_info_id, status, create_time
)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{productSkuId,jdbcType=INTEGER},
#{conInfoId,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProskuCon">
insert into tb_prosku_con
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="productSkuId != null">
product_sku_id,
</if>
<if test="conInfoId != null">
con_info_id,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="productSkuId != null">
#{productSkuId,jdbcType=INTEGER},
</if>
<if test="conInfoId != null">
#{conInfoId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProskuCon">
update tb_prosku_con
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="productSkuId != null">
product_sku_id = #{productSkuId,jdbcType=INTEGER},
</if>
<if test="conInfoId != null">
con_info_id = #{conInfoId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProskuCon">
update tb_prosku_con
set shop_id = #{shopId,jdbcType=INTEGER},
product_sku_id = #{productSkuId,jdbcType=INTEGER},
con_info_id = #{conInfoId,jdbcType=INTEGER},
status = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectBySkuIdAndShopId" resultMap="BaseResultMap">
select * from tb_prosku_con where product_sku_id=#{shopId} and shop_id=#{shopId} and status=1
</select>
</mapper>

View File

@@ -572,4 +572,8 @@
<select id="selectByCardNo" resultMap="BaseResultMap">
select * from tb_user_info where card_no=#{cardNo}
</select>
<select id="selectCountByPhone" resultType="int">
select count(0) from tb_user_info where telephone=#{phone,jdbcType=VARCHAR}
</select>
</mapper>