1. 新增业务流程任务表单可配置自定义路由表单选项

fix:
1. 修复 mysql 脚本部分字段未同步脚本的错误
2. 角色为空无法登录系统
3. 主子表缩写命名下代码生成器错误

(cherry picked from commit 3812611b04)
This commit is contained in:
chenbowen
2025-08-06 17:45:38 +08:00
committed by chenbowen
parent 2fee797fe8
commit d21418fb1e
44 changed files with 1037 additions and 632 deletions

View File

@@ -1,59 +0,0 @@
package cn.iocoder.yudao.module.infra.api.stdnms;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.infra.api.stdnms.dto.StdNmsRespDTO;
import cn.iocoder.yudao.module.infra.dal.dataobject.stdnms.stdnms.StdNmsDO;
import cn.iocoder.yudao.module.infra.stdnms.StdNmsService;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
import java.util.Collection;
import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
/**
* 数据命名与简写标准 API 实现
*
* @author 后台管理
*/
@RestController // 提供 RESTful API 接口,给 Feign 调用
@Validated
public class StdNmsApiImpl implements StdNmsApi {
@Resource
private StdNmsService stdNmsService;
@Override
public CommonResult<Boolean> deleteStdNms(Long id) {
stdNmsService.deleteStdNms(id);
return success(true);
}
@Override
public CommonResult<Boolean> deleteStdNmsList(List<Long> ids) {
stdNmsService.deleteStdNmsListByIds(ids);
return success(true);
}
@Override
public CommonResult<StdNmsRespDTO> getStdNms(Long id) {
StdNmsDO stdNms = stdNmsService.getStdNms(id);
return success(BeanUtils.toBean(stdNms, StdNmsRespDTO.class));
}
@Override
public CommonResult<StdNmsRespDTO> getStdNmsByAbbr(String abbr) {
StdNmsDO stdNms = stdNmsService.getStdNmsByAbbr(abbr);
return success(BeanUtils.toBean(stdNms, StdNmsRespDTO.class));
}
@Override
public CommonResult<List<StdNmsRespDTO>> getStdNmsListByAbbrs(Collection<String> abbrs) {
List<StdNmsDO> stdNmsList = stdNmsService.getStdNmsListByAbbrs(abbrs);
return success(BeanUtils.toBean(stdNmsList, StdNmsRespDTO.class));
}
}

View File

@@ -1,9 +1,9 @@
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import jakarta.validation.constraints.NotNull;
import java.util.List;
@Schema(description = "管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO")
@@ -18,4 +18,7 @@ public class CodegenCreateListReqVO {
@NotNull(message = "表名数组不能为空")
private List<String> tableNames;
@Schema(description = "是否为规范缩写定义表", example = "true")
private Boolean isStandardized = false;
}

View File

