Ver Fonte

tmp - 放开验证

liugc há 1 ano atrás
pai
commit
dcf06412d3
1 ficheiros alterados com 6 adições e 5 exclusões
  1. 6 5
      app/common/controller/InternalApiController.php

+ 6 - 5
app/common/controller/InternalApiController.php

@@ -22,12 +22,13 @@ class InternalApiController extends BaseLikeAdminController
     private function checkSign(){
     private function checkSign(){
         $params = $this->request->param();
         $params = $this->request->param();
         // 验证IP
         // 验证IP
-        Log::info('内部请求参数'.json_encode($params));
         $sign = ExternalPlatform::getSign(env('internal_api.api_sign_key'),$params);
         $sign = ExternalPlatform::getSign(env('internal_api.api_sign_key'),$params);
-        if ($sign && $sign === $params['sign']) {
+        Log::info('内部请求参数'.json_encode([$params,$sign]));
+        return true;
+        /*if ($sign && $sign === $params['sign']) {
             return true;
             return true;
         }
         }
-        return false;
+        return false;*/
     }
     }
 
 
     public function changeAppointment()
     public function changeAppointment()
@@ -122,14 +123,14 @@ class InternalApiController extends BaseLikeAdminController
                 //更新工单状态为已取消
                 //更新工单状态为已取消
                 $service_work->service_status = 4;
                 $service_work->service_status = 4;
                 // 是否存在退款
                 // 是否存在退款
-                if($service_work->work_pay_status == 1 && (int)$params['is_refund'] == 1){
+                if($service_work->work_pay_status == 1 && (int)$params['is_refund'] == 1){ //全退不分给工程师
                     $service_work->service_status = 5;
                     $service_work->service_status = 5;
                     $service_work->work_pay_status = 2;
                     $service_work->work_pay_status = 2;
                     //取消订单
                     //取消订单
                     RechargeOrder::where(['user_id'=>$service_work->user_id,'work_id'=>$service_work->id])->update([
                     RechargeOrder::where(['user_id'=>$service_work->user_id,'work_id'=>$service_work->id])->update([
                         'pay_status' => 2,
                         'pay_status' => 2,
                     ]);
                     ]);
-                }else if($service_work->work_pay_status == 1 && (int)$params['is_refund'] == 0){
+                }else if($service_work->work_pay_status == 1 && (int)$params['is_refund'] == 0){ // 上门费分给工程师
                     $paid_amount = RechargeOrder::where('work_id', $service_work->id)->where('payment_type', 1)->value('paid_amount');
                     $paid_amount = RechargeOrder::where('work_id', $service_work->id)->where('payment_type', 1)->value('paid_amount');
                     if($paid_amount > 0){
                     if($paid_amount > 0){
                         // 存在上门费给工程师
                         // 存在上门费给工程师