|
@@ -172,6 +172,9 @@ class CartService extends CrudService {
|
|
|
// 套装查询库存
|
|
|
const cartData = await this.model.findById(cartId);
|
|
|
const res = await this.checkSetGoodsNum(cartData, num);
|
|
|
+ if (update && cartId) {
|
|
|
+ await this.model.updateOne({ _id: cartId }, { num });
|
|
|
+ }
|
|
|
return res;
|
|
|
}
|
|
|
const { populate } = this.ctx.service.shop.goodsSpec.getRefMods();
|