update modules/service: mod 68 files

This commit is contained in:
jack ning
2025-07-05 15:09:25 +08:00
parent 2144cf7f7a
commit f9ef2d5564
39 changed files with 53 additions and 53 deletions

View File

@@ -63,7 +63,7 @@ public class LlmProviderRestService extends BaseRestService<LlmProviderEntity, L
public Page<LlmProviderResponse> queryByUser(LlmProviderRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -99,7 +99,7 @@ public class RobotRestService extends BaseRestServiceWithExcel<RobotEntity, Robo
public Page<RobotResponse> queryByUser(RobotRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -65,7 +65,7 @@ public class RobotMessageRestService extends BaseRestServiceWithExcel<RobotMessa
public Page<RobotMessageResponse> queryByUser(RobotMessageRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -81,7 +81,7 @@ public class CategoryRestService extends BaseRestService<CategoryEntity, Categor
public Page<CategoryResponse> queryByUser(CategoryRequest request) {
UserEntity authUser = authService.getUser();
if (authUser == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(authUser.getUid());
//

View File

@@ -69,7 +69,7 @@ public class FavoriteRestService extends BaseRestService<FavoriteEntity, Favorit
public FavoriteResponse create(FavoriteRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());

View File

@@ -56,7 +56,7 @@ public class GroupInviteRestService extends BaseRestService<GroupInviteEntity, G
public Page<GroupInviteResponse> queryByUser(GroupInviteRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//
@@ -73,7 +73,7 @@ public class GroupInviteRestService extends BaseRestService<GroupInviteEntity, G
public GroupInviteResponse create(GroupInviteRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());

View File

@@ -56,7 +56,7 @@ public class GroupNoticeRestService extends BaseRestService<GroupNoticeEntity, G
public Page<GroupNoticeResponse> queryByUser(GroupNoticeRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//
@@ -73,7 +73,7 @@ public class GroupNoticeRestService extends BaseRestService<GroupNoticeEntity, G
public GroupNoticeResponse create(GroupNoticeRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());

View File

@@ -75,7 +75,7 @@ public class IpAccessRestService extends BaseRestService<IpAccessEntity, IpAcces
public Page<IpAccessResponse> queryByUser(IpAccessRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -83,7 +83,7 @@ public class MemberRestController extends BaseRestController<MemberRequest> {
//
MemberResponse memberResponse = memberRestService.queryByUserUid(request);
if (memberResponse == null) {
return ResponseEntity.ok(JsonResult.error("user not found"));
return ResponseEntity.ok(JsonResult.error("login first"));
}
//
return ResponseEntity.ok(JsonResult.success(memberResponse));

View File

@@ -60,7 +60,7 @@ public class OrganizationApplyRestService extends BaseRestServiceWithExcel<Organ
public Page<OrganizationApplyResponse> queryByUser(OrganizationApplyRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -111,7 +111,7 @@ public class UserRestController extends BaseRestController<UserRequest> {
if (userResponse != null) {
return ResponseEntity.ok(JsonResult.success(userResponse));
} else {
return ResponseEntity.ok().body(JsonResult.error("user not found", -1, false));
return ResponseEntity.ok().body(JsonResult.error("login first", -1, false));
}
}

View File

@@ -65,7 +65,7 @@ public class TagRestService extends BaseRestServiceWithExcel<TagEntity, TagReque
public Page<TagResponse> queryByUser(TagRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -89,7 +89,7 @@ public class ThreadRestService
public Page<ThreadResponse> query(ThreadRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
request.setOwnerUid(user.getUid());

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-11-20 11:16:56
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-07-05 14:56:31
* @LastEditTime: 2025-07-05 15:09:09
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
@@ -60,7 +60,7 @@ public class TopicRestService extends BaseRestService<TopicEntity, TopicRequest,
public Page<TopicResponse> queryByUser(TopicRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
return queryByOrg(request);

View File

@@ -61,7 +61,7 @@ public class WorkflowResultRestService extends BaseRestServiceWithExcel<Workflow
public Page<WorkflowResultResponse> queryByUser(WorkflowResultRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -71,7 +71,7 @@ public class ArticleRestService extends BaseRestServiceWithExcel<ArticleEntity,
public Page<ArticleResponse> queryByUser(ArticleRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
String userUid = user.getUid();
request.setUserUid(userUid);
@@ -102,7 +102,7 @@ public class ArticleRestService extends BaseRestServiceWithExcel<ArticleEntity,
public ArticleResponse create(ArticleRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
ArticleEntity entity = modelMapper.map(request, ArticleEntity.class);

View File

@@ -58,7 +58,7 @@ public class ArticleArchiveRestService extends BaseRestService<ArticleArchiveEnt
public Page<ArticleArchiveResponse> queryByUser(ArticleArchiveRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
String userUid = user.getUid();
//
@@ -86,7 +86,7 @@ public class ArticleArchiveRestService extends BaseRestService<ArticleArchiveEnt
public ArticleArchiveResponse create(ArticleArchiveRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
ArticleArchiveEntity entity = modelMapper.map(request, ArticleArchiveEntity.class);

View File

@@ -71,7 +71,7 @@ public class CommentRestService extends BaseRestService<CommentEntity, CommentRe
public CommentResponse create(CommentRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
CommentEntity entity = modelMapper.map(request, CommentEntity.class);

View File

@@ -103,7 +103,7 @@ public class FaqRestService extends BaseRestServiceWithExcel<FaqEntity, FaqReque
public Page<FaqResponse> queryByUser(FaqRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -76,7 +76,7 @@ public class KbaseRestService extends BaseRestService<KbaseEntity, KbaseRequest,
public Page<KbaseResponse> queryByUser(KbaseRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -56,7 +56,7 @@ public class KbaseInviteRestService extends BaseRestService<KbaseInviteEntity, K
public Page<KbaseInviteResponse> queryByUser(KbaseInviteRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//
@@ -73,7 +73,7 @@ public class KbaseInviteRestService extends BaseRestService<KbaseInviteEntity, K
public KbaseInviteResponse create(KbaseInviteRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());

View File

@@ -64,7 +64,7 @@ public class MaterialRestService extends BaseRestServiceWithExcel<MaterialEntity
public Page<MaterialResponse> queryByUser(MaterialRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -60,7 +60,7 @@ public class IntentionSettingsRestService extends BaseRestServiceWithExcel<Inten
public Page<IntentionSettingsResponse> queryByUser(IntentionSettingsRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -60,7 +60,7 @@ public class InviteSettingsRestService extends BaseRestServiceWithExcel<InviteSe
public Page<InviteSettingsResponse> queryByUser(InviteSettingsRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -60,7 +60,7 @@ public class RatedownSettingsRestService extends BaseRestServiceWithExcel<Ratedo
public Page<RatedownSettingsResponse> queryByUser(RatedownSettingsRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -60,7 +60,7 @@ public class ServiceSettingsRestService extends BaseRestServiceWithExcel<Service
public Page<ServiceSettingsResponse> queryByUser(ServiceSettingsRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -94,7 +94,7 @@ public class AgentRestService extends BaseRestService<AgentEntity, AgentRequest,
public Page<AgentResponse> queryByUser(AgentRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -60,7 +60,7 @@ public class ChannelAppRestService extends BaseRestServiceWithExcel<ChannelAppEn
public Page<ChannelAppResponse> queryByUser(ChannelAppRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -61,7 +61,7 @@ public class FormResultRestService extends BaseRestServiceWithExcel<FormResultEn
public Page<FormResultResponse> queryByUser(FormResultRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -64,7 +64,7 @@ public class TemplateRestService extends BaseRestServiceWithExcel<TemplateEntity
public Page<TemplateResponse> queryByUser(TemplateRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -60,7 +60,7 @@ public class WorktimeSettingRestService extends BaseRestServiceWithExcel<Worktim
public Page<WorktimeSettingResponse> queryByUser(WorktimeSettingRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -119,7 +119,7 @@ public class TicketRestService extends BaseRestServiceWithExcel<TicketEntity, Ti
public Page<TicketResponse> queryByUser(TicketRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//
@@ -137,7 +137,7 @@ public class TicketRestService extends BaseRestServiceWithExcel<TicketEntity, Ti
public TicketResponse create(TicketRequest request) {
UserEntity owner = authService.getUser();
if (owner == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
String userUid = owner.getUid();
// 创建工单...
@@ -291,7 +291,7 @@ public class TicketRestService extends BaseRestServiceWithExcel<TicketEntity, Ti
//
UserEntity owner = authService.getUser();
if (owner == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
//
if (ticket.getDepartmentUid() == null || ticket.getDepartmentUid().isEmpty()) {

View File

@@ -60,7 +60,7 @@ public class FreeSwitchWebRTCRestService extends BaseRestServiceWithExcel<FreeSw
public Page<FreeSwitchWebRTCResponse> queryByUser(FreeSwitchWebRTCRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -60,7 +60,7 @@ public class ModuleRestService extends BaseRestService<ModuleEntity, ModuleReque
public Page<ModuleResponse> queryByUser(ModuleRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//
@@ -77,7 +77,7 @@ public class ModuleRestService extends BaseRestService<ModuleEntity, ModuleReque
public ModuleResponse create(ModuleRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());

View File

@@ -56,7 +56,7 @@ public class ProjectRestService extends BaseRestService<ProjectEntity, ProjectRe
public Page<ProjectResponse> queryByUser(ProjectRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//
@@ -82,7 +82,7 @@ public class ProjectRestService extends BaseRestService<ProjectEntity, ProjectRe
public ProjectResponse create(ProjectRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());

View File

@@ -56,7 +56,7 @@ public class ProjectInviteRestService extends BaseRestService<ProjectInviteEntit
public Page<ProjectInviteResponse> queryByUser(ProjectInviteRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//
@@ -73,7 +73,7 @@ public class ProjectInviteRestService extends BaseRestService<ProjectInviteEntit
public ProjectInviteResponse create(ProjectInviteRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());

View File

@@ -55,7 +55,7 @@ public class ReportRestService extends BaseRestService<ReportEntity, ReportReque
public Page<ReportResponse> queryByUser(ReportRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//
@@ -72,7 +72,7 @@ public class ReportRestService extends BaseRestService<ReportEntity, ReportReque
public ReportResponse create(ReportRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());

View File

@@ -60,7 +60,7 @@ public class TaskRestService extends BaseRestService<TaskEntity, TaskRequest, Ta
public Page<TaskResponse> queryByUser(TaskRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//
@@ -77,7 +77,7 @@ public class TaskRestService extends BaseRestService<TaskEntity, TaskRequest, Ta
public TaskResponse create(TaskRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//

View File

@@ -60,7 +60,7 @@ public class TodoListRestService extends BaseRestService<TodoListEntity, TodoLis
public Page<TodoListResponse> queryByUser(TodoListRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());
//
@@ -77,7 +77,7 @@ public class TodoListRestService extends BaseRestService<TodoListEntity, TodoLis
public TodoListResponse create(TodoListRequest request) {
UserEntity user = authService.getUser();
if (user == null) {
throw new RuntimeException("user not found");
throw new RuntimeException("login first");
}
request.setUserUid(user.getUid());