fix: 系统管理
parent
475343da9b
commit
e4ae9d0c5b
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -50,14 +50,12 @@ public class SysOssConfigController extends BaseController {
|
|||
/**
|
||||
* 获取对象存储配置详细信息
|
||||
*
|
||||
* @param ossConfigId OSS配置ID
|
||||
*/
|
||||
@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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,7 +28,7 @@ public class SysOssConfigBo extends BaseDto {
|
|||
* 主建
|
||||
*/
|
||||
@NotNull(message = "主建不能为空", groups = {EditGroup.class})
|
||||
private Long ossConfigId;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 配置key
|
||||
|
|
Loading…
Reference in New Issue