Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java
#	src/main/java/com/chaozhanggui/system/cashierservice/entity/vo/CartVo.java
#	src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java
This commit is contained in:
2024-09-13 10:06:15 +08:00
88 changed files with 3100 additions and 654 deletions

View File

@@ -116,6 +116,12 @@
</update>
<select id="selectByAmount" resultMap="BaseResultMap">
select * from tb_activate where shop_id=#{shopId} and is_del=0 and min_num &lt;= #{amount} and max_num &gt;= #{amount}
select *
from tb_activate
where shop_id = #{shopId}
and is_del = 0
and min_num &lt;= #{amount}
and max_num &gt;= #{amount}
ORDER BY max_num desc limit 1
</select>
</mapper>

View File

@@ -58,6 +58,9 @@
<if test="uuid != null">
and uuid = #{uuid}
</if>
<if test="tableId != null and tableId != ''">
and table_id = #{tableId}
</if>
</select>
<select id="selectDetailByQrcode" resultType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">

View File

@@ -17,10 +17,13 @@
<result column="con_warning" jdbcType="DECIMAL" property="conWarning" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_check" jdbcType="VARCHAR" property="isCheck" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, con_type_id, con_type_name, con_code, con_name, stock_number,price,stock_consume,status, con_unit,
laster_in_stock, con_warning, create_time, update_time
laster_in_stock, con_warning, create_time, update_time,is_check
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select

View File

@@ -205,7 +205,13 @@
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateStatusByOrderId">
update tb_order_detail set status = #{status} where order_id = #{orderId}
update tb_order_detail set status = #{status}
<if test="radio != null">
,price_amount=price_amount*#{radio}
</if>
where order_id = #{orderId}
</update>

View File

@@ -47,6 +47,7 @@
<result column="master_id" jdbcType="VARCHAR" property="masterId"/>
<result column="table_name" jdbcType="VARCHAR" property="tableName"/>
<result column="out_number" jdbcType="VARCHAR" property="outNumber"/>
<result column="use_type" jdbcType="VARCHAR" property="useType"/>
</resultMap>
@@ -56,7 +57,7 @@
discount_amount, table_id, small_change, send_type, order_type, product_type, status,
billing_id, merchant_id, shop_id, is_vip, member_id, user_id, product_score, deduct_score,
user_coupon_id, user_coupon_amount, refund_able, paid_time, is_effect, is_group,
updated_at, `system_time`, created_at, is_accepted, pay_order_no,trade_day,`source`,remark,master_id,`table_name`,out_number
updated_at, `system_time`, created_at, is_accepted, pay_order_no,trade_day,`source`,remark,master_id,`table_name`,out_number, use_type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -77,7 +78,9 @@
toi.out_number AS outNumber,
toi.table_name AS tableName,
toi.remark,
toi.master_id as masterId
toi.master_id as masterId,
toi.discount_ratio as discountRatio,
toi.discount_amount as discountAmount
FROM
@@ -132,7 +135,7 @@
deduct_score, user_coupon_id, user_coupon_amount,
refund_able, paid_time, is_effect,
is_group, updated_at, system_time,
created_at, is_accepted, pay_order_no,trade_day,source,remark,master_id,table_name,out_number
created_at, is_accepted, pay_order_no,trade_day,source,remark,master_id,table_name,out_number, use_type
)
values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{settlementAmount,jdbcType=DECIMAL},
#{packFee,jdbcType=DECIMAL}, #{originAmount,jdbcType=DECIMAL}, #{productAmount,jdbcType=DECIMAL},
@@ -148,7 +151,7 @@
#{isGroup,jdbcType=TINYINT}, #{updatedAt,jdbcType=BIGINT}, #{systemTime,jdbcType=BIGINT},
#{createdAt,jdbcType=BIGINT}, #{isAccepted,jdbcType=TINYINT}, #{payOrderNo,jdbcType=VARCHAR},
#{tradeDay,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{masterId,jdbcType=VARCHAR},#{tableName,jdbcType=VARCHAR},
#{outNumber,jdbcType=VARCHAR}
#{outNumber,jdbcType=VARCHAR},#{useType,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderInfo">
@@ -515,6 +518,14 @@
<if test="remark != null and remark!=''">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="staffId != null and staffId!=''">
staff_id = #{staffId,jdbcType=INTEGER},
</if>
<if test="useType != null and useType!=''">
use_type = #{useType,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>

