From 93a45242f24e80b8cbcb87b44c6b67698b9b7b01 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 4 Nov 2023 10:35:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/order/StoreOrderRepository.php | 1 - .../repositories/store/product/ProductReplyRepository.php | 1 - app/controller/api/Auth.php | 4 ++++ app/listener/ProductCreate.php | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 0d950d05..54fb4984 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -159,7 +159,6 @@ class StoreOrderRepository extends BaseRepository Db::commit(); }catch (Exception $e) { Db::rollback(); - halt($e); throw new ValidateException('余额支付失败'); } diff --git a/app/common/repositories/store/product/ProductReplyRepository.php b/app/common/repositories/store/product/ProductReplyRepository.php index 5453a16c..1f7d8c23 100644 --- a/app/common/repositories/store/product/ProductReplyRepository.php +++ b/app/common/repositories/store/product/ProductReplyRepository.php @@ -230,7 +230,6 @@ class ProductReplyRepository extends BaseRepository public function reply(array $data) { - halt(1); $storeOrderProductRepository = app()->make(StoreOrderProductRepository::class); $orderProduct = $storeOrderProductRepository->userOrderProduct($data['order_product_id'], $data['uid']); if (!$orderProduct || !$orderProduct->orderInfo) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index cf1b61bb..52ddbda4 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -188,6 +188,10 @@ class Auth extends BaseController public function test() { + $merchant = Db::name('merchant')->where('status', 1)->where('is_del', 0)->where('mer_id',56)->find(); + $cityMerchant = Db::name('merchant')->where('status', 1)->where('mer_state', 1)->where('category_id', $merchant['category_id'])->where('type_id', Merchant::TypeSupplyChain)->find(); + $product_id = Db::name('store_product')->where('mer_id', $cityMerchant['mer_id'])->where('bar_code', '6926265365132')->value('product_id'); + $type = $this->request->param('type'); $res = []; switch ($type) { diff --git a/app/listener/ProductCreate.php b/app/listener/ProductCreate.php index 6876b435..67808070 100644 --- a/app/listener/ProductCreate.php +++ b/app/listener/ProductCreate.php @@ -7,12 +7,14 @@ namespace app\listener; use app\common\model\system\merchant\Merchant; use app\common\repositories\store\product\ProductRepository; use think\facade\Db; +use think\facade\Log; class ProductCreate { public function handle($event) { + Log::error(json_encode($event)); $product = $event['product']; // $data = $event['data']; // $contentType = $event['conType'];