mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-12 09:11:53 +08:00
codegen:1)增加 vue3 + crud 模式下的单测;2)增加主子表的 db 字段
This commit is contained in:
@@ -108,4 +108,4 @@ public class ${sceneEnum.prefixClass}${table.className}Controller {
|
||||
ExcelUtils.write(response, "${table.classComment}.xls", "数据", ${sceneEnum.prefixClass}${table.className}ExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -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}不能为空")
|
||||
|
@@ -27,4 +27,4 @@ public class ${sceneEnum.prefixClass}${table.className}CreateReqVO extends ${sce
|
||||
|
||||
#end
|
||||
#end
|
||||
}
|
||||
}
|
@@ -42,4 +42,4 @@ public class ${sceneEnum.prefixClass}${table.className}ExcelVO {
|
||||
|
||||
#end
|
||||
#end
|
||||
}
|
||||
}
|
@@ -36,4 +36,4 @@ public class ${sceneEnum.prefixClass}${table.className}ExportReqVO {
|
||||
|
||||
#end
|
||||
#end
|
||||
}
|
||||
}
|
@@ -38,4 +38,4 @@ public class ${sceneEnum.prefixClass}${table.className}PageReqVO extends PagePar
|
||||
|
||||
#end
|
||||
#end
|
||||
}
|
||||
}
|
@@ -22,4 +22,4 @@ public class ${sceneEnum.prefixClass}${table.className}RespVO extends ${sceneEnu
|
||||
|
||||
#end
|
||||
#end
|
||||
}
|
||||
}
|
@@ -27,4 +27,4 @@ public class ${sceneEnum.prefixClass}${table.className}UpdateReqVO extends ${sce
|
||||
|
||||
#end
|
||||
#end
|
||||
}
|
||||
}
|
@@ -31,4 +31,4 @@ public interface ${table.className}Convert {
|
||||
|
||||
List<${sceneEnum.prefixClass}${table.className}ExcelVO> convertList02(List<${table.className}DO> list);
|
||||
|
||||
}
|
||||
}
|
@@ -44,4 +44,4 @@ public class ${table.className}DO extends BaseDO {
|
||||
#end
|
||||
#end
|
||||
|
||||
}
|
||||
}
|
@@ -63,4 +63,4 @@ public interface ${table.className}Mapper extends BaseMapperX<${table.className}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -9,4 +9,4 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
@@ -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}不存在");
|
@@ -67,4 +67,4 @@ public interface ${table.className}Service {
|
||||
*/
|
||||
List<${table.className}DO> get${simpleClassName}List(${sceneEnum.prefixClass}${table.className}ExportReqVO exportReqVO);
|
||||
|
||||
}
|
||||
}
|
@@ -85,4 +85,4 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||
return ${classNameVar}Mapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -162,4 +162,4 @@ public class ${table.className}ServiceImplTest extends BaseDbUnitTest {
|
||||
assertPojoEquals(db${simpleClassName}, list.get(0));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -32,4 +32,4 @@ CREATE TABLE IF NOT EXISTS "${table.tableName.toLowerCase()}" (
|
||||
) COMMENT '${table.tableComment}';
|
||||
|
||||
-- 将该删表 SQL 语句,添加到 yudao-module-${table.moduleName}-biz 模块的 test/resources/sql/clean.sql 文件里
|
||||
DELETE FROM "${table.tableName}";
|
||||
DELETE FROM "${table.tableName}";
|
@@ -25,4 +25,4 @@ VALUES (
|
||||
'${table.classComment}${functionName}', '${permissionPrefix}:${functionOps.get($index)}', 3, $foreach.count, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
#end
|
||||
#end
|
@@ -43,4 +43,4 @@ export const delete${simpleClassName} = async (id: number) => {
|
||||
// 导出${table.classComment} Excel
|
||||
export const export${simpleClassName} = async (params) => {
|
||||
return await request.download({ url: `${baseURL}/export-excel`, params })
|
||||
}
|
||||
}
|
@@ -231,4 +231,4 @@ const resetForm = () => {
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
||||
</script>
|
@@ -286,4 +286,4 @@ const handleExport = async () => {
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
</script>
|
Reference in New Issue
Block a user