From d68e04c6a1b7ee52cf92663fb9e4fc7675872740 Mon Sep 17 00:00:00 2001
From: xsx <825657193@qq.com>
Date: Sun, 22 Dec 2024 23:53:27 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BE=A4=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/im-admin.sql | 27 +++-
im-admin-ui/LICENSE | 20 ---
.../src/components/ImagePreview/index.vue | 6 +-
.../src/layout/components/Sidebar/Logo.vue | 6 +-
.../src/layout/components/notice/index.vue | 6 -
im-admin-ui/src/types/bpmn/editor/global.d.ts | 13 --
im-admin-ui/src/types/bpmn/index.d.ts | 15 --
im-admin-ui/src/types/bpmn/moddle.d.ts | 37 -----
im-admin-ui/src/types/bpmn/panel.d.ts | 92 ------------
im-admin-ui/src/views/register.vue | 2 +-
im-admin-ui/vite/plugins/compression.ts | 1 -
im-admin/pom.xml | 23 +--
.../web/controller/AuthController.java | 2 +-
.../src/main/resources/application.yml | 11 ++
im-admin/ruoyi-im/pom.xml | 12 +-
.../org/dromara/im/config/ImCacheConfig.java | 32 +++++
.../org/dromara/im/config/ImTransConfig.java | 40 ++++++
.../im/controller/ImGroupController.java | 104 +++++++-------
.../controller/ImGroupMemberController.java | 105 --------------
.../controller/ImGroupMessageController.java | 29 ++--
.../ImPrivateMessageController.java | 29 ++--
.../controller/ImSensitiveWordController.java | 29 ++--
.../im/controller/ImSmPushTaskController.java | 29 ++--
.../controller/ImSystemMessageController.java | 29 ++--
.../im/controller/ImUserController.java | 46 +++---
.../java/org/dromara/im/domain/ImGroup.java | 14 +-
.../org/dromara/im/domain/ImGroupMember.java | 17 +--
.../org/dromara/im/domain/ImGroupMessage.java | 8 +-
.../dromara/im/domain/ImPrivateMessage.java | 8 +-
.../dromara/im/domain/ImSensitiveWord.java | 5 +-
.../org/dromara/im/domain/ImSmPushTask.java | 9 +-
.../dromara/im/domain/ImSystemMessage.java | 6 +-
.../java/org/dromara/im/domain/ImUser.java | 13 +-
.../org/dromara/im/domain/bo/ImGroupBo.java | 45 +++---
.../dromara/im/domain/bo/ImGroupMemberBo.java | 15 +-
.../im/domain/bo/ImGroupMessageBo.java | 13 +-
.../im/domain/bo/ImPrivateMessageBo.java | 13 +-
.../im/domain/bo/ImSensitiveWordBo.java | 11 +-
.../dromara/im/domain/bo/ImSmPushTaskBo.java | 13 +-
.../im/domain/bo/ImSystemMessageBo.java | 11 +-
.../org/dromara/im/domain/bo/ImUserBo.java | 12 +-
.../dromara/im/domain/dto/ImGroupBanDto.java | 24 ++++
.../im/domain/dto/ImGroupUnbanDto.java | 20 +++
.../{ImUserBanDTO.java => ImUserBanDto.java} | 2 +-
...mUserUnbanDTO.java => ImUserUnbanDto.java} | 2 +-
.../dromara/im/domain/vo/ImGroupMemberVo.java | 29 ++--
.../im/domain/vo/ImGroupMessageVo.java | 6 +-
.../org/dromara/im/domain/vo/ImGroupVo.java | 64 +++++----
.../im/domain/vo/ImPrivateMessageVo.java | 6 +-
.../im/domain/vo/ImSensitiveWordVo.java | 5 +-
.../dromara/im/domain/vo/ImSmPushTaskVo.java | 6 +-
.../im/domain/vo/ImSystemMessageVo.java | 5 +-
.../org/dromara/im/domain/vo/ImUserVo.java | 12 +-
.../org/dromara/im/mapper/ImGroupMapper.java | 2 +-
.../im/mapper/ImGroupMemberMapper.java | 2 +-
.../im/mapper/ImGroupMessageMapper.java | 2 +-
.../im/mapper/ImPrivateMessageMapper.java | 2 +-
.../im/mapper/ImSensitiveWordMapper.java | 2 +-
.../dromara/im/mapper/ImSmPushTaskMapper.java | 2 +-
.../im/mapper/ImSystemMessageMapper.java | 2 +-
.../org/dromara/im/mapper/ImUserMapper.java | 2 +-
.../im/service/IImGroupMemberService.java | 31 ++--
.../im/service/IImGroupMessageService.java | 6 +-
.../dromara/im/service/IImGroupService.java | 36 ++---
.../im/service/IImPrivateMessageService.java | 6 +-
.../im/service/IImSensitiveWordService.java | 6 +-
.../im/service/IImSmPushTaskService.java | 6 +-
.../im/service/IImSystemMessageService.java | 6 +-
.../dromara/im/service/IImUserService.java | 22 +--
.../impl/ImGroupMemberServiceImpl.java | 84 +++--------
.../impl/ImGroupMessageServiceImpl.java | 16 +--
.../im/service/impl/ImGroupServiceImpl.java | 134 +++++++++---------
.../impl/ImPrivateMessageServiceImpl.java | 16 +--
.../impl/ImSensitiveWordServiceImpl.java | 16 +--
.../service/impl/ImSmPushTaskServiceImpl.java | 16 +--
.../impl/ImSystemMessageServiceImpl.java | 16 +--
.../im/service/impl/ImUserServiceImpl.java | 42 ++++--
77 files changed, 703 insertions(+), 911 deletions(-)
delete mode 100644 im-admin-ui/LICENSE
delete mode 100644 im-admin-ui/src/types/bpmn/editor/global.d.ts
delete mode 100644 im-admin-ui/src/types/bpmn/index.d.ts
delete mode 100644 im-admin-ui/src/types/bpmn/moddle.d.ts
delete mode 100644 im-admin-ui/src/types/bpmn/panel.d.ts
create mode 100644 im-admin/ruoyi-im/src/main/java/org/dromara/im/config/ImCacheConfig.java
create mode 100644 im-admin/ruoyi-im/src/main/java/org/dromara/im/config/ImTransConfig.java
delete mode 100644 im-admin/ruoyi-im/src/main/java/org/dromara/im/controller/ImGroupMemberController.java
create mode 100644 im-admin/ruoyi-im/src/main/java/org/dromara/im/domain/dto/ImGroupBanDto.java
create mode 100644 im-admin/ruoyi-im/src/main/java/org/dromara/im/domain/dto/ImGroupUnbanDto.java
rename im-admin/ruoyi-im/src/main/java/org/dromara/im/domain/dto/{ImUserBanDTO.java => ImUserBanDto.java} (95%)
rename im-admin/ruoyi-im/src/main/java/org/dromara/im/domain/dto/{ImUserUnbanDTO.java => ImUserUnbanDto.java} (92%)
diff --git a/db/im-admin.sql b/db/im-admin.sql
index 434e078..c219489 100644
--- a/db/im-admin.sql
+++ b/db/im-admin.sql
@@ -233,9 +233,9 @@ create table sys_menu (
-- 初始化-菜单信息表数据
-- ----------------------------
-- 一级菜单
-insert into sys_menu values('1', '系统管理', '0', '1', 'system', null, '', 1, 0, 'M', '0', '0', '', 'system', 103, 1, sysdate(), null, null, '系统管理目录');
-insert into sys_menu values('2', '系统监控', '0', '3', 'monitor', null, '', 1, 0, 'M', '0', '0', '', 'monitor', 103, 1, sysdate(), null, null, '系统监控目录');
-insert into sys_menu values('3', '系统工具', '0', '4', 'tool', null, '', 1, 0, 'M', '0', '0', '', 'tool', 103, 1, sysdate(), null, null, '系统工具目录');
+insert into sys_menu values('1', '系统管理', '0', '11', 'system', null, '', 1, 0, 'M', '0', '0', '', 'system', 103, 1, sysdate(), null, null, '系统管理目录');
+insert into sys_menu values('2', '系统监控', '0', '13', 'monitor', null, '', 1, 0, 'M', '0', '0', '', 'monitor', 103, 1, sysdate(), null, null, '系统监控目录');
+insert into sys_menu values('3', '系统工具', '0', '14', 'tool', null, '', 1, 0, 'M', '0', '0', '', 'tool', 103, 1, sysdate(), null, null, '系统工具目录');
-- 二级菜单
insert into sys_menu values('100', '用户管理', '1', '1', 'user', 'system/user/index', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 103, 1, sysdate(), null, null, '用户管理菜单');
@@ -250,8 +250,6 @@ insert into sys_menu values('108', '日志管理', '1', '9', 'log',
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, sysdate(), null, null, '在线用户菜单');
insert into sys_menu values('113', '缓存监控', '2', '5', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, sysdate(), null, null, '缓存监控菜单');
insert into sys_menu values('115', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, sysdate(), null, null, '代码生成菜单');
-insert into sys_menu values('121', '租户管理', '6', '1', 'tenant', 'system/tenant/index', '', 1, 0, 'C', '0', '0', 'system:tenant:list', 'list', 103, 1, sysdate(), null, null, '租户管理菜单');
-insert into sys_menu values('122', '租户套餐管理', '6', '2', 'tenantPackage', 'system/tenantPackage/index', '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list', 'form', 103, 1, sysdate(), null, null, '租户套餐管理菜单');
insert into sys_menu values('123', '客户端管理', '1', '11', 'client', 'system/client/index', '', 1, 0, 'C', '0', '0', 'system:client:list', 'international', 103, 1, sysdate(), null, null, '客户端管理菜单');
-- oss菜单
@@ -344,6 +342,19 @@ insert into sys_menu values('1063', '客户端管理修改', '123', '3', '#', '
insert into sys_menu values('1064', '客户端管理删除', '123', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:remove', '#', 103, 1, sysdate(), null, null, '');
insert into sys_menu values('1065', '客户端管理导出', '123', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:export', '#', 103, 1, sysdate(), null, null, '');
+-- IM-用户管理
+insert into sys_menu values('4', '用户管理', '0', '1', 'im/user', 'im/user/index', '', 1, 0, 'C', '0', '0', 'im:user:list', 'user', 103, 1, sysdate(), null, null, 'IM用户管理');
+insert into sys_menu values('4001', '用户查询', '4', '1', '#', '', '', 1, 0, 'F', '0', '0', 'im:user:query', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values('4002', '用户封禁', '4', '2', '#', '', '', 1, 0, 'F', '0', '0', 'im:user:ban', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values('4003', '用户导出', '4', '3', '#', '', '', 1, 0, 'F', '0', '0', 'im:user:export', '#', 103, 1, sysdate(), null, null, '');
+
+-- IM-群聊管理
+insert into sys_menu values('5', '群聊管理', '0', '2', 'im/group', 'im/group/index', '', 1, 0, 'C', '0', '0', 'im:group:list', 'user', 103, 1, sysdate(), null, null, 'IM群聊管理');
+insert into sys_menu values('5001', '群聊查询', '5', '1', '#', '', '', 1, 0, 'F', '0', '0', 'im:group:query', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values('5002', '群聊封禁', '5', '2', '#', '', '', 1, 0, 'F', '0', '0', 'im:group:ban', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values('5003', '群聊导出', '5', '3', '#', '', '', 1, 0, 'F', '0', '0', 'im:group:export', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values('5004', '群聊成员', '5', '4', '#', '', '', 1, 0, 'F', '0', '0', 'im:group:member', '#', 103, 1, sysdate(), null, null, '');
+
-- ----------------------------
-- 6、用户和角色关联表 用户N-1角色
@@ -450,6 +461,8 @@ insert into sys_dict_type values(9, '000000', '操作类型', 'sys_oper_type',
insert into sys_dict_type values(10, '000000', '系统状态', 'sys_common_status', 103, 1, sysdate(), null, null, '登录状态列表');
insert into sys_dict_type values(11, '000000', '授权类型', 'sys_grant_type', 103, 1, sysdate(), null, null, '认证授权类型');
insert into sys_dict_type values(12, '000000', '设备类型', 'sys_device_type', 103, 1, sysdate(), null, null, '客户端设备类型');
+insert into sys_dict_type values(13, '000000', '布尔值', 'sys_bool', 103, 1, sysdate(), null, null, '布尔值, true 或 false');
+insert into sys_dict_type values(14, '000000', '用户状态', 'im_user_status', 103, 1, sysdate(), null, null, 'IM用户状态');
-- ----------------------------
@@ -509,6 +522,10 @@ insert into sys_dict_data values(35, '000000', 0, 'PC', 'pc', 'sys_d
insert into sys_dict_data values(36, '000000', 0, '安卓', 'android', 'sys_device_type', '', 'default', 'N', 103, 1, sysdate(), null, null, '安卓');
insert into sys_dict_data values(37, '000000', 0, 'iOS', 'ios', 'sys_device_type', '', 'default', 'N', 103, 1, sysdate(), null, null, 'iOS');
insert into sys_dict_data values(38, '000000', 0, '小程序', 'xcx', 'sys_device_type', '', 'default', 'N', 103, 1, sysdate(), null, null, '小程序');
+insert into sys_dict_data values(39, '000000', 0, '否', 'false', 'sys_bool', '', 'danger', 'N', 103, 1, sysdate(), null, null, 'PC');
+insert into sys_dict_data values(40, '000000', 0, '是', 'true', 'sys_bool', '', 'primary', 'N', 103, 1, sysdate(), null, null, '安卓');
+insert into sys_dict_data values(41, '000000', 0, '正常', '0', 'im_user_status', '', 'primary', 'N', 103, 1, sysdate(), null, null, 'iOS');
+insert into sys_dict_data values(42, '000000', 0, '已注销', '1', 'im_user_status', '', 'danger', 'N', 103, 1, sysdate(), null, null, '小程序');
-- ----------------------------
diff --git a/im-admin-ui/LICENSE b/im-admin-ui/LICENSE
deleted file mode 100644
index 32b3071..0000000
--- a/im-admin-ui/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2019 RuoYi-Vue-Plus
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/im-admin-ui/src/components/ImagePreview/index.vue b/im-admin-ui/src/components/ImagePreview/index.vue
index 98e6479..982e68b 100644
--- a/im-admin-ui/src/components/ImagePreview/index.vue
+++ b/im-admin-ui/src/components/ImagePreview/index.vue
@@ -13,6 +13,7 @@ import { propTypes } from '@/utils/propTypes';
const props = defineProps({
src: propTypes.string.def(''),
+ fullSrc: propTypes.string.def(''),
width: {
type: [Number, String],
default: ''
@@ -32,10 +33,11 @@ const realSrc = computed(() => {
});
const realSrcList = computed(() => {
- if (!props.src) {
+ let src = props.fullSrc || props.src
+ if (!src) {
return [];
}
- let real_src_list = props.src.split(',');
+ let real_src_list = src.split(',');
let srcList: string[] = [];
real_src_list.forEach((item: string) => {
if (item.trim() === '') {
diff --git a/im-admin-ui/src/layout/components/Sidebar/Logo.vue b/im-admin-ui/src/layout/components/Sidebar/Logo.vue
index 631c261..14aca4a 100644
--- a/im-admin-ui/src/layout/components/Sidebar/Logo.vue
+++ b/im-admin-ui/src/layout/components/Sidebar/Logo.vue
@@ -34,7 +34,7 @@ defineProps({
}
});
-const title = ref('RuoYi-Vue-Plus');
+const title = ref('盒子IM后台');
const settingsStore = useSettingsStore();
const sideTheme = computed(() => settingsStore.sideTheme);
@@ -63,8 +63,8 @@ const sideTheme = computed(() => settingsStore.sideTheme);
width: 100%;
& .sidebar-logo {
- width: 32px;
- height: 32px;
+ width: 25px;
+ height: 25px;
vertical-align: middle;
margin-right: 12px;
}
diff --git a/im-admin-ui/src/layout/components/notice/index.vue b/im-admin-ui/src/layout/components/notice/index.vue
index e43b2b8..f3ba116 100644
--- a/im-admin-ui/src/layout/components/notice/index.vue
+++ b/im-admin-ui/src/layout/components/notice/index.vue
@@ -19,7 +19,6 @@
-
@@ -53,11 +52,6 @@ const onNewsClick = (item: any) => {
noticeStore.state.value.notices = newsList.value;
};
-// 前往通知中心点击
-const onGoToGiteeClick = () => {
- window.open('https://gitee.com/dromara/RuoYi-Vue-Plus/tree/5.X/');
-};
-
onMounted(() => {
nextTick(() => {
getTableData();
diff --git a/im-admin-ui/src/types/bpmn/editor/global.d.ts b/im-admin-ui/src/types/bpmn/editor/global.d.ts
deleted file mode 100644
index 1b9a634..0000000
--- a/im-admin-ui/src/types/bpmn/editor/global.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { MessageApiInjection } from 'naive-ui/lib/message/src/MessageProvider';
-
-declare global {
- interface Window {
- bpmnInstances: any;
- __messageBox: MessageApiInjection;
- URL: any;
- }
-}
-
-declare interface Window {
- bpmnInstances: any;
-}
diff --git a/im-admin-ui/src/types/bpmn/index.d.ts b/im-admin-ui/src/types/bpmn/index.d.ts
deleted file mode 100644
index f8e8d15..0000000
--- a/im-admin-ui/src/types/bpmn/index.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-declare module 'bpmn' {
- import type modeler from 'bpmn-js/lib/Modeler';
- import type modeling from 'bpmn-js/lib/features/modeling/Modeling';
- import type canvas from 'diagram-js/lib/core/Canvas';
- import type elementRegistry from 'diagram-js/lib/core/ElementRegistry';
- import type bpmnFactory from 'bpmn-js/lib/features/modeling/BpmnFactory';
-
- export type Modeler = modeler;
- export type Modeling = modeling;
- export type Canvas = canvas;
- export type ElementRegistry = elementRegistry;
- export type Moddle = import('moddle').Moddle;
- export type ModdleElement = import('moddle').ModdleElement;
- export type BpmnFactory = bpmnFactory;
-}
diff --git a/im-admin-ui/src/types/bpmn/moddle.d.ts b/im-admin-ui/src/types/bpmn/moddle.d.ts
deleted file mode 100644
index 1ed7933..0000000
--- a/im-admin-ui/src/types/bpmn/moddle.d.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-declare module 'moddle' {
- import type { Element as element } from 'bpmn-js/lib/model/Types';
-
- export type Element = {
- get(name: string): T;
-
- set(name: string, value: any): void;
- } & element;
-
- export interface ModdleElement extends Element {
- $model: Moddle;
- readonly $type: string;
- $attrs: object | {};
- $parent: any;
- businessObject: ModdleElement;
- type: string;
-
- [field: string]: any;
-
- hasType(element: ModdleElement, type?: string): boolean;
- }
-
- export interface Package {
- name: string;
- prefix: string;
- }
-
- export interface Moddle {
- typeCache: Record;
-
- getPackage: typeof Registry.prototype.getPackage;
-
- getPackages: typeof Registry.prototype.getPackages;
-
- create(type: string, attrs?: any): ModdleElement;
- }
-}
diff --git a/im-admin-ui/src/types/bpmn/panel.d.ts b/im-admin-ui/src/types/bpmn/panel.d.ts
deleted file mode 100644
index 3179261..0000000
--- a/im-admin-ui/src/types/bpmn/panel.d.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-declare module 'bpmnDesign' {
- import { AllocationTypeEnum, SpecifyDescEnum, MultiInstanceTypeEnum } from '@/enums/bpmn/IndexEnums';
-
- export interface ParamVO {
- type: string;
- name: string;
- value: string;
- }
-
- export interface TaskListenerVO {
- event: string;
- type: string;
- name: string;
- className: string;
- params: ParamVO[];
- }
-
- export interface ExecutionListenerVO {
- event: string;
- type: string;
- className: string;
- params: ParamVO[];
- }
-
- interface BasePanel {
- id: string;
- name: string;
- }
- export interface ProcessPanel extends BasePanel {}
-
- export interface TaskPanel extends BasePanel {
- allocationType: AllocationTypeEnum;
- specifyDesc: SpecifyDescEnum;
- multiInstanceType: MultiInstanceTypeEnum;
- async?: boolean;
- priority?: number;
- formKey?: string;
- skipExpression?: string;
- isForCompensation?: boolean;
- triggerServiceTask?: boolean;
- autoStoreVariables?: boolean;
- ruleVariablesInput?: string;
- excludeTaskListener?: boolean;
- exclude?: boolean;
- class?: string;
- dueDate?: string;
- fixedAssignee?: string;
-
- candidateUsers?: string;
- assignee?: string;
- candidateGroups?: string;
- collection?: string;
- elementVariable?: string;
- completionCondition?: string;
- isSequential?: boolean;
-
- loopCharacteristics?: {
- collection: string;
- elementVariable: string;
- isSequential: boolean;
- completionCondition: {
- body: string;
- };
- };
- }
-
- export interface StartEndPanel extends BasePanel {}
- export interface GatewayPanel extends BasePanel {}
- export interface SequenceFlowPanel extends BasePanel {
- conditionExpression: {
- body: string;
- };
- conditionExpressionValue: string;
- skipExpression: string;
- }
-
- export interface ParticipantPanel extends BasePanel {}
- export interface SubProcessPanel extends BasePanel {
- multiInstanceType: MultiInstanceTypeEnum;
- collection?: string;
- elementVariable?: string;
- completionCondition?: string;
- loopCharacteristics?: {
- collection: string;
- elementVariable: string;
- isSequential: boolean;
- completionCondition: {
- body: string;
- };
- };
- }
-}
diff --git a/im-admin-ui/src/views/register.vue b/im-admin-ui/src/views/register.vue
index c3d1930..c242b9d 100644
--- a/im-admin-ui/src/views/register.vue
+++ b/im-admin-ui/src/views/register.vue
@@ -1,7 +1,7 @@
- RuoYi-Vue-Plus多租户管理系统
+ 盒子IM后台管理
diff --git a/im-admin-ui/vite/plugins/compression.ts b/im-admin-ui/vite/plugins/compression.ts
index aa8c779..8cfe8ba 100644
--- a/im-admin-ui/vite/plugins/compression.ts
+++ b/im-admin-ui/vite/plugins/compression.ts
@@ -6,7 +6,6 @@ export default (env: any) => {
if (VITE_BUILD_COMPRESS) {
const compressList = VITE_BUILD_COMPRESS.split(',');
if (compressList.includes('gzip')) {
- // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
plugin.push(
compression({
ext: '.gz',
diff --git a/im-admin/pom.xml b/im-admin/pom.xml
index 105d57f..8f8568a 100644
--- a/im-admin/pom.xml
+++ b/im-admin/pom.xml
@@ -47,13 +47,12 @@
1.2.83
8.7.2-20241022
-
+ 3.0.0
3.2.2
3.2.2
3.11.0
3.1.2
- 1.3.0
@@ -315,11 +314,6 @@
ruoyi-im
${revision}
-
- org.dromara
- ruoyi-job
- ${revision}
-
org.dromara
@@ -328,18 +322,15 @@
- org.dromara
- ruoyi-demo
- ${revision}
+ com.fhs-opensource
+ easy-trans-spring-boot-starter
+ ${easytrans.version}
-
-
- org.dromara
- ruoyi-workflow
- ${revision}
+ com.fhs-opensource
+ easy-trans-mybatis-plus-extend
+ ${easytrans.version}
-
diff --git a/im-admin/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java b/im-admin/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java
index b561693..1fe8eae 100644
--- a/im-admin/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java
+++ b/im-admin/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java
@@ -103,7 +103,7 @@ public class AuthController {
Long userId = LoginHelper.getUserId();
scheduledExecutorService.schedule(() -> {
SseMessageDto dto = new SseMessageDto();
- dto.setMessage("欢迎登录RuoYi-Vue-Plus后台管理系统");
+ dto.setMessage("欢迎登录盒子IM后台管理系统");
dto.setUserIds(List.of(userId));
SseMessageUtils.publishMessage(dto);
}, 5, TimeUnit.SECONDS);
diff --git a/im-admin/ruoyi-admin/src/main/resources/application.yml b/im-admin/ruoyi-admin/src/main/resources/application.yml
index aafe9ee..bf4a886 100644
--- a/im-admin/ruoyi-admin/src/main/resources/application.yml
+++ b/im-admin/ruoyi-admin/src/main/resources/application.yml
@@ -218,3 +218,14 @@ websocket:
path: /resource/websocket
# 设置访问源地址
allowedOrigins: '*'
+
+#easy trans 数据翻译组件
+easy-trans:
+ #启用redis缓存 如果不用redis请设置为false
+ is-enable-redis: false
+ #启用全局翻译(拦截所有responseBody进行自动翻译),如果对于性能要求很高可关闭此配置
+ is-enable-global: true
+ #启用平铺模式
+ is-enable-tile: true
+ #支持多数据源
+ multiple-data-sources: true
\ No newline at end of file
diff --git a/im-admin/ruoyi-im/pom.xml b/im-admin/ruoyi-im/pom.xml
index 13669cb..de4f577 100644
--- a/im-admin/ruoyi-im/pom.xml
+++ b/im-admin/ruoyi-im/pom.xml
@@ -6,7 +6,7 @@
org.dromara
im-admin
- 5.2.3
+ ${revision}
org.dromara
@@ -16,12 +16,18 @@
org.dromara
ruoyi-system
- ${revision}
com.alibaba
fastjson
- ${fastjson.version}
+
+
+ com.fhs-opensource
+ easy-trans-spring-boot-starter
+
+
+ com.fhs-opensource
+ easy-trans-mybatis-plus-extend
\ No newline at end of file
diff --git a/im-admin/ruoyi-im/src/main/java/org/dromara/im/config/ImCacheConfig.java b/im-admin/ruoyi-im/src/main/java/org/dromara/im/config/ImCacheConfig.java
new file mode 100644
index 0000000..f78091a
--- /dev/null
+++ b/im-admin/ruoyi-im/src/main/java/org/dromara/im/config/ImCacheConfig.java
@@ -0,0 +1,32 @@
+package org.dromara.im.config;
+
+import lombok.AllArgsConstructor;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.CachingConfigurerSupport;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.Bean;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
+import org.springframework.data.redis.cache.RedisCacheManager;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializationContext;
+
+import java.time.Duration;
+
+@EnableCaching
+@AllArgsConstructor
+public class ImCacheConfig extends CachingConfigurerSupport {
+
+ private final RedisConnectionFactory factory;
+
+ private final GenericJackson2JsonRedisSerializer jackson2JsonRedisSerializer;
+
+ @Bean
+ public CacheManager cacheManager() {
+ // 设置redis缓存管理器
+ RedisCacheConfiguration cacheConfiguration = RedisCacheConfiguration.defaultCacheConfig().entryTtl(Duration.ofSeconds(600))
+ .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer));
+ return RedisCacheManager.builder(factory).cacheDefaults(cacheConfiguration).build();
+ }
+
+}
diff --git a/im-admin/ruoyi-im/src/main/java/org/dromara/im/config/ImTransConfig.java b/im-admin/ruoyi-im/src/main/java/org/dromara/im/config/ImTransConfig.java
new file mode 100644
index 0000000..6c4dc94
--- /dev/null
+++ b/im-admin/ruoyi-im/src/main/java/org/dromara/im/config/ImTransConfig.java
@@ -0,0 +1,40 @@
+package org.dromara.im.config;
+
+import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
+import com.fhs.trans.ds.DataSourceSetter;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Map;
+
+/**
+ * easy trans配置
+ *
+ * @author: Blue
+ * @date: 2024-07-20
+ * @version: 1.0
+ */
+@Configuration
+public class ImTransConfig {
+
+ @Bean
+ public DataSourceSetter dataSourceSetter() {
+ // 适配多数据源
+ return new DataSourceSetter() {
+ @Override
+ public void setDataSource(String datasourceName) {
+ DynamicDataSourceContextHolder.push(datasourceName);
+ }
+
+ @Override
+ public Map