@@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.infra.controller.admin.stdnms.stdnms.vo;
package cn.iocoder.yudao.module.infra.controller.admin.standardname.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -11,16 +11,16 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@Schema(description = "管理后台 - 数据命名与简写标准分页 Request VO")
@Data
public class StdNmsPageReqVO extends PageParam {
public class StandardNamePageReqVO extends PageParam {
@Schema(description = "英文")
private String word;
@Schema(description = "简写")
private String abbr;
private String abbreviation;
@Schema(description = "中文意思")
private String info;
private String information;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)

View File

@@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.infra.controller.admin.stdnms.stdnms.vo;
package cn.iocoder.yudao.module.infra.controller.admin.standardname.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
@@ -10,9 +10,9 @@ import java.time.LocalDateTime;
@Schema(description = "管理后台 - 数据命名与简写标准 Response VO")
@Data
@ExcelIgnoreUnannotated
public class StdNmsRespVO {
public class StandardNameRespVO {
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2987")
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8832")
@ExcelProperty("主键ID")
private Long id;
@@ -22,11 +22,11 @@ public class StdNmsRespVO {
@Schema(description = "简写", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("简写")
private String abbr;
private String abbreviation;
@Schema(description = "中文意思", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("中文意思")
private String info;
private String information;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")

View File

@@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.infra.controller.admin.stdnms.stdnms.vo;
package cn.iocoder.yudao.module.infra.controller.admin.standardname.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
@@ -6,9 +6,9 @@ import lombok.Data;
@Schema(description = "管理后台 - 数据命名与简写标准新增/修改 Request VO")
@Data
public class StdNmsSaveReqVO {
public class StandardNameSaveReqVO {
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2987")
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8832")
private Long id;
@Schema(description = "英文", requiredMode = Schema.RequiredMode.REQUIRED)
@@ -17,10 +17,10 @@ public class StdNmsSaveReqVO {
@Schema(description = "简写", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "简写不能为空")
private String abbr;
private String abbreviation;
@Schema(description = "中文意思", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "中文意思不能为空")
private String info;
private String information;
}

View File

@@ -0,0 +1,47 @@
package cn.iocoder.yudao.module.infra.dal.dataobject.standardname;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
/**
* 数据命名与简写标准 DO
*
* @author 后台管理
*/
@TableName("infra_std_name")
@KeySequence("infra_std_name_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
/**
* 支持业务基类继承isBusiness=true 时继承 BusinessBaseDO否则继承 BaseDO
*/
public class StandardNameDO extends BaseDO {
/**
* 主键ID
*/
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 英文
*/
@TableField("WORD")
private String word;
/**
* 简写
*/
@TableField("ABBR")
private String abbreviation;
/**
* 中文意思
*/
@TableField("INF")
private String information;
}

View File

@@ -1,50 +0,0 @@
package cn.iocoder.yudao.module.infra.dal.dataobject.stdnms.stdnms;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
/**
* 数据命名与简写标准 DO
*
* @author 后台管理
*/
@TableName("infra_std_nms")
@KeySequence("infra_std_nms_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
/**
* 支持业务基类继承isBusiness=true 时继承 BusinessBaseDO否则继承 BaseDO
*/
public class StdNmsDO extends BaseDO {
/**
* 主键ID
*/
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 英文
*/
private String word;
/**
* 简写
*/
private String abbr;
/**
* 中文意思
*/
private String info;
/**
* 是否删除(取消逻辑删除)
*/
private Boolean deleted;
}

View File

@@ -1,13 +1,18 @@
package cn.iocoder.yudao.module.infra.dal.mysql.codegen;
import cn.hutool.core.lang.func.LambdaUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTablePageReqVO;
import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
import com.baomidou.mybatisplus.core.toolkit.LambdaUtils;
import com.baomidou.mybatisplus.core.toolkit.support.ColumnCache;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.util.StringUtils;
import java.util.List;
import java.util.Map;
@Mapper
public interface CodegenTableMapper extends BaseMapperX<CodegenTableDO> {
@@ -18,13 +23,27 @@ public interface CodegenTableMapper extends BaseMapperX<CodegenTableDO> {
}
default PageResult<CodegenTableDO> selectPage(CodegenTablePageReqVO pageReqVO) {
return selectPage(pageReqVO, new LambdaQueryWrapperX<CodegenTableDO>()
.likeIfPresent(CodegenTableDO::getTableName, pageReqVO.getTableName())
.likeIfPresent(CodegenTableDO::getTableComment, pageReqVO.getTableComment())
.likeIfPresent(CodegenTableDO::getClassName, pageReqVO.getClassName())
.betweenIfPresent(CodegenTableDO::getCreateTime, pageReqVO.getCreateTime())
.orderByDesc(CodegenTableDO::getUpdateTime)
);
LambdaQueryWrapperX<CodegenTableDO> wrapper = new LambdaQueryWrapperX<>();
Map<String, ColumnCache> columnMap = LambdaUtils.getColumnMap(CodegenTableDO.class);
// 大小写不敏感的 like 查询,使用动态获取的列名
if (StringUtils.hasText(pageReqVO.getTableName())) {
String tableNameColumn = LambdaUtil.getFieldName(CodegenTableDO::getTableName).toUpperCase();
wrapper.apply("LOWER(" + columnMap.get(tableNameColumn).getColumn() + ") LIKE LOWER({0})", "%" + pageReqVO.getTableName() + "%");
}
if (StringUtils.hasText(pageReqVO.getTableComment())) {
String tableCommentColumn = LambdaUtil.getFieldName(CodegenTableDO::getTableComment).toUpperCase();
wrapper.apply("LOWER(" + columnMap.get(tableCommentColumn).getColumn() + ") LIKE LOWER({0})", "%" + pageReqVO.getTableComment() + "%");
}
if (StringUtils.hasText(pageReqVO.getClassName())) {
String classNameColumn = LambdaUtil.getFieldName(CodegenTableDO::getClassName).toUpperCase();
wrapper.apply("LOWER(" + columnMap.get(classNameColumn).getColumn() + ") LIKE LOWER({0})", "%" + pageReqVO.getClassName() + "%");
}
wrapper.betweenIfPresent(CodegenTableDO::getCreateTime, pageReqVO.getCreateTime())
.orderByDesc(CodegenTableDO::getUpdateTime);
return selectPage(pageReqVO, wrapper);
}
default List<CodegenTableDO> selectListByDataSourceConfigId(Long dataSourceConfigId) {

Some files were not shown because too many files have changed in this diff Show More