From aa4070614806f23be8cef11960ac3158595fb7d5 Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 6 Dec 2022 16:45:44 +0800 Subject: [PATCH 01/15] =?UTF-8?q?build=201.1.8=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6da68a5..5e6a2e83 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Bootx-Platform (v1.1.7) +# Bootx-Platform (v1.1.8)

star -- Gitee From 6a4f0c78464b293dcc4fed16d06e4434aaf399c9 Mon Sep 17 00:00:00 2001 From: xxm Date: Fri, 9 Dec 2022 22:16:28 +0800 Subject: [PATCH 02/15] =?UTF-8?q?feat=20=E5=AD=97=E5=85=B8=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=85=8D=E7=BD=AE=E6=98=AF=E5=90=A6=E5=90=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DictionaryItemController.java | 8 +++++++- .../core/dict/dao/DictionaryItemManager.java | 10 ++++------ .../core/dict/dao/DictionaryManager.java | 10 ++++++++-- .../baseapi/core/dict/entity/Dictionary.java | 9 ++++++--- .../core/dict/entity/DictionaryItem.java | 3 +++ .../dict/service/DictionaryItemService.java | 20 +++++++++++++++++++ .../core/dict/service/DictionaryService.java | 1 + .../bootx/baseapi/dto/dict/DictionaryDto.java | 3 +++ .../baseapi/dto/dict/DictionaryItemDto.java | 3 +++ .../param/dict/DictionaryItemParam.java | 10 +++++++--- .../baseapi/param/dict/DictionaryParam.java | 4 ++++ 11 files changed, 66 insertions(+), 15 deletions(-) diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/controller/DictionaryItemController.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/controller/DictionaryItemController.java index 3a6f8258..1db0a31b 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/controller/DictionaryItemController.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/controller/DictionaryItemController.java @@ -70,13 +70,19 @@ public class DictionaryItemController { return Res.ok(dictionaryItemService.pageByDictionaryId(dictId,pageParam)); } - @IgnoreAuth @Operation( summary = "获取全部字典项") @GetMapping("/findAll") public ResResult> findAll() { return Res.ok(dictionaryItemService.findAll()); } + @IgnoreAuth + @Operation( summary = "获取启用的字典项列表") + @GetMapping("/findAllByEnable") + public ResResult> findAllByEnable() { + return Res.ok(dictionaryItemService.findAllByEnable()); + } + @Operation( summary = "编码是否被使用") @GetMapping("/existsByCode") public ResResult existsByCode(String code,Long dictId) { diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/dao/DictionaryItemManager.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/dao/DictionaryItemManager.java index 2421ca80..d8449f18 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/dao/DictionaryItemManager.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/dao/DictionaryItemManager.java @@ -10,7 +10,6 @@ import lombok.AllArgsConstructor; import org.springframework.stereotype.Repository; import java.util.List; -import java.util.Optional; /** * 字典项 @@ -39,7 +38,7 @@ public class DictionaryItemManager extends BaseManager findByDictId(Long dictId) { return findAllByField(DictionaryItem::getDictId,dictId); @@ -63,10 +62,9 @@ public class DictionaryItemManager extends BaseManager findByDictCodeAndCode(String dictCode, String itemCode) { + public List findAllByEnable(boolean enable){ return lambdaQuery() - .eq(DictionaryItem::getDictCode,dictCode) - .eq(DictionaryItem::getCode,itemCode) - .oneOpt(); + .eq(DictionaryItem::getEnable,enable) + .list(); } } diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/dao/DictionaryManager.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/dao/DictionaryManager.java index 52b71280..943ad7c9 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/dao/DictionaryManager.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/dao/DictionaryManager.java @@ -11,10 +11,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.AllArgsConstructor; import org.springframework.stereotype.Repository; -/** +import java.util.List; + +/** * 字典 * @author xxm -* @date 2020/11/13 +* @date 2020/11/13 */ @Repository @AllArgsConstructor @@ -43,4 +45,8 @@ public class DictionaryManager extends BaseManager .like(StrUtil.isNotBlank(param.getGroupTag()),Dictionary::getGroupTag,param.getGroupTag()) .page(mpPage); } + + public List findAllByEnable(boolean enable){ + return lambdaQuery().eq(Dictionary::getEnable,enable).list(); + } } diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/entity/Dictionary.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/entity/Dictionary.java index 3b4692cd..18fcae94 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/entity/Dictionary.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/entity/Dictionary.java @@ -9,10 +9,10 @@ import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.EqualsAndHashCode; -/** +/** * 字典 -* @author xxm -* @date 2020/11/13 +* @author xxm +* @date 2020/11/13 */ @Data @EqualsAndHashCode(callSuper = true) @@ -31,6 +31,9 @@ public class Dictionary extends MpBaseEntity implements EntityBaseFunction findAllByEnable(){ + + // 获取被停用的字典 + List unEnableDictIds = dictionaryManager.findAllByEnable(false).stream() + .map(MpIdEntity::getId) + .collect(Collectors.toList()); + + // 过滤掉被停用的字典项 + return dictionaryItemManager.findAllByEnable(true).stream() + .filter(o->!unEnableDictIds.contains(o.getDictId())) + .sorted(Comparator.comparing(DictionaryItem::getDictId) + .thenComparing(DictionaryItem::getSortNo) + .thenComparing(MpIdEntity::getId) + ) + .map(DictionaryItem::toSimpleDto) + .collect(Collectors.toList()); + } } diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictionaryService.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictionaryService.java index 4e13be4e..68def5ae 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictionaryService.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictionaryService.java @@ -109,6 +109,7 @@ public class DictionaryService { .collect(Collectors.toList()); } + /** * 查询所有字典 */ diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/dict/DictionaryDto.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/dict/DictionaryDto.java index c2be4a7e..c8659bb0 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/dict/DictionaryDto.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/dict/DictionaryDto.java @@ -26,6 +26,9 @@ public class DictionaryDto extends BaseDto implements Serializable { @Schema(description= "名称") private String name; + @Schema(description= "启用状态") + private Boolean enable; + @Schema(description= "分类标签") private String groupTag; diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/dict/DictionaryItemDto.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/dict/DictionaryItemDto.java index 361a3356..48b366cd 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/dict/DictionaryItemDto.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/dict/DictionaryItemDto.java @@ -32,6 +32,9 @@ public class DictionaryItemDto extends BaseDto implements Serializable { @Schema(description= "名称") private String name; + @Schema(description= "启用状态") + private Boolean enable; + @Schema(description= "字典项排序") private Double sortNo; diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/dict/DictionaryItemParam.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/dict/DictionaryItemParam.java index 475eb115..3bcc1398 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/dict/DictionaryItemParam.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/dict/DictionaryItemParam.java @@ -11,10 +11,10 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Null; import java.io.Serializable; -/** +/** * 字典项参数 -* @author xxm -* @date 2021/8/4 +* @author xxm +* @date 2021/8/4 */ @Data @Accessors(chain = true) @@ -42,6 +42,10 @@ public class DictionaryItemParam implements Serializable { @Schema(description= "名称") private String name; + @NotEmpty(message = "启用状态不可为空",groups = add.class) + @Schema(description= "启用状态") + private Boolean enable; + @Schema(description= "字典项排序") private Double sortNo; diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/dict/DictionaryParam.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/dict/DictionaryParam.java index 663dc10f..39d06fc4 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/dict/DictionaryParam.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/dict/DictionaryParam.java @@ -35,6 +35,10 @@ public class DictionaryParam implements Serializable { @Schema(description= "名称") private String name; + @NotEmpty(message = "启用状态不可为空",groups = add.class) + @Schema(description= "启用状态") + private Boolean enable; + @Schema(description= "分类标签") private String groupTag; -- Gitee From 0e8b940b9928e276d0304591b10e2b7739ef3c2e Mon Sep 17 00:00:00 2001 From: xxm Date: Sat, 10 Dec 2022 22:47:20 +0800 Subject: [PATCH 03/15] =?UTF-8?q?feat=20=E7=B3=BB=E7=BB=9F=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=94=AF=E6=8C=81=E9=85=8D=E7=BD=AE=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=90=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parameter/entity/SystemParameter.java | 11 +++++---- .../parameter/service/SystemParamService.java | 23 +++++++++---------- .../dto/parameter/SystemParameterDto.java | 3 +++ .../param/system/SystemParameterParam.java | 11 ++++++--- 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/parameter/entity/SystemParameter.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/parameter/entity/SystemParameter.java index 4456f080..dc604d81 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/parameter/entity/SystemParameter.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/parameter/entity/SystemParameter.java @@ -12,10 +12,10 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; -/** +/** * 系统参数 -* @author xxm -* @date 2021/10/25 +* @author xxm +* @date 2021/10/25 */ @EqualsAndHashCode(callSuper = true) @Data @@ -35,7 +35,10 @@ public class SystemParameter extends MpBaseEntity implements EntityBaseFunction< /** 参数类型 */ private Integer type; - /** 系统内置参数 */ + /** 是否启用 */ + private Boolean enable; + + /** 内置参数 */ @TableField(updateStrategy = FieldStrategy.IGNORED) private boolean internal; diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/parameter/service/SystemParamService.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/parameter/service/SystemParamService.java index 6623ed23..4bc25339 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/parameter/service/SystemParamService.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/parameter/service/SystemParamService.java @@ -14,13 +14,16 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import lombok.val; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -/** +import java.util.Objects; + +/** * 系统参数 -* @author xxm -* @date 2021/10/25 +* @author xxm +* @date 2021/10/25 */ @Slf4j @Service @@ -71,20 +74,16 @@ public class SystemParamService implements ParamService { .orElseThrow(DataNotExistException::new); } - /** - * 根据key获取单条 - */ - public String get(String key) { - return systemParamManager.findByParamKey(key).map(SystemParameter::getValue) - .orElse(null); - } - /** * 根据键名获取键值 */ public String findByParamKey(String key) { - return systemParamManager.findByParamKey(key).map(SystemParameter::getValue) + val param = systemParamManager.findByParamKey(key) .orElseThrow(DataNotExistException::new); + if (Objects.equals(param.getEnable(),false)){ + throw new BizException("该参数已停用"); + } + return param.getValue(); } /** diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/parameter/SystemParameterDto.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/parameter/SystemParameterDto.java index 9b175599..6aae6ddb 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/parameter/SystemParameterDto.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/dto/parameter/SystemParameterDto.java @@ -29,6 +29,9 @@ public class SystemParameterDto extends BaseDto { @Schema(description= "参数类型") private Integer type; + @Schema(description= "启用状态") + private Boolean enable; + @Schema(description= "是否系统参数") private boolean internal; diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/system/SystemParameterParam.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/system/SystemParameterParam.java index 3a0567d6..608de9ef 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/system/SystemParameterParam.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/param/system/SystemParameterParam.java @@ -9,10 +9,10 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import javax.validation.constraints.Null; -/** +/** * 系统参数 -* @author xxm -* @date 2021/10/25 +* @author xxm +* @date 2021/10/25 */ @Data @Accessors(chain = true) @@ -37,6 +37,11 @@ public class SystemParameterParam { @Schema(description = "参数值") private String value; + @NotNull(message = "启用状态不可为空",groups = ValidationGroup.add.class) + @Schema(description= "启用状态") + private Boolean enable; + + @Schema(description = "参数键类型") private Integer type; -- Gitee From 5febd55427c2a0ae3cea738513bf41a3fbd2d99f Mon Sep 17 00:00:00 2001 From: xxm Date: Mon, 12 Dec 2022 23:18:48 +0800 Subject: [PATCH 04/15] =?UTF-8?q?feat=20RabbitMQ=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=9C=A8=E4=B8=8D=E9=85=8D=E7=BD=AE=E8=BF=9E=E6=8E=A5=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E4=B8=8D=E6=97=A0?= =?UTF-8?q?=E9=99=90=E9=87=8D=E8=BF=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/annotation/QueryParam.java | 53 +++++++++++++ .../service/BpmInstanceQueryService.java | 5 +- .../instance/service/BpmTaskQueryService.java | 9 ++- .../model/service/BpmModelNodeService.java | 5 +- .../core/model/service/BpmModelService.java | 5 +- .../quartz/core/service/QuartzJobService.java | 3 +- .../bootx/common/mybatisplus/util/MpUtil.java | 23 +++++- .../conditional/ConditionalOnRabbit.java | 21 +++++ .../rabbit/conditional/OnRabbitEnable.java | 29 +++++++ .../BootxRabbitListenerConfigurer.java | 2 + .../configuration/RabbitMqProperties.java | 22 ++++++ .../query/generator/QueryGenerator.java | 79 +++++++++++++++++-- .../query/SuperQueryDemoController.java | 17 ++++ .../rabbit/DemoRabbitMqMessageListener.java | 13 +-- .../third/service/UserThirdQueryService.java | 9 ++- .../upms/service/UserDataScopeService.java | 3 +- .../core/pay/service/PayRefundService.java | 3 +- .../voucher/service/VoucherPayService.java | 3 +- .../payment/mq/PaymentMessageListener.java | 2 + .../core/calculate/cache/CalculateCache.java | 10 +-- .../service/OrderCalculateService.java | 2 +- .../check/injector/CheckRuleInjector.java | 2 +- .../recommend/OrderFindActivityService.java | 2 +- .../src/main/resources/application-dev.yml | 6 +- 24 files changed, 290 insertions(+), 38 deletions(-) create mode 100644 bootx-common-core/src/main/java/cn/bootx/common/core/annotation/QueryParam.java create mode 100644 bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/conditional/ConditionalOnRabbit.java create mode 100644 bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/conditional/OnRabbitEnable.java create mode 100644 bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/configuration/RabbitMqProperties.java diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/QueryParam.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/QueryParam.java new file mode 100644 index 00000000..1639619d --- /dev/null +++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/QueryParam.java @@ -0,0 +1,53 @@ +package cn.bootx.common.core.annotation; + +import java.lang.annotation.*; + +/** + * 查询参数 (方法) + * @author xxm + * @date 2022/12/12 + */ +@Target({ElementType.TYPE,ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Inherited +public @interface QueryParam { + + /** + * 匹配条件类型 + */ + CompareTypeEnum type() default CompareTypeEnum.EQ; + + + /** + * 匹配类型 + */ + enum CompareTypeEnum{ + /** 大于 */ + GT, + + /** 大于等于 */ + GE, + + /** 小于 */ + LT, + + /** 小于等于 */ + LE, + + /** 等于 */ + EQ, + + /** 模糊匹配 */ + LIKE, + + /** 左模糊 */ + LIKE_LEFT, + + /** 右模糊 */ + LIKE_RIGHT, + + /** 是否为空, 只作用在布尔类型上, true 代表 is null, false 代表 not null */ + IS_NULL; + } +} diff --git a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmInstanceQueryService.java b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmInstanceQueryService.java index e7c08c1e..23dfe1fd 100644 --- a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmInstanceQueryService.java +++ b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmInstanceQueryService.java @@ -31,12 +31,13 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; +import java.util.function.Function; import java.util.stream.Collectors; /** * 实例查询 * @author xxm - * @date 2022/8/31 + * @date 2022/8/31 */ @Slf4j @Service @@ -128,7 +129,7 @@ public class BpmInstanceQueryService { * 转换 processInstances 为 系统中的对象 */ public List convertInstanceInfo(List instanceIds){ - Map bpmInstanceMap = bpmInstanceManager.findAllByInstanceIds(instanceIds).stream().collect(Collectors.toMap(BpmInstance::getInstanceId, o -> o)); + Map bpmInstanceMap = bpmInstanceManager.findAllByInstanceIds(instanceIds).stream().collect(Collectors.toMap(BpmInstance::getInstanceId, Function.identity())); return instanceIds.stream().map(instanceId -> { BpmInstance bpmInstance = Optional.ofNullable(bpmInstanceMap.get(instanceId)).orElse(new BpmInstance()); return new InstanceInfo() diff --git a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmTaskQueryService.java b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmTaskQueryService.java index c584a97f..19683dbc 100644 --- a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmTaskQueryService.java +++ b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/instance/service/BpmTaskQueryService.java @@ -21,12 +21,13 @@ import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.function.Function; import java.util.stream.Collectors; -/** +/** * 流程任务查询 - * @author xxm - * @date 2022/9/1 + * @author xxm + * @date 2022/9/1 */ @Slf4j @Service @@ -93,7 +94,7 @@ public class BpmTaskQueryService { * 转换 */ public List convertInstanceInfo(List taskIds) { - Map bpmTaskMap = bpmTaskManager.findAllByTaskIds(taskIds).stream().collect(Collectors.toMap(BpmTask::getTaskId, o -> o)); + Map bpmTaskMap = bpmTaskManager.findAllByTaskIds(taskIds).stream().collect(Collectors.toMap(BpmTask::getTaskId, Function.identity())); return taskIds.stream().map(taskId -> { BpmTask bpmTask = Optional.ofNullable(bpmTaskMap.get(taskId)).orElse(new BpmTask()); return new TaskInfo() diff --git a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/model/service/BpmModelNodeService.java b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/model/service/BpmModelNodeService.java index 7a96bcae..97cda632 100644 --- a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/model/service/BpmModelNodeService.java +++ b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/model/service/BpmModelNodeService.java @@ -28,6 +28,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; import static cn.bootx.starter.flowable.code.CachingCode.NODE_MODEL_ID; @@ -37,7 +38,7 @@ import static cn.bootx.starter.flowable.code.ModelNodeCode.ASSIGN_SPONSOR; /** * 模型任务节点服务 * @author xxm - * @date 2022/8/25 + * @date 2022/8/25 */ @Slf4j @Service @@ -152,7 +153,7 @@ public class BpmModelNodeService { // bpmn文件中的 List flowNodes = this.getFlowNodes(modelId); List flowNodeIds = flowNodes.stream().map(BpmModelNode::getNodeId).collect(Collectors.toList()); - Map flowNodeMap = flowNodes.stream().collect(Collectors.toMap(BpmModelNode::getNodeId, o -> o)); + Map flowNodeMap = flowNodes.stream().collect(Collectors.toMap(BpmModelNode::getNodeId, Function.identity())); // bpmn中有列表没有的添加, 双方都有的不动 List saves = flowNodes.stream() .filter(o -> !taskNodeIds.contains(o.getNodeId())) diff --git a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/model/service/BpmModelService.java b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/model/service/BpmModelService.java index 06945c54..8e336fb8 100644 --- a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/model/service/BpmModelService.java +++ b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/core/model/service/BpmModelService.java @@ -36,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Objects; +import java.util.function.Function; import java.util.stream.Collectors; import static cn.bootx.starter.flowable.code.ModelCode.*; @@ -43,7 +44,7 @@ import static cn.bootx.starter.flowable.code.ModelCode.*; /** * 流程模型 * @author xxm - * @date 2022/8/23 + * @date 2022/8/23 */ @Slf4j @Service @@ -252,7 +253,7 @@ public class BpmModelService { List userTasks = process.findFlowElementsOfType(UserTask.class); List bpmModelNodes = bpmModelNodeManager.findAllByModelId(bpmModel.getId()); - val bpmModelNodeMap = bpmModelNodes.stream().collect(Collectors.toMap(BpmModelNode::getNodeId, o->o)); + val bpmModelNodeMap = bpmModelNodes.stream().collect(Collectors.toMap(BpmModelNode::getNodeId, Function.identity())); for (val userTask : userTasks) { BpmModelNode modelTask = bpmModelNodeMap.get(userTask.getId()); diff --git a/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/core/service/QuartzJobService.java b/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/core/service/QuartzJobService.java index 42d48362..b37babe6 100644 --- a/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/core/service/QuartzJobService.java +++ b/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/core/service/QuartzJobService.java @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.function.Function; import java.util.stream.Collectors; /** @@ -147,7 +148,7 @@ public class QuartzJobService { */ public void syncJobStatus(){ Map quartzJobMap = quartzJobManager.findRunning().stream() - .collect(Collectors.toMap(o->o.getId().toString(), o -> o)); + .collect(Collectors.toMap(o->o.getId().toString(), Function.identity())); List triggers = jobScheduler.findTriggers(); diff --git a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/util/MpUtil.java b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/util/MpUtil.java index e3aeee6e..2f7fd5df 100644 --- a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/util/MpUtil.java +++ b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/util/MpUtil.java @@ -7,6 +7,7 @@ import cn.bootx.common.core.rest.param.PageParam; import cn.bootx.common.mybatisplus.base.MpBaseEntity; import cn.bootx.common.mybatisplus.base.MpIdEntity; import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.IdUtil; import com.baomidou.mybatisplus.core.metadata.TableFieldInfo; import com.baomidou.mybatisplus.core.toolkit.Assert; @@ -18,6 +19,7 @@ import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapp import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.reflection.property.PropertyNamer; +import java.lang.reflect.Method; import java.time.LocalDateTime; import java.util.List; import java.util.Map; @@ -75,7 +77,7 @@ public class MpUtil { /** * 获取行名称 - * @param function Lambda表达式 + * @param function 对象字段对应的读取方法的Lambda表达式 * @return 字段名 */ public static String getColumnName(SFunction function){ @@ -87,6 +89,25 @@ public class MpUtil { return columnCache.getColumn(); } + /** + * 获取行名称 + * @param readMethod 对象字段对应的读取方法对象 + * @param clazz 实体类类型. 辅助进行判断, 可以为空, 传多个只有第一个生效 + * @return 字段名 + */ + public static String getColumnName(Method readMethod, Class ...clazz){ + Class beanClass = readMethod.getDeclaringClass(); + if (ArrayUtil.isNotEmpty(clazz)){ + beanClass = clazz[0]; + } + + Map columnMap = LambdaUtils.getColumnMap(beanClass); + Assert.notEmpty(columnMap, "错误:无法执行.因为无法获取到实体类的表对应缓存!"); + String fieldName = PropertyNamer.methodToProperty(readMethod.getName()); + ColumnCache columnCache = columnMap.get(LambdaUtils.formatKey(fieldName)); + return columnCache.getColumn(); + } + /** * 批量执行语句, 通常用于for循环方式的批量插入 */ diff --git a/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/conditional/ConditionalOnRabbit.java b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/conditional/ConditionalOnRabbit.java new file mode 100644 index 00000000..8906aca8 --- /dev/null +++ b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/conditional/ConditionalOnRabbit.java @@ -0,0 +1,21 @@ +package cn.bootx.common.rabbit.conditional; + +import org.springframework.context.annotation.Conditional; + +import java.lang.annotation.*; + +/** + * 判断系统是否在启用了Rabbit, 未启用的情况下不将Bean注册到系统中 + * + * 使用场景: 在不使用Rabbit中间件的场合里, 但未去除Rabbit相关代码的情况下, 通过配置文件中关闭Rabbit选项, 来实现系统的正常使用, + * 不这样处理会导致RabbitMQ进行无限尝试重连服务器 + * 需要在使用 @RabbitListener 标注方法的类上加上这个注解, 让这个对象不注册到系统中 + * @author xxm + * @date 2022/12/12 + */ +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Conditional(OnRabbitEnable.class) +public @interface ConditionalOnRabbit { +} diff --git a/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/conditional/OnRabbitEnable.java b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/conditional/OnRabbitEnable.java new file mode 100644 index 00000000..bd25f173 --- /dev/null +++ b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/conditional/OnRabbitEnable.java @@ -0,0 +1,29 @@ +package cn.bootx.common.rabbit.conditional; + +import cn.bootx.common.rabbit.configuration.RabbitMqProperties; +import org.springframework.boot.context.properties.bind.Binder; +import org.springframework.context.annotation.Condition; +import org.springframework.context.annotation.ConditionContext; +import org.springframework.core.type.AnnotatedTypeMetadata; + +/** + * 判断是否在启用了Rabbit, 用来控制在没启用Rabbit情况下. 不将 @RabbitListener 修饰的监听器注册为Bean, 不然会导致无限尝试重连 + * @author xxm + * @date 2022/12/12 + */ +public class OnRabbitEnable implements Condition { + private final String rabbitPropertiesPrefix = "bootx.common.rabbit"; + + /** + * @param context + * @param metadata + * @return + */ + @Override + public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { + RabbitMqProperties rabbitMqProperties = Binder.get(context.getEnvironment()) + .bind(rabbitPropertiesPrefix, RabbitMqProperties.class) + .orElse(new RabbitMqProperties()); + return rabbitMqProperties.isEnable(); + } +} diff --git a/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/configuration/BootxRabbitListenerConfigurer.java b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/configuration/BootxRabbitListenerConfigurer.java index 96bab3e1..0648a3fa 100644 --- a/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/configuration/BootxRabbitListenerConfigurer.java +++ b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/configuration/BootxRabbitListenerConfigurer.java @@ -20,4 +20,6 @@ public class BootxRabbitListenerConfigurer implements RabbitListenerConfigurer { public void configureRabbitListeners(RabbitListenerEndpointRegistrar registrar) { registrar.setMessageHandlerMethodFactory(jsonHandlerMethodFactory); } + + } diff --git a/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/configuration/RabbitMqProperties.java b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/configuration/RabbitMqProperties.java new file mode 100644 index 00000000..5d45e81c --- /dev/null +++ b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/configuration/RabbitMqProperties.java @@ -0,0 +1,22 @@ +package cn.bootx.common.rabbit.configuration; + +import cn.bootx.common.rabbit.conditional.ConditionalOnRabbit; +import lombok.Getter; +import lombok.Setter; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * MQTT配置 + * @author xxm + * @date 2022/12/12 + */ +@Getter +@Setter +@ConfigurationProperties("bootx.common.rabbit") +public class RabbitMqProperties { + /** + * 是否开启 RabbitMQ功能, + * @see ConditionalOnRabbit 配合此注解使用 + */ + private boolean enable = false; +} diff --git a/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/QueryGenerator.java b/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/QueryGenerator.java index 63cf0e7c..34459d55 100644 --- a/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/QueryGenerator.java +++ b/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/QueryGenerator.java @@ -6,14 +6,15 @@ import cn.bootx.common.query.entity.QueryBetweenParam; import cn.bootx.common.query.entity.QueryOrder; import cn.bootx.common.query.entity.QueryParam; import cn.bootx.common.query.entity.QueryParams; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import java.util.Collection; -import java.util.List; -import java.util.Objects; -import java.util.Optional; +import java.beans.PropertyDescriptor; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; /** * 查询条件生成器 @@ -23,7 +24,7 @@ import java.util.Optional; public class QueryGenerator { /** - * 生成查询条件 + * 生成查询条件 (根据查询参数对象生成) * @param queryParams 参数 * @param 泛型 * @return 查询器 @@ -198,4 +199,72 @@ public class QueryGenerator { } } + /** + * 生成查询条件 (根据实体对象生成), 生成的多个查询条件之间用And连接 + * @param queryParams 参数 + * @param 泛型 + * @return 查询器 + */ + public static QueryWrapper generator(Object queryParams) { + QueryWrapper wrapper = new QueryWrapper<>(); + + if (Objects.isNull(queryParams)){ + return wrapper; + } + + // 读取实体类上的查询注解注解 + + + // 读取实体类对象里的字段 + + + // 处理字段上的注解 + + return wrapper; + } + + /** + * 生成查询条件 (根据实体对象生成), 生成的多个查询条件之间用And连接 + * @param queryParams 参数 + * @param clazz 数据库Entity类 + * @param 泛型 + * @return 查询器 + */ + public static QueryWrapper generator(Object queryParams,Class clazz) { + QueryWrapper wrapper = new QueryWrapper<>(); + if (Objects.isNull(queryParams)){ + return wrapper; + } + + // 分别读取参数对象和实体类上的字段 + List paramProps = Arrays.stream(BeanUtil.getPropertyDescriptors(queryParams.getClass())) + .collect(Collectors.toList()); + + // 读取实体类对象里的字段 + Map entityPropMap = Arrays.stream(BeanUtil.getPropertyDescriptors(clazz)) + .collect(Collectors.toMap(PropertyDescriptor::getName, Function.identity(), (o1, o2) -> o2)); + + List params = new ArrayList<>(); + + // 遍历参数上的对象, 生成 + for (PropertyDescriptor paramProp : paramProps) { + Object property = BeanUtil.getProperty(queryParams, paramProp.getName()); + if (!StrUtil.isBlankIfStr(property)){ + // 获取查询注解 clazz 类上 < clazz 字段 < queryParams 类上 < clazz 字段 + + paramProp.getPropertyEditorClass(); + + System.out.println(paramProp.getName()+" : "+property); + } + } + + // 处理字段上的注解 + + // 生成方法 + initQueryParam(wrapper,params); + + return wrapper; + } + + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java index 47d7048b..32e9561a 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java @@ -5,13 +5,17 @@ import cn.bootx.common.core.rest.Res; import cn.bootx.common.core.rest.ResResult; import cn.bootx.common.core.rest.param.PageParam; import cn.bootx.common.query.entity.QueryParams; +import cn.bootx.common.query.generator.QueryGenerator; import cn.bootx.demo.core.query.entity.SuperQueryDemo; import cn.bootx.demo.core.query.service.SuperQueryDemoService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; +import lombok.val; import org.springframework.web.bind.annotation.*; +import java.time.LocalDateTime; + /** * * @author xxm @@ -62,4 +66,17 @@ public class SuperQueryDemoController { public ResResult> superQuery(PageParam pageParam, @RequestBody QueryParams queryParams){ return Res.ok(superQueryDemoService.superQuery(pageParam,queryParams)); } + + @Operation(summary = "MP查询生成器测试") + @GetMapping("/mpGenerator") + public ResResult mpGenerator(){ + SuperQueryDemo queryDemo = new SuperQueryDemo() + .setName("222") + .setAge(24) + .setVip(true) + .setRegistrationTime(LocalDateTime.now()); + val generator = QueryGenerator.generator(queryDemo, SuperQueryDemo.class); + System.out.println(generator); + return Res.ok(); + } } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqMessageListener.java b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqMessageListener.java index bf2bcd31..6203daa5 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqMessageListener.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqMessageListener.java @@ -1,17 +1,20 @@ package cn.bootx.demo.core.mq.rabbit; import cn.bootx.common.core.rest.ResResult; +import cn.bootx.common.rabbit.conditional.ConditionalOnRabbit; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.stereotype.Component; -/** -* -* @author xxm -* @date 2022/5/30 -*/ + +/** + * + * @author xxm + * @date 2022/5/30 + */ @Slf4j +@ConditionalOnRabbit @Component @RequiredArgsConstructor public class DemoRabbitMqMessageListener { diff --git a/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/third/service/UserThirdQueryService.java b/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/third/service/UserThirdQueryService.java index 27201bba..a438a4b0 100644 --- a/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/third/service/UserThirdQueryService.java +++ b/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/third/service/UserThirdQueryService.java @@ -18,14 +18,15 @@ import org.springframework.stereotype.Service; import java.util.Map; import java.util.Objects; +import java.util.function.Function; import java.util.stream.Collectors; import static cn.bootx.starter.auth.code.AuthLoginTypeCode.*; -/** +/** * 用户三方账号查询 -* @author xxm -* @date 2022/4/2 +* @author xxm +* @date 2022/4/2 */ @Slf4j @Service @@ -56,7 +57,7 @@ public class UserThirdQueryService { Long userId = SecurityUtil.getUserId(); UserThirdBindInfo userThirdBindInfo = new UserThirdBindInfo(); Map thirdInfoMap = userThirdInfoManager.findAllByUser(userId).stream() - .collect(Collectors.toMap(UserThirdInfo::getClientCode, o -> o)); + .collect(Collectors.toMap(UserThirdInfo::getClientCode, Function.identity())); userThirdBindInfo.setWeChat(getBindInfo(thirdInfoMap,WE_CHAT)); userThirdBindInfo.setWeChatOpen(getBindInfo(thirdInfoMap,WE_CHAT_OPEN)); userThirdBindInfo.setWeCom(getBindInfo(thirdInfoMap,WE_COM)); diff --git a/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/upms/service/UserDataScopeService.java b/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/upms/service/UserDataScopeService.java index 09058f95..333c6cfb 100644 --- a/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/upms/service/UserDataScopeService.java +++ b/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/upms/service/UserDataScopeService.java @@ -33,6 +33,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import static cn.bootx.iam.code.CachingCode.USER_DATA_SCOPE; @@ -167,7 +168,7 @@ public class UserDataScopeService { Set deptIds = userDeptManager.findDeptIdsByUser(userId).stream() .map(UserDept::getDeptId) .collect(Collectors.toSet()); - Map deptMap = deptManager.findAll().stream().collect(Collectors.toMap(MpIdEntity::getId, dept -> dept)); + Map deptMap = deptManager.findAll().stream().collect(Collectors.toMap(MpIdEntity::getId, Function.identity())); Set deptOrgCodes = deptIds.stream().map(deptMap::get).map(Dept::getOrgCode).collect(Collectors.toSet()); return deptMap.values().stream() .filter(dept -> this.judgeSubDept(dept.getOrgCode(), deptOrgCodes)) diff --git a/bootx-services/service-payment/src/main/java/cn/bootx/payment/core/pay/service/PayRefundService.java b/bootx-services/service-payment/src/main/java/cn/bootx/payment/core/pay/service/PayRefundService.java index 8fd43ff7..a26710d0 100644 --- a/bootx-services/service-payment/src/main/java/cn/bootx/payment/core/pay/service/PayRefundService.java +++ b/bootx-services/service-payment/src/main/java/cn/bootx/payment/core/pay/service/PayRefundService.java @@ -36,6 +36,7 @@ import javax.servlet.http.HttpServletRequest; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; import static cn.bootx.payment.code.pay.PayStatusCode.*; @@ -177,7 +178,7 @@ public class PayRefundService { if (CollUtil.isEmpty(refundModeParams)){ throw new PayFailureException("传入的退款参数不合法"); } - Map payModeMap = refundableInfos.stream().collect(Collectors.toMap(RefundableInfo::getPayChannel, o -> o)); + Map payModeMap = refundableInfos.stream().collect(Collectors.toMap(RefundableInfo::getPayChannel, Function.identity())); for (RefundModeParam refundPayMode : refundModeParams) { this.payModeCheck(refundPayMode,payModeMap.get(refundPayMode.getPayChannel())); } diff --git a/bootx-services/service-payment/src/main/java/cn/bootx/payment/core/paymodel/voucher/service/VoucherPayService.java b/bootx-services/service-payment/src/main/java/cn/bootx/payment/core/paymodel/voucher/service/VoucherPayService.java index db4850eb..6ce6e9d7 100644 --- a/bootx-services/service-payment/src/main/java/cn/bootx/payment/core/paymodel/voucher/service/VoucherPayService.java +++ b/bootx-services/service-payment/src/main/java/cn/bootx/payment/core/paymodel/voucher/service/VoucherPayService.java @@ -27,6 +27,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.function.Function; import java.util.stream.Collectors; /** @@ -125,7 +126,7 @@ public class VoucherPayService { // 查找支付记录日志 List voucherLogs = voucherLogManager.findByPaymentIdAndType(paymentId, VoucherCode.LOG_PAY); // 查出关联的储值卡 - Map voucherLogMap = voucherLogs.stream().collect(Collectors.toMap(VoucherLog::getVoucherId, o -> o)); + Map voucherLogMap = voucherLogs.stream().collect(Collectors.toMap(VoucherLog::getVoucherId, Function.identity())); List vouchers = voucherManager.findAllByIds(voucherLogMap.keySet()); // 执行退款并记录日志 List logs = new ArrayList<>(); diff --git a/bootx-services/service-payment/src/main/java/cn/bootx/payment/mq/PaymentMessageListener.java b/bootx-services/service-payment/src/main/java/cn/bootx/payment/mq/PaymentMessageListener.java index c56033b1..97c07c70 100644 --- a/bootx-services/service-payment/src/main/java/cn/bootx/payment/mq/PaymentMessageListener.java +++ b/bootx-services/service-payment/src/main/java/cn/bootx/payment/mq/PaymentMessageListener.java @@ -1,5 +1,6 @@ package cn.bootx.payment.mq; +import cn.bootx.common.rabbit.conditional.ConditionalOnRabbit; import cn.bootx.payment.code.PaymentEventCode; import cn.bootx.payment.core.pay.service.PayExpiredTimeService; import cn.bootx.payment.event.PayCancelEvent; @@ -17,6 +18,7 @@ import org.springframework.stereotype.Component; */ @Slf4j @Component +@ConditionalOnRabbit @RequiredArgsConstructor public class PaymentMessageListener { private final PayExpiredTimeService payExpiredTimeService; diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/calculate/cache/CalculateCache.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/calculate/cache/CalculateCache.java index baa93440..2d3131e3 100644 --- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/calculate/cache/CalculateCache.java +++ b/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/calculate/cache/CalculateCache.java @@ -74,7 +74,7 @@ public class CalculateCache { this.strategyMap = new HashMap<>(); } Map collect = strategies.stream() - .collect(Collectors.toMap(Strategy::getId,o->o)); + .collect(Collectors.toMap(Strategy::getId,Function.identity())); strategyMap.putAll(collect); return this; } @@ -91,7 +91,7 @@ public class CalculateCache { } for (List strategyRegisters : list) { Map collect = strategyRegisters.stream() - .collect(Collectors.toMap(StrategyRegister::getId,o->o)); + .collect(Collectors.toMap(StrategyRegister::getId,Function.identity())); this.strategyRegisterMap.putAll(collect); this.strategyRegisters.addAll(strategyRegisters); @@ -123,7 +123,7 @@ public class CalculateCache { this.activities = new ArrayList<>(); } Map collect = activities.stream() - .collect(Collectors.toMap(Activity::getId,o -> o)); + .collect(Collectors.toMap(Activity::getId,Function.identity())); this.activityMap.putAll(collect); this.activities.addAll(activities); return this; @@ -139,7 +139,7 @@ public class CalculateCache { this.coupons = new ArrayList<>(); } Map collect = coupons.stream() - .collect(Collectors.toMap(Coupon::getId,o -> o)); + .collect(Collectors.toMap(Coupon::getId,Function.identity())); this.couponMap.putAll(collect); this.coupons.addAll(coupons); return this; @@ -155,7 +155,7 @@ public class CalculateCache { this.couponTemplates = new ArrayList<>(); } Map collect = couponTemplates.stream() - .collect(Collectors.toMap(CouponTemplate::getId,o -> o)); + .collect(Collectors.toMap(CouponTemplate::getId,Function.identity())); this.couponTemplateMap.putAll(collect); this.couponTemplates.addAll(couponTemplates); return this; diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/calculate/service/OrderCalculateService.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/calculate/service/OrderCalculateService.java index d90f393a..0aad7d26 100644 --- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/calculate/service/OrderCalculateService.java +++ b/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/calculate/service/OrderCalculateService.java @@ -115,7 +115,7 @@ public class OrderCalculateService { Map strategyRegisterMap = calculateCache.getStrategyRegisterMap(); Map srMap = strategyRegisterIds.stream() .map(strategyRegisterMap::get) - .collect(Collectors.toMap(StrategyRegister::getId, o -> o)); + .collect(Collectors.toMap(StrategyRegister::getId, Function.identity())); // 根据策略注册Id对订单明细进行分组 Map> odMap = new TreeMap<>(); diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/check/injector/CheckRuleInjector.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/check/injector/CheckRuleInjector.java index d6bde1ef..7d151e37 100644 --- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/check/injector/CheckRuleInjector.java +++ b/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/check/injector/CheckRuleInjector.java @@ -80,7 +80,7 @@ public class CheckRuleInjector { // 注入策略属性 Map strategyMap = strategyManager.findAllByIds(strategyIds) .stream() - .collect(Collectors.toMap(Strategy::getId, o->o)); + .collect(Collectors.toMap(Strategy::getId, Function.identity())); for (CheckRuleConfig checkRule : checkRules) { Strategy strategy = strategyMap.get(checkRule.getStrategyId()); checkRule.setRuleScript(strategy.getRuleScript()) diff --git a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/recommend/OrderFindActivityService.java b/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/recommend/OrderFindActivityService.java index d96d65ba..960b2f98 100644 --- a/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/recommend/OrderFindActivityService.java +++ b/bootx-services/service-sales/src/main/java/cn/bootx/sales/core/recommend/OrderFindActivityService.java @@ -57,7 +57,7 @@ public class OrderFindActivityService { .collect(Collectors.toList()); List activities = activityManager.findByStrategyRegister(srIds); Map activityBySrMap = activities.stream() - .collect(Collectors.toMap(Activity::getStrategyRegisterId, o -> o)); + .collect(Collectors.toMap(Activity::getStrategyRegisterId, Function.identity())); // 注入检查规则 checkRuleInjector.injectionActivity(activities, CheckRuleCode.RULE_TYPE_ACTIVITY_CHECK); diff --git a/bootx-start/src/main/resources/application-dev.yml b/bootx-start/src/main/resources/application-dev.yml index cf5360cf..1cd93012 100644 --- a/bootx-start/src/main/resources/application-dev.yml +++ b/bootx-start/src/main/resources/application-dev.yml @@ -20,6 +20,7 @@ spring: host: 127.0.0.1 port: 6379 database: 1 + # 如果不使用MQ的话, 可以将项目中 @EnableRabbit 给注释掉, 就不会一直报错了 rabbitmq: # 虚拟主机 # virtual-host: bootx-platform @@ -132,6 +133,9 @@ bootx: # 异常 exception: show-full-message: true + # 是否启用Rabbit + rabbit: + enable: false starter: # 三方平台 third: @@ -197,4 +201,4 @@ bootx: bucket: fs # 数据权限 data-perm: - field-decrypt-key: "UCrtxSCwYZNCIlav" \ No newline at end of file + field-decrypt-key: "UCrtxSCwYZNCIlav" -- Gitee From 7980e68f4ee07913696951bd37b1c7621af060d1 Mon Sep 17 00:00:00 2001 From: xxm Date: Thu, 15 Dec 2022 00:27:45 +0800 Subject: [PATCH 05/15] =?UTF-8?q?feat=20=E6=9D=A1=E4=BB=B6=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=94=9F=E6=88=90=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/annotation/DictConvert.java | 25 ++ .../common/core/annotation/QueryParam.java | 35 ++- .../generator/AnnotationQueryGenerator.java | 214 +++++++++++++++++ .../query/generator/QueryGenerator.java | 227 +----------------- .../query/generator/SuperQueryGenerator.java | 183 ++++++++++++++ 5 files changed, 459 insertions(+), 225 deletions(-) create mode 100644 bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvert.java create mode 100644 bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/AnnotationQueryGenerator.java create mode 100644 bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/SuperQueryGenerator.java diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvert.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvert.java new file mode 100644 index 00000000..8883ff54 --- /dev/null +++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvert.java @@ -0,0 +1,25 @@ +package cn.bootx.common.core.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 字典翻译注解 + * @author xxm + * @date 2022/12/14 + */ +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +public @interface DictConvert { + + /** + * 字典编码 + */ + String dicCode(); + + /** + * + */ +} diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/QueryParam.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/QueryParam.java index 1639619d..8dab2a13 100644 --- a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/QueryParam.java +++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/QueryParam.java @@ -3,7 +3,8 @@ package cn.bootx.common.core.annotation; import java.lang.annotation.*; /** - * 查询参数 (方法) + * 查询参数 + * 生效顺序 QueryParams 查询参数字段 > Entity 数据库实体字段 > QueryParams 查询类 > Entity 数据库实体类 * @author xxm * @date 2022/12/12 */ @@ -18,11 +19,25 @@ public @interface QueryParam { */ CompareTypeEnum type() default CompareTypeEnum.EQ; + /** + * 是否忽略 + */ + boolean ignore() default false; + + /** + * 名称转换类型, 默认为下划线 + */ + NamingCaseEnum namingCase() default NamingCaseEnum.UNDER_LINE; + + /** + * 自定义查询字段对应的数据库字段名称. 只可以在字段上注解时使用 + */ + String fieldName() default ""; /** * 匹配类型 */ - enum CompareTypeEnum{ + enum CompareTypeEnum { /** 大于 */ GT, @@ -50,4 +65,20 @@ public @interface QueryParam { /** 是否为空, 只作用在布尔类型上, true 代表 is null, false 代表 not null */ IS_NULL; } + + /** + * 名称转换类型 + */ + enum NamingCaseEnum { + /** lambda方式读取对应数据库字段名称 */ + LAMBDA, + /** 转换为下划线 */ + UNDER_LINE, + /** 在注解中自定义 */ + ANNOTATION, + /** 等等再加接的类型 */ + /** 不进行处理 */ + NONE; + + } } diff --git a/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/AnnotationQueryGenerator.java b/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/AnnotationQueryGenerator.java new file mode 100644 index 00000000..9f92fbb7 --- /dev/null +++ b/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/AnnotationQueryGenerator.java @@ -0,0 +1,214 @@ +package cn.bootx.common.query.generator; + +import cn.bootx.common.core.annotation.QueryParam; +import cn.bootx.common.core.annotation.QueryParam.NamingCaseEnum; +import cn.bootx.common.mybatisplus.util.MpUtil; +import cn.hutool.core.annotation.AnnotationUtil; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.text.NamingCase; +import cn.hutool.core.util.ClassUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.experimental.UtilityClass; +import lombok.val; + +import java.beans.PropertyDescriptor; +import java.lang.reflect.Field; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import static cn.bootx.common.core.annotation.QueryParam.CompareTypeEnum; +import static cn.bootx.common.core.annotation.QueryParam.CompareTypeEnum.EQ; +import static cn.bootx.common.core.annotation.QueryParam.NamingCaseEnum.UNDER_LINE; + +/** + * 注解参数查询生成器 + * @author xxm + * @date 2022/12/14 + */ +@UtilityClass +public class AnnotationQueryGenerator { + + /** + * 生成查询条件 (根据实体对象生成), 生成的多个查询条件之间用And连接 + * @param queryParams 参数 + * @param clazz 数据库Entity类 + * @param 泛型 + * @return 查询器 + */ + QueryWrapper generator(Object queryParams, Class clazz) { + QueryWrapper wrapper = new QueryWrapper<>(); + if (Objects.isNull(queryParams)){ + return wrapper; + } + + // 读取参数的字段 + List paramClassProps = Arrays.stream(BeanUtil.getPropertyDescriptors(queryParams.getClass())) + .collect(Collectors.toList()); + + // 读取实体类对象的字段 + Map entityClassPropMap = Arrays.stream(BeanUtil.getPropertyDescriptors(clazz)) + .collect(Collectors.toMap(PropertyDescriptor::getName, Function.identity(), (o1, o2) -> o2)); + + // 遍历参数上的对象, 生成查询构造器条件 + for (PropertyDescriptor paramProp : paramClassProps) { + Object paramValue = BeanUtil.getProperty(queryParams, paramProp.getName()); + if (!StrUtil.isBlankIfStr(paramValue)){ + PropertyDescriptor clazzDescriptor = entityClassPropMap.get(paramProp.getName()); + // 获取查询注解 clazz 类上 < clazz 字段 < queryParams 类上 < clazz 字段 + val annotation = getQueryParamAnnotation(paramProp, queryParams.getClass(), clazzDescriptor, clazz); + // 是否忽略本字段 + if (annotation.map(QueryParam::ignore).orElse(false)){ + continue; + } + // 获取对应的数据库字段名称 + NamingCaseEnum namingCase = annotation.map(QueryParam::namingCase).orElse(UNDER_LINE); + String columnName = getDatabaseFieldName(paramProp, queryParams.getClass(), clazzDescriptor, clazz,namingCase); + // 处理匹配条件类型 + CompareTypeEnum compareType = annotation.map(QueryParam::type).orElse(EQ); + compareTypeSwitch(compareType,wrapper,columnName,paramValue); + } + } + return wrapper; + + } + + + /** + * 生成查询条件 (根据实体对象生成), 生成的多个查询条件之间用And连接 + * @param queryParams 参数 + * @param 泛型 + * @return 查询器 + */ + QueryWrapper generator(Object queryParams) { + QueryWrapper wrapper = new QueryWrapper<>(); + + if (Objects.isNull(queryParams)){ + return wrapper; + } + + // 读取参数的字段 + List paramClassProps = Arrays.stream(BeanUtil.getPropertyDescriptors(queryParams.getClass())) + .collect(Collectors.toList()); + + // 遍历参数上的对象, 生成查询构造器条件 + for (PropertyDescriptor paramProp : paramClassProps) { + Object paramValue = BeanUtil.getProperty(queryParams, paramProp.getName()); + if (!StrUtil.isBlankIfStr(paramValue)){ + // 获取查询注解 clazz 类上 < clazz 字段 < queryParams 类上 < clazz 字段 + val annotation = getQueryParamAnnotation(paramProp, queryParams.getClass(), null, null); + // 是否忽略本字段 + if (annotation.map(QueryParam::ignore).orElse(false)){ + continue; + } + // 获取对应的数据库字段名称 + NamingCaseEnum namingCase = annotation.map(QueryParam::namingCase).orElse(UNDER_LINE); + String columnName = getDatabaseFieldName(paramProp, queryParams.getClass(), null, null,namingCase); + // 处理匹配条件类型 + CompareTypeEnum compareType = annotation.map(QueryParam::type).orElse(EQ); + compareTypeSwitch(compareType,wrapper,columnName,paramValue); + } + } + + + + return wrapper; + } + + + /** + * 处理不同的匹配条件 + * @param compareType 匹配条件 + * @param wrapper 查询构造器 + * @param columnName 字段名称 + * @param paramValue 字段值 + */ + private void compareTypeSwitch(CompareTypeEnum compareType, QueryWrapper wrapper, String columnName, Object paramValue){ + switch (compareType) { + case GT: + wrapper.gt(columnName,paramValue); + break; + case GE: + wrapper.ge(columnName,paramValue); + break; + case LT: + wrapper.lt(columnName,paramValue); + break; + case LE: + wrapper.le(columnName,paramValue); + break; + case LIKE: + wrapper.like(columnName,paramValue); + break; + case LIKE_LEFT: + wrapper.likeLeft(columnName,paramValue); + break; + case LIKE_RIGHT: + wrapper.likeRight(columnName,paramValue); + break; + case IS_NULL: + if ( paramValue instanceof Boolean ){ + if (((Boolean) paramValue).booleanValue()) { + wrapper.isNull(columnName); + } else { + wrapper.isNotNull(columnName); + } + } + break; + case EQ: + default: + wrapper.eq(columnName,paramValue); + } + + } + + /** + * 获取查询参数注解 获取顺序: QueryParams 查询参数字段 > Entity 数据库实体字段 > QueryParams 查询类 > Entity 数据库实体类 + * @return + */ + private Optional getQueryParamAnnotation + (PropertyDescriptor paramDescriptor, Class paramClass, PropertyDescriptor entityDescriptor, Class entityClass){ + + // 参数字段 + Field paramField = ClassUtil.getDeclaredField(paramClass, paramDescriptor.getName()); + if (AnnotationUtil.hasAnnotation(paramField,QueryParam.class)) { + return Optional.ofNullable(AnnotationUtil.getAnnotation(paramField, QueryParam.class)); + } + Field entityField = ClassUtil.getDeclaredField(entityClass, entityDescriptor.getName()); + if (AnnotationUtil.hasAnnotation(entityField,QueryParam.class)) { + return Optional.ofNullable(AnnotationUtil.getAnnotation(entityField, QueryParam.class)); + } + if (AnnotationUtil.hasAnnotation(paramClass,QueryParam.class)) { + return Optional.ofNullable(AnnotationUtil.getAnnotation(paramClass, QueryParam.class)); + } + if (AnnotationUtil.hasAnnotation(entityClass,QueryParam.class)) { + return Optional.ofNullable(AnnotationUtil.getAnnotation(entityClass, QueryParam.class)); + } + return Optional.empty(); + } + + /** + * 获取字段对应的数据库字段名 + */ + public String getDatabaseFieldName(PropertyDescriptor paramDescriptor, Class paramClass, PropertyDescriptor entityDescriptor, Class entityClass, NamingCaseEnum namingCase){ + switch (namingCase) { + case LAMBDA:{ + return MpUtil.getColumnName(entityDescriptor.getReadMethod(),entityClass); + } + case UNDER_LINE:{ + return NamingCase.toUnderlineCase(paramDescriptor.getName()); + } + case ANNOTATION:{ + // 读取注解 + val annotation = getQueryParamAnnotation(paramDescriptor, paramClass, entityDescriptor, entityClass); + return annotation.map(QueryParam::fieldName).orElse(""); + } + case NONE: { + return paramDescriptor.getName(); + } + } + return ""; + } + +} diff --git a/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/QueryGenerator.java b/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/QueryGenerator.java index 34459d55..95a9b817 100644 --- a/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/QueryGenerator.java +++ b/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/QueryGenerator.java @@ -1,21 +1,8 @@ package cn.bootx.common.query.generator; -import cn.bootx.common.core.exception.BizException; -import cn.bootx.common.query.code.CompareTypeEnum; -import cn.bootx.common.query.entity.QueryBetweenParam; -import cn.bootx.common.query.entity.QueryOrder; -import cn.bootx.common.query.entity.QueryParam; import cn.bootx.common.query.entity.QueryParams; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import java.beans.PropertyDescriptor; -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - /** * 查询条件生成器 * @author xxm @@ -31,174 +18,15 @@ public class QueryGenerator { */ public static QueryWrapper generator(QueryParams queryParams) { QueryWrapper queryWrapper = new QueryWrapper<>(); - // 查询条件 - initQueryParam(queryWrapper,queryParams.getQueryParams()); - + SuperQueryGenerator.initQueryParam(queryWrapper,queryParams.getQueryParams()); // 排序条件 - initQueryOrder(queryWrapper,queryParams.getQueryOrders()); + SuperQueryGenerator.initQueryOrder(queryWrapper,queryParams.getQueryOrders()); return queryWrapper; } - /** - * 组装查询条件 - * @param queryWrapper 查询器 - * @param queryParams 查询参数 - * @param 泛型 - */ - private static void initQueryParam(QueryWrapper queryWrapper, List queryParams) { - if (CollUtil.isEmpty(queryParams)) { - return; - } - for (QueryParam queryParam : queryParams) { - // 嵌套条件 - List nestedParams = queryParam.getNestedParams(); - - // 是否拼接or条件 - if (queryParam.isOr() && CollUtil.isEmpty(nestedParams)) { - queryWrapper.or(); - } - - // 有嵌套查询进行嵌套处理 - if (CollUtil.isEmpty(nestedParams)) { - // 组装单条查询条件 - initQueryParam(queryWrapper, queryParam); - } else { - // 将当前查询条件与嵌套的查询条件组装成一个查询条件 - QueryParam q = new QueryParam() - .setParamName(queryParam.getParamName()) - .setCompareType(queryParam.getCompareType()) - .setParamType(queryParam.getParamType()) - .setParamValue(queryParam.getParamValue()) - .setUnderLine(queryParam.isUnderLine()) - .setOr(queryParam.isOr()); - nestedParams.add(0, q); - if (queryParam.isOr()) { - queryWrapper.or(wrapper -> initQueryParam(wrapper, nestedParams)); - } else { - queryWrapper.and(wrapper -> initQueryParam(wrapper, nestedParams)); - } - } - - } - } - - /** - * 组装单条查询条件 - * @param queryWrapper 查询器 - * @param queryParam 查询参数 - * @param 泛型 - */ - private static void initQueryParam(QueryWrapper queryWrapper, QueryParam queryParam) { - - // 处理查询参数名称 - String paramName = initQueryParamName(queryParam); - // 处理查询条件值 - Object paramValue = ParamValueTypeConvert.initQueryParamValue(queryParam); - - // 查询匹配类型 - CompareTypeEnum compareTypeEnum = Optional.ofNullable(CompareTypeEnum.getByCode(queryParam.getCompareType())) - .orElseThrow(() -> new BizException("查询匹配类型非法")); - switch (compareTypeEnum){ - case GT: - queryWrapper.gt(paramName,paramValue); - break; - case GE: - queryWrapper.ge(paramName,paramValue); - break; - case LT: - queryWrapper.lt(paramName,paramValue); - break; - case LE: - queryWrapper.le(paramName,paramValue); - break; - case EQ: - queryWrapper.eq(paramName,paramValue); - break; - case NE: - queryWrapper.ne(paramName,paramValue); - break; - case IN: - queryWrapper.in(paramName,(Collection) paramValue); - break; - case NOT_IN: - queryWrapper.notIn(paramName,(Collection) paramValue); - break; - case BETWEEN:{ - if (Objects.isNull(paramValue)){ - throw new BizException("between 查询条件为空"); - } - QueryBetweenParam value = (QueryBetweenParam) paramValue; - queryWrapper.between(paramName,value.getStart(), value.getEnd()); - break; - } - case NOT_BETWEEN:{ - if (Objects.isNull(paramValue)){ - throw new BizException("between 查询条件为空"); - } - QueryBetweenParam value = (QueryBetweenParam) paramValue; - queryWrapper.notBetween(paramName,value.getStart(), value.getEnd()); - break; - } - case LIKE: - queryWrapper.like(paramName,paramValue); - break; - case NOT_LIKE: - queryWrapper.notLike(paramName,paramValue); - break; - case LIKE_LEFT: - queryWrapper.likeLeft(paramName,paramValue); - break; - case LIKE_RIGHT: - queryWrapper.likeRight(paramName,paramValue); - break; - case IS_NULL: - queryWrapper.isNull(paramName); - break; - case NOT_NULL: - queryWrapper.isNotNull(paramName); - break; - default: - throw new BizException("查询匹配类型非法"); - } - } - - - /** - * 组装排序条件 - * @param queryWrapper 查询器 - * @param queryOrders 排序条件 - * @param 泛型 - */ - private static void initQueryOrder(QueryWrapper queryWrapper, List queryOrders) { - if (CollUtil.isEmpty(queryOrders)){ - return; - } - for (QueryOrder queryOrder : queryOrders) { - if (queryOrder.isUnderLine()){ - queryWrapper.orderBy(true,queryOrder.isAsc(),StrUtil.toUnderlineCase(queryOrder.getSortField())); - } else { - queryWrapper.orderBy(true,queryOrder.isAsc(),queryOrder.getSortField()); - } - } - } - - /** - * 查询参数名称处理 - * @param queryParam 查询参数 - * @return 处理完的查询参数值 - */ - private static String initQueryParamName(QueryParam queryParam) { - String paramName = queryParam.getParamName(); - if (queryParam.isUnderLine()){ - return StrUtil.toUnderlineCase(paramName); - } else { - return paramName; - } - } - /** * 生成查询条件 (根据实体对象生成), 生成的多个查询条件之间用And连接 * @param queryParams 参数 @@ -206,21 +34,7 @@ public class QueryGenerator { * @return 查询器 */ public static QueryWrapper generator(Object queryParams) { - QueryWrapper wrapper = new QueryWrapper<>(); - - if (Objects.isNull(queryParams)){ - return wrapper; - } - - // 读取实体类上的查询注解注解 - - - // 读取实体类对象里的字段 - - - // 处理字段上的注解 - - return wrapper; + return AnnotationQueryGenerator.generator(queryParams); } /** @@ -231,40 +45,7 @@ public class QueryGenerator { * @return 查询器 */ public static QueryWrapper generator(Object queryParams,Class clazz) { - QueryWrapper wrapper = new QueryWrapper<>(); - if (Objects.isNull(queryParams)){ - return wrapper; - } - - // 分别读取参数对象和实体类上的字段 - List paramProps = Arrays.stream(BeanUtil.getPropertyDescriptors(queryParams.getClass())) - .collect(Collectors.toList()); - - // 读取实体类对象里的字段 - Map entityPropMap = Arrays.stream(BeanUtil.getPropertyDescriptors(clazz)) - .collect(Collectors.toMap(PropertyDescriptor::getName, Function.identity(), (o1, o2) -> o2)); - - List params = new ArrayList<>(); - - // 遍历参数上的对象, 生成 - for (PropertyDescriptor paramProp : paramProps) { - Object property = BeanUtil.getProperty(queryParams, paramProp.getName()); - if (!StrUtil.isBlankIfStr(property)){ - // 获取查询注解 clazz 类上 < clazz 字段 < queryParams 类上 < clazz 字段 - - paramProp.getPropertyEditorClass(); - - System.out.println(paramProp.getName()+" : "+property); - } - } - - // 处理字段上的注解 - - // 生成方法 - initQueryParam(wrapper,params); - - return wrapper; + return AnnotationQueryGenerator.generator(queryParams,clazz); } - } diff --git a/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/SuperQueryGenerator.java b/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/SuperQueryGenerator.java new file mode 100644 index 00000000..b3c270f2 --- /dev/null +++ b/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/SuperQueryGenerator.java @@ -0,0 +1,183 @@ +package cn.bootx.common.query.generator; + +import cn.bootx.common.core.exception.BizException; +import cn.bootx.common.query.code.CompareTypeEnum; +import cn.bootx.common.query.entity.QueryBetweenParam; +import cn.bootx.common.query.entity.QueryOrder; +import cn.bootx.common.query.entity.QueryParam; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.experimental.UtilityClass; + +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * + * @author xxm + * @date 2022/12/14 + */ +@UtilityClass +public class SuperQueryGenerator { + + + /** + * 组装查询条件 + * @param queryWrapper 查询器 + * @param queryParams 查询参数 + * @param 泛型 + */ + void initQueryParam(QueryWrapper queryWrapper, List queryParams) { + if (CollUtil.isEmpty(queryParams)) { + return; + } + for (QueryParam queryParam : queryParams) { + // 嵌套条件 + List nestedParams = queryParam.getNestedParams(); + + // 是否拼接or条件 + if (queryParam.isOr() && CollUtil.isEmpty(nestedParams)) { + queryWrapper.or(); + } + + // 有嵌套查询进行嵌套处理 + if (CollUtil.isEmpty(nestedParams)) { + // 组装单条查询条件 + initQueryParam(queryWrapper, queryParam); + } else { + // 将当前查询条件与嵌套的查询条件组装成一个查询条件 + QueryParam q = new QueryParam() + .setParamName(queryParam.getParamName()) + .setCompareType(queryParam.getCompareType()) + .setParamType(queryParam.getParamType()) + .setParamValue(queryParam.getParamValue()) + .setUnderLine(queryParam.isUnderLine()) + .setOr(queryParam.isOr()); + nestedParams.add(0, q); + if (queryParam.isOr()) { + queryWrapper.or(wrapper -> initQueryParam(wrapper, nestedParams)); + } else { + queryWrapper.and(wrapper -> initQueryParam(wrapper, nestedParams)); + } + } + + } + } + + /** + * 组装单条查询条件 + * @param queryWrapper 查询器 + * @param queryParam 查询参数 + * @param 泛型 + */ + private void initQueryParam(QueryWrapper queryWrapper, QueryParam queryParam) { + + // 处理查询参数名称 + String paramName = initQueryParamName(queryParam); + // 处理查询条件值 + Object paramValue = ParamValueTypeConvert.initQueryParamValue(queryParam); + + // 查询匹配类型 + CompareTypeEnum compareTypeEnum = Optional.ofNullable(CompareTypeEnum.getByCode(queryParam.getCompareType())) + .orElseThrow(() -> new BizException("查询匹配类型非法")); + switch (compareTypeEnum){ + case GT: + queryWrapper.gt(paramName,paramValue); + break; + case GE: + queryWrapper.ge(paramName,paramValue); + break; + case LT: + queryWrapper.lt(paramName,paramValue); + break; + case LE: + queryWrapper.le(paramName,paramValue); + break; + case EQ: + queryWrapper.eq(paramName,paramValue); + break; + case NE: + queryWrapper.ne(paramName,paramValue); + break; + case IN: + queryWrapper.in(paramName,(Collection) paramValue); + break; + case NOT_IN: + queryWrapper.notIn(paramName,(Collection) paramValue); + break; + case BETWEEN:{ + if (Objects.isNull(paramValue)){ + throw new BizException("between 查询条件为空"); + } + QueryBetweenParam value = (QueryBetweenParam) paramValue; + queryWrapper.between(paramName,value.getStart(), value.getEnd()); + break; + } + case NOT_BETWEEN:{ + if (Objects.isNull(paramValue)){ + throw new BizException("between 查询条件为空"); + } + QueryBetweenParam value = (QueryBetweenParam) paramValue; + queryWrapper.notBetween(paramName,value.getStart(), value.getEnd()); + break; + } + case LIKE: + queryWrapper.like(paramName,paramValue); + break; + case NOT_LIKE: + queryWrapper.notLike(paramName,paramValue); + break; + case LIKE_LEFT: + queryWrapper.likeLeft(paramName,paramValue); + break; + case LIKE_RIGHT: + queryWrapper.likeRight(paramName,paramValue); + break; + case IS_NULL: + queryWrapper.isNull(paramName); + break; + case NOT_NULL: + queryWrapper.isNotNull(paramName); + break; + default: + throw new BizException("查询匹配类型非法"); + } + } + + + /** + * 组装排序条件 + * @param queryWrapper 查询器 + * @param queryOrders 排序条件 + * @param 泛型 + */ + void initQueryOrder(QueryWrapper queryWrapper, List queryOrders) { + if (CollUtil.isEmpty(queryOrders)){ + return; + } + for (QueryOrder queryOrder : queryOrders) { + if (queryOrder.isUnderLine()){ + queryWrapper.orderBy(true,queryOrder.isAsc(), StrUtil.toUnderlineCase(queryOrder.getSortField())); + } else { + queryWrapper.orderBy(true,queryOrder.isAsc(),queryOrder.getSortField()); + } + } + } + + /** + * 查询参数名称处理 + * @param queryParam 查询参数 + * @return 处理完的查询参数值 + */ + private String initQueryParamName(QueryParam queryParam) { + String paramName = queryParam.getParamName(); + if (queryParam.isUnderLine()){ + return StrUtil.toUnderlineCase(paramName); + } else { + return paramName; + } + } +} -- Gitee From 0f7d699eacb11816adccf8e5837e059f6ca4d80b Mon Sep 17 00:00:00 2001 From: xxm Date: Thu, 15 Dec 2022 08:52:32 +0800 Subject: [PATCH 06/15] =?UTF-8?q?fix=20=E6=9D=A1=E4=BB=B6=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=94=9F=E6=88=90=E5=99=A8=E7=A9=BA=E6=8C=87=E9=92=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../query/generator/AnnotationQueryGenerator.java | 10 +++++----- .../controller/query/SuperQueryDemoController.java | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/AnnotationQueryGenerator.java b/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/AnnotationQueryGenerator.java index 9f92fbb7..ab2f4007 100644 --- a/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/AnnotationQueryGenerator.java +++ b/bootx-commons/common-super-query/src/main/java/cn/bootx/common/query/generator/AnnotationQueryGenerator.java @@ -111,8 +111,6 @@ public class AnnotationQueryGenerator { } } - - return wrapper; } @@ -175,9 +173,11 @@ public class AnnotationQueryGenerator { if (AnnotationUtil.hasAnnotation(paramField,QueryParam.class)) { return Optional.ofNullable(AnnotationUtil.getAnnotation(paramField, QueryParam.class)); } - Field entityField = ClassUtil.getDeclaredField(entityClass, entityDescriptor.getName()); - if (AnnotationUtil.hasAnnotation(entityField,QueryParam.class)) { - return Optional.ofNullable(AnnotationUtil.getAnnotation(entityField, QueryParam.class)); + if (Objects.nonNull(entityDescriptor)){ + Field entityField = ClassUtil.getDeclaredField(entityClass, entityDescriptor.getName()); + if (AnnotationUtil.hasAnnotation(entityField,QueryParam.class)) { + return Optional.ofNullable(AnnotationUtil.getAnnotation(entityField, QueryParam.class)); + } } if (AnnotationUtil.hasAnnotation(paramClass,QueryParam.class)) { return Optional.ofNullable(AnnotationUtil.getAnnotation(paramClass, QueryParam.class)); diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java index 32e9561a..224e2f32 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java @@ -15,6 +15,7 @@ import lombok.val; import org.springframework.web.bind.annotation.*; import java.time.LocalDateTime; +import java.time.LocalTime; /** * @@ -69,14 +70,15 @@ public class SuperQueryDemoController { @Operation(summary = "MP查询生成器测试") @GetMapping("/mpGenerator") - public ResResult mpGenerator(){ + public ResResult mpGenerator(){ SuperQueryDemo queryDemo = new SuperQueryDemo() .setName("222") .setAge(24) + .setWorkTime(LocalTime.now()) .setVip(true) .setRegistrationTime(LocalDateTime.now()); - val generator = QueryGenerator.generator(queryDemo, SuperQueryDemo.class); - System.out.println(generator); - return Res.ok(); + queryDemo.setId(1122L); + val generator = QueryGenerator.generator(queryDemo); + return Res.ok(generator.getTargetSql()); } } -- Gitee From 9592ed32907acd2c1ba04196e78906389432f8bf Mon Sep 17 00:00:00 2001 From: xxm Date: Thu, 15 Dec 2022 23:38:23 +0800 Subject: [PATCH 07/15] =?UTF-8?q?feat=20=E5=AD=97=E5=85=B8=E5=80=BC?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/annotation/DictConvert.java | 10 ++++- .../core/annotation/DictConvertModel.java | 20 ++++++++++ .../core/annotation/TableFieldConvert.java | 16 ++++++++ .../annotation/TableFieldConvertModel.java | 16 ++++++++ .../RestExceptionHandler.java | 21 ++++++++++ .../handler/JacksonRawTypeHandler.java | 8 ++-- .../core/dict/service/DictConvertService.java | 39 +++++++++++++++++++ 7 files changed, 125 insertions(+), 5 deletions(-) create mode 100644 bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvertModel.java create mode 100644 bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TableFieldConvert.java create mode 100644 bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TableFieldConvertModel.java create mode 100644 bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvert.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvert.java index 8883ff54..d40c20ba 100644 --- a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvert.java +++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvert.java @@ -20,6 +20,14 @@ public @interface DictConvert { String dicCode(); /** - * + * 来源字段 默认为自身 */ + String source() default ""; + + /** + * 目标字段 默认为自身 + */ + String target() default ""; + + } diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvertModel.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvertModel.java new file mode 100644 index 00000000..5d96331a --- /dev/null +++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvertModel.java @@ -0,0 +1,20 @@ +package cn.bootx.common.core.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 字典转换标示注解, 标注此注解会对对应对象进行字典值转换处理 + * @author xxm + * @date 2022/12/15 + */ +@Target({ElementType.METHOD,ElementType.TYPE,ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface DictConvertModel { + /** + * 是否启用 + */ + boolean enable() default true; +} diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TableFieldConvert.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TableFieldConvert.java new file mode 100644 index 00000000..5aab2edd --- /dev/null +++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TableFieldConvert.java @@ -0,0 +1,16 @@ +package cn.bootx.common.core.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 数据库表字段翻译注解 + * @author xxm + * @date 2022/12/14 + */ +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +public @interface TableFieldConvert { +} diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TableFieldConvertModel.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TableFieldConvertModel.java new file mode 100644 index 00000000..7b337504 --- /dev/null +++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/TableFieldConvertModel.java @@ -0,0 +1,16 @@ +package cn.bootx.common.core.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 字典转换标示注解, 标注此注解会对对应对象进行字典值转换处理 + * @author xxm + * @date 2022/12/15 + */ +@Target({ElementType.METHOD,ElementType.TYPE,ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface TableFieldConvertModel { +} diff --git a/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/RestExceptionHandler.java b/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/RestExceptionHandler.java index a8678af6..a9c6f2ed 100644 --- a/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/RestExceptionHandler.java +++ b/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/RestExceptionHandler.java @@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j; import org.slf4j.MDC; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.http.converter.HttpMessageConversionException; +import org.springframework.web.HttpRequestMethodNotSupportedException; import org.springframework.web.bind.MissingServletRequestParameterException; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; @@ -56,6 +57,26 @@ public class RestExceptionHandler { return Res.response(VALIDATE_PARAMETERS_ERROR,message.toString(),MDC.get(CommonCode.TRACE_ID)); } + /** + * @Author 政辉 + * @param e + * @return + */ + @ExceptionHandler(HttpRequestMethodNotSupportedException.class) + public ResResult HttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e){ + StringBuffer sb = new StringBuffer(); + sb.append("不支持"); + sb.append(e.getMethod()); + sb.append("请求方法,"); + sb.append("支持以下"); + String [] methods = e.getSupportedMethods(); + if(methods!=null){ + sb.append(String.join("、",methods)); + } + log.error(sb.toString(), e); + return Res.error(sb.toString()); + } + /** * 请求参数校验未通过 */ diff --git a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/handler/JacksonRawTypeHandler.java b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/handler/JacksonRawTypeHandler.java index 9a334a88..4510f1bd 100644 --- a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/handler/JacksonRawTypeHandler.java +++ b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/handler/JacksonRawTypeHandler.java @@ -8,14 +8,14 @@ import org.apache.ibatis.type.JdbcType; import org.apache.ibatis.type.MappedJdbcTypes; import org.apache.ibatis.type.MappedTypes; -/** +/** * Jackson 实现 JSON 字段类型处理器, 会记录对象属性类型, 通常用于被容器(List、Set、Map)包装的属性上 -* @author xxm -* @date 2022/7/11 +* @author xxm +* @date 2022/7/11 */ @Slf4j @MappedTypes({Object.class}) -@MappedJdbcTypes(JdbcType.VARCHAR) +@MappedJdbcTypes(value={JdbcType.VARCHAR,JdbcType.LONGVARCHAR}) public class JacksonRawTypeHandler extends AbstractJsonTypeHandler { private final Class type; diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java new file mode 100644 index 00000000..2b46349b --- /dev/null +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java @@ -0,0 +1,39 @@ +package cn.bootx.baseapi.core.dict.service; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.Map; + +/** + * 字典值转换工具类 + * @author xxm + * @date 2022/12/15 + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class DictConvertService { + + /** + * 转换 + */ + public void convert(Object o){ + // 遍历字段 + + // 筛选出 + + + } + + /** + * + */ + public Map convertToMap(Object o){ + + return new HashMap<>(); + } + +} -- Gitee From 8699bfbded23b484fc4a4c1ea82f6a85a58feaf9 Mon Sep 17 00:00:00 2001 From: xxm Date: Sat, 17 Dec 2022 23:05:45 +0800 Subject: [PATCH 08/15] =?UTF-8?q?build=20autoConfig=E4=BD=BF=E7=94=A8Sprin?= =?UTF-8?q?g=20Boot=202.7.x=E6=8E=A8=E8=8D=90=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _license/LICENSE.md | 5 +- _license/mybatis-enhance-actable/LICENSE | 201 ++++++++++++++++++ ...on.java => AuditLogAutoConfiguration.java} | 12 +- .../main/resources/META-INF/spring.factories | 3 - ...ot.autoconfigure.AutoConfiguration.imports | 1 + .../main/resources/META-INF/spring.factories | 3 - ...ot.autoconfigure.AutoConfiguration.imports | 1 + .../main/resources/META-INF/spring.factories | 3 - ...ot.autoconfigure.AutoConfiguration.imports | 1 + .../main/resources/META-INF/spring.factories | 3 - ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + bootx-commons/common-actable/pom.xml | 23 ++ ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + bootx-commons/pom.xml | 3 +- ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + 41 files changed, 269 insertions(+), 19 deletions(-) create mode 100644 _license/mybatis-enhance-actable/LICENSE rename bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/{AuditLogApplication.java => AuditLogAutoConfiguration.java} (72%) delete mode 100644 bootx-common-starters/common-starter-audit-log/src/main/resources/META-INF/spring.factories create mode 100644 bootx-common-starters/common-starter-audit-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports delete mode 100644 bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring.factories create mode 100644 bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports delete mode 100644 bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring.factories create mode 100644 bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports delete mode 100644 bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring.factories create mode 100644 bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-actable/pom.xml create mode 100644 bootx-commons/common-actable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-cache/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-exception-handler/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-header-holder/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-idempotency/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-jackson/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-lock/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-mongo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-mqtt/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-redis-client/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-sequence/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-spring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-super-query/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-swagger/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-demo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-modules/module-eshop/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-services/service-baseapi/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-services/service-goods/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-services/service-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-services/service-payment/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-services/service-sales/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/_license/LICENSE.md b/_license/LICENSE.md index 345bb80a..ea5222cd 100644 --- a/_license/LICENSE.md +++ b/_license/LICENSE.md @@ -31,4 +31,7 @@ GoView 一个Vue3搭建的低代码数据可视化开发平台: https://gitee.com/dromara/go-view easy-cron 这是基于Vue.js和iviewui封装一个crontab表达式的组件: -https://gitee.com/toktok/easy-cron \ No newline at end of file +https://gitee.com/toktok/easy-cron + +ACTable是对Mybatis做的增强功能,通过配置model注解的方式来创建表,修改表结构,并且实现了共通的CUDR功能提升开发效率: +https://gitee.com/sunchenbin/mybatis-enhance diff --git a/_license/mybatis-enhance-actable/LICENSE b/_license/mybatis-enhance-actable/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/_license/mybatis-enhance-actable/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogApplication.java b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogAutoConfiguration.java similarity index 72% rename from bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogApplication.java rename to bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogAutoConfiguration.java index bf2451e3..c53c40fa 100644 --- a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogApplication.java +++ b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogAutoConfiguration.java @@ -2,18 +2,20 @@ package cn.bootx.starter.audit.log; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; -/** -* -* @author xxm -* @date 2021/11/8 +/** +* 审计模块 +* @author xxm +* @date 2021/11/8 */ @ComponentScan @ConfigurationPropertiesScan @EnableMongoRepositories +@AutoConfiguration @MapperScan(annotationClass = Mapper.class) -public class AuditLogApplication { +public class AuditLogAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-audit-log/src/main/resources/META-INF/spring.factories b/bootx-common-starters/common-starter-audit-log/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 9ac13028..00000000 --- a/bootx-common-starters/common-starter-audit-log/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.starter.audit.log.AuditLogApplication diff --git a/bootx-common-starters/common-starter-audit-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-audit-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..5d23f9df --- /dev/null +++ b/bootx-common-starters/common-starter-audit-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.audit.log.AuditLogAutoConfiguration diff --git a/bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring.factories b/bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring.factories deleted file mode 100644 index f1b3553f..00000000 --- a/bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.starter.auth.AuthStarter \ No newline at end of file diff --git a/bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..84bea17a --- /dev/null +++ b/bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.auth.AuthStarter diff --git a/bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring.factories b/bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 94cb1fdd..00000000 --- a/bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.starter.code.gen.CodeGenApplication \ No newline at end of file diff --git a/bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2b519656 --- /dev/null +++ b/bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.code.gen.CodeGenApplication diff --git a/bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring.factories b/bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 643c44c0..00000000 --- a/bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.starter.data.perm.DataPermApplication diff --git a/bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..a1c81b28 --- /dev/null +++ b/bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.data.perm.DataPermApplication diff --git a/bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..5e1dabfc --- /dev/null +++ b/bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.file.FileApplication diff --git a/bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-actable/pom.xml b/bootx-commons/common-actable/pom.xml new file mode 100644 index 00000000..5c606c34 --- /dev/null +++ b/bootx-commons/common-actable/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + + cn.bootx.platform + bootx-commons + 1.1.8 + + + common-actable + 通过配置model注解的方式来创建表,修改表结构 + + + + cn.bootx.platform + common-mybatis-plus + + + + + diff --git a/bootx-commons/common-actable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-actable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-actable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-cache/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-cache/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-cache/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-exception-handler/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-exception-handler/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-exception-handler/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-header-holder/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-header-holder/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-header-holder/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-idempotency/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-idempotency/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-idempotency/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-jackson/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-jackson/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-jackson/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-lock/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-lock/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-lock/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-mongo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-mongo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-mongo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-mqtt/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-mqtt/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-mqtt/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-redis-client/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-redis-client/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-redis-client/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-sequence/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-sequence/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-sequence/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-spring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-spring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-spring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-super-query/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-super-query/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-super-query/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-swagger/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-swagger/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-commons/common-swagger/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/pom.xml b/bootx-commons/pom.xml index 987a2a76..75dbac89 100644 --- a/bootx-commons/pom.xml +++ b/bootx-commons/pom.xml @@ -32,6 +32,7 @@ common-rabbitmq common-lock + common-actable @@ -105,4 +106,4 @@ - \ No newline at end of file + diff --git a/bootx-demo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-demo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-demo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-modules/module-eshop/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-modules/module-eshop/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-modules/module-eshop/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-services/service-baseapi/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-services/service-baseapi/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-services/service-baseapi/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-services/service-goods/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-services/service-goods/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-services/service-goods/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-services/service-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-services/service-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-services/service-order/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-services/service-payment/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-services/service-payment/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-services/service-payment/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-services/service-sales/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-services/service-sales/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..2d24f472 --- /dev/null +++ b/bootx-services/service-sales/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +cn.bootx.starter.wecom.WeComStarter \ No newline at end of file -- Gitee From 85f1654932f67aee1f29a53c85d33ce7d12dc97f Mon Sep 17 00:00:00 2001 From: xxm Date: Sun, 18 Dec 2022 23:26:10 +0800 Subject: [PATCH 09/15] =?UTF-8?q?build=20autoConfig=E4=BD=BF=E7=94=A8Sprin?= =?UTF-8?q?g=20Boot=202.7.x=E6=8E=A8=E8=8D=90=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../audit/log/AuditLogAutoConfiguration.java | 3 ++- ...thStarter.java => AuthAutoConfiguration.java} | 4 +++- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...cation.java => CodeGenAutoConfiguration.java} | 4 +++- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...ation.java => DataPermAutoConfiguration.java} | 4 +++- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...arter.java => DingTalkAutoConfiguration.java} | 5 ++++- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...plication.java => FileAutoConfiguration.java} | 4 +++- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...arter.java => FlowableAutoConfiguration.java} | 4 +++- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...cation.java => MonitorAutoConfiguration.java} | 4 +++- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...tion.java => QuartzJobAutoConfiguration.java} | 5 +++-- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...Starter.java => WeChatAutoConfiguration.java} | 4 +++- .../starter/wechat/{ => code}/WeChatCode.java | 2 +- .../wechat/handler/WeChatSubscribeHandler.java | 3 +-- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...mStarter.java => WeComAutoConfiguration.java} | 4 +++- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../common/actable/ActableAutoConfiguration.java | 16 ++++++++++++++++ ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ....boot.autoconfigure.AutoConfiguration.imports | 1 - .../common/cache/CacheAutoConfiguration.java | 16 ++++++++++++++++ .../{ => configuration}/BootxRedisCache.java | 2 +- .../BootxRedisCacheManager.java | 2 +- .../{ => manager}/CachingConfiguration.java | 3 ++- .../cache/{ => manager}/CachingProperties.java | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../ExceptionHandlerAutoConfiguration.java | 16 ++++++++++++++++ .../ExceptionHandlerProperties.java | 2 +- .../{ => handler}/RestExceptionHandler.java | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...cation.java => JacksonAutoConfiguration.java} | 4 +++- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...ion.java => LockCommonAutoConfiguration.java} | 4 +++- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...pplication.java => LogAutoConfiguration.java} | 6 +++--- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...on.java => MongoCommonAutoConfiguration.java} | 4 +++- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...plication.java => MqttAutoConfiguration.java} | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...a => MybatisPlusCommonAutoConfiguration.java} | 6 +++--- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...java => RabbitMqCommonAutoConfiguration.java} | 4 +++- .../src/main/resources/META-INF/spring.factories | 2 +- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../redis/redisson/RedissonLoadListener.java | 2 +- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ...ation.java => SequenceAutoConfiguration.java} | 4 +++- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 1 + .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../core/dict/service/DictConvertService.java | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- .../src/main/resources/META-INF/spring.factories | 3 --- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- ....boot.autoconfigure.AutoConfiguration.imports | 2 +- 91 files changed, 150 insertions(+), 137 deletions(-) rename bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/{AuthStarter.java => AuthAutoConfiguration.java} (66%) rename bootx-common-starters/common-starter-code-gen/src/main/java/cn/bootx/starter/code/gen/{CodeGenApplication.java => CodeGenAutoConfiguration.java} (69%) rename bootx-common-starters/common-starter-data-perm/src/main/java/cn/bootx/starter/data/perm/{DataPermApplication.java => DataPermAutoConfiguration.java} (75%) rename bootx-common-starters/common-starter-dingtalk/src/main/java/cn/bootx/starter/dingtalk/{DingTalkStarter.java => DingTalkAutoConfiguration.java} (67%) rename bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/{FileApplication.java => FileAutoConfiguration.java} (79%) delete mode 100644 bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring.factories rename bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/{FlowableStarter.java => FlowableAutoConfiguration.java} (75%) rename bootx-common-starters/common-starter-monitor/src/main/java/cn/bootx/starter/monitor/{MonitorApplication.java => MonitorAutoConfiguration.java} (57%) delete mode 100644 bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring.factories rename bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/{QuartzJobApplication.java => QuartzJobAutoConfiguration.java} (75%) delete mode 100644 bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring.factories rename bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/{WeChatStarter.java => WeChatAutoConfiguration.java} (75%) rename bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/{ => code}/WeChatCode.java (84%) rename bootx-common-starters/common-starter-wecom/src/main/java/cn/bootx/starter/wecom/{WeComStarter.java => WeComAutoConfiguration.java} (71%) create mode 100644 bootx-commons/common-actable/src/main/java/cn/bootx/common/actable/ActableAutoConfiguration.java delete mode 100644 bootx-commons/common-cache/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CacheAutoConfiguration.java rename bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/{ => configuration}/BootxRedisCache.java (95%) rename bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/{ => configuration}/BootxRedisCacheManager.java (98%) rename bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/{ => manager}/CachingConfiguration.java (97%) rename bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/{ => manager}/CachingProperties.java (93%) delete mode 100644 bootx-commons/common-cache/src/main/resources/META-INF/spring.factories create mode 100644 bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/ExceptionHandlerAutoConfiguration.java rename bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/{ => handler}/ExceptionHandlerProperties.java (87%) rename bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/{ => handler}/RestExceptionHandler.java (99%) delete mode 100644 bootx-commons/common-exception-handler/src/main/resources/META-INF/spring.factories delete mode 100644 bootx-commons/common-header-holder/src/main/resources/META-INF/spring.factories delete mode 100644 bootx-commons/common-idempotency/src/main/resources/META-INF/spring.factories rename bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/{JacksonApplication.java => JacksonAutoConfiguration.java} (55%) delete mode 100644 bootx-commons/common-jackson/src/main/resources/META-INF/spring.factories rename bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/{LockApplication.java => LockCommonAutoConfiguration.java} (65%) delete mode 100644 bootx-commons/common-lock/src/main/resources/META-INF/spring.factories rename bootx-commons/common-log/src/main/java/cn/bootx/common/log/{LogApplication.java => LogAutoConfiguration.java} (39%) delete mode 100644 bootx-commons/common-log/src/main/resources/META-INF/spring.factories rename bootx-commons/common-mongo/src/main/java/cn/bootx/common/mongo/{MongoApplication.java => MongoCommonAutoConfiguration.java} (54%) delete mode 100644 bootx-commons/common-mongo/src/main/resources/META-INF/spring.factories rename bootx-commons/common-mqtt/src/main/java/cn/bootx/common/mqtt/{MqttApplication.java => MqttAutoConfiguration.java} (88%) delete mode 100644 bootx-commons/common-mqtt/src/main/resources/META-INF/spring.factories rename bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/{MybatisPlusApplication.java => MybatisPlusCommonAutoConfiguration.java} (59%) delete mode 100644 bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring.factories rename bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/{RabbitMqApplication.java => RabbitMqCommonAutoConfiguration.java} (66%) rename bootx-commons/common-sequence/src/main/java/cn/bootx/common/sequence/{SequenceApplication.java => SequenceAutoConfiguration.java} (69%) delete mode 100644 bootx-commons/common-sequence/src/main/resources/META-INF/spring.factories delete mode 100644 bootx-commons/common-spring/src/main/resources/META-INF/spring.factories delete mode 100644 bootx-commons/common-super-query/src/main/resources/META-INF/spring.factories delete mode 100644 bootx-commons/common-swagger/src/main/resources/META-INF/spring.factories delete mode 100644 bootx-commons/common-xxl-job/src/main/resources/META-INF/spring.factories create mode 100644 bootx-commons/common-xxl-job/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports delete mode 100644 bootx-demo/src/main/resources/META-INF/spring.factories delete mode 100644 bootx-services/service-baseapi/src/main/resources/META-INF/spring.factories delete mode 100644 bootx-services/service-goods/src/main/resources/META-INF/spring.factories delete mode 100644 bootx-services/service-payment/src/main/resources/META-INF/spring.factories diff --git a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogAutoConfiguration.java b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogAutoConfiguration.java index c53c40fa..0b92140e 100644 --- a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogAutoConfiguration.java +++ b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogAutoConfiguration.java @@ -3,6 +3,7 @@ package cn.bootx.starter.audit.log; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; @@ -15,7 +16,7 @@ import org.springframework.data.mongodb.repository.config.EnableMongoRepositorie @ComponentScan @ConfigurationPropertiesScan @EnableMongoRepositories -@AutoConfiguration +@AutoConfigurationPackage @MapperScan(annotationClass = Mapper.class) public class AuditLogAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/AuthStarter.java b/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/AuthAutoConfiguration.java similarity index 66% rename from bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/AuthStarter.java rename to bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/AuthAutoConfiguration.java index c5d040d6..cd33a788 100644 --- a/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/AuthStarter.java +++ b/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/AuthAutoConfiguration.java @@ -1,5 +1,6 @@ package cn.bootx.starter.auth; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -10,5 +11,6 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @ConfigurationPropertiesScan -public class AuthStarter { +@AutoConfigurationPackage +public class AuthAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 84bea17a..f6366a5f 100644 --- a/bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-common-starters/common-starter-auth/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.auth.AuthStarter +cn.bootx.starter.auth.AuthAutoConfiguration diff --git a/bootx-common-starters/common-starter-code-gen/src/main/java/cn/bootx/starter/code/gen/CodeGenApplication.java b/bootx-common-starters/common-starter-code-gen/src/main/java/cn/bootx/starter/code/gen/CodeGenAutoConfiguration.java similarity index 69% rename from bootx-common-starters/common-starter-code-gen/src/main/java/cn/bootx/starter/code/gen/CodeGenApplication.java rename to bootx-common-starters/common-starter-code-gen/src/main/java/cn/bootx/starter/code/gen/CodeGenAutoConfiguration.java index 44ca169e..5f32d728 100644 --- a/bootx-common-starters/common-starter-code-gen/src/main/java/cn/bootx/starter/code/gen/CodeGenApplication.java +++ b/bootx-common-starters/common-starter-code-gen/src/main/java/cn/bootx/starter/code/gen/CodeGenAutoConfiguration.java @@ -2,6 +2,7 @@ package cn.bootx.starter.code.gen; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.context.annotation.ComponentScan; /** @@ -11,5 +12,6 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @MapperScan(annotationClass = Mapper.class) -public class CodeGenApplication { +@AutoConfigurationPackage +public class CodeGenAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2b519656..5ec8c6a7 100644 --- a/bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-common-starters/common-starter-code-gen/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.code.gen.CodeGenApplication +cn.bootx.starter.code.gen.CodeGenAutoConfiguration diff --git a/bootx-common-starters/common-starter-data-perm/src/main/java/cn/bootx/starter/data/perm/DataPermApplication.java b/bootx-common-starters/common-starter-data-perm/src/main/java/cn/bootx/starter/data/perm/DataPermAutoConfiguration.java similarity index 75% rename from bootx-common-starters/common-starter-data-perm/src/main/java/cn/bootx/starter/data/perm/DataPermApplication.java rename to bootx-common-starters/common-starter-data-perm/src/main/java/cn/bootx/starter/data/perm/DataPermAutoConfiguration.java index 494d1677..8a9129d8 100644 --- a/bootx-common-starters/common-starter-data-perm/src/main/java/cn/bootx/starter/data/perm/DataPermApplication.java +++ b/bootx-common-starters/common-starter-data-perm/src/main/java/cn/bootx/starter/data/perm/DataPermAutoConfiguration.java @@ -2,6 +2,7 @@ package cn.bootx.starter.data.perm; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -13,5 +14,6 @@ import org.springframework.context.annotation.ComponentScan; @ComponentScan @ConfigurationPropertiesScan @MapperScan(annotationClass = Mapper.class) -public class DataPermApplication { +@AutoConfigurationPackage +public class DataPermAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index a1c81b28..ebb40e84 100644 --- a/bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-common-starters/common-starter-data-perm/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.data.perm.DataPermApplication +cn.bootx.starter.data.perm.DataPermAutoConfiguration diff --git a/bootx-common-starters/common-starter-dingtalk/src/main/java/cn/bootx/starter/dingtalk/DingTalkStarter.java b/bootx-common-starters/common-starter-dingtalk/src/main/java/cn/bootx/starter/dingtalk/DingTalkAutoConfiguration.java similarity index 67% rename from bootx-common-starters/common-starter-dingtalk/src/main/java/cn/bootx/starter/dingtalk/DingTalkStarter.java rename to bootx-common-starters/common-starter-dingtalk/src/main/java/cn/bootx/starter/dingtalk/DingTalkAutoConfiguration.java index 43139a04..e9ded765 100644 --- a/bootx-common-starters/common-starter-dingtalk/src/main/java/cn/bootx/starter/dingtalk/DingTalkStarter.java +++ b/bootx-common-starters/common-starter-dingtalk/src/main/java/cn/bootx/starter/dingtalk/DingTalkAutoConfiguration.java @@ -2,6 +2,8 @@ package cn.bootx.starter.dingtalk; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -12,6 +14,7 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @ConfigurationPropertiesScan +@AutoConfigurationPackage @MapperScan(annotationClass = Mapper.class) -public class DingTalkStarter { +public class DingTalkAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-dingtalk/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-dingtalk/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 3f5ee3b5..1b307d4b 100644 --- a/bootx-common-starters/common-starter-dingtalk/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-common-starters/common-starter-dingtalk/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.dingtalk.DingTalkStarter \ No newline at end of file +cn.bootx.starter.dingtalk.DingTalkAutoConfiguration \ No newline at end of file diff --git a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/FileApplication.java b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/FileAutoConfiguration.java similarity index 79% rename from bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/FileApplication.java rename to bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/FileAutoConfiguration.java index a73b1cda..b1f039d3 100644 --- a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/FileApplication.java +++ b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/FileAutoConfiguration.java @@ -2,6 +2,7 @@ package cn.bootx.starter.file; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; @@ -14,6 +15,7 @@ import org.springframework.data.mongodb.repository.config.EnableMongoRepositorie @ComponentScan @ConfigurationPropertiesScan @EnableMongoRepositories +@AutoConfigurationPackage @MapperScan(annotationClass = Mapper.class) -public class FileApplication { +public class FileAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring.factories b/bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring.factories deleted file mode 100644 index d893f50e..00000000 --- a/bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.starter.file.FileApplication diff --git a/bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 5e1dabfc..08cbdeed 100644 --- a/bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-common-starters/common-starter-file/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.file.FileApplication +cn.bootx.starter.file.FileAutoConfiguration \ No newline at end of file diff --git a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/FlowableStarter.java b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/FlowableAutoConfiguration.java similarity index 75% rename from bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/FlowableStarter.java rename to bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/FlowableAutoConfiguration.java index 75e1af4e..1844a896 100644 --- a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/FlowableStarter.java +++ b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/FlowableAutoConfiguration.java @@ -2,6 +2,7 @@ package cn.bootx.starter.flowable; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -12,6 +13,7 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @ConfigurationPropertiesScan +@AutoConfigurationPackage @MapperScan(annotationClass = Mapper.class) -public class FlowableStarter { +public class FlowableAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-flowable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-flowable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 8eb03e01..789d667a 100644 --- a/bootx-common-starters/common-starter-flowable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-common-starters/common-starter-flowable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.flowable.FlowableStarter \ No newline at end of file +cn.bootx.starter.flowable.FlowableAutoConfiguration \ No newline at end of file diff --git a/bootx-common-starters/common-starter-monitor/src/main/java/cn/bootx/starter/monitor/MonitorApplication.java b/bootx-common-starters/common-starter-monitor/src/main/java/cn/bootx/starter/monitor/MonitorAutoConfiguration.java similarity index 57% rename from bootx-common-starters/common-starter-monitor/src/main/java/cn/bootx/starter/monitor/MonitorApplication.java rename to bootx-common-starters/common-starter-monitor/src/main/java/cn/bootx/starter/monitor/MonitorAutoConfiguration.java index 647e35dd..816c4884 100644 --- a/bootx-common-starters/common-starter-monitor/src/main/java/cn/bootx/starter/monitor/MonitorApplication.java +++ b/bootx-common-starters/common-starter-monitor/src/main/java/cn/bootx/starter/monitor/MonitorAutoConfiguration.java @@ -1,5 +1,6 @@ package cn.bootx.starter.monitor; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.context.annotation.ComponentScan; /** @@ -8,5 +9,6 @@ import org.springframework.context.annotation.ComponentScan; * @date 2022/6/10 */ @ComponentScan -public class MonitorApplication { +@AutoConfigurationPackage +public class MonitorAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring.factories b/bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring.factories deleted file mode 100644 index aaea9128..00000000 --- a/bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.starter.monitor.MonitorApplication diff --git a/bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..dcf55b06 100644 --- a/bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-common-starters/common-starter-monitor/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.starter.monitor.MonitorAutoConfiguration \ No newline at end of file diff --git a/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/QuartzJobApplication.java b/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/QuartzJobAutoConfiguration.java similarity index 75% rename from bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/QuartzJobApplication.java rename to bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/QuartzJobAutoConfiguration.java index dc52f71d..6d34c583 100644 --- a/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/QuartzJobApplication.java +++ b/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/QuartzJobAutoConfiguration.java @@ -2,9 +2,9 @@ package cn.bootx.starter.quartz; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; /** * 定时任务 @@ -13,6 +13,7 @@ import org.springframework.context.annotation.Configuration; */ @ComponentScan @ConfigurationPropertiesScan +@AutoConfigurationPackage @MapperScan(annotationClass = Mapper.class) -public class QuartzJobApplication { +public class QuartzJobAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring.factories b/bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring.factories deleted file mode 100644 index cdf872d8..00000000 --- a/bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.starter.quartz.QuartzJobApplication diff --git a/bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..5dc292b3 100644 --- a/bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-common-starters/common-starter-quartz/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.starter.quartz.QuartzJobAutoConfiguration \ No newline at end of file diff --git a/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatStarter.java b/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatAutoConfiguration.java similarity index 75% rename from bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatStarter.java rename to bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatAutoConfiguration.java index 4334bf93..580f2d0c 100644 --- a/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatStarter.java +++ b/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatAutoConfiguration.java @@ -2,6 +2,7 @@ package cn.bootx.starter.wechat; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -12,6 +13,7 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @MapperScan(annotationClass = Mapper.class) +@AutoConfigurationPackage @ConfigurationPropertiesScan -public class WeChatStarter { +public class WeChatAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatCode.java b/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/code/WeChatCode.java similarity index 84% rename from bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatCode.java rename to bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/code/WeChatCode.java index 3fff5bd7..e2a07051 100644 --- a/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatCode.java +++ b/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/code/WeChatCode.java @@ -1,4 +1,4 @@ -package cn.bootx.starter.wechat; +package cn.bootx.starter.wechat.code; /** * 微信编码 diff --git a/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/handler/WeChatSubscribeHandler.java b/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/handler/WeChatSubscribeHandler.java index b6441388..96dc1fb2 100644 --- a/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/handler/WeChatSubscribeHandler.java +++ b/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/handler/WeChatSubscribeHandler.java @@ -5,7 +5,6 @@ import cn.hutool.core.util.StrUtil; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.api.WxConsts; -import me.chanjar.weixin.common.error.WxErrorException; import me.chanjar.weixin.common.session.WxSessionManager; import me.chanjar.weixin.mp.api.WxMpService; import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage; @@ -15,7 +14,7 @@ import org.springframework.stereotype.Component; import java.util.Map; -import static cn.bootx.starter.wechat.WeChatCode.EVENT_KEY_QRSCENE; +import static cn.bootx.starter.wechat.code.WeChatCode.EVENT_KEY_QRSCENE; /** * 新增关注订阅消息 diff --git a/bootx-common-starters/common-starter-wechat/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-wechat/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index d2e5cfee..6954d87f 100644 --- a/bootx-common-starters/common-starter-wechat/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-common-starters/common-starter-wechat/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wechat.WeChatStarter \ No newline at end of file +cn.bootx.starter.wechat.WeChatAutoConfiguration \ No newline at end of file diff --git a/bootx-common-starters/common-starter-wecom/src/main/java/cn/bootx/starter/wecom/WeComStarter.java b/bootx-common-starters/common-starter-wecom/src/main/java/cn/bootx/starter/wecom/WeComAutoConfiguration.java similarity index 71% rename from bootx-common-starters/common-starter-wecom/src/main/java/cn/bootx/starter/wecom/WeComStarter.java rename to bootx-common-starters/common-starter-wecom/src/main/java/cn/bootx/starter/wecom/WeComAutoConfiguration.java index fd53ab15..d9e7bb49 100644 --- a/bootx-common-starters/common-starter-wecom/src/main/java/cn/bootx/starter/wecom/WeComStarter.java +++ b/bootx-common-starters/common-starter-wecom/src/main/java/cn/bootx/starter/wecom/WeComAutoConfiguration.java @@ -1,6 +1,7 @@ package cn.bootx.starter.wecom; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -11,6 +12,7 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @ConfigurationPropertiesScan +@AutoConfigurationPackage @MapperScan -public class WeComStarter { +public class WeComAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-wecom/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-common-starters/common-starter-wecom/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..fd445ebb 100644 --- a/bootx-common-starters/common-starter-wecom/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-common-starters/common-starter-wecom/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.starter.wecom.WeComAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-actable/src/main/java/cn/bootx/common/actable/ActableAutoConfiguration.java b/bootx-commons/common-actable/src/main/java/cn/bootx/common/actable/ActableAutoConfiguration.java new file mode 100644 index 00000000..c6bc6f10 --- /dev/null +++ b/bootx-commons/common-actable/src/main/java/cn/bootx/common/actable/ActableAutoConfiguration.java @@ -0,0 +1,16 @@ +package cn.bootx.common.actable; + +import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; +import org.springframework.context.annotation.ComponentScan; + +/** + * Actable 自动根据创建表 + * @author xxm + * @date 2022/12/18 + */ +@ComponentScan +@ConfigurationPropertiesScan +@AutoConfigurationPackage +public class ActableAutoConfiguration { +} diff --git a/bootx-commons/common-actable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-actable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..4c025de3 100644 --- a/bootx-commons/common-actable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-actable/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.actable.ActableAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-cache/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-cache/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 2d24f472..00000000 --- a/bootx-commons/common-cache/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file diff --git a/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CacheAutoConfiguration.java b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CacheAutoConfiguration.java new file mode 100644 index 00000000..928c551e --- /dev/null +++ b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CacheAutoConfiguration.java @@ -0,0 +1,16 @@ +package cn.bootx.common.cache; + +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; +import org.springframework.context.annotation.ComponentScan; + +/** + * 缓存配置 + * @author xxm + * @date 2022/12/18 + */ +@ComponentScan +@ConfigurationPropertiesScan +@AutoConfigurationPackage +public class CacheAutoConfiguration { +} diff --git a/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/BootxRedisCache.java b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/configuration/BootxRedisCache.java similarity index 95% rename from bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/BootxRedisCache.java rename to bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/configuration/BootxRedisCache.java index 268fe976..f818a588 100644 --- a/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/BootxRedisCache.java +++ b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/configuration/BootxRedisCache.java @@ -1,4 +1,4 @@ -package cn.bootx.common.cache; +package cn.bootx.common.cache.configuration; import org.springframework.data.redis.cache.RedisCache; import org.springframework.data.redis.cache.RedisCacheConfiguration; diff --git a/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/BootxRedisCacheManager.java b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/configuration/BootxRedisCacheManager.java similarity index 98% rename from bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/BootxRedisCacheManager.java rename to bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/configuration/BootxRedisCacheManager.java index 1a023a83..3238524d 100644 --- a/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/BootxRedisCacheManager.java +++ b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/configuration/BootxRedisCacheManager.java @@ -1,4 +1,4 @@ -package cn.bootx.common.cache; +package cn.bootx.common.cache.configuration; import cn.hutool.core.util.StrUtil; import lombok.Setter; diff --git a/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CachingConfiguration.java b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/manager/CachingConfiguration.java similarity index 97% rename from bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CachingConfiguration.java rename to bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/manager/CachingConfiguration.java index d3454abe..43c2db3a 100644 --- a/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CachingConfiguration.java +++ b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/manager/CachingConfiguration.java @@ -1,5 +1,6 @@ -package cn.bootx.common.cache; +package cn.bootx.common.cache.manager; +import cn.bootx.common.cache.configuration.BootxRedisCacheManager; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CachingProperties.java b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/manager/CachingProperties.java similarity index 93% rename from bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CachingProperties.java rename to bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/manager/CachingProperties.java index d4289763..00260776 100644 --- a/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CachingProperties.java +++ b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/manager/CachingProperties.java @@ -1,4 +1,4 @@ -package cn.bootx.common.cache; +package cn.bootx.common.cache.manager; import lombok.Data; import lombok.experimental.Accessors; diff --git a/bootx-commons/common-cache/src/main/resources/META-INF/spring.factories b/bootx-commons/common-cache/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 3ccc4317..00000000 --- a/bootx-commons/common-cache/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.common.cache.CachingConfiguration diff --git a/bootx-commons/common-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..542315e9 100644 --- a/bootx-commons/common-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-cache/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.cache.CacheAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/ExceptionHandlerAutoConfiguration.java b/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/ExceptionHandlerAutoConfiguration.java new file mode 100644 index 00000000..92bef519 --- /dev/null +++ b/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/ExceptionHandlerAutoConfiguration.java @@ -0,0 +1,16 @@ +package cn.bootx.common.exceptionhandler; + +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; +import org.springframework.context.annotation.ComponentScan; + +/** + * 异常处理程序 + * @author xxm + * @date 2022/12/18 + */ +@ComponentScan +@ConfigurationPropertiesScan +@AutoConfigurationPackage +public class ExceptionHandlerAutoConfiguration { +} diff --git a/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/ExceptionHandlerProperties.java b/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/handler/ExceptionHandlerProperties.java similarity index 87% rename from bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/ExceptionHandlerProperties.java rename to bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/handler/ExceptionHandlerProperties.java index f9f02155..e1f7816e 100644 --- a/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/ExceptionHandlerProperties.java +++ b/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/handler/ExceptionHandlerProperties.java @@ -1,4 +1,4 @@ -package cn.bootx.common.exceptionhandler; +package cn.bootx.common.exceptionhandler.handler; import lombok.Getter; import lombok.Setter; diff --git a/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/RestExceptionHandler.java b/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/handler/RestExceptionHandler.java similarity index 99% rename from bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/RestExceptionHandler.java rename to bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/handler/RestExceptionHandler.java index a9c6f2ed..de66691f 100644 --- a/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/RestExceptionHandler.java +++ b/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/handler/RestExceptionHandler.java @@ -1,4 +1,4 @@ -package cn.bootx.common.exceptionhandler; +package cn.bootx.common.exceptionhandler.handler; import cn.bootx.common.core.code.CommonCode; import cn.bootx.common.core.code.CommonErrorCode; diff --git a/bootx-commons/common-exception-handler/src/main/resources/META-INF/spring.factories b/bootx-commons/common-exception-handler/src/main/resources/META-INF/spring.factories deleted file mode 100644 index ff6f3e6d..00000000 --- a/bootx-commons/common-exception-handler/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.common.exceptionhandler.RestExceptionHandler diff --git a/bootx-commons/common-exception-handler/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-exception-handler/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..54fdc768 100644 --- a/bootx-commons/common-exception-handler/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-exception-handler/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.exceptionhandler.ExceptionHandlerAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-header-holder/src/main/resources/META-INF/spring.factories b/bootx-commons/common-header-holder/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 367a45b0..00000000 --- a/bootx-commons/common-header-holder/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.common.headerholder.filter.WebHeaderHolderInterceptor diff --git a/bootx-commons/common-header-holder/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-header-holder/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..774af7d4 100644 --- a/bootx-commons/common-header-holder/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-header-holder/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.headerholder.filter.WebHeaderHolderInterceptor \ No newline at end of file diff --git a/bootx-commons/common-idempotency/src/main/resources/META-INF/spring.factories b/bootx-commons/common-idempotency/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 8d9ba672..00000000 --- a/bootx-commons/common-idempotency/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.common.idempotency.aop.IdempotentAop diff --git a/bootx-commons/common-idempotency/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-idempotency/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..f7f3182d 100644 --- a/bootx-commons/common-idempotency/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-idempotency/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.idempotency.aop.IdempotentAop \ No newline at end of file diff --git a/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonApplication.java b/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonAutoConfiguration.java similarity index 55% rename from bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonApplication.java rename to bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonAutoConfiguration.java index 3151a46e..39cd2c2c 100644 --- a/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonApplication.java +++ b/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonAutoConfiguration.java @@ -1,5 +1,6 @@ package cn.bootx.common.jackson; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.context.annotation.ComponentScan; /** @@ -7,6 +8,7 @@ import org.springframework.context.annotation.ComponentScan; * @author xxm * @date 2021/12/2 */ +@AutoConfigurationPackage @ComponentScan -public class JacksonApplication { +public class JacksonAutoConfiguration { } diff --git a/bootx-commons/common-jackson/src/main/resources/META-INF/spring.factories b/bootx-commons/common-jackson/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 0bb74ccd..00000000 --- a/bootx-commons/common-jackson/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.common.jackson.JacksonApplication diff --git a/bootx-commons/common-jackson/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-jackson/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..4cad475d 100644 --- a/bootx-commons/common-jackson/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-jackson/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.jackson.JacksonAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockApplication.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockCommonAutoConfiguration.java similarity index 65% rename from bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockApplication.java rename to bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockCommonAutoConfiguration.java index a217e03c..b6787c13 100644 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockApplication.java +++ b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockCommonAutoConfiguration.java @@ -1,5 +1,6 @@ package cn.bootx.common.lock; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -8,7 +9,8 @@ import org.springframework.context.annotation.ComponentScan; * @author xxm * @date 2022/5/6 */ +@AutoConfigurationPackage @ComponentScan @ConfigurationPropertiesScan -public class LockApplication { +public class LockCommonAutoConfiguration { } diff --git a/bootx-commons/common-lock/src/main/resources/META-INF/spring.factories b/bootx-commons/common-lock/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 642c2853..00000000 --- a/bootx-commons/common-lock/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.common.lock.LockApplication diff --git a/bootx-commons/common-lock/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-lock/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..988f4f4b 100644 --- a/bootx-commons/common-lock/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-lock/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.lock.LockCommonAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-log/src/main/java/cn/bootx/common/log/LogApplication.java b/bootx-commons/common-log/src/main/java/cn/bootx/common/log/LogAutoConfiguration.java similarity index 39% rename from bootx-commons/common-log/src/main/java/cn/bootx/common/log/LogApplication.java rename to bootx-commons/common-log/src/main/java/cn/bootx/common/log/LogAutoConfiguration.java index d218dd79..42482710 100644 --- a/bootx-commons/common-log/src/main/java/cn/bootx/common/log/LogApplication.java +++ b/bootx-commons/common-log/src/main/java/cn/bootx/common/log/LogAutoConfiguration.java @@ -1,12 +1,12 @@ package cn.bootx.common.log; -import org.springframework.context.annotation.ComponentScan; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; /** * 日志扫描 * @author xxm * @date 2022/6/6 */ -@ComponentScan -public class LogApplication { +@AutoConfigurationPackage +public class LogAutoConfiguration { } diff --git a/bootx-commons/common-log/src/main/resources/META-INF/spring.factories b/bootx-commons/common-log/src/main/resources/META-INF/spring.factories deleted file mode 100644 index a39ed112..00000000 --- a/bootx-commons/common-log/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.common.log.LogApplication diff --git a/bootx-commons/common-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..51bcaaf9 100644 --- a/bootx-commons/common-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-log/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.log.LogAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-mongo/src/main/java/cn/bootx/common/mongo/MongoApplication.java b/bootx-commons/common-mongo/src/main/java/cn/bootx/common/mongo/MongoCommonAutoConfiguration.java similarity index 54% rename from bootx-commons/common-mongo/src/main/java/cn/bootx/common/mongo/MongoApplication.java rename to bootx-commons/common-mongo/src/main/java/cn/bootx/common/mongo/MongoCommonAutoConfiguration.java index 7f66e219..1cf17430 100644 --- a/bootx-commons/common-mongo/src/main/java/cn/bootx/common/mongo/MongoApplication.java +++ b/bootx-commons/common-mongo/src/main/java/cn/bootx/common/mongo/MongoCommonAutoConfiguration.java @@ -1,5 +1,6 @@ package cn.bootx.common.mongo; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.context.annotation.ComponentScan; /** @@ -8,5 +9,6 @@ import org.springframework.context.annotation.ComponentScan; * @date 2022/1/21 */ @ComponentScan -public class MongoApplication { +@AutoConfigurationPackage +public class MongoCommonAutoConfiguration { } diff --git a/bootx-commons/common-mongo/src/main/resources/META-INF/spring.factories b/bootx-commons/common-mongo/src/main/resources/META-INF/spring.factories deleted file mode 100644 index c5d0be69..00000000 --- a/bootx-commons/common-mongo/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.common.mongo.MongoApplication diff --git a/bootx-commons/common-mongo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-mongo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..488882a8 100644 --- a/bootx-commons/common-mongo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-mongo/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.mongo.MongoCommonAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-mqtt/src/main/java/cn/bootx/common/mqtt/MqttApplication.java b/bootx-commons/common-mqtt/src/main/java/cn/bootx/common/mqtt/MqttAutoConfiguration.java similarity index 88% rename from bootx-commons/common-mqtt/src/main/java/cn/bootx/common/mqtt/MqttApplication.java rename to bootx-commons/common-mqtt/src/main/java/cn/bootx/common/mqtt/MqttAutoConfiguration.java index ad7cbf82..df1db315 100644 --- a/bootx-commons/common-mqtt/src/main/java/cn/bootx/common/mqtt/MqttApplication.java +++ b/bootx-commons/common-mqtt/src/main/java/cn/bootx/common/mqtt/MqttAutoConfiguration.java @@ -10,7 +10,7 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @ConfigurationPropertiesScan -public class MqttApplication { +public class MqttAutoConfiguration { } diff --git a/bootx-commons/common-mqtt/src/main/resources/META-INF/spring.factories b/bootx-commons/common-mqtt/src/main/resources/META-INF/spring.factories deleted file mode 100644 index b0573967..00000000 --- a/bootx-commons/common-mqtt/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.common.mqtt.MqttApplication diff --git a/bootx-commons/common-mqtt/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-mqtt/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..c017b279 100644 --- a/bootx-commons/common-mqtt/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-mqtt/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.mqtt.MqttAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusApplication.java b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusCommonAutoConfiguration.java similarity index 59% rename from bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusApplication.java rename to bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusCommonAutoConfiguration.java index 4e1cc26d..d079d116 100644 --- a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusApplication.java +++ b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusCommonAutoConfiguration.java @@ -1,14 +1,14 @@ package cn.bootx.common.mybatisplus; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; -import org.springframework.context.annotation.ComponentScan; /** * mybatis自动配置 * @author xxm * @date 2021/7/27 */ -@ComponentScan +@AutoConfigurationPackage @ConfigurationPropertiesScan -public class MybatisPlusApplication { +public class MybatisPlusCommonAutoConfiguration { } diff --git a/bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring.factories b/bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 38fc59ef..00000000 --- a/bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,3 +0,0 @@ -## 配置自定义 starter 的自动化配置 -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.common.mybatisplus.MybatisPlusApplication diff --git a/bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..fdf7faf6 100644 --- a/bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-mybatis-plus/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.mybatisplus.MybatisPlusCommonAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/RabbitMqApplication.java b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/RabbitMqCommonAutoConfiguration.java similarity index 66% rename from bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/RabbitMqApplication.java rename to bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/RabbitMqCommonAutoConfiguration.java index d6f7fd12..973a7985 100644 --- a/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/RabbitMqApplication.java +++ b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/RabbitMqCommonAutoConfiguration.java @@ -1,5 +1,6 @@ package cn.bootx.common.rabbit; +import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -9,6 +10,7 @@ import org.springframework.context.annotation.ComponentScan; * @date 2022/5/3 */ @ComponentScan +@AutoConfigurationPackage @ConfigurationPropertiesScan -public class RabbitMqApplication { +public class RabbitMqCommonAutoConfiguration { } diff --git a/bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring.factories b/bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring.factories index 366e039f..3d4e5627 100644 --- a/bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring.factories +++ b/bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring.factories @@ -1,3 +1,3 @@ ## 配置自定义 starter 的自动化配置 org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - cn.bootx.common.rabbit.RabbitMqApplication \ No newline at end of file + cn.bootx.common.rabbit.RabbitMqCommonAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 2d24f472..622df3c8 100644 --- a/bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/bootx-commons/common-rabbitmq/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1 @@ -cn.bootx.starter.wecom.WeComStarter \ No newline at end of file +cn.bootx.common.rabbit.RabbitMqCommonAutoConfiguration \ No newline at end of file diff --git a/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonLoadListener.java b/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonLoadListener.java index b3f79ad2..dac2e4ef 100644 --- a/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonLoadListener.java +++ b/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonLoadListener.java @@ -51,7 +51,7 @@ public class RedissonLoadListener implements ApplicationListener Date: Mon, 19 Dec 2022 18:45:31 +0800 Subject: [PATCH 10/15] =?UTF-8?q?feat=20=E6=9B=BF=E6=8D=A2lock=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E4=B8=BAlock4j,=20=E4=BF=AE=E5=A4=8D=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=89=AB=E6=8F=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../audit/log/AuditLogAutoConfiguration.java | 3 +- .../starter/auth/AuthAutoConfiguration.java | 4 +- .../code/gen/CodeGenAutoConfiguration.java | 4 +- .../data/perm/DataPermAutoConfiguration.java | 4 +- .../dingtalk/DingTalkAutoConfiguration.java | 9 +- .../starter/file/FileAutoConfiguration.java | 4 +- .../flowable/FlowableAutoConfiguration.java | 4 +- .../monitor/MonitorAutoConfiguration.java | 4 +- .../quartz/QuartzJobAutoConfiguration.java | 4 +- .../wechat/WeChatAutoConfiguration.java | 4 +- .../starter/wecom/WeComAutoConfiguration.java | 13 +- .../actable/ActableAutoConfiguration.java | 2 +- .../common/cache/CacheAutoConfiguration.java | 4 +- .../ExceptionHandlerAutoConfiguration.java | 4 +- .../jackson/JacksonAutoConfiguration.java | 4 +- bootx-commons/common-lock/pom.xml | 16 +- .../lock/LockCommonAutoConfiguration.java | 6 +- .../cn/bootx/common/lock/annotation/Lock.java | 55 ------- .../bootx/common/lock/annotation/LockKey.java | 18 --- .../configurer/LockAutoConfiguration.java | 21 --- .../common/lock/constant/LockConstant.java | 82 ---------- .../bootx/common/lock/constant/LockType.java | 37 ----- .../common/lock/constant/ServerPattern.java | 39 ----- .../cn/bootx/common/lock/entity/LockInfo.java | 38 ----- .../lock/factory/LockServiceFactory.java | 41 ----- .../lock/factory/ServerPatternFactory.java | 41 ----- .../lock/handler/LockAspectHandler.java | 60 ------- .../common/lock/handler/LockInfoProvider.java | 153 ------------------ .../common/lock/service/LockService.java | 42 ----- .../service/impl/FairLockServiceImpl.java | 61 ------- .../service/impl/MultiLockServiceImpl.java | 68 -------- .../service/impl/ReadLockServiceImpl.java | 62 ------- .../lock/service/impl/RedLockServiceImpl.java | 69 -------- .../impl/ReentrantLockServiceImpl.java | 62 ------- .../service/impl/WriteLockServiceImpl.java | 62 ------- .../common/log/LogAutoConfiguration.java | 6 +- .../mongo/MongoCommonAutoConfiguration.java | 4 +- .../MybatisPlusCommonAutoConfiguration.java | 4 +- .../RabbitMqCommonAutoConfiguration.java | 4 +- bootx-commons/common-redis-client/README.md | 6 +- bootx-commons/common-redis-client/pom.xml | 5 +- .../redis/redisson/RedissonConfiguration.java | 7 + .../redis/redisson/RedissonLoadListener.java | 11 +- .../sequence/SequenceAutoConfiguration.java | 4 +- .../lock/IdempotencyDemoController.java | 24 +-- .../core/dept/service/DeptUtilService.java | 4 +- pom.xml | 1 + 47 files changed, 97 insertions(+), 1087 deletions(-) delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/annotation/Lock.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/annotation/LockKey.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/configurer/LockAutoConfiguration.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/LockConstant.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/LockType.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/ServerPattern.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/entity/LockInfo.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/factory/LockServiceFactory.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/factory/ServerPatternFactory.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/handler/LockAspectHandler.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/handler/LockInfoProvider.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/LockService.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/FairLockServiceImpl.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/MultiLockServiceImpl.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/ReadLockServiceImpl.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/RedLockServiceImpl.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/ReentrantLockServiceImpl.java delete mode 100644 bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/WriteLockServiceImpl.java diff --git a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogAutoConfiguration.java b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogAutoConfiguration.java index 0b92140e..c53c40fa 100644 --- a/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogAutoConfiguration.java +++ b/bootx-common-starters/common-starter-audit-log/src/main/java/cn/bootx/starter/audit/log/AuditLogAutoConfiguration.java @@ -3,7 +3,6 @@ package cn.bootx.starter.audit.log; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; @@ -16,7 +15,7 @@ import org.springframework.data.mongodb.repository.config.EnableMongoRepositorie @ComponentScan @ConfigurationPropertiesScan @EnableMongoRepositories -@AutoConfigurationPackage +@AutoConfiguration @MapperScan(annotationClass = Mapper.class) public class AuditLogAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/AuthAutoConfiguration.java b/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/AuthAutoConfiguration.java index cd33a788..d6f2654c 100644 --- a/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/AuthAutoConfiguration.java +++ b/bootx-common-starters/common-starter-auth/src/main/java/cn/bootx/starter/auth/AuthAutoConfiguration.java @@ -1,6 +1,6 @@ package cn.bootx.starter.auth; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -11,6 +11,6 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @ConfigurationPropertiesScan -@AutoConfigurationPackage +@AutoConfiguration public class AuthAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-code-gen/src/main/java/cn/bootx/starter/code/gen/CodeGenAutoConfiguration.java b/bootx-common-starters/common-starter-code-gen/src/main/java/cn/bootx/starter/code/gen/CodeGenAutoConfiguration.java index 5f32d728..82f9fb03 100644 --- a/bootx-common-starters/common-starter-code-gen/src/main/java/cn/bootx/starter/code/gen/CodeGenAutoConfiguration.java +++ b/bootx-common-starters/common-starter-code-gen/src/main/java/cn/bootx/starter/code/gen/CodeGenAutoConfiguration.java @@ -2,7 +2,7 @@ package cn.bootx.starter.code.gen; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.ComponentScan; /** @@ -12,6 +12,6 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @MapperScan(annotationClass = Mapper.class) -@AutoConfigurationPackage +@AutoConfiguration public class CodeGenAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-data-perm/src/main/java/cn/bootx/starter/data/perm/DataPermAutoConfiguration.java b/bootx-common-starters/common-starter-data-perm/src/main/java/cn/bootx/starter/data/perm/DataPermAutoConfiguration.java index 8a9129d8..fa177196 100644 --- a/bootx-common-starters/common-starter-data-perm/src/main/java/cn/bootx/starter/data/perm/DataPermAutoConfiguration.java +++ b/bootx-common-starters/common-starter-data-perm/src/main/java/cn/bootx/starter/data/perm/DataPermAutoConfiguration.java @@ -2,7 +2,7 @@ package cn.bootx.starter.data.perm; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -14,6 +14,6 @@ import org.springframework.context.annotation.ComponentScan; @ComponentScan @ConfigurationPropertiesScan @MapperScan(annotationClass = Mapper.class) -@AutoConfigurationPackage +@AutoConfiguration public class DataPermAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-dingtalk/src/main/java/cn/bootx/starter/dingtalk/DingTalkAutoConfiguration.java b/bootx-common-starters/common-starter-dingtalk/src/main/java/cn/bootx/starter/dingtalk/DingTalkAutoConfiguration.java index e9ded765..4d403c55 100644 --- a/bootx-common-starters/common-starter-dingtalk/src/main/java/cn/bootx/starter/dingtalk/DingTalkAutoConfiguration.java +++ b/bootx-common-starters/common-starter-dingtalk/src/main/java/cn/bootx/starter/dingtalk/DingTalkAutoConfiguration.java @@ -3,18 +3,17 @@ package cn.bootx.starter.dingtalk; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; -/** +/** * 钉钉对接 -* @author xxm -* @date 2022/4/2 +* @author xxm +* @date 2022/4/2 */ @ComponentScan @ConfigurationPropertiesScan -@AutoConfigurationPackage +@AutoConfiguration @MapperScan(annotationClass = Mapper.class) public class DingTalkAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/FileAutoConfiguration.java b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/FileAutoConfiguration.java index b1f039d3..7f264cd0 100644 --- a/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/FileAutoConfiguration.java +++ b/bootx-common-starters/common-starter-file/src/main/java/cn/bootx/starter/file/FileAutoConfiguration.java @@ -2,7 +2,7 @@ package cn.bootx.starter.file; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; import org.springframework.data.mongodb.repository.config.EnableMongoRepositories; @@ -15,7 +15,7 @@ import org.springframework.data.mongodb.repository.config.EnableMongoRepositorie @ComponentScan @ConfigurationPropertiesScan @EnableMongoRepositories -@AutoConfigurationPackage +@AutoConfiguration @MapperScan(annotationClass = Mapper.class) public class FileAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/FlowableAutoConfiguration.java b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/FlowableAutoConfiguration.java index 1844a896..66c47849 100644 --- a/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/FlowableAutoConfiguration.java +++ b/bootx-common-starters/common-starter-flowable/src/main/java/cn/bootx/starter/flowable/FlowableAutoConfiguration.java @@ -2,7 +2,7 @@ package cn.bootx.starter.flowable; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -13,7 +13,7 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @ConfigurationPropertiesScan -@AutoConfigurationPackage +@AutoConfiguration @MapperScan(annotationClass = Mapper.class) public class FlowableAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-monitor/src/main/java/cn/bootx/starter/monitor/MonitorAutoConfiguration.java b/bootx-common-starters/common-starter-monitor/src/main/java/cn/bootx/starter/monitor/MonitorAutoConfiguration.java index 816c4884..0baf6033 100644 --- a/bootx-common-starters/common-starter-monitor/src/main/java/cn/bootx/starter/monitor/MonitorAutoConfiguration.java +++ b/bootx-common-starters/common-starter-monitor/src/main/java/cn/bootx/starter/monitor/MonitorAutoConfiguration.java @@ -1,6 +1,6 @@ package cn.bootx.starter.monitor; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.ComponentScan; /** @@ -9,6 +9,6 @@ import org.springframework.context.annotation.ComponentScan; * @date 2022/6/10 */ @ComponentScan -@AutoConfigurationPackage +@AutoConfiguration public class MonitorAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/QuartzJobAutoConfiguration.java b/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/QuartzJobAutoConfiguration.java index 6d34c583..cda34a4c 100644 --- a/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/QuartzJobAutoConfiguration.java +++ b/bootx-common-starters/common-starter-quartz/src/main/java/cn/bootx/starter/quartz/QuartzJobAutoConfiguration.java @@ -2,7 +2,7 @@ package cn.bootx.starter.quartz; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -13,7 +13,7 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @ConfigurationPropertiesScan -@AutoConfigurationPackage +@AutoConfiguration @MapperScan(annotationClass = Mapper.class) public class QuartzJobAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatAutoConfiguration.java b/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatAutoConfiguration.java index 580f2d0c..85c64a30 100644 --- a/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatAutoConfiguration.java +++ b/bootx-common-starters/common-starter-wechat/src/main/java/cn/bootx/starter/wechat/WeChatAutoConfiguration.java @@ -2,7 +2,7 @@ package cn.bootx.starter.wechat; import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -13,7 +13,7 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @MapperScan(annotationClass = Mapper.class) -@AutoConfigurationPackage +@AutoConfiguration @ConfigurationPropertiesScan public class WeChatAutoConfiguration { } diff --git a/bootx-common-starters/common-starter-wecom/src/main/java/cn/bootx/starter/wecom/WeComAutoConfiguration.java b/bootx-common-starters/common-starter-wecom/src/main/java/cn/bootx/starter/wecom/WeComAutoConfiguration.java index d9e7bb49..b7a514e3 100644 --- a/bootx-common-starters/common-starter-wecom/src/main/java/cn/bootx/starter/wecom/WeComAutoConfiguration.java +++ b/bootx-common-starters/common-starter-wecom/src/main/java/cn/bootx/starter/wecom/WeComAutoConfiguration.java @@ -1,18 +1,19 @@ package cn.bootx.starter.wecom; +import org.apache.ibatis.annotations.Mapper; import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; -/** +/** * 企业微信 -* @author xxm -* @date 2022/7/22 +* @author xxm +* @date 2022/7/22 */ @ComponentScan @ConfigurationPropertiesScan -@AutoConfigurationPackage -@MapperScan +@AutoConfiguration +@MapperScan(annotationClass = Mapper.class) public class WeComAutoConfiguration { } diff --git a/bootx-commons/common-actable/src/main/java/cn/bootx/common/actable/ActableAutoConfiguration.java b/bootx-commons/common-actable/src/main/java/cn/bootx/common/actable/ActableAutoConfiguration.java index c6bc6f10..f3a6c122 100644 --- a/bootx-commons/common-actable/src/main/java/cn/bootx/common/actable/ActableAutoConfiguration.java +++ b/bootx-commons/common-actable/src/main/java/cn/bootx/common/actable/ActableAutoConfiguration.java @@ -11,6 +11,6 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @ConfigurationPropertiesScan -@AutoConfigurationPackage +@AutoConfiguration public class ActableAutoConfiguration { } diff --git a/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CacheAutoConfiguration.java b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CacheAutoConfiguration.java index 928c551e..64c90a30 100644 --- a/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CacheAutoConfiguration.java +++ b/bootx-commons/common-cache/src/main/java/cn/bootx/common/cache/CacheAutoConfiguration.java @@ -1,6 +1,6 @@ package cn.bootx.common.cache; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -11,6 +11,6 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @ConfigurationPropertiesScan -@AutoConfigurationPackage +@AutoConfiguration public class CacheAutoConfiguration { } diff --git a/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/ExceptionHandlerAutoConfiguration.java b/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/ExceptionHandlerAutoConfiguration.java index 92bef519..c9d055bb 100644 --- a/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/ExceptionHandlerAutoConfiguration.java +++ b/bootx-commons/common-exception-handler/src/main/java/cn/bootx/common/exceptionhandler/ExceptionHandlerAutoConfiguration.java @@ -1,6 +1,6 @@ package cn.bootx.common.exceptionhandler; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -11,6 +11,6 @@ import org.springframework.context.annotation.ComponentScan; */ @ComponentScan @ConfigurationPropertiesScan -@AutoConfigurationPackage +@AutoConfiguration public class ExceptionHandlerAutoConfiguration { } diff --git a/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonAutoConfiguration.java b/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonAutoConfiguration.java index 39cd2c2c..2e0bda9e 100644 --- a/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonAutoConfiguration.java +++ b/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonAutoConfiguration.java @@ -1,6 +1,6 @@ package cn.bootx.common.jackson; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.ComponentScan; /** @@ -8,7 +8,7 @@ import org.springframework.context.annotation.ComponentScan; * @author xxm * @date 2021/12/2 */ -@AutoConfigurationPackage +@AutoConfiguration @ComponentScan public class JacksonAutoConfiguration { } diff --git a/bootx-commons/common-lock/pom.xml b/bootx-commons/common-lock/pom.xml index 2b0433a5..6b8cef30 100644 --- a/bootx-commons/common-lock/pom.xml +++ b/bootx-commons/common-lock/pom.xml @@ -17,10 +17,24 @@ cn.bootx.platform common-redis-client + + + + com.baomidou + lock4j-redis-template-spring-boot-starter + ${lock4j.version} + + + + + + + + org.springframework.boot spring-boot-starter-aop - \ No newline at end of file + diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockCommonAutoConfiguration.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockCommonAutoConfiguration.java index b6787c13..ded0c56f 100644 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockCommonAutoConfiguration.java +++ b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockCommonAutoConfiguration.java @@ -1,16 +1,14 @@ package cn.bootx.common.lock; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; -import org.springframework.context.annotation.ComponentScan; /** * 分布式锁 * @author xxm * @date 2022/5/6 */ -@AutoConfigurationPackage -@ComponentScan +@AutoConfiguration @ConfigurationPropertiesScan public class LockCommonAutoConfiguration { } diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/annotation/Lock.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/annotation/Lock.java deleted file mode 100644 index a129712c..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/annotation/Lock.java +++ /dev/null @@ -1,55 +0,0 @@ -package cn.bootx.common.lock.annotation; - - -import cn.bootx.common.lock.constant.LockType; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.util.concurrent.TimeUnit; - -/** - * 加锁注解 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午4:07:44 - */ -@Target(value = {ElementType.METHOD}) -@Retention(value = RetentionPolicy.RUNTIME) -public @interface Lock { - - /** - * 锁的名称, 不填根据方法自动生成名称, enableNameSpEl 开启后, 可以使用SpEl表达式生成锁名称 - */ - String name() default ""; - - /** - * name 是否使用SpEl表达式 - */ - boolean enableNameSpEl() default false; - - /** - * 锁类型,默认可公平锁 - */ - LockType lockType() default LockType.FAIR; - - /** - * 尝试加锁,最多等待时间(秒) - */ - long waitTime() default 60L; - - /** - * 上锁以后多少秒自动解锁 - */ - long leaseTime() default 60L; - - /** - * 锁时长单位 - */ - TimeUnit timeUnit() default TimeUnit.SECONDS; - - /** - * 自定义业务key 支持SpEl表达式 - */ - String[] keys() default {}; -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/annotation/LockKey.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/annotation/LockKey.java deleted file mode 100644 index 61674d15..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/annotation/LockKey.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.bootx.common.lock.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * - * 加锁Key注解 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午4:07:55 - */ -@Target(value = {ElementType.PARAMETER, ElementType.TYPE}) -@Retention(value = RetentionPolicy.RUNTIME) -public @interface LockKey { - String value() default ""; -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/configurer/LockAutoConfiguration.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/configurer/LockAutoConfiguration.java deleted file mode 100644 index 8af23cba..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/configurer/LockAutoConfiguration.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.bootx.common.lock.configurer; - -import cn.bootx.common.lock.handler.LockAspectHandler; -import lombok.RequiredArgsConstructor; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Import; - -/** - * Lock自动装配配置 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午5:08:51 - */ -@Configuration -@AutoConfigureAfter(RedisAutoConfiguration.class) -@Import({LockAspectHandler.class}) -@RequiredArgsConstructor -public class LockAutoConfiguration { - -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/LockConstant.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/LockConstant.java deleted file mode 100644 index 7bac65fa..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/LockConstant.java +++ /dev/null @@ -1,82 +0,0 @@ -package cn.bootx.common.lock.constant; - -/** - * - * 分布式锁常量类 - * - * @author xianzhi.chen@hand-china.com 2019年4月4日下午2:25:24 - */ -public class LockConstant { - - /** - * 默认客户端名字 - */ - public static final String LOCK_CLIENT_NAME = "Lock"; - /** - * 默认SSL实现方式:JDK - */ - public static final String JDK = "JDK"; - /** - * 逗号 - */ - public static final String COMMA = ","; - /** - * 冒号 - */ - public static final String COLON = ":"; - /** - * 分号 - */ - public static final String SEMICOLON = ";"; - /** - * redis默认URL前缀 - */ - public static final String REDIS_URL_PREFIX = "redis://"; - public static final String REDIS_SSL_URL_PREFIX = "rediss://"; - /** - * 锁的前缀 - */ - public static final String KEY_PREFIX = "lock:key:"; - - /** - * - * 负载均衡策略 - * - * @author xianzhi.chen@hand-china.com 2019年4月4日下午2:29:15 - */ - public static class LoadBalancer { - /** - * 随机调度算法 - */ - public static final String RANDOM_LOAD_BALANCER = "RandomLoadBalancer"; - /** - * 轮询调度算法 - */ - public static final String ROUND_ROBIN_LOAD_BALANCER = "RoundRobinLoadBalancer"; - /** - * 权重调度算法 - */ - public static final String WEIGHTED_ROUND_ROBIN_BALANCER = "WeightedRoundRobinBalancer"; - } - - /** - * 读取操作/订阅操作的负载均衡模式常量 - * - * @author xianzhi.chen@hand-china.com 2019年4月4日下午2:29:09 - */ - public static class SubReadMode { - /** - * 从节点 - */ - public static final String SLAVE = "SLAVE"; - /** - * 主节点 - */ - public static final String MASTER = "MASTER"; - /** - * 主从节点 - */ - public static final String MASTER_SLAVE = "MASTER_SLAVE"; - } - -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/LockType.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/LockType.java deleted file mode 100644 index d6a29bdf..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/LockType.java +++ /dev/null @@ -1,37 +0,0 @@ -package cn.bootx.common.lock.constant; - -/** - * - * 锁类型 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午4:07:09 - */ -public enum LockType { - /** - * 可重入锁 - */ - REENTRANT, - /** - * 公平锁 - */ - FAIR, - /** - * 联锁 - */ - MULTI, - /** - * 红锁 - */ - RED, - /** - * 读锁 - */ - READ, - /** - * 写锁 - */ - WRITE; - - LockType() {} - -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/ServerPattern.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/ServerPattern.java deleted file mode 100644 index c75542a0..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/constant/ServerPattern.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.bootx.common.lock.constant; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * - * Redis的运行模式 - * - * @author xianzhi.chen@hand-china.com 2019年4月4日下午2:06:31 - */ -@Getter -@AllArgsConstructor -public enum ServerPattern { - - /** - * 集群模式,除了适用于Redis集群环境,也适用于任何云计算服务商提供的集群模式 - */ - CLUSTER("cluster"), - /** - * 云托管模式,适用于任何由云计算运营商提供的Redis云服务,包括亚马逊云的AWS ElastiCache、微软云的Azure Redis 缓存和阿里云(Aliyun)的云数据库Redis版 - */ - REPLICATED("replicated"), - /** - * 哨兵模式 - */ - SENTINEL("sentinel"), - /** - * 主从模式 - */ - MASTER_SLAVE("master_slave"), - /** - * 单节点模式 - */ - SINGLE("single"); - - private final String pattern; - -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/entity/LockInfo.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/entity/LockInfo.java deleted file mode 100644 index 33f99b3e..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/entity/LockInfo.java +++ /dev/null @@ -1,38 +0,0 @@ -package cn.bootx.common.lock.entity; - -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * 锁基本信息 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午4:06:52 - */ -@Data -@NoArgsConstructor -public class LockInfo { - - private String name; - private long waitTime; - private long leaseTime; - private TimeUnit timeUnit = TimeUnit.SECONDS; - private List keyList; - - public LockInfo(String name, long waitTime, long leaseTime, TimeUnit timeUnit) { - this.name = name; - this.waitTime = waitTime; - this.leaseTime = leaseTime; - this.timeUnit = timeUnit; - } - - public LockInfo(String name, List keyList, long waitTime, long leaseTime, TimeUnit timeUnit) { - this.name = name; - this.keyList = keyList; - this.waitTime = waitTime; - this.leaseTime = leaseTime; - this.timeUnit = timeUnit; - } -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/factory/LockServiceFactory.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/factory/LockServiceFactory.java deleted file mode 100644 index 370b682b..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/factory/LockServiceFactory.java +++ /dev/null @@ -1,41 +0,0 @@ -package cn.bootx.common.lock.factory; - - -import cn.bootx.common.lock.constant.LockType; -import cn.bootx.common.lock.service.LockService; -import cn.bootx.common.lock.service.impl.*; -import cn.hutool.extra.spring.SpringUtil; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.EnumMap; - -/** - * 锁处理工厂类 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午7:04:13 - */ -@Service -@RequiredArgsConstructor -public class LockServiceFactory { - - private static final EnumMap> serviceMap = new EnumMap<>(LockType.class); - - static { - serviceMap.put(LockType.REENTRANT, ReentrantLockServiceImpl.class); - serviceMap.put(LockType.FAIR, FairLockServiceImpl.class); - serviceMap.put(LockType.READ, ReadLockServiceImpl.class); - serviceMap.put(LockType.WRITE, WriteLockServiceImpl.class); - serviceMap.put(LockType.RED, RedLockServiceImpl.class); - } - - /** - * 根据类型进行不同的锁实现 - * - * @param lockType 锁类 - * @return LockService - */ - public LockService getLock(LockType lockType) { - return (LockService) SpringUtil.getBean(serviceMap.get(lockType)); - } -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/factory/ServerPatternFactory.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/factory/ServerPatternFactory.java deleted file mode 100644 index c082b723..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/factory/ServerPatternFactory.java +++ /dev/null @@ -1,41 +0,0 @@ -package cn.bootx.common.lock.factory; - - -import cn.bootx.common.core.exception.FatalException; -import cn.bootx.common.lock.constant.ServerPattern; - -import java.util.HashMap; -import java.util.Map; - -/** - * - * Redis服务模式工厂类 - * - * @author xianzhi.chen@hand-china.com 2019年4月4日下午2:48:10 - */ -public class ServerPatternFactory { - - private static final Map serverPatternMap = new HashMap<>(); - - static { - serverPatternMap.put(ServerPattern.SINGLE.getPattern(), ServerPattern.SINGLE); - serverPatternMap.put(ServerPattern.CLUSTER.getPattern(), ServerPattern.CLUSTER); - serverPatternMap.put(ServerPattern.MASTER_SLAVE.getPattern(), ServerPattern.MASTER_SLAVE); - serverPatternMap.put(ServerPattern.REPLICATED.getPattern(), ServerPattern.REPLICATED); - serverPatternMap.put(ServerPattern.SENTINEL.getPattern(), ServerPattern.SENTINEL); - } - - /** - * 根据字符串模式标识返回服务器模式枚举类 - * - * @param pattern - * @return - */ - public static ServerPattern getServerPattern(String pattern) throws FatalException { - ServerPattern serverPattern = serverPatternMap.get(pattern); - if (serverPattern == null) { - throw new FatalException(-1,"没有找到相应的服务器模式,请检测参数是否正常,pattern的值为:" + pattern); - } - return serverPattern; - } -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/handler/LockAspectHandler.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/handler/LockAspectHandler.java deleted file mode 100644 index f797804d..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/handler/LockAspectHandler.java +++ /dev/null @@ -1,60 +0,0 @@ -package cn.bootx.common.lock.handler; - -import cn.bootx.common.core.exception.BizException; -import cn.bootx.common.lock.annotation.Lock; -import cn.bootx.common.lock.entity.LockInfo; -import cn.bootx.common.lock.factory.LockServiceFactory; -import cn.bootx.common.lock.service.LockService; -import lombok.RequiredArgsConstructor; -import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Aspect; -import org.springframework.core.annotation.Order; -import org.springframework.stereotype.Component; - -/** - * 切面加锁处理 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午4:52:06 - */ -@Aspect -@Component -@Order(0) -@RequiredArgsConstructor -public class LockAspectHandler { - - private final LockInfoProvider lockInfoProvider; - private final LockServiceFactory lockFactory; - - - @Around(value = "@annotation(lock)") - public Object around(ProceedingJoinPoint joinPoint, Lock lock) throws Throwable { - // 获取锁信息 - LockInfo lockInfo = lockInfoProvider.getLockInfo(joinPoint, lock); - // 获取锁服务 - LockService lockService = lockFactory.getLock(lock.lockType()); - // 若当前线程已经存在锁,不再添加新的锁 - if (lockService.getLockInfo() != null && !lockInfo.equals(lockService.getLockInfo())) { - return joinPoint.proceed(); - } - // 设置锁信息 - lockService.setLockInfo(lockInfo); - boolean lockFlag = false; - // 加锁 - try { - boolean lockRes = lockService.lock(); - if (lockRes) { - // 加锁成功 - lockFlag = true; - return joinPoint.proceed(); - } else { - throw new BizException("获取锁失败"); - } - } finally { - if (lockFlag) { - lockService.releaseLock(); - lockService.clearLockInfo(); - } - } - } -} \ No newline at end of file diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/handler/LockInfoProvider.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/handler/LockInfoProvider.java deleted file mode 100644 index 1154e774..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/handler/LockInfoProvider.java +++ /dev/null @@ -1,153 +0,0 @@ -package cn.bootx.common.lock.handler; - -import cn.bootx.common.lock.annotation.Lock; -import cn.bootx.common.lock.annotation.LockKey; -import cn.bootx.common.lock.entity.LockInfo; -import lombok.RequiredArgsConstructor; -import lombok.SneakyThrows; -import lombok.extern.slf4j.Slf4j; -import org.aspectj.lang.JoinPoint; -import org.aspectj.lang.reflect.MethodSignature; -import org.springframework.expression.EvaluationContext; -import org.springframework.expression.ExpressionParser; -import org.springframework.expression.spel.standard.SpelExpressionParser; -import org.springframework.expression.spel.support.StandardEvaluationContext; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.lang.reflect.Method; -import java.lang.reflect.Parameter; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * 锁信息支持类 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午7:08:06 - */ -@Slf4j -@Service -@RequiredArgsConstructor -public class LockInfoProvider { - - private final ExpressionParser parser = new SpelExpressionParser(); - - /** - * 获取锁信息 - */ - public LockInfo getLockInfo(JoinPoint joinPoint, Lock lock) { - Method method = getMethod(joinPoint); - Object[] parameterValues = joinPoint.getArgs(); - // Spel表达式的上下文 - EvaluationContext context = new StandardEvaluationContext(); - Parameter[] parameters = method.getParameters(); - for (int i = 0; i < parameters.length; i++) { - String name = parameters[i].getName(); - Object value = parameterValues[i]; - context.setVariable(name, value); - } - - String lockName = lock.name(); - List keyList = this.getKeyList(joinPoint, lock.keys(), context); - // 获取KEY - if (lockName.length() > 0) { - // name使用 - if (lock.enableNameSpEl()) { - Object value = parser.parseExpression(lockName).getValue(context); - if (value != null) { - lockName = value.toString(); - } - } - } else { - lockName = getLockName((MethodSignature) joinPoint.getSignature(), keyList); - } - // 获取锁等待时间 - long waitTime = lock.waitTime(); - // 获取锁默认释放时间 - long leaseTime = lock.leaseTime(); - // 获取锁默认时间单位 - TimeUnit timeUnit = lock.timeUnit(); - // 增加前缀 - lockName = "bootx:lock:"+lockName; - return new LockInfo(lockName, keyList, waitTime, leaseTime, timeUnit); - } - - /** - * 获取锁KEY名称 - */ - private List getKeyList(JoinPoint joinPoint, String[] keys, EvaluationContext context) { - Method method = getMethod(joinPoint); - List definitionKeys = getSpElDefinitionKey(keys, context); - List keyList = new ArrayList<>(definitionKeys); - List parameterKeys = getParameterKey(method.getParameters(), joinPoint.getArgs()); - keyList.addAll(parameterKeys); - return keyList; - } - - /** - * 获取拦截方法 - */ - @SneakyThrows - private Method getMethod(JoinPoint joinPoint) { - MethodSignature signature = (MethodSignature) joinPoint.getSignature(); - Method method = signature.getMethod(); - if (method.getDeclaringClass().isInterface()) { - try { - method = joinPoint.getTarget().getClass().getDeclaredMethod(signature.getName(), - method.getParameterTypes()); - } catch (Exception e) { - log.error(e.getMessage(),e); - throw e; - } - } - return method; - } - - /** - * 获取方法定义KEY - */ - private List getSpElDefinitionKey(String[] definitionKeys, EvaluationContext context) { - List definitionKeyList = new ArrayList<>(); - for (String definitionKey : definitionKeys) { - if (definitionKey == null || definitionKey.isEmpty()) { - continue; - } - Object value = parser.parseExpression(definitionKey).getValue(context); - if (value != null) { - definitionKeyList.add(value.toString()); - } - } - return definitionKeyList; - } - - /** - * 获取参数KEY - */ - private List getParameterKey(Parameter[] parameters, Object[] parameterValues) { - List parameterKey = new ArrayList<>(); - for (int i = 0; i < parameters.length; i++) { - if (parameters[i].getAnnotation(LockKey.class) != null) { - LockKey keyAnnotation = parameters[i].getAnnotation(LockKey.class); - if (keyAnnotation.value().isEmpty()) { - parameterKey.add(parameterValues[i].toString()); - } else { - StandardEvaluationContext context = new StandardEvaluationContext(parameterValues[i]); - Object value = parser.parseExpression(keyAnnotation.value()).getValue(context); - if (value != null) { - parameterKey.add(value.toString()); - } - } - } - } - return parameterKey; - } - - /** - * 获取锁名称 - */ - private String getLockName(MethodSignature signature, List keyList) { - return String.format("%s.%s.%s", signature.getDeclaringTypeName(), signature.getMethod().getName(), - StringUtils.collectionToDelimitedString(keyList, "", "-", "")); - } -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/LockService.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/LockService.java deleted file mode 100644 index 4c36906e..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/LockService.java +++ /dev/null @@ -1,42 +0,0 @@ -package cn.bootx.common.lock.service; - - -import cn.bootx.common.lock.entity.LockInfo; - -/** - * - * 锁服务接口 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午7:03:24 - */ -public interface LockService { - - /** - * 添加锁信息 - * @param lockInfo 锁信息 - */ - void setLockInfo(LockInfo lockInfo); - - /** - * 获取锁信息 - * - */ - LockInfo getLockInfo(); - - /** - * 清除锁信息 - * - */ - void clearLockInfo(); - - /** - * 加锁 - */ - boolean lock(); - - /** - * - * 释放锁 - */ - void releaseLock(); -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/FairLockServiceImpl.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/FairLockServiceImpl.java deleted file mode 100644 index 514c9730..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/FairLockServiceImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -package cn.bootx.common.lock.service.impl; - -import cn.bootx.common.lock.entity.LockInfo; -import cn.bootx.common.lock.service.LockService; -import lombok.RequiredArgsConstructor; -import org.redisson.api.RLock; -import org.redisson.api.RedissonClient; -import org.springframework.context.annotation.Scope; -import org.springframework.stereotype.Service; - -import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_PROTOTYPE; - -/** - * 公平锁实现 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午4:28:07 - */ -@Scope(SCOPE_PROTOTYPE) -@Service -@RequiredArgsConstructor -public class FairLockServiceImpl implements LockService { - - private final RedissonClient redissonClient; - private final ThreadLocal lockInfoThreadLocal = new ThreadLocal<>(); - - @Override - public void setLockInfo(LockInfo lockInfo) { - lockInfoThreadLocal.set(lockInfo); - } - - @Override - public LockInfo getLockInfo() { - return lockInfoThreadLocal.get(); - } - - @Override - public void clearLockInfo() { - lockInfoThreadLocal.remove(); - } - - @Override - public boolean lock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - RLock rLock = redissonClient.getFairLock(lockInfo.getName()); - try { - return rLock.tryLock(lockInfo.getWaitTime(), lockInfo.getLeaseTime(), lockInfo.getTimeUnit()); - } catch (Exception e) { - return false; - } - } - - @Override - public void releaseLock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - RLock rLock = redissonClient.getFairLock(lockInfo.getName()); - if (rLock.isHeldByCurrentThread()) { - rLock.unlockAsync(); - } - lockInfoThreadLocal.remove(); - } -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/MultiLockServiceImpl.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/MultiLockServiceImpl.java deleted file mode 100644 index fe4f5a90..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/MultiLockServiceImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -package cn.bootx.common.lock.service.impl; - -import cn.bootx.common.lock.entity.LockInfo; -import cn.bootx.common.lock.service.LockService; -import lombok.RequiredArgsConstructor; -import org.redisson.RedissonMultiLock; -import org.redisson.api.RLock; -import org.redisson.api.RedissonClient; -import org.springframework.context.annotation.Scope; -import org.springframework.stereotype.Service; - -import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_PROTOTYPE; - -/** - * 联锁实现类 - * - * @author xianzhi.chen@hand-china.com 2019年3月15日下午4:27:25 - */ -@Scope(SCOPE_PROTOTYPE) -@Service -@RequiredArgsConstructor -public class MultiLockServiceImpl implements LockService { - - private final RedissonClient redissonClient; - private final ThreadLocal lockInfoThreadLocal = new ThreadLocal<>(); - - @Override - public void setLockInfo(LockInfo lockInfo) { - lockInfoThreadLocal.set(lockInfo); - } - - @Override - public LockInfo getLockInfo() { - return lockInfoThreadLocal.get(); - } - - @Override - public void clearLockInfo() { - lockInfoThreadLocal.remove(); - } - - @Override - public boolean lock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - RLock[] lockList = new RLock[lockInfo.getKeyList().size()]; - for (int i = 0; i < lockInfo.getKeyList().size(); i++) { - lockList[i] = redissonClient.getLock(lockInfo.getKeyList().get(i)); - } - try { - RedissonMultiLock lock = new RedissonMultiLock(lockList); - return lock.tryLock(lockInfo.getWaitTime(), lockInfo.getLeaseTime(), lockInfo.getTimeUnit()); - } catch (Exception e) { - return false; - } - } - - @Override - public void releaseLock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - RLock[] lockList = new RLock[lockInfo.getKeyList().size()]; - for (int i = 0; i < lockInfo.getKeyList().size(); i++) { - lockList[i] = redissonClient.getLock(lockInfo.getKeyList().get(i)); - } - RedissonMultiLock lock = new RedissonMultiLock(lockList); - lock.unlock(); - lockInfoThreadLocal.remove(); - } -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/ReadLockServiceImpl.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/ReadLockServiceImpl.java deleted file mode 100644 index 3c1f4ed5..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/ReadLockServiceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -package cn.bootx.common.lock.service.impl; - -import cn.bootx.common.lock.entity.LockInfo; -import cn.bootx.common.lock.service.LockService; -import lombok.RequiredArgsConstructor; -import org.redisson.api.RReadWriteLock; -import org.redisson.api.RedissonClient; -import org.springframework.context.annotation.Scope; -import org.springframework.stereotype.Service; - -import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_PROTOTYPE; - -/** - * 读锁实现 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午7:23:12 - */ -@Scope(SCOPE_PROTOTYPE) -@Service -@RequiredArgsConstructor -public class ReadLockServiceImpl implements LockService { - - private final RedissonClient redissonClient; - - private final ThreadLocal lockInfoThreadLocal = new ThreadLocal<>(); - - @Override - public void setLockInfo(LockInfo lockInfo) { - lockInfoThreadLocal.set(lockInfo); - } - - @Override - public LockInfo getLockInfo() { - return lockInfoThreadLocal.get(); - } - - @Override - public void clearLockInfo() { - lockInfoThreadLocal.remove(); - } - - @Override - public boolean lock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - try { - RReadWriteLock rLock = redissonClient.getReadWriteLock(lockInfo.getName()); - return rLock.readLock().tryLock(lockInfo.getWaitTime(), lockInfo.getLeaseTime(), lockInfo.getTimeUnit()); - } catch (Exception e) { - return false; - } - } - - @Override - public void releaseLock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - RReadWriteLock rLock = redissonClient.getReadWriteLock(lockInfo.getName()); - if (rLock.readLock().isHeldByCurrentThread()) { - rLock.readLock().unlockAsync(); - } - lockInfoThreadLocal.remove(); - } -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/RedLockServiceImpl.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/RedLockServiceImpl.java deleted file mode 100644 index aac6a8bc..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/RedLockServiceImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -package cn.bootx.common.lock.service.impl; - -import cn.bootx.common.lock.entity.LockInfo; -import cn.bootx.common.lock.service.LockService; -import lombok.RequiredArgsConstructor; -import org.redisson.RedissonRedLock; -import org.redisson.api.RLock; -import org.redisson.api.RedissonClient; -import org.springframework.context.annotation.Scope; -import org.springframework.stereotype.Service; - -import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_PROTOTYPE; - -/** - * 红锁实现类 - * - * @author xianzhi.chen@hand-china.com 2019年3月15日下午3:33:16 - */ -@Scope(SCOPE_PROTOTYPE) -@Service -@RequiredArgsConstructor -public class RedLockServiceImpl implements LockService { - - private final RedissonClient redissonClient; - - private final ThreadLocal lockInfoThreadLocal = new ThreadLocal<>(); - - @Override - public void setLockInfo(LockInfo lockInfo) { - lockInfoThreadLocal.set(lockInfo); - } - - @Override - public LockInfo getLockInfo() { - return lockInfoThreadLocal.get(); - } - - @Override - public void clearLockInfo() { - lockInfoThreadLocal.remove(); - } - - @Override - public boolean lock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - RLock[] lockList = new RLock[lockInfo.getKeyList().size()]; - for (int i = 0; i < lockInfo.getKeyList().size(); i++) { - lockList[i] = redissonClient.getLock(lockInfo.getKeyList().get(i)); - } - try { - RedissonRedLock lock = new RedissonRedLock(lockList); - return lock.tryLock(lockInfo.getWaitTime(), lockInfo.getLeaseTime(), lockInfo.getTimeUnit()); - } catch (Exception e) { - return false; - } - } - - @Override - public void releaseLock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - RLock[] lockList = new RLock[lockInfo.getKeyList().size()]; - for (int i = 0; i < lockInfo.getKeyList().size(); i++) { - lockList[i] = redissonClient.getLock(lockInfo.getKeyList().get(i)); - } - RedissonRedLock lock = new RedissonRedLock(lockList); - lock.unlock(); - lockInfoThreadLocal.remove(); - } -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/ReentrantLockServiceImpl.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/ReentrantLockServiceImpl.java deleted file mode 100644 index 844b307e..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/ReentrantLockServiceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -package cn.bootx.common.lock.service.impl; - -import cn.bootx.common.lock.entity.LockInfo; -import cn.bootx.common.lock.service.LockService; -import lombok.RequiredArgsConstructor; -import org.redisson.api.RLock; -import org.redisson.api.RedissonClient; -import org.springframework.context.annotation.Scope; -import org.springframework.stereotype.Service; - -import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_PROTOTYPE; - -/** - * 可重入锁实现 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午4:38:51 - */ -@Scope(SCOPE_PROTOTYPE) -@Service -@RequiredArgsConstructor -public class ReentrantLockServiceImpl implements LockService { - - private final RedissonClient redissonClient; - - private final ThreadLocal lockInfoThreadLocal = new ThreadLocal<>(); - - @Override - public void setLockInfo(LockInfo lockInfo) { - lockInfoThreadLocal.set(lockInfo); - } - - @Override - public LockInfo getLockInfo() { - return lockInfoThreadLocal.get(); - } - - @Override - public void clearLockInfo() { - lockInfoThreadLocal.remove(); - } - - @Override - public boolean lock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - try { - RLock rLock = redissonClient.getLock(lockInfo.getName()); - return rLock.tryLock(lockInfo.getWaitTime(), lockInfo.getLeaseTime(), lockInfo.getTimeUnit()); - } catch (Exception e) { - return false; - } - } - - @Override - public void releaseLock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - RLock rLock = redissonClient.getLock(lockInfo.getName()); - if (rLock.isHeldByCurrentThread()) { - rLock.unlockAsync(); - } - lockInfoThreadLocal.remove(); - } -} diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/WriteLockServiceImpl.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/WriteLockServiceImpl.java deleted file mode 100644 index d27c3a6c..00000000 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/service/impl/WriteLockServiceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -package cn.bootx.common.lock.service.impl; - -import cn.bootx.common.lock.entity.LockInfo; -import cn.bootx.common.lock.service.LockService; -import lombok.RequiredArgsConstructor; -import org.redisson.api.RReadWriteLock; -import org.redisson.api.RedissonClient; -import org.springframework.context.annotation.Scope; -import org.springframework.stereotype.Service; - -import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_PROTOTYPE; - -/** - * 写锁实现 - * - * @author xianzhi.chen@hand-china.com 2019年1月14日下午4:43:17 - */ -@Scope(SCOPE_PROTOTYPE) -@Service -@RequiredArgsConstructor -public class WriteLockServiceImpl implements LockService { - - private final RedissonClient redissonClient; - - private final ThreadLocal lockInfoThreadLocal = new ThreadLocal<>(); - - @Override - public void setLockInfo(LockInfo lockInfo) { - lockInfoThreadLocal.set(lockInfo); - } - - @Override - public LockInfo getLockInfo() { - return lockInfoThreadLocal.get(); - } - - @Override - public void clearLockInfo() { - lockInfoThreadLocal.remove(); - } - - @Override - public boolean lock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - try { - RReadWriteLock rLock = redissonClient.getReadWriteLock(lockInfo.getName()); - return rLock.writeLock().tryLock(lockInfo.getWaitTime(), lockInfo.getLeaseTime(), lockInfo.getTimeUnit()); - } catch (Exception e) { - return false; - } - } - - @Override - public void releaseLock() { - LockInfo lockInfo = lockInfoThreadLocal.get(); - RReadWriteLock rLock = redissonClient.getReadWriteLock(lockInfo.getName()); - if (rLock.writeLock().isHeldByCurrentThread()) { - rLock.writeLock().unlockAsync(); - } - lockInfoThreadLocal.remove(); - } -} diff --git a/bootx-commons/common-log/src/main/java/cn/bootx/common/log/LogAutoConfiguration.java b/bootx-commons/common-log/src/main/java/cn/bootx/common/log/LogAutoConfiguration.java index 42482710..88151f87 100644 --- a/bootx-commons/common-log/src/main/java/cn/bootx/common/log/LogAutoConfiguration.java +++ b/bootx-commons/common-log/src/main/java/cn/bootx/common/log/LogAutoConfiguration.java @@ -1,12 +1,14 @@ package cn.bootx.common.log; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.context.annotation.ComponentScan; /** * 日志扫描 * @author xxm * @date 2022/6/6 */ -@AutoConfigurationPackage +@ComponentScan +@AutoConfiguration public class LogAutoConfiguration { } diff --git a/bootx-commons/common-mongo/src/main/java/cn/bootx/common/mongo/MongoCommonAutoConfiguration.java b/bootx-commons/common-mongo/src/main/java/cn/bootx/common/mongo/MongoCommonAutoConfiguration.java index 1cf17430..97ea7911 100644 --- a/bootx-commons/common-mongo/src/main/java/cn/bootx/common/mongo/MongoCommonAutoConfiguration.java +++ b/bootx-commons/common-mongo/src/main/java/cn/bootx/common/mongo/MongoCommonAutoConfiguration.java @@ -1,6 +1,6 @@ package cn.bootx.common.mongo; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.ComponentScan; /** @@ -9,6 +9,6 @@ import org.springframework.context.annotation.ComponentScan; * @date 2022/1/21 */ @ComponentScan -@AutoConfigurationPackage +@AutoConfiguration public class MongoCommonAutoConfiguration { } diff --git a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusCommonAutoConfiguration.java b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusCommonAutoConfiguration.java index d079d116..eb3a909d 100644 --- a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusCommonAutoConfiguration.java +++ b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusCommonAutoConfiguration.java @@ -1,6 +1,6 @@ package cn.bootx.common.mybatisplus; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; /** @@ -8,7 +8,7 @@ import org.springframework.boot.context.properties.ConfigurationPropertiesScan; * @author xxm * @date 2021/7/27 */ -@AutoConfigurationPackage +@AutoConfiguration @ConfigurationPropertiesScan public class MybatisPlusCommonAutoConfiguration { } diff --git a/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/RabbitMqCommonAutoConfiguration.java b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/RabbitMqCommonAutoConfiguration.java index 973a7985..ab2776e4 100644 --- a/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/RabbitMqCommonAutoConfiguration.java +++ b/bootx-commons/common-rabbitmq/src/main/java/cn/bootx/common/rabbit/RabbitMqCommonAutoConfiguration.java @@ -1,6 +1,6 @@ package cn.bootx.common.rabbit; -import org.springframework.boot.autoconfigure.AutoConfigurationPackage; +import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.context.annotation.ComponentScan; @@ -10,7 +10,7 @@ import org.springframework.context.annotation.ComponentScan; * @date 2022/5/3 */ @ComponentScan -@AutoConfigurationPackage +@AutoConfiguration @ConfigurationPropertiesScan public class RabbitMqCommonAutoConfiguration { } diff --git a/bootx-commons/common-redis-client/README.md b/bootx-commons/common-redis-client/README.md index af4cfd29..b5fd6096 100644 --- a/bootx-commons/common-redis-client/README.md +++ b/bootx-commons/common-redis-client/README.md @@ -2,6 +2,7 @@ ### 功能 1. 封装`StringRedisTemplate`提供API简单的`RedisClient`操作工具类 +2. 封装`Redisson`, 默认不启用 ### 使用 直接注入`RedisClient`对象后就可以进行使用 @@ -13,8 +14,3 @@ public class InventoryTask { private final RedisClient redisClient; } ``` - -### 对应类 - -- `RedisClient` redis请求类 -- `RedisClientAutoConfiguration` Redis自动配置类 \ No newline at end of file diff --git a/bootx-commons/common-redis-client/pom.xml b/bootx-commons/common-redis-client/pom.xml index ef846a23..031c6e21 100644 --- a/bootx-commons/common-redis-client/pom.xml +++ b/bootx-commons/common-redis-client/pom.xml @@ -18,10 +18,11 @@ org.springframework.boot spring-boot-starter-data-redis - + org.redisson redisson-spring-boot-starter + provided org.apache.commons @@ -29,4 +30,4 @@ - \ No newline at end of file + diff --git a/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonConfiguration.java b/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonConfiguration.java index 3617a80c..94b0c22c 100644 --- a/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonConfiguration.java +++ b/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonConfiguration.java @@ -8,13 +8,20 @@ import org.redisson.config.ClusterServersConfig; import org.redisson.config.Config; import org.redisson.config.SingleServerConfig; import org.springframework.boot.autoconfigure.AutoConfigureAfter; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +/** + * Redisson 自动配置 + * @author xxm + * @date 2022/12/19 + */ @Configuration +@ConditionalOnBean(name = "org.redisson.Redisson") @AutoConfigureAfter(RedisAutoConfiguration.class) @AllArgsConstructor public class RedissonConfiguration { diff --git a/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonLoadListener.java b/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonLoadListener.java index dac2e4ef..9e9b454a 100644 --- a/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonLoadListener.java +++ b/bootx-commons/common-redis-client/src/main/java/cn/bootx/common/redis/redisson/RedissonLoadListener.java @@ -10,18 +10,20 @@ import org.redisson.config.Config; import org.redisson.config.SingleServerConfig; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.data.redis.RedisProperties; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.ApplicationListener; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.stereotype.Component; -/** +/** * 项目启动时Redisson替换RedissonClient的实现, Redisson连接失败是会导致项目无法启动, 选择改为项目启动成功后, 替换掉原有的Bean - * @author xxm - * @date 2022/11/30 + * @author xxm + * @date 2022/11/30 */ @Component +@ConditionalOnBean(name = "org.redisson.Redisson") @RequiredArgsConstructor public class RedissonLoadListener implements ApplicationListener { private final ConfigurableApplicationContext configurableApplicationContext; @@ -51,8 +53,7 @@ public class RedissonLoadListener implements ApplicationListener lock5(@LockKey Integer a){ + @Lock4j(name = "test:lock",keys = "#a",acquireTimeout = 60000) + public ResResult lock5(Integer a){ log.info("开始"); + System.out.println(1); ThreadUtil.sleep(5, TimeUnit.SECONDS); log.info("结束"); return Res.ok(); @@ -49,15 +48,18 @@ public class IdempotencyDemoController { @Operation(summary = "分布式锁(暂停20秒)") @GetMapping("/lock20") - @Lock(name = "test:lock") - public ResResult lock20(@LockKey Integer a){ + @Lock4j(name = "test:lock",keys = "#a",acquireTimeout = 60000) + public ResResult lock20(Integer a){ + log.info("开始"); + System.out.println(2); ThreadUtil.sleep(20, TimeUnit.SECONDS); + log.info("结束"); return Res.ok(); } @Operation(summary = "分布式锁(不暂停)") @PostMapping("/lock0") - @Lock(name = "test:lock") + @Lock4j(name = "test:lock") public ResResult lock0(){ return Res.ok(); } diff --git a/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptUtilService.java b/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptUtilService.java index 0aa123ea..080844d2 100644 --- a/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptUtilService.java +++ b/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptUtilService.java @@ -1,13 +1,13 @@ package cn.bootx.iam.core.dept.service; import cn.bootx.common.core.exception.BizException; -import cn.bootx.common.lock.annotation.Lock; import cn.bootx.common.mybatisplus.util.MpUtil; import cn.bootx.iam.core.dept.dao.DeptManager; import cn.bootx.iam.core.dept.entity.Dept; import cn.bootx.iam.dto.dept.DeptTreeResult; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.StrUtil; +import com.baomidou.lock.annotation.Lock4j; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -27,7 +27,7 @@ public class DeptUtilService { * 生成机构代码 根机构_子机构_子子机构 * 使用分布式锁 */ - @Lock(keys = "#parentId") + @Lock4j(keys = "#parentId") public String generateOrgCode(Long parentId) { // 顶级机构 if (Objects.isNull(parentId)) { diff --git a/pom.xml b/pom.xml index d196a96f..22f25c83 100644 --- a/pom.xml +++ b/pom.xml @@ -66,6 +66,7 @@ 2.3 4.4.5.B 1.3.81 + 2.2.3 -- Gitee From 4f71c8316c0f4838b3253d1934e563eb729a12a7 Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 20 Dec 2022 00:08:08 +0800 Subject: [PATCH 11/15] =?UTF-8?q?feat=20=E5=AD=97=E5=85=B8=E5=80=BC?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=B7=A5=E5=85=B7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jackson/JacksonAutoConfiguration.java | 8 +- .../lock/LockCommonAutoConfiguration.java | 2 + .../MybatisPlusCommonAutoConfiguration.java | 2 + .../bsp/DictConvertDemoController.java | 67 ++++++++++ .../query/SuperQueryDemoController.java | 5 +- .../core/dict/service/DictConvertService.java | 124 +++++++++++++++++- ...tUtilService.java => DeptRuleService.java} | 2 +- .../iam/core/dept/service/DeptService.java | 6 +- pom.xml | 6 +- 9 files changed, 203 insertions(+), 19 deletions(-) create mode 100644 bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java rename bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/{DeptUtilService.java => DeptRuleService.java} (99%) diff --git a/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonAutoConfiguration.java b/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonAutoConfiguration.java index 2e0bda9e..1bce380e 100644 --- a/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonAutoConfiguration.java +++ b/bootx-commons/common-jackson/src/main/java/cn/bootx/common/jackson/JacksonAutoConfiguration.java @@ -3,12 +3,12 @@ package cn.bootx.common.jackson; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.ComponentScan; -/** +/** * Jackson模块 -* @author xxm -* @date 2021/12/2 +* @author xxm +* @date 2021/12/2 */ -@AutoConfiguration @ComponentScan +@AutoConfiguration public class JacksonAutoConfiguration { } diff --git a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockCommonAutoConfiguration.java b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockCommonAutoConfiguration.java index ded0c56f..b04b7da7 100644 --- a/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockCommonAutoConfiguration.java +++ b/bootx-commons/common-lock/src/main/java/cn/bootx/common/lock/LockCommonAutoConfiguration.java @@ -2,6 +2,7 @@ package cn.bootx.common.lock; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; +import org.springframework.context.annotation.ComponentScan; /** * 分布式锁 @@ -9,6 +10,7 @@ import org.springframework.boot.context.properties.ConfigurationPropertiesScan; * @date 2022/5/6 */ @AutoConfiguration +@ComponentScan @ConfigurationPropertiesScan public class LockCommonAutoConfiguration { } diff --git a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusCommonAutoConfiguration.java b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusCommonAutoConfiguration.java index eb3a909d..ebd73055 100644 --- a/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusCommonAutoConfiguration.java +++ b/bootx-commons/common-mybatis-plus/src/main/java/cn/bootx/common/mybatisplus/MybatisPlusCommonAutoConfiguration.java @@ -2,6 +2,7 @@ package cn.bootx.common.mybatisplus; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; +import org.springframework.context.annotation.ComponentScan; /** * mybatis自动配置 @@ -9,6 +10,7 @@ import org.springframework.boot.context.properties.ConfigurationPropertiesScan; * @date 2021/7/27 */ @AutoConfiguration +@ComponentScan @ConfigurationPropertiesScan public class MybatisPlusCommonAutoConfiguration { } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java new file mode 100644 index 00000000..ded3575e --- /dev/null +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java @@ -0,0 +1,67 @@ +package cn.bootx.demo.controller.bsp; + +import cn.bootx.baseapi.core.dict.service.DictConvertService; +import cn.bootx.common.core.annotation.DictConvert; +import cn.bootx.common.core.rest.Res; +import cn.bootx.common.core.rest.ResResult; +import cn.bootx.common.mybatisplus.base.MpBaseEntity; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.RequiredArgsConstructor; +import lombok.experimental.Accessors; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * + * @author xxm + * @date 2022/12/19 + */ +@Tag(name = "字典测试") +@RestController +@RequestMapping("/demo/dict") +@RequiredArgsConstructor +public class DictConvertDemoController { + private final DictConvertService dictConvertService; + + @Operation(summary = "convert") + @GetMapping("/convert") + public ResResult convert(){ + DictDemox dictDemo = new DictDemox(); + dictDemo.setSex("1"); + dictDemo.setSocialType("DingTalk"); + dictDemo.setDataScopePerm("2"); + dictConvertService.convert(dictDemo); + return Res.ok(dictDemo); + } + + @EqualsAndHashCode(callSuper = true) + @Data + @Accessors(chain = true) + public static class DictDemo extends MpBaseEntity { + + /** 性别 */ + @DictConvert(dicCode = "Sex") + private String sex; + /** 三方系统类别 */ + @DictConvert(dicCode = "SocialType") + private String socialType; + } + + + @EqualsAndHashCode(callSuper = true) + @Data + @Accessors(chain = true) + public static class DictDemox extends DictDemo { + + /** 性别 */ + @DictConvert(dicCode = "Sex") + private String sex; + /** 三方系统类别 */ + @DictConvert(dicCode = "DataScopePerm") + private String dataScopePerm; + } +} diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java index 224e2f32..1be32a4c 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java @@ -8,10 +8,10 @@ import cn.bootx.common.query.entity.QueryParams; import cn.bootx.common.query.generator.QueryGenerator; import cn.bootx.demo.core.query.entity.SuperQueryDemo; import cn.bootx.demo.core.query.service.SuperQueryDemoService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; -import lombok.val; import org.springframework.web.bind.annotation.*; import java.time.LocalDateTime; @@ -78,7 +78,8 @@ public class SuperQueryDemoController { .setVip(true) .setRegistrationTime(LocalDateTime.now()); queryDemo.setId(1122L); - val generator = QueryGenerator.generator(queryDemo); + QueryWrapper generator = QueryGenerator.generator(queryDemo); + generator = QueryGenerator.generator(queryDemo,SuperQueryDemo.class); return Res.ok(generator.getTargetSql()); } } diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java index 3e85da93..82cb7dd2 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java @@ -1,11 +1,24 @@ package cn.bootx.baseapi.core.dict.service; +import cn.bootx.baseapi.dto.dict.DictionaryItemSimpleDto; +import cn.bootx.common.core.annotation.DictConvert; +import cn.bootx.common.core.annotation.DictConvertModel; +import cn.hutool.core.annotation.AnnotationUtil; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.ClassUtil; +import cn.hutool.core.util.StrUtil; +import lombok.Getter; import lombok.RequiredArgsConstructor; +import lombok.Setter; +import lombok.experimental.Accessors; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; -import java.util.HashMap; -import java.util.Map; +import java.beans.PropertyDescriptor; +import java.lang.reflect.Field; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; /** * 字典值转换工具类 @@ -16,24 +29,123 @@ import java.util.Map; @Service @RequiredArgsConstructor public class DictConvertService { + private final DictionaryItemService dictionaryItemService; + + + /** + * 字典值字段翻译转换 + */ + public void convert(Object object){ + List dictItems = dictionaryItemService.findAllByEnable(); + this.convert(object,dictItems); + } /** * 转换 */ - public void convert(Object o){ - // 遍历字段 + private void convert(Object object, List dictItems){ + // 遍历字段, 判断是否有嵌套对象 + Map convertInfoMap = Arrays.stream(BeanUtil.getPropertyDescriptors(object.getClass())) + .map(this::initConvertInfo) + .collect(Collectors.toMap(DictConvertInfo::getName, Function.identity(), (o1, o2) -> o2)); + // 加注解的对象进行递归处理 + convertInfoMap.values().stream() + .filter(o-> Objects.nonNull(o.getDictConvertModel())) + .forEach(o->{ + Object fieldValue = BeanUtil.getFieldValue(object, o.getName()); + if (Objects.nonNull(fieldValue)){ + this.convert(fieldValue,dictItems); + } + }); - // 筛选出带注解的 + // 筛选出带翻译注解的进行字段翻译 + convertInfoMap.values().stream() + .filter(o-> Objects.nonNull(o.getDictConvert())) + .forEach(o-> this.convert(o,object,dictItems)); + } + /** + * 字典转换 + * @param convertInfo 转换所需的元信息 + * @param convertObject 要进行字典转换的对象 + * @param dictItems 字典列表 + */ + private void convert(DictConvertInfo convertInfo,Object convertObject,List dictItems){ + DictConvert dictConvert = convertInfo.getDictConvert(); + // 直接在当前字段上进行转换 + if (StrUtil.isAllBlank(dictConvert.source(),dictConvert.target())){ + Object fieldValue = BeanUtil.getFieldValue(convertObject, convertInfo.getName()); + if (!StrUtil.isBlankIfStr(fieldValue)){ + String dictValue = this.getDictValue(dictConvert.dicCode(), fieldValue.toString(), dictItems); + BeanUtil.setFieldValue(convertObject,convertInfo.getName(), dictValue); + } + } + // 通过配置的源字段进行转换并赋值到当前字段 + if (StrUtil.isNotBlank(dictConvert.source())){ + Object fieldValue = BeanUtil.getFieldValue(convertObject, dictConvert.source()); + if (!StrUtil.isBlankIfStr(fieldValue)){ + String dictValue = this.getDictValue(dictConvert.dicCode(), fieldValue.toString(), dictItems); + BeanUtil.setFieldValue(convertObject,convertInfo.getName(), dictValue); + } + } + // 将当前字段转换到其他字段上 + if (StrUtil.isNotBlank(dictConvert.target())){ + Object fieldValue = BeanUtil.getFieldValue(convertObject, convertInfo.getName()); + if (!StrUtil.isBlankIfStr(fieldValue)){ + String dictValue = this.getDictValue(dictConvert.dicCode(), fieldValue.toString(), dictItems); + BeanUtil.setFieldValue(convertObject,dictConvert.target(), dictValue); + } + } + } + /** + * 初始化转换字段元信息 + */ + private DictConvertInfo initConvertInfo(PropertyDescriptor descriptor){ + Field field = ClassUtil.getDeclaredField(descriptor.getReadMethod().getDeclaringClass(), descriptor.getName()); + DictConvert dictConvert = AnnotationUtil.getAnnotation(field, DictConvert.class); + DictConvertModel dictConvertModel = AnnotationUtil.getAnnotation(field, DictConvertModel.class); + + return new DictConvertInfo() + .setName(descriptor.getName()) + .setField(field) + .setDictConvert(dictConvert) + .setDictConvertModel(dictConvertModel); } /** - * + * 获取字典值 + */ + private String getDictValue(String dictCode, String dictItemCode, List dictItems){ + return dictItems.stream() + .filter(o->Objects.equals(o.getDictCode(),dictCode) && Objects.equals(o.getCode(),dictItemCode)) + .findFirst() + .map(DictionaryItemSimpleDto::getName) + .orElse(null); + } + + /** + * 转换成map */ public Map convertToMap(Object o){ return new HashMap<>(); } + /** + * 字典转换信息 + */ + @Getter + @Setter + @Accessors(chain = true) + private static class DictConvertInfo{ + // 字段名 + private String name; + // 所属字段属性 + private Field field; + // 翻译注解 + private DictConvert dictConvert; + // 嵌套翻译注解 + private DictConvertModel dictConvertModel; + } } diff --git a/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptUtilService.java b/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptRuleService.java similarity index 99% rename from bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptUtilService.java rename to bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptRuleService.java index 080844d2..0baee797 100644 --- a/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptUtilService.java +++ b/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptRuleService.java @@ -20,7 +20,7 @@ import java.util.*; */ @Service @RequiredArgsConstructor -public class DeptUtilService { +public class DeptRuleService { private final DeptManager deptManager; /** diff --git a/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptService.java b/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptService.java index 38e6b6ff..0f315fd9 100644 --- a/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptService.java +++ b/bootx-services/service-iam/src/main/java/cn/bootx/iam/core/dept/service/DeptService.java @@ -33,7 +33,7 @@ import static cn.bootx.iam.code.CachingCode.USER_DATA_SCOPE; @AllArgsConstructor public class DeptService { private final DeptManager deptManager; - private final DeptUtilService deptUtilService; + private final DeptRuleService deptRuleService; private final ApplicationEventPublisher eventPublisher; /** @@ -47,7 +47,7 @@ public class DeptService { Long parentId = param.getParentId(); // 部门code生成 - dept.setOrgCode(deptUtilService.generateOrgCode(parentId)); + dept.setOrgCode(deptRuleService.generateOrgCode(parentId)); return deptManager.save(dept).toDto(); } @@ -57,7 +57,7 @@ public class DeptService { */ public List tree() { List list = deptManager.findAll(); - return deptUtilService.buildTreeList(list); + return deptRuleService.buildTreeList(list); } /** diff --git a/pom.xml b/pom.xml index 22f25c83..9faba59b 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ 1.1.8 5.8.10 - 6.3.2 + 6.4.0 2.12.3 3.11 4.4 @@ -64,7 +64,7 @@ 1.5.3.Final 0.2.0 2.3 - 4.4.5.B + 4.4.6.B 1.3.81 2.2.3 @@ -389,4 +389,4 @@ - \ No newline at end of file + -- Gitee From b79bc35187709a6a94ec73a60411ad053c2800a1 Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 20 Dec 2022 00:12:59 +0800 Subject: [PATCH 12/15] =?UTF-8?q?feat=20=E5=AD=97=E5=85=B8=E5=80=BC?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=B7=A5=E5=85=B7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/dict/service/DictConvertService.java | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java index 82cb7dd2..d97b808b 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java @@ -40,23 +40,35 @@ public class DictConvertService { this.convert(object,dictItems); } + /** + * 字典值字段翻译转换 + */ + public void convert(Iterable objects){ + List dictItems = dictionaryItemService.findAllByEnable(); + objects.forEach(object -> this.convert(object,dictItems)); + } + /** * 转换 */ private void convert(Object object, List dictItems){ + if (Objects.isNull(object)){ + return; + } + // 遍历字段, 判断是否有嵌套对象 Map convertInfoMap = Arrays.stream(BeanUtil.getPropertyDescriptors(object.getClass())) .map(this::initConvertInfo) .collect(Collectors.toMap(DictConvertInfo::getName, Function.identity(), (o1, o2) -> o2)); - // 加注解的对象进行递归处理 + // 加注解的嵌套对象进行递归处理 convertInfoMap.values().stream() .filter(o-> Objects.nonNull(o.getDictConvertModel())) - .forEach(o->{ - Object fieldValue = BeanUtil.getFieldValue(object, o.getName()); - if (Objects.nonNull(fieldValue)){ - this.convert(fieldValue,dictItems); - } - }); + .forEach(o->{ + Object fieldValue = BeanUtil.getFieldValue(object, o.getName()); + if (Objects.nonNull(fieldValue)){ + this.convert(fieldValue,dictItems); + } + }); // 筛选出带翻译注解的进行字段翻译 convertInfoMap.values().stream() -- Gitee From 9951d3e34d8eecc1fe13f711643064a3832e9086 Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 20 Dec 2022 23:07:42 +0800 Subject: [PATCH 13/15] =?UTF-8?q?feat=20=E5=AD=97=E5=85=B8=E5=80=BC?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=88=87=E9=9D=A2=E5=92=8C=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=B3=9B=E5=9E=8B=E7=B1=BB=E5=9E=8B=E5=A4=84=E7=90=86,=20knife?= =?UTF-8?q?4j=E5=8D=87=E7=BA=A74.0=E5=87=86=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bootx-common-core/README.md | 8 --- .../{DictConvert.java => Dict.java} | 2 +- .../core/annotation/DictConvertModel.java | 20 ------ .../core/annotation/DictTranslation.java | 42 +++++++++++ bootx-commons/common-swagger/pom.xml | 8 ++- .../bsp/DictConvertDemoController.java | 41 ++++++++--- bootx-services/pom.xml | 15 +--- ...rvice.java => DictTranslationService.java} | 69 +++++++++++-------- .../handler/dict/DictAnnotationAdvisor.java | 42 +++++++++++ .../baseapi/handler/dict/DictInterceptor.java | 53 ++++++++++++++ .../handler/dict/DictTranslationHandler.java | 28 ++++++++ .../ResultObjectDictTranslationHandler.java | 53 ++++++++++++++ .../ResultPageDictTranslationHandler.java | 63 +++++++++++++++++ .../ResultPageIterableTranslationHandler.java | 57 +++++++++++++++ .../handler/{ => mp}/MpMetaObjectHandler.java | 2 +- pom.xml | 6 ++ 16 files changed, 427 insertions(+), 82 deletions(-) rename bootx-common-core/src/main/java/cn/bootx/common/core/annotation/{DictConvert.java => Dict.java} (94%) delete mode 100644 bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvertModel.java create mode 100644 bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictTranslation.java rename bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/{DictConvertService.java => DictTranslationService.java} (65%) create mode 100644 bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictAnnotationAdvisor.java create mode 100644 bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictInterceptor.java create mode 100644 bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictTranslationHandler.java create mode 100644 bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultObjectDictTranslationHandler.java create mode 100644 bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultPageDictTranslationHandler.java create mode 100644 bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultPageIterableTranslationHandler.java rename bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/{ => mp}/MpMetaObjectHandler.java (97%) diff --git a/bootx-common-core/README.md b/bootx-common-core/README.md index fa79a809..0da22de4 100644 --- a/bootx-common-core/README.md +++ b/bootx-common-core/README.md @@ -5,17 +5,9 @@ - `CountTime` 获取程序执行时间, - `EncryptionField` 数据库加密字段注解,详细使用见`common-starter-data-perm` 模块 - `Idempotent` 幂等性拦截注解,用于拦截前端重复提交的请求,详细见`common-idempotency`模块 - - `enable` 是否开启幂等控制 - - `timeout` 超时时间配置,单位为毫秒,默认为10秒 - `IgnoreAuth` 忽略鉴权注解,可以加在`Controller`的方法或类上,访问时不在进行鉴权,加在非`Controller`的地方无效,见 `common-starter-auth` 模块 - `Permission` 权限控制注解,可以添加到方法和类上,添加后所执行的SQL会进行数据权限相关的控制,见`common-starter-data-perm`模块 - - `dataPermScope` 启用数据范围权限控制 - - `selectField` 启用查询字段权限控制 - `OperateLog` 操作日志记录注解,`AOP`处理类自动拦截,记录对应的操作行为,见 `common-starter-audit-log`模块 - - `title`:模块名称 - - `businessType`:业务操作类型,默认为OTHER - - `saveParam`:是否保存参数值,默认不保存 - - `saverReturn`:是否保存返回结果,默认不保存 ## 常量枚举类 - `CommonCode` 公共常量 - `WebHeaderConst` web常量 diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvert.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/Dict.java similarity index 94% rename from bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvert.java rename to bootx-common-core/src/main/java/cn/bootx/common/core/annotation/Dict.java index d40c20ba..f3b09150 100644 --- a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvert.java +++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/Dict.java @@ -12,7 +12,7 @@ import java.lang.annotation.Target; */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) -public @interface DictConvert { +public @interface Dict { /** * 字典编码 diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvertModel.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvertModel.java deleted file mode 100644 index 5d96331a..00000000 --- a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictConvertModel.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.bootx.common.core.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * 字典转换标示注解, 标注此注解会对对应对象进行字典值转换处理 - * @author xxm - * @date 2022/12/15 - */ -@Target({ElementType.METHOD,ElementType.TYPE,ElementType.FIELD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface DictConvertModel { - /** - * 是否启用 - */ - boolean enable() default true; -} diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictTranslation.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictTranslation.java new file mode 100644 index 00000000..e7ed2372 --- /dev/null +++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictTranslation.java @@ -0,0 +1,42 @@ +package cn.bootx.common.core.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 字典翻译标识注解, + * 1. 标注在字段上, 在翻译的时候会对这个字段进行递归翻译 + * 2. 标注在方法上, 会对返回值进行翻译转换处理, 推荐只在 Controller 层配合 ResResult 使用, 其他场合使用 DictConvertService 进行手动处理 + * @author xxm + * @date 2022/12/15 + */ +@Target({ElementType.METHOD,ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface DictTranslation { + + /** + * 是否启用 + */ + boolean enable() default true; + + /** + * 翻译类型, 只可以用在方法返回类中, 在字段上标注不发生效果 + */ + ConvertType convertType() default ConvertType.OBJECT; + + /** + * 翻译类型 + */ + enum ConvertType{ + /** + * 将目标对象转换成MAP, 限定只能使用在类似 ResResult 容器情况下, 可以处理字典项code与name类型不一致问题, 但会导致字段元信息的丢失, 导致后续的处理出问题 + */ + MAP, + /** + * 不对目标对象的类型进行修改, 只对字典值进行翻译, 但遇到注解标注的字段出现字典项code与name类型不一致, 会抛出异常 + */ + OBJECT + } +} diff --git a/bootx-commons/common-swagger/pom.xml b/bootx-commons/common-swagger/pom.xml index 5b174b0f..397d2c2a 100644 --- a/bootx-commons/common-swagger/pom.xml +++ b/bootx-commons/common-swagger/pom.xml @@ -28,6 +28,12 @@ + + + + + + - \ No newline at end of file + diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java index ded3575e..add60afe 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java @@ -1,7 +1,8 @@ package cn.bootx.demo.controller.bsp; -import cn.bootx.baseapi.core.dict.service.DictConvertService; -import cn.bootx.common.core.annotation.DictConvert; +import cn.bootx.baseapi.core.dict.service.DictTranslationService; +import cn.bootx.common.core.annotation.Dict; +import cn.bootx.common.core.annotation.DictTranslation; import cn.bootx.common.core.rest.Res; import cn.bootx.common.core.rest.ResResult; import cn.bootx.common.mybatisplus.base.MpBaseEntity; @@ -15,6 +16,9 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.ArrayList; +import java.util.List; + /** * * @author xxm @@ -25,29 +29,46 @@ import org.springframework.web.bind.annotation.RestController; @RequestMapping("/demo/dict") @RequiredArgsConstructor public class DictConvertDemoController { - private final DictConvertService dictConvertService; + private final DictTranslationService dictTranslationService; - @Operation(summary = "convert") + @Operation(summary = "转换测试") @GetMapping("/convert") + @DictTranslation public ResResult convert(){ DictDemox dictDemo = new DictDemox(); dictDemo.setSex("1"); dictDemo.setSocialType("DingTalk"); dictDemo.setDataScopePerm("2"); - dictConvertService.convert(dictDemo); + +// dictTranslationService.translation(dictDemo); +// dictTranslationService.translation(x); return Res.ok(dictDemo); } + @Operation(summary = "c2") + @GetMapping("/c2") + @DictTranslation + public String c2(){ + return "123"; + } + + @Operation(summary = "c4") + @GetMapping("/c4") + @DictTranslation + public ResResult> c4(){ + return Res.ok(new ArrayList<>()); + } + @EqualsAndHashCode(callSuper = true) @Data @Accessors(chain = true) public static class DictDemo extends MpBaseEntity { /** 性别 */ - @DictConvert(dicCode = "Sex") + @Dict(dicCode = "Sex") private String sex; /** 三方系统类别 */ - @DictConvert(dicCode = "SocialType") + @Dict(dicCode = "SocialType") private String socialType; } @@ -58,10 +79,12 @@ public class DictConvertDemoController { public static class DictDemox extends DictDemo { /** 性别 */ - @DictConvert(dicCode = "Sex") + @Dict(dicCode = "Sex") private String sex; /** 三方系统类别 */ - @DictConvert(dicCode = "DataScopePerm") + @Dict(dicCode = "DataScopePerm") private String dataScopePerm; + + private Integer age; } } diff --git a/bootx-services/pom.xml b/bootx-services/pom.xml index 90d4d449..34d6bbb1 100644 --- a/bootx-services/pom.xml +++ b/bootx-services/pom.xml @@ -25,15 +25,6 @@ - - 3.0.3 - 1.6.2 - 7.2 - 1.2.83_noneautotype - 0.41 - V1.4-SNAPSHOT - - @@ -120,10 +111,10 @@ ${fastjson.version} - + com.github.xiaoymin - knife4j-springdoc-ui + knife4j-openapi3-ui ${knife4j.version} @@ -249,4 +240,4 @@ - \ No newline at end of file + diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictTranslationService.java similarity index 65% rename from bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java rename to bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictTranslationService.java index d97b808b..3ab84c78 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictConvertService.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictTranslationService.java @@ -1,8 +1,8 @@ package cn.bootx.baseapi.core.dict.service; import cn.bootx.baseapi.dto.dict.DictionaryItemSimpleDto; -import cn.bootx.common.core.annotation.DictConvert; -import cn.bootx.common.core.annotation.DictConvertModel; +import cn.bootx.common.core.annotation.Dict; +import cn.bootx.common.core.annotation.DictTranslation; import cn.hutool.core.annotation.AnnotationUtil; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.ClassUtil; @@ -28,30 +28,30 @@ import java.util.stream.Collectors; @Slf4j @Service @RequiredArgsConstructor -public class DictConvertService { +public class DictTranslationService { private final DictionaryItemService dictionaryItemService; /** * 字典值字段翻译转换 */ - public void convert(Object object){ + public void translation(Object object){ List dictItems = dictionaryItemService.findAllByEnable(); - this.convert(object,dictItems); + this.translation(object,dictItems); } /** * 字典值字段翻译转换 */ - public void convert(Iterable objects){ + public void translation(Iterable objects){ List dictItems = dictionaryItemService.findAllByEnable(); - objects.forEach(object -> this.convert(object,dictItems)); + objects.forEach(object -> this.translation(object,dictItems)); } /** * 转换 */ - private void convert(Object object, List dictItems){ + private void translation(Object object, List dictItems){ if (Objects.isNull(object)){ return; } @@ -62,18 +62,18 @@ public class DictConvertService { .collect(Collectors.toMap(DictConvertInfo::getName, Function.identity(), (o1, o2) -> o2)); // 加注解的嵌套对象进行递归处理 convertInfoMap.values().stream() - .filter(o-> Objects.nonNull(o.getDictConvertModel())) + .filter(o-> Objects.nonNull(o.getDictTranslation())) .forEach(o->{ Object fieldValue = BeanUtil.getFieldValue(object, o.getName()); if (Objects.nonNull(fieldValue)){ - this.convert(fieldValue,dictItems); + this.translation(fieldValue,dictItems); } }); // 筛选出带翻译注解的进行字段翻译 convertInfoMap.values().stream() - .filter(o-> Objects.nonNull(o.getDictConvert())) - .forEach(o-> this.convert(o,object,dictItems)); + .filter(o-> Objects.nonNull(o.getDict())) + .forEach(o-> this.translation(o,object,dictItems)); } /** @@ -82,30 +82,30 @@ public class DictConvertService { * @param convertObject 要进行字典转换的对象 * @param dictItems 字典列表 */ - private void convert(DictConvertInfo convertInfo,Object convertObject,List dictItems){ - DictConvert dictConvert = convertInfo.getDictConvert(); + private void translation(DictConvertInfo convertInfo, Object convertObject, List dictItems){ + Dict dict = convertInfo.getDict(); // 直接在当前字段上进行转换 - if (StrUtil.isAllBlank(dictConvert.source(),dictConvert.target())){ + if (StrUtil.isAllBlank(dict.source(), dict.target())){ Object fieldValue = BeanUtil.getFieldValue(convertObject, convertInfo.getName()); if (!StrUtil.isBlankIfStr(fieldValue)){ - String dictValue = this.getDictValue(dictConvert.dicCode(), fieldValue.toString(), dictItems); + String dictValue = this.getDictValue(dict.dicCode(), fieldValue.toString(), dictItems); BeanUtil.setFieldValue(convertObject,convertInfo.getName(), dictValue); } } // 通过配置的源字段进行转换并赋值到当前字段 - if (StrUtil.isNotBlank(dictConvert.source())){ - Object fieldValue = BeanUtil.getFieldValue(convertObject, dictConvert.source()); + if (StrUtil.isNotBlank(dict.source())){ + Object fieldValue = BeanUtil.getFieldValue(convertObject, dict.source()); if (!StrUtil.isBlankIfStr(fieldValue)){ - String dictValue = this.getDictValue(dictConvert.dicCode(), fieldValue.toString(), dictItems); + String dictValue = this.getDictValue(dict.dicCode(), fieldValue.toString(), dictItems); BeanUtil.setFieldValue(convertObject,convertInfo.getName(), dictValue); } } // 将当前字段转换到其他字段上 - if (StrUtil.isNotBlank(dictConvert.target())){ + if (StrUtil.isNotBlank(dict.target())){ Object fieldValue = BeanUtil.getFieldValue(convertObject, convertInfo.getName()); if (!StrUtil.isBlankIfStr(fieldValue)){ - String dictValue = this.getDictValue(dictConvert.dicCode(), fieldValue.toString(), dictItems); - BeanUtil.setFieldValue(convertObject,dictConvert.target(), dictValue); + String dictValue = this.getDictValue(dict.dicCode(), fieldValue.toString(), dictItems); + BeanUtil.setFieldValue(convertObject, dict.target(), dictValue); } } } @@ -115,14 +115,14 @@ public class DictConvertService { */ private DictConvertInfo initConvertInfo(PropertyDescriptor descriptor){ Field field = ClassUtil.getDeclaredField(descriptor.getReadMethod().getDeclaringClass(), descriptor.getName()); - DictConvert dictConvert = AnnotationUtil.getAnnotation(field, DictConvert.class); - DictConvertModel dictConvertModel = AnnotationUtil.getAnnotation(field, DictConvertModel.class); + Dict dict = AnnotationUtil.getAnnotation(field, Dict.class); + DictTranslation dictTranslation = AnnotationUtil.getAnnotation(field, DictTranslation.class); return new DictConvertInfo() .setName(descriptor.getName()) .setField(field) - .setDictConvert(dictConvert) - .setDictConvertModel(dictConvertModel); + .setDict(dict) + .setDictTranslation(dictTranslation); } /** @@ -139,11 +139,20 @@ public class DictConvertService { /** * 转换成map */ - public Map convertToMap(Object o){ - + public Map translationToMap(Object o){ + List dictItems = dictionaryItemService.findAllByEnable(); return new HashMap<>(); } + /** + * 转换成map + */ + public Iterable> translationToMap(Iterable objects){ + List dictItems = dictionaryItemService.findAllByEnable(); + + return new ArrayList<>(); + } + /** * 字典转换信息 */ @@ -156,8 +165,8 @@ public class DictConvertService { // 所属字段属性 private Field field; // 翻译注解 - private DictConvert dictConvert; + private Dict dict; // 嵌套翻译注解 - private DictConvertModel dictConvertModel; + private DictTranslation dictTranslation; } } diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictAnnotationAdvisor.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictAnnotationAdvisor.java new file mode 100644 index 00000000..2cb9a235 --- /dev/null +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictAnnotationAdvisor.java @@ -0,0 +1,42 @@ +package cn.bootx.baseapi.handler.dict; + +import cn.bootx.common.core.annotation.DictTranslation; +import lombok.RequiredArgsConstructor; +import org.aopalliance.aop.Advice; +import org.springframework.aop.Pointcut; +import org.springframework.aop.support.AbstractPointcutAdvisor; +import org.springframework.aop.support.annotation.AnnotationMatchingPointcut; +import org.springframework.stereotype.Component; + +/** + * 抽象切入点 + * @author xxm + * @date 2022/12/20 + */ +@Component +@RequiredArgsConstructor +public class DictAnnotationAdvisor extends AbstractPointcutAdvisor { + + private final DictInterceptor dictInterceptor; + + private final Pointcut pointcut = AnnotationMatchingPointcut.forMethodAnnotation(DictTranslation.class); + + /** + * 切入点 + * @return + */ + @Override + public Pointcut getPointcut() { + return pointcut; + } + + /** + * 切点处理适配器 + * @return + */ + @Override + public Advice getAdvice() { + return dictInterceptor; + } + +} diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictInterceptor.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictInterceptor.java new file mode 100644 index 00000000..28eefc5d --- /dev/null +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictInterceptor.java @@ -0,0 +1,53 @@ +package cn.bootx.baseapi.handler.dict; + +import cn.bootx.common.core.annotation.DictTranslation; +import cn.hutool.core.util.TypeUtil; +import lombok.RequiredArgsConstructor; +import org.aopalliance.intercept.MethodInterceptor; +import org.aopalliance.intercept.MethodInvocation; +import org.springframework.aop.framework.AopProxyUtils; +import org.springframework.stereotype.Component; + +import javax.annotation.Nullable; +import javax.validation.constraints.NotNull; +import java.lang.reflect.Type; +import java.util.List; +import java.util.Objects; + +/** + * 字典翻译切点 + * @author xxm + * @date 2022/12/20 + */ +@Component +@RequiredArgsConstructor +public class DictInterceptor implements MethodInterceptor { + + private final List dictTranslationHandlers; + + @Nullable + @Override + public Object invoke(@NotNull MethodInvocation invocation) throws Throwable { + // 使用其他aop组件时,aop切了两次. + Class cls = AopProxyUtils.ultimateTargetClass(invocation.getThis()); + if (!cls.equals(invocation.getThis().getClass())) { + return invocation.proceed(); + } + DictTranslation dictTranslation = invocation.getMethod().getAnnotation(DictTranslation.class); + Object proceed = invocation.proceed(); + // 返回值为空和未开启字典翻译直接结束 + if (Objects.isNull(proceed)||!dictTranslation.enable()){ + return null; + } + // 获取返回类型, 基础类型Type为class, 泛型类型为 ParameterizedType + Type returnType = TypeUtil.getReturnType(invocation.getMethod()); + for (DictTranslationHandler dictTranslationHandler : dictTranslationHandlers) { + if (dictTranslationHandler.adaptation(returnType)){ + dictTranslationHandler.translation(proceed,returnType,dictTranslation); + } + } + return proceed; + } + + +} diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictTranslationHandler.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictTranslationHandler.java new file mode 100644 index 00000000..7eaf1935 --- /dev/null +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictTranslationHandler.java @@ -0,0 +1,28 @@ +package cn.bootx.baseapi.handler.dict; + +import cn.bootx.common.core.annotation.DictTranslation; + +import java.lang.reflect.Type; + +/** + * 字典值翻译接口 + * @author xxm + * @date 2022/12/20 + */ +public interface DictTranslationHandler { + + /** + * 匹配 + */ + /** + * openId类型是否匹配 + */ + boolean adaptation(Type type); + + /** + * 翻译 + */ + void translation(Object object, Type type, DictTranslation dictTranslation); + + +} diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultObjectDictTranslationHandler.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultObjectDictTranslationHandler.java new file mode 100644 index 00000000..c0f25095 --- /dev/null +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultObjectDictTranslationHandler.java @@ -0,0 +1,53 @@ +package cn.bootx.baseapi.handler.dict; + +import cn.bootx.baseapi.core.dict.service.DictTranslationService; +import cn.bootx.common.core.annotation.DictTranslation; +import cn.bootx.common.core.rest.ResResult; +import cn.hutool.core.util.ClassUtil; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Component; + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.Map; + +/** + * ResResult返回类的处理, 泛型 T 不为泛型类 + * @author xxm + * @date 2022/12/20 + */ +@Component +@RequiredArgsConstructor +public class ResultObjectDictTranslationHandler implements DictTranslationHandler{ + private final DictTranslationService dictTranslationService; + + /** + * ResResult类型, 原始包装的普通类型 + */ + @Override + public boolean adaptation(Type type) { + // 是否是泛型类型 + if (type instanceof ParameterizedType){ + ParameterizedType parameterizedType = (ParameterizedType) type; + // 是否是ResResult类型, 并且Class类型是非泛型(ParameterizedType) + Type rawType = parameterizedType.getRawType(); + if (rawType instanceof Class && ClassUtil.isAssignable((Class) rawType,ResResult.class)){ + return true; + } + } + return false; + } + + @SuppressWarnings("unchecked") + @Override + public void translation(Object object, Type type, DictTranslation dictTranslation) { + ResResult resResult = (ResResult) object; + Object data = resResult.getData(); + if (dictTranslation.convertType()== DictTranslation.ConvertType.OBJECT){ + dictTranslationService.translation(data); + } else { + Map stringObjectMap = dictTranslationService.translationToMap(data); + ((ResResult>)resResult).setData(stringObjectMap); + } + } +} diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultPageDictTranslationHandler.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultPageDictTranslationHandler.java new file mode 100644 index 00000000..31f5daaf --- /dev/null +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultPageDictTranslationHandler.java @@ -0,0 +1,63 @@ +package cn.bootx.baseapi.handler.dict; + +import cn.bootx.baseapi.core.dict.service.DictTranslationService; +import cn.bootx.common.core.annotation.DictTranslation; +import cn.bootx.common.core.rest.ResResult; +import cn.bootx.common.core.util.CollUtil; +import cn.hutool.core.util.ClassUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Component; + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.List; +import java.util.Map; + +/** + * ResResult返回类的处理, 泛型 T 为分页类 + * @author xxm + * @date 2022/12/20 + */ +@Component +@RequiredArgsConstructor +public class ResultPageDictTranslationHandler implements DictTranslationHandler{ + private final DictTranslationService dictTranslationService; + + /** + * ResResult类型, T 为分页类 + */ + @Override + public boolean adaptation(Type type) { + // 是否是泛型类型 + if (type instanceof ParameterizedType){ + ParameterizedType parameterizedType = (ParameterizedType) type; + // 是否是ResResult类型, 并且是泛型(ParameterizedType) + Type rawType = parameterizedType.getRawType(); + if (rawType instanceof ParameterizedType ){ + // 看类型是否为分页 + Type actualType = ((ParameterizedType) rawType).getActualTypeArguments()[0]; + if (actualType instanceof Class && ClassUtil.isAssignable((Class) actualType, IPage.class)) { + return true; + } + } + } + return false; + } + + @SuppressWarnings("unchecked") + @Override + public void translation(Object object, Type type, DictTranslation dictTranslation) { + ResResult> resResult = (ResResult>) object; + IPage page = resResult.getData(); + if (dictTranslation.convertType()== DictTranslation.ConvertType.OBJECT){ + List records = page.getRecords(); + dictTranslationService.translation(records); + } else { + List records = page.getRecords(); + Iterable> maps = dictTranslationService.translationToMap(records); + List> list = CollUtil.newArrayList(maps); + ((IPage>)page).setRecords(list); + } + } +} diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultPageIterableTranslationHandler.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultPageIterableTranslationHandler.java new file mode 100644 index 00000000..9cbb6f64 --- /dev/null +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/ResultPageIterableTranslationHandler.java @@ -0,0 +1,57 @@ +package cn.bootx.baseapi.handler.dict; + +import cn.bootx.baseapi.core.dict.service.DictTranslationService; +import cn.bootx.common.core.annotation.DictTranslation; +import cn.bootx.common.core.rest.ResResult; +import cn.hutool.core.util.ClassUtil; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Component; + +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.Map; + +/** + * ResResult返回类的处理, 泛型 T 为 Iterable 的实现, 比如 List + * @author xxm + * @date 2022/12/20 + */ +@Component +@RequiredArgsConstructor +public class ResultPageIterableTranslationHandler implements DictTranslationHandler{ + private final DictTranslationService dictTranslationService; + + /** + * ResResult类型, 泛型 T 为 Iterable 的实现, 比如 List + */ + @Override + public boolean adaptation(Type type) { + // 是否是泛型类型 + if (type instanceof ParameterizedType){ + ParameterizedType parameterizedType = (ParameterizedType) type; + // 是否是ResResult类型, 并且是泛型(ParameterizedType) + Type rawType = parameterizedType.getRawType(); + if (rawType instanceof ParameterizedType ){ + // 看类型是否为分页 + Type actualType = ((ParameterizedType) rawType).getActualTypeArguments()[0]; + if (actualType instanceof Class && ClassUtil.isAssignable((Class) actualType, Iterable.class)) { + return true; + } + } + } + return false; + } + + @SuppressWarnings("unchecked") + @Override + public void translation(Object object, Type type, DictTranslation dictTranslation) { + ResResult> resResult = (ResResult>) object; + Iterable iterable = resResult.getData(); + if (dictTranslation.convertType()== DictTranslation.ConvertType.OBJECT){ + dictTranslationService.translation(iterable); + } else { + Iterable> maps = dictTranslationService.translationToMap(iterable); + resResult.setData(maps); + } + } +} diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/MpMetaObjectHandler.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/mp/MpMetaObjectHandler.java similarity index 97% rename from bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/MpMetaObjectHandler.java rename to bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/mp/MpMetaObjectHandler.java index 3962bb7e..a7217291 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/MpMetaObjectHandler.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/mp/MpMetaObjectHandler.java @@ -1,4 +1,4 @@ -package cn.bootx.baseapi.handler; +package cn.bootx.baseapi.handler.mp; import cn.bootx.common.core.code.CommonCode; import cn.bootx.common.core.entity.UserDetail; diff --git a/pom.xml b/pom.xml index 9faba59b..2ac368aa 100644 --- a/pom.xml +++ b/pom.xml @@ -61,8 +61,14 @@ 3.5.2 1.6.13 3.18.0 + 4.0.0 1.5.3.Final 0.2.0 + 1.6.2 + 7.2 + 1.2.83_noneautotype + 0.41 + V1.4-SNAPSHOT 2.3 4.4.6.B 1.3.81 -- Gitee From a8c518185cac5a4e0f1c6479528530900b8c5c09 Mon Sep 17 00:00:00 2001 From: xxm Date: Wed, 21 Dec 2022 21:44:53 +0800 Subject: [PATCH 14/15] =?UTF-8?q?feat=20=E5=AD=97=E5=85=B8=E5=80=BC?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=BA=E5=AF=B9=E8=B1=A1=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=92=8CMap=E7=B1=BB=E5=9E=8B=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .springjavaformatconfig | 4 + .../core/annotation/DictTranslation.java | 2 +- .../common/swagger/SwaggerProperties.java | 28 ++++++ .../filter/SwaggerBasicAuthFilter.java | 17 ++++ .../java/cn/bootx/demo/DemoApplication.java | 10 +- .../bootx/demo/controller/TestController.java | 32 +++---- .../bsp/DictConvertDemoController.java | 59 ++++++++---- .../data/DataEncryptDemoController.java | 29 +++--- .../data/DataPermDemoController.java | 30 +++--- .../data/DataSensitiveDemoController.java | 22 +++-- .../lock/IdempotencyDemoController.java | 25 ++--- .../mq/MessageQueueDemoController.java | 45 +++++---- .../notice/EmailSendDemoController.java | 17 ++-- .../query/SuperQueryDemoController.java | 47 +++++---- .../ws/GlobalWebsocketDemoController.java | 14 +-- .../encrypt/dao/DataEncryptDemoManager.java | 8 +- .../encrypt/dao/DataEncryptDemoMapper.java | 11 +-- .../core/encrypt/entity/DataEncryptDemo.java | 4 +- .../service/DataEncryptDemoService.java | 21 ++-- .../core/mq/mqtt/DemoMqttConfiguration.java | 68 ++++++------- .../core/mq/mqtt/DemoMqttMessageListener.java | 34 +++---- .../mq/rabbit/DemoRabbitMqConfiguration.java | 18 ++-- .../rabbit/DemoRabbitMqMessageListener.java | 5 +- .../mq/redis/DemoRedisExpiredListener.java | 14 +-- .../mq/redis/DemoRedisStreamListener.java | 13 ++- .../core/mq/redis/DemoRedisTopicListener.java | 14 +-- .../entity/SendSimpleEmailDemoParam.java | 14 +-- .../notice/service/EmailSendDemoService.java | 15 +-- .../core/perm/dao/DataPermDemoManager.java | 19 ++-- .../core/perm/dao/DataPermDemoMapper.java | 12 ++- .../demo/core/perm/entity/DataPermDemo.java | 10 +- .../perm/service/DataPermDemoService.java | 15 +-- .../core/query/dao/SuperQueryDemoManager.java | 22 ++--- .../core/query/dao/SuperQueryDemoMapper.java | 12 ++- .../core/query/entity/SuperQueryDemo.java | 11 ++- .../query/service/SuperQueryDemoService.java | 33 ++++--- .../dao/DataSensitiveDemoManager.java | 10 +- .../dao/DataSensitiveDemoMapper.java | 10 +- .../sensitive/entity/DataSensitiveDemo.java | 10 +- .../service/DataSensitiveDemoService.java | 15 +-- .../java/cn/bootx/demo/ws/WebSocketDemo.java | 18 ++-- .../dict/service/DictTranslationService.java | 96 ++++++++++++++++--- .../handler/dict/DictAnnotationAdvisor.java | 2 +- .../baseapi/handler/dict/DictInterceptor.java | 3 + .../java/cn/bootx/start/BootxApplication.java | 24 ++--- .../src/main/resources/application-dev.yml | 3 + pom.xml | 7 ++ 47 files changed, 574 insertions(+), 378 deletions(-) create mode 100644 .springjavaformatconfig create mode 100644 bootx-commons/common-swagger/src/main/java/cn/bootx/common/swagger/filter/SwaggerBasicAuthFilter.java diff --git a/.springjavaformatconfig b/.springjavaformatconfig new file mode 100644 index 00000000..522e93aa --- /dev/null +++ b/.springjavaformatconfig @@ -0,0 +1,4 @@ +# 启用版本为java8 +java-baseline=8 +# 缩进使用空格 +indentation-style=spaces diff --git a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictTranslation.java b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictTranslation.java index e7ed2372..6b513fb9 100644 --- a/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictTranslation.java +++ b/bootx-common-core/src/main/java/cn/bootx/common/core/annotation/DictTranslation.java @@ -22,7 +22,7 @@ public @interface DictTranslation { boolean enable() default true; /** - * 翻译类型, 只可以用在方法返回类中, 在字段上标注不发生效果 + * 翻译类型, 只可以用在方法上, 在字段上标注不发生效果 */ ConvertType convertType() default ConvertType.OBJECT; diff --git a/bootx-commons/common-swagger/src/main/java/cn/bootx/common/swagger/SwaggerProperties.java b/bootx-commons/common-swagger/src/main/java/cn/bootx/common/swagger/SwaggerProperties.java index e31f0cc0..7eb6af56 100644 --- a/bootx-commons/common-swagger/src/main/java/cn/bootx/common/swagger/SwaggerProperties.java +++ b/bootx-commons/common-swagger/src/main/java/cn/bootx/common/swagger/SwaggerProperties.java @@ -22,10 +22,16 @@ public class SwaggerProperties { * 是否开启 */ private boolean enabled; + /** * 业务模块模块 */ private Map> basePackages = new LinkedHashMap<>(); + + /** + * Basic 认证控制 + */ + private Basic basic = new Basic(); /** * 标题 */ @@ -58,4 +64,26 @@ public class SwaggerProperties { */ private String licenseUrl = "https://www.apache.org/licenses/LICENSE-2.0"; + /** + * Basic 认证控制 + */ + @Getter + @Setter + public static class Basic{ + + /** + * basic是否开启,默认为false + */ + private boolean enable = false; + + /** + * basic 用户名 + */ + private String username = "bootx"; + + /** + * basic 密码 + */ + private String password = "123456"; + } } diff --git a/bootx-commons/common-swagger/src/main/java/cn/bootx/common/swagger/filter/SwaggerBasicAuthFilter.java b/bootx-commons/common-swagger/src/main/java/cn/bootx/common/swagger/filter/SwaggerBasicAuthFilter.java new file mode 100644 index 00000000..15edf8b1 --- /dev/null +++ b/bootx-commons/common-swagger/src/main/java/cn/bootx/common/swagger/filter/SwaggerBasicAuthFilter.java @@ -0,0 +1,17 @@ +package cn.bootx.common.swagger.filter; + + +import org.springframework.web.filter.OncePerRequestFilter; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class SwaggerBasicAuthFilter extends OncePerRequestFilter { + @Override + protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { + + } +} diff --git a/bootx-demo/src/main/java/cn/bootx/demo/DemoApplication.java b/bootx-demo/src/main/java/cn/bootx/demo/DemoApplication.java index 4ef79626..18fec736 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/DemoApplication.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/DemoApplication.java @@ -5,12 +5,14 @@ import org.mybatis.spring.annotation.MapperScan; import org.springframework.context.annotation.ComponentScan; /** -* 演示 -* @author xxm -* @date 2021/8/6 -*/ + * 演示 + * + * @author xxm + * @date 2021/8/6 + */ // 以这个类为 basePackageClasses @MapperScan(annotationClass = Mapper.class) // 扫描Mybatis 的 mapper @ComponentScan // 扫描Spring组件 public class DemoApplication { + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/TestController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/TestController.java index 0c84597f..19c53802 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/TestController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/TestController.java @@ -32,13 +32,16 @@ import javax.validation.constraints.NotNull; @Validated @IgnoreAuth @Slf4j -@Tag(name ="测试控制器") +@Tag(name = "测试控制器") @RestController @RequestMapping("/test") @RequiredArgsConstructor public class TestController { + private final Sequence sequence; + private final SeqRangeManager seqRangeManager; + private final UserWsNoticeService userWsNoticeService; @OperateLog(title = "测试日志") @@ -46,59 +49,55 @@ public class TestController { @Idempotent @Operation(summary = "测试") @GetMapping("/hello") - public ResResult hello(){ + public ResResult hello() { return Res.ok("hello"); } @OperateLog(title = "测试回声日志", saveParam = true, saverReturn = true) @Operation(summary = "测试回声") @GetMapping("/say") - public ResResult say(String msg){ + public ResResult say(String msg) { return Res.ok(msg); } - @Operation(summary = "序列生成器") @GetMapping("/sequence") - public ResResult sequence(){ + public ResResult sequence() { long cs = sequence.next("cs"); return Res.ok(String.valueOf(cs)); } @Operation(summary = "序列生成器自定义") @GetMapping("/sequenceZdy") - public ResResult sequenceZdy(){ - SeqRangeConfig seqRangeConfig = new SeqRangeConfig() - .setStep(5) - .setRangeStart(0) - .setRangeStep(5); + public ResResult sequenceZdy() { + SeqRangeConfig seqRangeConfig = new SeqRangeConfig().setStep(5).setRangeStart(0).setRangeStep(5); DefaultRangeSequence defaultRangeSequence = new DefaultRangeSequence(seqRangeManager, seqRangeConfig); return Res.ok(defaultRangeSequence.next("aa")); } @Operation(summary = "校验测试") @GetMapping("/validation") - public ResResult validation(@NotBlank(message = "校验测试") String msg, @NotNull(message = "不为空") Integer a){ + public ResResult validation(@NotBlank(message = "校验测试") String msg, @NotNull(message = "不为空") Integer a) { return Res.ok(); } @Operation(summary = "用户全局ws消息通知测试") @GetMapping("/userNotice") - public ResResult userNotice(Long id){ + public ResResult userNotice(Long id) { // 推送消息通知框 WsResult result = WsRes.notificationError("警告"); - userWsNoticeService.sendMessageByUser(result,id); + userWsNoticeService.sendMessageByUser(result, id); // 推送消息事件(通常由指定页面进行监听) result = WsRes.eventNotice("hello", "cs"); - userWsNoticeService.sendMessageByUser(result,id); + userWsNoticeService.sendMessageByUser(result, id); return Res.ok(); } @Operation(summary = "轮训测试") @GetMapping("/rotationSync") - public ResResult rotationSync(){ + public ResResult rotationSync() { for (int i = 0; i < 20; i++) { SpringUtil.getBean(getClass()).rotationSyncFun(String.valueOf(i)); } @@ -110,8 +109,9 @@ public class TestController { */ @Retryable(value = RetryableException.class, maxAttempts = 20, backoff = @Backoff(value = 5000L)) @Async("asyncExecutor") - public void rotationSyncFun(String i){ + public void rotationSyncFun(String i) { log.info(i); throw new RetryableException(); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java index add60afe..5abc7a01 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/bsp/DictConvertDemoController.java @@ -12,6 +12,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; import lombok.experimental.Accessors; +import lombok.experimental.FieldNameConstants; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -20,7 +21,6 @@ import java.util.ArrayList; import java.util.List; /** - * * @author xxm * @date 2022/12/19 */ @@ -29,33 +29,46 @@ import java.util.List; @RequestMapping("/demo/dict") @RequiredArgsConstructor public class DictConvertDemoController { + private final DictTranslationService dictTranslationService; - @Operation(summary = "转换测试") + @Operation(summary = "转换测试(对象吧)") @GetMapping("/convert") @DictTranslation - public ResResult convert(){ - DictDemox dictDemo = new DictDemox(); - dictDemo.setSex("1"); - dictDemo.setSocialType("DingTalk"); - dictDemo.setDataScopePerm("2"); - -// dictTranslationService.translation(dictDemo); -// dictTranslationService.translation(x); + public ResResult convert() { + DictDemo dictDemo = new DictDemo() + .setSex("1") + .setSocialType("DingTalk") + .setPerson(new Person() + .setSexCode(1)); + + return Res.ok(dictDemo); + } + @Operation(summary = "转换测试(map)") + @GetMapping("/c1") + @DictTranslation(convertType = DictTranslation.ConvertType.MAP) + public ResResult c1() { + DictDemo dictDemo = new DictDemo() + .setSex("1") + .setSocialType("DingTalk") + .setPerson(new Person() + .setSexCode(1) + .setDataScopePerm(1)); + return Res.ok(dictDemo); } @Operation(summary = "c2") @GetMapping("/c2") @DictTranslation - public String c2(){ + public String c2() { return "123"; } @Operation(summary = "c4") @GetMapping("/c4") @DictTranslation - public ResResult> c4(){ + public ResResult> c4() { return Res.ok(new ArrayList<>()); } @@ -67,24 +80,32 @@ public class DictConvertDemoController { /** 性别 */ @Dict(dicCode = "Sex") private String sex; + /** 三方系统类别 */ @Dict(dicCode = "SocialType") private String socialType; - } + @DictTranslation + private Person person; + + } - @EqualsAndHashCode(callSuper = true) @Data @Accessors(chain = true) - public static class DictDemox extends DictDemo { + @FieldNameConstants + public static class Person { /** 性别 */ - @Dict(dicCode = "Sex") - private String sex; + private Integer sexCode; + + /** 性别 */ + @Dict(dicCode = "Sex",source = Fields.sexCode) + private String sexName; + /** 三方系统类别 */ @Dict(dicCode = "DataScopePerm") - private String dataScopePerm; + private Integer dataScopePerm; - private Integer age; } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataEncryptDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataEncryptDemoController.java index 0ddc3f3d..70d89b9c 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataEncryptDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataEncryptDemoController.java @@ -12,47 +12,48 @@ import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; /** -* -* @author xxm -* @date 2022/3/24 -*/ + * @author xxm + * @date 2022/3/24 + */ @Tag(name = "数据加密解密演示") @RestController @RequestMapping("/demo/data/encrypt") @RequiredArgsConstructor public class DataEncryptDemoController { + private final DataEncryptDemoService service; - @Operation( summary = "添加") + @Operation(summary = "添加") @PostMapping(value = "/add") - public ResResult add(@RequestBody DataEncryptDemo param){ + public ResResult add(@RequestBody DataEncryptDemo param) { service.add(param); return Res.ok(); } - @Operation( summary = "修改") + @Operation(summary = "修改") @PostMapping(value = "/update") - public ResResult update(@RequestBody DataEncryptDemo param){ + public ResResult update(@RequestBody DataEncryptDemo param) { service.update(param); return Res.ok(); } - @Operation( summary = "删除") + @Operation(summary = "删除") @DeleteMapping(value = "/delete") - public ResResult delete(Long id){ + public ResResult delete(Long id) { service.delete(id); return Res.ok(); } - @Operation( summary = "通过ID查询") + @Operation(summary = "通过ID查询") @GetMapping(value = "/findById") - public ResResult findById(Long id){ + public ResResult findById(Long id) { return Res.ok(service.findById(id)); } - @Operation( summary = "分页查询") + @Operation(summary = "分页查询") @GetMapping(value = "/page") - public ResResult> page(PageParam pageParam){ + public ResResult> page(PageParam pageParam) { return Res.ok(service.page(pageParam)); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataPermDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataPermDemoController.java index d6ffee52..af6cc7cb 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataPermDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataPermDemoController.java @@ -12,47 +12,49 @@ import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; /** -* 数据权限演示 -* @author xxm -* @date 2022/2/21 -*/ + * 数据权限演示 + * + * @author xxm + * @date 2022/2/21 + */ @Tag(name = "数据权限演示") @RestController @RequestMapping("/demo/data/perm") @RequiredArgsConstructor public class DataPermDemoController { + private final DataPermDemoService dataPermDemoService; - @Operation( summary = "添加") + @Operation(summary = "添加") @PostMapping(value = "/add") - public ResResult add(@RequestBody DataPermDemo param){ + public ResResult add(@RequestBody DataPermDemo param) { dataPermDemoService.add(param); return Res.ok(); } - @Operation( summary = "修改") + @Operation(summary = "修改") @PostMapping(value = "/update") - public ResResult update(@RequestBody DataPermDemo param){ + public ResResult update(@RequestBody DataPermDemo param) { dataPermDemoService.update(param); return Res.ok(); } - @Operation( summary = "删除") + @Operation(summary = "删除") @DeleteMapping(value = "/delete") - public ResResult delete(Long id){ + public ResResult delete(Long id) { dataPermDemoService.delete(id); return Res.ok(); } - @Operation( summary = "通过ID查询") + @Operation(summary = "通过ID查询") @GetMapping(value = "/findById") - public ResResult findById(Long id){ + public ResResult findById(Long id) { return Res.ok(dataPermDemoService.findById(id)); } - @Operation( summary = "分页查询") + @Operation(summary = "分页查询") @GetMapping(value = "/page") - public ResResult> page(PageParam pageParam){ + public ResResult> page(PageParam pageParam) { return Res.ok(dataPermDemoService.page(pageParam)); } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataSensitiveDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataSensitiveDemoController.java index 789c1b48..38762bf6 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataSensitiveDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/data/DataSensitiveDemoController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.*; /** * 数据脱敏演示 + * * @author xxm * @date 2022/3/24 */ @@ -21,38 +22,39 @@ import org.springframework.web.bind.annotation.*; @RequestMapping("/demo/data/sensitive") @RequiredArgsConstructor public class DataSensitiveDemoController { + private final DataSensitiveDemoService service; - @Operation( summary = "添加") + @Operation(summary = "添加") @PostMapping(value = "/add") - public ResResult add(@RequestBody DataSensitiveDemo param){ + public ResResult add(@RequestBody DataSensitiveDemo param) { service.add(param); return Res.ok(); } - @Operation( summary = "修改") + @Operation(summary = "修改") @PostMapping(value = "/update") - public ResResult update(@RequestBody DataSensitiveDemo param){ + public ResResult update(@RequestBody DataSensitiveDemo param) { service.update(param); return Res.ok(); } - @Operation( summary = "删除") + @Operation(summary = "删除") @DeleteMapping(value = "/delete") - public ResResult delete(Long id){ + public ResResult delete(Long id) { service.delete(id); return Res.ok(); } - @Operation( summary = "通过ID查询") + @Operation(summary = "通过ID查询") @GetMapping(value = "/findById") - public ResResult findById(Long id){ + public ResResult findById(Long id) { return Res.ok(service.findById(id)); } - @Operation( summary = "分页查询") + @Operation(summary = "分页查询") @GetMapping(value = "/page") - public ResResult> page(PageParam pageParam){ + public ResResult> page(PageParam pageParam) { return Res.ok(service.page(pageParam)); } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/lock/IdempotencyDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/lock/IdempotencyDemoController.java index 0cf25e9f..2d6b2cc9 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/lock/IdempotencyDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/lock/IdempotencyDemoController.java @@ -17,28 +17,29 @@ import org.springframework.web.bind.annotation.RestController; import java.util.concurrent.TimeUnit; /** -* 幂等控制演示 -* @author xxm -* @date 2022/3/31 -*/ + * 幂等控制演示 + * + * @author xxm + * @date 2022/3/31 + */ @Slf4j -@Tag(name ="幂等控制演示") +@Tag(name = "幂等控制演示") @RestController @RequestMapping("/demo/lock") @RequiredArgsConstructor public class IdempotencyDemoController { - @Idempotent(name = "idempotent",timeout = 1000) + @Idempotent(name = "idempotent", timeout = 1000) @Operation(summary = "幂等演示") @PostMapping("/idempotency") - public ResResult idempotency(){ + public ResResult idempotency() { return Res.ok("幂等演示"); } @Operation(summary = "分布式锁(暂停5秒)") @GetMapping("/lock5") - @Lock4j(name = "test:lock",keys = "#a",acquireTimeout = 60000) - public ResResult lock5(Integer a){ + @Lock4j(name = "test:lock", keys = "#a", acquireTimeout = 60000) + public ResResult lock5(Integer a) { log.info("开始"); System.out.println(1); ThreadUtil.sleep(5, TimeUnit.SECONDS); @@ -48,8 +49,8 @@ public class IdempotencyDemoController { @Operation(summary = "分布式锁(暂停20秒)") @GetMapping("/lock20") - @Lock4j(name = "test:lock",keys = "#a",acquireTimeout = 60000) - public ResResult lock20(Integer a){ + @Lock4j(name = "test:lock", keys = "#a", acquireTimeout = 60000) + public ResResult lock20(Integer a) { log.info("开始"); System.out.println(2); ThreadUtil.sleep(20, TimeUnit.SECONDS); @@ -60,7 +61,7 @@ public class IdempotencyDemoController { @Operation(summary = "分布式锁(不暂停)") @PostMapping("/lock0") @Lock4j(name = "test:lock") - public ResResult lock0(){ + public ResResult lock0() { return Res.ok(); } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/mq/MessageQueueDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/mq/MessageQueueDemoController.java index 7cab7954..3c222e66 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/mq/MessageQueueDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/mq/MessageQueueDemoController.java @@ -12,50 +12,49 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** -* @author xxm -* @date 2022/5/27 -*/ + * @author xxm + * @date 2022/5/27 + */ @Tag(name = "测试消息队列") @RestController @RequestMapping("/demo/mq") @RequiredArgsConstructor public class MessageQueueDemoController { + private final RabbitTemplate rabbitTemplate; -// private final MqttClient mqttClient; + + // private final MqttClient mqttClient; private final RedisClient redisClient; -// @SneakyThrows -// @Operation(summary = "发送MQTT消息") -// @PostMapping("/sendMqttMsg") -// public ResResult sendMqttMsg(String msg){ -// String json = JacksonUtil.toJson(Res.ok(msg)); -// MqttMessage mqttMessage = new MqttMessage(json.getBytes(StandardCharsets.UTF_8)); -// mqttClient.publish("demo",mqttMessage); -// return Res.ok(); -// } + // @SneakyThrows + // @Operation(summary = "发送MQTT消息") + // @PostMapping("/sendMqttMsg") + // public ResResult sendMqttMsg(String msg){ + // String json = JacksonUtil.toJson(Res.ok(msg)); + // MqttMessage mqttMessage = new MqttMessage(json.getBytes(StandardCharsets.UTF_8)); + // mqttClient.publish("demo",mqttMessage); + // return Res.ok(); + // } @Operation(summary = "发送RabbitMQ消息") @PostMapping("/sendRabbitMsg") - public ResResult sendRabbitMsg(String msg){ - rabbitTemplate.convertAndSend( - "service.demo", - "demo.testMq", - Res.ok(msg) - ); + public ResResult sendRabbitMsg(String msg) { + rabbitTemplate.convertAndSend("service.demo", "demo.testMq", Res.ok(msg)); return Res.ok(); } @Operation(summary = "发送RedisMq消息") @PostMapping("/sendRedisMsg") - public ResResult sendRedisMsg(String msg){ + public ResResult sendRedisMsg(String msg) { redisClient.convertAndSend("demo:redis", Res.ok(msg)); return Res.ok(); } - + @Operation(summary = "创建15秒后过期的事件") @PostMapping("/sendKeyExpired") - public ResResult sendKeyExpired(String key){ - redisClient.setKeyExpired("demo:redis:expired:",key,15*1000); + public ResResult sendKeyExpired(String key) { + redisClient.setKeyExpired("demo:redis:expired:", key, 15 * 1000); return Res.ok(); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/notice/EmailSendDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/notice/EmailSendDemoController.java index c4c394a8..aafc1321 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/notice/EmailSendDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/notice/EmailSendDemoController.java @@ -14,31 +14,32 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -/** - * - * @author xxm - * @date 2022/8/3 +/** + * @author xxm + * @date 2022/8/3 */ @Tag(name = "测试消息队列") @RestController @RequestMapping("/demo/notice/email") @RequiredArgsConstructor public class EmailSendDemoController { + private final EmailSendDemoService service; - + @Operation(summary = "简单邮件发送") @PostMapping("/sentSimpleMail") - public ResResultsentSimpleMail(@RequestBody SendSimpleEmailDemoParam param){ + public ResResult sentSimpleMail(@RequestBody SendSimpleEmailDemoParam param) { ValidationUtil.validateParam(param); - service.sentSimpleMail(param.getEmail(),param.getSubject(),param.getMessage()); + service.sentSimpleMail(param.getEmail(), param.getSubject(), param.getMessage()); return Res.ok(); } @Operation(summary = "标准邮件发送") @PostMapping("/sentMail") - public ResResult sentMail(@RequestBody SendMailParam mailParam){ + public ResResult sentMail(@RequestBody SendMailParam mailParam) { ValidationUtil.validateParam(mailParam); service.sentMail(mailParam); return Res.ok(); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java index 1be32a4c..085ccfcd 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/query/SuperQueryDemoController.java @@ -18,68 +18,65 @@ import java.time.LocalDateTime; import java.time.LocalTime; /** -* -* @author xxm -* @date 2022/2/21 -*/ + * @author xxm + * @date 2022/2/21 + */ @Tag(name = "超级查询演示") @RestController @RequestMapping("/demo/super/query") @RequiredArgsConstructor public class SuperQueryDemoController { + private final SuperQueryDemoService superQueryDemoService; - @Operation( summary = "添加") + @Operation(summary = "添加") @PostMapping(value = "/add") - public ResResult add(@RequestBody SuperQueryDemo param){ + public ResResult add(@RequestBody SuperQueryDemo param) { superQueryDemoService.add(param); return Res.ok(); } - @Operation( summary = "修改") + @Operation(summary = "修改") @PostMapping(value = "/update") - public ResResult update(@RequestBody SuperQueryDemo param){ + public ResResult update(@RequestBody SuperQueryDemo param) { superQueryDemoService.update(param); return Res.ok(); } - @Operation( summary = "删除") + @Operation(summary = "删除") @DeleteMapping(value = "/delete") - public ResResult delete(Long id){ + public ResResult delete(Long id) { superQueryDemoService.delete(id); return Res.ok(); } - @Operation( summary = "通过ID查询") + @Operation(summary = "通过ID查询") @GetMapping(value = "/findById") - public ResResult findById(Long id){ + public ResResult findById(Long id) { return Res.ok(superQueryDemoService.findById(id)); } - @Operation( summary = "分页查询") + @Operation(summary = "分页查询") @GetMapping(value = "/page") - public ResResult> page(PageParam pageParam){ + public ResResult> page(PageParam pageParam) { return Res.ok(superQueryDemoService.page(pageParam)); } - @Operation( summary = "超级查询(分页)") + @Operation(summary = "超级查询(分页)") @PostMapping(value = "/superQuery") - public ResResult> superQuery(PageParam pageParam, @RequestBody QueryParams queryParams){ - return Res.ok(superQueryDemoService.superQuery(pageParam,queryParams)); + public ResResult> superQuery(PageParam pageParam, @RequestBody QueryParams queryParams) { + return Res.ok(superQueryDemoService.superQuery(pageParam, queryParams)); } @Operation(summary = "MP查询生成器测试") @GetMapping("/mpGenerator") - public ResResult mpGenerator(){ - SuperQueryDemo queryDemo = new SuperQueryDemo() - .setName("222") - .setAge(24) - .setWorkTime(LocalTime.now()) - .setVip(true) - .setRegistrationTime(LocalDateTime.now()); + public ResResult mpGenerator() { + SuperQueryDemo queryDemo = new SuperQueryDemo().setName("222").setAge(24).setWorkTime(LocalTime.now()) + .setVip(true).setRegistrationTime(LocalDateTime.now()); queryDemo.setId(1122L); QueryWrapper generator = QueryGenerator.generator(queryDemo); - generator = QueryGenerator.generator(queryDemo,SuperQueryDemo.class); + generator = QueryGenerator.generator(queryDemo, SuperQueryDemo.class); return Res.ok(generator.getTargetSql()); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/controller/ws/GlobalWebsocketDemoController.java b/bootx-demo/src/main/java/cn/bootx/demo/controller/ws/GlobalWebsocketDemoController.java index 46ddff13..07869a08 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/controller/ws/GlobalWebsocketDemoController.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/controller/ws/GlobalWebsocketDemoController.java @@ -11,21 +11,23 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -/** -* @author xxm -* @date 2022/6/10 -*/ +/** + * @author xxm + * @date 2022/6/10 + */ @Tag(name = "全局websocket通知demo") @RestController @RequestMapping("/demo/global/ws") @RequiredArgsConstructor public class GlobalWebsocketDemoController { + private final UserWsNoticeService userWsNoticeService; @Operation(summary = "发送消息") @PostMapping("/send") - public ResResult send(Long userId,String msg){ - userWsNoticeService.sendMessageByUser(WsRes.eventNotice(msg,"event_test_websocket"),userId); + public ResResult send(Long userId, String msg) { + userWsNoticeService.sendMessageByUser(WsRes.eventNotice(msg, "event_test_websocket"), userId); return Res.ok(); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/dao/DataEncryptDemoManager.java b/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/dao/DataEncryptDemoManager.java index 2b930520..871734f1 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/dao/DataEncryptDemoManager.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/dao/DataEncryptDemoManager.java @@ -7,12 +7,12 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Repository; /** -* -* @author xxm -* @date 2022/3/24 -*/ + * @author xxm + * @date 2022/3/24 + */ @Slf4j @Repository @RequiredArgsConstructor public class DataEncryptDemoManager extends BaseManager { + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/dao/DataEncryptDemoMapper.java b/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/dao/DataEncryptDemoMapper.java index 68985a08..6d34c56c 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/dao/DataEncryptDemoMapper.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/dao/DataEncryptDemoMapper.java @@ -1,15 +1,14 @@ package cn.bootx.demo.core.encrypt.dao; - import cn.bootx.demo.core.encrypt.entity.DataEncryptDemo; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -/** -* -* @author xxm -* @date 2022/3/24 -*/ +/** + * @author xxm + * @date 2022/3/24 + */ @Mapper public interface DataEncryptDemoMapper extends BaseMapper { + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/entity/DataEncryptDemo.java b/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/entity/DataEncryptDemo.java index 18bcf3fd..164326ed 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/entity/DataEncryptDemo.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/entity/DataEncryptDemo.java @@ -12,6 +12,7 @@ import lombok.experimental.Accessors; /** * 权限显示demo + * * @author xxm * @date 2022/2/21 */ @@ -30,6 +31,7 @@ public class DataEncryptDemo extends MpBaseEntity { private String content; @Schema(description = "加密后的内容") - @TableField(value = "content",updateStrategy = FieldStrategy.NEVER,insertStrategy = FieldStrategy.NEVER) + @TableField(value = "content", updateStrategy = FieldStrategy.NEVER, insertStrategy = FieldStrategy.NEVER) private String contentEncryption; + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/service/DataEncryptDemoService.java b/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/service/DataEncryptDemoService.java index a512b223..90012b74 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/service/DataEncryptDemoService.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/encrypt/service/DataEncryptDemoService.java @@ -11,48 +11,49 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; /** -* -* @author xxm -* @date 2022/3/24 -*/ + * @author xxm + * @date 2022/3/24 + */ @Slf4j @Service @RequiredArgsConstructor public class DataEncryptDemoService { + private final DataEncryptDemoManager manager; /** * 新增 */ - public void add(DataEncryptDemo param){ + public void add(DataEncryptDemo param) { manager.save(param); } /** * 更新 */ - public void update(DataEncryptDemo param){ + public void update(DataEncryptDemo param) { manager.updateById(param); } /** * 删除 */ - public void delete(Long id){ + public void delete(Long id) { manager.deleteById(id); } /** * 分页 */ - public PageResult page(PageParam pageParam){ - return MpUtil.convert2PageResult(manager.page(MpUtil.getMpPage(pageParam,DataEncryptDemo.class))); + public PageResult page(PageParam pageParam) { + return MpUtil.convert2PageResult(manager.page(MpUtil.getMpPage(pageParam, DataEncryptDemo.class))); } /** * 单条 */ - public DataEncryptDemo findById(Long id){ + public DataEncryptDemo findById(Long id) { return manager.findById(id).orElseThrow(DataNotExistException::new); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/mqtt/DemoMqttConfiguration.java b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/mqtt/DemoMqttConfiguration.java index 42979f76..0e2288a7 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/mqtt/DemoMqttConfiguration.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/mqtt/DemoMqttConfiguration.java @@ -1,38 +1,38 @@ -//package cn.bootx.demo.core.mq.mqtt; +// package cn.bootx.demo.core.mq.mqtt; // -//import lombok.RequiredArgsConstructor; -//import lombok.extern.slf4j.Slf4j; -//import org.eclipse.paho.client.mqttv3.MqttClient; -//import org.eclipse.paho.client.mqttv3.MqttException; -//import org.springframework.context.annotation.Configuration; +// import lombok.RequiredArgsConstructor; +// import lombok.extern.slf4j.Slf4j; +// import org.eclipse.paho.client.mqttv3.MqttClient; +// import org.eclipse.paho.client.mqttv3.MqttException; +// import org.springframework.context.annotation.Configuration; // -//import javax.annotation.PostConstruct; +// import javax.annotation.PostConstruct; // -///** -//* -//* @author xxm -//* @date 2022/5/30 -//*/ -//@Slf4j -//@Configuration -//@RequiredArgsConstructor -//public class DemoMqttConfiguration { -// private final MqttClient mqttClient; -// private final DemoMqttMessageListener iotMessageListener; +/// ** +// * +// * @author xxm +// * @date 2022/5/30 +// */ +// @Slf4j +// @Configuration +// @RequiredArgsConstructor +// public class DemoMqttConfiguration { +// private final MqttClient mqttClient; +// private final DemoMqttMessageListener iotMessageListener; // -// /** -// * 添加监听器 -// */ -// @PostConstruct -// public void listener(){ -// try { -// if (mqttClient.isConnected()){ -// mqttClient.subscribe("demo", iotMessageListener); -// } else { -// log.warn("服务器未连接,MQTT添加监听器失败"); -// } -// } catch (MqttException e) { -// log.error("MQTT添加监听器失败",e); -// } -// } -//} +// /** +// * 添加监听器 +// */ +// @PostConstruct +// public void listener(){ +// try { +// if (mqttClient.isConnected()){ +// mqttClient.subscribe("demo", iotMessageListener); +// } else { +// log.warn("服务器未连接,MQTT添加监听器失败"); +// } +// } catch (MqttException e) { +// log.error("MQTT添加监听器失败",e); +// } +// } +// } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/mqtt/DemoMqttMessageListener.java b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/mqtt/DemoMqttMessageListener.java index 8661cc79..7785ca9b 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/mqtt/DemoMqttMessageListener.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/mqtt/DemoMqttMessageListener.java @@ -1,22 +1,22 @@ -//package cn.bootx.demo.core.mq.mqtt; +// package cn.bootx.demo.core.mq.mqtt; // -//import lombok.RequiredArgsConstructor; -//import org.eclipse.paho.client.mqttv3.IMqttMessageListener; -//import org.eclipse.paho.client.mqttv3.MqttMessage; -//import org.springframework.stereotype.Component; +// import lombok.RequiredArgsConstructor; +// import org.eclipse.paho.client.mqttv3.IMqttMessageListener; +// import org.eclipse.paho.client.mqttv3.MqttMessage; +// import org.springframework.stereotype.Component; // -///** -//* mqtt消息接收器 -//* @author xxm -//* @date 2022/5/30 -//*/ -//@Component -//@RequiredArgsConstructor -//public class DemoMqttMessageListener implements IMqttMessageListener { +/// ** +// * mqtt消息接收器 +// * @author xxm +// * @date 2022/5/30 +// */ +// @Component +// @RequiredArgsConstructor +// public class DemoMqttMessageListener implements IMqttMessageListener { // // -// @Override -// public void messageArrived(String topic, MqttMessage message) { +// @Override +// public void messageArrived(String topic, MqttMessage message) { // -// } -//} +// } +// } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqConfiguration.java b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqConfiguration.java index 1a5f8057..56bdf412 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqConfiguration.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqConfiguration.java @@ -7,11 +7,12 @@ import org.springframework.amqp.core.Queue; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -/** -* 演示RabbitMQ消息队列配置 -* @author xxm -* @date 2022/5/30 -*/ +/** + * 演示RabbitMQ消息队列配置 + * + * @author xxm + * @date 2022/5/30 + */ @Configuration public class DemoRabbitMqConfiguration { @@ -20,16 +21,17 @@ public class DemoRabbitMqConfiguration { public Queue demoTestQueue() { return new Queue("demo.testMq"); } + /** 交换机 */ @Bean public DirectExchange demoExchange() { return new DirectExchange("service.demo"); } + /** 绑定测试队列和交换机 */ @Bean public Binding bindDemoMq() { - return BindingBuilder.bind(demoTestQueue()) - .to(demoExchange()) - .with("demo.testMq"); + return BindingBuilder.bind(demoTestQueue()).to(demoExchange()).with("demo.testMq"); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqMessageListener.java b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqMessageListener.java index 6203daa5..964d4e73 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqMessageListener.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/rabbit/DemoRabbitMqMessageListener.java @@ -7,9 +7,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.stereotype.Component; - /** - * * @author xxm * @date 2022/5/30 */ @@ -24,6 +22,7 @@ public class DemoRabbitMqMessageListener { */ @RabbitListener(queues = "demo.testMq") public void payCancel(ResResult hello) { - log.info("测试MQ消息 :{}",hello); + log.info("测试MQ消息 :{}", hello); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisExpiredListener.java b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisExpiredListener.java index ec364a39..141e59de 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisExpiredListener.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisExpiredListener.java @@ -5,11 +5,12 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; -/** -* redis过期事件监听 -* @author xxm -* @date 2022/5/30 -*/ +/** + * redis过期事件监听 + * + * @author xxm + * @date 2022/5/30 + */ @Slf4j @Component @RequiredArgsConstructor @@ -22,6 +23,7 @@ public class DemoRedisExpiredListener implements RedisKeyExpiredListener { @Override public void onMessage(String key) { - log.info("redis过期事件监听演示, key : {}",key); + log.info("redis过期事件监听演示, key : {}", key); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisStreamListener.java b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisStreamListener.java index ede32b26..059da04d 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisStreamListener.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisStreamListener.java @@ -4,15 +4,18 @@ import org.springframework.data.redis.connection.stream.ObjectRecord; import org.springframework.data.redis.connection.stream.RecordId; import org.springframework.data.redis.stream.StreamListener; -/** -* RedisStream 消息队列 (未实现) -* @author xxm -* @date 2022/6/4 -*/ +/** + * RedisStream 消息队列 (未实现) + * + * @author xxm + * @date 2022/6/4 + */ public class DemoRedisStreamListener implements StreamListener> { + @Override public void onMessage(ObjectRecord message) { RecordId recordId = message.getId(); recordId.getValue(); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisTopicListener.java b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisTopicListener.java index 0c282205..c5e06c6c 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisTopicListener.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/mq/redis/DemoRedisTopicListener.java @@ -5,11 +5,12 @@ import cn.bootx.common.redis.listener.RedisTopicListener; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; -/** -* 测试Redis消息队列 -* @author xxm -* @date 2022/5/7 -*/ +/** + * 测试Redis消息队列 + * + * @author xxm + * @date 2022/5/7 + */ @Slf4j @Component public class DemoRedisTopicListener implements RedisTopicListener> { @@ -21,6 +22,7 @@ public class DemoRedisTopicListener implements RedisTopicListener obj) { - log.info("{}",obj); + log.info("{}", obj); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/notice/entity/SendSimpleEmailDemoParam.java b/bootx-demo/src/main/java/cn/bootx/demo/core/notice/entity/SendSimpleEmailDemoParam.java index b4e7e5ff..501bfe47 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/notice/entity/SendSimpleEmailDemoParam.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/notice/entity/SendSimpleEmailDemoParam.java @@ -6,25 +6,27 @@ import lombok.experimental.Accessors; import javax.validation.constraints.NotNull; -/** +/** * 简单邮件发送参数 - * @author xxm - * @date 2022/8/3 + * + * @author xxm + * @date 2022/8/3 */ @Data @Accessors(chain = true) @Schema(title = "简单邮件发送参数") public class SendSimpleEmailDemoParam { - @Schema(description= "标题") + @Schema(description = "标题") @NotNull(message = "主题不能为空") private String subject; - @Schema(description= "邮箱地址") + @Schema(description = "邮箱地址") @NotNull(message = "邮箱地址不能为空") private String email; - @Schema(description= "消息") + @Schema(description = "消息") @NotNull(message = "消息不能为空") private String message; + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/notice/service/EmailSendDemoService.java b/bootx-demo/src/main/java/cn/bootx/demo/core/notice/service/EmailSendDemoService.java index fad55989..fef6272f 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/notice/service/EmailSendDemoService.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/notice/service/EmailSendDemoService.java @@ -6,28 +6,31 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; -/** +/** * 邮件消息发送测试 - * @author xxm - * @date 2022/8/3 + * + * @author xxm + * @date 2022/8/3 */ @Slf4j @Service @RequiredArgsConstructor public class EmailSendDemoService { + private final EmailNoticeSender mailNoticeSender; /** * 简单方式邮件发送 */ - public void sentSimpleMail(String email,String subject,String msg){ - mailNoticeSender.sentSimpleMail(email,subject,msg); + public void sentSimpleMail(String email, String subject, String msg) { + mailNoticeSender.sentSimpleMail(email, subject, msg); } /** * 标准邮件发送 */ - public void sentMail(SendMailParam mailParam){ + public void sentMail(SendMailParam mailParam) { mailNoticeSender.sendMail(mailParam); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/perm/dao/DataPermDemoManager.java b/bootx-demo/src/main/java/cn/bootx/demo/core/perm/dao/DataPermDemoManager.java index b229ad25..20989b79 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/perm/dao/DataPermDemoManager.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/perm/dao/DataPermDemoManager.java @@ -9,24 +9,25 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Repository; -/** -* 数据权限演示 -* @author xxm -* @date 2022/2/21 -*/ +/** + * 数据权限演示 + * + * @author xxm + * @date 2022/2/21 + */ @Slf4j @Repository @RequiredArgsConstructor public class DataPermDemoManager extends BaseManager { + private final DataPermDemoMapper dataPermDemoMapper; /** * 分页 */ - public Page page(PageParam pageParam){ + public Page page(PageParam pageParam) { Page mpPage = MpUtil.getMpPage(pageParam, DataPermDemo.class); - return lambdaQuery() - .orderByDesc(DataPermDemo::getCreateTime) - .page(mpPage); + return lambdaQuery().orderByDesc(DataPermDemo::getCreateTime).page(mpPage); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/perm/dao/DataPermDemoMapper.java b/bootx-demo/src/main/java/cn/bootx/demo/core/perm/dao/DataPermDemoMapper.java index 4eb3e0e0..8eb20437 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/perm/dao/DataPermDemoMapper.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/perm/dao/DataPermDemoMapper.java @@ -4,11 +4,13 @@ import cn.bootx.demo.core.perm.entity.DataPermDemo; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -/** -* 数据权限演示demo -* @author xxm -* @date 2022/2/21 -*/ +/** + * 数据权限演示demo + * + * @author xxm + * @date 2022/2/21 + */ @Mapper public interface DataPermDemoMapper extends BaseMapper { + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/perm/entity/DataPermDemo.java b/bootx-demo/src/main/java/cn/bootx/demo/core/perm/entity/DataPermDemo.java index 5db91251..5ed5d53d 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/perm/entity/DataPermDemo.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/perm/entity/DataPermDemo.java @@ -8,10 +8,11 @@ import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** -* 权限显示demo -* @author xxm -* @date 2022/2/21 -*/ + * 权限显示demo + * + * @author xxm + * @date 2022/2/21 + */ @EqualsAndHashCode(callSuper = true) @Data @Accessors(chain = true) @@ -27,4 +28,5 @@ public class DataPermDemo extends MpBaseEntity { @Schema(description = "备注") private String remark; + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/perm/service/DataPermDemoService.java b/bootx-demo/src/main/java/cn/bootx/demo/core/perm/service/DataPermDemoService.java index 60ee7a75..215624eb 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/perm/service/DataPermDemoService.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/perm/service/DataPermDemoService.java @@ -17,6 +17,7 @@ import org.springframework.stereotype.Service; /** * 数据权限演示 + * * @author xxm * @date 2022/2/21 */ @@ -25,26 +26,27 @@ import org.springframework.stereotype.Service; @Permission @RequiredArgsConstructor public class DataPermDemoService { + private final DataPermDemoManager dataPermDemoManager; /** * 分页 */ - public PageResult page(PageParam pageParam){ + public PageResult page(PageParam pageParam) { return MpUtil.convert2PageResult(dataPermDemoManager.page(pageParam)); } /** * 获取 单条 */ - public DataPermDemo findById(Long id){ + public DataPermDemo findById(Long id) { return dataPermDemoManager.findById(id).orElseThrow(DataNotExistException::new); } /** * 添加 */ - public void add(DataPermDemo param){ + public void add(DataPermDemo param) { param.setCreatorName(SecurityUtil.getCurrentUser().map(UserDetail::getName).orElse("未知")); dataPermDemoManager.save(param); } @@ -52,17 +54,18 @@ public class DataPermDemoService { /** * 更新 */ - public void update(DataPermDemo param){ + public void update(DataPermDemo param) { DataPermDemo dataPermDemo = dataPermDemoManager.findById(param.getId()).orElseThrow(DataNotExistException::new); - BeanUtil.copyProperties(param,dataPermDemo, CopyOptions.create().ignoreNullValue()); + BeanUtil.copyProperties(param, dataPermDemo, CopyOptions.create().ignoreNullValue()); dataPermDemoManager.updateById(dataPermDemo); } /** * 删除 */ - public void delete(Long id){ + public void delete(Long id) { dataPermDemoManager.findById(id).orElseThrow(DataNotExistException::new); dataPermDemoManager.deleteById(id); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/query/dao/SuperQueryDemoManager.java b/bootx-demo/src/main/java/cn/bootx/demo/core/query/dao/SuperQueryDemoManager.java index 8caa5dde..8ec98203 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/query/dao/SuperQueryDemoManager.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/query/dao/SuperQueryDemoManager.java @@ -12,11 +12,12 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Repository; -/** -* 超级查询 -* @author xxm -* @date 2022/2/21 -*/ +/** + * 超级查询 + * + * @author xxm + * @date 2022/2/21 + */ @Slf4j @Repository @RequiredArgsConstructor @@ -25,19 +26,18 @@ public class SuperQueryDemoManager extends BaseManager page(PageParam pageParam){ + public Page page(PageParam pageParam) { Page mpPage = MpUtil.getMpPage(pageParam, SuperQueryDemo.class); - return lambdaQuery() - .orderByDesc(SuperQueryDemo::getCreateTime) - .page(mpPage); + return lambdaQuery().orderByDesc(SuperQueryDemo::getCreateTime).page(mpPage); } /** * 分页 超级查询 */ - public Page superQuery(PageParam pageParam, QueryParams queryParams){ + public Page superQuery(PageParam pageParam, QueryParams queryParams) { QueryWrapper generator = QueryGenerator.generator(queryParams); Page mpPage = MpUtil.getMpPage(pageParam, SuperQueryDemo.class); - return this.page(mpPage,generator); + return this.page(mpPage, generator); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/query/dao/SuperQueryDemoMapper.java b/bootx-demo/src/main/java/cn/bootx/demo/core/query/dao/SuperQueryDemoMapper.java index 6d5c9e2b..fc3d4995 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/query/dao/SuperQueryDemoMapper.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/query/dao/SuperQueryDemoMapper.java @@ -4,11 +4,13 @@ import cn.bootx.demo.core.query.entity.SuperQueryDemo; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -/** -* 超级查询 -* @author xxm -* @date 2022/2/21 -*/ +/** + * 超级查询 + * + * @author xxm + * @date 2022/2/21 + */ @Mapper public interface SuperQueryDemoMapper extends BaseMapper { + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/query/entity/SuperQueryDemo.java b/bootx-demo/src/main/java/cn/bootx/demo/core/query/entity/SuperQueryDemo.java index 54952011..2762c904 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/query/entity/SuperQueryDemo.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/query/entity/SuperQueryDemo.java @@ -11,11 +11,12 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; -/** -* 超级查询演示 -* @author xxm -* @date 2022/2/21 -*/ +/** + * 超级查询演示 + * + * @author xxm + * @date 2022/2/21 + */ @EqualsAndHashCode(callSuper = true) @Data @Accessors(chain = true) diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/query/service/SuperQueryDemoService.java b/bootx-demo/src/main/java/cn/bootx/demo/core/query/service/SuperQueryDemoService.java index 5ba7aa26..8153e1ef 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/query/service/SuperQueryDemoService.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/query/service/SuperQueryDemoService.java @@ -15,41 +15,44 @@ import org.springframework.stereotype.Service; import java.time.LocalDateTime; -/** -* 超级查询 -* @author xxm -* @date 2022/2/21 -*/ +/** + * 超级查询 + * + * @author xxm + * @date 2022/2/21 + */ @Slf4j @Service @RequiredArgsConstructor public class SuperQueryDemoService { + private final SuperQueryDemoManager superQueryDemoManager; /** * 分页 */ - public PageResult page(PageParam pageParam){ + public PageResult page(PageParam pageParam) { return MpUtil.convert2PageResult(superQueryDemoManager.page(pageParam)); } + /** * 分页 超级查询 */ - public PageResult superQuery(PageParam pageParam, QueryParams queryParams){ - return MpUtil.convert2PageResult(superQueryDemoManager.superQuery(pageParam,queryParams)); + public PageResult superQuery(PageParam pageParam, QueryParams queryParams) { + return MpUtil.convert2PageResult(superQueryDemoManager.superQuery(pageParam, queryParams)); } /** * 获取 单条 */ - public SuperQueryDemo findById(Long id){ + public SuperQueryDemo findById(Long id) { return superQueryDemoManager.findById(id).orElseThrow(DataNotExistException::new); } /** * 添加 */ - public void add(SuperQueryDemo param){ + public void add(SuperQueryDemo param) { param.setRegistrationTime(LocalDateTime.now()); superQueryDemoManager.save(param); } @@ -57,17 +60,19 @@ public class SuperQueryDemoService { /** * 更新 */ - public void update(SuperQueryDemo param){ - SuperQueryDemo SuperQueryDemo = superQueryDemoManager.findById(param.getId()).orElseThrow(DataNotExistException::new); - BeanUtil.copyProperties(param,SuperQueryDemo, CopyOptions.create().ignoreNullValue()); + public void update(SuperQueryDemo param) { + SuperQueryDemo SuperQueryDemo = superQueryDemoManager.findById(param.getId()) + .orElseThrow(DataNotExistException::new); + BeanUtil.copyProperties(param, SuperQueryDemo, CopyOptions.create().ignoreNullValue()); superQueryDemoManager.updateById(SuperQueryDemo); } /** * 删除 */ - public void delete(Long id){ + public void delete(Long id) { superQueryDemoManager.findById(id).orElseThrow(DataNotExistException::new); superQueryDemoManager.deleteById(id); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/dao/DataSensitiveDemoManager.java b/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/dao/DataSensitiveDemoManager.java index 97c41376..424e0ccd 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/dao/DataSensitiveDemoManager.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/dao/DataSensitiveDemoManager.java @@ -7,12 +7,12 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Repository; /** -* -* @author xxm -* @date 2022/3/24 -*/ + * @author xxm + * @date 2022/3/24 + */ @Slf4j @Repository @RequiredArgsConstructor -public class DataSensitiveDemoManager extends BaseManager { +public class DataSensitiveDemoManager extends BaseManager { + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/dao/DataSensitiveDemoMapper.java b/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/dao/DataSensitiveDemoMapper.java index 7da5a5c4..62ffb039 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/dao/DataSensitiveDemoMapper.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/dao/DataSensitiveDemoMapper.java @@ -4,13 +4,11 @@ import cn.bootx.demo.core.sensitive.entity.DataSensitiveDemo; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -/** -* -* @author xxm -* @date 2022/3/24 -*/ +/** + * @author xxm + * @date 2022/3/24 + */ @Mapper public interface DataSensitiveDemoMapper extends BaseMapper { - } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/entity/DataSensitiveDemo.java b/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/entity/DataSensitiveDemo.java index e190cfe4..30d40a64 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/entity/DataSensitiveDemo.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/entity/DataSensitiveDemo.java @@ -10,10 +10,11 @@ import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** -* 数据脱敏 -* @author xxm -* @date 2022/3/24 -*/ + * 数据脱敏 + * + * @author xxm + * @date 2022/3/24 + */ @EqualsAndHashCode(callSuper = true) @Data @Accessors(chain = true) @@ -48,4 +49,5 @@ public class DataSensitiveDemo extends MpBaseEntity { @Schema(description = "其他") @SensitiveInfo(SensitiveType.OTHER) private String other; + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/service/DataSensitiveDemoService.java b/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/service/DataSensitiveDemoService.java index 0f959756..49f63ead 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/service/DataSensitiveDemoService.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/core/sensitive/service/DataSensitiveDemoService.java @@ -11,7 +11,6 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; /** - * * @author xxm * @date 2022/3/24 */ @@ -19,40 +18,42 @@ import org.springframework.stereotype.Service; @Service @RequiredArgsConstructor public class DataSensitiveDemoService { + private final DataSensitiveDemoManager manager; /** * 新增 */ - public void add(DataSensitiveDemo param){ + public void add(DataSensitiveDemo param) { manager.save(param); } /** * 更新 */ - public void update(DataSensitiveDemo param){ + public void update(DataSensitiveDemo param) { manager.updateById(param); } /** * 删除 */ - public void delete(Long id){ + public void delete(Long id) { manager.deleteById(id); } /** * 分页 */ - public PageResult page(PageParam pageParam){ - return MpUtil.convert2PageResult(manager.page(MpUtil.getMpPage(pageParam,DataSensitiveDemo.class))); + public PageResult page(PageParam pageParam) { + return MpUtil.convert2PageResult(manager.page(MpUtil.getMpPage(pageParam, DataSensitiveDemo.class))); } /** * 单条 */ - public DataSensitiveDemo findById(Long id){ + public DataSensitiveDemo findById(Long id) { return manager.findById(id).orElseThrow(DataNotExistException::new); } + } diff --git a/bootx-demo/src/main/java/cn/bootx/demo/ws/WebSocketDemo.java b/bootx-demo/src/main/java/cn/bootx/demo/ws/WebSocketDemo.java index b1cf688a..dde9a0d8 100644 --- a/bootx-demo/src/main/java/cn/bootx/demo/ws/WebSocketDemo.java +++ b/bootx-demo/src/main/java/cn/bootx/demo/ws/WebSocketDemo.java @@ -13,6 +13,7 @@ import java.util.concurrent.atomic.AtomicInteger; /** * websocket demo + * * @author xxm * @date 2022/3/27 */ @@ -20,7 +21,9 @@ import java.util.concurrent.atomic.AtomicInteger; @Component @ServerEndpoint("/test/ws/{userId}") public class WebSocketDemo { + private final WebSocketSessionManager wsManager = new WebSocketSessionManager(); + /** 记录当前在线连接数 */ private static final AtomicInteger onlineCount = new AtomicInteger(0); @@ -28,8 +31,8 @@ public class WebSocketDemo { * 连接建立成功调用的方法 */ @OnOpen - public void onOpen(@PathParam("userId") Long userId,Session session) { - wsManager.addSession(String.valueOf(userId),session); + public void onOpen(@PathParam("userId") Long userId, Session session) { + wsManager.addSession(String.valueOf(userId), session); onlineCount.incrementAndGet(); // 在线数加1 log.info("有新连接加入:{},当前在线人数为:{}", userId, onlineCount.get()); } @@ -47,19 +50,18 @@ public class WebSocketDemo { /** * 收到客户端消息后调用的方法 - * * @param message 客户端发送过来的消息 */ @OnMessage public void onMessage(String message, Session session) { Long userId = Long.valueOf(wsManager.getIdBySession(session)); log.info("服务端收到客户端[{}]的消息:{}", userId, message); - this.sendMessage("响应: "+message,userId); + this.sendMessage("响应: " + message, userId); } @OnError public void onError(Session session, Throwable error) { - log.error("{} 发生错误",session.getId()); + log.error("{} 发生错误", session.getId()); error.printStackTrace(); } @@ -73,7 +75,8 @@ public class WebSocketDemo { for (Session session : sessions) { session.getBasicRemote().sendText(message); } - } catch (Exception e) { + } + catch (Exception e) { log.error("服务端发送消息给客户端失败:", e); } } @@ -87,7 +90,8 @@ public class WebSocketDemo { for (Session session : sessions) { session.getBasicRemote().sendText(message); } - } catch (Exception e) { + } + catch (Exception e) { log.error("服务端发送消息给客户端失败:", e); } } diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictTranslationService.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictTranslationService.java index 3ab84c78..a3686a19 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictTranslationService.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/core/dict/service/DictTranslationService.java @@ -125,23 +125,12 @@ public class DictTranslationService { .setDictTranslation(dictTranslation); } - /** - * 获取字典值 - */ - private String getDictValue(String dictCode, String dictItemCode, List dictItems){ - return dictItems.stream() - .filter(o->Objects.equals(o.getDictCode(),dictCode) && Objects.equals(o.getCode(),dictItemCode)) - .findFirst() - .map(DictionaryItemSimpleDto::getName) - .orElse(null); - } - /** * 转换成map */ public Map translationToMap(Object o){ List dictItems = dictionaryItemService.findAllByEnable(); - return new HashMap<>(); + return this.translationToMap(o,dictItems); } /** @@ -149,8 +138,89 @@ public class DictTranslationService { */ public Iterable> translationToMap(Iterable objects){ List dictItems = dictionaryItemService.findAllByEnable(); + return dictItems.stream().map(o->this.translationToMap(o,dictItems)).collect(Collectors.toList()); + } + + /** + * 翻译后并转换成Map对象 + * @param object 要翻译转换的对象 + * @param dictItems 字典列表 + * @return 转换后的Map对象 + */ + private Map translationToMap(Object object,List dictItems){ + if (Objects.isNull(object)){ + return null; + } + // 转换后的对象 + Map map = BeanUtil.beanToMap(object); + + // 遍历字段, 判断是否有嵌套对象 + Map convertInfoMap = Arrays.stream(BeanUtil.getPropertyDescriptors(object.getClass())) + .map(this::initConvertInfo) + .collect(Collectors.toMap(DictConvertInfo::getName, Function.identity(), (o1, o2) -> o2)); - return new ArrayList<>(); + // 加注解的嵌套对象进行递归处理 + convertInfoMap.values().stream() + .filter(o-> Objects.nonNull(o.getDictTranslation())) + .forEach(o->{ + Object fieldValue = BeanUtil.getFieldValue(object, o.getName()); + if (Objects.nonNull(fieldValue)){ + // 将转换后的Map进行赋值 + map.put(o.getName(),this.translationToMap(fieldValue,dictItems)); + } + }); + + // 筛选出带翻译注解的进行字段翻译转换 + convertInfoMap.values().stream() + .filter(o-> Objects.nonNull(o.getDict())) + .forEach(o-> this.translationToMap(o,object,map,dictItems)); + return map; + } + + /** + * 字典转换 + * @param convertInfo 转换所需的元信息 + * @param convertObject 要进行字典转换的对象 + * @param map 要写入的map对象 + * @param dictItems 字典列表 + */ + private void translationToMap(DictConvertInfo convertInfo, Object convertObject, Map map, List dictItems) { + Dict dict = convertInfo.getDict(); + // 直接在当前字段上进行转换 + if (StrUtil.isAllBlank(dict.source(), dict.target())){ + Object fieldValue = BeanUtil.getFieldValue(convertObject, convertInfo.getName()); + if (!StrUtil.isBlankIfStr(fieldValue)){ + String dictValue = this.getDictValue(dict.dicCode(), fieldValue.toString(), dictItems); + map.put(convertInfo.getName(), dictValue); + } + } + // 通过配置的源字段进行转换并赋值到当前字段 + if (StrUtil.isNotBlank(dict.source())){ + Object fieldValue = BeanUtil.getFieldValue(convertObject, dict.source()); + if (!StrUtil.isBlankIfStr(fieldValue)){ + String dictValue = this.getDictValue(dict.dicCode(), fieldValue.toString(), dictItems); + map.put(convertInfo.getName(), dictValue); + } + } + // 将当前字段转换到其他字段上 + if (StrUtil.isNotBlank(dict.target())){ + Object fieldValue = BeanUtil.getFieldValue(convertObject, convertInfo.getName()); + if (!StrUtil.isBlankIfStr(fieldValue)){ + String dictValue = this.getDictValue(dict.dicCode(), fieldValue.toString(), dictItems); + map.put(dict.target(), dictValue); + } + } + } + + /** + * 获取字典值 + */ + private String getDictValue(String dictCode, String dictItemCode, List dictItems){ + return dictItems.stream() + .filter(o->Objects.equals(o.getDictCode(),dictCode) && Objects.equals(o.getCode(),dictItemCode)) + .findFirst() + .map(DictionaryItemSimpleDto::getName) + .orElse(null); } /** diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictAnnotationAdvisor.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictAnnotationAdvisor.java index 2cb9a235..d039ae02 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictAnnotationAdvisor.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictAnnotationAdvisor.java @@ -9,7 +9,7 @@ import org.springframework.aop.support.annotation.AnnotationMatchingPointcut; import org.springframework.stereotype.Component; /** - * 抽象切入点 + * 字段翻译切入点配置 * @author xxm * @date 2022/12/20 */ diff --git a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictInterceptor.java b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictInterceptor.java index 28eefc5d..fe188725 100644 --- a/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictInterceptor.java +++ b/bootx-services/service-baseapi/src/main/java/cn/bootx/baseapi/handler/dict/DictInterceptor.java @@ -28,6 +28,9 @@ public class DictInterceptor implements MethodInterceptor { @Nullable @Override public Object invoke(@NotNull MethodInvocation invocation) throws Throwable { + if (Objects.isNull(invocation)){ + return null; + } // 使用其他aop组件时,aop切了两次. Class cls = AopProxyUtils.ultimateTargetClass(invocation.getThis()); if (!cls.equals(invocation.getThis().getClass())) { diff --git a/bootx-start/src/main/java/cn/bootx/start/BootxApplication.java b/bootx-start/src/main/java/cn/bootx/start/BootxApplication.java index edff7341..53605bdd 100644 --- a/bootx-start/src/main/java/cn/bootx/start/BootxApplication.java +++ b/bootx-start/src/main/java/cn/bootx/start/BootxApplication.java @@ -10,11 +10,12 @@ import org.springframework.core.env.Environment; import java.net.InetAddress; import java.net.UnknownHostException; -/** -* -* @author xxm -* @date 2021/7/27 -*/ +/** + * 启动类 + * + * @author xxm + * @date 2021/7/27 + */ @Slf4j @SpringBootApplication public class BootxApplication { @@ -32,14 +33,13 @@ public class BootxApplication { // 应用信息栏 String appInfo = StrUtil.format("应用 '{}' 运行成功! \n\t", appName); // swagger栏 - String swagger = StrUtil.format("Swagger文档: \t\thttp://{}:{}{}{}/doc.html\n\t", host,port,contextPath,path); + String swagger = StrUtil.format("Swagger文档: \t\thttp://{}:{}{}{}/doc.html\n\t", host, port, contextPath, path); // plumelog栏 - String plumelog = StrUtil.format("PlumeLog日志管理: \t\thttp://{}:{}{}{}/plumelog/#/", host,port,contextPath,path); + String plumelog = StrUtil.format("PlumeLog日志管理: \t\thttp://{}:{}{}{}/plumelog/#/", host, port, contextPath, + path); - log.info("\n----------------------------------------------------------\n\t" + - "{}{}{} \n" + - "----------------------------------------------------------", - appInfo,swagger,plumelog - ); + log.info("\n----------------------------------------------------------\n\t" + "{}{}{} \n" + + "----------------------------------------------------------", appInfo, swagger, plumelog); } + } diff --git a/bootx-start/src/main/resources/application-dev.yml b/bootx-start/src/main/resources/application-dev.yml index 1cd93012..9d8e0aad 100644 --- a/bootx-start/src/main/resources/application-dev.yml +++ b/bootx-start/src/main/resources/application-dev.yml @@ -89,6 +89,9 @@ bootx: version: 1.1.1 title: bootx开发平台单体版 description: bootx-platform开发平台单体版 + # basic认证 + basic: + enable: true # 多模块扫码 base-packages: "[基础API]": cn.bootx.baseapi diff --git a/pom.xml b/pom.xml index 2ac368aa..0384c93b 100644 --- a/pom.xml +++ b/pom.xml @@ -44,6 +44,7 @@ 2.11.0 31.1-jre 4.0.1 + 0.0.35 1.7.30 2.14.2 7.15.0 @@ -354,6 +355,12 @@ org.codehaus.mojo versions-maven-plugin + + + io.spring.javaformat + spring-javaformat-maven-plugin + ${spring.checkstyle.version} + org.apache.maven.plugins -- Gitee From b2064ed24a99b46b9c79dbb2a37a7b5b0b8a502f Mon Sep 17 00:00:00 2001 From: xxm Date: Wed, 21 Dec 2022 23:33:30 +0800 Subject: [PATCH 15/15] =?UTF-8?q?build=201.1.9=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +- _config/sql/1.1.8/1.1.8_up_1.1.9.sql | 9 + _config/sql/bootx-platform.sql | 341 +++++++++--------- _doc/ChangeLog.md | 24 +- _license/LICENSE.md | 3 + _license/knife4j/LICENSE | 191 ++++++++++ bootx-common-core/pom.xml | 4 +- .../common-starter-audit-log/pom.xml | 4 +- .../common-starter-auth/pom.xml | 4 +- .../common-starter-code-gen/pom.xml | 4 +- .../common-starter-data-perm/pom.xml | 4 +- .../common-starter-dingtalk/pom.xml | 4 +- .../common-starter-file/pom.xml | 4 +- .../common-starter-flowable/pom.xml | 4 +- .../common-starter-monitor/pom.xml | 4 +- .../common-starter-quartz/pom.xml | 4 +- .../common-starter-wechat/pom.xml | 4 +- .../common-starter-wecom/pom.xml | 4 +- bootx-common-starters/pom.xml | 4 +- bootx-commons/common-actable/pom.xml | 2 +- bootx-commons/common-cache/pom.xml | 4 +- .../common-exception-handler/pom.xml | 4 +- bootx-commons/common-header-holder/pom.xml | 4 +- bootx-commons/common-idempotency/pom.xml | 4 +- bootx-commons/common-jackson/pom.xml | 4 +- bootx-commons/common-lock/pom.xml | 2 +- bootx-commons/common-log/pom.xml | 4 +- bootx-commons/common-mongo/pom.xml | 4 +- bootx-commons/common-mqtt/pom.xml | 4 +- bootx-commons/common-mybatis-plus/pom.xml | 4 +- bootx-commons/common-rabbitmq/pom.xml | 4 +- bootx-commons/common-redis-client/pom.xml | 2 +- bootx-commons/common-sequence/pom.xml | 4 +- bootx-commons/common-spring/pom.xml | 4 +- bootx-commons/common-super-query/pom.xml | 4 +- bootx-commons/common-swagger/pom.xml | 2 +- bootx-commons/common-websocket/pom.xml | 4 +- bootx-commons/common-xxl-job/pom.xml | 4 +- bootx-commons/pom.xml | 2 +- bootx-demo/pom.xml | 4 +- bootx-modules/module-eshop/pom.xml | 4 +- bootx-modules/pom.xml | 4 +- bootx-services/pom.xml | 2 +- bootx-services/service-baseapi/pom.xml | 4 +- bootx-services/service-goods/pom.xml | 4 +- bootx-services/service-iam/pom.xml | 4 +- bootx-services/service-notice/pom.xml | 4 +- bootx-services/service-office/pom.xml | 4 +- bootx-services/service-order/pom.xml | 4 +- bootx-services/service-payment/pom.xml | 4 +- bootx-services/service-sales/pom.xml | 4 +- bootx-start/pom.xml | 4 +- ...release.sql => V1.1.9_221221__release.sql} | 341 +++++++++--------- pom.xml | 4 +- 54 files changed, 659 insertions(+), 430 deletions(-) create mode 100644 _config/sql/1.1.8/1.1.8_up_1.1.9.sql create mode 100644 _license/knife4j/LICENSE rename bootx-start/src/main/resources/db/migration/{V1.1.8_221206__release.sql => V1.1.9_221221__release.sql} (92%) diff --git a/README.md b/README.md index 5e6a2e83..ae9e6c6f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Bootx-Platform (v1.1.8) +# Bootx-Platform (v1.1.9)

star - Build Status + Build Status Build Status Downloads diff --git a/_config/sql/1.1.8/1.1.8_up_1.1.9.sql b/_config/sql/1.1.8/1.1.8_up_1.1.9.sql new file mode 100644 index 00000000..07159f27 --- /dev/null +++ b/_config/sql/1.1.8/1.1.8_up_1.1.9.sql @@ -0,0 +1,9 @@ +SET FOREIGN_KEY_CHECKS = 0; + +ALTER TABLE `base_dict` ADD COLUMN `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '启用状态' AFTER `name`; + +ALTER TABLE `base_dict_item` ADD COLUMN `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '启用状态' AFTER `name`; + +ALTER TABLE `base_param` ADD COLUMN `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '启用状态' AFTER `type`; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/_config/sql/bootx-platform.sql b/_config/sql/bootx-platform.sql index 858f22fc..45c73885 100644 --- a/_config/sql/bootx-platform.sql +++ b/_config/sql/bootx-platform.sql @@ -9,7 +9,7 @@ Target Server Version : 50735 File Encoding : 65001 - Date: 06/12/2022 16:16:00 + Date: 21/12/2022 23:29:53 */ SET NAMES utf8mb4; @@ -23,6 +23,7 @@ CREATE TABLE `base_dict` ( `id` bigint(20) NOT NULL, `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '编码', `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '名称', + `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '启用状态', `group_tag` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '分类标签', `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人', @@ -37,37 +38,37 @@ CREATE TABLE `base_dict` ( -- ---------------------------- -- Records of base_dict -- ---------------------------- -INSERT INTO `base_dict` VALUES (1422929378374828033, 'Sex', '性别', '基础属性', '性别', 0, '2021-08-04 22:36:15', 1399985191002447872, '2022-05-11 19:48:40', 0, 6); -INSERT INTO `base_dict` VALUES (1425744045414772737, 'MenuType', '菜单类型', '系统属性', '菜单类型', 0, '2021-08-12 17:00:44', 1399985191002447872, '2022-05-11 19:48:44', 0, 4); -INSERT INTO `base_dict` VALUES (1430063572491411456, 'loginType', '字典类型', NULL, '字典类型', 1399985191002447872, '2021-08-24 15:05:00', 1399985191002447872, '2021-08-24 15:05:00', 1, 2); -INSERT INTO `base_dict` VALUES (1435829999592759296, 'UserStatusCode', '用户状态码', '系统属性', '用户状态码', 1399985191002447872, '2021-09-09 12:58:43', 1399985191002447872, '2022-05-11 19:48:56', 0, 2); -INSERT INTO `base_dict` VALUES (1435838066191458304, 'LogBusinessType', '业务操作类型', '系统属性', '操作日志记录的业务操作类型', 1399985191002447872, '2021-09-09 13:30:46', 1399985191002447872, '2022-05-11 19:49:00', 0, 2); -INSERT INTO `base_dict` VALUES (1438078864509317120, 'MailSecurityCode', '邮箱安全方式编码', '消息服务', '邮箱安全方式编码', 1399985191002447872, '2021-09-15 17:54:54', 1399985191002447872, '2022-05-11 19:49:06', 0, 2); -INSERT INTO `base_dict` VALUES (1439961232651034624, 'MessageTemplateCode', '消息模板类型', '消息服务', '消息模板类型', 1399985191002447872, '2021-09-20 22:34:46', 1399985191002447872, '2022-05-11 19:48:34', 0, 1); -INSERT INTO `base_dict` VALUES (1452836604783845376, 'SocialType', '三方系统类型', '系统属性', '三方系统类型', 1399985191002447872, '2021-10-26 11:16:54', 1399985191002447872, '2022-05-11 19:48:28', 0, 3); -INSERT INTO `base_dict` VALUES (1452843488735621120, 'ParamType', '参数类型', '系统属性', '参数类型', 1399985191002447872, '2021-10-26 11:44:15', 1399985191002447872, '2022-05-11 19:48:21', 0, 2); -INSERT INTO `base_dict` VALUES (1496024933900169216, 'Political', '政治面貌', '基础数据', '政治面貌', 1399985191002447872, '2022-02-22 15:31:54', 1399985191002447872, '2022-05-11 19:48:04', 0, 1); -INSERT INTO `base_dict` VALUES (1496722894707728384, 'PayChannel', '支付通道', '支付服务', '支付宝, 微信, 云闪付等', 1399985191002447872, '2022-02-24 13:45:21', 1399985191002447872, '2022-05-11 19:47:51', 0, 1); -INSERT INTO `base_dict` VALUES (1496723207565058048, 'PayWay', '支付方式', '支付服务', '扫码支付、Wap、App支付等', 1399985191002447872, '2022-02-24 13:46:35', 1399985191002447872, '2022-05-11 19:47:46', 0, 1); -INSERT INTO `base_dict` VALUES (1497140849954185216, 'PayStatus', '支付状态', '支付服务', '支付中,成功,失败等', 1399985191002447872, '2022-02-25 17:26:09', 1399985191002447872, '2022-05-11 19:47:40', 0, 2); -INSERT INTO `base_dict` VALUES (1501031423232937984, 'AsyncPayChannel', '异步支付通道', '支付服务', '如微信支付宝云闪付等第三方支付', 1399985191002447872, '2022-03-08 11:05:54', 1399985191002447872, '2022-05-11 19:47:37', 0, 1); -INSERT INTO `base_dict` VALUES (1502276739978473472, 'WalletStatus', '钱包状态', '支付服务', '钱包状态', 1399985191002447872, '2022-03-11 21:34:20', 1399985191002447872, '2022-05-11 19:47:33', 0, 2); -INSERT INTO `base_dict` VALUES (1502624342339448832, 'WalletOperation', '钱包日志操作类型', NULL, '', 1399985191002447872, '2022-03-12 20:35:35', 1399985191002447872, '2022-03-12 20:35:35', 1, 0); -INSERT INTO `base_dict` VALUES (1502624515799085056, 'WalletLogType', '钱包日志类型', '支付服务', '钱包日志类型', 1399985191002447872, '2022-03-12 20:36:17', 1399985191002447872, '2022-05-11 19:47:29', 0, 1); -INSERT INTO `base_dict` VALUES (1502624632392347648, 'WalletLogOperation', '钱包日志操作类型', '支付服务', '钱包日志操作类型', 1399985191002447872, '2022-03-12 20:36:44', 1399985191002447872, '2022-05-11 19:47:21', 0, 1); -INSERT INTO `base_dict` VALUES (1503340128037212160, 'VoucherStatus', '储值卡状态', '支付服务', '储值卡状态', 1399985191002447872, '2022-03-14 19:59:52', 1399985191002447872, '2022-05-11 19:47:12', 0, 1); -INSERT INTO `base_dict` VALUES (1524356168611188736, 'input', '手工输入', '商品服务', '', 1399985191002447872, '2022-05-11 19:50:06', 1399985191002447872, '2022-05-11 19:50:06', 1, 0); -INSERT INTO `base_dict` VALUES (1524356376518643712, 'GoodsParamType', '参数类型', '商品服务', '列表/手动输入', 1399985191002447872, '2022-05-11 19:50:56', 1399985191002447872, '2022-05-14 23:05:41', 0, 1); -INSERT INTO `base_dict` VALUES (1546757092010078208, 'PayNotifyProcess', '支付回调处理状态', '支付服务', '成功/忽略/失败', 1399985191002447872, '2022-07-12 15:23:23', 1399985191002447872, '2022-07-12 15:23:53', 0, 1); -INSERT INTO `base_dict` VALUES (1556996322223968256, 'WeChatMediaType', '微信媒体类型', '微信', '微信媒体类型', 1399985191002447872, '2022-08-09 21:30:25', 1399985191002447872, '2022-08-09 21:30:26', 0, 0); -INSERT INTO `base_dict` VALUES (1561003021674987520, 'SiteMessageReceive', '消息接收类型', '站内信', '站内信接收类型', 1399985191002447872, '2022-08-20 22:51:37', 1399985191002447872, '2022-08-20 22:51:37', 0, 0); -INSERT INTO `base_dict` VALUES (1561003189111603200, 'SiteMessageState', '消息发布状态', '站内信', '站内信消息发布状态', 1399985191002447872, '2022-08-20 22:52:17', 1399985191002447872, '2022-08-20 22:52:17', 0, 0); -INSERT INTO `base_dict` VALUES (1562696107020230656, 'BpmModelPublish', '工作流模型发布状态', '工作流', '工作流模型发布状态', 1399985191002447872, '2022-08-25 14:59:20', 1399985191002447872, '2022-08-25 15:27:55', 0, 1); -INSERT INTO `base_dict` VALUES (1563083969989423104, 'BpmTaskAssignType', '工作流处理人分配类型', '工作流', '流程任务处理人分配类型', 1399985191002447872, '2022-08-26 16:40:34', 1399985191002447872, '2022-08-26 16:40:53', 0, 1); -INSERT INTO `base_dict` VALUES (1567091641298386944, 'BpmTaskState', '流程任务状态', '工作流', '流程任务状态', 1399985191002447872, '2022-09-06 18:05:37', 1399985191002447872, '2022-09-06 18:05:47', 0, 1); -INSERT INTO `base_dict` VALUES (1570343684024705024, 'BpmTaskResult', '流程任务处理结果', '工作流', '流程任务处理结果', 1399985191002447872, '2022-09-15 17:28:05', 1414143554414059520, '2022-10-19 23:13:40', 0, 1); -INSERT INTO `base_dict` VALUES (1570764395519111168, 'BpmInstanceState', '流程实例状态', '工作流', '流程实例状态', 1399985191002447872, '2022-09-16 21:19:50', 1414143554414059520, '2022-10-19 23:13:33', 0, 1); -INSERT INTO `base_dict` VALUES (1589527951317389312, 'DataScopePerm', '数据范围权限', '系统属性', '数据范围权限', 1414143554414059520, '2022-11-07 15:59:30', 1414143554414059520, '2022-11-07 16:00:27', 0, 1); +INSERT INTO `base_dict` VALUES (1422929378374828033, 'Sex', '性别', b'1', '基础属性', '性别', 0, '2021-08-04 22:36:15', 1399985191002447872, '2022-05-11 19:48:40', 0, 6); +INSERT INTO `base_dict` VALUES (1425744045414772737, 'MenuType', '菜单类型', b'1', '系统属性', '菜单类型', 0, '2021-08-12 17:00:44', 1399985191002447872, '2022-05-11 19:48:44', 0, 4); +INSERT INTO `base_dict` VALUES (1430063572491411456, 'loginType', '字典类型', b'1', NULL, '字典类型', 1399985191002447872, '2021-08-24 15:05:00', 1399985191002447872, '2021-08-24 15:05:00', 1, 2); +INSERT INTO `base_dict` VALUES (1435829999592759296, 'UserStatusCode', '用户状态码', b'1', '系统属性', '用户状态码', 1399985191002447872, '2021-09-09 12:58:43', 1399985191002447872, '2022-05-11 19:48:56', 0, 2); +INSERT INTO `base_dict` VALUES (1435838066191458304, 'LogBusinessType', '业务操作类型', b'1', '系统属性', '操作日志记录的业务操作类型', 1399985191002447872, '2021-09-09 13:30:46', 1399985191002447872, '2022-05-11 19:49:00', 0, 2); +INSERT INTO `base_dict` VALUES (1438078864509317120, 'MailSecurityCode', '邮箱安全方式编码', b'1', '消息服务', '邮箱安全方式编码', 1399985191002447872, '2021-09-15 17:54:54', 1399985191002447872, '2022-05-11 19:49:06', 0, 2); +INSERT INTO `base_dict` VALUES (1439961232651034624, 'MessageTemplateCode', '消息模板类型', b'1', '消息服务', '消息模板类型', 1399985191002447872, '2021-09-20 22:34:46', 1399985191002447872, '2022-05-11 19:48:34', 0, 1); +INSERT INTO `base_dict` VALUES (1452836604783845376, 'SocialType', '三方系统类型', b'1', '系统属性', '三方系统类型', 1399985191002447872, '2021-10-26 11:16:54', 1399985191002447872, '2022-05-11 19:48:28', 0, 3); +INSERT INTO `base_dict` VALUES (1452843488735621120, 'ParamType', '参数类型', b'1', '系统属性', '参数类型', 1399985191002447872, '2021-10-26 11:44:15', 1399985191002447872, '2022-05-11 19:48:21', 0, 2); +INSERT INTO `base_dict` VALUES (1496024933900169216, 'Political', '政治面貌', b'1', '基础数据', '政治面貌', 1399985191002447872, '2022-02-22 15:31:54', 1399985191002447872, '2022-05-11 19:48:04', 0, 1); +INSERT INTO `base_dict` VALUES (1496722894707728384, 'PayChannel', '支付通道', b'1', '支付服务', '支付宝, 微信, 云闪付等', 1399985191002447872, '2022-02-24 13:45:21', 1399985191002447872, '2022-05-11 19:47:51', 0, 1); +INSERT INTO `base_dict` VALUES (1496723207565058048, 'PayWay', '支付方式', b'1', '支付服务', '扫码支付、Wap、App支付等', 1399985191002447872, '2022-02-24 13:46:35', 1399985191002447872, '2022-05-11 19:47:46', 0, 1); +INSERT INTO `base_dict` VALUES (1497140849954185216, 'PayStatus', '支付状态', b'1', '支付服务', '支付中,成功,失败等', 1399985191002447872, '2022-02-25 17:26:09', 1399985191002447872, '2022-05-11 19:47:40', 0, 2); +INSERT INTO `base_dict` VALUES (1501031423232937984, 'AsyncPayChannel', '异步支付通道', b'1', '支付服务', '如微信支付宝云闪付等第三方支付', 1399985191002447872, '2022-03-08 11:05:54', 1399985191002447872, '2022-05-11 19:47:37', 0, 1); +INSERT INTO `base_dict` VALUES (1502276739978473472, 'WalletStatus', '钱包状态', b'1', '支付服务', '钱包状态', 1399985191002447872, '2022-03-11 21:34:20', 1399985191002447872, '2022-05-11 19:47:33', 0, 2); +INSERT INTO `base_dict` VALUES (1502624342339448832, 'WalletOperation', '钱包日志操作类型', b'1', NULL, '', 1399985191002447872, '2022-03-12 20:35:35', 1399985191002447872, '2022-03-12 20:35:35', 1, 0); +INSERT INTO `base_dict` VALUES (1502624515799085056, 'WalletLogType', '钱包日志类型', b'1', '支付服务', '钱包日志类型', 1399985191002447872, '2022-03-12 20:36:17', 1399985191002447872, '2022-05-11 19:47:29', 0, 1); +INSERT INTO `base_dict` VALUES (1502624632392347648, 'WalletLogOperation', '钱包日志操作类型', b'1', '支付服务', '钱包日志操作类型', 1399985191002447872, '2022-03-12 20:36:44', 1399985191002447872, '2022-05-11 19:47:21', 0, 1); +INSERT INTO `base_dict` VALUES (1503340128037212160, 'VoucherStatus', '储值卡状态', b'1', '支付服务', '储值卡状态', 1399985191002447872, '2022-03-14 19:59:52', 1399985191002447872, '2022-05-11 19:47:12', 0, 1); +INSERT INTO `base_dict` VALUES (1524356168611188736, 'input', '手工输入', b'1', '商品服务', '', 1399985191002447872, '2022-05-11 19:50:06', 1399985191002447872, '2022-05-11 19:50:06', 1, 0); +INSERT INTO `base_dict` VALUES (1524356376518643712, 'GoodsParamType', '参数类型', b'1', '商品服务', '列表/手动输入', 1399985191002447872, '2022-05-11 19:50:56', 1399985191002447872, '2022-05-14 23:05:41', 0, 1); +INSERT INTO `base_dict` VALUES (1546757092010078208, 'PayNotifyProcess', '支付回调处理状态', b'1', '支付服务', '成功/忽略/失败', 1399985191002447872, '2022-07-12 15:23:23', 1399985191002447872, '2022-07-12 15:23:53', 0, 1); +INSERT INTO `base_dict` VALUES (1556996322223968256, 'WeChatMediaType', '微信媒体类型', b'1', '微信', '微信媒体类型', 1399985191002447872, '2022-08-09 21:30:25', 1399985191002447872, '2022-08-09 21:30:26', 0, 0); +INSERT INTO `base_dict` VALUES (1561003021674987520, 'SiteMessageReceive', '消息接收类型', b'1', '站内信', '站内信接收类型', 1399985191002447872, '2022-08-20 22:51:37', 1399985191002447872, '2022-08-20 22:51:37', 0, 0); +INSERT INTO `base_dict` VALUES (1561003189111603200, 'SiteMessageState', '消息发布状态', b'1', '站内信', '站内信消息发布状态', 1399985191002447872, '2022-08-20 22:52:17', 1399985191002447872, '2022-08-20 22:52:17', 0, 0); +INSERT INTO `base_dict` VALUES (1562696107020230656, 'BpmModelPublish', '工作流模型发布状态', b'1', '工作流', '工作流模型发布状态', 1399985191002447872, '2022-08-25 14:59:20', 1399985191002447872, '2022-08-25 15:27:55', 0, 1); +INSERT INTO `base_dict` VALUES (1563083969989423104, 'BpmTaskAssignType', '工作流处理人分配类型', b'1', '工作流', '流程任务处理人分配类型', 1399985191002447872, '2022-08-26 16:40:34', 1399985191002447872, '2022-08-26 16:40:53', 0, 1); +INSERT INTO `base_dict` VALUES (1567091641298386944, 'BpmTaskState', '流程任务状态', b'1', '工作流', '流程任务状态', 1399985191002447872, '2022-09-06 18:05:37', 1399985191002447872, '2022-09-06 18:05:47', 0, 1); +INSERT INTO `base_dict` VALUES (1570343684024705024, 'BpmTaskResult', '流程任务处理结果', b'1', '工作流', '流程任务处理结果', 1399985191002447872, '2022-09-15 17:28:05', 1414143554414059520, '2022-10-19 23:13:40', 0, 1); +INSERT INTO `base_dict` VALUES (1570764395519111168, 'BpmInstanceState', '流程实例状态', b'1', '工作流', '流程实例状态', 1399985191002447872, '2022-09-16 21:19:50', 1414143554414059520, '2022-10-19 23:13:33', 0, 1); +INSERT INTO `base_dict` VALUES (1589527951317389312, 'DataScopePerm', '数据范围权限', b'1', '系统属性', '数据范围权限', 1414143554414059520, '2022-11-07 15:59:30', 1414143554414059520, '2022-11-07 16:00:27', 0, 1); -- ---------------------------- -- Table structure for base_dict_item @@ -79,6 +80,7 @@ CREATE TABLE `base_dict_item` ( `dict_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '字典code', `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '字典项code', `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '字典项名称', + `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '启用状态', `sort_no` double(8, 2) NOT NULL COMMENT '排序', `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人', @@ -94,137 +96,137 @@ CREATE TABLE `base_dict_item` ( -- ---------------------------- -- Records of base_dict_item -- ---------------------------- -INSERT INTO `base_dict_item` VALUES (1422931375807242241, 1422929378374828033, 'Sex', '1', '男', 0.00, '男性', 0, '2021-08-04 22:44:11', 0, '2021-08-04 22:44:11', 0, 2); -INSERT INTO `base_dict_item` VALUES (1425729455402401794, 1422929378374828033, 'Sex', '2', '女', 0.00, '女性', 0, '2021-08-12 16:02:46', 0, '2021-08-12 16:02:46', 0, 1); -INSERT INTO `base_dict_item` VALUES (1425744258544136194, 1425744045414772737, 'MenuType', '0', '顶级菜单', 0.00, '顶级菜单', 0, '2021-08-12 17:01:35', 0, '2021-08-12 17:01:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1425744436592340993, 1425744045414772737, 'MenuType', '1', '子菜单', 0.00, '子菜单', 0, '2021-08-12 17:02:17', 0, '2021-08-12 17:02:17', 0, 0); -INSERT INTO `base_dict_item` VALUES (1425744470582980610, 1425744045414772737, 'MenuType', '2', '按钮权限', 0.00, '按钮权限', 0, '2021-08-12 17:02:26', 0, '2021-08-12 17:02:26', 0, 0); -INSERT INTO `base_dict_item` VALUES (1430094707250413568, 1422929378374828033, 'Sex', '0', '未知', 0.00, '不确定性别', 1399985191002447872, '2021-08-24 17:08:43', 1399985191002447872, '2021-08-24 17:08:43', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435830086406463488, 1435829999592759296, 'UserStatusCode', '1', '正常', 0.00, 'NORMAL', 1399985191002447872, '2021-09-09 12:59:04', 1399985191002447872, '2021-09-09 12:59:04', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435830141855162368, 1435829999592759296, 'UserStatusCode', '2', '锁定', 0.00, 'LOCK, 多次登录失败被锁定', 1399985191002447872, '2021-09-09 12:59:17', 1399985191002447872, '2021-09-09 12:59:17', 0, 1); -INSERT INTO `base_dict_item` VALUES (1435830260503633920, 1435829999592759296, 'UserStatusCode', '3', '封禁', 0.00, 'BAN', 1399985191002447872, '2021-09-09 12:59:45', 1399985191002447872, '2021-09-09 12:59:45', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838374749626368, 1435838066191458304, 'LogBusinessType', 'other', '其它', 0.00, '', 1399985191002447872, '2021-09-09 13:32:00', 1399985191002447872, '2021-09-09 13:32:00', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838414436130816, 1435838066191458304, 'LogBusinessType', 'insert', '新增', 0.00, '', 1399985191002447872, '2021-09-09 13:32:09', 1399985191002447872, '2021-09-09 13:32:09', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838467624099840, 1435838066191458304, 'LogBusinessType', 'update', '修改', 0.00, '', 1399985191002447872, '2021-09-09 13:32:22', 1399985191002447872, '2021-09-09 13:32:22', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838502755590144, 1435838066191458304, 'LogBusinessType', 'delete', '删除', 0.00, '', 1399985191002447872, '2021-09-09 13:32:30', 1399985191002447872, '2021-09-09 13:32:30', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838546934194176, 1435838066191458304, 'LogBusinessType', 'grant', '授权', 0.00, '', 1399985191002447872, '2021-09-09 13:32:41', 1399985191002447872, '2021-09-09 13:32:41', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838605537009664, 1435838066191458304, 'LogBusinessType', 'export', '导出', 0.00, '', 1399985191002447872, '2021-09-09 13:32:55', 1399985191002447872, '2021-09-09 13:32:55', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838705457913856, 1435838066191458304, 'LogBusinessType', 'import', '导入', 0.00, '', 1399985191002447872, '2021-09-09 13:33:19', 1399985191002447872, '2021-09-09 13:33:19', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838745861644288, 1435838066191458304, 'LogBusinessType', 'force', '强退', 0.00, '', 1399985191002447872, '2021-09-09 13:33:28', 1399985191002447872, '2021-09-09 13:33:28', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838786273763328, 1435838066191458304, 'LogBusinessType', 'clean', '清空数据', 0.00, '', 1399985191002447872, '2021-09-09 13:33:38', 1399985191002447872, '2021-09-09 13:33:38', 0, 0); -INSERT INTO `base_dict_item` VALUES (1438079113630003200, 1438078864509317120, 'MailSecurityCode', '1', '普通方式', 0.00, 'SECURITY_TYPE_PLAIN', 1399985191002447872, '2021-09-15 17:55:54', 1399985191002447872, '2021-09-15 17:55:54', 0, 0); -INSERT INTO `base_dict_item` VALUES (1438080323061755904, 1438078864509317120, 'MailSecurityCode', '2', 'TLS方式', 0.00, 'SECURITY_TYPE_TLS', 1399985191002447872, '2021-09-15 18:00:42', 1399985191002447872, '2021-09-15 18:00:42', 0, 0); -INSERT INTO `base_dict_item` VALUES (1438080372231581696, 1438078864509317120, 'MailSecurityCode', '3', 'SSL方式', 0.00, 'SECURITY_TYPE_SSL', 1399985191002447872, '2021-09-15 18:00:54', 1399985191002447872, '2021-09-15 18:00:54', 0, 0); -INSERT INTO `base_dict_item` VALUES (1439961603914047488, 1439961232651034624, 'MessageTemplateCode', '5', '微信', -10.00, 'WECHAT', 1399985191002447872, '2021-09-20 22:36:14', 1399985191002447872, '2021-09-20 22:36:14', 0, 1); -INSERT INTO `base_dict_item` VALUES (1439961704321490944, 1439961232651034624, 'MessageTemplateCode', '4', 'Email', 0.00, 'EMAIL', 1399985191002447872, '2021-09-20 22:36:38', 1399985191002447872, '2021-09-20 22:36:38', 0, 0); -INSERT INTO `base_dict_item` VALUES (1439962132744478720, 1439961232651034624, 'MessageTemplateCode', '3', '短信', 0.00, 'SMS', 1399985191002447872, '2021-09-20 22:38:20', 1399985191002447872, '2021-09-20 22:38:20', 0, 0); -INSERT INTO `base_dict_item` VALUES (1439962205578567680, 1439961232651034624, 'MessageTemplateCode', '2', '钉钉机器人', 0.00, 'DING_TALK_ROBOT', 1399985191002447872, '2021-09-20 22:38:38', 1399985191002447872, '2021-09-20 22:38:38', 0, 0); -INSERT INTO `base_dict_item` VALUES (1439962267511660544, 1439961232651034624, 'MessageTemplateCode', '1', '钉钉', 0.00, 'DING_TALK', 1399985191002447872, '2021-09-20 22:38:52', 1399985191002447872, '2021-09-20 22:38:52', 0, 0); -INSERT INTO `base_dict_item` VALUES (1452836696873984000, 1452836604783845376, 'SocialType', 'WeChat', '微信', 0.00, '', 1399985191002447872, '2021-10-26 11:17:16', 1399985191002447872, '2021-10-26 11:17:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1452837435482529792, 1452836604783845376, 'SocialType', 'QQ', 'QQ', 0.00, '', 1399985191002447872, '2021-10-26 11:20:12', 1399985191002447872, '2021-10-26 11:20:12', 0, 0); -INSERT INTO `base_dict_item` VALUES (1452837523030237184, 1452836604783845376, 'SocialType', 'DingTalk', '钉钉', 0.00, '', 1399985191002447872, '2021-10-26 11:20:33', 1399985191002447872, '2021-10-26 11:20:33', 0, 0); -INSERT INTO `base_dict_item` VALUES (1452844537911406592, 1452843488735621120, 'ParamType', '1', '系统参数', 0.00, '', 1399985191002447872, '2021-10-26 11:48:25', 1399985191002447872, '2021-10-26 11:48:25', 0, 0); -INSERT INTO `base_dict_item` VALUES (1452844565031776256, 1452843488735621120, 'ParamType', '2', '用户参数', 0.00, '', 1399985191002447872, '2021-10-26 11:48:32', 1399985191002447872, '2021-10-26 11:48:32', 0, 2); -INSERT INTO `base_dict_item` VALUES (1496026946344005632, 1496024933900169216, 'Political', '1', '中共党员', 1.00, '', 1399985191002447872, '2022-02-22 15:39:54', 1399985191002447872, '2022-02-22 15:39:54', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027004560945152, 1496024933900169216, 'Political', '2', '中共预备党员', 2.00, '', 1399985191002447872, '2022-02-22 15:40:07', 1399985191002447872, '2022-02-22 15:40:07', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027039264616448, 1496024933900169216, 'Political', '3', '共青团员', 3.00, '', 1399985191002447872, '2022-02-22 15:40:16', 1399985191002447872, '2022-02-22 15:40:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027077550223360, 1496024933900169216, 'Political', '4', '民革党员', 4.00, '', 1399985191002447872, '2022-02-22 15:40:25', 1399985191002447872, '2022-02-22 15:40:25', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027123461074944, 1496024933900169216, 'Political', '5', '民盟盟员', 5.00, '', 1399985191002447872, '2022-02-22 15:40:36', 1399985191002447872, '2022-02-22 15:40:36', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027197566038016, 1496024933900169216, 'Political', '6', '民建会员', 6.00, '', 1399985191002447872, '2022-02-22 15:40:53', 1399985191002447872, '2022-02-22 15:40:53', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027234803068928, 1496024933900169216, 'Political', '7', '民进会员', 7.00, '', 1399985191002447872, '2022-02-22 15:41:02', 1399985191002447872, '2022-02-22 15:41:02', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027272941875200, 1496024933900169216, 'Political', '8', '农工党党员', 8.00, '', 1399985191002447872, '2022-02-22 15:41:11', 1399985191002447872, '2022-02-22 15:41:11', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027306634719232, 1496024933900169216, 'Political', '9', '致公党党员', 9.00, '', 1399985191002447872, '2022-02-22 15:41:19', 1399985191002447872, '2022-02-22 15:41:19', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027369796743168, 1496024933900169216, 'Political', '10', '九三学社社员', 10.00, '', 1399985191002447872, '2022-02-22 15:41:34', 1399985191002447872, '2022-02-22 15:41:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027408141070336, 1496024933900169216, 'Political', '11', '台盟盟员', 11.00, '', 1399985191002447872, '2022-02-22 15:41:44', 1399985191002447872, '2022-02-22 15:41:44', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027456849522688, 1496024933900169216, 'Political', '12', '无党派人士', 12.00, '', 1399985191002447872, '2022-02-22 15:41:55', 1399985191002447872, '2022-02-22 15:41:55', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027516639326208, 1496024933900169216, 'Political', '13', '群众', 13.00, '', 1399985191002447872, '2022-02-22 15:42:09', 1399985191002447872, '2022-02-22 15:42:10', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496780500696539136, 1496722894707728384, 'PayChannel', '1', '支付宝', 1.00, '', 1399985191002447872, '2022-02-24 17:34:15', 1399985191002447872, '2022-03-08 11:02:59', 0, 3); -INSERT INTO `base_dict_item` VALUES (1496780576818962432, 1496722894707728384, 'PayChannel', '2', '微信', 2.00, '', 1399985191002447872, '2022-02-24 17:34:33', 1399985191002447872, '2022-03-08 11:04:00', 0, 2); -INSERT INTO `base_dict_item` VALUES (1496780712492113920, 1496723207565058048, 'PayWay', '1', 'wap支付', 0.00, '', 1399985191002447872, '2022-02-24 17:35:05', 1399985191002447872, '2022-02-24 17:35:05', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496780757647990784, 1496723207565058048, 'PayWay', '2', '应用支付', 0.00, '', 1399985191002447872, '2022-02-24 17:35:16', 1399985191002447872, '2022-02-24 17:35:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496780799691694080, 1496723207565058048, 'PayWay', '3', 'web支付', 0.00, '', 1399985191002447872, '2022-02-24 17:35:26', 1399985191002447872, '2022-02-24 17:35:26', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496780838451257344, 1496723207565058048, 'PayWay', '4', '二维码扫码支付', 0.00, '', 1399985191002447872, '2022-02-24 17:35:35', 1399985191002447872, '2022-02-24 17:35:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496780876388737024, 1496723207565058048, 'PayWay', '5', '付款码支付', 0.00, '', 1399985191002447872, '2022-02-24 17:35:44', 1399985191002447872, '2022-02-24 17:35:44', 0, 0); -INSERT INTO `base_dict_item` VALUES (1497141630803566592, 1497140849954185216, 'PayStatus', '3', '支付取消', 0.00, '', 1399985191002447872, '2022-02-25 17:29:15', 1399985191002447872, '2022-02-25 17:29:15', 0, 0); -INSERT INTO `base_dict_item` VALUES (1497141652379066368, 1497140849954185216, 'PayStatus', '2', '失败', 0.00, '', 1399985191002447872, '2022-02-25 17:29:20', 1399985191002447872, '2022-02-25 17:29:20', 0, 0); -INSERT INTO `base_dict_item` VALUES (1497141681915355136, 1497140849954185216, 'PayStatus', '1', '成功', 0.00, '', 1399985191002447872, '2022-02-25 17:29:27', 1399985191002447872, '2022-02-25 17:29:27', 0, 0); -INSERT INTO `base_dict_item` VALUES (1497141712743489536, 1497140849954185216, 'PayStatus', '0', '支付中', 0.00, '', 1399985191002447872, '2022-02-25 17:29:35', 1399985191002447872, '2022-02-25 17:29:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1497506810439892992, 1497140849954185216, 'PayStatus', '4', '部分退款', 1.00, '部分退款', 1399985191002447872, '2022-02-26 17:40:21', 1399985191002447872, '2022-03-04 21:22:46', 0, 7); -INSERT INTO `base_dict_item` VALUES (1499367587857694720, 1497140849954185216, 'PayStatus', '5', '已退款', 2.00, '完全退款', 1399985191002447872, '2022-03-03 20:54:25', 1399985191002447872, '2022-03-04 21:22:49', 0, 3); -INSERT INTO `base_dict_item` VALUES (1501030031432847360, 1496722894707728384, 'PayChannel', '3', '云闪付', 3.00, '', 1399985191002447872, '2022-03-08 11:00:22', 1399985191002447872, '2022-03-08 11:04:07', 0, 2); -INSERT INTO `base_dict_item` VALUES (1501030073489133568, 1496722894707728384, 'PayChannel', '4', '现金', 4.00, '', 1399985191002447872, '2022-03-08 11:00:32', 1399985191002447872, '2022-03-08 11:04:10', 0, 2); -INSERT INTO `base_dict_item` VALUES (1501030108314439680, 1496722894707728384, 'PayChannel', '5', '钱包', 5.00, '', 1399985191002447872, '2022-03-08 11:00:40', 1399985191002447872, '2022-03-08 11:04:14', 0, 2); -INSERT INTO `base_dict_item` VALUES (1501031490513768448, 1501031423232937984, 'AsyncPayChannel', '3', '云闪付', 0.00, '', 1399985191002447872, '2022-03-08 11:06:10', 1399985191002447872, '2022-03-08 11:06:10', 0, 0); -INSERT INTO `base_dict_item` VALUES (1501031518208757760, 1501031423232937984, 'AsyncPayChannel', '2', '微信', 0.00, '', 1399985191002447872, '2022-03-08 11:06:16', 1399985191002447872, '2022-03-08 11:06:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1501031544360243200, 1501031423232937984, 'AsyncPayChannel', '1', '支付宝', 0.00, '', 1399985191002447872, '2022-03-08 11:06:23', 1399985191002447872, '2022-03-08 11:06:23', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502276841057005568, 1502276739978473472, 'WalletStatus', '2', '禁用', 0.00, '', 1399985191002447872, '2022-03-11 21:34:45', 1399985191002447872, '2022-03-11 21:34:45', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502276862108217344, 1502276739978473472, 'WalletStatus', '1', '正常', 0.00, '', 1399985191002447872, '2022-03-11 21:34:50', 1399985191002447872, '2022-03-11 21:34:50', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502624716257456128, 1502624515799085056, 'WalletLogType', '1', '开通', 0.00, '', 1399985191002447872, '2022-03-12 20:37:04', 1399985191002447872, '2022-03-12 20:37:04', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502624931978899456, 1502624515799085056, 'WalletLogType', '2', '主动充值', 0.00, '', 1399985191002447872, '2022-03-12 20:37:56', 1399985191002447872, '2022-03-12 20:37:56', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502624956209393664, 1502624515799085056, 'WalletLogType', '3', '自动充值', 0.00, '', 1399985191002447872, '2022-03-12 20:38:02', 1399985191002447872, '2022-03-12 20:38:02', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625014719934464, 1502624515799085056, 'WalletLogType', '4', '余额变动', 0.00, '', 1399985191002447872, '2022-03-12 20:38:16', 1399985191002447872, '2022-03-12 20:38:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625053097816064, 1502624515799085056, 'WalletLogType', '5', '支付', 0.00, '', 1399985191002447872, '2022-03-12 20:38:25', 1399985191002447872, '2022-03-12 20:38:25', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625091639275520, 1502624515799085056, 'WalletLogType', '6', '系统扣除余额', 0.00, '', 1399985191002447872, '2022-03-12 20:38:34', 1399985191002447872, '2022-03-12 20:38:34', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625123725701120, 1502624515799085056, 'WalletLogType', '7', '退款', 0.00, '', 1399985191002447872, '2022-03-12 20:38:42', 1399985191002447872, '2022-03-12 20:38:42', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625783145787392, 1502624632392347648, 'WalletLogOperation', '1', '系统操作', 0.00, '', 1399985191002447872, '2022-03-12 20:41:19', 1399985191002447872, '2022-03-12 20:41:19', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625814837948416, 1502624632392347648, 'WalletLogOperation', '2', '管理员操作', 0.00, '', 1399985191002447872, '2022-03-12 20:41:26', 1399985191002447872, '2022-03-12 20:41:26', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625850355314688, 1502624632392347648, 'WalletLogOperation', '3', '用户操作', 0.00, '', 1399985191002447872, '2022-03-12 20:41:35', 1399985191002447872, '2022-03-12 20:41:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1503340241493135360, 1503340128037212160, 'VoucherStatus', '1', '启用', 0.00, '', 1399985191002447872, '2022-03-14 20:00:19', 1399985191002447872, '2022-03-14 20:00:19', 0, 0); -INSERT INTO `base_dict_item` VALUES (1503340326645895168, 1503340128037212160, 'VoucherStatus', '2', '停用', 0.00, '', 1399985191002447872, '2022-03-14 20:00:39', 1399985191002447872, '2022-03-14 20:00:39', 0, 0); -INSERT INTO `base_dict_item` VALUES (1505112357976612864, 1496722894707728384, 'PayChannel', '6', '储值卡', 0.00, '', 1399985191002447872, '2022-03-19 17:22:04', 1399985191002447872, '2022-03-19 17:22:04', 0, 0); -INSERT INTO `base_dict_item` VALUES (1524356452720758784, 1524356376518643712, 'GoodsParamType', 'input', '手工录入', 0.00, '', 1399985191002447872, '2022-05-11 19:51:14', 1399985191002447872, '2022-05-11 19:51:14', 0, 0); -INSERT INTO `base_dict_item` VALUES (1524356510157557760, 1524356376518643712, 'GoodsParamType', 'select', '列表选择', 0.00, '', 1399985191002447872, '2022-05-11 19:51:28', 1399985191002447872, '2022-05-11 19:51:28', 0, 0); -INSERT INTO `base_dict_item` VALUES (1546757293592522752, 1546757092010078208, 'PayNotifyProcess', '0', '失败', 0.00, '', 1399985191002447872, '2022-07-12 15:24:11', 1399985191002447872, '2022-07-12 15:24:11', 0, 0); -INSERT INTO `base_dict_item` VALUES (1546757327901929472, 1546757092010078208, 'PayNotifyProcess', '1', '成功', -1.00, '', 1399985191002447872, '2022-07-12 15:24:19', 1399985191002447872, '2022-07-12 15:31:38', 0, 2); -INSERT INTO `base_dict_item` VALUES (1546757375637303296, 1546757092010078208, 'PayNotifyProcess', '2', '忽略', 0.00, '', 1399985191002447872, '2022-07-12 15:24:30', 1399985191002447872, '2022-07-12 15:24:30', 0, 0); -INSERT INTO `base_dict_item` VALUES (1556996422006460416, 1556996322223968256, 'WeChatMediaType', 'news', '新闻', 0.00, '', 1399985191002447872, '2022-08-09 21:30:49', 1399985191002447872, '2022-08-09 21:30:49', 1, 0); -INSERT INTO `base_dict_item` VALUES (1556996472661069824, 1556996322223968256, 'WeChatMediaType', 'voice', '语音', 0.00, '', 1399985191002447872, '2022-08-09 21:31:01', 1399985191002447872, '2022-08-09 21:31:01', 0, 0); -INSERT INTO `base_dict_item` VALUES (1556996501417218048, 1556996322223968256, 'WeChatMediaType', 'image', '图片', 0.00, '', 1399985191002447872, '2022-08-09 21:31:08', 1399985191002447872, '2022-08-09 21:31:08', 0, 0); -INSERT INTO `base_dict_item` VALUES (1556996529565192192, 1556996322223968256, 'WeChatMediaType', 'video', '视频', 0.00, '', 1399985191002447872, '2022-08-09 21:31:15', 1399985191002447872, '2022-08-09 21:31:15', 0, 0); -INSERT INTO `base_dict_item` VALUES (1561003235710320640, 1561003189111603200, 'SiteMessageState', 'user', '指定用户', 0.00, '', 1399985191002447872, '2022-08-20 22:52:28', 1399985191002447872, '2022-08-20 22:52:28', 1, 0); -INSERT INTO `base_dict_item` VALUES (1561003279322693632, 1561003189111603200, 'SiteMessageState', 'all', '全部用户', 0.00, '', 1399985191002447872, '2022-08-20 22:52:38', 1399985191002447872, '2022-08-20 22:52:39', 1, 0); -INSERT INTO `base_dict_item` VALUES (1561003368762032128, 1561003021674987520, 'SiteMessageReceive', 'user', '指定用户', 0.00, '', 1399985191002447872, '2022-08-20 22:53:00', 1399985191002447872, '2022-08-20 22:53:00', 0, 0); -INSERT INTO `base_dict_item` VALUES (1561003399778910208, 1561003021674987520, 'SiteMessageReceive', 'all', '全部用户', 0.00, '', 1399985191002447872, '2022-08-20 22:53:07', 1399985191002447872, '2022-08-20 22:53:24', 0, 1); -INSERT INTO `base_dict_item` VALUES (1561003539772194816, 1561003189111603200, 'SiteMessageState', 'sent', '已发送', 0.00, '', 1399985191002447872, '2022-08-20 22:53:41', 1399985191002447872, '2022-08-20 22:53:41', 0, 0); -INSERT INTO `base_dict_item` VALUES (1561003575608328192, 1561003189111603200, 'SiteMessageState', 'cancel', '撤销', 0.00, '', 1399985191002447872, '2022-08-20 22:53:49', 1399985191002447872, '2022-08-20 22:53:49', 0, 0); -INSERT INTO `base_dict_item` VALUES (1561245469535080448, 1561003189111603200, 'SiteMessageState', 'draft', '草稿', 0.00, '', 1399985191002447872, '2022-08-21 14:55:01', 1399985191002447872, '2022-08-21 14:55:01', 0, 0); -INSERT INTO `base_dict_item` VALUES (1562696390043475968, 1562696107020230656, 'BpmModelPublish', 'published', '已发布', 0.00, '', 1399985191002447872, '2022-08-25 15:00:28', 1399985191002447872, '2022-08-25 15:00:28', 0, 0); -INSERT INTO `base_dict_item` VALUES (1562696420561231872, 1562696107020230656, 'BpmModelPublish', 'unpublished', '未发布', 0.00, '未上传xml文档', 1399985191002447872, '2022-08-25 15:00:35', 1399985191002447872, '2022-08-25 15:28:09', 0, 1); -INSERT INTO `base_dict_item` VALUES (1562703450588028928, 1562696107020230656, 'BpmModelPublish', 'unpublishedXml', '未发布(已上传BPMN)', 0.00, '有xml文档', 1399985191002447872, '2022-08-25 15:28:31', 1399985191002447872, '2022-08-25 15:34:45', 0, 1); -INSERT INTO `base_dict_item` VALUES (1563087300157747200, 1563083969989423104, 'BpmTaskAssignType', 'user', '用户', 0.00, '', 1399985191002447872, '2022-08-26 16:53:48', 1399985191002447872, '2022-09-06 22:50:15', 0, 1); -INSERT INTO `base_dict_item` VALUES (1567091825981980672, 1567091641298386944, 'BpmTaskState', 'running', '处理中', 0.00, '', 1399985191002447872, '2022-09-06 18:06:21', 1399985191002447872, '2022-09-06 18:06:21', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567091863017684992, 1567091641298386944, 'BpmTaskState', 'pass', '通过', 0.00, '', 1399985191002447872, '2022-09-06 18:06:30', 1399985191002447872, '2022-09-06 18:06:30', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567091902414782464, 1567091641298386944, 'BpmTaskState', 'reject', '驳回', 0.00, '', 1399985191002447872, '2022-09-06 18:06:39', 1399985191002447872, '2022-09-06 18:06:51', 0, 1); -INSERT INTO `base_dict_item` VALUES (1567091993569591296, 1567091641298386944, 'BpmTaskState', 'back', '退回', 0.00, '', 1399985191002447872, '2022-09-06 18:07:01', 1399985191002447872, '2022-09-06 18:07:01', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567092037261656064, 1567091641298386944, 'BpmTaskState', 'retrieve', '取回', 0.00, '', 1399985191002447872, '2022-09-06 18:07:12', 1399985191002447872, '2022-09-06 18:07:22', 0, 1); -INSERT INTO `base_dict_item` VALUES (1567092124226355200, 1567091641298386944, 'BpmTaskState', 'skip', '跳过', 0.00, '', 1399985191002447872, '2022-09-06 18:07:32', 1399985191002447872, '2022-09-06 18:07:32', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567163310103564288, 1563083969989423104, 'BpmTaskAssignType', 'userGroup', '用户组', 0.00, '', 1399985191002447872, '2022-09-06 22:50:24', 1399985191002447872, '2022-09-06 22:50:24', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567163343288897536, 1563083969989423104, 'BpmTaskAssignType', 'role', '角色', 0.00, '', 1399985191002447872, '2022-09-06 22:50:32', 1399985191002447872, '2022-09-06 22:50:32', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567163380693700608, 1563083969989423104, 'BpmTaskAssignType', 'deptMember', '部门成员', 0.00, '', 1399985191002447872, '2022-09-06 22:50:41', 1399985191002447872, '2022-09-06 22:50:41', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567163412960481280, 1563083969989423104, 'BpmTaskAssignType', 'deptLeader', '部门的负责人', 0.00, '', 1399985191002447872, '2022-09-06 22:50:49', 1399985191002447872, '2022-09-06 22:50:49', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567175558888923136, 1563083969989423104, 'BpmTaskAssignType', 'roleGroup', '角色组', 0.00, '', 1399985191002447872, '2022-09-06 23:39:05', 1399985191002447872, '2022-09-06 23:39:05', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567178994242002944, 1563083969989423104, 'BpmTaskAssignType', 'sponsor', '发起人', 0.00, '', 1399985191002447872, '2022-09-06 23:52:44', 1399985191002447872, '2022-09-06 23:52:44', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567179143576002560, 1563083969989423104, 'BpmTaskAssignType', 'select', '用户手动选择', 0.00, '', 1399985191002447872, '2022-09-06 23:53:19', 1399985191002447872, '2022-09-07 00:01:22', 0, 1); -INSERT INTO `base_dict_item` VALUES (1570343731634249728, 1570343684024705024, 'BpmTaskResult', 'pass', '通过', 0.00, '', 1399985191002447872, '2022-09-15 17:28:16', 1399985191002447872, '2022-09-15 17:28:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570343761636106240, 1570343684024705024, 'BpmTaskResult', 'notPass', '不通过', 0.00, '', 1399985191002447872, '2022-09-15 17:28:23', 1399985191002447872, '2022-09-15 17:28:23', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570343788056027136, 1570343684024705024, 'BpmTaskResult', 'abstain', '弃权', 0.00, '', 1399985191002447872, '2022-09-15 17:28:29', 1399985191002447872, '2022-09-15 17:28:29', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570343826018672640, 1570343684024705024, 'BpmTaskResult', 'reject', '驳回', 0.00, '', 1399985191002447872, '2022-09-15 17:28:38', 1399985191002447872, '2022-09-15 17:28:38', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570343873737269248, 1570343684024705024, 'BpmTaskResult', 'back', '退回', 0.00, '', 1399985191002447872, '2022-09-15 17:28:50', 1399985191002447872, '2022-09-15 17:28:50', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570343913918701568, 1570343684024705024, 'BpmTaskResult', 'retrieve', '取回', 0.00, '', 1399985191002447872, '2022-09-15 17:28:59', 1399985191002447872, '2022-09-15 17:28:59', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570685888076120064, 1570343684024705024, 'BpmTaskResult', 'autoFinish', '自动完成', 0.00, '', 1399985191002447872, '2022-09-16 16:07:52', 1399985191002447872, '2022-09-16 16:08:02', 0, 1); -INSERT INTO `base_dict_item` VALUES (1570764765255397376, 1570764395519111168, 'BpmInstanceState', 'running', '运行中', 0.00, '', 1399985191002447872, '2022-09-16 21:21:18', 1399985191002447872, '2022-09-16 21:21:18', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570764802047832064, 1570764395519111168, 'BpmInstanceState', 'finish', '已完成', 0.00, '', 1399985191002447872, '2022-09-16 21:21:27', 1399985191002447872, '2022-09-16 21:21:27', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570764836319490048, 1570764395519111168, 'BpmInstanceState', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 21:21:35', 1399985191002447872, '2022-09-16 21:21:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570784215744585728, 1570343684024705024, 'BpmTaskResult', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 22:38:35', 1399985191002447872, '2022-09-16 22:38:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570784331511570432, 1567091641298386944, 'BpmTaskState', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 22:39:03', 1399985191002447872, '2022-09-16 22:39:03', 0, 0); -INSERT INTO `base_dict_item` VALUES (1573665422392098816, 1439961232651034624, 'MessageTemplateCode', '0', '站内信', -11.00, 'SITE', 1399985191002447872, '2022-09-24 21:27:29', 1399985191002447872, '2022-09-24 21:27:39', 0, 1); -INSERT INTO `base_dict_item` VALUES (1589528254477488128, 1589527951317389312, 'DataScopePerm', '7', '所在及下级部门', 0.00, '', 1414143554414059520, '2022-11-07 16:00:43', 1414143554414059520, '2022-11-07 16:00:43', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528283539820544, 1589527951317389312, 'DataScopePerm', '6', '所在部门', 0.00, '', 1414143554414059520, '2022-11-07 16:00:49', 1414143554414059520, '2022-11-07 16:00:49', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528315672383488, 1589527951317389312, 'DataScopePerm', '5', '全部数据', 0.00, '', 1414143554414059520, '2022-11-07 16:00:57', 1414143554414059520, '2022-11-07 16:00:57', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528340267782144, 1589527951317389312, 'DataScopePerm', '4', '部门和用户范围', 0.00, '', 1414143554414059520, '2022-11-07 16:01:03', 1414143554414059520, '2022-11-07 16:01:03', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528367228768256, 1589527951317389312, 'DataScopePerm', '3', '部门范围', 0.00, '', 1414143554414059520, '2022-11-07 16:01:09', 1414143554414059520, '2022-11-07 16:01:09', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528393292173312, 1589527951317389312, 'DataScopePerm', '2', '用户范围', 0.00, '', 1414143554414059520, '2022-11-07 16:01:16', 1414143554414059520, '2022-11-07 16:01:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528423956729856, 1589527951317389312, 'DataScopePerm', '1', '自身数据', 0.00, '', 1414143554414059520, '2022-11-07 16:01:23', 1414143554414059520, '2022-11-07 16:01:23', 0, 0); +INSERT INTO `base_dict_item` VALUES (1422931375807242241, 1422929378374828033, 'Sex', '1', '男', b'1', 0.00, '男性', 0, '2021-08-04 22:44:11', 0, '2021-08-04 22:44:11', 0, 2); +INSERT INTO `base_dict_item` VALUES (1425729455402401794, 1422929378374828033, 'Sex', '2', '女', b'1', 0.00, '女性', 0, '2021-08-12 16:02:46', 0, '2021-08-12 16:02:46', 0, 1); +INSERT INTO `base_dict_item` VALUES (1425744258544136194, 1425744045414772737, 'MenuType', '0', '顶级菜单', b'1', 0.00, '顶级菜单', 0, '2021-08-12 17:01:35', 0, '2021-08-12 17:01:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1425744436592340993, 1425744045414772737, 'MenuType', '1', '子菜单', b'1', 0.00, '子菜单', 0, '2021-08-12 17:02:17', 0, '2021-08-12 17:02:17', 0, 0); +INSERT INTO `base_dict_item` VALUES (1425744470582980610, 1425744045414772737, 'MenuType', '2', '按钮权限', b'1', 0.00, '按钮权限', 0, '2021-08-12 17:02:26', 0, '2021-08-12 17:02:26', 0, 0); +INSERT INTO `base_dict_item` VALUES (1430094707250413568, 1422929378374828033, 'Sex', '0', '未知', b'1', 0.00, '不确定性别', 1399985191002447872, '2021-08-24 17:08:43', 1399985191002447872, '2021-08-24 17:08:43', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435830086406463488, 1435829999592759296, 'UserStatusCode', '1', '正常', b'1', 0.00, 'NORMAL', 1399985191002447872, '2021-09-09 12:59:04', 1399985191002447872, '2021-09-09 12:59:04', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435830141855162368, 1435829999592759296, 'UserStatusCode', '2', '锁定', b'1', 0.00, 'LOCK, 多次登录失败被锁定', 1399985191002447872, '2021-09-09 12:59:17', 1399985191002447872, '2021-09-09 12:59:17', 0, 1); +INSERT INTO `base_dict_item` VALUES (1435830260503633920, 1435829999592759296, 'UserStatusCode', '3', '封禁', b'1', 0.00, 'BAN', 1399985191002447872, '2021-09-09 12:59:45', 1399985191002447872, '2021-09-09 12:59:45', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838374749626368, 1435838066191458304, 'LogBusinessType', 'other', '其它', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:00', 1399985191002447872, '2021-09-09 13:32:00', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838414436130816, 1435838066191458304, 'LogBusinessType', 'insert', '新增', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:09', 1399985191002447872, '2021-09-09 13:32:09', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838467624099840, 1435838066191458304, 'LogBusinessType', 'update', '修改', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:22', 1399985191002447872, '2021-09-09 13:32:22', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838502755590144, 1435838066191458304, 'LogBusinessType', 'delete', '删除', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:30', 1399985191002447872, '2021-09-09 13:32:30', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838546934194176, 1435838066191458304, 'LogBusinessType', 'grant', '授权', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:41', 1399985191002447872, '2021-09-09 13:32:41', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838605537009664, 1435838066191458304, 'LogBusinessType', 'export', '导出', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:55', 1399985191002447872, '2021-09-09 13:32:55', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838705457913856, 1435838066191458304, 'LogBusinessType', 'import', '导入', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:33:19', 1399985191002447872, '2021-09-09 13:33:19', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838745861644288, 1435838066191458304, 'LogBusinessType', 'force', '强退', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:33:28', 1399985191002447872, '2021-09-09 13:33:28', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838786273763328, 1435838066191458304, 'LogBusinessType', 'clean', '清空数据', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:33:38', 1399985191002447872, '2021-09-09 13:33:38', 0, 0); +INSERT INTO `base_dict_item` VALUES (1438079113630003200, 1438078864509317120, 'MailSecurityCode', '1', '普通方式', b'1', 0.00, 'SECURITY_TYPE_PLAIN', 1399985191002447872, '2021-09-15 17:55:54', 1399985191002447872, '2021-09-15 17:55:54', 0, 0); +INSERT INTO `base_dict_item` VALUES (1438080323061755904, 1438078864509317120, 'MailSecurityCode', '2', 'TLS方式', b'1', 0.00, 'SECURITY_TYPE_TLS', 1399985191002447872, '2021-09-15 18:00:42', 1399985191002447872, '2021-09-15 18:00:42', 0, 0); +INSERT INTO `base_dict_item` VALUES (1438080372231581696, 1438078864509317120, 'MailSecurityCode', '3', 'SSL方式', b'1', 0.00, 'SECURITY_TYPE_SSL', 1399985191002447872, '2021-09-15 18:00:54', 1399985191002447872, '2021-09-15 18:00:54', 0, 0); +INSERT INTO `base_dict_item` VALUES (1439961603914047488, 1439961232651034624, 'MessageTemplateCode', '5', '微信', b'1', -10.00, 'WECHAT', 1399985191002447872, '2021-09-20 22:36:14', 1399985191002447872, '2021-09-20 22:36:14', 0, 1); +INSERT INTO `base_dict_item` VALUES (1439961704321490944, 1439961232651034624, 'MessageTemplateCode', '4', 'Email', b'1', 0.00, 'EMAIL', 1399985191002447872, '2021-09-20 22:36:38', 1399985191002447872, '2021-09-20 22:36:38', 0, 0); +INSERT INTO `base_dict_item` VALUES (1439962132744478720, 1439961232651034624, 'MessageTemplateCode', '3', '短信', b'1', 0.00, 'SMS', 1399985191002447872, '2021-09-20 22:38:20', 1399985191002447872, '2021-09-20 22:38:20', 0, 0); +INSERT INTO `base_dict_item` VALUES (1439962205578567680, 1439961232651034624, 'MessageTemplateCode', '2', '钉钉机器人', b'1', 0.00, 'DING_TALK_ROBOT', 1399985191002447872, '2021-09-20 22:38:38', 1399985191002447872, '2021-09-20 22:38:38', 0, 0); +INSERT INTO `base_dict_item` VALUES (1439962267511660544, 1439961232651034624, 'MessageTemplateCode', '1', '钉钉', b'1', 0.00, 'DING_TALK', 1399985191002447872, '2021-09-20 22:38:52', 1399985191002447872, '2021-09-20 22:38:52', 0, 0); +INSERT INTO `base_dict_item` VALUES (1452836696873984000, 1452836604783845376, 'SocialType', 'WeChat', '微信', b'1', 0.00, '', 1399985191002447872, '2021-10-26 11:17:16', 1399985191002447872, '2021-10-26 11:17:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1452837435482529792, 1452836604783845376, 'SocialType', 'QQ', 'QQ', b'1', 0.00, '', 1399985191002447872, '2021-10-26 11:20:12', 1399985191002447872, '2021-10-26 11:20:12', 0, 0); +INSERT INTO `base_dict_item` VALUES (1452837523030237184, 1452836604783845376, 'SocialType', 'DingTalk', '钉钉', b'1', 0.00, '', 1399985191002447872, '2021-10-26 11:20:33', 1399985191002447872, '2021-10-26 11:20:33', 0, 0); +INSERT INTO `base_dict_item` VALUES (1452844537911406592, 1452843488735621120, 'ParamType', '1', '系统参数', b'1', 0.00, '', 1399985191002447872, '2021-10-26 11:48:25', 1399985191002447872, '2021-10-26 11:48:25', 0, 0); +INSERT INTO `base_dict_item` VALUES (1452844565031776256, 1452843488735621120, 'ParamType', '2', '用户参数', b'1', 0.00, '', 1399985191002447872, '2021-10-26 11:48:32', 1399985191002447872, '2021-10-26 11:48:32', 0, 2); +INSERT INTO `base_dict_item` VALUES (1496026946344005632, 1496024933900169216, 'Political', '1', '中共党员', b'1', 1.00, '', 1399985191002447872, '2022-02-22 15:39:54', 1399985191002447872, '2022-02-22 15:39:54', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027004560945152, 1496024933900169216, 'Political', '2', '中共预备党员', b'1', 2.00, '', 1399985191002447872, '2022-02-22 15:40:07', 1399985191002447872, '2022-02-22 15:40:07', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027039264616448, 1496024933900169216, 'Political', '3', '共青团员', b'1', 3.00, '', 1399985191002447872, '2022-02-22 15:40:16', 1399985191002447872, '2022-02-22 15:40:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027077550223360, 1496024933900169216, 'Political', '4', '民革党员', b'1', 4.00, '', 1399985191002447872, '2022-02-22 15:40:25', 1399985191002447872, '2022-02-22 15:40:25', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027123461074944, 1496024933900169216, 'Political', '5', '民盟盟员', b'1', 5.00, '', 1399985191002447872, '2022-02-22 15:40:36', 1399985191002447872, '2022-02-22 15:40:36', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027197566038016, 1496024933900169216, 'Political', '6', '民建会员', b'1', 6.00, '', 1399985191002447872, '2022-02-22 15:40:53', 1399985191002447872, '2022-02-22 15:40:53', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027234803068928, 1496024933900169216, 'Political', '7', '民进会员', b'1', 7.00, '', 1399985191002447872, '2022-02-22 15:41:02', 1399985191002447872, '2022-02-22 15:41:02', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027272941875200, 1496024933900169216, 'Political', '8', '农工党党员', b'1', 8.00, '', 1399985191002447872, '2022-02-22 15:41:11', 1399985191002447872, '2022-02-22 15:41:11', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027306634719232, 1496024933900169216, 'Political', '9', '致公党党员', b'1', 9.00, '', 1399985191002447872, '2022-02-22 15:41:19', 1399985191002447872, '2022-02-22 15:41:19', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027369796743168, 1496024933900169216, 'Political', '10', '九三学社社员', b'1', 10.00, '', 1399985191002447872, '2022-02-22 15:41:34', 1399985191002447872, '2022-02-22 15:41:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027408141070336, 1496024933900169216, 'Political', '11', '台盟盟员', b'1', 11.00, '', 1399985191002447872, '2022-02-22 15:41:44', 1399985191002447872, '2022-02-22 15:41:44', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027456849522688, 1496024933900169216, 'Political', '12', '无党派人士', b'1', 12.00, '', 1399985191002447872, '2022-02-22 15:41:55', 1399985191002447872, '2022-02-22 15:41:55', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027516639326208, 1496024933900169216, 'Political', '13', '群众', b'1', 13.00, '', 1399985191002447872, '2022-02-22 15:42:09', 1399985191002447872, '2022-02-22 15:42:10', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496780500696539136, 1496722894707728384, 'PayChannel', '1', '支付宝', b'1', 1.00, '', 1399985191002447872, '2022-02-24 17:34:15', 1399985191002447872, '2022-03-08 11:02:59', 0, 3); +INSERT INTO `base_dict_item` VALUES (1496780576818962432, 1496722894707728384, 'PayChannel', '2', '微信', b'1', 2.00, '', 1399985191002447872, '2022-02-24 17:34:33', 1399985191002447872, '2022-03-08 11:04:00', 0, 2); +INSERT INTO `base_dict_item` VALUES (1496780712492113920, 1496723207565058048, 'PayWay', '1', 'wap支付', b'1', 0.00, '', 1399985191002447872, '2022-02-24 17:35:05', 1399985191002447872, '2022-02-24 17:35:05', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496780757647990784, 1496723207565058048, 'PayWay', '2', '应用支付', b'1', 0.00, '', 1399985191002447872, '2022-02-24 17:35:16', 1399985191002447872, '2022-02-24 17:35:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496780799691694080, 1496723207565058048, 'PayWay', '3', 'web支付', b'1', 0.00, '', 1399985191002447872, '2022-02-24 17:35:26', 1399985191002447872, '2022-02-24 17:35:26', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496780838451257344, 1496723207565058048, 'PayWay', '4', '二维码扫码支付', b'1', 0.00, '', 1399985191002447872, '2022-02-24 17:35:35', 1399985191002447872, '2022-02-24 17:35:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496780876388737024, 1496723207565058048, 'PayWay', '5', '付款码支付', b'1', 0.00, '', 1399985191002447872, '2022-02-24 17:35:44', 1399985191002447872, '2022-02-24 17:35:44', 0, 0); +INSERT INTO `base_dict_item` VALUES (1497141630803566592, 1497140849954185216, 'PayStatus', '3', '支付取消', b'1', 0.00, '', 1399985191002447872, '2022-02-25 17:29:15', 1399985191002447872, '2022-02-25 17:29:15', 0, 0); +INSERT INTO `base_dict_item` VALUES (1497141652379066368, 1497140849954185216, 'PayStatus', '2', '失败', b'1', 0.00, '', 1399985191002447872, '2022-02-25 17:29:20', 1399985191002447872, '2022-02-25 17:29:20', 0, 0); +INSERT INTO `base_dict_item` VALUES (1497141681915355136, 1497140849954185216, 'PayStatus', '1', '成功', b'1', 0.00, '', 1399985191002447872, '2022-02-25 17:29:27', 1399985191002447872, '2022-02-25 17:29:27', 0, 0); +INSERT INTO `base_dict_item` VALUES (1497141712743489536, 1497140849954185216, 'PayStatus', '0', '支付中', b'1', 0.00, '', 1399985191002447872, '2022-02-25 17:29:35', 1399985191002447872, '2022-02-25 17:29:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1497506810439892992, 1497140849954185216, 'PayStatus', '4', '部分退款', b'1', 1.00, '部分退款', 1399985191002447872, '2022-02-26 17:40:21', 1399985191002447872, '2022-03-04 21:22:46', 0, 7); +INSERT INTO `base_dict_item` VALUES (1499367587857694720, 1497140849954185216, 'PayStatus', '5', '已退款', b'1', 2.00, '完全退款', 1399985191002447872, '2022-03-03 20:54:25', 1399985191002447872, '2022-03-04 21:22:49', 0, 3); +INSERT INTO `base_dict_item` VALUES (1501030031432847360, 1496722894707728384, 'PayChannel', '3', '云闪付', b'1', 3.00, '', 1399985191002447872, '2022-03-08 11:00:22', 1399985191002447872, '2022-03-08 11:04:07', 0, 2); +INSERT INTO `base_dict_item` VALUES (1501030073489133568, 1496722894707728384, 'PayChannel', '4', '现金', b'1', 4.00, '', 1399985191002447872, '2022-03-08 11:00:32', 1399985191002447872, '2022-03-08 11:04:10', 0, 2); +INSERT INTO `base_dict_item` VALUES (1501030108314439680, 1496722894707728384, 'PayChannel', '5', '钱包', b'1', 5.00, '', 1399985191002447872, '2022-03-08 11:00:40', 1399985191002447872, '2022-03-08 11:04:14', 0, 2); +INSERT INTO `base_dict_item` VALUES (1501031490513768448, 1501031423232937984, 'AsyncPayChannel', '3', '云闪付', b'1', 0.00, '', 1399985191002447872, '2022-03-08 11:06:10', 1399985191002447872, '2022-03-08 11:06:10', 0, 0); +INSERT INTO `base_dict_item` VALUES (1501031518208757760, 1501031423232937984, 'AsyncPayChannel', '2', '微信', b'1', 0.00, '', 1399985191002447872, '2022-03-08 11:06:16', 1399985191002447872, '2022-03-08 11:06:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1501031544360243200, 1501031423232937984, 'AsyncPayChannel', '1', '支付宝', b'1', 0.00, '', 1399985191002447872, '2022-03-08 11:06:23', 1399985191002447872, '2022-03-08 11:06:23', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502276841057005568, 1502276739978473472, 'WalletStatus', '2', '禁用', b'1', 0.00, '', 1399985191002447872, '2022-03-11 21:34:45', 1399985191002447872, '2022-03-11 21:34:45', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502276862108217344, 1502276739978473472, 'WalletStatus', '1', '正常', b'1', 0.00, '', 1399985191002447872, '2022-03-11 21:34:50', 1399985191002447872, '2022-03-11 21:34:50', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502624716257456128, 1502624515799085056, 'WalletLogType', '1', '开通', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:37:04', 1399985191002447872, '2022-03-12 20:37:04', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502624931978899456, 1502624515799085056, 'WalletLogType', '2', '主动充值', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:37:56', 1399985191002447872, '2022-03-12 20:37:56', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502624956209393664, 1502624515799085056, 'WalletLogType', '3', '自动充值', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:38:02', 1399985191002447872, '2022-03-12 20:38:02', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625014719934464, 1502624515799085056, 'WalletLogType', '4', '余额变动', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:38:16', 1399985191002447872, '2022-03-12 20:38:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625053097816064, 1502624515799085056, 'WalletLogType', '5', '支付', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:38:25', 1399985191002447872, '2022-03-12 20:38:25', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625091639275520, 1502624515799085056, 'WalletLogType', '6', '系统扣除余额', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:38:34', 1399985191002447872, '2022-03-12 20:38:34', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625123725701120, 1502624515799085056, 'WalletLogType', '7', '退款', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:38:42', 1399985191002447872, '2022-03-12 20:38:42', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625783145787392, 1502624632392347648, 'WalletLogOperation', '1', '系统操作', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:41:19', 1399985191002447872, '2022-03-12 20:41:19', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625814837948416, 1502624632392347648, 'WalletLogOperation', '2', '管理员操作', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:41:26', 1399985191002447872, '2022-03-12 20:41:26', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625850355314688, 1502624632392347648, 'WalletLogOperation', '3', '用户操作', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:41:35', 1399985191002447872, '2022-03-12 20:41:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1503340241493135360, 1503340128037212160, 'VoucherStatus', '1', '启用', b'1', 0.00, '', 1399985191002447872, '2022-03-14 20:00:19', 1399985191002447872, '2022-03-14 20:00:19', 0, 0); +INSERT INTO `base_dict_item` VALUES (1503340326645895168, 1503340128037212160, 'VoucherStatus', '2', '停用', b'1', 0.00, '', 1399985191002447872, '2022-03-14 20:00:39', 1399985191002447872, '2022-03-14 20:00:39', 0, 0); +INSERT INTO `base_dict_item` VALUES (1505112357976612864, 1496722894707728384, 'PayChannel', '6', '储值卡', b'1', 0.00, '', 1399985191002447872, '2022-03-19 17:22:04', 1399985191002447872, '2022-03-19 17:22:04', 0, 0); +INSERT INTO `base_dict_item` VALUES (1524356452720758784, 1524356376518643712, 'GoodsParamType', 'input', '手工录入', b'1', 0.00, '', 1399985191002447872, '2022-05-11 19:51:14', 1399985191002447872, '2022-05-11 19:51:14', 0, 0); +INSERT INTO `base_dict_item` VALUES (1524356510157557760, 1524356376518643712, 'GoodsParamType', 'select', '列表选择', b'1', 0.00, '', 1399985191002447872, '2022-05-11 19:51:28', 1399985191002447872, '2022-05-11 19:51:28', 0, 0); +INSERT INTO `base_dict_item` VALUES (1546757293592522752, 1546757092010078208, 'PayNotifyProcess', '0', '失败', b'1', 0.00, '', 1399985191002447872, '2022-07-12 15:24:11', 1399985191002447872, '2022-07-12 15:24:11', 0, 0); +INSERT INTO `base_dict_item` VALUES (1546757327901929472, 1546757092010078208, 'PayNotifyProcess', '1', '成功', b'1', -1.00, '', 1399985191002447872, '2022-07-12 15:24:19', 1399985191002447872, '2022-07-12 15:31:38', 0, 2); +INSERT INTO `base_dict_item` VALUES (1546757375637303296, 1546757092010078208, 'PayNotifyProcess', '2', '忽略', b'1', 0.00, '', 1399985191002447872, '2022-07-12 15:24:30', 1399985191002447872, '2022-07-12 15:24:30', 0, 0); +INSERT INTO `base_dict_item` VALUES (1556996422006460416, 1556996322223968256, 'WeChatMediaType', 'news', '新闻', b'1', 0.00, '', 1399985191002447872, '2022-08-09 21:30:49', 1399985191002447872, '2022-08-09 21:30:49', 1, 0); +INSERT INTO `base_dict_item` VALUES (1556996472661069824, 1556996322223968256, 'WeChatMediaType', 'voice', '语音', b'1', 0.00, '', 1399985191002447872, '2022-08-09 21:31:01', 1399985191002447872, '2022-08-09 21:31:01', 0, 0); +INSERT INTO `base_dict_item` VALUES (1556996501417218048, 1556996322223968256, 'WeChatMediaType', 'image', '图片', b'1', 0.00, '', 1399985191002447872, '2022-08-09 21:31:08', 1399985191002447872, '2022-08-09 21:31:08', 0, 0); +INSERT INTO `base_dict_item` VALUES (1556996529565192192, 1556996322223968256, 'WeChatMediaType', 'video', '视频', b'1', 0.00, '', 1399985191002447872, '2022-08-09 21:31:15', 1399985191002447872, '2022-08-09 21:31:15', 0, 0); +INSERT INTO `base_dict_item` VALUES (1561003235710320640, 1561003189111603200, 'SiteMessageState', 'user', '指定用户', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:52:28', 1399985191002447872, '2022-08-20 22:52:28', 1, 0); +INSERT INTO `base_dict_item` VALUES (1561003279322693632, 1561003189111603200, 'SiteMessageState', 'all', '全部用户', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:52:38', 1399985191002447872, '2022-08-20 22:52:39', 1, 0); +INSERT INTO `base_dict_item` VALUES (1561003368762032128, 1561003021674987520, 'SiteMessageReceive', 'user', '指定用户', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:53:00', 1399985191002447872, '2022-08-20 22:53:00', 0, 0); +INSERT INTO `base_dict_item` VALUES (1561003399778910208, 1561003021674987520, 'SiteMessageReceive', 'all', '全部用户', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:53:07', 1399985191002447872, '2022-08-20 22:53:24', 0, 1); +INSERT INTO `base_dict_item` VALUES (1561003539772194816, 1561003189111603200, 'SiteMessageState', 'sent', '已发送', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:53:41', 1399985191002447872, '2022-08-20 22:53:41', 0, 0); +INSERT INTO `base_dict_item` VALUES (1561003575608328192, 1561003189111603200, 'SiteMessageState', 'cancel', '撤销', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:53:49', 1399985191002447872, '2022-08-20 22:53:49', 0, 0); +INSERT INTO `base_dict_item` VALUES (1561245469535080448, 1561003189111603200, 'SiteMessageState', 'draft', '草稿', b'1', 0.00, '', 1399985191002447872, '2022-08-21 14:55:01', 1399985191002447872, '2022-08-21 14:55:01', 0, 0); +INSERT INTO `base_dict_item` VALUES (1562696390043475968, 1562696107020230656, 'BpmModelPublish', 'published', '已发布', b'1', 0.00, '', 1399985191002447872, '2022-08-25 15:00:28', 1399985191002447872, '2022-08-25 15:00:28', 0, 0); +INSERT INTO `base_dict_item` VALUES (1562696420561231872, 1562696107020230656, 'BpmModelPublish', 'unpublished', '未发布', b'1', 0.00, '未上传xml文档', 1399985191002447872, '2022-08-25 15:00:35', 1399985191002447872, '2022-08-25 15:28:09', 0, 1); +INSERT INTO `base_dict_item` VALUES (1562703450588028928, 1562696107020230656, 'BpmModelPublish', 'unpublishedXml', '未发布(已上传BPMN)', b'1', 0.00, '有xml文档', 1399985191002447872, '2022-08-25 15:28:31', 1399985191002447872, '2022-08-25 15:34:45', 0, 1); +INSERT INTO `base_dict_item` VALUES (1563087300157747200, 1563083969989423104, 'BpmTaskAssignType', 'user', '用户', b'1', 0.00, '', 1399985191002447872, '2022-08-26 16:53:48', 1399985191002447872, '2022-09-06 22:50:15', 0, 1); +INSERT INTO `base_dict_item` VALUES (1567091825981980672, 1567091641298386944, 'BpmTaskState', 'running', '处理中', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:06:21', 1399985191002447872, '2022-09-06 18:06:21', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567091863017684992, 1567091641298386944, 'BpmTaskState', 'pass', '通过', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:06:30', 1399985191002447872, '2022-09-06 18:06:30', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567091902414782464, 1567091641298386944, 'BpmTaskState', 'reject', '驳回', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:06:39', 1399985191002447872, '2022-09-06 18:06:51', 0, 1); +INSERT INTO `base_dict_item` VALUES (1567091993569591296, 1567091641298386944, 'BpmTaskState', 'back', '退回', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:07:01', 1399985191002447872, '2022-09-06 18:07:01', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567092037261656064, 1567091641298386944, 'BpmTaskState', 'retrieve', '取回', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:07:12', 1399985191002447872, '2022-09-06 18:07:22', 0, 1); +INSERT INTO `base_dict_item` VALUES (1567092124226355200, 1567091641298386944, 'BpmTaskState', 'skip', '跳过', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:07:32', 1399985191002447872, '2022-09-06 18:07:32', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567163310103564288, 1563083969989423104, 'BpmTaskAssignType', 'userGroup', '用户组', b'1', 0.00, '', 1399985191002447872, '2022-09-06 22:50:24', 1399985191002447872, '2022-09-06 22:50:24', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567163343288897536, 1563083969989423104, 'BpmTaskAssignType', 'role', '角色', b'1', 0.00, '', 1399985191002447872, '2022-09-06 22:50:32', 1399985191002447872, '2022-09-06 22:50:32', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567163380693700608, 1563083969989423104, 'BpmTaskAssignType', 'deptMember', '部门成员', b'1', 0.00, '', 1399985191002447872, '2022-09-06 22:50:41', 1399985191002447872, '2022-09-06 22:50:41', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567163412960481280, 1563083969989423104, 'BpmTaskAssignType', 'deptLeader', '部门的负责人', b'1', 0.00, '', 1399985191002447872, '2022-09-06 22:50:49', 1399985191002447872, '2022-09-06 22:50:49', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567175558888923136, 1563083969989423104, 'BpmTaskAssignType', 'roleGroup', '角色组', b'1', 0.00, '', 1399985191002447872, '2022-09-06 23:39:05', 1399985191002447872, '2022-09-06 23:39:05', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567178994242002944, 1563083969989423104, 'BpmTaskAssignType', 'sponsor', '发起人', b'1', 0.00, '', 1399985191002447872, '2022-09-06 23:52:44', 1399985191002447872, '2022-09-06 23:52:44', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567179143576002560, 1563083969989423104, 'BpmTaskAssignType', 'select', '用户手动选择', b'1', 0.00, '', 1399985191002447872, '2022-09-06 23:53:19', 1399985191002447872, '2022-09-07 00:01:22', 0, 1); +INSERT INTO `base_dict_item` VALUES (1570343731634249728, 1570343684024705024, 'BpmTaskResult', 'pass', '通过', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:16', 1399985191002447872, '2022-09-15 17:28:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570343761636106240, 1570343684024705024, 'BpmTaskResult', 'notPass', '不通过', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:23', 1399985191002447872, '2022-09-15 17:28:23', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570343788056027136, 1570343684024705024, 'BpmTaskResult', 'abstain', '弃权', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:29', 1399985191002447872, '2022-09-15 17:28:29', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570343826018672640, 1570343684024705024, 'BpmTaskResult', 'reject', '驳回', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:38', 1399985191002447872, '2022-09-15 17:28:38', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570343873737269248, 1570343684024705024, 'BpmTaskResult', 'back', '退回', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:50', 1399985191002447872, '2022-09-15 17:28:50', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570343913918701568, 1570343684024705024, 'BpmTaskResult', 'retrieve', '取回', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:59', 1399985191002447872, '2022-09-15 17:28:59', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570685888076120064, 1570343684024705024, 'BpmTaskResult', 'autoFinish', '自动完成', b'1', 0.00, '', 1399985191002447872, '2022-09-16 16:07:52', 1399985191002447872, '2022-09-16 16:08:02', 0, 1); +INSERT INTO `base_dict_item` VALUES (1570764765255397376, 1570764395519111168, 'BpmInstanceState', 'running', '运行中', b'1', 0.00, '', 1399985191002447872, '2022-09-16 21:21:18', 1399985191002447872, '2022-09-16 21:21:18', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570764802047832064, 1570764395519111168, 'BpmInstanceState', 'finish', '已完成', b'1', 0.00, '', 1399985191002447872, '2022-09-16 21:21:27', 1399985191002447872, '2022-09-16 21:21:27', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570764836319490048, 1570764395519111168, 'BpmInstanceState', 'cancel', '取消', b'1', 0.00, '', 1399985191002447872, '2022-09-16 21:21:35', 1399985191002447872, '2022-09-16 21:21:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570784215744585728, 1570343684024705024, 'BpmTaskResult', 'cancel', '取消', b'1', 0.00, '', 1399985191002447872, '2022-09-16 22:38:35', 1399985191002447872, '2022-09-16 22:38:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570784331511570432, 1567091641298386944, 'BpmTaskState', 'cancel', '取消', b'1', 0.00, '', 1399985191002447872, '2022-09-16 22:39:03', 1399985191002447872, '2022-09-16 22:39:03', 0, 0); +INSERT INTO `base_dict_item` VALUES (1573665422392098816, 1439961232651034624, 'MessageTemplateCode', '0', '站内信', b'1', -11.00, 'SITE', 1399985191002447872, '2022-09-24 21:27:29', 1399985191002447872, '2022-09-24 21:27:39', 0, 1); +INSERT INTO `base_dict_item` VALUES (1589528254477488128, 1589527951317389312, 'DataScopePerm', '7', '所在及下级部门', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:00:43', 1414143554414059520, '2022-11-07 16:00:43', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528283539820544, 1589527951317389312, 'DataScopePerm', '6', '所在部门', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:00:49', 1414143554414059520, '2022-11-07 16:00:49', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528315672383488, 1589527951317389312, 'DataScopePerm', '5', '全部数据', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:00:57', 1414143554414059520, '2022-11-07 16:00:57', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528340267782144, 1589527951317389312, 'DataScopePerm', '4', '部门和用户范围', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:01:03', 1414143554414059520, '2022-11-07 16:01:03', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528367228768256, 1589527951317389312, 'DataScopePerm', '3', '部门范围', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:01:09', 1414143554414059520, '2022-11-07 16:01:09', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528393292173312, 1589527951317389312, 'DataScopePerm', '2', '用户范围', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:01:16', 1414143554414059520, '2022-11-07 16:01:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528423956729856, 1589527951317389312, 'DataScopePerm', '1', '自身数据', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:01:23', 1414143554414059520, '2022-11-07 16:01:23', 0, 0); -- ---------------------------- -- Table structure for base_dynamic_data_source @@ -310,6 +312,7 @@ CREATE TABLE `base_param` ( `param_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数键名', `value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数值', `type` int(4) NULL DEFAULT NULL COMMENT '参数类型', + `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '启用状态', `internal` bit(1) NOT NULL COMMENT '内置参数', `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人', @@ -324,12 +327,12 @@ CREATE TABLE `base_param` ( -- ---------------------------- -- Records of base_param -- ---------------------------- -INSERT INTO `base_param` VALUES (1452842684284891136, '测试', 'test.v1', '123', 1, b'0', NULL, 1399985191002447872, '2021-10-26 11:41:03', 1399985191002447872, '2021-10-26 11:41:03', 0, 0); -INSERT INTO `base_param` VALUES (1500338438182789120, '结算台聚合支付请求地址', 'CashierAggregateUrl', 'http://127.0.0.1/api/', 1, b'1', '', 1399985191002447872, '2022-03-06 13:12:13', 1399985191002447872, '2022-05-01 15:03:03', 0, 3); -INSERT INTO `base_param` VALUES (1520668030248361984, '文件服务器地址', 'FileServerUrl', 'http://127.0.0.1:9999', 1, b'1', '', 1399985191002447872, '2022-05-01 15:34:46', 1399985191002447872, '2022-05-19 12:53:21', 0, 5); -INSERT INTO `base_param` VALUES (1529281530059161600, 'websocket服务器地址', 'WebsocketServerUrl', 'ws://127.0.0.1:9999', 1, b'1', '', 1399985191002447872, '2022-05-25 10:01:44', 1399985191002447872, '2022-05-25 10:01:44', 0, 0); -INSERT INTO `base_param` VALUES (1545765299880448000, '服务器地址', 'ServerUrl', 'http://127.0.0.1:9999', 1, b'1', '', 1399985191002447872, '2022-07-09 21:42:21', 1399985191002447872, '2022-07-09 21:42:21', 0, 0); -INSERT INTO `base_param` VALUES (1547511252795912192, '微信jsapi支付回调服务地址', 'JsapiRedirectUrl', 'http://127.0.0.1/api/', 1, b'1', '', 1414143554414059520, '2022-07-14 17:20:09', 1414143554414059520, '2022-07-14 17:20:09', 0, 0); +INSERT INTO `base_param` VALUES (1452842684284891136, '测试', 'test.v1', '123', 1, b'1', b'0', NULL, 1399985191002447872, '2021-10-26 11:41:03', 1399985191002447872, '2021-10-26 11:41:03', 0, 0); +INSERT INTO `base_param` VALUES (1500338438182789120, '结算台聚合支付请求地址', 'CashierAggregateUrl', 'http://127.0.0.1/api/', 1, b'1', b'1', '', 1399985191002447872, '2022-03-06 13:12:13', 1399985191002447872, '2022-05-01 15:03:03', 0, 3); +INSERT INTO `base_param` VALUES (1520668030248361984, '文件服务器地址', 'FileServerUrl', 'http://127.0.0.1:9999', 1, b'1', b'1', '', 1399985191002447872, '2022-05-01 15:34:46', 1399985191002447872, '2022-05-19 12:53:21', 0, 5); +INSERT INTO `base_param` VALUES (1529281530059161600, 'websocket服务器地址', 'WebsocketServerUrl', 'ws://127.0.0.1:9999', 1, b'1', b'1', '', 1399985191002447872, '2022-05-25 10:01:44', 1399985191002447872, '2022-05-25 10:01:44', 0, 0); +INSERT INTO `base_param` VALUES (1545765299880448000, '服务器地址', 'ServerUrl', 'http://127.0.0.1:9999', 1, b'1', b'1', '', 1399985191002447872, '2022-07-09 21:42:21', 1399985191002447872, '2022-07-09 21:42:21', 0, 0); +INSERT INTO `base_param` VALUES (1547511252795912192, '微信jsapi支付回调服务地址', 'JsapiRedirectUrl', 'http://127.0.0.1/api/', 1, b'1', b'1', '', 1414143554414059520, '2022-07-14 17:20:09', 1414143554414059520, '2022-07-14 17:20:09', 0, 0); -- ---------------------------- -- Table structure for bpm_instance diff --git a/_doc/ChangeLog.md b/_doc/ChangeLog.md index c4ebd4de..281ba6b8 100644 --- a/_doc/ChangeLog.md +++ b/_doc/ChangeLog.md @@ -1,5 +1,25 @@ # CHANGELOG -## [v1.1.7] 一号线-工研院 +## [v1.1.9] 一号线-工研院 +**项目主要更新** +- 新增: 后端字典值翻译工具类 +- 新增: 后端返回对象字典值翻译工具功能,支持源对象直接翻译和转换成Map +- 新增: 条件查询生成器, 通过查询对象直接生成QueryWrapper +- 优化: 字典支持配置是否启用 +- 优化: 系统参数支持配置是否启用 +- 优化: RabbitMQ支持在不配置连接地址的情况下不无限重连 +- 优化: 替换lock实现为lock4j +- 优化: AutoConfig使用Spring Boot 2.7.x推荐方式 + +**Vue3进度** +- 优化: 字典支持配置是否启用 +- 优化: 用户和角色选择器新增数据源属性 +- 优化: 升级适配vite3.x + +**Vue2更新** +- 优化: 字典支持配置是否启用 +- 优化: 用户和角色选择器新增数据源属性 + +## [v1.1.8] 一号线-工研院 **项目主要更新** - 优化: 升级基础依赖 - 优化: redisson启动机制修改, 不再会导致项目无法启动 @@ -383,4 +403,4 @@ - 字典项支持排序 - 支持通过终端管理配置登录 ## [v1.1.0-alpha-1] 一号线-工研院.预览版1 -- 初始化提交 \ No newline at end of file +- 初始化提交 diff --git a/_license/LICENSE.md b/_license/LICENSE.md index ea5222cd..b6ce6c42 100644 --- a/_license/LICENSE.md +++ b/_license/LICENSE.md @@ -35,3 +35,6 @@ https://gitee.com/toktok/easy-cron ACTable是对Mybatis做的增强功能,通过配置model注解的方式来创建表,修改表结构,并且实现了共通的CUDR功能提升开发效率: https://gitee.com/sunchenbin/mybatis-enhance + +Knife4j是一个集Swagger2 和 OpenAPI3为一体的增强解决方案: +https://gitee.com/xiaoym/knife4j diff --git a/_license/knife4j/LICENSE b/_license/knife4j/LICENSE new file mode 100644 index 00000000..22f2733a --- /dev/null +++ b/_license/knife4j/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "{}" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright 2017 小明 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/bootx-common-core/pom.xml b/bootx-common-core/pom.xml index 12932980..1afa2a55 100644 --- a/bootx-common-core/pom.xml +++ b/bootx-common-core/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-platform - 1.1.8 + 1.1.9 4.0.0 @@ -108,4 +108,4 @@ - \ No newline at end of file + diff --git a/bootx-common-starters/common-starter-audit-log/pom.xml b/bootx-common-starters/common-starter-audit-log/pom.xml index bdaf0329..28d8f26e 100644 --- a/bootx-common-starters/common-starter-audit-log/pom.xml +++ b/bootx-common-starters/common-starter-audit-log/pom.xml @@ -5,7 +5,7 @@ bootx-common-starters cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -40,4 +40,4 @@ - \ No newline at end of file + diff --git a/bootx-common-starters/common-starter-auth/pom.xml b/bootx-common-starters/common-starter-auth/pom.xml index 6b29cf56..04643f4f 100644 --- a/bootx-common-starters/common-starter-auth/pom.xml +++ b/bootx-common-starters/common-starter-auth/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-common-starters - 1.1.8 + 1.1.9 4.0.0 common-starter-auth @@ -43,4 +43,4 @@ - \ No newline at end of file + diff --git a/bootx-common-starters/common-starter-code-gen/pom.xml b/bootx-common-starters/common-starter-code-gen/pom.xml index 943bda7e..58726f6f 100644 --- a/bootx-common-starters/common-starter-code-gen/pom.xml +++ b/bootx-common-starters/common-starter-code-gen/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-common-starters - 1.1.8 + 1.1.9 4.0.0 @@ -29,4 +29,4 @@ velocity-engine-core - \ No newline at end of file + diff --git a/bootx-common-starters/common-starter-data-perm/pom.xml b/bootx-common-starters/common-starter-data-perm/pom.xml index 3bec1544..9298284b 100644 --- a/bootx-common-starters/common-starter-data-perm/pom.xml +++ b/bootx-common-starters/common-starter-data-perm/pom.xml @@ -5,7 +5,7 @@ bootx-common-starters cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -25,4 +25,4 @@ common-mybatis-plus - \ No newline at end of file + diff --git a/bootx-common-starters/common-starter-dingtalk/pom.xml b/bootx-common-starters/common-starter-dingtalk/pom.xml index 8ff044b8..d00ab5e8 100644 --- a/bootx-common-starters/common-starter-dingtalk/pom.xml +++ b/bootx-common-starters/common-starter-dingtalk/pom.xml @@ -5,7 +5,7 @@ bootx-common-starters cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -26,4 +26,4 @@ common-starter-data-perm - \ No newline at end of file + diff --git a/bootx-common-starters/common-starter-file/pom.xml b/bootx-common-starters/common-starter-file/pom.xml index 3304f10c..622bc435 100644 --- a/bootx-common-starters/common-starter-file/pom.xml +++ b/bootx-common-starters/common-starter-file/pom.xml @@ -5,7 +5,7 @@ bootx-common-starters cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -31,4 +31,4 @@ true - \ No newline at end of file + diff --git a/bootx-common-starters/common-starter-flowable/pom.xml b/bootx-common-starters/common-starter-flowable/pom.xml index 23630c05..b0e4532e 100644 --- a/bootx-common-starters/common-starter-flowable/pom.xml +++ b/bootx-common-starters/common-starter-flowable/pom.xml @@ -5,7 +5,7 @@ bootx-common-starters cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -40,4 +40,4 @@ ${flowable.version} - \ No newline at end of file + diff --git a/bootx-common-starters/common-starter-monitor/pom.xml b/bootx-common-starters/common-starter-monitor/pom.xml index 2c2601c5..df7be6f6 100644 --- a/bootx-common-starters/common-starter-monitor/pom.xml +++ b/bootx-common-starters/common-starter-monitor/pom.xml @@ -5,7 +5,7 @@ bootx-common-starters cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 jar @@ -23,4 +23,4 @@ common-mongo - \ No newline at end of file + diff --git a/bootx-common-starters/common-starter-quartz/pom.xml b/bootx-common-starters/common-starter-quartz/pom.xml index d6cc9e79..e4ddf7e0 100644 --- a/bootx-common-starters/common-starter-quartz/pom.xml +++ b/bootx-common-starters/common-starter-quartz/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-common-starters - 1.1.8 + 1.1.9 4.0.0 @@ -36,4 +36,4 @@ common-mybatis-plus - \ No newline at end of file + diff --git a/bootx-common-starters/common-starter-wechat/pom.xml b/bootx-common-starters/common-starter-wechat/pom.xml index a45e786f..4441791d 100644 --- a/bootx-common-starters/common-starter-wechat/pom.xml +++ b/bootx-common-starters/common-starter-wechat/pom.xml @@ -5,7 +5,7 @@ bootx-common-starters cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -48,4 +48,4 @@ common-starter-auth - \ No newline at end of file + diff --git a/bootx-common-starters/common-starter-wecom/pom.xml b/bootx-common-starters/common-starter-wecom/pom.xml index bed43134..1ef25cfd 100644 --- a/bootx-common-starters/common-starter-wecom/pom.xml +++ b/bootx-common-starters/common-starter-wecom/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-common-starters - 1.1.8 + 1.1.9 4.0.0 jar @@ -37,4 +37,4 @@ common-starter-data-perm - \ No newline at end of file + diff --git a/bootx-common-starters/pom.xml b/bootx-common-starters/pom.xml index 350b771e..ef20c779 100644 --- a/bootx-common-starters/pom.xml +++ b/bootx-common-starters/pom.xml @@ -5,7 +5,7 @@ bootx-platform cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -112,4 +112,4 @@ - \ No newline at end of file + diff --git a/bootx-commons/common-actable/pom.xml b/bootx-commons/common-actable/pom.xml index 5c606c34..d1fc1e88 100644 --- a/bootx-commons/common-actable/pom.xml +++ b/bootx-commons/common-actable/pom.xml @@ -6,7 +6,7 @@ cn.bootx.platform bootx-commons - 1.1.8 + 1.1.9 common-actable diff --git a/bootx-commons/common-cache/pom.xml b/bootx-commons/common-cache/pom.xml index f42e49e4..c69f04b9 100644 --- a/bootx-commons/common-cache/pom.xml +++ b/bootx-commons/common-cache/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-commons - 1.1.8 + 1.1.9 4.0.0 @@ -38,4 +38,4 @@ common-header-holder - \ No newline at end of file + diff --git a/bootx-commons/common-exception-handler/pom.xml b/bootx-commons/common-exception-handler/pom.xml index 725f0e47..e265633a 100644 --- a/bootx-commons/common-exception-handler/pom.xml +++ b/bootx-commons/common-exception-handler/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 common-exception-handler @@ -17,4 +17,4 @@ spring-boot-starter-web - \ No newline at end of file + diff --git a/bootx-commons/common-header-holder/pom.xml b/bootx-commons/common-header-holder/pom.xml index bc5be463..6a46312f 100644 --- a/bootx-commons/common-header-holder/pom.xml +++ b/bootx-commons/common-header-holder/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -17,4 +17,4 @@ common-spring - \ No newline at end of file + diff --git a/bootx-commons/common-idempotency/pom.xml b/bootx-commons/common-idempotency/pom.xml index 9637ff89..51f5ae4b 100644 --- a/bootx-commons/common-idempotency/pom.xml +++ b/bootx-commons/common-idempotency/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -22,4 +22,4 @@ common-redis-client - \ No newline at end of file + diff --git a/bootx-commons/common-jackson/pom.xml b/bootx-commons/common-jackson/pom.xml index 3efc5446..93f5c2ac 100644 --- a/bootx-commons/common-jackson/pom.xml +++ b/bootx-commons/common-jackson/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-commons - 1.1.8 + 1.1.9 4.0.0 @@ -18,4 +18,4 @@ - \ No newline at end of file + diff --git a/bootx-commons/common-lock/pom.xml b/bootx-commons/common-lock/pom.xml index 6b8cef30..47c61a6b 100644 --- a/bootx-commons/common-lock/pom.xml +++ b/bootx-commons/common-lock/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-commons - 1.1.8 + 1.1.9 4.0.0 diff --git a/bootx-commons/common-log/pom.xml b/bootx-commons/common-log/pom.xml index 9b52a4df..38c3db46 100644 --- a/bootx-commons/common-log/pom.xml +++ b/bootx-commons/common-log/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-commons - 1.1.8 + 1.1.9 4.0.0 @@ -46,4 +46,4 @@ - \ No newline at end of file + diff --git a/bootx-commons/common-mongo/pom.xml b/bootx-commons/common-mongo/pom.xml index 49a87e7f..df61f84a 100644 --- a/bootx-commons/common-mongo/pom.xml +++ b/bootx-commons/common-mongo/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-commons - 1.1.8 + 1.1.9 4.0.0 common-mongo @@ -19,4 +19,4 @@ - \ No newline at end of file + diff --git a/bootx-commons/common-mqtt/pom.xml b/bootx-commons/common-mqtt/pom.xml index 4022ef43..3963c230 100644 --- a/bootx-commons/common-mqtt/pom.xml +++ b/bootx-commons/common-mqtt/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -23,4 +23,4 @@ - \ No newline at end of file + diff --git a/bootx-commons/common-mybatis-plus/pom.xml b/bootx-commons/common-mybatis-plus/pom.xml index bb34488e..6b85ea06 100644 --- a/bootx-commons/common-mybatis-plus/pom.xml +++ b/bootx-commons/common-mybatis-plus/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -38,4 +38,4 @@ - \ No newline at end of file + diff --git a/bootx-commons/common-rabbitmq/pom.xml b/bootx-commons/common-rabbitmq/pom.xml index 77e10c60..079039b0 100644 --- a/bootx-commons/common-rabbitmq/pom.xml +++ b/bootx-commons/common-rabbitmq/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -22,4 +22,4 @@ common-jackson - \ No newline at end of file + diff --git a/bootx-commons/common-redis-client/pom.xml b/bootx-commons/common-redis-client/pom.xml index 031c6e21..541f0feb 100644 --- a/bootx-commons/common-redis-client/pom.xml +++ b/bootx-commons/common-redis-client/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 diff --git a/bootx-commons/common-sequence/pom.xml b/bootx-commons/common-sequence/pom.xml index 5faaffe7..dd4286b7 100644 --- a/bootx-commons/common-sequence/pom.xml +++ b/bootx-commons/common-sequence/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -29,4 +29,4 @@ - \ No newline at end of file + diff --git a/bootx-commons/common-spring/pom.xml b/bootx-commons/common-spring/pom.xml index f07fe3dd..4c005e22 100644 --- a/bootx-commons/common-spring/pom.xml +++ b/bootx-commons/common-spring/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -33,4 +33,4 @@ - \ No newline at end of file + diff --git a/bootx-commons/common-super-query/pom.xml b/bootx-commons/common-super-query/pom.xml index cfbfe925..7f84f5a1 100644 --- a/bootx-commons/common-super-query/pom.xml +++ b/bootx-commons/common-super-query/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -18,4 +18,4 @@ - \ No newline at end of file + diff --git a/bootx-commons/common-swagger/pom.xml b/bootx-commons/common-swagger/pom.xml index 397d2c2a..852a308a 100644 --- a/bootx-commons/common-swagger/pom.xml +++ b/bootx-commons/common-swagger/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 diff --git a/bootx-commons/common-websocket/pom.xml b/bootx-commons/common-websocket/pom.xml index d83a807b..2c3a53f2 100644 --- a/bootx-commons/common-websocket/pom.xml +++ b/bootx-commons/common-websocket/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -25,4 +25,4 @@ common-jackson - \ No newline at end of file + diff --git a/bootx-commons/common-xxl-job/pom.xml b/bootx-commons/common-xxl-job/pom.xml index bfdb49ec..f677a65c 100644 --- a/bootx-commons/common-xxl-job/pom.xml +++ b/bootx-commons/common-xxl-job/pom.xml @@ -5,7 +5,7 @@ bootx-commons cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -17,4 +17,4 @@ xxl-job-core - \ No newline at end of file + diff --git a/bootx-commons/pom.xml b/bootx-commons/pom.xml index 75dbac89..c6d134a3 100644 --- a/bootx-commons/pom.xml +++ b/bootx-commons/pom.xml @@ -7,7 +7,7 @@ cn.bootx.platform bootx-platform - 1.1.8 + 1.1.9 bootx-commons diff --git a/bootx-demo/pom.xml b/bootx-demo/pom.xml index 75498199..ade468fd 100644 --- a/bootx-demo/pom.xml +++ b/bootx-demo/pom.xml @@ -5,7 +5,7 @@ bootx-platform cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -58,4 +58,4 @@ common-starter-quartz - \ No newline at end of file + diff --git a/bootx-modules/module-eshop/pom.xml b/bootx-modules/module-eshop/pom.xml index 8a8e535e..1b686f3f 100644 --- a/bootx-modules/module-eshop/pom.xml +++ b/bootx-modules/module-eshop/pom.xml @@ -5,7 +5,7 @@ bootx-modules cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -42,4 +42,4 @@ - \ No newline at end of file + diff --git a/bootx-modules/pom.xml b/bootx-modules/pom.xml index 1b9bd81e..ee1e20c1 100644 --- a/bootx-modules/pom.xml +++ b/bootx-modules/pom.xml @@ -5,7 +5,7 @@ bootx-platform cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/bootx-services/pom.xml b/bootx-services/pom.xml index 34d6bbb1..deb75fbb 100644 --- a/bootx-services/pom.xml +++ b/bootx-services/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-platform - 1.1.8 + 1.1.9 4.0.0 diff --git a/bootx-services/service-baseapi/pom.xml b/bootx-services/service-baseapi/pom.xml index 5a1c76ae..dfcdeb57 100644 --- a/bootx-services/service-baseapi/pom.xml +++ b/bootx-services/service-baseapi/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-services - 1.1.8 + 1.1.9 4.0.0 @@ -49,4 +49,4 @@ - \ No newline at end of file + diff --git a/bootx-services/service-goods/pom.xml b/bootx-services/service-goods/pom.xml index 879d5e88..82a1096d 100644 --- a/bootx-services/service-goods/pom.xml +++ b/bootx-services/service-goods/pom.xml @@ -5,7 +5,7 @@ bootx-services cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -24,4 +24,4 @@ common-starter-quartz - \ No newline at end of file + diff --git a/bootx-services/service-iam/pom.xml b/bootx-services/service-iam/pom.xml index c1a6770d..44b6adde 100644 --- a/bootx-services/service-iam/pom.xml +++ b/bootx-services/service-iam/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-services - 1.1.8 + 1.1.9 4.0.0 @@ -70,4 +70,4 @@ - \ No newline at end of file + diff --git a/bootx-services/service-notice/pom.xml b/bootx-services/service-notice/pom.xml index 05af1a23..0d04d5e4 100644 --- a/bootx-services/service-notice/pom.xml +++ b/bootx-services/service-notice/pom.xml @@ -5,7 +5,7 @@ bootx-services cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -74,4 +74,4 @@ common-starter-wecom - \ No newline at end of file + diff --git a/bootx-services/service-office/pom.xml b/bootx-services/service-office/pom.xml index 7c58134f..49a7ce6d 100644 --- a/bootx-services/service-office/pom.xml +++ b/bootx-services/service-office/pom.xml @@ -5,7 +5,7 @@ bootx-services cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -54,4 +54,4 @@ - \ No newline at end of file + diff --git a/bootx-services/service-order/pom.xml b/bootx-services/service-order/pom.xml index a9520eb0..c70961b2 100644 --- a/bootx-services/service-order/pom.xml +++ b/bootx-services/service-order/pom.xml @@ -5,7 +5,7 @@ bootx-services cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -39,4 +39,4 @@ - \ No newline at end of file + diff --git a/bootx-services/service-payment/pom.xml b/bootx-services/service-payment/pom.xml index bf3f079e..1416ab1c 100644 --- a/bootx-services/service-payment/pom.xml +++ b/bootx-services/service-payment/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-services - 1.1.8 + 1.1.9 4.0.0 @@ -103,4 +103,4 @@ - \ No newline at end of file + diff --git a/bootx-services/service-sales/pom.xml b/bootx-services/service-sales/pom.xml index 421c7e8d..dbf67dd0 100644 --- a/bootx-services/service-sales/pom.xml +++ b/bootx-services/service-sales/pom.xml @@ -5,7 +5,7 @@ bootx-services cn.bootx.platform - 1.1.8 + 1.1.9 4.0.0 @@ -26,4 +26,4 @@ - \ No newline at end of file + diff --git a/bootx-start/pom.xml b/bootx-start/pom.xml index e4e2ec21..6324c87b 100644 --- a/bootx-start/pom.xml +++ b/bootx-start/pom.xml @@ -5,7 +5,7 @@ cn.bootx.platform bootx-platform - 1.1.8 + 1.1.9 4.0.0 bootx-start @@ -77,4 +77,4 @@ - \ No newline at end of file + diff --git a/bootx-start/src/main/resources/db/migration/V1.1.8_221206__release.sql b/bootx-start/src/main/resources/db/migration/V1.1.9_221221__release.sql similarity index 92% rename from bootx-start/src/main/resources/db/migration/V1.1.8_221206__release.sql rename to bootx-start/src/main/resources/db/migration/V1.1.9_221221__release.sql index 858f22fc..45c73885 100644 --- a/bootx-start/src/main/resources/db/migration/V1.1.8_221206__release.sql +++ b/bootx-start/src/main/resources/db/migration/V1.1.9_221221__release.sql @@ -9,7 +9,7 @@ Target Server Version : 50735 File Encoding : 65001 - Date: 06/12/2022 16:16:00 + Date: 21/12/2022 23:29:53 */ SET NAMES utf8mb4; @@ -23,6 +23,7 @@ CREATE TABLE `base_dict` ( `id` bigint(20) NOT NULL, `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '编码', `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '名称', + `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '启用状态', `group_tag` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '分类标签', `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人', @@ -37,37 +38,37 @@ CREATE TABLE `base_dict` ( -- ---------------------------- -- Records of base_dict -- ---------------------------- -INSERT INTO `base_dict` VALUES (1422929378374828033, 'Sex', '性别', '基础属性', '性别', 0, '2021-08-04 22:36:15', 1399985191002447872, '2022-05-11 19:48:40', 0, 6); -INSERT INTO `base_dict` VALUES (1425744045414772737, 'MenuType', '菜单类型', '系统属性', '菜单类型', 0, '2021-08-12 17:00:44', 1399985191002447872, '2022-05-11 19:48:44', 0, 4); -INSERT INTO `base_dict` VALUES (1430063572491411456, 'loginType', '字典类型', NULL, '字典类型', 1399985191002447872, '2021-08-24 15:05:00', 1399985191002447872, '2021-08-24 15:05:00', 1, 2); -INSERT INTO `base_dict` VALUES (1435829999592759296, 'UserStatusCode', '用户状态码', '系统属性', '用户状态码', 1399985191002447872, '2021-09-09 12:58:43', 1399985191002447872, '2022-05-11 19:48:56', 0, 2); -INSERT INTO `base_dict` VALUES (1435838066191458304, 'LogBusinessType', '业务操作类型', '系统属性', '操作日志记录的业务操作类型', 1399985191002447872, '2021-09-09 13:30:46', 1399985191002447872, '2022-05-11 19:49:00', 0, 2); -INSERT INTO `base_dict` VALUES (1438078864509317120, 'MailSecurityCode', '邮箱安全方式编码', '消息服务', '邮箱安全方式编码', 1399985191002447872, '2021-09-15 17:54:54', 1399985191002447872, '2022-05-11 19:49:06', 0, 2); -INSERT INTO `base_dict` VALUES (1439961232651034624, 'MessageTemplateCode', '消息模板类型', '消息服务', '消息模板类型', 1399985191002447872, '2021-09-20 22:34:46', 1399985191002447872, '2022-05-11 19:48:34', 0, 1); -INSERT INTO `base_dict` VALUES (1452836604783845376, 'SocialType', '三方系统类型', '系统属性', '三方系统类型', 1399985191002447872, '2021-10-26 11:16:54', 1399985191002447872, '2022-05-11 19:48:28', 0, 3); -INSERT INTO `base_dict` VALUES (1452843488735621120, 'ParamType', '参数类型', '系统属性', '参数类型', 1399985191002447872, '2021-10-26 11:44:15', 1399985191002447872, '2022-05-11 19:48:21', 0, 2); -INSERT INTO `base_dict` VALUES (1496024933900169216, 'Political', '政治面貌', '基础数据', '政治面貌', 1399985191002447872, '2022-02-22 15:31:54', 1399985191002447872, '2022-05-11 19:48:04', 0, 1); -INSERT INTO `base_dict` VALUES (1496722894707728384, 'PayChannel', '支付通道', '支付服务', '支付宝, 微信, 云闪付等', 1399985191002447872, '2022-02-24 13:45:21', 1399985191002447872, '2022-05-11 19:47:51', 0, 1); -INSERT INTO `base_dict` VALUES (1496723207565058048, 'PayWay', '支付方式', '支付服务', '扫码支付、Wap、App支付等', 1399985191002447872, '2022-02-24 13:46:35', 1399985191002447872, '2022-05-11 19:47:46', 0, 1); -INSERT INTO `base_dict` VALUES (1497140849954185216, 'PayStatus', '支付状态', '支付服务', '支付中,成功,失败等', 1399985191002447872, '2022-02-25 17:26:09', 1399985191002447872, '2022-05-11 19:47:40', 0, 2); -INSERT INTO `base_dict` VALUES (1501031423232937984, 'AsyncPayChannel', '异步支付通道', '支付服务', '如微信支付宝云闪付等第三方支付', 1399985191002447872, '2022-03-08 11:05:54', 1399985191002447872, '2022-05-11 19:47:37', 0, 1); -INSERT INTO `base_dict` VALUES (1502276739978473472, 'WalletStatus', '钱包状态', '支付服务', '钱包状态', 1399985191002447872, '2022-03-11 21:34:20', 1399985191002447872, '2022-05-11 19:47:33', 0, 2); -INSERT INTO `base_dict` VALUES (1502624342339448832, 'WalletOperation', '钱包日志操作类型', NULL, '', 1399985191002447872, '2022-03-12 20:35:35', 1399985191002447872, '2022-03-12 20:35:35', 1, 0); -INSERT INTO `base_dict` VALUES (1502624515799085056, 'WalletLogType', '钱包日志类型', '支付服务', '钱包日志类型', 1399985191002447872, '2022-03-12 20:36:17', 1399985191002447872, '2022-05-11 19:47:29', 0, 1); -INSERT INTO `base_dict` VALUES (1502624632392347648, 'WalletLogOperation', '钱包日志操作类型', '支付服务', '钱包日志操作类型', 1399985191002447872, '2022-03-12 20:36:44', 1399985191002447872, '2022-05-11 19:47:21', 0, 1); -INSERT INTO `base_dict` VALUES (1503340128037212160, 'VoucherStatus', '储值卡状态', '支付服务', '储值卡状态', 1399985191002447872, '2022-03-14 19:59:52', 1399985191002447872, '2022-05-11 19:47:12', 0, 1); -INSERT INTO `base_dict` VALUES (1524356168611188736, 'input', '手工输入', '商品服务', '', 1399985191002447872, '2022-05-11 19:50:06', 1399985191002447872, '2022-05-11 19:50:06', 1, 0); -INSERT INTO `base_dict` VALUES (1524356376518643712, 'GoodsParamType', '参数类型', '商品服务', '列表/手动输入', 1399985191002447872, '2022-05-11 19:50:56', 1399985191002447872, '2022-05-14 23:05:41', 0, 1); -INSERT INTO `base_dict` VALUES (1546757092010078208, 'PayNotifyProcess', '支付回调处理状态', '支付服务', '成功/忽略/失败', 1399985191002447872, '2022-07-12 15:23:23', 1399985191002447872, '2022-07-12 15:23:53', 0, 1); -INSERT INTO `base_dict` VALUES (1556996322223968256, 'WeChatMediaType', '微信媒体类型', '微信', '微信媒体类型', 1399985191002447872, '2022-08-09 21:30:25', 1399985191002447872, '2022-08-09 21:30:26', 0, 0); -INSERT INTO `base_dict` VALUES (1561003021674987520, 'SiteMessageReceive', '消息接收类型', '站内信', '站内信接收类型', 1399985191002447872, '2022-08-20 22:51:37', 1399985191002447872, '2022-08-20 22:51:37', 0, 0); -INSERT INTO `base_dict` VALUES (1561003189111603200, 'SiteMessageState', '消息发布状态', '站内信', '站内信消息发布状态', 1399985191002447872, '2022-08-20 22:52:17', 1399985191002447872, '2022-08-20 22:52:17', 0, 0); -INSERT INTO `base_dict` VALUES (1562696107020230656, 'BpmModelPublish', '工作流模型发布状态', '工作流', '工作流模型发布状态', 1399985191002447872, '2022-08-25 14:59:20', 1399985191002447872, '2022-08-25 15:27:55', 0, 1); -INSERT INTO `base_dict` VALUES (1563083969989423104, 'BpmTaskAssignType', '工作流处理人分配类型', '工作流', '流程任务处理人分配类型', 1399985191002447872, '2022-08-26 16:40:34', 1399985191002447872, '2022-08-26 16:40:53', 0, 1); -INSERT INTO `base_dict` VALUES (1567091641298386944, 'BpmTaskState', '流程任务状态', '工作流', '流程任务状态', 1399985191002447872, '2022-09-06 18:05:37', 1399985191002447872, '2022-09-06 18:05:47', 0, 1); -INSERT INTO `base_dict` VALUES (1570343684024705024, 'BpmTaskResult', '流程任务处理结果', '工作流', '流程任务处理结果', 1399985191002447872, '2022-09-15 17:28:05', 1414143554414059520, '2022-10-19 23:13:40', 0, 1); -INSERT INTO `base_dict` VALUES (1570764395519111168, 'BpmInstanceState', '流程实例状态', '工作流', '流程实例状态', 1399985191002447872, '2022-09-16 21:19:50', 1414143554414059520, '2022-10-19 23:13:33', 0, 1); -INSERT INTO `base_dict` VALUES (1589527951317389312, 'DataScopePerm', '数据范围权限', '系统属性', '数据范围权限', 1414143554414059520, '2022-11-07 15:59:30', 1414143554414059520, '2022-11-07 16:00:27', 0, 1); +INSERT INTO `base_dict` VALUES (1422929378374828033, 'Sex', '性别', b'1', '基础属性', '性别', 0, '2021-08-04 22:36:15', 1399985191002447872, '2022-05-11 19:48:40', 0, 6); +INSERT INTO `base_dict` VALUES (1425744045414772737, 'MenuType', '菜单类型', b'1', '系统属性', '菜单类型', 0, '2021-08-12 17:00:44', 1399985191002447872, '2022-05-11 19:48:44', 0, 4); +INSERT INTO `base_dict` VALUES (1430063572491411456, 'loginType', '字典类型', b'1', NULL, '字典类型', 1399985191002447872, '2021-08-24 15:05:00', 1399985191002447872, '2021-08-24 15:05:00', 1, 2); +INSERT INTO `base_dict` VALUES (1435829999592759296, 'UserStatusCode', '用户状态码', b'1', '系统属性', '用户状态码', 1399985191002447872, '2021-09-09 12:58:43', 1399985191002447872, '2022-05-11 19:48:56', 0, 2); +INSERT INTO `base_dict` VALUES (1435838066191458304, 'LogBusinessType', '业务操作类型', b'1', '系统属性', '操作日志记录的业务操作类型', 1399985191002447872, '2021-09-09 13:30:46', 1399985191002447872, '2022-05-11 19:49:00', 0, 2); +INSERT INTO `base_dict` VALUES (1438078864509317120, 'MailSecurityCode', '邮箱安全方式编码', b'1', '消息服务', '邮箱安全方式编码', 1399985191002447872, '2021-09-15 17:54:54', 1399985191002447872, '2022-05-11 19:49:06', 0, 2); +INSERT INTO `base_dict` VALUES (1439961232651034624, 'MessageTemplateCode', '消息模板类型', b'1', '消息服务', '消息模板类型', 1399985191002447872, '2021-09-20 22:34:46', 1399985191002447872, '2022-05-11 19:48:34', 0, 1); +INSERT INTO `base_dict` VALUES (1452836604783845376, 'SocialType', '三方系统类型', b'1', '系统属性', '三方系统类型', 1399985191002447872, '2021-10-26 11:16:54', 1399985191002447872, '2022-05-11 19:48:28', 0, 3); +INSERT INTO `base_dict` VALUES (1452843488735621120, 'ParamType', '参数类型', b'1', '系统属性', '参数类型', 1399985191002447872, '2021-10-26 11:44:15', 1399985191002447872, '2022-05-11 19:48:21', 0, 2); +INSERT INTO `base_dict` VALUES (1496024933900169216, 'Political', '政治面貌', b'1', '基础数据', '政治面貌', 1399985191002447872, '2022-02-22 15:31:54', 1399985191002447872, '2022-05-11 19:48:04', 0, 1); +INSERT INTO `base_dict` VALUES (1496722894707728384, 'PayChannel', '支付通道', b'1', '支付服务', '支付宝, 微信, 云闪付等', 1399985191002447872, '2022-02-24 13:45:21', 1399985191002447872, '2022-05-11 19:47:51', 0, 1); +INSERT INTO `base_dict` VALUES (1496723207565058048, 'PayWay', '支付方式', b'1', '支付服务', '扫码支付、Wap、App支付等', 1399985191002447872, '2022-02-24 13:46:35', 1399985191002447872, '2022-05-11 19:47:46', 0, 1); +INSERT INTO `base_dict` VALUES (1497140849954185216, 'PayStatus', '支付状态', b'1', '支付服务', '支付中,成功,失败等', 1399985191002447872, '2022-02-25 17:26:09', 1399985191002447872, '2022-05-11 19:47:40', 0, 2); +INSERT INTO `base_dict` VALUES (1501031423232937984, 'AsyncPayChannel', '异步支付通道', b'1', '支付服务', '如微信支付宝云闪付等第三方支付', 1399985191002447872, '2022-03-08 11:05:54', 1399985191002447872, '2022-05-11 19:47:37', 0, 1); +INSERT INTO `base_dict` VALUES (1502276739978473472, 'WalletStatus', '钱包状态', b'1', '支付服务', '钱包状态', 1399985191002447872, '2022-03-11 21:34:20', 1399985191002447872, '2022-05-11 19:47:33', 0, 2); +INSERT INTO `base_dict` VALUES (1502624342339448832, 'WalletOperation', '钱包日志操作类型', b'1', NULL, '', 1399985191002447872, '2022-03-12 20:35:35', 1399985191002447872, '2022-03-12 20:35:35', 1, 0); +INSERT INTO `base_dict` VALUES (1502624515799085056, 'WalletLogType', '钱包日志类型', b'1', '支付服务', '钱包日志类型', 1399985191002447872, '2022-03-12 20:36:17', 1399985191002447872, '2022-05-11 19:47:29', 0, 1); +INSERT INTO `base_dict` VALUES (1502624632392347648, 'WalletLogOperation', '钱包日志操作类型', b'1', '支付服务', '钱包日志操作类型', 1399985191002447872, '2022-03-12 20:36:44', 1399985191002447872, '2022-05-11 19:47:21', 0, 1); +INSERT INTO `base_dict` VALUES (1503340128037212160, 'VoucherStatus', '储值卡状态', b'1', '支付服务', '储值卡状态', 1399985191002447872, '2022-03-14 19:59:52', 1399985191002447872, '2022-05-11 19:47:12', 0, 1); +INSERT INTO `base_dict` VALUES (1524356168611188736, 'input', '手工输入', b'1', '商品服务', '', 1399985191002447872, '2022-05-11 19:50:06', 1399985191002447872, '2022-05-11 19:50:06', 1, 0); +INSERT INTO `base_dict` VALUES (1524356376518643712, 'GoodsParamType', '参数类型', b'1', '商品服务', '列表/手动输入', 1399985191002447872, '2022-05-11 19:50:56', 1399985191002447872, '2022-05-14 23:05:41', 0, 1); +INSERT INTO `base_dict` VALUES (1546757092010078208, 'PayNotifyProcess', '支付回调处理状态', b'1', '支付服务', '成功/忽略/失败', 1399985191002447872, '2022-07-12 15:23:23', 1399985191002447872, '2022-07-12 15:23:53', 0, 1); +INSERT INTO `base_dict` VALUES (1556996322223968256, 'WeChatMediaType', '微信媒体类型', b'1', '微信', '微信媒体类型', 1399985191002447872, '2022-08-09 21:30:25', 1399985191002447872, '2022-08-09 21:30:26', 0, 0); +INSERT INTO `base_dict` VALUES (1561003021674987520, 'SiteMessageReceive', '消息接收类型', b'1', '站内信', '站内信接收类型', 1399985191002447872, '2022-08-20 22:51:37', 1399985191002447872, '2022-08-20 22:51:37', 0, 0); +INSERT INTO `base_dict` VALUES (1561003189111603200, 'SiteMessageState', '消息发布状态', b'1', '站内信', '站内信消息发布状态', 1399985191002447872, '2022-08-20 22:52:17', 1399985191002447872, '2022-08-20 22:52:17', 0, 0); +INSERT INTO `base_dict` VALUES (1562696107020230656, 'BpmModelPublish', '工作流模型发布状态', b'1', '工作流', '工作流模型发布状态', 1399985191002447872, '2022-08-25 14:59:20', 1399985191002447872, '2022-08-25 15:27:55', 0, 1); +INSERT INTO `base_dict` VALUES (1563083969989423104, 'BpmTaskAssignType', '工作流处理人分配类型', b'1', '工作流', '流程任务处理人分配类型', 1399985191002447872, '2022-08-26 16:40:34', 1399985191002447872, '2022-08-26 16:40:53', 0, 1); +INSERT INTO `base_dict` VALUES (1567091641298386944, 'BpmTaskState', '流程任务状态', b'1', '工作流', '流程任务状态', 1399985191002447872, '2022-09-06 18:05:37', 1399985191002447872, '2022-09-06 18:05:47', 0, 1); +INSERT INTO `base_dict` VALUES (1570343684024705024, 'BpmTaskResult', '流程任务处理结果', b'1', '工作流', '流程任务处理结果', 1399985191002447872, '2022-09-15 17:28:05', 1414143554414059520, '2022-10-19 23:13:40', 0, 1); +INSERT INTO `base_dict` VALUES (1570764395519111168, 'BpmInstanceState', '流程实例状态', b'1', '工作流', '流程实例状态', 1399985191002447872, '2022-09-16 21:19:50', 1414143554414059520, '2022-10-19 23:13:33', 0, 1); +INSERT INTO `base_dict` VALUES (1589527951317389312, 'DataScopePerm', '数据范围权限', b'1', '系统属性', '数据范围权限', 1414143554414059520, '2022-11-07 15:59:30', 1414143554414059520, '2022-11-07 16:00:27', 0, 1); -- ---------------------------- -- Table structure for base_dict_item @@ -79,6 +80,7 @@ CREATE TABLE `base_dict_item` ( `dict_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '字典code', `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '字典项code', `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '字典项名称', + `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '启用状态', `sort_no` double(8, 2) NOT NULL COMMENT '排序', `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人', @@ -94,137 +96,137 @@ CREATE TABLE `base_dict_item` ( -- ---------------------------- -- Records of base_dict_item -- ---------------------------- -INSERT INTO `base_dict_item` VALUES (1422931375807242241, 1422929378374828033, 'Sex', '1', '男', 0.00, '男性', 0, '2021-08-04 22:44:11', 0, '2021-08-04 22:44:11', 0, 2); -INSERT INTO `base_dict_item` VALUES (1425729455402401794, 1422929378374828033, 'Sex', '2', '女', 0.00, '女性', 0, '2021-08-12 16:02:46', 0, '2021-08-12 16:02:46', 0, 1); -INSERT INTO `base_dict_item` VALUES (1425744258544136194, 1425744045414772737, 'MenuType', '0', '顶级菜单', 0.00, '顶级菜单', 0, '2021-08-12 17:01:35', 0, '2021-08-12 17:01:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1425744436592340993, 1425744045414772737, 'MenuType', '1', '子菜单', 0.00, '子菜单', 0, '2021-08-12 17:02:17', 0, '2021-08-12 17:02:17', 0, 0); -INSERT INTO `base_dict_item` VALUES (1425744470582980610, 1425744045414772737, 'MenuType', '2', '按钮权限', 0.00, '按钮权限', 0, '2021-08-12 17:02:26', 0, '2021-08-12 17:02:26', 0, 0); -INSERT INTO `base_dict_item` VALUES (1430094707250413568, 1422929378374828033, 'Sex', '0', '未知', 0.00, '不确定性别', 1399985191002447872, '2021-08-24 17:08:43', 1399985191002447872, '2021-08-24 17:08:43', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435830086406463488, 1435829999592759296, 'UserStatusCode', '1', '正常', 0.00, 'NORMAL', 1399985191002447872, '2021-09-09 12:59:04', 1399985191002447872, '2021-09-09 12:59:04', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435830141855162368, 1435829999592759296, 'UserStatusCode', '2', '锁定', 0.00, 'LOCK, 多次登录失败被锁定', 1399985191002447872, '2021-09-09 12:59:17', 1399985191002447872, '2021-09-09 12:59:17', 0, 1); -INSERT INTO `base_dict_item` VALUES (1435830260503633920, 1435829999592759296, 'UserStatusCode', '3', '封禁', 0.00, 'BAN', 1399985191002447872, '2021-09-09 12:59:45', 1399985191002447872, '2021-09-09 12:59:45', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838374749626368, 1435838066191458304, 'LogBusinessType', 'other', '其它', 0.00, '', 1399985191002447872, '2021-09-09 13:32:00', 1399985191002447872, '2021-09-09 13:32:00', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838414436130816, 1435838066191458304, 'LogBusinessType', 'insert', '新增', 0.00, '', 1399985191002447872, '2021-09-09 13:32:09', 1399985191002447872, '2021-09-09 13:32:09', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838467624099840, 1435838066191458304, 'LogBusinessType', 'update', '修改', 0.00, '', 1399985191002447872, '2021-09-09 13:32:22', 1399985191002447872, '2021-09-09 13:32:22', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838502755590144, 1435838066191458304, 'LogBusinessType', 'delete', '删除', 0.00, '', 1399985191002447872, '2021-09-09 13:32:30', 1399985191002447872, '2021-09-09 13:32:30', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838546934194176, 1435838066191458304, 'LogBusinessType', 'grant', '授权', 0.00, '', 1399985191002447872, '2021-09-09 13:32:41', 1399985191002447872, '2021-09-09 13:32:41', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838605537009664, 1435838066191458304, 'LogBusinessType', 'export', '导出', 0.00, '', 1399985191002447872, '2021-09-09 13:32:55', 1399985191002447872, '2021-09-09 13:32:55', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838705457913856, 1435838066191458304, 'LogBusinessType', 'import', '导入', 0.00, '', 1399985191002447872, '2021-09-09 13:33:19', 1399985191002447872, '2021-09-09 13:33:19', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838745861644288, 1435838066191458304, 'LogBusinessType', 'force', '强退', 0.00, '', 1399985191002447872, '2021-09-09 13:33:28', 1399985191002447872, '2021-09-09 13:33:28', 0, 0); -INSERT INTO `base_dict_item` VALUES (1435838786273763328, 1435838066191458304, 'LogBusinessType', 'clean', '清空数据', 0.00, '', 1399985191002447872, '2021-09-09 13:33:38', 1399985191002447872, '2021-09-09 13:33:38', 0, 0); -INSERT INTO `base_dict_item` VALUES (1438079113630003200, 1438078864509317120, 'MailSecurityCode', '1', '普通方式', 0.00, 'SECURITY_TYPE_PLAIN', 1399985191002447872, '2021-09-15 17:55:54', 1399985191002447872, '2021-09-15 17:55:54', 0, 0); -INSERT INTO `base_dict_item` VALUES (1438080323061755904, 1438078864509317120, 'MailSecurityCode', '2', 'TLS方式', 0.00, 'SECURITY_TYPE_TLS', 1399985191002447872, '2021-09-15 18:00:42', 1399985191002447872, '2021-09-15 18:00:42', 0, 0); -INSERT INTO `base_dict_item` VALUES (1438080372231581696, 1438078864509317120, 'MailSecurityCode', '3', 'SSL方式', 0.00, 'SECURITY_TYPE_SSL', 1399985191002447872, '2021-09-15 18:00:54', 1399985191002447872, '2021-09-15 18:00:54', 0, 0); -INSERT INTO `base_dict_item` VALUES (1439961603914047488, 1439961232651034624, 'MessageTemplateCode', '5', '微信', -10.00, 'WECHAT', 1399985191002447872, '2021-09-20 22:36:14', 1399985191002447872, '2021-09-20 22:36:14', 0, 1); -INSERT INTO `base_dict_item` VALUES (1439961704321490944, 1439961232651034624, 'MessageTemplateCode', '4', 'Email', 0.00, 'EMAIL', 1399985191002447872, '2021-09-20 22:36:38', 1399985191002447872, '2021-09-20 22:36:38', 0, 0); -INSERT INTO `base_dict_item` VALUES (1439962132744478720, 1439961232651034624, 'MessageTemplateCode', '3', '短信', 0.00, 'SMS', 1399985191002447872, '2021-09-20 22:38:20', 1399985191002447872, '2021-09-20 22:38:20', 0, 0); -INSERT INTO `base_dict_item` VALUES (1439962205578567680, 1439961232651034624, 'MessageTemplateCode', '2', '钉钉机器人', 0.00, 'DING_TALK_ROBOT', 1399985191002447872, '2021-09-20 22:38:38', 1399985191002447872, '2021-09-20 22:38:38', 0, 0); -INSERT INTO `base_dict_item` VALUES (1439962267511660544, 1439961232651034624, 'MessageTemplateCode', '1', '钉钉', 0.00, 'DING_TALK', 1399985191002447872, '2021-09-20 22:38:52', 1399985191002447872, '2021-09-20 22:38:52', 0, 0); -INSERT INTO `base_dict_item` VALUES (1452836696873984000, 1452836604783845376, 'SocialType', 'WeChat', '微信', 0.00, '', 1399985191002447872, '2021-10-26 11:17:16', 1399985191002447872, '2021-10-26 11:17:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1452837435482529792, 1452836604783845376, 'SocialType', 'QQ', 'QQ', 0.00, '', 1399985191002447872, '2021-10-26 11:20:12', 1399985191002447872, '2021-10-26 11:20:12', 0, 0); -INSERT INTO `base_dict_item` VALUES (1452837523030237184, 1452836604783845376, 'SocialType', 'DingTalk', '钉钉', 0.00, '', 1399985191002447872, '2021-10-26 11:20:33', 1399985191002447872, '2021-10-26 11:20:33', 0, 0); -INSERT INTO `base_dict_item` VALUES (1452844537911406592, 1452843488735621120, 'ParamType', '1', '系统参数', 0.00, '', 1399985191002447872, '2021-10-26 11:48:25', 1399985191002447872, '2021-10-26 11:48:25', 0, 0); -INSERT INTO `base_dict_item` VALUES (1452844565031776256, 1452843488735621120, 'ParamType', '2', '用户参数', 0.00, '', 1399985191002447872, '2021-10-26 11:48:32', 1399985191002447872, '2021-10-26 11:48:32', 0, 2); -INSERT INTO `base_dict_item` VALUES (1496026946344005632, 1496024933900169216, 'Political', '1', '中共党员', 1.00, '', 1399985191002447872, '2022-02-22 15:39:54', 1399985191002447872, '2022-02-22 15:39:54', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027004560945152, 1496024933900169216, 'Political', '2', '中共预备党员', 2.00, '', 1399985191002447872, '2022-02-22 15:40:07', 1399985191002447872, '2022-02-22 15:40:07', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027039264616448, 1496024933900169216, 'Political', '3', '共青团员', 3.00, '', 1399985191002447872, '2022-02-22 15:40:16', 1399985191002447872, '2022-02-22 15:40:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027077550223360, 1496024933900169216, 'Political', '4', '民革党员', 4.00, '', 1399985191002447872, '2022-02-22 15:40:25', 1399985191002447872, '2022-02-22 15:40:25', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027123461074944, 1496024933900169216, 'Political', '5', '民盟盟员', 5.00, '', 1399985191002447872, '2022-02-22 15:40:36', 1399985191002447872, '2022-02-22 15:40:36', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027197566038016, 1496024933900169216, 'Political', '6', '民建会员', 6.00, '', 1399985191002447872, '2022-02-22 15:40:53', 1399985191002447872, '2022-02-22 15:40:53', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027234803068928, 1496024933900169216, 'Political', '7', '民进会员', 7.00, '', 1399985191002447872, '2022-02-22 15:41:02', 1399985191002447872, '2022-02-22 15:41:02', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027272941875200, 1496024933900169216, 'Political', '8', '农工党党员', 8.00, '', 1399985191002447872, '2022-02-22 15:41:11', 1399985191002447872, '2022-02-22 15:41:11', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027306634719232, 1496024933900169216, 'Political', '9', '致公党党员', 9.00, '', 1399985191002447872, '2022-02-22 15:41:19', 1399985191002447872, '2022-02-22 15:41:19', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027369796743168, 1496024933900169216, 'Political', '10', '九三学社社员', 10.00, '', 1399985191002447872, '2022-02-22 15:41:34', 1399985191002447872, '2022-02-22 15:41:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027408141070336, 1496024933900169216, 'Political', '11', '台盟盟员', 11.00, '', 1399985191002447872, '2022-02-22 15:41:44', 1399985191002447872, '2022-02-22 15:41:44', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027456849522688, 1496024933900169216, 'Political', '12', '无党派人士', 12.00, '', 1399985191002447872, '2022-02-22 15:41:55', 1399985191002447872, '2022-02-22 15:41:55', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496027516639326208, 1496024933900169216, 'Political', '13', '群众', 13.00, '', 1399985191002447872, '2022-02-22 15:42:09', 1399985191002447872, '2022-02-22 15:42:10', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496780500696539136, 1496722894707728384, 'PayChannel', '1', '支付宝', 1.00, '', 1399985191002447872, '2022-02-24 17:34:15', 1399985191002447872, '2022-03-08 11:02:59', 0, 3); -INSERT INTO `base_dict_item` VALUES (1496780576818962432, 1496722894707728384, 'PayChannel', '2', '微信', 2.00, '', 1399985191002447872, '2022-02-24 17:34:33', 1399985191002447872, '2022-03-08 11:04:00', 0, 2); -INSERT INTO `base_dict_item` VALUES (1496780712492113920, 1496723207565058048, 'PayWay', '1', 'wap支付', 0.00, '', 1399985191002447872, '2022-02-24 17:35:05', 1399985191002447872, '2022-02-24 17:35:05', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496780757647990784, 1496723207565058048, 'PayWay', '2', '应用支付', 0.00, '', 1399985191002447872, '2022-02-24 17:35:16', 1399985191002447872, '2022-02-24 17:35:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496780799691694080, 1496723207565058048, 'PayWay', '3', 'web支付', 0.00, '', 1399985191002447872, '2022-02-24 17:35:26', 1399985191002447872, '2022-02-24 17:35:26', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496780838451257344, 1496723207565058048, 'PayWay', '4', '二维码扫码支付', 0.00, '', 1399985191002447872, '2022-02-24 17:35:35', 1399985191002447872, '2022-02-24 17:35:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1496780876388737024, 1496723207565058048, 'PayWay', '5', '付款码支付', 0.00, '', 1399985191002447872, '2022-02-24 17:35:44', 1399985191002447872, '2022-02-24 17:35:44', 0, 0); -INSERT INTO `base_dict_item` VALUES (1497141630803566592, 1497140849954185216, 'PayStatus', '3', '支付取消', 0.00, '', 1399985191002447872, '2022-02-25 17:29:15', 1399985191002447872, '2022-02-25 17:29:15', 0, 0); -INSERT INTO `base_dict_item` VALUES (1497141652379066368, 1497140849954185216, 'PayStatus', '2', '失败', 0.00, '', 1399985191002447872, '2022-02-25 17:29:20', 1399985191002447872, '2022-02-25 17:29:20', 0, 0); -INSERT INTO `base_dict_item` VALUES (1497141681915355136, 1497140849954185216, 'PayStatus', '1', '成功', 0.00, '', 1399985191002447872, '2022-02-25 17:29:27', 1399985191002447872, '2022-02-25 17:29:27', 0, 0); -INSERT INTO `base_dict_item` VALUES (1497141712743489536, 1497140849954185216, 'PayStatus', '0', '支付中', 0.00, '', 1399985191002447872, '2022-02-25 17:29:35', 1399985191002447872, '2022-02-25 17:29:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1497506810439892992, 1497140849954185216, 'PayStatus', '4', '部分退款', 1.00, '部分退款', 1399985191002447872, '2022-02-26 17:40:21', 1399985191002447872, '2022-03-04 21:22:46', 0, 7); -INSERT INTO `base_dict_item` VALUES (1499367587857694720, 1497140849954185216, 'PayStatus', '5', '已退款', 2.00, '完全退款', 1399985191002447872, '2022-03-03 20:54:25', 1399985191002447872, '2022-03-04 21:22:49', 0, 3); -INSERT INTO `base_dict_item` VALUES (1501030031432847360, 1496722894707728384, 'PayChannel', '3', '云闪付', 3.00, '', 1399985191002447872, '2022-03-08 11:00:22', 1399985191002447872, '2022-03-08 11:04:07', 0, 2); -INSERT INTO `base_dict_item` VALUES (1501030073489133568, 1496722894707728384, 'PayChannel', '4', '现金', 4.00, '', 1399985191002447872, '2022-03-08 11:00:32', 1399985191002447872, '2022-03-08 11:04:10', 0, 2); -INSERT INTO `base_dict_item` VALUES (1501030108314439680, 1496722894707728384, 'PayChannel', '5', '钱包', 5.00, '', 1399985191002447872, '2022-03-08 11:00:40', 1399985191002447872, '2022-03-08 11:04:14', 0, 2); -INSERT INTO `base_dict_item` VALUES (1501031490513768448, 1501031423232937984, 'AsyncPayChannel', '3', '云闪付', 0.00, '', 1399985191002447872, '2022-03-08 11:06:10', 1399985191002447872, '2022-03-08 11:06:10', 0, 0); -INSERT INTO `base_dict_item` VALUES (1501031518208757760, 1501031423232937984, 'AsyncPayChannel', '2', '微信', 0.00, '', 1399985191002447872, '2022-03-08 11:06:16', 1399985191002447872, '2022-03-08 11:06:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1501031544360243200, 1501031423232937984, 'AsyncPayChannel', '1', '支付宝', 0.00, '', 1399985191002447872, '2022-03-08 11:06:23', 1399985191002447872, '2022-03-08 11:06:23', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502276841057005568, 1502276739978473472, 'WalletStatus', '2', '禁用', 0.00, '', 1399985191002447872, '2022-03-11 21:34:45', 1399985191002447872, '2022-03-11 21:34:45', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502276862108217344, 1502276739978473472, 'WalletStatus', '1', '正常', 0.00, '', 1399985191002447872, '2022-03-11 21:34:50', 1399985191002447872, '2022-03-11 21:34:50', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502624716257456128, 1502624515799085056, 'WalletLogType', '1', '开通', 0.00, '', 1399985191002447872, '2022-03-12 20:37:04', 1399985191002447872, '2022-03-12 20:37:04', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502624931978899456, 1502624515799085056, 'WalletLogType', '2', '主动充值', 0.00, '', 1399985191002447872, '2022-03-12 20:37:56', 1399985191002447872, '2022-03-12 20:37:56', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502624956209393664, 1502624515799085056, 'WalletLogType', '3', '自动充值', 0.00, '', 1399985191002447872, '2022-03-12 20:38:02', 1399985191002447872, '2022-03-12 20:38:02', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625014719934464, 1502624515799085056, 'WalletLogType', '4', '余额变动', 0.00, '', 1399985191002447872, '2022-03-12 20:38:16', 1399985191002447872, '2022-03-12 20:38:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625053097816064, 1502624515799085056, 'WalletLogType', '5', '支付', 0.00, '', 1399985191002447872, '2022-03-12 20:38:25', 1399985191002447872, '2022-03-12 20:38:25', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625091639275520, 1502624515799085056, 'WalletLogType', '6', '系统扣除余额', 0.00, '', 1399985191002447872, '2022-03-12 20:38:34', 1399985191002447872, '2022-03-12 20:38:34', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625123725701120, 1502624515799085056, 'WalletLogType', '7', '退款', 0.00, '', 1399985191002447872, '2022-03-12 20:38:42', 1399985191002447872, '2022-03-12 20:38:42', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625783145787392, 1502624632392347648, 'WalletLogOperation', '1', '系统操作', 0.00, '', 1399985191002447872, '2022-03-12 20:41:19', 1399985191002447872, '2022-03-12 20:41:19', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625814837948416, 1502624632392347648, 'WalletLogOperation', '2', '管理员操作', 0.00, '', 1399985191002447872, '2022-03-12 20:41:26', 1399985191002447872, '2022-03-12 20:41:26', 0, 0); -INSERT INTO `base_dict_item` VALUES (1502625850355314688, 1502624632392347648, 'WalletLogOperation', '3', '用户操作', 0.00, '', 1399985191002447872, '2022-03-12 20:41:35', 1399985191002447872, '2022-03-12 20:41:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1503340241493135360, 1503340128037212160, 'VoucherStatus', '1', '启用', 0.00, '', 1399985191002447872, '2022-03-14 20:00:19', 1399985191002447872, '2022-03-14 20:00:19', 0, 0); -INSERT INTO `base_dict_item` VALUES (1503340326645895168, 1503340128037212160, 'VoucherStatus', '2', '停用', 0.00, '', 1399985191002447872, '2022-03-14 20:00:39', 1399985191002447872, '2022-03-14 20:00:39', 0, 0); -INSERT INTO `base_dict_item` VALUES (1505112357976612864, 1496722894707728384, 'PayChannel', '6', '储值卡', 0.00, '', 1399985191002447872, '2022-03-19 17:22:04', 1399985191002447872, '2022-03-19 17:22:04', 0, 0); -INSERT INTO `base_dict_item` VALUES (1524356452720758784, 1524356376518643712, 'GoodsParamType', 'input', '手工录入', 0.00, '', 1399985191002447872, '2022-05-11 19:51:14', 1399985191002447872, '2022-05-11 19:51:14', 0, 0); -INSERT INTO `base_dict_item` VALUES (1524356510157557760, 1524356376518643712, 'GoodsParamType', 'select', '列表选择', 0.00, '', 1399985191002447872, '2022-05-11 19:51:28', 1399985191002447872, '2022-05-11 19:51:28', 0, 0); -INSERT INTO `base_dict_item` VALUES (1546757293592522752, 1546757092010078208, 'PayNotifyProcess', '0', '失败', 0.00, '', 1399985191002447872, '2022-07-12 15:24:11', 1399985191002447872, '2022-07-12 15:24:11', 0, 0); -INSERT INTO `base_dict_item` VALUES (1546757327901929472, 1546757092010078208, 'PayNotifyProcess', '1', '成功', -1.00, '', 1399985191002447872, '2022-07-12 15:24:19', 1399985191002447872, '2022-07-12 15:31:38', 0, 2); -INSERT INTO `base_dict_item` VALUES (1546757375637303296, 1546757092010078208, 'PayNotifyProcess', '2', '忽略', 0.00, '', 1399985191002447872, '2022-07-12 15:24:30', 1399985191002447872, '2022-07-12 15:24:30', 0, 0); -INSERT INTO `base_dict_item` VALUES (1556996422006460416, 1556996322223968256, 'WeChatMediaType', 'news', '新闻', 0.00, '', 1399985191002447872, '2022-08-09 21:30:49', 1399985191002447872, '2022-08-09 21:30:49', 1, 0); -INSERT INTO `base_dict_item` VALUES (1556996472661069824, 1556996322223968256, 'WeChatMediaType', 'voice', '语音', 0.00, '', 1399985191002447872, '2022-08-09 21:31:01', 1399985191002447872, '2022-08-09 21:31:01', 0, 0); -INSERT INTO `base_dict_item` VALUES (1556996501417218048, 1556996322223968256, 'WeChatMediaType', 'image', '图片', 0.00, '', 1399985191002447872, '2022-08-09 21:31:08', 1399985191002447872, '2022-08-09 21:31:08', 0, 0); -INSERT INTO `base_dict_item` VALUES (1556996529565192192, 1556996322223968256, 'WeChatMediaType', 'video', '视频', 0.00, '', 1399985191002447872, '2022-08-09 21:31:15', 1399985191002447872, '2022-08-09 21:31:15', 0, 0); -INSERT INTO `base_dict_item` VALUES (1561003235710320640, 1561003189111603200, 'SiteMessageState', 'user', '指定用户', 0.00, '', 1399985191002447872, '2022-08-20 22:52:28', 1399985191002447872, '2022-08-20 22:52:28', 1, 0); -INSERT INTO `base_dict_item` VALUES (1561003279322693632, 1561003189111603200, 'SiteMessageState', 'all', '全部用户', 0.00, '', 1399985191002447872, '2022-08-20 22:52:38', 1399985191002447872, '2022-08-20 22:52:39', 1, 0); -INSERT INTO `base_dict_item` VALUES (1561003368762032128, 1561003021674987520, 'SiteMessageReceive', 'user', '指定用户', 0.00, '', 1399985191002447872, '2022-08-20 22:53:00', 1399985191002447872, '2022-08-20 22:53:00', 0, 0); -INSERT INTO `base_dict_item` VALUES (1561003399778910208, 1561003021674987520, 'SiteMessageReceive', 'all', '全部用户', 0.00, '', 1399985191002447872, '2022-08-20 22:53:07', 1399985191002447872, '2022-08-20 22:53:24', 0, 1); -INSERT INTO `base_dict_item` VALUES (1561003539772194816, 1561003189111603200, 'SiteMessageState', 'sent', '已发送', 0.00, '', 1399985191002447872, '2022-08-20 22:53:41', 1399985191002447872, '2022-08-20 22:53:41', 0, 0); -INSERT INTO `base_dict_item` VALUES (1561003575608328192, 1561003189111603200, 'SiteMessageState', 'cancel', '撤销', 0.00, '', 1399985191002447872, '2022-08-20 22:53:49', 1399985191002447872, '2022-08-20 22:53:49', 0, 0); -INSERT INTO `base_dict_item` VALUES (1561245469535080448, 1561003189111603200, 'SiteMessageState', 'draft', '草稿', 0.00, '', 1399985191002447872, '2022-08-21 14:55:01', 1399985191002447872, '2022-08-21 14:55:01', 0, 0); -INSERT INTO `base_dict_item` VALUES (1562696390043475968, 1562696107020230656, 'BpmModelPublish', 'published', '已发布', 0.00, '', 1399985191002447872, '2022-08-25 15:00:28', 1399985191002447872, '2022-08-25 15:00:28', 0, 0); -INSERT INTO `base_dict_item` VALUES (1562696420561231872, 1562696107020230656, 'BpmModelPublish', 'unpublished', '未发布', 0.00, '未上传xml文档', 1399985191002447872, '2022-08-25 15:00:35', 1399985191002447872, '2022-08-25 15:28:09', 0, 1); -INSERT INTO `base_dict_item` VALUES (1562703450588028928, 1562696107020230656, 'BpmModelPublish', 'unpublishedXml', '未发布(已上传BPMN)', 0.00, '有xml文档', 1399985191002447872, '2022-08-25 15:28:31', 1399985191002447872, '2022-08-25 15:34:45', 0, 1); -INSERT INTO `base_dict_item` VALUES (1563087300157747200, 1563083969989423104, 'BpmTaskAssignType', 'user', '用户', 0.00, '', 1399985191002447872, '2022-08-26 16:53:48', 1399985191002447872, '2022-09-06 22:50:15', 0, 1); -INSERT INTO `base_dict_item` VALUES (1567091825981980672, 1567091641298386944, 'BpmTaskState', 'running', '处理中', 0.00, '', 1399985191002447872, '2022-09-06 18:06:21', 1399985191002447872, '2022-09-06 18:06:21', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567091863017684992, 1567091641298386944, 'BpmTaskState', 'pass', '通过', 0.00, '', 1399985191002447872, '2022-09-06 18:06:30', 1399985191002447872, '2022-09-06 18:06:30', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567091902414782464, 1567091641298386944, 'BpmTaskState', 'reject', '驳回', 0.00, '', 1399985191002447872, '2022-09-06 18:06:39', 1399985191002447872, '2022-09-06 18:06:51', 0, 1); -INSERT INTO `base_dict_item` VALUES (1567091993569591296, 1567091641298386944, 'BpmTaskState', 'back', '退回', 0.00, '', 1399985191002447872, '2022-09-06 18:07:01', 1399985191002447872, '2022-09-06 18:07:01', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567092037261656064, 1567091641298386944, 'BpmTaskState', 'retrieve', '取回', 0.00, '', 1399985191002447872, '2022-09-06 18:07:12', 1399985191002447872, '2022-09-06 18:07:22', 0, 1); -INSERT INTO `base_dict_item` VALUES (1567092124226355200, 1567091641298386944, 'BpmTaskState', 'skip', '跳过', 0.00, '', 1399985191002447872, '2022-09-06 18:07:32', 1399985191002447872, '2022-09-06 18:07:32', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567163310103564288, 1563083969989423104, 'BpmTaskAssignType', 'userGroup', '用户组', 0.00, '', 1399985191002447872, '2022-09-06 22:50:24', 1399985191002447872, '2022-09-06 22:50:24', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567163343288897536, 1563083969989423104, 'BpmTaskAssignType', 'role', '角色', 0.00, '', 1399985191002447872, '2022-09-06 22:50:32', 1399985191002447872, '2022-09-06 22:50:32', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567163380693700608, 1563083969989423104, 'BpmTaskAssignType', 'deptMember', '部门成员', 0.00, '', 1399985191002447872, '2022-09-06 22:50:41', 1399985191002447872, '2022-09-06 22:50:41', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567163412960481280, 1563083969989423104, 'BpmTaskAssignType', 'deptLeader', '部门的负责人', 0.00, '', 1399985191002447872, '2022-09-06 22:50:49', 1399985191002447872, '2022-09-06 22:50:49', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567175558888923136, 1563083969989423104, 'BpmTaskAssignType', 'roleGroup', '角色组', 0.00, '', 1399985191002447872, '2022-09-06 23:39:05', 1399985191002447872, '2022-09-06 23:39:05', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567178994242002944, 1563083969989423104, 'BpmTaskAssignType', 'sponsor', '发起人', 0.00, '', 1399985191002447872, '2022-09-06 23:52:44', 1399985191002447872, '2022-09-06 23:52:44', 0, 0); -INSERT INTO `base_dict_item` VALUES (1567179143576002560, 1563083969989423104, 'BpmTaskAssignType', 'select', '用户手动选择', 0.00, '', 1399985191002447872, '2022-09-06 23:53:19', 1399985191002447872, '2022-09-07 00:01:22', 0, 1); -INSERT INTO `base_dict_item` VALUES (1570343731634249728, 1570343684024705024, 'BpmTaskResult', 'pass', '通过', 0.00, '', 1399985191002447872, '2022-09-15 17:28:16', 1399985191002447872, '2022-09-15 17:28:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570343761636106240, 1570343684024705024, 'BpmTaskResult', 'notPass', '不通过', 0.00, '', 1399985191002447872, '2022-09-15 17:28:23', 1399985191002447872, '2022-09-15 17:28:23', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570343788056027136, 1570343684024705024, 'BpmTaskResult', 'abstain', '弃权', 0.00, '', 1399985191002447872, '2022-09-15 17:28:29', 1399985191002447872, '2022-09-15 17:28:29', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570343826018672640, 1570343684024705024, 'BpmTaskResult', 'reject', '驳回', 0.00, '', 1399985191002447872, '2022-09-15 17:28:38', 1399985191002447872, '2022-09-15 17:28:38', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570343873737269248, 1570343684024705024, 'BpmTaskResult', 'back', '退回', 0.00, '', 1399985191002447872, '2022-09-15 17:28:50', 1399985191002447872, '2022-09-15 17:28:50', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570343913918701568, 1570343684024705024, 'BpmTaskResult', 'retrieve', '取回', 0.00, '', 1399985191002447872, '2022-09-15 17:28:59', 1399985191002447872, '2022-09-15 17:28:59', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570685888076120064, 1570343684024705024, 'BpmTaskResult', 'autoFinish', '自动完成', 0.00, '', 1399985191002447872, '2022-09-16 16:07:52', 1399985191002447872, '2022-09-16 16:08:02', 0, 1); -INSERT INTO `base_dict_item` VALUES (1570764765255397376, 1570764395519111168, 'BpmInstanceState', 'running', '运行中', 0.00, '', 1399985191002447872, '2022-09-16 21:21:18', 1399985191002447872, '2022-09-16 21:21:18', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570764802047832064, 1570764395519111168, 'BpmInstanceState', 'finish', '已完成', 0.00, '', 1399985191002447872, '2022-09-16 21:21:27', 1399985191002447872, '2022-09-16 21:21:27', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570764836319490048, 1570764395519111168, 'BpmInstanceState', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 21:21:35', 1399985191002447872, '2022-09-16 21:21:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570784215744585728, 1570343684024705024, 'BpmTaskResult', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 22:38:35', 1399985191002447872, '2022-09-16 22:38:35', 0, 0); -INSERT INTO `base_dict_item` VALUES (1570784331511570432, 1567091641298386944, 'BpmTaskState', 'cancel', '取消', 0.00, '', 1399985191002447872, '2022-09-16 22:39:03', 1399985191002447872, '2022-09-16 22:39:03', 0, 0); -INSERT INTO `base_dict_item` VALUES (1573665422392098816, 1439961232651034624, 'MessageTemplateCode', '0', '站内信', -11.00, 'SITE', 1399985191002447872, '2022-09-24 21:27:29', 1399985191002447872, '2022-09-24 21:27:39', 0, 1); -INSERT INTO `base_dict_item` VALUES (1589528254477488128, 1589527951317389312, 'DataScopePerm', '7', '所在及下级部门', 0.00, '', 1414143554414059520, '2022-11-07 16:00:43', 1414143554414059520, '2022-11-07 16:00:43', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528283539820544, 1589527951317389312, 'DataScopePerm', '6', '所在部门', 0.00, '', 1414143554414059520, '2022-11-07 16:00:49', 1414143554414059520, '2022-11-07 16:00:49', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528315672383488, 1589527951317389312, 'DataScopePerm', '5', '全部数据', 0.00, '', 1414143554414059520, '2022-11-07 16:00:57', 1414143554414059520, '2022-11-07 16:00:57', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528340267782144, 1589527951317389312, 'DataScopePerm', '4', '部门和用户范围', 0.00, '', 1414143554414059520, '2022-11-07 16:01:03', 1414143554414059520, '2022-11-07 16:01:03', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528367228768256, 1589527951317389312, 'DataScopePerm', '3', '部门范围', 0.00, '', 1414143554414059520, '2022-11-07 16:01:09', 1414143554414059520, '2022-11-07 16:01:09', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528393292173312, 1589527951317389312, 'DataScopePerm', '2', '用户范围', 0.00, '', 1414143554414059520, '2022-11-07 16:01:16', 1414143554414059520, '2022-11-07 16:01:16', 0, 0); -INSERT INTO `base_dict_item` VALUES (1589528423956729856, 1589527951317389312, 'DataScopePerm', '1', '自身数据', 0.00, '', 1414143554414059520, '2022-11-07 16:01:23', 1414143554414059520, '2022-11-07 16:01:23', 0, 0); +INSERT INTO `base_dict_item` VALUES (1422931375807242241, 1422929378374828033, 'Sex', '1', '男', b'1', 0.00, '男性', 0, '2021-08-04 22:44:11', 0, '2021-08-04 22:44:11', 0, 2); +INSERT INTO `base_dict_item` VALUES (1425729455402401794, 1422929378374828033, 'Sex', '2', '女', b'1', 0.00, '女性', 0, '2021-08-12 16:02:46', 0, '2021-08-12 16:02:46', 0, 1); +INSERT INTO `base_dict_item` VALUES (1425744258544136194, 1425744045414772737, 'MenuType', '0', '顶级菜单', b'1', 0.00, '顶级菜单', 0, '2021-08-12 17:01:35', 0, '2021-08-12 17:01:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1425744436592340993, 1425744045414772737, 'MenuType', '1', '子菜单', b'1', 0.00, '子菜单', 0, '2021-08-12 17:02:17', 0, '2021-08-12 17:02:17', 0, 0); +INSERT INTO `base_dict_item` VALUES (1425744470582980610, 1425744045414772737, 'MenuType', '2', '按钮权限', b'1', 0.00, '按钮权限', 0, '2021-08-12 17:02:26', 0, '2021-08-12 17:02:26', 0, 0); +INSERT INTO `base_dict_item` VALUES (1430094707250413568, 1422929378374828033, 'Sex', '0', '未知', b'1', 0.00, '不确定性别', 1399985191002447872, '2021-08-24 17:08:43', 1399985191002447872, '2021-08-24 17:08:43', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435830086406463488, 1435829999592759296, 'UserStatusCode', '1', '正常', b'1', 0.00, 'NORMAL', 1399985191002447872, '2021-09-09 12:59:04', 1399985191002447872, '2021-09-09 12:59:04', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435830141855162368, 1435829999592759296, 'UserStatusCode', '2', '锁定', b'1', 0.00, 'LOCK, 多次登录失败被锁定', 1399985191002447872, '2021-09-09 12:59:17', 1399985191002447872, '2021-09-09 12:59:17', 0, 1); +INSERT INTO `base_dict_item` VALUES (1435830260503633920, 1435829999592759296, 'UserStatusCode', '3', '封禁', b'1', 0.00, 'BAN', 1399985191002447872, '2021-09-09 12:59:45', 1399985191002447872, '2021-09-09 12:59:45', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838374749626368, 1435838066191458304, 'LogBusinessType', 'other', '其它', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:00', 1399985191002447872, '2021-09-09 13:32:00', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838414436130816, 1435838066191458304, 'LogBusinessType', 'insert', '新增', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:09', 1399985191002447872, '2021-09-09 13:32:09', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838467624099840, 1435838066191458304, 'LogBusinessType', 'update', '修改', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:22', 1399985191002447872, '2021-09-09 13:32:22', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838502755590144, 1435838066191458304, 'LogBusinessType', 'delete', '删除', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:30', 1399985191002447872, '2021-09-09 13:32:30', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838546934194176, 1435838066191458304, 'LogBusinessType', 'grant', '授权', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:41', 1399985191002447872, '2021-09-09 13:32:41', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838605537009664, 1435838066191458304, 'LogBusinessType', 'export', '导出', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:32:55', 1399985191002447872, '2021-09-09 13:32:55', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838705457913856, 1435838066191458304, 'LogBusinessType', 'import', '导入', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:33:19', 1399985191002447872, '2021-09-09 13:33:19', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838745861644288, 1435838066191458304, 'LogBusinessType', 'force', '强退', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:33:28', 1399985191002447872, '2021-09-09 13:33:28', 0, 0); +INSERT INTO `base_dict_item` VALUES (1435838786273763328, 1435838066191458304, 'LogBusinessType', 'clean', '清空数据', b'1', 0.00, '', 1399985191002447872, '2021-09-09 13:33:38', 1399985191002447872, '2021-09-09 13:33:38', 0, 0); +INSERT INTO `base_dict_item` VALUES (1438079113630003200, 1438078864509317120, 'MailSecurityCode', '1', '普通方式', b'1', 0.00, 'SECURITY_TYPE_PLAIN', 1399985191002447872, '2021-09-15 17:55:54', 1399985191002447872, '2021-09-15 17:55:54', 0, 0); +INSERT INTO `base_dict_item` VALUES (1438080323061755904, 1438078864509317120, 'MailSecurityCode', '2', 'TLS方式', b'1', 0.00, 'SECURITY_TYPE_TLS', 1399985191002447872, '2021-09-15 18:00:42', 1399985191002447872, '2021-09-15 18:00:42', 0, 0); +INSERT INTO `base_dict_item` VALUES (1438080372231581696, 1438078864509317120, 'MailSecurityCode', '3', 'SSL方式', b'1', 0.00, 'SECURITY_TYPE_SSL', 1399985191002447872, '2021-09-15 18:00:54', 1399985191002447872, '2021-09-15 18:00:54', 0, 0); +INSERT INTO `base_dict_item` VALUES (1439961603914047488, 1439961232651034624, 'MessageTemplateCode', '5', '微信', b'1', -10.00, 'WECHAT', 1399985191002447872, '2021-09-20 22:36:14', 1399985191002447872, '2021-09-20 22:36:14', 0, 1); +INSERT INTO `base_dict_item` VALUES (1439961704321490944, 1439961232651034624, 'MessageTemplateCode', '4', 'Email', b'1', 0.00, 'EMAIL', 1399985191002447872, '2021-09-20 22:36:38', 1399985191002447872, '2021-09-20 22:36:38', 0, 0); +INSERT INTO `base_dict_item` VALUES (1439962132744478720, 1439961232651034624, 'MessageTemplateCode', '3', '短信', b'1', 0.00, 'SMS', 1399985191002447872, '2021-09-20 22:38:20', 1399985191002447872, '2021-09-20 22:38:20', 0, 0); +INSERT INTO `base_dict_item` VALUES (1439962205578567680, 1439961232651034624, 'MessageTemplateCode', '2', '钉钉机器人', b'1', 0.00, 'DING_TALK_ROBOT', 1399985191002447872, '2021-09-20 22:38:38', 1399985191002447872, '2021-09-20 22:38:38', 0, 0); +INSERT INTO `base_dict_item` VALUES (1439962267511660544, 1439961232651034624, 'MessageTemplateCode', '1', '钉钉', b'1', 0.00, 'DING_TALK', 1399985191002447872, '2021-09-20 22:38:52', 1399985191002447872, '2021-09-20 22:38:52', 0, 0); +INSERT INTO `base_dict_item` VALUES (1452836696873984000, 1452836604783845376, 'SocialType', 'WeChat', '微信', b'1', 0.00, '', 1399985191002447872, '2021-10-26 11:17:16', 1399985191002447872, '2021-10-26 11:17:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1452837435482529792, 1452836604783845376, 'SocialType', 'QQ', 'QQ', b'1', 0.00, '', 1399985191002447872, '2021-10-26 11:20:12', 1399985191002447872, '2021-10-26 11:20:12', 0, 0); +INSERT INTO `base_dict_item` VALUES (1452837523030237184, 1452836604783845376, 'SocialType', 'DingTalk', '钉钉', b'1', 0.00, '', 1399985191002447872, '2021-10-26 11:20:33', 1399985191002447872, '2021-10-26 11:20:33', 0, 0); +INSERT INTO `base_dict_item` VALUES (1452844537911406592, 1452843488735621120, 'ParamType', '1', '系统参数', b'1', 0.00, '', 1399985191002447872, '2021-10-26 11:48:25', 1399985191002447872, '2021-10-26 11:48:25', 0, 0); +INSERT INTO `base_dict_item` VALUES (1452844565031776256, 1452843488735621120, 'ParamType', '2', '用户参数', b'1', 0.00, '', 1399985191002447872, '2021-10-26 11:48:32', 1399985191002447872, '2021-10-26 11:48:32', 0, 2); +INSERT INTO `base_dict_item` VALUES (1496026946344005632, 1496024933900169216, 'Political', '1', '中共党员', b'1', 1.00, '', 1399985191002447872, '2022-02-22 15:39:54', 1399985191002447872, '2022-02-22 15:39:54', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027004560945152, 1496024933900169216, 'Political', '2', '中共预备党员', b'1', 2.00, '', 1399985191002447872, '2022-02-22 15:40:07', 1399985191002447872, '2022-02-22 15:40:07', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027039264616448, 1496024933900169216, 'Political', '3', '共青团员', b'1', 3.00, '', 1399985191002447872, '2022-02-22 15:40:16', 1399985191002447872, '2022-02-22 15:40:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027077550223360, 1496024933900169216, 'Political', '4', '民革党员', b'1', 4.00, '', 1399985191002447872, '2022-02-22 15:40:25', 1399985191002447872, '2022-02-22 15:40:25', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027123461074944, 1496024933900169216, 'Political', '5', '民盟盟员', b'1', 5.00, '', 1399985191002447872, '2022-02-22 15:40:36', 1399985191002447872, '2022-02-22 15:40:36', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027197566038016, 1496024933900169216, 'Political', '6', '民建会员', b'1', 6.00, '', 1399985191002447872, '2022-02-22 15:40:53', 1399985191002447872, '2022-02-22 15:40:53', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027234803068928, 1496024933900169216, 'Political', '7', '民进会员', b'1', 7.00, '', 1399985191002447872, '2022-02-22 15:41:02', 1399985191002447872, '2022-02-22 15:41:02', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027272941875200, 1496024933900169216, 'Political', '8', '农工党党员', b'1', 8.00, '', 1399985191002447872, '2022-02-22 15:41:11', 1399985191002447872, '2022-02-22 15:41:11', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027306634719232, 1496024933900169216, 'Political', '9', '致公党党员', b'1', 9.00, '', 1399985191002447872, '2022-02-22 15:41:19', 1399985191002447872, '2022-02-22 15:41:19', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027369796743168, 1496024933900169216, 'Political', '10', '九三学社社员', b'1', 10.00, '', 1399985191002447872, '2022-02-22 15:41:34', 1399985191002447872, '2022-02-22 15:41:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027408141070336, 1496024933900169216, 'Political', '11', '台盟盟员', b'1', 11.00, '', 1399985191002447872, '2022-02-22 15:41:44', 1399985191002447872, '2022-02-22 15:41:44', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027456849522688, 1496024933900169216, 'Political', '12', '无党派人士', b'1', 12.00, '', 1399985191002447872, '2022-02-22 15:41:55', 1399985191002447872, '2022-02-22 15:41:55', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496027516639326208, 1496024933900169216, 'Political', '13', '群众', b'1', 13.00, '', 1399985191002447872, '2022-02-22 15:42:09', 1399985191002447872, '2022-02-22 15:42:10', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496780500696539136, 1496722894707728384, 'PayChannel', '1', '支付宝', b'1', 1.00, '', 1399985191002447872, '2022-02-24 17:34:15', 1399985191002447872, '2022-03-08 11:02:59', 0, 3); +INSERT INTO `base_dict_item` VALUES (1496780576818962432, 1496722894707728384, 'PayChannel', '2', '微信', b'1', 2.00, '', 1399985191002447872, '2022-02-24 17:34:33', 1399985191002447872, '2022-03-08 11:04:00', 0, 2); +INSERT INTO `base_dict_item` VALUES (1496780712492113920, 1496723207565058048, 'PayWay', '1', 'wap支付', b'1', 0.00, '', 1399985191002447872, '2022-02-24 17:35:05', 1399985191002447872, '2022-02-24 17:35:05', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496780757647990784, 1496723207565058048, 'PayWay', '2', '应用支付', b'1', 0.00, '', 1399985191002447872, '2022-02-24 17:35:16', 1399985191002447872, '2022-02-24 17:35:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496780799691694080, 1496723207565058048, 'PayWay', '3', 'web支付', b'1', 0.00, '', 1399985191002447872, '2022-02-24 17:35:26', 1399985191002447872, '2022-02-24 17:35:26', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496780838451257344, 1496723207565058048, 'PayWay', '4', '二维码扫码支付', b'1', 0.00, '', 1399985191002447872, '2022-02-24 17:35:35', 1399985191002447872, '2022-02-24 17:35:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1496780876388737024, 1496723207565058048, 'PayWay', '5', '付款码支付', b'1', 0.00, '', 1399985191002447872, '2022-02-24 17:35:44', 1399985191002447872, '2022-02-24 17:35:44', 0, 0); +INSERT INTO `base_dict_item` VALUES (1497141630803566592, 1497140849954185216, 'PayStatus', '3', '支付取消', b'1', 0.00, '', 1399985191002447872, '2022-02-25 17:29:15', 1399985191002447872, '2022-02-25 17:29:15', 0, 0); +INSERT INTO `base_dict_item` VALUES (1497141652379066368, 1497140849954185216, 'PayStatus', '2', '失败', b'1', 0.00, '', 1399985191002447872, '2022-02-25 17:29:20', 1399985191002447872, '2022-02-25 17:29:20', 0, 0); +INSERT INTO `base_dict_item` VALUES (1497141681915355136, 1497140849954185216, 'PayStatus', '1', '成功', b'1', 0.00, '', 1399985191002447872, '2022-02-25 17:29:27', 1399985191002447872, '2022-02-25 17:29:27', 0, 0); +INSERT INTO `base_dict_item` VALUES (1497141712743489536, 1497140849954185216, 'PayStatus', '0', '支付中', b'1', 0.00, '', 1399985191002447872, '2022-02-25 17:29:35', 1399985191002447872, '2022-02-25 17:29:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1497506810439892992, 1497140849954185216, 'PayStatus', '4', '部分退款', b'1', 1.00, '部分退款', 1399985191002447872, '2022-02-26 17:40:21', 1399985191002447872, '2022-03-04 21:22:46', 0, 7); +INSERT INTO `base_dict_item` VALUES (1499367587857694720, 1497140849954185216, 'PayStatus', '5', '已退款', b'1', 2.00, '完全退款', 1399985191002447872, '2022-03-03 20:54:25', 1399985191002447872, '2022-03-04 21:22:49', 0, 3); +INSERT INTO `base_dict_item` VALUES (1501030031432847360, 1496722894707728384, 'PayChannel', '3', '云闪付', b'1', 3.00, '', 1399985191002447872, '2022-03-08 11:00:22', 1399985191002447872, '2022-03-08 11:04:07', 0, 2); +INSERT INTO `base_dict_item` VALUES (1501030073489133568, 1496722894707728384, 'PayChannel', '4', '现金', b'1', 4.00, '', 1399985191002447872, '2022-03-08 11:00:32', 1399985191002447872, '2022-03-08 11:04:10', 0, 2); +INSERT INTO `base_dict_item` VALUES (1501030108314439680, 1496722894707728384, 'PayChannel', '5', '钱包', b'1', 5.00, '', 1399985191002447872, '2022-03-08 11:00:40', 1399985191002447872, '2022-03-08 11:04:14', 0, 2); +INSERT INTO `base_dict_item` VALUES (1501031490513768448, 1501031423232937984, 'AsyncPayChannel', '3', '云闪付', b'1', 0.00, '', 1399985191002447872, '2022-03-08 11:06:10', 1399985191002447872, '2022-03-08 11:06:10', 0, 0); +INSERT INTO `base_dict_item` VALUES (1501031518208757760, 1501031423232937984, 'AsyncPayChannel', '2', '微信', b'1', 0.00, '', 1399985191002447872, '2022-03-08 11:06:16', 1399985191002447872, '2022-03-08 11:06:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1501031544360243200, 1501031423232937984, 'AsyncPayChannel', '1', '支付宝', b'1', 0.00, '', 1399985191002447872, '2022-03-08 11:06:23', 1399985191002447872, '2022-03-08 11:06:23', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502276841057005568, 1502276739978473472, 'WalletStatus', '2', '禁用', b'1', 0.00, '', 1399985191002447872, '2022-03-11 21:34:45', 1399985191002447872, '2022-03-11 21:34:45', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502276862108217344, 1502276739978473472, 'WalletStatus', '1', '正常', b'1', 0.00, '', 1399985191002447872, '2022-03-11 21:34:50', 1399985191002447872, '2022-03-11 21:34:50', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502624716257456128, 1502624515799085056, 'WalletLogType', '1', '开通', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:37:04', 1399985191002447872, '2022-03-12 20:37:04', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502624931978899456, 1502624515799085056, 'WalletLogType', '2', '主动充值', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:37:56', 1399985191002447872, '2022-03-12 20:37:56', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502624956209393664, 1502624515799085056, 'WalletLogType', '3', '自动充值', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:38:02', 1399985191002447872, '2022-03-12 20:38:02', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625014719934464, 1502624515799085056, 'WalletLogType', '4', '余额变动', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:38:16', 1399985191002447872, '2022-03-12 20:38:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625053097816064, 1502624515799085056, 'WalletLogType', '5', '支付', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:38:25', 1399985191002447872, '2022-03-12 20:38:25', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625091639275520, 1502624515799085056, 'WalletLogType', '6', '系统扣除余额', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:38:34', 1399985191002447872, '2022-03-12 20:38:34', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625123725701120, 1502624515799085056, 'WalletLogType', '7', '退款', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:38:42', 1399985191002447872, '2022-03-12 20:38:42', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625783145787392, 1502624632392347648, 'WalletLogOperation', '1', '系统操作', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:41:19', 1399985191002447872, '2022-03-12 20:41:19', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625814837948416, 1502624632392347648, 'WalletLogOperation', '2', '管理员操作', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:41:26', 1399985191002447872, '2022-03-12 20:41:26', 0, 0); +INSERT INTO `base_dict_item` VALUES (1502625850355314688, 1502624632392347648, 'WalletLogOperation', '3', '用户操作', b'1', 0.00, '', 1399985191002447872, '2022-03-12 20:41:35', 1399985191002447872, '2022-03-12 20:41:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1503340241493135360, 1503340128037212160, 'VoucherStatus', '1', '启用', b'1', 0.00, '', 1399985191002447872, '2022-03-14 20:00:19', 1399985191002447872, '2022-03-14 20:00:19', 0, 0); +INSERT INTO `base_dict_item` VALUES (1503340326645895168, 1503340128037212160, 'VoucherStatus', '2', '停用', b'1', 0.00, '', 1399985191002447872, '2022-03-14 20:00:39', 1399985191002447872, '2022-03-14 20:00:39', 0, 0); +INSERT INTO `base_dict_item` VALUES (1505112357976612864, 1496722894707728384, 'PayChannel', '6', '储值卡', b'1', 0.00, '', 1399985191002447872, '2022-03-19 17:22:04', 1399985191002447872, '2022-03-19 17:22:04', 0, 0); +INSERT INTO `base_dict_item` VALUES (1524356452720758784, 1524356376518643712, 'GoodsParamType', 'input', '手工录入', b'1', 0.00, '', 1399985191002447872, '2022-05-11 19:51:14', 1399985191002447872, '2022-05-11 19:51:14', 0, 0); +INSERT INTO `base_dict_item` VALUES (1524356510157557760, 1524356376518643712, 'GoodsParamType', 'select', '列表选择', b'1', 0.00, '', 1399985191002447872, '2022-05-11 19:51:28', 1399985191002447872, '2022-05-11 19:51:28', 0, 0); +INSERT INTO `base_dict_item` VALUES (1546757293592522752, 1546757092010078208, 'PayNotifyProcess', '0', '失败', b'1', 0.00, '', 1399985191002447872, '2022-07-12 15:24:11', 1399985191002447872, '2022-07-12 15:24:11', 0, 0); +INSERT INTO `base_dict_item` VALUES (1546757327901929472, 1546757092010078208, 'PayNotifyProcess', '1', '成功', b'1', -1.00, '', 1399985191002447872, '2022-07-12 15:24:19', 1399985191002447872, '2022-07-12 15:31:38', 0, 2); +INSERT INTO `base_dict_item` VALUES (1546757375637303296, 1546757092010078208, 'PayNotifyProcess', '2', '忽略', b'1', 0.00, '', 1399985191002447872, '2022-07-12 15:24:30', 1399985191002447872, '2022-07-12 15:24:30', 0, 0); +INSERT INTO `base_dict_item` VALUES (1556996422006460416, 1556996322223968256, 'WeChatMediaType', 'news', '新闻', b'1', 0.00, '', 1399985191002447872, '2022-08-09 21:30:49', 1399985191002447872, '2022-08-09 21:30:49', 1, 0); +INSERT INTO `base_dict_item` VALUES (1556996472661069824, 1556996322223968256, 'WeChatMediaType', 'voice', '语音', b'1', 0.00, '', 1399985191002447872, '2022-08-09 21:31:01', 1399985191002447872, '2022-08-09 21:31:01', 0, 0); +INSERT INTO `base_dict_item` VALUES (1556996501417218048, 1556996322223968256, 'WeChatMediaType', 'image', '图片', b'1', 0.00, '', 1399985191002447872, '2022-08-09 21:31:08', 1399985191002447872, '2022-08-09 21:31:08', 0, 0); +INSERT INTO `base_dict_item` VALUES (1556996529565192192, 1556996322223968256, 'WeChatMediaType', 'video', '视频', b'1', 0.00, '', 1399985191002447872, '2022-08-09 21:31:15', 1399985191002447872, '2022-08-09 21:31:15', 0, 0); +INSERT INTO `base_dict_item` VALUES (1561003235710320640, 1561003189111603200, 'SiteMessageState', 'user', '指定用户', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:52:28', 1399985191002447872, '2022-08-20 22:52:28', 1, 0); +INSERT INTO `base_dict_item` VALUES (1561003279322693632, 1561003189111603200, 'SiteMessageState', 'all', '全部用户', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:52:38', 1399985191002447872, '2022-08-20 22:52:39', 1, 0); +INSERT INTO `base_dict_item` VALUES (1561003368762032128, 1561003021674987520, 'SiteMessageReceive', 'user', '指定用户', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:53:00', 1399985191002447872, '2022-08-20 22:53:00', 0, 0); +INSERT INTO `base_dict_item` VALUES (1561003399778910208, 1561003021674987520, 'SiteMessageReceive', 'all', '全部用户', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:53:07', 1399985191002447872, '2022-08-20 22:53:24', 0, 1); +INSERT INTO `base_dict_item` VALUES (1561003539772194816, 1561003189111603200, 'SiteMessageState', 'sent', '已发送', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:53:41', 1399985191002447872, '2022-08-20 22:53:41', 0, 0); +INSERT INTO `base_dict_item` VALUES (1561003575608328192, 1561003189111603200, 'SiteMessageState', 'cancel', '撤销', b'1', 0.00, '', 1399985191002447872, '2022-08-20 22:53:49', 1399985191002447872, '2022-08-20 22:53:49', 0, 0); +INSERT INTO `base_dict_item` VALUES (1561245469535080448, 1561003189111603200, 'SiteMessageState', 'draft', '草稿', b'1', 0.00, '', 1399985191002447872, '2022-08-21 14:55:01', 1399985191002447872, '2022-08-21 14:55:01', 0, 0); +INSERT INTO `base_dict_item` VALUES (1562696390043475968, 1562696107020230656, 'BpmModelPublish', 'published', '已发布', b'1', 0.00, '', 1399985191002447872, '2022-08-25 15:00:28', 1399985191002447872, '2022-08-25 15:00:28', 0, 0); +INSERT INTO `base_dict_item` VALUES (1562696420561231872, 1562696107020230656, 'BpmModelPublish', 'unpublished', '未发布', b'1', 0.00, '未上传xml文档', 1399985191002447872, '2022-08-25 15:00:35', 1399985191002447872, '2022-08-25 15:28:09', 0, 1); +INSERT INTO `base_dict_item` VALUES (1562703450588028928, 1562696107020230656, 'BpmModelPublish', 'unpublishedXml', '未发布(已上传BPMN)', b'1', 0.00, '有xml文档', 1399985191002447872, '2022-08-25 15:28:31', 1399985191002447872, '2022-08-25 15:34:45', 0, 1); +INSERT INTO `base_dict_item` VALUES (1563087300157747200, 1563083969989423104, 'BpmTaskAssignType', 'user', '用户', b'1', 0.00, '', 1399985191002447872, '2022-08-26 16:53:48', 1399985191002447872, '2022-09-06 22:50:15', 0, 1); +INSERT INTO `base_dict_item` VALUES (1567091825981980672, 1567091641298386944, 'BpmTaskState', 'running', '处理中', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:06:21', 1399985191002447872, '2022-09-06 18:06:21', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567091863017684992, 1567091641298386944, 'BpmTaskState', 'pass', '通过', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:06:30', 1399985191002447872, '2022-09-06 18:06:30', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567091902414782464, 1567091641298386944, 'BpmTaskState', 'reject', '驳回', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:06:39', 1399985191002447872, '2022-09-06 18:06:51', 0, 1); +INSERT INTO `base_dict_item` VALUES (1567091993569591296, 1567091641298386944, 'BpmTaskState', 'back', '退回', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:07:01', 1399985191002447872, '2022-09-06 18:07:01', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567092037261656064, 1567091641298386944, 'BpmTaskState', 'retrieve', '取回', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:07:12', 1399985191002447872, '2022-09-06 18:07:22', 0, 1); +INSERT INTO `base_dict_item` VALUES (1567092124226355200, 1567091641298386944, 'BpmTaskState', 'skip', '跳过', b'1', 0.00, '', 1399985191002447872, '2022-09-06 18:07:32', 1399985191002447872, '2022-09-06 18:07:32', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567163310103564288, 1563083969989423104, 'BpmTaskAssignType', 'userGroup', '用户组', b'1', 0.00, '', 1399985191002447872, '2022-09-06 22:50:24', 1399985191002447872, '2022-09-06 22:50:24', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567163343288897536, 1563083969989423104, 'BpmTaskAssignType', 'role', '角色', b'1', 0.00, '', 1399985191002447872, '2022-09-06 22:50:32', 1399985191002447872, '2022-09-06 22:50:32', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567163380693700608, 1563083969989423104, 'BpmTaskAssignType', 'deptMember', '部门成员', b'1', 0.00, '', 1399985191002447872, '2022-09-06 22:50:41', 1399985191002447872, '2022-09-06 22:50:41', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567163412960481280, 1563083969989423104, 'BpmTaskAssignType', 'deptLeader', '部门的负责人', b'1', 0.00, '', 1399985191002447872, '2022-09-06 22:50:49', 1399985191002447872, '2022-09-06 22:50:49', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567175558888923136, 1563083969989423104, 'BpmTaskAssignType', 'roleGroup', '角色组', b'1', 0.00, '', 1399985191002447872, '2022-09-06 23:39:05', 1399985191002447872, '2022-09-06 23:39:05', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567178994242002944, 1563083969989423104, 'BpmTaskAssignType', 'sponsor', '发起人', b'1', 0.00, '', 1399985191002447872, '2022-09-06 23:52:44', 1399985191002447872, '2022-09-06 23:52:44', 0, 0); +INSERT INTO `base_dict_item` VALUES (1567179143576002560, 1563083969989423104, 'BpmTaskAssignType', 'select', '用户手动选择', b'1', 0.00, '', 1399985191002447872, '2022-09-06 23:53:19', 1399985191002447872, '2022-09-07 00:01:22', 0, 1); +INSERT INTO `base_dict_item` VALUES (1570343731634249728, 1570343684024705024, 'BpmTaskResult', 'pass', '通过', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:16', 1399985191002447872, '2022-09-15 17:28:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570343761636106240, 1570343684024705024, 'BpmTaskResult', 'notPass', '不通过', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:23', 1399985191002447872, '2022-09-15 17:28:23', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570343788056027136, 1570343684024705024, 'BpmTaskResult', 'abstain', '弃权', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:29', 1399985191002447872, '2022-09-15 17:28:29', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570343826018672640, 1570343684024705024, 'BpmTaskResult', 'reject', '驳回', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:38', 1399985191002447872, '2022-09-15 17:28:38', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570343873737269248, 1570343684024705024, 'BpmTaskResult', 'back', '退回', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:50', 1399985191002447872, '2022-09-15 17:28:50', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570343913918701568, 1570343684024705024, 'BpmTaskResult', 'retrieve', '取回', b'1', 0.00, '', 1399985191002447872, '2022-09-15 17:28:59', 1399985191002447872, '2022-09-15 17:28:59', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570685888076120064, 1570343684024705024, 'BpmTaskResult', 'autoFinish', '自动完成', b'1', 0.00, '', 1399985191002447872, '2022-09-16 16:07:52', 1399985191002447872, '2022-09-16 16:08:02', 0, 1); +INSERT INTO `base_dict_item` VALUES (1570764765255397376, 1570764395519111168, 'BpmInstanceState', 'running', '运行中', b'1', 0.00, '', 1399985191002447872, '2022-09-16 21:21:18', 1399985191002447872, '2022-09-16 21:21:18', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570764802047832064, 1570764395519111168, 'BpmInstanceState', 'finish', '已完成', b'1', 0.00, '', 1399985191002447872, '2022-09-16 21:21:27', 1399985191002447872, '2022-09-16 21:21:27', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570764836319490048, 1570764395519111168, 'BpmInstanceState', 'cancel', '取消', b'1', 0.00, '', 1399985191002447872, '2022-09-16 21:21:35', 1399985191002447872, '2022-09-16 21:21:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570784215744585728, 1570343684024705024, 'BpmTaskResult', 'cancel', '取消', b'1', 0.00, '', 1399985191002447872, '2022-09-16 22:38:35', 1399985191002447872, '2022-09-16 22:38:35', 0, 0); +INSERT INTO `base_dict_item` VALUES (1570784331511570432, 1567091641298386944, 'BpmTaskState', 'cancel', '取消', b'1', 0.00, '', 1399985191002447872, '2022-09-16 22:39:03', 1399985191002447872, '2022-09-16 22:39:03', 0, 0); +INSERT INTO `base_dict_item` VALUES (1573665422392098816, 1439961232651034624, 'MessageTemplateCode', '0', '站内信', b'1', -11.00, 'SITE', 1399985191002447872, '2022-09-24 21:27:29', 1399985191002447872, '2022-09-24 21:27:39', 0, 1); +INSERT INTO `base_dict_item` VALUES (1589528254477488128, 1589527951317389312, 'DataScopePerm', '7', '所在及下级部门', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:00:43', 1414143554414059520, '2022-11-07 16:00:43', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528283539820544, 1589527951317389312, 'DataScopePerm', '6', '所在部门', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:00:49', 1414143554414059520, '2022-11-07 16:00:49', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528315672383488, 1589527951317389312, 'DataScopePerm', '5', '全部数据', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:00:57', 1414143554414059520, '2022-11-07 16:00:57', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528340267782144, 1589527951317389312, 'DataScopePerm', '4', '部门和用户范围', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:01:03', 1414143554414059520, '2022-11-07 16:01:03', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528367228768256, 1589527951317389312, 'DataScopePerm', '3', '部门范围', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:01:09', 1414143554414059520, '2022-11-07 16:01:09', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528393292173312, 1589527951317389312, 'DataScopePerm', '2', '用户范围', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:01:16', 1414143554414059520, '2022-11-07 16:01:16', 0, 0); +INSERT INTO `base_dict_item` VALUES (1589528423956729856, 1589527951317389312, 'DataScopePerm', '1', '自身数据', b'1', 0.00, '', 1414143554414059520, '2022-11-07 16:01:23', 1414143554414059520, '2022-11-07 16:01:23', 0, 0); -- ---------------------------- -- Table structure for base_dynamic_data_source @@ -310,6 +312,7 @@ CREATE TABLE `base_param` ( `param_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数键名', `value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数值', `type` int(4) NULL DEFAULT NULL COMMENT '参数类型', + `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '启用状态', `internal` bit(1) NOT NULL COMMENT '内置参数', `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建人', @@ -324,12 +327,12 @@ CREATE TABLE `base_param` ( -- ---------------------------- -- Records of base_param -- ---------------------------- -INSERT INTO `base_param` VALUES (1452842684284891136, '测试', 'test.v1', '123', 1, b'0', NULL, 1399985191002447872, '2021-10-26 11:41:03', 1399985191002447872, '2021-10-26 11:41:03', 0, 0); -INSERT INTO `base_param` VALUES (1500338438182789120, '结算台聚合支付请求地址', 'CashierAggregateUrl', 'http://127.0.0.1/api/', 1, b'1', '', 1399985191002447872, '2022-03-06 13:12:13', 1399985191002447872, '2022-05-01 15:03:03', 0, 3); -INSERT INTO `base_param` VALUES (1520668030248361984, '文件服务器地址', 'FileServerUrl', 'http://127.0.0.1:9999', 1, b'1', '', 1399985191002447872, '2022-05-01 15:34:46', 1399985191002447872, '2022-05-19 12:53:21', 0, 5); -INSERT INTO `base_param` VALUES (1529281530059161600, 'websocket服务器地址', 'WebsocketServerUrl', 'ws://127.0.0.1:9999', 1, b'1', '', 1399985191002447872, '2022-05-25 10:01:44', 1399985191002447872, '2022-05-25 10:01:44', 0, 0); -INSERT INTO `base_param` VALUES (1545765299880448000, '服务器地址', 'ServerUrl', 'http://127.0.0.1:9999', 1, b'1', '', 1399985191002447872, '2022-07-09 21:42:21', 1399985191002447872, '2022-07-09 21:42:21', 0, 0); -INSERT INTO `base_param` VALUES (1547511252795912192, '微信jsapi支付回调服务地址', 'JsapiRedirectUrl', 'http://127.0.0.1/api/', 1, b'1', '', 1414143554414059520, '2022-07-14 17:20:09', 1414143554414059520, '2022-07-14 17:20:09', 0, 0); +INSERT INTO `base_param` VALUES (1452842684284891136, '测试', 'test.v1', '123', 1, b'1', b'0', NULL, 1399985191002447872, '2021-10-26 11:41:03', 1399985191002447872, '2021-10-26 11:41:03', 0, 0); +INSERT INTO `base_param` VALUES (1500338438182789120, '结算台聚合支付请求地址', 'CashierAggregateUrl', 'http://127.0.0.1/api/', 1, b'1', b'1', '', 1399985191002447872, '2022-03-06 13:12:13', 1399985191002447872, '2022-05-01 15:03:03', 0, 3); +INSERT INTO `base_param` VALUES (1520668030248361984, '文件服务器地址', 'FileServerUrl', 'http://127.0.0.1:9999', 1, b'1', b'1', '', 1399985191002447872, '2022-05-01 15:34:46', 1399985191002447872, '2022-05-19 12:53:21', 0, 5); +INSERT INTO `base_param` VALUES (1529281530059161600, 'websocket服务器地址', 'WebsocketServerUrl', 'ws://127.0.0.1:9999', 1, b'1', b'1', '', 1399985191002447872, '2022-05-25 10:01:44', 1399985191002447872, '2022-05-25 10:01:44', 0, 0); +INSERT INTO `base_param` VALUES (1545765299880448000, '服务器地址', 'ServerUrl', 'http://127.0.0.1:9999', 1, b'1', b'1', '', 1399985191002447872, '2022-07-09 21:42:21', 1399985191002447872, '2022-07-09 21:42:21', 0, 0); +INSERT INTO `base_param` VALUES (1547511252795912192, '微信jsapi支付回调服务地址', 'JsapiRedirectUrl', 'http://127.0.0.1/api/', 1, b'1', b'1', '', 1414143554414059520, '2022-07-14 17:20:09', 1414143554414059520, '2022-07-14 17:20:09', 0, 0); -- ---------------------------- -- Table structure for bpm_instance diff --git a/pom.xml b/pom.xml index 0384c93b..ec7ab13c 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ cn.bootx.platform bootx-platform pom - 1.1.8 + 1.1.9 bootx-common-core @@ -33,7 +33,7 @@ 1.8 - 1.1.8 + 1.1.9 5.8.10 6.4.0 -- Gitee