fix 第三方在研项目-下载 改方法名,改参数名
This commit is contained in:
+4
-7
@@ -4,8 +4,6 @@ import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
@@ -23,7 +21,6 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
@@ -102,11 +99,11 @@ public class PayResearchProjectController extends JeroController<PayResearchProj
|
||||
*/
|
||||
@AutoLog(value = "第三方在研项目-下载")
|
||||
@ApiOperation(value="第三方在研项目-下载", notes="第三方在研项目-下载")
|
||||
@GetMapping(value = "/downLoad")
|
||||
public void downLoad(@RequestParam(name="fileId",required = true) Integer fileId,
|
||||
@RequestParam(name="fileName",required = true) String fileName
|
||||
@GetMapping(value = "/download")
|
||||
public void download(@RequestParam(name="fileId",required = true) Integer fileId,
|
||||
@RequestParam(name="fullfilename",required = true) String fileName
|
||||
) throws IOException {
|
||||
payResearchProjectService.downLoad(fileId,fileName);
|
||||
payResearchProjectService.download(fileId,fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ public interface IPayResearchProjectService extends IService<PayResearchProject>
|
||||
|
||||
JSONObject listForThree(Integer pageNo, Integer pageSize, String abbreviation, String projectName);
|
||||
|
||||
void downLoad(Integer fileId,String fileName) throws IOException;
|
||||
void download(Integer fileId, String fileName) throws IOException;
|
||||
|
||||
IPage<PayResearchProject> pageList(Page<PayResearchProject> page, QueryWrapper<PayResearchProject> queryWrapper);
|
||||
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ public class PayResearchProjectServiceImpl extends ServiceImpl<PayResearchProjec
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void downLoad(Integer fileId,String fileName) throws IOException {
|
||||
public void download(Integer fileId, String fileName) throws IOException {
|
||||
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
HttpServletResponse response = requestAttributes.getResponse();
|
||||
String type = new MimetypesFileTypeMap().getContentType(fileName);
|
||||
|
||||
Reference in New Issue
Block a user