Skip to content

Commit b287fdb

Browse files
YunaiVgitee-org
authored andcommitted
!544 同步最新商城代码
Merge pull request !544 from 芋道源码/feature/mall_product
2 parents 91769f0 + 6c174d9 commit b287fdb

File tree

198 files changed

+3229
-956
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+3229
-956
lines changed

yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/WebFilterOrderEnum.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ public interface WebFilterOrderEnum {
2727

2828
int TENANT_SECURITY_FILTER = -99; // 需要保证在 Spring Security 过滤器后面
2929

30-
int ACTIVITI_FILTER = -98; // 需要保证在 Spring Security 过滤后面
31-
3230
int FLOWABLE_FILTER = -98; // 需要保证在 Spring Security 过滤后面
3331

3432
int DEMO_FILTER = Integer.MAX_VALUE;

yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/enums/GlobalErrorCodeConstants.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,4 @@ public interface GlobalErrorCodeConstants {
3737

3838
ErrorCode UNKNOWN = new ErrorCode(999, "未知错误");
3939

40-
/**
41-
* 是否为服务端错误,参考 HTTP 5XX 错误码段
42-
*
43-
* @param code 错误码
44-
* @return 是否
45-
*/
46-
static boolean isServerErrorCode(Integer code) {
47-
return code != null
48-
&& code >= INTERNAL_SERVER_ERROR.getCode() && code <= INTERNAL_SERVER_ERROR.getCode() + 99;
49-
}
50-
5140
}

yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/CommonResult.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cn.iocoder.yudao.framework.common.pojo;
22

33
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
4-
import cn.iocoder.yudao.framework.common.exception.ServerException;
54
import cn.iocoder.yudao.framework.common.exception.ServiceException;
65
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
76
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -92,10 +91,6 @@ public void checkError() throws ServiceException {
9291
if (isSuccess()) {
9392
return;
9493
}
95-
// 服务端异常
96-
if (GlobalErrorCodeConstants.isServerErrorCode(code)) {
97-
throw new ServerException(code, msg);
98-
}
9994
// 业务异常
10095
throw new ServiceException(code, msg);
10196
}

yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/LocalDateTimeUtils.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import java.time.Duration;
66
import java.time.LocalDateTime;
7+
import java.time.LocalTime;
78

89
/**
910
* 时间工具类,用于 {@link java.time.LocalDateTime}
@@ -50,7 +51,7 @@ public static LocalDateTime[] buildBetweenTime(int year1, int mouth1, int day1,
5051
* 判断当前时间是否在该时间范围内
5152
*
5253
* @param startTime 开始时间
53-
* @param endTime 结束时间
54+
* @param endTime 结束时间
5455
* @return 是否
5556
*/
5657
public static boolean isBetween(LocalDateTime startTime, LocalDateTime endTime) {
@@ -60,4 +61,24 @@ public static boolean isBetween(LocalDateTime startTime, LocalDateTime endTime)
6061
return LocalDateTimeUtil.isIn(LocalDateTime.now(), startTime, endTime);
6162
}
6263

64+
/**
65+
* 检查时间重叠 不包含日期
66+
*
67+
* @param startTime1 需要校验的开始时间
68+
* @param endTime1 需要校验的结束时间
69+
* @param startTime2 校验所需的开始时间
70+
* @param endTime2 校验所需的结束时间
71+
* @return 是否重叠
72+
*/
73+
// TODO @puhui999:LocalDateTimeUtil.isOverlap() 是不是可以满足呀?
74+
public static boolean checkTimeOverlap(LocalTime startTime1, LocalTime endTime1, LocalTime startTime2, LocalTime endTime2) {
75+
// 判断时间是否重叠
76+
// 开始时间在已配置时段的结束时间之前 且 结束时间在已配置时段的开始时间之后 []
77+
return startTime1.isBefore(endTime2) && endTime1.isAfter(startTime2)
78+
// 开始时间在已配置时段的开始时间之前 且 结束时间在已配置时段的开始时间之后 (] 或 ()
79+
|| startTime1.isBefore(startTime2) && endTime1.isAfter(startTime2)
80+
// 开始时间在已配置时段的结束时间之前 且 结束时间在已配值时段的结束时间之后 [) 或 ()
81+
|| startTime1.isBefore(endTime2) && endTime1.isAfter(endTime2);
82+
}
83+
6384
}

yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/jackson/config/YudaoJacksonAutoConfiguration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public class YudaoJacksonAutoConfiguration {
2121
@Bean
2222
public BeanPostProcessor objectMapperBeanPostProcessor() {
2323
return new BeanPostProcessor() {
24+
2425
@Override
2526
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
2627
if (!(bean instanceof ObjectMapper)) {

yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@
1717
import org.flowable.task.api.history.HistoricTaskInstance;
1818
import org.mapstruct.*;
1919
import org.mapstruct.factory.Mappers;
20-
import org.springframework.beans.BeanUtils;
2120

22-
import java.util.Collections;
2321
import java.util.List;
2422
import java.util.Map;
25-
import java.util.stream.Collectors;
2623

2724
/**
2825
* Bpm 任务 Convert
@@ -34,37 +31,9 @@ public interface BpmTaskConvert {
3431

3532
BpmTaskConvert INSTANCE = Mappers.getMapper(BpmTaskConvert.class);
3633

37-
/**
38-
* 复制对象
39-
*
40-
* @param source 源 要复制的对象
41-
* @param target 目标 复制到此对象
42-
* @param <T>
43-
*
44-
* @return
45-
*/
46-
public static <T> T copy(Object source, Class<T> target) {
47-
if (source == null || target == null) {
48-
return null;
49-
}
50-
try {
51-
T newInstance = target.getDeclaredConstructor().newInstance();
52-
BeanUtils.copyProperties(source, newInstance);
53-
return newInstance;
54-
} catch (Exception e) {
55-
throw new RuntimeException(e);
56-
}
57-
}
58-
59-
default <T, K> List<K> copyList(List<T> source, Class<K> target) {
60-
if (null == source || source.isEmpty()) {
61-
return Collections.emptyList();
62-
}
63-
return source.stream().map(e -> copy(e, target)).collect(Collectors.toList());
64-
}
65-
6634
default List<BpmTaskTodoPageItemRespVO> convertList1(List<Task> tasks,
67-
Map<String, ProcessInstance> processInstanceMap, Map<Long, AdminUserRespDTO> userMap) {
35+
Map<String, ProcessInstance> processInstanceMap,
36+
Map<Long, AdminUserRespDTO> userMap) {
6837
return CollectionUtils.convertList(tasks, task -> {
6938
BpmTaskTodoPageItemRespVO respVO = convert1(task);
7039
ProcessInstance processInstance = processInstanceMap.get(task.getProcessInstanceId());

yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmActivityDO.java

Lines changed: 0 additions & 105 deletions
This file was deleted.

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import io.swagger.v3.oas.annotations.media.Schema;
44
import lombok.Data;
55

6-
@Schema(description = "管理后台 - 代码生成预览 Response VO,注意,每个文件都是一个该对象")
6+
@Schema(description = "管理后台 - 代码生成预览 Response VO注意,每个文件都是一个该对象")
77
@Data
88
public class CodegenPreviewRespVO {
99

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnBaseVO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public class CodegenColumnBaseVO {
7070
@NotNull(message = "是否为 List 查询操作的字段不能为空")
7171
private Boolean listOperation;
7272

73-
@Schema(description = "List 查询操作的条件类型,参见 CodegenColumnListConditionEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "LIKE")
73+
@Schema(description = "List 查询操作的条件类型参见 CodegenColumnListConditionEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "LIKE")
7474
@NotNull(message = "List 查询操作的条件类型不能为空")
7575
private String listOperationCondition;
7676

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
@Data
1313
public class CodegenTableBaseVO {
1414

15-
@Schema(description = "生成场景,参见 CodegenSceneEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
15+
@Schema(description = "生成场景参见 CodegenSceneEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
1616
@NotNull(message = "导入类型不能为空")
1717
private Integer scene;
1818

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTablePageReqVO.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
@ToString(callSuper = true)
1818
public class CodegenTablePageReqVO extends PageParam {
1919

20-
@Schema(description = "表名称,模糊匹配", example = "yudao")
20+
@Schema(description = "表名称模糊匹配", example = "yudao")
2121
private String tableName;
2222

23-
@Schema(description = "表描述,模糊匹配", example = "芋道")
23+
@Schema(description = "表描述模糊匹配", example = "芋道")
2424
private String tableComment;
2525

26-
@Schema(description = "实体,模糊匹配", example = "Yudao")
26+
@Schema(description = "实体模糊匹配", example = "Yudao")
2727
private String className;
2828

2929
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigExportReqVO.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ public class ConfigExportReqVO {
1515
@Schema(description = "参数名称", example = "模糊匹配")
1616
private String name;
1717

18-
@Schema(description = "参数键名,模糊匹配", example = "yunai.db.username")
18+
@Schema(description = "参数键名模糊匹配", example = "yunai.db.username")
1919
private String key;
2020

21-
@Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", example = "1")
21+
@Schema(description = "参数类型参见 SysConfigTypeEnum 枚举", example = "1")
2222
private Integer type;
2323

2424
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigPageReqVO.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
@ToString(callSuper = true)
1818
public class ConfigPageReqVO extends PageParam {
1919

20-
@Schema(description = "数据源名称,模糊匹配", example = "名称")
20+
@Schema(description = "数据源名称模糊匹配", example = "名称")
2121
private String name;
2222

23-
@Schema(description = "参数键名,模糊匹配", example = "yunai.db.username")
23+
@Schema(description = "参数键名模糊匹配", example = "yunai.db.username")
2424
private String key;
2525

26-
@Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", example = "1")
26+
@Schema(description = "参数类型参见 SysConfigTypeEnum 枚举", example = "1")
2727
private Integer type;
2828

2929
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/config/vo/ConfigRespVO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ConfigRespVO extends ConfigBaseVO {
2121
@Size(max = 100, message = "参数键名长度不能超过100个字符")
2222
private String key;
2323

24-
@Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
24+
@Schema(description = "参数类型参见 SysConfigTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
2525
private Integer type;
2626

2727
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "时间戳格式")

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@ToString(callSuper = true)
1515
public class FileConfigCreateReqVO extends FileConfigBaseVO {
1616

17-
@Schema(description = "存储器,参见 FileStorageEnum 枚举类参见 FileStorageEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
17+
@Schema(description = "存储器,参见 FileStorageEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
1818
@NotNull(message = "存储器不能为空")
1919
private Integer storage;
2020

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigPageReqVO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public class FileConfigPageReqVO extends PageParam {
2323
@Schema(description = "存储器", example = "1")
2424
private Integer storage;
2525

26+
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
2627
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
27-
@Schema(description = "创建时间")
2828
private LocalDateTime[] createTime;
2929

3030
}

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigRespVO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class FileConfigRespVO extends FileConfigBaseVO {
1818
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
1919
private Long id;
2020

21-
@Schema(description = "存储器,参见 FileStorageEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
21+
@Schema(description = "存储器参见 FileStorageEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
2222
@NotNull(message = "存储器不能为空")
2323
private Integer storage;
2424

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
@ToString(callSuper = true)
1818
public class FilePageReqVO extends PageParam {
1919

20-
@Schema(description = "文件路径,模糊匹配", example = "yudao")
20+
@Schema(description = "文件路径模糊匹配", example = "yudao")
2121
private String path;
2222

23-
@Schema(description = "文件类型,模糊匹配", example = "application/octet-stream")
23+
@Schema(description = "文件类型模糊匹配", example = "jpg")
2424
private String type;
2525

26+
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
2627
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
27-
@Schema(description = "创建时间")
2828
private LocalDateTime[] createTime;
2929

3030
}

yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/vo/job/JobPageReqVO.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
@ToString(callSuper = true)
1313
public class JobPageReqVO extends PageParam {
1414

15-
@Schema(description = "任务名称,模糊匹配", example = "测试任务")
15+
@Schema(description = "任务名称模糊匹配", example = "测试任务")
1616
private String name;
1717

18-
@Schema(description = "任务状态,参见 JobStatusEnum 枚举", example = "1")
18+
@Schema(description = "任务状态参见 JobStatusEnum 枚举", example = "1")
1919
private Integer status;
2020

21-
@Schema(description = "处理器的名字,模糊匹配", example = "sysUserSessionTimeoutJob")
21+
@Schema(description = "处理器的名字模糊匹配", example = "sysUserSessionTimeoutJob")
2222
private String handlerName;
2323

2424
}

0 commit comments

Comments
 (0)