| | |
| | | package com.zy.crm.common.utils; |
| | | |
| | | import java.io.*; |
| | | |
| | | import com.zy.crm.manager.entity.PlanUrl; |
| | | import org.springframework.core.io.Resource; |
| | | |
| | | import java.net.URLEncoder; |
| | |
| | | private String name; |
| | | private long size; |
| | | private String path; |
| | | private String userName; |
| | | private boolean success; |
| | | private String errorMessage; |
| | | |
| | |
| | | this.path = path; |
| | | } |
| | | |
| | | public FileDTO(String name, long size, String path,String userName) { |
| | | this.name = name; |
| | | this.size = size; |
| | | this.path = path; |
| | | this.userName = userName; |
| | | } |
| | | |
| | | public FileDTO(String name, long size) { |
| | | this.name = name; |
| | | this.size = size; |
| | | // this.path = path; |
| | | } |
| | | |
| | | public FileDTO(PlanUrl planUrl) { |
| | | this.name = planUrl.getName(); |
| | | this.size = planUrl.getFileSize(); |
| | | this.path = planUrl.getUrl(); |
| | | this.userName = planUrl.getUserName(); |
| | | } |
| | | |
| | | public FileDTO(boolean success, String name, String errorMessage) { |
| | | this.success = success; |
| | | this.name = name; |