提交 f58f45e4 编写于 作者: D Devil

已完成订单退数量,则释放销量

上级 79aa55a4
......@@ -986,6 +986,16 @@ class OrderAftersaleService
return $ret;
}
// 已完成订单、商品销量释放
if($order['data']['status'] == 4 && $aftersale['number'] > 0)
{
if(!Db::name('Goods')->where(['id'=>intval($aftersale['goods_id'])])->setDec('sales_count', $aftersale['number']))
{
Db::rollback();
return DataReturn('商品销量释放失败', -1);
}
}
// 消息通知
$detail = '订单退款成功,金额'.PriceBeautify($aftersale['price']).'元';
MessageService::MessageAdd($order['data']['user_id'], '订单退款', $detail, '订单售后', $order['data']['id']);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册