Răsfoiți Sursa

Merge branch 'master' of e.coding.net:zdap/weixiu/weixiu_api into fenxiang-m

liugc 9 luni în urmă
părinte
comite
a3f9989f59

+ 4 - 12
app/adminapi/logic/works/ServiceWorkLogic.php

@@ -503,9 +503,9 @@ class ServiceWorkLogic extends BaseLogic
             ServiceWorkLogLogic::add($work_log);
             Db::commit();
 
-            /*$rechargeOrder = \app\common\model\orders\RechargeOrder::where('work_id',$work->id)
-                ->where('payment_type',0)
-                ->where('pay_status',1)
+            $rechargeOrder = \app\common\model\orders\RechargeOrder::where('work_id',$work->id)
+                //->where('payment_type',0)
+                //->where('pay_status',1)
                 ->findOrEmpty();
             if(!$rechargeOrder->isEmpty()){
                 ServiceOrderLogic::confirmServiceFinish([
@@ -515,15 +515,7 @@ class ServiceWorkLogic extends BaseLogic
                         'real_name'=>$work->real_name,
                     ]
                 ]);
-            }*/
-
-            ServiceOrderLogic::confirmServiceFinish([
-                'user_id'=>$work->user_id,
-                'sn'=>$rechargeOrder->sn,
-                'user_info'=>[
-                    'real_name'=>$work->real_name,
-                ]
-            ]);
+            }
 
             // 外部平台工单 - 通知外边平台
             if($work->external_platform_id > 0){

+ 10 - 1
app/common/controller/NotificTestController.php

@@ -7,6 +7,7 @@ use app\api\logic\PerformanceLogic;
 use app\api\logic\ServiceOrderLogic;
 use app\common\enum\PayEnum;
 use app\common\enum\worker\WorkerAccountLogEnum;
+use app\common\logic\ExternalPlatformLogic;
 use app\common\logic\PayNotifyLogic;
 use app\common\logic\WorkerAccountLogLogic;
 use app\common\model\external\ExternalPlatform;
@@ -21,8 +22,16 @@ use think\facade\Log;
 class NotificTestController extends BaseLikeAdminController
 {
     public array $notNeedLogin = ['addOnlineCustomerService','subOnlineCustomerService','getBusinessAllocationValue',
-        'customerSendMessage','assignBusinessToCustomer','customerClsMessage','getNotificList','getAllNotificList'];
+        'customerSendMessage','assignBusinessToCustomer','customerClsMessage','getNotificList','getAllNotificList','externalPlatformLogicTest'];
 
+    public function externalPlatformLogicTest(){
+        $prams = $this->request->param();
+        try {
+            dd(ExternalPlatformLogic::handleByScene($prams));
+        }catch(\Exception $e){
+            dd($e->getMessage());
+        }
+    }
 
     public function addOnlineCustomerService(){
         $prams = $this->request->param();

+ 1 - 1
app/common/logic/ExternalPlatformLogic.php

@@ -96,7 +96,7 @@ class ExternalPlatformLogic  extends BaseLogic
             if($model->isEmpty()){
                 throw new \Exception('工单不存在');
             }
-            if($model->external_platform_id = 0){
+            if($model->external_platform_id > 0){
                 $order_sns = \app\common\model\orders\RechargeOrder::where('work_id',$model->id)->column('sn');
                 $goods_payment_type = OrderGoods::whereIn('sn',$order_sns)->value('goods_payment_type');
                 if(in_array($goods_payment_type,['2','3'])) throw new \Exception('固定价无需分账处理');