发布 v2.5.2

This commit is contained in:
疯狂的狮子li 2021-07-20 11:03:57 +08:00
parent 51d1e3c8c1
commit 8e8520060d
23 changed files with 71 additions and 47 deletions

View File

@ -4,7 +4,7 @@
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/blob/master/LICENSE) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/blob/master/LICENSE)
[![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-提供支持-blue.svg)](https://www.jetbrains.com/?from=RuoYi-Vue-Plus) [![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-提供支持-blue.svg)](https://www.jetbrains.com/?from=RuoYi-Vue-Plus)
<br> <br>
[![RuoYi-Vue-Plus](https://img.shields.io/badge/RuoYi_Vue_Plus-2.5.1-success.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus) [![RuoYi-Vue-Plus](https://img.shields.io/badge/RuoYi_Vue_Plus-2.5.2-success.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus)
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.4-blue.svg)]() [![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.4-blue.svg)]()
[![JDK-8+](https://img.shields.io/badge/JDK-8+-green.svg)]() [![JDK-8+](https://img.shields.io/badge/JDK-8+-green.svg)]()
[![JDK-11](https://img.shields.io/badge/JDK-11-green.svg)]() [![JDK-11](https://img.shields.io/badge/JDK-11-green.svg)]()

View File

@ -76,7 +76,7 @@ services:
ipv4_address: 172.30.0.48 ipv4_address: 172.30.0.48
ruoyi-server1: ruoyi-server1:
image: "ruoyi/ruoyi-server:2.5.1" image: "ruoyi/ruoyi-server:2.5.2"
environment: environment:
- TZ=Asia/Shanghai - TZ=Asia/Shanghai
volumes: volumes:
@ -90,7 +90,7 @@ services:
ipv4_address: 172.30.0.60 ipv4_address: 172.30.0.60
ruoyi-server2: ruoyi-server2:
image: "ruoyi/ruoyi-server:2.5.1" image: "ruoyi/ruoyi-server:2.5.2"
environment: environment:
- TZ=Asia/Shanghai - TZ=Asia/Shanghai
volumes: volumes:
@ -104,7 +104,7 @@ services:
ipv4_address: 172.30.0.61 ipv4_address: 172.30.0.61
ruoyi-monitor-admin: ruoyi-monitor-admin:
image: "ruoyi/ruoyi-monitor-admin:2.5.1" image: "ruoyi/ruoyi-monitor-admin:2.5.2"
environment: environment:
- TZ=Asia/Shanghai - TZ=Asia/Shanghai
privileged: true privileged: true

View File

@ -6,14 +6,14 @@
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi-vue-plus</artifactId> <artifactId>ruoyi-vue-plus</artifactId>
<version>2.5.1</version> <version>2.5.2</version>
<name>RuoYi-Vue-Plus</name> <name>RuoYi-Vue-Plus</name>
<url>https://gitee.com/JavaLionLi/RuoYi-Vue-Plus</url> <url>https://gitee.com/JavaLionLi/RuoYi-Vue-Plus</url>
<description>RuoYi-Vue-Plus后台管理系统</description> <description>RuoYi-Vue-Plus后台管理系统</description>
<properties> <properties>
<ruoyi-vue-plus.version>2.5.1</ruoyi-vue-plus.version> <ruoyi-vue-plus.version>2.5.2</ruoyi-vue-plus.version>
<spring-boot.version>2.4.8</spring-boot.version> <spring-boot.version>2.4.8</spring-boot.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>ruoyi-vue-plus</artifactId> <artifactId>ruoyi-vue-plus</artifactId>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<version>2.5.1</version> <version>2.5.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>ruoyi-extend</artifactId> <artifactId>ruoyi-extend</artifactId>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>ruoyi-extend</artifactId> <artifactId>ruoyi-extend</artifactId>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<version>2.5.1</version> <version>2.5.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging> <packaging>jar</packaging>

View File

@ -1,6 +1,6 @@
{ {
"name": "ruoyi-vue-plus", "name": "ruoyi-vue-plus",
"version": "2.5.1", "version": "2.5.2",
"description": "RuoYi-Vue-Plus后台管理系统", "description": "RuoYi-Vue-Plus后台管理系统",
"author": "LionLi", "author": "LionLi",
"license": "MIT", "license": "MIT",

View File

@ -91,6 +91,18 @@
<span>更新日志</span> <span>更新日志</span>
</div> </div>
<el-collapse accordion> <el-collapse accordion>
<el-collapse-item title="v2.5.2 - 2021-7-19">
<ol>
<li>update 优化代码生成器注释格式</li>
<li>fix 回滚代码生成 批处理优化</li>
<li>fix 代码生成 queryType 重复勾选数据库无默认值问题</li>
<li>fix 修复接口单参数校验无效问题</li>
<li>fix 代码生成 queryType >= <= 标识符错误问题</li>
<li>fix 修复代码生成字典问题</li>
<li>fix 修复 thread-pool: enabled 配置不生效问题</li>
<li>remove 删除无用文档与脚本</li>
</ol>
</el-collapse-item>
<el-collapse-item title="v2.5.1 - 2021-7-13"> <el-collapse-item title="v2.5.1 - 2021-7-13">
<ol> <ol>
<li>update 验证码开关 转移到表 参数管理 </li> <li>update 验证码开关 转移到表 参数管理 </li>

View File

@ -68,9 +68,9 @@
<el-option label="=" value="EQ" /> <el-option label="=" value="EQ" />
<el-option label="!=" value="NE" /> <el-option label="!=" value="NE" />
<el-option label=">" value="GT" /> <el-option label=">" value="GT" />
<el-option label=">=" value="GTE" /> <el-option label=">=" value="GE" />
<el-option label="<" value="LT" /> <el-option label="<" value="LT" />
<el-option label="<=" value="LTE" /> <el-option label="<=" value="LE" />
<el-option label="LIKE" value="LIKE" /> <el-option label="LIKE" value="LIKE" />
<el-option label="BETWEEN" value="BETWEEN" /> <el-option label="BETWEEN" value="BETWEEN" />
</el-select> </el-select>

View File

@ -109,7 +109,7 @@ module.exports = {
config.optimization.runtimeChunk('single'), config.optimization.runtimeChunk('single'),
{ {
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件 from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
to: './', //到根目录下 to: './' //到根目录下
} }
} }
) )

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>ruoyi-vue-plus</artifactId> <artifactId>ruoyi-vue-plus</artifactId>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<version>2.5.1</version> <version>2.5.2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging> <packaging>jar</packaging>

View File

@ -13,6 +13,10 @@ import java.util.Collection;
*/ */
public interface BaseMapperPlus<T> extends BaseMapper<T> { public interface BaseMapperPlus<T> extends BaseMapper<T> {
/**
* 单sql批量插入( 全量填充 无视数据库默认值 )
* 适用于无脑插入
*/
int insertAll(@Param("list") Collection<T> batchList); int insertAll(@Param("list") Collection<T> batchList);
} }

View File

@ -51,11 +51,8 @@ public class ServicePlusImpl<M extends BaseMapperPlus<T>, T> extends ServiceImpl
} }
/** /**
* 单条执行性能差 * 单条执行性能差 适用于列表对象内容不确定
*
* {@link #saveAll(Collection)}
*/ */
@Deprecated
@Override @Override
public boolean saveBatch(Collection<T> entityList, int batchSize) { public boolean saveBatch(Collection<T> entityList, int batchSize) {
return super.saveBatch(entityList, batchSize); return super.saveBatch(entityList, batchSize);
@ -67,11 +64,8 @@ public class ServicePlusImpl<M extends BaseMapperPlus<T>, T> extends ServiceImpl
} }
/** /**
* 单条执行性能差 * 单条执行性能差 适用于列表对象内容不确定
*
* {@link #saveAll(Collection)}
*/ */
@Deprecated
@Override @Override
public boolean saveOrUpdateBatch(Collection<T> entityList, int batchSize) { public boolean saveOrUpdateBatch(Collection<T> entityList, int batchSize) {
return super.saveOrUpdateBatch(entityList, batchSize); return super.saveOrUpdateBatch(entityList, batchSize);
@ -82,6 +76,10 @@ public class ServicePlusImpl<M extends BaseMapperPlus<T>, T> extends ServiceImpl
return super.updateBatchById(entityList, batchSize); return super.updateBatchById(entityList, batchSize);
} }
/**
* 单sql批量插入( 全量填充 无视数据库默认值 )
* 适用于无脑插入
*/
@Override @Override
public boolean saveAll(Collection<T> entityList) { public boolean saveAll(Collection<T> entityList) {
return baseMapper.insertAll(entityList) == entityList.size(); return baseMapper.insertAll(entityList) == entityList.size();

View File

@ -13,7 +13,7 @@ import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.SqlSource; import org.apache.ibatis.mapping.SqlSource;
/** /**
* 单sql批量插入 * 单sql批量插入( 全量填充 无视数据库默认值 )
* *
* @author Lion Li * @author Lion Li
*/ */

View File

@ -29,7 +29,7 @@ public class TestBatchController extends BaseController {
private final ITestDemoService iTestDemoService; private final ITestDemoService iTestDemoService;
/** /**
* 新增批量方法 * 新增批量方法 ( 全量覆盖填充 )
*/ */
@PostMapping() @PostMapping()
public AjaxResult<Void> add() { public AjaxResult<Void> add() {

View File

@ -26,7 +26,7 @@ public class ThreadPoolConfig {
private ThreadPoolProperties threadPoolProperties; private ThreadPoolProperties threadPoolProperties;
@Bean(name = "threadPoolTaskExecutor") @Bean(name = "threadPoolTaskExecutor")
@ConditionalOnProperty(prefix = "threadPoolTaskExecutor", name = "enabled", havingValue = "true") @ConditionalOnProperty(prefix = "thread-pool", name = "enabled", havingValue = "true")
public ThreadPoolTaskExecutor threadPoolTaskExecutor() { public ThreadPoolTaskExecutor threadPoolTaskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setMaxPoolSize(threadPoolProperties.getMaxPoolSize()); executor.setMaxPoolSize(threadPoolProperties.getMaxPoolSize());

View File

@ -142,8 +142,7 @@ public class GenTableServiceImpl extends ServicePlusImpl<GenTableMapper, GenTabl
.set(StrUtil.isBlank(cenTableColumn.getIsList()), GenTableColumn::getIsList, null) .set(StrUtil.isBlank(cenTableColumn.getIsList()), GenTableColumn::getIsList, null)
.set(StrUtil.isBlank(cenTableColumn.getIsQuery()), GenTableColumn::getIsQuery, null) .set(StrUtil.isBlank(cenTableColumn.getIsQuery()), GenTableColumn::getIsQuery, null)
.set(StrUtil.isBlank(cenTableColumn.getIsRequired()), GenTableColumn::getIsRequired, null) .set(StrUtil.isBlank(cenTableColumn.getIsRequired()), GenTableColumn::getIsRequired, null)
.set(StrUtil.isBlank(cenTableColumn.getQueryType()), GenTableColumn::getQueryType, null) .set(StrUtil.isBlank(cenTableColumn.getDictType()), GenTableColumn::getDictType, "")
.set(StrUtil.isBlank(cenTableColumn.getDictType()), GenTableColumn::getDictType, null)
.eq(GenTableColumn::getColumnId,cenTableColumn.getColumnId())); .eq(GenTableColumn::getColumnId,cenTableColumn.getColumnId()));
} }
} }
@ -180,14 +179,10 @@ public class GenTableServiceImpl extends ServicePlusImpl<GenTableMapper, GenTabl
if (row > 0) { if (row > 0) {
// 保存列信息 // 保存列信息
List<GenTableColumn> genTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName); List<GenTableColumn> genTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName);
List<GenTableColumn> saveColumns = new ArrayList<>();
for (GenTableColumn column : genTableColumns) { for (GenTableColumn column : genTableColumns) {
GenUtils.initColumnField(column, table); GenUtils.initColumnField(column, table);
saveColumns.add(column); genTableColumnMapper.insert(column);
} }
if (CollUtil.isNotEmpty(saveColumns)) {
genTableColumnMapper.insertAll(saveColumns);
}
} }
} }
} catch (Exception e) { } catch (Exception e) {
@ -291,16 +286,12 @@ public class GenTableServiceImpl extends ServicePlusImpl<GenTableMapper, GenTabl
} }
List<String> dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList()); List<String> dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList());
List<GenTableColumn> saveColumns = new ArrayList<>();
dbTableColumns.forEach(column -> { dbTableColumns.forEach(column -> {
if (!tableColumnNames.contains(column.getColumnName())) { if (!tableColumnNames.contains(column.getColumnName())) {
GenUtils.initColumnField(column, table); GenUtils.initColumnField(column, table);
saveColumns.add(column); genTableColumnMapper.insert(column);
} }
}); });
if (CollUtil.isNotEmpty(saveColumns)) {
genTableColumnMapper.insertAll(saveColumns);
}
List<GenTableColumn> delColumns = tableColumns.stream().filter(column -> !dbTableColumnNames.contains(column.getColumnName())).collect(Collectors.toList()); List<GenTableColumn> delColumns = tableColumns.stream().filter(column -> !dbTableColumnNames.contains(column.getColumnName())).collect(Collectors.toList());
if (CollUtil.isNotEmpty(delColumns)) { if (CollUtil.isNotEmpty(delColumns)) {

View File

@ -33,6 +33,7 @@ import io.swagger.annotations.ApiOperation;
* @author ${author} * @author ${author}
* @date ${datetime} * @date ${datetime}
*/ */
@Validated
@Api(value = "${functionName}控制器", tags = {"${functionName}管理"}) @Api(value = "${functionName}控制器", tags = {"${functionName}管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired) @RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController @RestController

View File

@ -24,7 +24,9 @@ public class ${ClassName} implements Serializable {
#foreach ($column in $columns) #foreach ($column in $columns)
/** $column.columnComment */ /**
* $column.columnComment
*/
#if($column.javaField=="createBy"||$column.javaField=="createTime") #if($column.javaField=="createBy"||$column.javaField=="createTime")
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
#end #end

View File

@ -23,7 +23,9 @@ public class ${ClassName}EditBo {
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.isEdit || $column.isPk==1) #if($column.isEdit || $column.isPk==1)
/** $column.columnComment */ /**
* $column.columnComment
*/
@ApiModelProperty("$column.columnComment") @ApiModelProperty("$column.columnComment")
#if($column.isRequired==1) #if($column.isRequired==1)
#if($column.javaType == 'String') #if($column.javaType == 'String')

View File

@ -33,23 +33,33 @@ import com.ruoyi.common.core.domain.TreeEntity;
@ApiModel("${functionName}分页查询对象") @ApiModel("${functionName}分页查询对象")
public class ${ClassName}QueryBo extends ${Entity} { public class ${ClassName}QueryBo extends ${Entity} {
/** 分页大小 */ /**
* 分页大小
*/
@ApiModelProperty("分页大小") @ApiModelProperty("分页大小")
private Integer pageSize; private Integer pageSize;
/** 当前页数 */ /**
* 当前页数
*/
@ApiModelProperty("当前页数") @ApiModelProperty("当前页数")
private Integer pageNum; private Integer pageNum;
/** 排序列 */ /**
* 排序列
*/
@ApiModelProperty("排序列") @ApiModelProperty("排序列")
private String orderByColumn; private String orderByColumn;
/** 排序的方向desc或者asc */ /**
* 排序的方向desc或者asc
*/
@ApiModelProperty(value = "排序的方向", example = "asc,desc") @ApiModelProperty(value = "排序的方向", example = "asc,desc")
private String isAsc; private String isAsc;
#foreach ($column in $columns) #foreach ($column in $columns)
#if(!$table.isSuperColumn($column.javaField) && $column.query) #if(!$table.isSuperColumn($column.javaField) && $column.query)
/** $column.columnComment */ /**
* $column.columnComment
*/
@ApiModelProperty("$column.columnComment") @ApiModelProperty("$column.columnComment")
private $column.javaType $column.javaField; private $column.javaType $column.javaField;
#end #end

View File

@ -23,13 +23,17 @@ public class ${ClassName}Vo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** $pkColumn.columnComment */ /**
* $pkColumn.columnComment
*/
@ApiModelProperty("$pkColumn.columnComment") @ApiModelProperty("$pkColumn.columnComment")
private ${pkColumn.javaType} ${pkColumn.javaField}; private ${pkColumn.javaType} ${pkColumn.javaField};
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.isList && $column.isPk!=1) #if($column.isList && $column.isPk!=1)
/** $column.columnComment */ /**
* $column.columnComment
*/
#set($parentheseIndex=$column.columnComment.indexOf("")) #set($parentheseIndex=$column.columnComment.indexOf(""))
#if($parentheseIndex != -1) #if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex)) #set($comment=$column.columnComment.substring(0, $parentheseIndex))

View File

@ -105,7 +105,7 @@
<span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
#elseif($column.list && "" != $column.dictType) #elseif($column.list && $column.dictType && "" != $column.dictType)
<el-table-column label="${comment}" align="center" prop="${javaField}" :formatter="${javaField}Format" /> <el-table-column label="${comment}" align="center" prop="${javaField}" :formatter="${javaField}Format" />
#elseif($column.list && "" != $javaField) #elseif($column.list && "" != $javaField)
#if(${foreach.index} == 1) #if(${foreach.index} == 1)

View File

@ -134,7 +134,7 @@
<span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
#elseif($column.list && "" != $column.dictType) #elseif($column.list && $column.dictType && "" != $column.dictType)
<el-table-column label="${comment}" align="center" prop="${javaField}" :formatter="${javaField}Format" /> <el-table-column label="${comment}" align="center" prop="${javaField}" :formatter="${javaField}Format" />
#elseif($column.list && "" != $javaField) #elseif($column.list && "" != $javaField)
<el-table-column label="${comment}" align="center" prop="${javaField}" /> <el-table-column label="${comment}" align="center" prop="${javaField}" />