refactor: 移除用户表和配置表的冗余逻辑
This commit is contained in:
@@ -364,8 +364,7 @@ CREATE TABLE `sys_user` (
|
|||||||
`update_time` datetime COMMENT '更新时间',
|
`update_time` datetime COMMENT '更新时间',
|
||||||
`update_by` bigint COMMENT '修改人ID',
|
`update_by` bigint COMMENT '修改人ID',
|
||||||
`is_deleted` tinyint(1) DEFAULT 0 COMMENT '逻辑删除标识(0-未删除 1-已删除)',
|
`is_deleted` tinyint(1) DEFAULT 0 COMMENT '逻辑删除标识(0-未删除 1-已删除)',
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
UNIQUE KEY `uk_username` (`username`)
|
|
||||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COMMENT = '系统用户表';
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COMMENT = '系统用户表';
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> impleme
|
|||||||
"配置键已存在");
|
"配置键已存在");
|
||||||
Config config = configConverter.toEntity(configForm);
|
Config config = configConverter.toEntity(configForm);
|
||||||
config.setCreateBy(SecurityUtils.getUserId());
|
config.setCreateBy(SecurityUtils.getUserId());
|
||||||
config.setIsDeleted(0);
|
|
||||||
return this.save(config);
|
return this.save(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,11 +121,7 @@ public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> impleme
|
|||||||
@Override
|
@Override
|
||||||
public boolean delete(Long id) {
|
public boolean delete(Long id) {
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
return super.update(new LambdaUpdateWrapper<Config>()
|
return super.removeById(id);
|
||||||
.eq(Config::getId,id)
|
|
||||||
.set(Config::getIsDeleted, 1)
|
|
||||||
.set(Config::getUpdateBy, SecurityUtils.getUserId())
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user