1.代客下单 添加购物车接口添加id

This commit is contained in:
SongZhang 2024-08-30 15:27:31 +08:00
parent 52410b73f1
commit 26f6af0256
2 changed files with 6 additions and 0 deletions

View File

@ -24,4 +24,5 @@ public class AddCartDTO {
private Integer num; private Integer num;
private boolean isPack; private boolean isPack;
private boolean isGift; private boolean isGift;
private Integer cartId;
} }

View File

@ -330,6 +330,11 @@ public class TbShopTableServiceImpl implements TbShopTableService {
.eq(TbCashierCart::getMasterId, ""); .eq(TbCashierCart::getMasterId, "");
})); }));
}); });
if (addCartDTO.getCartId() != null) {
query.eq(TbCashierCart::getId, addCartDTO.getCartId());
}
TbCashierCart tbCashierCart = cashierCartMapper.selectOne(query); TbCashierCart tbCashierCart = cashierCartMapper.selectOne(query);
// 首次加入 // 首次加入
if (tbCashierCart == null) { if (tbCashierCart == null) {