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.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.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
|
|
@ -632,7 +631,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||||
|
|
||||||
if (cashierCart.getTableId() != null && removeCartDTO.getTableId() != null) {
|
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);
|
log.info("购物车数量: {}", carCount);
|
||||||
setRedisTableCartInfo(removeCartDTO.getTableId(), removeCartDTO.getShopId().toString(), Collections.singletonList(cashierCart), false);
|
setRedisTableCartInfo(removeCartDTO.getTableId(), removeCartDTO.getShopId().toString(), Collections.singletonList(cashierCart), false);
|
||||||
}
|
}
|
||||||
|
|
@ -768,7 +767,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||||
cashierCartMapper.delete(query);
|
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));
|
String orderId = redisTemplate.opsForValue().get(RedisConstant.getCurrentOrderKey(tableId.toString(), shopId));
|
||||||
return tbOrderDetailMapper.selectCount(new LambdaQueryWrapper<TbOrderDetail>()
|
return tbOrderDetailMapper.selectCount(new LambdaQueryWrapper<TbOrderDetail>()
|
||||||
.eq(TbOrderDetail::getShopId, shopId)
|
.eq(TbOrderDetail::getShopId, shopId)
|
||||||
|
|
@ -1791,11 +1790,14 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||||
mpCashierCartService.clearCartByTableIdAndUseType(choseTableDTO.getTableId(), shopEatTypeInfoDTO.getUseType(), choseTableDTO.getShopId());
|
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<>();
|
ArrayList<Integer> cartIds = new ArrayList<>();
|
||||||
Integer orderId = null;
|
Integer orderId = null;
|
||||||
for (TbCashierCart item : tbCashierCarts) {
|
for (TbCashierCart item : tbCashierCarts) {
|
||||||
item.setTableId(choseTableDTO.getTableId());
|
item.setTableId(choseTableDTO.getTableId());
|
||||||
item.setUseType(shopEatTypeInfoDTO.getUseType());
|
item.setUseType(shopEatTypeInfoDTO.getUseType());
|
||||||
|
item.setMasterId(masterId);
|
||||||
cartIds.add(item.getId());
|
cartIds.add(item.getId());
|
||||||
if (item.getOrderId() != null) {
|
if (item.getOrderId() != null) {
|
||||||
orderId = item.getOrderId();
|
orderId = item.getOrderId();
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,9 @@ spring:
|
||||||
druid:
|
druid:
|
||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
# driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
# 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: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
|
username: cashier
|
||||||
password: Cashier@1@
|
password: Cashier@1@
|
||||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
|
|
||||||
|
|
@ -141,5 +141,5 @@ cashier:
|
||||||
|
|
||||||
thirdPay:
|
thirdPay:
|
||||||
notify:
|
notify:
|
||||||
fstPay: https://pre-cashiernewadmin.sxczgkj.cn/notify/fstPay
|
fstPay: https://pre-cashieradmin.sxczgkj.cn/notify/fstPay
|
||||||
fstReturn: https://pre-cashiernewadmin.sxczgkj.cn/notify/fstReturn
|
fstReturn: https://pre-cashieradmin.sxczgkj.cn/notify/fstReturn
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue