| | |
| | | import com.java110.config.properties.code.Java110Properties; |
| | | import com.java110.core.component.BaseComponentSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.entity.component.ComponentValidateResult; |
| | | import com.java110.utils.constant.PrivilegeCodeConstant; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.Base64Convert; |
| | | import com.java110.utils.util.FtpUpload; |
| | | import com.java110.web.smo.file.IAddFileSMO; |
| | | import com.java110.core.client.FtpUploadTemplate; |
| | | import com.java110.web.smo.file.IUploadVedioSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | |
| | | /** |
| | | * 添加小区服务实现类 |
| | |
| | | |
| | | @Autowired |
| | | private Java110Properties java110Properties; |
| | | |
| | | @Autowired |
| | | private FtpUploadTemplate ftpUploadTemplate; |
| | | |
| | | @Override |
| | | public ResponseEntity<Object> upload(IPageData pd, MultipartFile uploadFile) throws IOException { |
| | |
| | | throw new IllegalArgumentException("上传文件超过200兆"); |
| | | } |
| | | |
| | | String fileName = FtpUpload.upload(uploadFile, java110Properties.getFtpServer(), |
| | | String fileName = ftpUploadTemplate.upload(uploadFile, java110Properties.getFtpServer(), |
| | | java110Properties.getFtpPort(), java110Properties.getFtpUserName(), |
| | | java110Properties.getFtpUserPassword(), java110Properties.getFtpPath()); |
| | | JSONObject outParam = new JSONObject(); |