1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-19 22:52:59 +08:00

修复获取通知模板ID问题

This commit is contained in:
koogua 2021-03-03 20:22:07 +08:00
parent dffa813b0a
commit 0fc11134ca
3 changed files with 6 additions and 6 deletions

View File

@ -16,9 +16,9 @@ class AccountLogin extends LogicService
public function handleTask(TaskModel $task)
{
$wechatOA = $this->getSettings('wechat.oa');
$wechatNoticeEnabled = $this->wechatNoticeEnabled();
if ($wechatOA['enabled'] == 0) return;
if (!$wechatNoticeEnabled) return;
$params = $task->item_info;
@ -38,9 +38,9 @@ class AccountLogin extends LogicService
public function createTask(UserModel $user)
{
$wechatOA = $this->getSettings('wechat.oa');
$wechatNoticeEnabled = $this->wechatNoticeEnabled();
if ($wechatOA['enabled'] == 0) return;
if (!$wechatNoticeEnabled) return;
$task = new TaskModel();

View File

@ -88,7 +88,7 @@ Abstract class Smser extends Service
{
$template = json_decode($this->settings['template'], true);
return $template[$code] ?? null;
return $template[$code]['id'] ?? null;
}
protected function getSignature()

View File

@ -97,7 +97,7 @@ abstract class WeChatNotice extends Service
{
$template = json_decode($this->settings['notice_template'], true);
return $template[$code] ?? null;
return $template[$code]['id'] ?? null;
}
}