fix: 下单次数修复
This commit is contained in:
@@ -962,9 +962,12 @@ public class OrderService {
|
|||||||
Integer mealNum = null;
|
Integer mealNum = null;
|
||||||
Integer orderId = null;
|
Integer orderId = null;
|
||||||
int cartCount = 0;
|
int cartCount = 0;
|
||||||
|
boolean hasNewCart = false;
|
||||||
for (TbCashierCart cart : list) {
|
for (TbCashierCart cart : list) {
|
||||||
if (cart.getOrderId() != null) {
|
if (cart.getOrderId() != null) {
|
||||||
orderId = cart.getOrderId();
|
orderId = cart.getOrderId();
|
||||||
|
}else {
|
||||||
|
hasNewCart = true;
|
||||||
}
|
}
|
||||||
cashierIds.add(cart.getId());
|
cashierIds.add(cart.getId());
|
||||||
if ("-999".equals(cart.getProductId())) {
|
if ("-999".equals(cart.getProductId())) {
|
||||||
@@ -1127,7 +1130,7 @@ public class OrderService {
|
|||||||
orderInfo.setPackFee(packAMount);
|
orderInfo.setPackFee(packAMount);
|
||||||
orderInfo.setSendType(eatTypeInfoDTO.getSendType());
|
orderInfo.setSendType(eatTypeInfoDTO.getSendType());
|
||||||
// 堂食自取增加下单次数
|
// 堂食自取增加下单次数
|
||||||
if (eatTypeInfoDTO.isDineInAfter()) {
|
if (eatTypeInfoDTO.isDineInAfter() && hasNewCart) {
|
||||||
orderInfo.setPlaceNum(currentPlaceNum);
|
orderInfo.setPlaceNum(currentPlaceNum);
|
||||||
}
|
}
|
||||||
mPOrderInfoMapper.updateById(orderInfo);
|
mPOrderInfoMapper.updateById(orderInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user