yingzi 2 年之前
父节点
当前提交
63d02e8a88

+ 5 - 5
Controller/Common/AliPayNotify.Class.php

@@ -42,7 +42,7 @@ class AliPayNotify extends BaseController
         if($flag){
             //处理业务,并从$_POST中提取需要的参数内容
             if($_POST['trade_status'] == 'TRADE_SUCCESS' || $_POST['trade_status'] == 'TRADE_FINISHED'){ // 处理交易完成或者支付成功的通知
-                file_put_contents('/apps/logs/alipay.log',date('Y-m-d H:i:s').'回调数据'.var_export($_POST,true).PHP_EOL,FILE_APPEND);
+                file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/alipay.log',date('Y-m-d H:i:s').'回调数据'.var_export($_POST,true).PHP_EOL,FILE_APPEND);
                 $passback_params = urldecode($_POST['passback_params']); // 回传参数
                 $attach = explode('|',$passback_params);
 
@@ -77,7 +77,7 @@ class AliPayNotify extends BaseController
                     }
 
                     if(!$result->isSuccess()){
-                        file_put_contents('/apps/logs/alipay.log',date('Y-m-d H:i:s').'修改订单状态失败'.var_export($result->getData(),true).PHP_EOL,FILE_APPEND);
+                        file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/alipay.log',date('Y-m-d H:i:s').'修改订单状态失败'.var_export($result->getData(),true).PHP_EOL,FILE_APPEND);
                         exit('fail');
                     }else{
                         exit('success');// 响应success表示业务处理成功,告知支付宝无需在异步通知
@@ -99,7 +99,7 @@ class AliPayNotify extends BaseController
 
 
                     if(!$result->isSuccess()){
-                        file_put_contents('/apps/logs/alipay.log',date('Y-m-d H:i:s').'修改会员卡订单状态失败'.var_export($result->getData(),true).PHP_EOL,FILE_APPEND);
+                        file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/alipay.log',date('Y-m-d H:i:s').'修改会员卡订单状态失败'.var_export($result->getData(),true).PHP_EOL,FILE_APPEND);
                         exit('fail');
                     }else{
                         exit('success');// 响应success表示业务处理成功,告知支付宝无需在异步通知
@@ -109,10 +109,10 @@ class AliPayNotify extends BaseController
                 exit('fail');
 
             }else{
-                file_put_contents('/apps/logs/alipay.log',date('Y-m-d H:i:s').'状态错误'.var_export($_POST,true).PHP_EOL,FILE_APPEND);
+                file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/alipay.log',date('Y-m-d H:i:s').'状态错误'.var_export($_POST,true).PHP_EOL,FILE_APPEND);
             }
         }else{
-            file_put_contents('/apps/logs/alipay.log',date('Y-m-d H:i:s').'签名验证失败'.var_export($_POST,true).PHP_EOL,FILE_APPEND);
+            file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/alipay.log',date('Y-m-d H:i:s').'签名验证失败'.var_export($_POST,true).PHP_EOL,FILE_APPEND);
         }
     }
 

+ 1 - 1
Controller/Common/Logger.Class.php

@@ -13,7 +13,7 @@ class Logger
     /**
      * @var string 外部php生成日志路基
      */
