WIN-2308041133\Administrator 5 달 전
부모
커밋
0e2e9b6ec6
2개의 변경된 파일4개의 추가작업 그리고 18개의 파일을 삭제
  1. 1 16
      application/api/controller/Lave.php
  2. 3 2
      extend/liuniu/repositories/LaveRepository.php

+ 1 - 16
application/api/controller/Lave.php

@@ -192,22 +192,7 @@ class Lave extends Api
         $order['plan_id'] = $plan_id;
         if ($orderId) {
             $orderInfo = LaveMonthModel::where('order_id', $orderId)->find();
-
-            @file_put_contents("quanju.txt", $orderId."-订单id\r\n", 8);
-            @file_put_contents("quanju.txt", json_encode($orderInfo)."-创建支付订单搜索\r\n", 8);
-            if (!$orderInfo){
-                $a=true;
-            }else{
-                $a=false;
-            }
-            if (!isset($orderInfo['paid'])){
-                $b=true;
-            }else{
-                $b=false;
-            }
-            if ($a || $b){
-                var_dump($a);
-                var_dump($b);die();
+            if (!$orderInfo || !isset($orderInfo['paid'])){
                 $this->error('支付订单不存在!');
             }
             if ($orderInfo['paid']) $this->error('支付已支付!');

+ 3 - 2
extend/liuniu/repositories/LaveRepository.php

@@ -3,6 +3,7 @@
 namespace liuniu\repositories;
 
 use app\common\model\Lave as LaveModel;
+use app\common\model\LaveMonth as LaveMonthModel;
 use app\common\model\UserRelation;
 use liuniu\MiniProgramService;
 use liuniu\WechatService;
@@ -89,7 +90,7 @@ class LaveRepository
     public static function wxpaySign($cid, $orderId,$plan_record, $field = "order_id")
     {
         if (is_string($orderId))
-            $orderInfo = LaveModel::where($field, $orderId)->find();
+            $orderInfo = LaveMonthModel::where($field, $orderId)->find();
         else
             $orderInfo = $orderId;
         if (!$orderInfo || !isset($orderInfo['paid'])) exception('支付订单不存在!');
@@ -115,7 +116,7 @@ class LaveRepository
     public static function jsPaySign($cid, $orderId,$plan_record, $field = 'order_id')
     {
         if (is_string($orderId))
-            $orderInfo = LaveModel::where($field, $orderId)->find();
+            $orderInfo = LaveMonthModel::where($field, $orderId)->find();
         else
             $orderInfo = $orderId;
         if (!$orderInfo || !isset($orderInfo['paid'])) exception('支付订单不存在!');