refactor: 简化类型检查和基础代码

This commit is contained in:
疯狂的狮子Li
2026-06-11 13:59:21 +08:00
parent 67fa22237a
commit 2d13780a07
11 changed files with 44 additions and 27 deletions
@@ -340,7 +340,7 @@ public class GenTableColumn extends BaseEntity {
*/
public String readConverterExp() {
String remarks = StringUtils.substringBetween(this.columnComment, "(", ")");
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
if (StringUtils.isNotEmpty(remarks)) {
for (String value : remarks.split(" ")) {
if (StringUtils.isNotEmpty(value)) {
@@ -50,7 +50,7 @@ public class SysDeptController extends BaseController {
*/
@SaCheckPermission("system:dept:list")
@GetMapping("/list/exclude/{deptId}")
public R<List<SysDeptVo>> excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
public R<List<SysDeptVo>> excludeChild(@PathVariable(value = "deptId") Long deptId) {
List<SysDeptVo> depts = deptService.selectDeptList(new SysDeptBo());
depts.removeIf(d -> d.getDeptId().equals(deptId)
|| StringUtils.splitList(d.getAncestors()).contains(Convert.toStr(deptId)));