|
@@ -47,13 +47,7 @@ public class AgentChatController {
|
|
|
public ChatAttachmentService.AttachmentVO uploadAttachment(@RequestPart("file") MultipartFile file,
|
|
public ChatAttachmentService.AttachmentVO uploadAttachment(@RequestPart("file") MultipartFile file,
|
|
|
@RequestParam Long workspaceId,
|
|
@RequestParam Long workspaceId,
|
|
|
@RequestParam(required = false) Long sessionId) {
|
|
@RequestParam(required = false) Long sessionId) {
|
|
|
- Long userId;
|
|
|
|
|
- try {
|
|
|
|
|
- userId = StpUtil.getLoginIdAsLong();
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- throw new ServerException(401, "未登录");
|
|
|
|
|
- }
|
|
|
|
|
- return chatAttachmentService.upload(file, userId, workspaceId, sessionId == null ? 0L : sessionId);
|
|
|
|
|
|
|
+ return chatAttachmentService.upload(file, StpUtil.getLoginIdAsLong(), workspaceId, sessionId == null ? 0L : sessionId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|