forked from gzzfw/backEnd/gz-dyh

liyj
2024-10-28 1ac0d92fc65b6e1524b172af4adffbf8974e467b
dyh-service/dyh-mediate/src/main/java/cn/huge/module/client/api/impl/SysClientImpl.java
@@ -90,7 +90,6 @@
    /**
     * 获取时限
     * @param limitTable 表名
     * @param limitType  时限类型
     * @return List
     */
@@ -246,4 +245,46 @@
            log.error("service方法[SysClientImpl.saveFileRelateList]请求异常:"+e, e);
        }
    }
    public List<QueAreaDTO> listByParentId(String parentId){
        List<QueAreaDTO> queAreaDTOList = new ArrayList<>();
        try{
            ReturnBO returnBo = sysClient.listByParentId(parentId);
            if (ReturnConsts.OK == returnBo.getCode()){
                if (ObjectUtils.isNotEmpty(returnBo.getData())){
                    List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData();
                    for (LinkedHashMap map : list) {
                        QueAreaDTO queAreaDTO = JSON.parseObject(JSON.toJSONString(map), QueAreaDTO.class);
                        queAreaDTOList.add(queAreaDTO);
                    }
                }
            }
        }catch (Exception e){
            log.error("service方法[SysClientImpl.listFileRelateByOwnerId]调用异常:"+e, e);
        }
        return queAreaDTOList;
    }
    /**
     * 根据id查询附件信息
     * @url {ctx}/api/client/fileInfo/getFileInfoById
     * @param id 条件
     * @return
     */
    public FileInfoBaseDTO getFileInfoById(String id){
        FileInfoBaseDTO fileInfoBaseDTO = null;
        try{
            ReturnBO returnBo = sysClient.getFileInfoById(id);
            if (ReturnConsts.OK == returnBo.getCode()){
                if (ObjectUtils.isNotEmpty(returnBo.getData())){
                    fileInfoBaseDTO = new FileInfoBaseDTO();
                    fileInfoBaseDTO = objectMapper.convertValue(returnBo.getData(), FileInfoBaseDTO.class);
                }
            }
        }catch (Exception e){
            log.error("service方法[SysClientImpl.getFileInfoById]调用异常:"+e, e);
        }
        return fileInfoBaseDTO;
    }
}