From 146bbe6a043b8d02ccca96456402433b5e9f1446 Mon Sep 17 00:00:00 2001 From: Anyon Date: Wed, 31 Jul 2019 18:48:06 +0800 Subject: [PATCH] Update Fans.php --- application/service/controller/Fans.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/service/controller/Fans.php b/application/service/controller/Fans.php index 0a9c191df..edd5f15bd 100644 --- a/application/service/controller/Fans.php +++ b/application/service/controller/Fans.php @@ -102,7 +102,7 @@ class Fans extends Controller try { foreach (array_chunk(explode(',', $this->request->post('openid')), 20) as $openids) { WechatService::WeChatUser($this->appid)->batchBlackList($openids); - Db::name('WechatFans')->whereIn('openid', $openids)->update(['is_black' => '1']); + Db::name('WechatFans')->where(['appid' => $this->appid])->whereIn('openid', $openids)->update(['is_black' => '1']); } $this->success('拉黑粉丝信息成功!'); } catch (HttpResponseException $exception) { @@ -122,7 +122,7 @@ class Fans extends Controller $this->applyCsrfToken(); foreach (array_chunk(explode(',', $this->request->post('openid')), 20) as $openids) { WechatService::WeChatUser($this->appid)->batchUnblackList($openids); - Db::name('WechatFans')->whereIn('openid', $openids)->update(['is_black' => '0']); + Db::name('WechatFans')->where(['appid' => $this->appid])->whereIn('openid', $openids)->update(['is_black' => '0']); } $this->success('取消拉黑粉丝信息成功!'); } catch (HttpResponseException $exception) {