fix: 修复回调地址 修复切换台桌取餐码未更新问题
This commit is contained in:
parent
b49b7ef8af
commit
f0632942d5
|
|
@ -49,7 +49,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.amqp.rabbit.connection.CorrelationData;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
|
|
@ -632,7 +631,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
|
||||
if (cashierCart.getTableId() != null && removeCartDTO.getTableId() != null) {
|
||||
// 清空购物车 出票
|
||||
long carCount = countCar(Long.valueOf(cashierCart.getTableId()), cashierCart.getShopId(), cashierCart.getMasterId());
|
||||
long carCount = countCar(Long.valueOf(cashierCart.getTableId()), cashierCart.getShopId());
|
||||
log.info("购物车数量: {}", carCount);
|
||||
setRedisTableCartInfo(removeCartDTO.getTableId(), removeCartDTO.getShopId().toString(), Collections.singletonList(cashierCart), false);
|
||||
}
|
||||
|
|
@ -768,7 +767,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
cashierCartMapper.delete(query);
|
||||
}
|
||||
|
||||
private long countCar(Long tableId, String shopId, String masterId) {
|
||||
private long countCar(Long tableId, String shopId) {
|
||||
String orderId = redisTemplate.opsForValue().get(RedisConstant.getCurrentOrderKey(tableId.toString(), shopId));
|
||||
return tbOrderDetailMapper.selectCount(new LambdaQueryWrapper<TbOrderDetail>()
|
||||
.eq(TbOrderDetail::getShopId, shopId)
|
||||
|
|
@ -1791,11 +1790,14 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
mpCashierCartService.clearCartByTableIdAndUseType(choseTableDTO.getTableId(), shopEatTypeInfoDTO.getUseType(), choseTableDTO.getShopId());
|
||||
}
|
||||
|
||||
String masterId = getMasterId(choseTableDTO.getShopId(), choseTableDTO.getTableId(), shopEatTypeInfoDTO.getUseType(), null).getString("masterId");
|
||||
|
||||
ArrayList<Integer> cartIds = new ArrayList<>();
|
||||
Integer orderId = null;
|
||||
for (TbCashierCart item : tbCashierCarts) {
|
||||
item.setTableId(choseTableDTO.getTableId());
|
||||
item.setUseType(shopEatTypeInfoDTO.getUseType());
|
||||
item.setMasterId(masterId);
|
||||
cartIds.add(item.getId());
|
||||
if (item.getOrderId() != null) {
|
||||
orderId = item.getOrderId();
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ spring:
|
|||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
# driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
url: jdbc:p6spy:mysql://rm-bp1kn7h89nz62cno1ro.mysql.rds.aliyuncs.com:3306/fycashier_test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
|
||||
# url: jdbc:p6spy:mysql://rm-bp1kn7h89nz62cno1ro.mysql.rds.aliyuncs.com:3306/fycashier_test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
|
||||
# url: jdbc:mysql://127.0.0.1:3306/fycashier?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
|
||||
url: jdbc:p6spy:mysql://rm-bp1kn7h89nz62cno1ro.mysql.rds.aliyuncs.com:3306/fycashier_pre?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
|
||||
username: cashier
|
||||
password: Cashier@1@
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
|
|
|||
|
|
@ -141,5 +141,5 @@ cashier:
|
|||
|
||||
thirdPay:
|
||||
notify:
|
||||
fstPay: https://pre-cashiernewadmin.sxczgkj.cn/notify/fstPay
|
||||
fstReturn: https://pre-cashiernewadmin.sxczgkj.cn/notify/fstReturn
|
||||
fstPay: https://pre-cashieradmin.sxczgkj.cn/notify/fstPay
|
||||
fstReturn: https://pre-cashieradmin.sxczgkj.cn/notify/fstReturn
|
||||
|
|
|
|||
Loading…
Reference in New Issue