|
|
@@ -24,6 +24,7 @@ use app\adminapi\logic\works\ServiceWorkLogic;
|
|
|
use app\adminapi\validate\works\ServiceWorkValidate;
|
|
|
use app\api\logic\ServiceOrderLogic;
|
|
|
use app\common\logic\ThirdOrderLogic;
|
|
|
+use app\common\model\works\ServiceWork;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -66,6 +67,15 @@ class ServiceWorkController extends BaseAdminController
|
|
|
if (true === $result) {
|
|
|
if(strtotime($workDetail['appointment_time']) !== strtotime($params['appointment_time']) && !empty($workDetail['master_worker_id'])){
|
|
|
$masterDetail = MasterWorkerLogic::detail(['id'=>$workDetail['master_worker_id']]);
|
|
|
+ // 商家改约通知外部平台 即改约
|
|
|
+ if($workDetail['external_platform_id'] > 0){
|
|
|
+ http_request(env('internal_api.api_url_host').'platf/performanceNotice',http_build_query([
|
|
|
+ 'external_platform_id'=>$workDetail['external_platform_id'],
|
|
|
+ 'send_code'=> 1002,
|
|
|
+ 'work_sn'=> $workDetail['work_sn']
|
|
|
+ ]));
|
|
|
+ }
|
|
|
+
|
|
|
// 修改预约时间通知【给用户的通知】
|
|
|
$res = event('Notice', [
|
|
|
'scene_id' => 117,
|
|
|
@@ -141,6 +151,15 @@ class ServiceWorkController extends BaseAdminController
|
|
|
$result = ServiceWorkLogic::cancel($params);
|
|
|
if (true === $result) {
|
|
|
UserEquityLogic::cancelServiceWorkRestoredNumber($params);
|
|
|
+ $serviceWorkInfo = ServiceWork::find($params['id']);
|
|
|
+ // 商家取消通知外部平台 即取消
|
|
|
+ if($serviceWorkInfo['external_platform_id'] > 0){
|
|
|
+ http_request(env('internal_api.api_url_host').'platf/performanceNotice',http_build_query([
|
|
|
+ 'external_platform_id'=>$serviceWorkInfo['external_platform_id'],
|
|
|
+ 'send_code'=> 1005,
|
|
|
+ 'work_sn'=> $serviceWorkInfo['work_sn']
|
|
|
+ ]));
|
|
|
+ }
|
|
|
|
|
|
//判断是否是美团订单,如果是,则取消美团订单
|
|
|
ThirdOrderLogic::merchantcancelorder($params['id']);
|