|
|
@@ -2,6 +2,7 @@
|
|
|
//退款退货
|
|
|
namespace ghs\controllers;
|
|
|
|
|
|
+use bizGhs\notify\classes\NotifyClass;
|
|
|
use bizGhs\order\classes\RefundOrderItemClass;
|
|
|
use bizGhs\order\services\RefundOrderService;
|
|
|
use bizGhs\shop\classes\ShopClass;
|
|
|
@@ -211,6 +212,23 @@ class RefundController extends BaseController
|
|
|
}
|
|
|
$orderSn = $refund['orderSn'] ?? '';
|
|
|
$itemList = RefundOrderItemClass::getOrderItemDetail($orderSn);
|
|
|
+
|
|
|
+ $staff = $this->shopAdmin;
|
|
|
+ $staffId = $this->shopAdminId;
|
|
|
+ $notify = NotifyClass::getByCondition(['staffId' => $staffId, 'type' => 0, 'targetId' => $id], true);
|
|
|
+ if (!empty($notify)) {
|
|
|
+ if ($notify->read == 0) {
|
|
|
+ $notify->read = 1;
|
|
|
+ $notify->save();
|
|
|
+ $notifyNum = $staff->notifyNum;
|
|
|
+ if ($notifyNum > 0) {
|
|
|
+ $notifyNum--;
|
|
|
+ $staff->notifyNum = $notifyNum;
|
|
|
+ $staff->save();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
util::success(['info' => $refund, 'itemList' => $itemList]);
|
|
|
}
|
|
|
|