fix: 系统管理

V0.5.x
jay 2023-06-13 19:18:05 +08:00
parent 475343da9b
commit e4ae9d0c5b
4 changed files with 10 additions and 9 deletions

View File

@ -104,9 +104,12 @@ public class SysConfigDataImpl implements ISysConfigData, IJPACommData<SysConfig
@Override
public SysConfig findOneByCondition(SysConfig data) {
Predicate predicate = PredicateBuilder.instance()
.and(StringUtils.isNotEmpty(data.getConfigKey()), () -> tbSysConfig.configKey.eq(data.getConfigKey()))
.and(StringUtils.isNotBlank(data.getConfigKey()), () -> tbSysConfig.configKey.eq(data.getConfigKey()))
.build();
TbSysConfig tbSysConfig = baseRepository.findOne(predicate).orElseThrow(() -> new BizException(ErrCode.DATA_NOT_EXIST));
TbSysConfig tbSysConfig = baseRepository.findOne(predicate).orElse(null);
if(Objects.isNull(tbSysConfig)){
return null;
}
return MapstructUtils.convert(tbSysConfig, SysConfig.class);
}

View File

@ -55,7 +55,7 @@ public class SysLogininfoDataImpl implements ISysLogininforData, IJPACommData<Sy
@Override
public Paging<SysLogininfor> findAll(PageRequest<SysLogininfor> pageRequest) {
return PageBuilder.toPaging(logininfoRepository.findAll(genPredicate(pageRequest.getData()), PageBuilder.toPageable(pageRequest)));
return PageBuilder.toPaging(logininfoRepository.findAll(genPredicate(pageRequest.getData()), PageBuilder.toPageable(pageRequest))).to(SysLogininfor.class);
}
@Override

View File

@ -50,14 +50,12 @@ public class SysOssConfigController extends BaseController {
/**
*
*
* @param ossConfigId OSSID
*/
@ApiOperation(value = "获取对象存储配置详细信息", notes = "获取对象存储配置详细信息")
@SaCheckPermission("system:oss:query")
@PostMapping("/{ossConfigId}")
public SysOssConfigVo getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long ossConfigId) {
return ossConfigService.queryById(ossConfigId);
@PostMapping("/getDetail")
public SysOssConfigVo getInfo(@Validated @RequestBody Request<Long> bo) {
return ossConfigService.queryById(bo.getData());
}
/**

View File

@ -28,7 +28,7 @@ public class SysOssConfigBo extends BaseDto {
*
*/
@NotNull(message = "主建不能为空", groups = {EditGroup.class})
private Long ossConfigId;
private Long id;
/**
* key