1.代客下单 创建订单更新台桌使用时间
This commit is contained in:
parent
2c99b8cd18
commit
2ef311f887
|
|
@ -1171,15 +1171,18 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置台桌信息
|
LambdaUpdateWrapper<TbShopTable> wrapper = new LambdaUpdateWrapper<TbShopTable>()
|
||||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
|
||||||
.eq(TbShopTable::getShopId, createOrderDTO.getShopId())
|
.eq(TbShopTable::getShopId, createOrderDTO.getShopId())
|
||||||
.eq(TbShopTable::getQrcode, createOrderDTO.getTableId())
|
.eq(TbShopTable::getQrcode, createOrderDTO.getTableId())
|
||||||
.set(TbShopTable::getUseTime, DateUtil.date())
|
|
||||||
.set(TbShopTable::getProductNum, cashierCarts.size())
|
.set(TbShopTable::getProductNum, cashierCarts.size())
|
||||||
.set(TbShopTable::getTotalAmount, orderInfo.getOrderAmount())
|
.set(TbShopTable::getTotalAmount, orderInfo.getOrderAmount())
|
||||||
.set(TbShopTable::getRealAmount, orderInfo.getOrderAmount())
|
.set(TbShopTable::getRealAmount, orderInfo.getOrderAmount())
|
||||||
.set(TbShopTable::getStatus, TableStateEnum.USING.getState()));
|
.set(TbShopTable::getStatus, TableStateEnum.USING.getState());
|
||||||
|
if (isFirst) {
|
||||||
|
wrapper.set(TbShopTable::getUseTime, DateUtil.date());
|
||||||
|
}
|
||||||
|
// 设置台桌信息
|
||||||
|
mpShopTableMapper.update(null, wrapper);
|
||||||
|
|
||||||
String tableCartKey = RedisConstant.getTableCartKey(createOrderDTO.getTableId(), createOrderDTO.getShopId().toString());
|
String tableCartKey = RedisConstant.getTableCartKey(createOrderDTO.getTableId(), createOrderDTO.getShopId().toString());
|
||||||
redisTemplate.delete(tableCartKey);
|
redisTemplate.delete(tableCartKey);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue