1.代客下单 存单返回备注内容

This commit is contained in:
SongZhang 2024-08-23 17:48:36 +08:00
parent f9931b50ea
commit 29ccf35e5f
3 changed files with 6 additions and 2 deletions

View File

@ -20,8 +20,10 @@ public interface TbCashierCartMapper extends BaseMapper<TbCashierCart> {
" from tb_cashier_cart where table_id is not null and shop_id = #{shopId} and status = 'refund' group by shop_Id, master_id order by trade_day desc")
List<CarVO> selectCar(@Param("shopId") Integer shopId);
@Select(" SELECT order_id orderId, pending_at, sum(total_amount) totalAmount, count(id) totalCount, sum(total_number) totalNumber from tb_cashier_cart where status = 'refund' and shop_id=#{shopId} and table_id=#{tableId} " +
" GROUP BY order_id ORDER BY id desc")
@Select("select a.id orderId,b.pending_at pendingAt, sum(b.total_amount) totalAmount, count(b.id) totalCount, sum(b.total_number) totalNumber, a.remark from tb_order_info a " +
"JOIN tb_cashier_cart b on a.id=b.order_id " +
"where a.shop_id=#{shopId} and a.`status`='pending' and a.table_id=#{tableId} " +
"GROUP BY a.id ORDER BY a.id desc ")
List<PendingCountVO> countPending(@Param("shopId") Integer shopId, @Param("tableId") String tableId);
@Select("select a.*, b.spec_snap from tb_cashier_cart as a left join tb_product_sku as b on a.sku_id=b.id where a.shop_id=#{shopId} and a.status='refund';")

View File

@ -1004,6 +1004,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
TbCashierCart cashierCart = new TbCashierCart();
cashierCart.setStatus(pendingDTO.getIsPending() ? "refund" : "create");
cashierCart.setPendingAt(pendingDTO.getIsPending() ? DateUtil.current() : cashierCart.getPendingAt());
cashierCartMapper.update(cashierCart, new LambdaUpdateWrapper<TbCashierCart>()
.eq(TbCashierCart::getOrderId, orderId));

View File

@ -12,4 +12,5 @@ public class PendingCountVO {
private Integer totalCount;
private Integer totalNumber;
private Integer orderId;
private String remark;
}