diff --git a/pom.xml b/pom.xml
index 4786dcb2..a0233c13 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
https://github.com/YunaiV/ruoyi-vue-pro
- 3.0.33
+ 3.0.34
17
${java.version}
diff --git a/sql/dm/部门添加编码、简称字段.sql b/sql/dm/部门添加编码、简称字段.sql
new file mode 100644
index 00000000..d2c065df
--- /dev/null
+++ b/sql/dm/部门添加编码、简称字段.sql
@@ -0,0 +1,14 @@
+-- 达梦8数据库DDL脚本
+-- 为 system_dept 表添加 code 和 short_name 字段
+
+-- 添加部门编码字段
+ALTER TABLE system_dept ADD COLUMN code VARCHAR(50);
+
+-- 添加部门简称字段
+ALTER TABLE system_dept ADD COLUMN short_name VARCHAR(20);
+
+-- 添加字段注释
+COMMENT ON COLUMN system_dept.code IS '部门编码';
+COMMENT ON COLUMN system_dept.short_name IS '部门简称';
+
+
diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml
index c9f860f3..da063337 100644
--- a/yudao-dependencies/pom.xml
+++ b/yudao-dependencies/pom.xml
@@ -26,7 +26,7 @@
https://github.com/YunaiV/ruoyi-vue-pro
- 3.0.33
+ 3.0.34
1.6.0
3.4.5
diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/dto/DeptRespDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/dto/DeptRespDTO.java
index 83c6db80..dc9487e5 100644
--- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/dto/DeptRespDTO.java
+++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/dept/dto/DeptRespDTO.java
@@ -13,6 +13,9 @@ public class DeptRespDTO {
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")
private String name;
+ @Schema(description = "部门编码", example = "XXXXXXX")
+ private String code;
+
@Schema(description = "父部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long parentId;
diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java
index 6e65ad3f..c5e1b031 100644
--- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java
+++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/DeptController.java
@@ -105,18 +105,18 @@ public class DeptController {
@GetMapping("/top-level-list")
@Operation(summary = "获取顶级部门列表", description = "用于懒加载,只返回没有父部门的顶级部门")
@PreAuthorize("@ss.hasPermission('system:dept:query')")
- public CommonResult> getTopLevelDeptList() {
+ public CommonResult> getTopLevelDeptList() {
List list = deptService.getTopLevelDeptList();
- return success(BeanUtils.toBean(list, DeptSimpleRespVO.class));
+ return success(BeanUtils.toBean(list, DeptRespVO.class));
}
@GetMapping("/children")
@Operation(summary = "根据父部门ID获取子部门列表", description = "用于懒加载,根据父部门ID返回直接子部门")
@Parameter(name = "parentId", description = "父部门ID", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:dept:query')")
- public CommonResult> getChildrenDeptList(@RequestParam("parentId") Long parentId) {
+ public CommonResult> getChildrenDeptList(@RequestParam("parentId") Long parentId) {
List list = deptService.getDirectChildDeptList(parentId);
- return success(BeanUtils.toBean(list, DeptSimpleRespVO.class));
+ return success(BeanUtils.toBean(list, DeptRespVO.class));
}
@GetMapping("/get")
diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSaveReqVO.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSaveReqVO.java
index 3f9f0f46..7d74aab6 100644
--- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSaveReqVO.java
+++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dept/vo/dept/DeptSaveReqVO.java
@@ -20,7 +20,6 @@ public class DeptSaveReqVO {
private Long id;
@Schema(description = "部门编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "DEPT_001")
- @NotBlank(message = "部门编码不能为空")
@Size(max = 50, message = "部门编码长度不能超过 50 个字符")
private String code;
diff --git a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sync/SyncLogController.java b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sync/SyncLogController.java
index 2bf7c52e..8bd9027c 100644
--- a/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sync/SyncLogController.java
+++ b/yudao-module-system/yudao-module-system-server/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sync/SyncLogController.java
@@ -16,6 +16,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
+import java.util.Map;
+
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
/**
@@ -58,4 +60,36 @@ public class SyncLogController {
return success(success);
}
+ @PostMapping("/batch-rerun")
+ @Operation(summary = "根据服务类型批量重跑异常的同步接口")
+ @PreAuthorize("@ss.hasPermission('system:sync-log:batch-rerun')")
+ public CommonResult batchRerunByServiceName(
+ @RequestParam("serviceName") String serviceName,
+ @RequestParam(value = "batchSize", defaultValue = "200") Integer batchSize) {
+ // 参数校验
+ if (batchSize > 500) {
+ throw new IllegalArgumentException("批次大小不能超过500");
+ }
+
+ Integer count = syncLogService.markForBatchRerun(serviceName, batchSize);
+ return success(count);
+ }
+
+ @GetMapping("/batch-rerun/progress")
+ @Operation(summary = "查询批量重跑进度")
+ @PreAuthorize("@ss.hasPermission('system:sync-log:query')")
+ public CommonResult