From 23d1affda50df2117fedc73e575b09c3ac6f56ce Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sun, 28 Jan 2024 11:54:42 +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/controller/api/Demo.php | 7 ++++++- app/controller/api/store/order/StoreProcessing.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controller/api/Demo.php b/app/controller/api/Demo.php index e7044a53..22c7289f 100755 --- a/app/controller/api/Demo.php +++ b/app/controller/api/Demo.php @@ -21,6 +21,7 @@ use Exception; use ZipArchive; use think\facade\Queue; use crmeb\jobs\ProductCopyJob; +use app\controller\api\store\order\StoreProcessing; /** * Class Auth @@ -32,7 +33,11 @@ class Demo extends BaseController { public function index() { - return app('json')->success('修改成功'); + return app('json')->success('修改成功'); + $find= Db::name('store_order')->where('order_id',78)->find(); + $StoreProcessing= app()->make(StoreProcessing::class); + $a= $StoreProcessing->AutomaticallyCreateOrders($find); +halt($a); //[31,32,118,39,167,236,237,238,239] // return app('json')->success('修改成功');>whereIn('mer_id',[110,116,149,227,226,35,117,148,156,104,137,151,136,183,140,229,79,133,235])-> // $merchant = Db::name('merchant')->where('mer_id', 31)->find(); diff --git a/app/controller/api/store/order/StoreProcessing.php b/app/controller/api/store/order/StoreProcessing.php index 7f180d5a..7a197c02 100755 --- a/app/controller/api/store/order/StoreProcessing.php +++ b/app/controller/api/store/order/StoreProcessing.php @@ -23,7 +23,6 @@ class StoreProcessing extends BaseController $merchant_two = Db::name('merchant')->where('mer_id', $order['mer_id'])->find(); $store_group_order = Db::name('store_group_order')->where('group_order_id', $order['group_order_id'])->find(); $store_group_order_other = Db::name('store_group_order_other')->where('group_order_sn', $order['order_sn'])->find(); - if (!$store_group_order_other) { unset($store_group_order['group_order_id']); $group_order_id = Db::name('store_group_order_other')->strict(false)->insertGetId($store_group_order); @@ -54,6 +53,7 @@ class StoreProcessing extends BaseController } // $financialRecordRepository->insertAll($finance); Db::name('store_order_product_other')->strict(false)->insertAll($arr); + return $order_id; } } }