|
|
@@ -5,6 +5,7 @@ namespace bizGhs\order\services;
|
|
|
use biz\shop\classes\ShopCapitalClass;
|
|
|
use biz\shop\classes\ShopClass;
|
|
|
use biz\stat\classes\StatOutClass;
|
|
|
+use biz\stat\classes\StatRefundClass;
|
|
|
use bizGhs\base\services\BaseService;
|
|
|
use bizGhs\custom\classes\CustomClass;
|
|
|
use bizGhs\order\classes\OrderClass;
|
|
|
@@ -86,6 +87,8 @@ class RefundOrderService extends BaseService
|
|
|
//总支出增加
|
|
|
$currentTotalExpend = bcadd($shop->totalExpend, $refundPrice, 2);
|
|
|
$shop->totalExpend = $currentTotalExpend;
|
|
|
+ $totalRefund = bcadd($shop->totalRefund, $refundPrice, 2);
|
|
|
+ $shop->totalRefund = $totalRefund;
|
|
|
$shop->save();
|
|
|
|
|
|
//支出流水
|
|
|
@@ -106,6 +109,8 @@ class RefundOrderService extends BaseService
|
|
|
//当天和当月支出统计
|
|
|
StatOutClass::updateOrInsert($shop, $refundPrice);
|
|
|
|
|
|
+ StatRefundClass::replace($shop, $refundPrice);
|
|
|
+
|
|
|
//记录总的退款金额
|
|
|
$currentTkPrice = bcadd($order->tkPrice, $refundPrice, 2);
|
|
|
$order->tkPrice = $currentTkPrice;
|