Skip to content

Commit

Permalink
Merge pull request #179 from maxincai/master
Browse files Browse the repository at this point in the history
批量添加好友导入数据时,未配置提醒自建应用报错信息优化
  • Loading branch information
maxincai authored Oct 21, 2021
2 parents 589824f + 1648af4 commit 6547f8d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion api-server/config/autoload/framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
'/weWork/callback',
'/dashboard/corp/weWorkCallback',
'/',
'/dashboard/{wxVerifyTxt}',
'/{wxVerifyTxt}',
'/dashboard/officialAccount/authEventCallback',
'/dashboard/{appId}/officialAccount/messageEventCallback',
'/operation/officialAccount/authRedirect',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6547f8d

Please sign in to comment.