77 changed files with 703 additions and 911 deletions
@ -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. |
|
||||
@ -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; |
|
||||
} |
|
||||
@ -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; |
|
||||
} |
|
||||
@ -1,37 +0,0 @@ |
|||||
declare module 'moddle' { |
|
||||
import type { Element as element } from 'bpmn-js/lib/model/Types'; |
|
||||
|
|
||||
export type Element = { |
|
||||
get<T>(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<string, ModdleElement>; |
|
||||
|
|
||||
getPackage: typeof Registry.prototype.getPackage; |
|
||||
|
|
||||
getPackages: typeof Registry.prototype.getPackages; |
|
||||
|
|
||||
create(type: string, attrs?: any): ModdleElement; |
|
||||
} |
|
||||
} |
|
||||
@ -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; |
|
||||
}; |
|
||||
}; |
|
||||
} |
|
||||
} |
|
||||
@ -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(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -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<Object, Object> getContext() { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void setContext(Map<Object, Object> context) { |
||||
|
} |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -1,105 +0,0 @@ |
|||||
package org.dromara.im.controller; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
import lombok.RequiredArgsConstructor; |
|
||||
import jakarta.servlet.http.HttpServletResponse; |
|
||||
import jakarta.validation.constraints.*; |
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
import org.springframework.validation.annotation.Validated; |
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
|
||||
import org.dromara.common.log.annotation.Log; |
|
||||
import org.dromara.common.web.core.BaseController; |
|
||||
import org.dromara.common.mybatis.core.page.PageQuery; |
|
||||
import org.dromara.common.core.domain.R; |
|
||||
import org.dromara.common.core.validate.AddGroup; |
|
||||
import org.dromara.common.core.validate.EditGroup; |
|
||||
import org.dromara.common.log.enums.BusinessType; |
|
||||
import org.dromara.common.excel.utils.ExcelUtil; |
|
||||
import org.dromara.im.domain.vo.ImGroupMemberVo; |
|
||||
import org.dromara.im.domain.bo.ImGroupMemberBo; |
|
||||
import org.dromara.im.service.IImGroupMemberService; |
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
||||
|
|
||||
/** |
|
||||
* 群成员 |
|
||||
* |
|
||||
* @author Blue |
|
||||
* @date 2024-12-22 |
|
||||
*/ |
|
||||
@Validated |
|
||||
@RequiredArgsConstructor |
|
||||
@RestController |
|
||||
@RequestMapping("/im/groupMember") |
|
||||
public class ImGroupMemberController extends BaseController { |
|
||||
|
|
||||
private final IImGroupMemberService imGroupMemberService; |
|
||||
|
|
||||
/** |
|
||||
* 查询群成员列表 |
|
||||
*/ |
|
||||
@SaCheckPermission("im:groupMember:list") |
|
||||
@GetMapping("/list") |
|
||||
public TableDataInfo<ImGroupMemberVo> list(ImGroupMemberBo bo, PageQuery pageQuery) { |
|
||||
return imGroupMemberService.queryPageList(bo, pageQuery); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出群成员列表 |
|
||||
*/ |
|
||||
@SaCheckPermission("im:groupMember:export") |
|
||||
@Log(title = "群成员", businessType = BusinessType.EXPORT) |
|
||||
@PostMapping("/export") |
|
||||
public void export(ImGroupMemberBo bo, HttpServletResponse response) { |
|
||||
List<ImGroupMemberVo> list = imGroupMemberService.queryList(bo); |
|
||||
ExcelUtil.exportExcel(list, "群成员", ImGroupMemberVo.class, response); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 获取群成员详细信息 |
|
||||
* |
|
||||
* @param id 主键 |
|
||||
*/ |
|
||||
@SaCheckPermission("im:groupMember:query") |
|
||||
@GetMapping("/{id}") |
|
||||
public R<ImGroupMemberVo> getInfo(@NotNull(message = "主键不能为空") |
|
||||
@PathVariable Long id) { |
|
||||
return R.ok(imGroupMemberService.queryById(id)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增群成员 |
|
||||
*/ |
|
||||
@SaCheckPermission("im:groupMember:add") |
|
||||
@Log(title = "群成员", businessType = BusinessType.INSERT) |
|
||||
@RepeatSubmit() |
|
||||
@PostMapping() |
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ImGroupMemberBo bo) { |
|
||||
return toAjax(imGroupMemberService.insertByBo(bo)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 修改群成员 |
|
||||
*/ |
|
||||
@SaCheckPermission("im:groupMember:edit") |
|
||||
@Log(title = "群成员", businessType = BusinessType.UPDATE) |
|
||||
@RepeatSubmit() |
|
||||
@PutMapping() |
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ImGroupMemberBo bo) { |
|
||||
return toAjax(imGroupMemberService.updateByBo(bo)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除群成员 |
|
||||
* |
|
||||
* @param ids 主键串 |
|
||||
*/ |
|
||||
@SaCheckPermission("im:groupMember:remove") |
|
||||
@Log(title = "群成员", businessType = BusinessType.DELETE) |
|
||||
@DeleteMapping("/{ids}") |
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") |
|
||||
@PathVariable Long[] ids) { |
|
||||
return toAjax(imGroupMemberService.deleteWithValidByIds(List.of(ids), true)); |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,24 @@ |
|||||
|
package org.dromara.im.domain.dto; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import jakarta.validation.constraints.NotNull; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
|
||||
|
/** |
||||
|
* @author: Blue |
||||
|
* @date: 2024-07-14 |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@Schema(description = "群组封禁") |
||||
|
public class ImGroupBanDto { |
||||
|
|
||||
|
@NotNull(message = "群组id不可为空") |
||||
|
@Schema(description = "群组id") |
||||
|
private Long id; |
||||
|
|
||||
|
@Length(max = 128, message = "封禁原因长度不能超过128") |
||||
|
@Schema(description = "封禁原因") |
||||
|
private String reason; |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package org.dromara.im.domain.dto; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import jakarta.validation.constraints.NotNull; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author: Blue |
||||
|
* @date: 2024-07-14 |
||||
|
* @version: 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@Schema(description = "群组解锁") |
||||
|
public class ImGroupUnbanDto { |
||||
|
|
||||
|
@NotNull(message = "群组id不可为空") |
||||
|
@Schema(description = "群组id") |
||||
|
private Long id; |
||||
|
|
||||
|
} |
||||
Loading…
Reference in new issue