-    private static $customFileLogDir = '/data/www/logs/';
+    private static $customFileLogDir = '/www/wwwroot/logs/';
 
     /**
      * 写入php错误日志

+ 1 - 0
Controller/Common/Login.Class.php

@@ -45,6 +45,7 @@ class Login extends BaseController
         // 获取当前登录企业的小程序配置
         $objSystemCache = new SystemCache();
         $miniprogramSetting = $objSystemCache->getAppIdByEnterpriseId($this->onlineEnterpriseId);
+        
         if( empty($miniprogramSetting) ){
             parent::sendOutput('后台小程序配置项为空', ErrorCode::$configEroor);
         }

+ 5 - 2
Controller/Common/Test.Class.php

@@ -2521,7 +2521,7 @@ ALTER TABLE `www.qianniao.vip`.`qianniao_staff_1` MODIFY COLUMN `userCenterId` i
     public function dishChaangeNotify()
     {
         $postStr = file_get_contents('php://input');
-        file_put_contents('/apps/logs/keruyun.log', date('Y-m-d H:i:s') . '回调数据' . var_export($postStr, true) . PHP_EOL, FILE_APPEND);
+        file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/keruyun.log', date('Y-m-d H:i:s') . '回调数据' . var_export($postStr, true) . PHP_EOL, FILE_APPEND);
     }
 
     /**
@@ -2624,6 +2624,9 @@ ALTER TABLE `www.qianniao.vip`.`qianniao_staff_1` MODIFY COLUMN `userCenterId` i
     public function webstock()
     {
         $swooleServerConfigData = Factory::config()->getAppoint('swooleServer', 'order');
+
+        
+        
         if (empty($swooleServerConfigData)) {
             echo('swoole服务端链接信息配置项错误');
             exit();
@@ -2636,7 +2639,7 @@ ALTER TABLE `www.qianniao.vip`.`qianniao_staff_1` MODIFY COLUMN `userCenterId` i
             'action' => 'autoSend',
             'params' => [
                 'platfrom' => 'qianniaoSAAS',
-                'shop_id' => 1,
+                'shop_id' => 9,
             ]
         ];
         $swooleClient->sendJson($data);

+ 11 - 11
Controller/Common/WeiXinOpen.Class.php

@@ -53,7 +53,7 @@ class WeiXinOpen extends BaseController
     {
 
         $postStr = file_get_contents('php://input');
-        file_put_contents('/apps/logs/weixinopen.log', date('Y-m-d H:i:s') . '回调数据' . var_export($postStr, true) . PHP_EOL, FILE_APPEND);
+        file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinopen.log', date('Y-m-d H:i:s') . '回调数据' . var_export($postStr, true) . PHP_EOL, FILE_APPEND);
         if (empty($postStr)) {
             exit('faild');
         }
@@ -80,17 +80,17 @@ class WeiXinOpen extends BaseController
         $objOem = new MOem();
         $oemData = $objOem->getOemInfoByWeiXinOpenAppId($data['AppId']);
         if(!$oemData->isSuccess()){
-            file_put_contents('/apps/logs/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取配置错误' . PHP_EOL, FILE_APPEND);
+            file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取配置错误' . PHP_EOL, FILE_APPEND);
             exit('faild');
         }
         $oemData = $oemData->getData();
         if(empty($oemData)){
-            file_put_contents('/apps/logs/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取配置为空' . PHP_EOL, FILE_APPEND);
+            file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取配置为空' . PHP_EOL, FILE_APPEND);
             exit('faild');
         }
         $oplatformConfigData = json_decode($oemData['weixinOpen'], true);
         if( empty($oplatformConfigData) ){
-            file_put_contents('/apps/logs/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取开放平台配置为空' . PHP_EOL, FILE_APPEND);
+            file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取开放平台配置为空' . PHP_EOL, FILE_APPEND);
             exit('faild');
         }
 
@@ -132,7 +132,7 @@ class WeiXinOpen extends BaseController
     {
         $appid = $this->request->param('request_id');
         $postStr = file_get_contents('php://input');
-        file_put_contents('/apps/logs/weixinopen.log', date('Y-m-d H:i:s') . $appid . '回调数据' . var_export($postStr, true) . PHP_EOL, FILE_APPEND);
+        file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinopen.log', date('Y-m-d H:i:s') . $appid . '回调数据' . var_export($postStr, true) . PHP_EOL, FILE_APPEND);
         if (empty($postStr)) {
             exit('faild');
         }
@@ -159,17 +159,17 @@ class WeiXinOpen extends BaseController
         $objOem = new MOem();
         $oemData = $objOem->getOemInfoByWeiXinOpenAppId($data['AppId']);
         if(!$oemData->isSuccess()){
-            file_put_contents('/apps/logs/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取配置错误' . PHP_EOL, FILE_APPEND);
+            file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取配置错误' . PHP_EOL, FILE_APPEND);
             exit('faild');
         }
         $oemData = $oemData->getData();
         if(empty($oemData)){
-            file_put_contents('/apps/logs/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取配置为空' . PHP_EOL, FILE_APPEND);
+            file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取配置为空' . PHP_EOL, FILE_APPEND);
             exit('faild');
         }
         $oplatformConfigData = json_decode($oemData['weixinOpen'], true);
         if( empty($oplatformConfigData) ){
-            file_put_contents('/apps/logs/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取开放平台配置为空' . PHP_EOL, FILE_APPEND);
+            file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinopen.log', date('Y-m-d H:i:s') . '从oem表获取开放平台配置为空' . PHP_EOL, FILE_APPEND);
             exit('faild');
         }
 
@@ -181,7 +181,7 @@ class WeiXinOpen extends BaseController
 
         $xmlContent = $result->getData();
         $data = json_decode(json_encode(simplexml_load_string($xmlContent, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
-        file_put_contents('/apps/logs/weixinopen.log', date('Y-m-d H:i:s') . $appid . '回调数据' . var_export($data, true) . PHP_EOL, FILE_APPEND);
+        file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinopen.log', date('Y-m-d H:i:s') . $appid . '回调数据' . var_export($data, true) . PHP_EOL, FILE_APPEND);
 
         $objMEnterpriseBindTemplate = new MEnterpriseBindTemplate(null, null);
 
@@ -229,7 +229,7 @@ class WeiXinOpen extends BaseController
                     echo($result->getData());exit();
                 }
                 $xmlContent = $result->getData();
-                file_put_contents('/apps/logs/weixinopen.log', date('Y-m-d H:i:s'). '回调数据' . var_export($xmlContent, true) . PHP_EOL, FILE_APPEND);
+                file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinopen.log', date('Y-m-d H:i:s'). '回调数据' . var_export($xmlContent, true) . PHP_EOL, FILE_APPEND);
                 */
             }
 
