1.代客下单 挂单列表根据tableId获取
This commit is contained in:
@@ -116,9 +116,10 @@ public class TbPlaceController {
|
|||||||
@Log("代客下单 查询购物车")
|
@Log("代客下单 查询购物车")
|
||||||
@ApiOperation("代客下单 查询购物车 /shop/table")
|
@ApiOperation("代客下单 查询购物车 /shop/table")
|
||||||
public ResponseEntity<Object> getPendingCart(
|
public ResponseEntity<Object> getPendingCart(
|
||||||
@RequestParam Integer shopId
|
@RequestParam Integer shopId,
|
||||||
|
@RequestParam String tableId
|
||||||
) {
|
) {
|
||||||
return ResponseEntity.ok(tbShopTableService.getCar(shopId));
|
return ResponseEntity.ok(tbShopTableService.getCar(shopId, tableId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AnonymousAccess
|
@AnonymousAccess
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ package cn.ysk.cashier.service.impl.shopimpl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.thread.ThreadUtil;
|
import cn.hutool.core.thread.ThreadUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.ysk.cashier.config.security.security.TokenProvider;
|
import cn.ysk.cashier.config.security.security.TokenProvider;
|
||||||
import cn.ysk.cashier.cons.RedisConstant;
|
import cn.ysk.cashier.cons.RedisConstant;
|
||||||
@@ -60,7 +59,6 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.amqp.rabbit.connection.CorrelationData;
|
import org.springframework.amqp.rabbit.connection.CorrelationData;
|
||||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.security.core.parameters.P;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -992,12 +990,13 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getCar(Integer shopId) {
|
public Object getCar(Integer shopId, String tableId) {
|
||||||
ArrayList<Map<String, Object>> data = new ArrayList<>();
|
ArrayList<Map<String, Object>> data = new ArrayList<>();
|
||||||
|
|
||||||
List<PendingCountVO> pendingCountVOS = cashierCartMapper.countPending(shopId);
|
List<PendingCountVO> pendingCountVOS = cashierCartMapper.countPending(shopId);
|
||||||
List<TbCashierCart> tbCashierCarts = cashierCartMapper.selectList(new LambdaQueryWrapper<TbCashierCart>()
|
List<TbCashierCart> tbCashierCarts = cashierCartMapper.selectList(new LambdaQueryWrapper<TbCashierCart>()
|
||||||
.eq(TbCashierCart::getShopId, shopId)
|
.eq(TbCashierCart::getShopId, shopId)
|
||||||
|
.eq(TbCashierCart::getTableId, tableId)
|
||||||
.eq(TbCashierCart::getStatus, "refund"));
|
.eq(TbCashierCart::getStatus, "refund"));
|
||||||
|
|
||||||
ArrayList<Integer> skuIds = new ArrayList<>();
|
ArrayList<Integer> skuIds = new ArrayList<>();
|
||||||
@@ -1047,8 +1046,11 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
case "vipPay":
|
case "vipPay":
|
||||||
orderInfo = tbPayServiceImpl.vipPay(payDTO.getShopId(), payDTO.getOrderId());
|
orderInfo = tbPayServiceImpl.vipPay(payDTO.getShopId(), payDTO.getOrderId());
|
||||||
break;
|
break;
|
||||||
case "cashPay":
|
case "cash":
|
||||||
orderInfo = tbPayServiceImpl.cashPay(payDTO);
|
orderInfo = tbPayServiceImpl.cashPay(payDTO);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new BadRequestException("未知支付方式");
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("更新购物车");
|
log.info("更新购物车");
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public interface TbShopTableService {
|
|||||||
|
|
||||||
Object pending(PendingDTO pendingDTO);
|
Object pending(PendingDTO pendingDTO);
|
||||||
|
|
||||||
Object getCar(Integer shopId);
|
Object getCar(Integer shopId, String tableId);
|
||||||
|
|
||||||
Object getPayType(Integer shopId);
|
Object getPayType(Integer shopId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user