From bcd0aa73c059f7b167cdf6b6b4cd8f4f09f0bd30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0?= Date: Fri, 5 Sep 2025 15:35:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ZengJieCode/controller/app/Savemsg.php | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/application/ZengJieCode/controller/app/Savemsg.php b/application/ZengJieCode/controller/app/Savemsg.php index 94c1951..aba25c4 100644 --- a/application/ZengJieCode/controller/app/Savemsg.php +++ b/application/ZengJieCode/controller/app/Savemsg.php @@ -391,23 +391,28 @@ class Savemsg extends Base{ // // 添加测试一维码数据 // 添加测试打包数据 - $zengjie = Db::connect('zengjie_db'); - $records = $zengjie->table('sn_code_all') - ->where('batch_id', 'null') // 或者使用 ->whereNull('batch_id') - ->orderRaw('NEWID()') // SQL Server的随机排序函数 - ->limit(10) - ->select(); - $data['sn_code_all'] = []; - $data['box_serial_number'] = '3ST011527003'; - for ($i=0; $i < count($records); $i++) { - $data['sn_code_all'][] = $records[$i]['sn_code']; - } - $data['sn_code_all'] = implode(',',$data['sn_code_all']); - $result = $this->save_box_msg_action($data); - dump($result); - dump($data); + // $zengjie = Db::connect('zengjie_db'); + // $records = $zengjie->table('sn_code_all') + // ->where('batch_id', 'null') // 或者使用 ->whereNull('batch_id') + // ->orderRaw('NEWID()') // SQL Server的随机排序函数 + // ->limit(10) + // ->select(); + // $data['sn_code_all'] = []; + // $data['box_serial_number'] = '3ST011527003'; + // for ($i=0; $i < count($records); $i++) { + // $data['sn_code_all'][] = $records[$i]['sn_code']; + // } + // $data['sn_code_all'] = implode(',',$data['sn_code_all']); + // $result = $this->save_box_msg_action($data); + // dump($result); + // dump($data); // 添加测试打包数据 // return $data; + + + + + // '0386737300007235,0039376500007203,0059052100007102,0124589700007184,0032838000007113,0170457400007162,0170448500007207,0170466000006965,0426058900007228,0006613600007105' } } \ No newline at end of file