View File

@@ -7,6 +7,7 @@
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="account" jdbcType="VARCHAR" property="account" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="discount_type" jdbcType="VARCHAR" property="discountType" />
<result column="max_discount_amount" jdbcType="DECIMAL" property="maxDiscountAmount" />
<result column="status" jdbcType="BIT" property="status" />
<result column="employee" jdbcType="VARCHAR" property="employee" />
@@ -19,7 +20,7 @@
</resultMap>
<sql id="Base_Column_List">
id
, code, name, account, password, max_discount_amount, status, employee, shop_id,
, code, name, account, password,discount_type, max_discount_amount, status, employee, shop_id,
created_at, updated_at, type,is_manage,is_pc
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">

View File

@@ -962,6 +962,7 @@
AND product_id = #{productId}
AND `status` = 'create'
and master_id = #{masterId}
and table_id = #{tableId}
and trade_day = #{day}
group by shop_id,product_id
</select>

View File

@@ -350,7 +350,7 @@
<if test="spec != null and spec !=''">
and spec_snap = #{spec}
</if>
order by id desc limit 1
</select>
<select id="selectByProduct"
resultType="com.chaozhanggui.system.cashierservice.entity.TbProductSkuWithBLOBs">

View File

@@ -15,7 +15,7 @@
id, shop_id,product_id ,product_sku_id, con_info_id, surplus_stock, status, create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
select
<include refid="Base_Column_List" />
from tb_prosku_con
where id = #{id,jdbcType=INTEGER}
@@ -25,11 +25,11 @@
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, surplus_stock, status,
insert into tb_prosku_con (id, shop_id, product_sku_id,
con_info_id, surplus_stock, status,
create_time)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{productSkuId,jdbcType=INTEGER},
#{conInfoId,jdbcType=INTEGER}, #{surplusStock,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR},
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{productSkuId,jdbcType=INTEGER},
#{conInfoId,jdbcType=INTEGER}, #{surplusStock,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProskuCon">
@@ -123,6 +123,12 @@
select * from tb_prosku_con where product_sku_id=#{skuId} and shop_id=#{shopId} and status=1
</select>
<select id="selectBySkuIdAndShopIdAngCheck" resultMap="BaseResultMap">
select a.* from tb_prosku_con as a
left join tb_cons_info as b on a.con_info_id=b.id
where a.product_sku_id=#{skuId} and a.shop_id=#{shopId} and a.status=1 and b.is_check=1
</select>
<select id="selectIdBySkuIdAndShopId" resultType="java.lang.Integer">
SELECT
p.con_info_id
@@ -139,4 +145,11 @@
select * from tb_prosku_con where product_sku_id=#{skuId} and shop_id=#{shopId} and product_id=#{productId} and status=1
</select>
</mapper>
<select id="selectByShopIdAndSkuIdAndProductIdAndCheck" resultMap="BaseResultMap">
select a.* from tb_prosku_con as a
left join tb_cons_info as b on a.con_info_id=b.id
where a.product_sku_id=#{skuId} and a.shop_id=#{shopId} and a.product_id=#{productId} and a.status=1 and b.is_check=1
</select>
</mapper>

View File

@@ -45,6 +45,12 @@
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="proxy_id" jdbcType="VARCHAR" property="proxyId" />
<result column="is_custom" jdbcType="VARCHAR" property="isCustom" />
<result column="is_return" jdbcType="VARCHAR" property="isReturn" />
<result column="is_member_in" jdbcType="VARCHAR" property="isMemberIn" />
<result column="is_member_return" jdbcType="VARCHAR" property="isMemberReturn" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbShopInfo">
<result column="view" jdbcType="LONGVARCHAR" property="view" />
@@ -55,7 +61,7 @@
detail, lat, lng, mch_id, register_type, is_wx_ma_independent, address, city, type,
industry, industry_name, business_time, post_time, post_amount_line, on_sale, settle_type,
settle_time, enter_at, expire_at, status, average, order_wait_pay_minute, support_device_number,
distribute_level, created_at, updated_at, proxy_id
distribute_level, created_at, updated_at, proxy_id,is_custom,is_return,is_member_in,is_member_return
</sql>
<sql id="Blob_Column_List">
view

View File

