统一 boot 和 cloud 代码

This commit is contained in:
YunaiV
2023-10-24 14:17:50 +08:00
parent 6d5b066ae6
commit e850e39e80
5 changed files with 24 additions and 13 deletions

View File

@@ -15,6 +15,9 @@ import ${basePackage}.module.${table.moduleName}.dal.mysql.${table.businessName}
import static ${ServiceExceptionUtilClassName}.exception;
import static ${basePackage}.module.${table.moduleName}.enums.ErrorCodeConstants.*;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
/**
* ${table.classComment} Service 实现类
*
@@ -66,6 +69,9 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
@Override
public List<${table.className}DO> get${simpleClassName}List(Collection<${primaryColumn.javaType}> ids) {
if (CollUtil.isEmpty(ids)) {
return ListUtil.empty();
}
return ${classNameVar}Mapper.selectBatchIds(ids);
}

View File

@@ -132,20 +132,20 @@
align="center"
prop="${javaField}"
:formatter="dateFormatter"
width="150px"
width="180px"
/>
#elseif("" != $column.dictType)## 数据字典
<el-table-column label="${comment}" align="center" prop="${javaField}" width="150px">
<el-table-column label="${comment}" align="center" prop="${javaField}">
<template #default="scope">
<dict-tag :type="DICT_TYPE.$dictType.toUpperCase()" :value="scope.row.${column.javaField}" />
</template>
</el-table-column>
#else
<el-table-column label="${comment}" align="center" prop="${javaField}" width="150px" />
<el-table-column label="${comment}" align="center" prop="${javaField}" />
#end
#end
#end
<el-table-column label="操作" align="center" width="150px">
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link