mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-11 06:57:12 +08:00
style: 调整代码风格 null != xx => xx != null(更符合大众风格)
This commit is contained in:
@@ -134,7 +134,7 @@ public class GeneratorServiceImpl implements GeneratorService {
|
||||
GenConfigDO lastGenConfig = genConfigMapper.selectOne(Wrappers.lambdaQuery(GenConfigDO.class)
|
||||
.orderByDesc(GenConfigDO::getCreateTime)
|
||||
.last("LIMIT 1"));
|
||||
if (null != lastGenConfig) {
|
||||
if (lastGenConfig != null) {
|
||||
genConfig.setAuthor(lastGenConfig.getAuthor());
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public class GeneratorServiceImpl implements GeneratorService {
|
||||
FieldConfigDO fieldConfig = Optional.ofNullable(fieldConfigMap.get(column.getName()))
|
||||
.orElseGet(() -> new FieldConfigDO(column));
|
||||
// 更新已有字段配置
|
||||
if (null != fieldConfig.getCreateTime()) {
|
||||
if (fieldConfig.getCreateTime() != null) {
|
||||
fieldConfig.setColumnType(column.getTypeName());
|
||||
fieldConfig.setColumnSize(column.getSize());
|
||||
}
|
||||
@@ -213,7 +213,7 @@ public class GeneratorServiceImpl implements GeneratorService {
|
||||
// 保存或更新生成配置信息
|
||||
GenConfigDO newGenConfig = req.getGenConfig();
|
||||
GenConfigDO oldGenConfig = genConfigMapper.selectById(tableName);
|
||||
if (null != oldGenConfig) {
|
||||
if (oldGenConfig != null) {
|
||||
BeanUtil.copyProperties(newGenConfig, oldGenConfig);
|
||||
genConfigMapper.updateById(oldGenConfig);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user