|
|
@@ -3,6 +3,8 @@
|
|
|
namespace bizGhs\notify\classes;
|
|
|
|
|
|
use bizGhs\base\classes\BaseClass;
|
|
|
+use bizGhs\custom\classes\CustomClass;
|
|
|
+use bizGhs\shop\classes\ShopAdminClass;
|
|
|
use Yii;
|
|
|
|
|
|
class NotifyClass extends BaseClass
|
|
|
@@ -16,4 +18,33 @@ class NotifyClass extends BaseClass
|
|
|
return $data;
|
|
|
}
|
|
|
|
|
|
+ //新增售后申请通过 ssh 20230814
|
|
|
+ public static function addRefundApplyNotify($refund)
|
|
|
+ {
|
|
|
+ $mainId = $refund->mainId ?? 0;
|
|
|
+ $shopId = $refund->shopId ?? 0;
|
|
|
+ $title = '有新的售后申请';
|
|
|
+ $id = $refund->id;
|
|
|
+ $customId = $refund->customId;
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+ $customName = $custom->name ?? '';
|
|
|
+ $staffList = ShopAdminClass::getAllByCondition(['mainId' => $mainId], null, '*', null, true);
|
|
|
+ if (!empty($staffList)) {
|
|
|
+ foreach ($staffList as $staff) {
|
|
|
+ $staffId = $staff->id;
|
|
|
+ $data = [
|
|
|
+ 'mainId' => $mainId,
|
|
|
+ 'shopId' => $shopId,
|
|
|
+ 'staffId' => $staffId,
|
|
|
+ 'title' => $title,
|
|
|
+ 'type' => 0,
|
|
|
+ 'read' => 0,
|
|
|
+ 'content' => $customName . ' 申请售后',
|
|
|
+ 'page' => '/pagesOrder/refundDetail?id=' . $id,
|
|
|
+ ];
|
|
|
+ self::add($data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|