From 2de1d9bccb8e45ef1a55311ce1bad7c2d4e9d12c Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 26 Feb 2020 09:27:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=B9=E9=87=8F=E6=93=8D?= =?UTF-8?q?=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/MemberController.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 66fd1c827..45e385a50 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -1235,7 +1235,7 @@ class MemberController extends ThinkController { if ($accounts) $map['account'] = ['in', array_unique(explode("\n", $accounts))]; if ($id) $map['id'] = ['in', array_unique(explode("\n", $id))]; - $users = M('user', 'tab_')->where($map)->field('id')->select(); + $users = M('user', 'tab_')->where($map)->field('id,lock_status')->select(); if($_POST['lock_remark']){ $res = M('user', 'tab_')->where($map)->setField(['lock_status' => $lock_status,"lock_remark" => $_POST['lock_remark']]); }else{ @@ -1244,10 +1244,11 @@ class MemberController extends ThinkController if ($res) { foreach ($users as $item) { + if($item['lock_status'] != $lock_status){ + $this->userEditOperationLog($item['id'],"锁定/解锁"); + } \Think\Log::actionLog('Member/lock_status', 'Member', $item['id']); } - $this->userEditOperationLog($id,"锁定/解锁"); - $this->success('操作成功!'); } else { $this->error('操作失败!');