forked from gzzfw/backEnd/gz-dyh

zhouxiantao
2024-09-14 6f4ed9dbb428374e5513fbf88aae1377fd423a51
dyh-service/dyh-sys/src/main/java/cn/huge/module/file/controller/wechat/FileInfoWechatController.java
@@ -197,6 +197,7 @@
            service.deleteFileById(id);
            return ReturnSucUtils.getRepInfo();
        } catch (Exception e) {
            log.error("controller接口[FileInfoWechatController.deleteFileById]请求异常:"+e, e);
            return ReturnFailUtils.getRepInfo();
        }
    }
@@ -211,6 +212,22 @@
        try {
            return ReturnSucUtils.getRepInfo(service.listByMainId(mainId));
        } catch (Exception e) {
            log.error("controller接口[FileInfoWechatController.listByMainId]请求异常:"+e, e);
            return ReturnFailUtils.getRepInfo();
        }
    }
    /**
     * 根据多个所属编号查询附件
     * @url {ctx}/api/wechat/fileInfo/listByMainIdAndType?mainId=&ownerType=
     * @return Object
     */
    @GetMapping("/listByMainIdAndType")
    public Object listByMainIdAndType(@RequestParam(value = "mainId") String mainId,@RequestParam(value = "ownerType") String ownerType) {
        try {
            return ReturnSucUtils.getRepInfo(service.listByMainIdAndType(mainId,ownerType));
        } catch (Exception e) {
            log.error("controller接口[FileInfoWechatController.listByMainIdAndType]请求异常:"+e, e);
            return ReturnFailUtils.getRepInfo();
        }
    }