@@ -257,7 +257,7 @@ class WeiXinOpen extends BaseController
                 $objMiniprogram = new Miniprogram($miniprogramConfigData['appid'], $miniprogramConfigData['appSecret']);
                 $sendMessage = $query_auth_code.'_from_api';
                 $result = $objMiniprogram->messageCustomSend($authorizer_access_token, $sendMessage,$data['FromUserName']);
-                file_put_contents('/apps/logs/weixinopen.log', date('Y-m-d H:i:s'). '回调数据' . var_export($result, true) . PHP_EOL, FILE_APPEND);
+                file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinopen.log', date('Y-m-d H:i:s'). '回调数据' . var_export($result, true) . PHP_EOL, FILE_APPEND);
                 if (!$result->isSuccess()) {
                     echo($result->getData());exit();
                 }

+ 1 - 1
Controller/Common/WeiXinPayNotify.Class.php

@@ -45,7 +45,7 @@ class WeiXinPayNotify extends BaseController
     {
 
         $postStr = file_get_contents('php://input');// 将整个文件读入字符串
-        file_put_contents('/apps/logs/weixinpay.log',date('Y-m-d H:i:s').'回调数据'.var_export($postStr,true).PHP_EOL,FILE_APPEND);
+        file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/weixinpay.log',date('Y-m-d H:i:s').'回调数据'.var_export($postStr,true).PHP_EOL,FILE_APPEND);
 
         /*
         $postStr = '<xml><appid><![CDATA[wxb2198cca99031de1]]></appid>

+ 3 - 3
Controller/Cron/CustomerCron.Class.php

@@ -81,7 +81,7 @@ class CustomerCron
             $orders = $this->objDVipCardOrder->query($sql);
             if ($orders === false) {
                 $this->objDVipCardOrder->rollBack();
-                file_put_contents('/apps/logs/cron.log',date('Y-m-d H:i:s').'查询会员卡订单表失败'.var_export($orders,true).PHP_EOL,FILE_APPEND);
+                file_put_contents('/www/wwwroot/cron.log',date('Y-m-d H:i:s').'查询会员卡订单表失败'.var_export($orders,true).PHP_EOL,FILE_APPEND);
             }
 
             //循环处理订单   把会员卡销售数量减1,并删除订单
@@ -91,14 +91,14 @@ class CustomerCron
                     $result = $this->objDVipCardOrder->query($sql);
                     if ($result === false) {
                         $this->objDVipCardOrder->rollBack();
-                        file_put_contents('/apps/logs/cron.log',date('Y-m-d H:i:s').'修改会员卡销售数量失败'.var_export($result,true).PHP_EOL,FILE_APPEND);
+                        file_put_contents('/www/wwwroot/cron.log',date('Y-m-d H:i:s').'修改会员卡销售数量失败'.var_export($result,true).PHP_EOL,FILE_APPEND);
                     }
 
                     $sql = "DELETE FROM ".$vipCardOrderTable.' where id='.$order['id'];
                     $dbResult = $this->objDVipCardOrder->query($sql);
                     if ($dbResult === false) {
                         $this->objDVipCardOrder->rollBack();
-                        file_put_contents('/apps/logs/cron.log',date('Y-m-d H:i:s').'删除会员卡订单失败'.var_export($result,true).PHP_EOL,FILE_APPEND);
+                        file_put_contents('/www/wwwroot/cron.log',date('Y-m-d H:i:s').'删除会员卡订单失败'.var_export($result,true).PHP_EOL,FILE_APPEND);
                     }
                 }
             }

+ 12 - 2
Controller/Cron/FinanceCron.Class.php

@@ -112,7 +112,16 @@ class FinanceCron
             ];
             $updateResult = $this->objMReceived->updateReceivedStatus($params);
             if($updateResult->isSuccess() == false) {
-                echo "企业".$record['enterpriseId']."下的收款单".$record['receivedNo']."审核失败,原因:" . $updateResult->getData();
+                echo "企业".$record['enterpriseId']."下的收款单".$record['receivedNo']."审核失败001,原因:" . $updateResult->getData();
+                if($updateResult->getData()=="当前收款单已经审核过了"){
+                    echo "正在删除失效队列记录";
+                    $result = $this->objDReceivedReceiptCheckQueue->delete($record['id']);
+                    if($result === false){
+                    echo "队列记录删除失败,原因:".$this->objDReceivedReceiptCheckQueue->error();
+                    } else {
+                        echo "队列记录删除成功";
+                    }
+                }
             } else {
                 //审核成功后删除队列数据
                 echo "企业".$record['enterpriseId']."下的收款单".$record['receivedNo']."审核成功,正在删除队列记录". PHP_EOL;;
@@ -120,9 +129,10 @@ class FinanceCron
                 if($result === false){
                     echo "队列记录删除失败,原因:".$this->objDReceivedReceiptCheckQueue->error();
                 } else {
-                    echo "队列记录删除成功". PHP_EOL;;
+                    echo "队列记录删除成功";
                 }
             }
+            echo PHP_EOL;
         }
     }
 }

+ 3 - 3
Controller/Cron/GetWxAuditStatus.Class.php

@@ -41,11 +41,11 @@ class GetWxAuditStatus
         //获取正在审核中小程序的审核状态
         $dbResult = $this->objDEnterpriseBindTemplate->select(['enableStatus' => StatusCode::$standard, 'auditStatus' => StatusCode::$wxAuditStatus['inAudit']]);
         if ($dbResult === false) {
-            file_put_contents('/data/www/logs/cron.log', date('Y-m-d H:i:s') . '查询审核中模版失败: ' . var_export($this->objDEnterpriseBindTemplate->error(), true) . PHP_EOL, FILE_APPEND);
+            file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/cron.log', date('Y-m-d H:i:s') . '查询审核中模版失败: ' . var_export($this->objDEnterpriseBindTemplate->error(), true) . PHP_EOL, FILE_APPEND);
             die;
         }
         if (empty($dbResult)) {
-            file_put_contents('/data/www/logs/cron.log', date('Y-m-d H:i:s') . '暂时没有审核中的模版' . PHP_EOL, FILE_APPEND);
+            file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/cron.log', date('Y-m-d H:i:s') . '暂时没有审核中的模版' . PHP_EOL, FILE_APPEND);
             die;
         }
 
@@ -57,7 +57,7 @@ class GetWxAuditStatus
                 'auditId'      => $value['auditId'],
             ]);
             if (!$dbResult->isSuccess()){
-                file_put_contents('/data/www/logs/cron.log', date('Y-m-d H:i:s') . '查询审核状态失败: ' . var_export($dbResult->getData(), true) . PHP_EOL, FILE_APPEND);
+                file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/cron.log', date('Y-m-d H:i:s') . '查询审核状态失败: ' . var_export($dbResult->getData(), true) . PHP_EOL, FILE_APPEND);
                 continue;
             }
         }

+ 5 - 5
Controller/Cron/OrderCron.Class.php

@@ -99,7 +99,7 @@ class OrderCron
         foreach ($this->enterprises as $item) {
             //检查企业是否配置订单未支付自动关闭
             if (empty((int) $item['orderAutoCloseSec'])) {
-                file_put_contents('/data/www/logs/cron.log', date('Y-m-d H:i:s') . $item['enterpriseName'] . '未配置订单自动关闭时间,不进行处理' . PHP_EOL, FILE_APPEND);
+                file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/cron.log', date('Y-m-d H:i:s') . $item['enterpriseName'] . '未配置订单自动关闭时间,不进行处理' . PHP_EOL, FILE_APPEND);
                 echo $item['enterpriseName'].'未配置自动取消时间'.PHP_EOL;
                 continue;
             }
@@ -116,7 +116,7 @@ class OrderCron
             // 根据索引表查询订单索引数据
             $orderList = $this->objDOrderIndex->query($sql);
             if ($orderList === false) {
-                file_put_contents('/data/www/logs/cron.log', date('Y-m-d H:i:s') . $item['enterpriseName'] . '查询订单时出错' . $this->objDOrderIndex->error() . PHP_EOL, FILE_APPEND);
+                file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/cron.log', date('Y-m-d H:i:s') . $item['enterpriseName'] . '查询订单时出错' . $this->objDOrderIndex->error() . PHP_EOL, FILE_APPEND);
                 echo '查询订单时出错'.$this->objDOrderIndex->error().PHP_EOL;
                 continue;
             }
@@ -153,7 +153,7 @@ class OrderCron
                     ['id' => $row]
                 );
                 if ($orderUpdate === false) {
-                    file_put_contents('/data/www/logs/cron.log', date('Y-m-d H:i:s') . $item['enterpriseName'] . 'update订单时出错' . $this->objDOrder->error() . PHP_EOL, FILE_APPEND);
+                    file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/cron.log', date('Y-m-d H:i:s') . $item['enterpriseName'] . 'update订单时出错' . $this->objDOrder->error() . PHP_EOL, FILE_APPEND);
                     $this->objDOrderIndex->rollBack();
                     die('更新订单时出错');
                 }
@@ -162,7 +162,7 @@ class OrderCron
                 $objMInventory = new MInventory($item['enterpriseId'], '');
                 $unlockResult = $objMInventory->unlockInventory($row, StatusCode::$orderType['saleOrder'], $this->nowTime);
                 if (!$unlockResult->isSuccess()) {
-                    file_put_contents('/data/www/logs/cron.log', date('Y-m-d H:i:s') . $item['enterpriseName'] . '解锁库存时出错' . $unlockResult->getData() . PHP_EOL, FILE_APPEND);
+                    file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/cron.log', date('Y-m-d H:i:s') . $item['enterpriseName'] . '解锁库存时出错' . $unlockResult->getData() . PHP_EOL, FILE_APPEND);
                     $this->objDOrderIndex->rollBack();
                     die('关闭订单时解锁库存失败');
                 }
@@ -181,7 +181,7 @@ class OrderCron
             );
 
             if ($orderIndexUpdate === false) {
-                file_put_contents('/data/www/logs/cron.log', date('Y-m-d H:i:s') . $item['enterpriseName'] . '解锁库存时出错' . $this->objDOrderIndex->error() . PHP_EOL, FILE_APPEND);
+                file_put_contents('/www/wwwroot/logs/apiqnys.liuniukj.com/cron.log', date('Y-m-d H:i:s') . $item['enterpriseName'] . '解锁库存时出错' . $this->objDOrderIndex->error() . PHP_EOL, FILE_APPEND);
                 $this->objDOrderIndex->rollBack();
                 die('更新订单索引表时出错');
             }