forked from gzzfw/backEnd/gz-dyh

liyj
2024-08-31 be5e72f7f7b7edf047ea26c04e1fcf19052eeee8
dyh-service/dyh-sys/src/main/java/cn/huge/module/file/service/FileInfoService.java
@@ -145,7 +145,7 @@
     * @param uploaderDTO 上传人信息
     * @return
     */
    public FileInfo webPploadFile(MultipartFile file, String ownerId, String ownerType, int fileCount, UploaderDTO uploaderDTO) {
    public FileInfo webUploadFile(MultipartFile file, String mainId, String ownerId, String ownerType, int fileCount, UploaderDTO uploaderDTO) {
        try {
            String fileId = utilsClient.getNewTimeId();
            // 创建附件信息
@@ -155,6 +155,7 @@
            ftpUtils.upload(fileInfo.getPath(), fileInfo.getFileName(), file.getInputStream());
            // 保存附件信息
            fileInfo.setName(FileOwnerTypeBaseEnum.getDes(ownerType) + BaseConsts.UNDER + fileCount);
            fileInfo.setMainId(mainId);
            fileInfo.setOwnerId(ownerId);
            fileInfo.setOwnerCat(FileOwnerTypeBaseEnum.getCat(ownerType));
            fileInfo.setOwnerCatName(FileOwnerTypeBaseEnum.getDes(fileInfo.getOwnerCat()));
@@ -183,7 +184,7 @@
     * @param uploaderDTO 上传人信息
     * @return
     */
    public FileInfo wechatPploadFile(MultipartFile file, String ownerId, String ownerType, int fileCount, UploaderDTO uploaderDTO) {
    public FileInfo wechatUploadFile(MultipartFile file, String mainId, String ownerId, String ownerType, int fileCount, UploaderDTO uploaderDTO) {
        try {
            String fileId = utilsClient.getNewTimeId();
            // 创建附件信息
@@ -193,6 +194,7 @@
            ftpUtils.upload(fileInfo.getPath(), fileInfo.getFileName(), file.getInputStream());
            // 保存附件信息
            fileInfo.setName(FileOwnerTypeBaseEnum.getDes(ownerType) + BaseConsts.UNDER + fileCount);
            fileInfo.setMainId(mainId);
            fileInfo.setOwnerId(ownerId);
            fileInfo.setOwnerCat(FileOwnerTypeBaseEnum.getCat(ownerType));
            fileInfo.setOwnerCatName(FileOwnerTypeBaseEnum.getDes(fileInfo.getOwnerCat()));