From 3f9bda6bef1658bebcba8842600678fee71ffd34 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 2 Aug 2024 20:50:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(OrderLogic):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E4=BA=86=E7=94=9F=E6=88=90=E6=A0=B8=E9=94=80=E7=A0=81=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E4=BB=A5=E4=BC=98=E5=8C=96=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=A4=84=E7=90=86=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/order/OrderLogic.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 366904332..2196187d1 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -315,12 +315,12 @@ class OrderLogic extends BaseLogic throw new \Exception('余额不足'); } //生成核销码 - $generator = new BarcodeGeneratorPNG(); - $barcode = $generator->getBarcode($verify_code, $generator::TYPE_CODE_128); - $findPath = '/image/barcode/' . time() . '.png'; - $savePath = public_path() . $findPath; - file_put_contents($savePath, $barcode); - $_order['verify_img'] = $findPath; + // $generator = new BarcodeGeneratorPNG(); + // $barcode = $generator->getBarcode($verify_code, $generator::TYPE_CODE_128); + // $findPath = '/image/barcode/' . time() . '.png'; + // $savePath = public_path() . $findPath; + // file_put_contents($savePath, $barcode); + // $_order['verify_img'] = $findPath; Db::startTrans(); try { $order = StoreOrder::create($_order); From ee8a43b2acc6a7f8466284638956de6d13b2028e Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 2 Aug 2024 20:54:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat(OrderLogic):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=A4=84=E7=90=86=E6=B5=81=E7=A8=8B=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=95=86=E5=93=81=E5=AD=97=E6=AE=B5=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/order/OrderLogic.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 2196187d1..841082a8a 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -71,7 +71,7 @@ class OrderLogic extends BaseLogic self::setError('购物车为空'); return false; } - try { + // try { self::$total_price = 0; self::$pay_price = 0; self::$cost = 0; //成本由采购价替代原成本为门店零售价 @@ -94,7 +94,7 @@ class OrderLogic extends BaseLogic $find['top_cate_id']=$find['cate_id']; if($StoreCategory && $StoreCategory['pid']>0){ $StoreCategory2=StoreCategory::where('id',$StoreCategory['pid'])->find(); - if($StoreCategory2 && $StoreCategory['pid']>0){ + if($StoreCategory2 && $StoreCategory2['pid']>0){ $find['top_cate_id']=$StoreCategory2['pid']; }else{ $find['top_cate_id']=$StoreCategory['pid']; @@ -246,10 +246,10 @@ class OrderLogic extends BaseLogic } } } - } catch (\Exception $e) { - self::setError($e->getMessage()); - return false; - } + // } catch (\Exception $e) { + // self::setError($e->getMessage()); + // return false; + // } return ['order' => $order, 'cart_list' => $cart_select, 'shopInfo' => $store['near_store']]; } From f33a4d4ae8598ae092f427ffdac1fa7d2ad16447 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 2 Aug 2024 20:55:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat(OrderLogic):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=A4=84=E7=90=86=E6=B5=81=E7=A8=8B=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=95=86=E5=93=81=E5=AD=97=E6=AE=B5=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/order/OrderLogic.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 841082a8a..4f0656041 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -71,7 +71,7 @@ class OrderLogic extends BaseLogic self::setError('购物车为空'); return false; } - // try { + try { self::$total_price = 0; self::$pay_price = 0; self::$cost = 0; //成本由采购价替代原成本为门店零售价 @@ -246,10 +246,10 @@ class OrderLogic extends BaseLogic } } } - // } catch (\Exception $e) { - // self::setError($e->getMessage()); - // return false; - // } + } catch (\Exception $e) { + self::setError($e->getMessage()); + return false; + } return ['order' => $order, 'cart_list' => $cart_select, 'shopInfo' => $store['near_store']]; }