查询台桌携带订单信息 + 订单金额
This commit is contained in:
@@ -4,6 +4,8 @@ import com.chaozhanggui.system.cashierservice.entity.TbShopTable;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
public class TbShopTableVO extends TbShopTable {
|
public class TbShopTableVO extends TbShopTable {
|
||||||
@@ -11,4 +13,5 @@ public class TbShopTableVO extends TbShopTable {
|
|||||||
private String masterId;
|
private String masterId;
|
||||||
private Integer orderId;
|
private Integer orderId;
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
private BigDecimal orderAmount;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,7 +229,7 @@
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectTableInfo" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TbShopTableVO">
|
<select id="selectTableInfo" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TbShopTableVO">
|
||||||
select a.*, b.user_id, c.master_id, c.id as orderId, c.order_no as orderNo from tb_shop_table a
|
select a.*, b.user_id, c.master_id, c.id as orderId, c.order_no as orderNo, c.amount as orderAmount from tb_shop_table a
|
||||||
left join tb_order_info b on a.qrcode=b.table_id and (b.`status`='unpaid' or b.`status`='paying') and b.user_id is not null
|
left join tb_order_info b on a.qrcode=b.table_id and (b.`status`='unpaid' or b.`status`='paying') and b.user_id is not null
|
||||||
left join tb_order_info c on a.qrcode=c.table_id and (c.`status`='unpaid' or c.`status`='paying') and c.master_id is not null
|
left join tb_order_info c on a.qrcode=c.table_id and (c.`status`='unpaid' or c.`status`='paying') and c.master_id is not null
|
||||||
where a.shop_id=#{shopId}
|
where a.shop_id=#{shopId}
|
||||||
|
|||||||
Reference in New Issue
Block a user