1.代客下单
This commit is contained in:
@@ -65,8 +65,8 @@
|
||||
<include refid="Base_Column_List"/>
|
||||
from tb_cashier_cart where table_id = #{tableId} and product_id = #{productId} and shop_id = #{shopId} and
|
||||
sku_id = #{skuId}
|
||||
<if test="uuid != null">
|
||||
and uuid = #{uuid}
|
||||
<if test="userId != null">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByMaskerId" resultType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
|
||||
@@ -91,6 +91,27 @@
|
||||
and trade_day = #{day}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectAllCreateOrder2" resultType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from tb_cashier_cart where shop_id = #{shopId} and status = #{status}
|
||||
<if test="uuid != null and uuid != ''">
|
||||
and uuid = #{uuid}
|
||||
</if>
|
||||
<if test="day != null and day !=''">
|
||||
and trade_day = #{day}
|
||||
</if>
|
||||
<if test="tableId != null and vipUserId != null">
|
||||
and (table_id = #{tableId} or user_id=#{vipUserId})
|
||||
</if>
|
||||
<if test="tableId != null and vipUserId == null">
|
||||
and table_id = #{tableId} and master_id = #{masterId}
|
||||
</if>
|
||||
<if test="tableId == null and vipUserId == null">
|
||||
and master_id = #{masterId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectProductNumByMarketId" resultType="com.chaozhanggui.system.cashierservice.entity.po.QueryCartPo">
|
||||
select ifnull(count(*),0) as productNum,ifnull(sum(number),0)as productSum from (select count(*),number from tb_cashier_cart where trade_day = #{day} and master_id = #{masterId} and shop_id = #{shopId} group by product_id ) a
|
||||
</select>
|
||||
@@ -408,13 +429,22 @@
|
||||
|
||||
<select id="selectActivateByQrcode"
|
||||
resultType="com.chaozhanggui.system.cashierservice.entity.TbCashierCart">
|
||||
select * from tb_cashier_cart where table_id = #{tableId} and shop_id = #{shopId} and status = 'create'
|
||||
select * from tb_cashier_cart where shop_id = #{shopId} and status = 'create'
|
||||
and table_id = #{tableId}
|
||||
<if test="userId != null">
|
||||
and user_id=#{userId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="selectProductNumByQrcode"
|
||||
resultType="com.chaozhanggui.system.cashierservice.entity.po.QueryCartPo">
|
||||
select ifnull(count(*),0) as productNum,ifnull(sum(number),0)as productSum
|
||||
from (select count(*),number
|
||||
from tb_cashier_cart where table_id = #{qrcode} and shop_id = #{shopId} group by product_id ) a
|
||||
from tb_cashier_cart where table_id = #{tableId} and shop_id = #{shopId}
|
||||
<if test="vipUserId != null">
|
||||
and user_id=#{vipUserId}
|
||||
</if>
|
||||
group by product_id ) a
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user