codegen:1)增加 vue3 + crud 模式下的单测;2)增加主子表的 db 字段

This commit is contained in:
zhijiantianya@gmail.com
2023-11-07 20:43:53 +08:00
parent 0af205ede1
commit 9705ae061c
51 changed files with 1643 additions and 24 deletions

View File

@@ -108,4 +108,4 @@ public class ${sceneEnum.prefixClass}${table.className}Controller {
ExcelUtils.write(response, "${table.classComment}.xls", "数据", ${sceneEnum.prefixClass}${table.className}ExcelVO.class, datas);
}
}
}

View File

@@ -1,7 +1,7 @@
## 提供给 baseVO、createVO、updateVO 生成字段
@Schema(description = "${column.columnComment}"#if (!${column.nullable}), requiredMode = Schema.RequiredMode.REQUIRED#end#if ("$!column.example" != ""), example = "${column.example}"#end)
#if (!${column.nullable})## 判断 @NotEmpty 和 @NotNull 注解
#if (${field.fieldType} == 'String')
#if (${column.javaType} == 'String')
@NotEmpty(message = "${column.columnComment}不能为空")
#else
@NotNull(message = "${column.columnComment}不能为空")

View File

@@ -27,4 +27,4 @@ public class ${sceneEnum.prefixClass}${table.className}CreateReqVO extends ${sce
#end
#end
}
}

View File

@@ -42,4 +42,4 @@ public class ${sceneEnum.prefixClass}${table.className}ExcelVO {
#end
#end
}
}

View File

@@ -36,4 +36,4 @@ public class ${sceneEnum.prefixClass}${table.className}ExportReqVO {
#end
#end
}
}

View File

@@ -38,4 +38,4 @@ public class ${sceneEnum.prefixClass}${table.className}PageReqVO extends PagePar
#end
#end
}
}

View File

@@ -22,4 +22,4 @@ public class ${sceneEnum.prefixClass}${table.className}RespVO extends ${sceneEnu
#end
#end
}
}

View File

@@ -27,4 +27,4 @@ public class ${sceneEnum.prefixClass}${table.className}UpdateReqVO extends ${sce
#end
#end
}
}

View File

@@ -31,4 +31,4 @@ public interface ${table.className}Convert {
List<${sceneEnum.prefixClass}${table.className}ExcelVO> convertList02(List<${table.className}DO> list);
}
}

View File

@@ -44,4 +44,4 @@ public class ${table.className}DO extends BaseDO {
#end
#end
}
}

View File

@@ -63,4 +63,4 @@ public interface ${table.className}Mapper extends BaseMapperX<${table.className}
}
}
}

View File

@@ -9,4 +9,4 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>
</mapper>

View File

@@ -1,3 +1,3 @@
// TODO 待办:请将下面的错误码复制到 yudao-module-${table.moduleName}-api 模块的 ErrorCodeConstants 类中。注意请给“TODO 补充编号”设置一个错误码编号!!!
// ========== ${table.classComment} TODO 补充编号 ==========
ErrorCode ${simpleClassName_underlineCase.toUpperCase()}_NOT_EXISTS = new ErrorCode(TODO 补充编号, "${table.classComment}不存在");
ErrorCode ${simpleClassName_underlineCase.toUpperCase()}_NOT_EXISTS = new ErrorCode(TODO 补充编号, "${table.classComment}不存在");

View File

@@ -67,4 +67,4 @@ public interface ${table.className}Service {
*/
List<${table.className}DO> get${simpleClassName}List(${sceneEnum.prefixClass}${table.className}ExportReqVO exportReqVO);
}
}

View File

@@ -85,4 +85,4 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
return ${classNameVar}Mapper.selectList(exportReqVO);
}
}
}

View File

@@ -162,4 +162,4 @@ public class ${table.className}ServiceImplTest extends BaseDbUnitTest {
assertPojoEquals(db${simpleClassName}, list.get(0));
}
}
}