|  |  | 
 |  |  |  | 
 |  |  | package com.zt.modules.oss.controller; | 
 |  |  |  | 
 |  |  | import cn.hutool.core.io.IoUtil; | 
 |  |  | import cn.hutool.core.convert.Convert; | 
 |  |  | import com.zt.common.annotation.LogOperation; | 
 |  |  | import com.zt.common.annotation.QueryParam; | 
 |  |  | import com.zt.common.constant.Constant; | 
 |  |  | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | import org.apache.commons.lang3.StringUtils; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.http.HttpHeaders; | 
 |  |  | import org.springframework.http.HttpStatus; | 
 |  |  | import org.springframework.http.MediaType; | 
 |  |  | import org.springframework.http.ResponseEntity; | 
 |  |  | import org.springframework.util.FileCopyUtils; | 
 |  |  | import org.springframework.web.bind.annotation.*; | 
 |  |  | import org.springframework.web.multipart.MultipartFile; | 
 |  |  | import springfox.documentation.annotations.ApiIgnore; | 
 |  |  |  | 
 |  |  | import javax.servlet.http.HttpServletRequest; | 
 |  |  | import javax.servlet.http.HttpServletResponse; | 
 |  |  | import java.io.File; | 
 |  |  | import java.io.FileInputStream; | 
 |  |  | import java.io.InputStream; | 
 |  |  | import java.nio.file.Files; | 
 |  |  | import java.util.Map; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  | 
 |  |  |         //String id = fileId; | 
 |  |  |         String id = request.getParameter("fileId"); | 
 |  |  |         if (StringUtils.isNotEmpty(id)) { | 
 |  |  |             SysOss oss = sysOssService.getById(Long.parseLong(id)); | 
 |  |  |             SysOss oss = sysOssService.getById(Convert.toLong(id)); | 
 |  |  |             if (CloudChannel.LOCAL.getValue().equals(oss.getChannel())) { // 本地 | 
 |  |  |                 System.out.println(CloudChannel.LOCAL.getValue()); | 
 |  |  |                 System.out.println(oss.getChannel()); |