From 2425d668b7c7ea2ac6ff292ee02c482361d08cb9 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Tue, 8 Oct 2024 14:48:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E7=94=A8=E6=88=B7=E6=9D=83=E9=99=90=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/LocalStoreLogic.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/api/logic/LocalStoreLogic.php b/app/api/logic/LocalStoreLogic.php index 40867d46..bb115f38 100644 --- a/app/api/logic/LocalStoreLogic.php +++ b/app/api/logic/LocalStoreLogic.php @@ -521,14 +521,12 @@ class LocalStoreLogic extends Logic } $data = array(); - foreach ($post['user']['rule'] as $k => &$v) { - $data[$k]['lstore_id'] = $post['lstore_id']; - $data[$k]['bind_user_id'] = $post['user']['id']; - $data[$k]['rule_id'] = $v; - $data[$k]['bind_time'] = time(); - } + $data['lstore_id'] = $post['lstore_id']; + $data['bind_user_id'] = $post['user']['id']; + $data['rule'] = implode(',', $post['user']['id']); + $data['bind_time'] = time(); - $result = $model->insertAll($data); + $result = $model->insert($data); if ($result) { return true; }