diff --git a/api-server/app/core/work-agent/src/Action/Dashboard/TxtVerifyShow.php b/api-server/app/core/work-agent/src/Action/Dashboard/TxtVerifyShow.php index 76be7edf..7077d77e 100644 --- a/api-server/app/core/work-agent/src/Action/Dashboard/TxtVerifyShow.php +++ b/api-server/app/core/work-agent/src/Action/Dashboard/TxtVerifyShow.php @@ -20,7 +20,7 @@ class TxtVerifyShow extends AbstractAction { /** - * @RequestMapping(path="/dashboard/{wxVerifyTxt:WW_verify_[0-9a-zA-Z]{16}\.txt$}", methods="GET") + * @RequestMapping(path="/{wxVerifyTxt:WW_verify_[0-9a-zA-Z]{16}\.txt$}", methods="GET") * @return null|string ... */ public function handle(): ?string diff --git a/api-server/config/autoload/framework.php b/api-server/config/autoload/framework.php index fdca8b39..8975d9b7 100755 --- a/api-server/config/autoload/framework.php +++ b/api-server/config/autoload/framework.php @@ -28,7 +28,7 @@ '/weWork/callback', '/dashboard/corp/weWorkCallback', '/', - '/dashboard/{wxVerifyTxt}', + '/{wxVerifyTxt}', '/dashboard/officialAccount/authEventCallback', '/dashboard/{appId}/officialAccount/messageEventCallback', '/operation/officialAccount/authRedirect', diff --git a/api-server/plugin/mochat/contact-batch-add/src/Logic/ImportStoreLogic.php b/api-server/plugin/mochat/contact-batch-add/src/Logic/ImportStoreLogic.php index e8e024c2..60ebfa6f 100755 --- a/api-server/plugin/mochat/contact-batch-add/src/Logic/ImportStoreLogic.php +++ b/api-server/plugin/mochat/contact-batch-add/src/Logic/ImportStoreLogic.php @@ -170,6 +170,10 @@ private function sendMessage(int $recordId, int $corpId) $workAgentService = make(WorkAgentContract::class); $agent = $workAgentService->getWorkAgentRemindByCorpId((int) $corpId, ['id']); + if (empty($agent)) { + throw new CommonException(ErrorCode::SERVER_ERROR, '未配置自建应用信息,无法发送提醒!'); + } + foreach ($list as $item) { $employee = $this->workEmployee->getWorkEmployeeById($item['employeeId']); $url = Url::getSidebarBaseUrl() . '/contactBatchAdd?agentId=' . $agent['id'] . '&batchId=' . $recordId;