@@ -18,11 +18,11 @@
<result column="icon" jdbcType="VARCHAR" property="icon" />
</resultMap>
<sql id="Base_Column_List">
id, pay_type, pay_name, is_show_shortcut, shop_id, is_refundable, is_open_cash_drawer,
id, pay_type, pay_name, is_show_shortcut, shop_id, is_refundable, is_open_cash_drawer,
is_system, is_ideal, is_display, sorts, created_at, updated_at, icon
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
select
<include refid="Base_Column_List" />
from tb_shop_pay_type
where id = #{id,jdbcType=INTEGER}
@@ -32,15 +32,15 @@
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPayType">
insert into tb_shop_pay_type (id, pay_type, pay_name,
is_show_shortcut, shop_id, is_refundable,
is_open_cash_drawer, is_system, is_ideal,
is_display, sorts, created_at,
insert into tb_shop_pay_type (id, pay_type, pay_name,
is_show_shortcut, shop_id, is_refundable,
is_open_cash_drawer, is_system, is_ideal,
is_display, sorts, created_at,
updated_at, icon)
values (#{id,jdbcType=INTEGER}, #{payType,jdbcType=VARCHAR}, #{payName,jdbcType=VARCHAR},
#{isShowShortcut,jdbcType=TINYINT}, #{shopId,jdbcType=VARCHAR}, #{isRefundable,jdbcType=TINYINT},
#{isOpenCashDrawer,jdbcType=TINYINT}, #{isSystem,jdbcType=TINYINT}, #{isIdeal,jdbcType=TINYINT},
#{isDisplay,jdbcType=TINYINT}, #{sorts,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT},
values (#{id,jdbcType=INTEGER}, #{payType,jdbcType=VARCHAR}, #{payName,jdbcType=VARCHAR},
#{isShowShortcut,jdbcType=TINYINT}, #{shopId,jdbcType=VARCHAR}, #{isRefundable,jdbcType=TINYINT},
#{isOpenCashDrawer,jdbcType=TINYINT}, #{isSystem,jdbcType=TINYINT}, #{isIdeal,jdbcType=TINYINT},
#{isDisplay,jdbcType=TINYINT}, #{sorts,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{icon,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPayType">
@@ -205,4 +205,4 @@
select count(id) from tb_shop_pay_type where shop_id=#{shopId} and is_display=1 and pay_type=#{payType}
</select>
</mapper>
</mapper>

View File

@@ -228,4 +228,19 @@
</select>
<select id="selectTableInfo" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TbShopTableVO">
select a.*, b.user_id, b.master_id, b.id as orderId, b.order_no as orderNo, b.amount as orderAmount from tb_shop_table a
left join tb_order_info b on a.qrcode=b.table_id and (b.`status`='unpaid') and b.master_id is not null and b.shop_id=#{shopId} and b.trade_day=#{day} and b.use_type='postPay' and b.order_type='cash'
where a.shop_id=#{shopId}
<if test="areaId != null and areaId !=''">
and a.area_id = #{areaId}
</if>
<if test="status != null and status !=''">
and a.status = #{status}
</if>
GROUP BY a.id
order by a.id desc
</select>
</mapper>

View File

@@ -10,9 +10,12 @@
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="is_return" jdbcType="VARCHAR" property="isReturn" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, shop_user_id, amount, balance, biz_code, biz_name, create_time, type
id, shop_user_id, amount, balance, biz_code, biz_name, create_time, type,is_return,remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -27,10 +30,10 @@
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
insert into tb_shop_user_flow (id, shop_user_id, amount,
balance, biz_code, biz_name,
create_time, type)
create_time, type,is_return,remark)
values (#{id,jdbcType=INTEGER}, #{shopUserId,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL},
#{balance,jdbcType=DECIMAL}, #{bizCode,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=VARCHAR})
#{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=VARCHAR},#{isReturn,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
insert into tb_shop_user_flow
@@ -122,7 +125,8 @@
biz_code = #{bizCode,jdbcType=VARCHAR},
biz_name = #{bizName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
type = #{type,jdbcType=VARCHAR}
type = #{type,jdbcType=VARCHAR},
is_return=#{isReturn,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>

View File

@@ -371,6 +371,11 @@
<if test="phone != null and phone !='' ">
and telephone like concat("%",#{phone},"%")
</if>
<if test="isFlag != null ">
and amount &gt; 0
</if>
order by id desc