私域操盘手 - 修复设备配置错误的问题

This commit is contained in:
柳清爽
2025-05-08 15:16:29 +08:00
parent 40000b397b
commit 6354dd8565
5 changed files with 11 additions and 11 deletions

View File

@@ -33,7 +33,7 @@ class UpdateDeviceTaskConfigV1Controller extends BaseController
$device = DeviceModel::find($where);
if (!$device) {
throw new \Exception('设备不存在或已删除', '404');
throw new \Exception('设备不存在或已删除', 404);
}
}
@@ -54,7 +54,7 @@ class UpdateDeviceTaskConfigV1Controller extends BaseController
$hasPermission = DeviceUserModel::where($where)->count() > 0;
if (!$hasPermission) {
throw new \Exception('您没有权限操作该设备', '403');
throw new \Exception('您没有权限操作该设备', 403);
}
}
@@ -71,12 +71,12 @@ class UpdateDeviceTaskConfigV1Controller extends BaseController
$content = null;
if (isset($data['autoAddFriend']))/**/ $content = $data['autoAddFriend'] ? '开启自动添加好友' : '关闭自动添加好友';
if (isset($data['autoReply']))/* */ $content = $data['autoReply'] ? '开启自动回复' : '关闭自动回复';
if (isset($data['momentsSync']))/* */ $content = $data['momentsSync'] ? '开启朋友圈同步' : '关闭朋友圈同步';
if (isset($data['aiChat']))/* */ $content = $data['aiChat'] ? '开启AI会话' : '关闭AI会话';
if (isset($data['autoReply']))/* */ $content = $data['autoReply'] ? '开启自动回复' : '关闭自动回复';
if (isset($data['momentsSync']))/* */ $content = $data['momentsSync'] ? '开启朋友圈同步' : '关闭朋友圈同步';
if (isset($data['aiChat']))/* */ $content = $data['aiChat'] ? '开启AI会话' : '关闭AI会话';
if (empty($content)) {
throw new \Exception('参数错误', '400');
throw new \Exception('参数错误', 400);
}
DeviceHandleLogModel::addLog(