支付修改
This commit is contained in:
parent
9ed26c0fc4
commit
b3c243cf43
|
|
@ -296,11 +296,14 @@ public class PayService {
|
|||
producer.printMechine(orderId);
|
||||
|
||||
// 修改台桌状态
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
if (StrUtil.isNotBlank(orderInfo.getTableId())) {
|
||||
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
}
|
||||
}
|
||||
|
||||
String tableCartKey = RedisCst.getCurrentOrderKey(orderInfo.getTableId(),
|
||||
|
|
@ -322,11 +325,14 @@ public class PayService {
|
|||
tbOrderPaymentMapper.updateByPrimaryKeySelective(payment);
|
||||
|
||||
// 修改台桌状态
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
if (StrUtil.isNotBlank(orderInfo.getTableId())) {
|
||||
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
}
|
||||
}
|
||||
// 打印结算单
|
||||
producer.printMechine(orderId);
|
||||
|
|
@ -387,11 +393,14 @@ public class PayService {
|
|||
|
||||
producer.printMechine(orderId);
|
||||
// 修改台桌状态
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
if (StrUtil.isNotBlank(orderInfo.getTableId())) {
|
||||
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
}
|
||||
}
|
||||
// 打印结算单
|
||||
String tableCartKey = RedisCst.getCurrentOrderKey(orderInfo.getTableId(),
|
||||
|
|
@ -409,11 +418,14 @@ public class PayService {
|
|||
payment.setUpdatedAt(System.currentTimeMillis());
|
||||
tbOrderPaymentMapper.updateByPrimaryKeySelective(payment);
|
||||
// 修改台桌状态
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
if (StrUtil.isNotBlank(orderInfo.getTableId())) {
|
||||
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
}
|
||||
}
|
||||
// 打印结算单
|
||||
producer.printMechine(orderId);
|
||||
|
|
@ -899,11 +911,14 @@ public class PayService {
|
|||
mqData.put("type", "pc");
|
||||
producer.sendStockSaleMsg(mqData);
|
||||
// 修改台桌状态
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
if (StrUtil.isNotBlank(orderInfo.getTableId())) {
|
||||
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
}
|
||||
}
|
||||
|
||||
String tableCartKey = RedisCst.getCurrentOrderKey(orderInfo.getTableId(),
|
||||
|
|
@ -996,11 +1011,13 @@ public class PayService {
|
|||
redisUtil.del("SHOP:CODE:USER:" + "pc" + ":" + orderInfo.getShopId() + ":" + DateUtils.getDay() + TokenUtil.parseParamFromToken(token).getString("accountId"));
|
||||
|
||||
// 修改台桌状态
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
if (StrUtil.isNotBlank(orderInfo.getTableId())) {
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
}
|
||||
}
|
||||
|
||||
// 小程序购物车缓存
|
||||
|
|
@ -1090,11 +1107,14 @@ public class PayService {
|
|||
redisUtil.del("SHOP:CODE:USER:" + "pc" + ":" + orderInfo.getShopId() + ":" + DateUtils.getDay() + TokenUtil.parseParamFromToken(token).getString("accountId"));
|
||||
|
||||
// 修改台桌状态
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
if (StrUtil.isNotBlank(orderInfo.getTableId())) {
|
||||
|
||||
TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>().eq(TbShopTable::getQrcode, orderInfo.getTableId()));
|
||||
if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
}
|
||||
}
|
||||
clearTableInfoCache(orderInfo);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue