|
@@ -50,6 +50,10 @@ class ZrOrderService extends CrudService {
|
|
|
const pointData = { customer, point: costTotal, time: buy_time, source: '-2', source_id: order_id };
|
|
|
this.tran.insert('Point', pointData);
|
|
|
// #endregion
|
|
|
+ // #region 库存处理
|
|
|
+ const newNum = this.ctx.minus(_.get(goodsInfo, 'num'), buy_num);
|
|
|
+ this.tran.update('ZrGoods', goods, { num: newNum });
|
|
|
+ // #endregion
|
|
|
await this.tran.run();
|
|
|
return 'ok';
|
|
|
} catch (error) {
|