|
@@ -99,9 +99,9 @@ class WechatKeywordsService extends BaseService
|
|
|
if ($param['keyword'] != $info->keyword) {
|
|
|
// 修改关键词,需要查询词关键词是否已配置
|
|
|
if ($info->wechat_accounts) {
|
|
|
- $appIds = WechatAccountKeywordLog::where('weacht_keyworld_id', $info->id)->where('status', 1)->pluck('appid')->get();
|
|
|
+ $appIds = WechatAccountKeywordLog::where('weacht_keyworld_id', $info->id)->where('status', 1)->pluck('appid')->toArray();
|
|
|
if ($appIds) {
|
|
|
- $hasUsed = WechatAccountKeywordLog::where('keyword', $param['keyword'])->whereIn('appid', $appIds)->where('status', 1)->pluck('nick_name')->get();
|
|
|
+ $hasUsed = WechatAccountKeywordLog::where('keyword', $param['keyword'])->whereIn('appid', $appIds)->where('status', 1)->pluck('nick_name')->toArray();
|
|
|
if ($hasUsed) {
|
|
|
self::throwErrMsg("关键字{$param['keyword']}已配置了以下公众号" . implode(',', $hasUsed) . "请先解绑后再编辑");
|
|
|
}
|
|
@@ -114,6 +114,7 @@ class WechatKeywordsService extends BaseService
|
|
|
$data = [
|
|
|
'content' => $param['send_content'],
|
|
|
'keyword' => $param['keyword'],
|
|
|
+ 'miniprogram_id' => $info->miniprogram_id,
|
|
|
];
|
|
|
WechatAccountKeywordLog::where('weacht_keyworld_id', $info->id)->update($data);
|
|
|
DB::commit();
|