查询台桌携带订单信息 + 订单金额

This commit is contained in:
yijiegong 2024-08-22 11:03:53 +08:00
parent 8b657fdc8a
commit f2b32671b8
2 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,8 @@ import com.chaozhanggui.system.cashierservice.entity.TbShopTable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
@EqualsAndHashCode(callSuper = true)
@Data
public class TbShopTableVO extends TbShopTable {
@ -11,4 +13,5 @@ public class TbShopTableVO extends TbShopTable {
private String masterId;
private Integer orderId;
private String orderNo;
private BigDecimal orderAmount;
}

View File

@ -229,7 +229,7 @@
</select>
<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 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}