From fd5f112ea90212051efc2aa59ca1b95d1b06f430 Mon Sep 17 00:00:00 2001 From: "home.fengxinyhyl" Date: Mon, 1 Apr 2024 23:02:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/order/StoreOrderRepository.php | 4 +++- app/common/repositories/user/UserRepository.php | 3 ++- app/common/repositories/wechat/RoutineQrcodeRepository.php | 2 ++ app/controller/api/store/order/StoreOrder.php | 3 +++ crmeb/services/ExpressService.php | 4 ++++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index fab1cc8..c968aaf 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -1709,7 +1709,9 @@ class StoreOrderRepository extends BaseRepository $order = $this->dao->get($orderId); if ($merId && $order['mer_id'] != $merId) throw new ValidateException('订单信息不存在'); if (!in_array($order['delivery_type'], [1, 4])) throw new ValidateException('订单状态错误'); - return ExpressService::express($order->delivery_id, $order->delivery_name, $order->user_phone); + Log::info('DDDDDD'); + return []; +// return ExpressService::express($order->delivery_id, $order->delivery_name, $order->user_phone); } public function checkPrinterConfig(int $merId) diff --git a/app/common/repositories/user/UserRepository.php b/app/common/repositories/user/UserRepository.php index 88b7170..fc3682e 100644 --- a/app/common/repositories/user/UserRepository.php +++ b/app/common/repositories/user/UserRepository.php @@ -39,6 +39,7 @@ use think\exception\ValidateException; use think\facade\Cache; use think\facade\Config; use think\facade\Db; +use think\facade\Log; use think\facade\Queue; use think\facade\Route; use think\Model; @@ -788,7 +789,7 @@ class UserRepository extends BaseRepository public function mpQrcode(User $user) { $name = md5('surt_i' . $user['uid'] . $user['is_promoter'] . date('Ymd')) . '.jpg'; - + Log::info("mpQrcode name is ".$name); return app()->make(QrcodeService::class)->getRoutineQrcodePath($name, 'pages/index/index', 'spid=' . $user['uid']); } diff --git a/app/common/repositories/wechat/RoutineQrcodeRepository.php b/app/common/repositories/wechat/RoutineQrcodeRepository.php index 0f448db..7723eac 100644 --- a/app/common/repositories/wechat/RoutineQrcodeRepository.php +++ b/app/common/repositories/wechat/RoutineQrcodeRepository.php @@ -17,6 +17,7 @@ namespace app\common\repositories\wechat; use app\common\dao\wechat\RoutineQrcodeDao; use app\common\repositories\BaseRepository; use crmeb\services\MiniProgramService; +use think\facade\Log; /** * Class RoutineQrcodeRepository @@ -66,6 +67,7 @@ class RoutineQrcodeRepository extends BaseRepository */ public function getPageCode($page = '', $pramam = "", $width = 280) { + Log::info("getPageCode ". json_encode(array('page' => $page, 'pramam' => $pramam), JSON_UNESCAPED_UNICODE)); return MiniProgramService::create()->qrcodeService()->appCodeUnlimit($pramam, $page, $width); } } diff --git a/app/controller/api/store/order/StoreOrder.php b/app/controller/api/store/order/StoreOrder.php index daa788e..554e0b1 100644 --- a/app/controller/api/store/order/StoreOrder.php +++ b/app/controller/api/store/order/StoreOrder.php @@ -257,13 +257,16 @@ class StoreOrder extends BaseController public function express($id) { + Log::info("111111"); $order = $this->repository->getWhere(['order_id' => $id, 'is_del' => 0]); if (!$order) return app('json')->fail('订单不存在'); if (!$order->delivery_type || !$order->delivery_id) return app('json')->fail('订单未发货'); + Log::info("aaaaa"); $express = $this->repository->express($id,null); $order->append(['orderProduct']); + Log::info("bbbb"); return app('json')->success(compact('express', 'order')); } diff --git a/crmeb/services/ExpressService.php b/crmeb/services/ExpressService.php index d696cd1..b54978a 100644 --- a/crmeb/services/ExpressService.php +++ b/crmeb/services/ExpressService.php @@ -19,6 +19,7 @@ use app\common\repositories\store\shipping\ExpressRepository; use think\exception\ValidateException; use think\facade\Cache; use think\facade\Config; +use think\facade\Log; class ExpressService { @@ -111,12 +112,15 @@ class ExpressService if ($is_shunfeng == 'SF') { $suffix = ':'.substr($phone,7); } + Log::info('EEEEEE'); $com = app()->make(ExpressRepository::class)->getSearch(['name' => $name])->value('code'); + Log::info('ffff'); $result = self::query($sn.$suffix, $com, ['phone' => $phone]); if(!empty($result['list'])){ Cache::set('express_' . $sn, $result['list'], $result['cacheTime']); $result = $result['list']; } + Log::info('gggg'); } return $result ?? []; }