|
|
@@ -10,6 +10,8 @@ use bizHd\goods\classes\GoodsClass;
|
|
|
use bizHd\meituan\classes\MtOrderClass;
|
|
|
use bizHd\order\classes\OrderClass;
|
|
|
use bizHd\order\services\OrderService;
|
|
|
+use bizHd\refund\classes\HdRefundClass;
|
|
|
+use bizHd\refund\services\HdRefundService;
|
|
|
use bizHd\shop\classes\ShopClass;
|
|
|
use bizHd\work\classes\WorkClass;
|
|
|
use common\components\dict;
|
|
|
@@ -535,8 +537,24 @@ class MtController extends PublicController
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- //订单取消,金额全部退还
|
|
|
|
|
|
+ //订单取消,金额全部退还
|
|
|
+ $shop = ShopClass::getById($shopId, true);
|
|
|
+ if (empty($shop)) {
|
|
|
+ return Json::encode(['data' => 'ok']);
|
|
|
+ }
|
|
|
+ $sjId = $shop->sjId ?? 0;
|
|
|
+ $mainId = $shop->mainId ?? 0;
|
|
|
+ $post = [];
|
|
|
+ $post['price'] = $order->actPrice ?? 0;
|
|
|
+ $post['refundType'] = HdRefundClass::REFUND_TYPE_MONEY;
|
|
|
+ $post['id'] = $order->id ?? 0;
|
|
|
+ $post['shopId'] = $shopId;
|
|
|
+ $post['sjId'] = $sjId;
|
|
|
+ $post['shopAdminId'] = 0;
|
|
|
+ $post['mainId'] = $mainId;
|
|
|
+ $post['shopAdminName'] = '美团APP';
|
|
|
+ HdRefundService::addRefund($post, $order);
|
|
|
|
|
|
//制作单取消通知
|
|
|
$shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], true);
|