Bläddra i källkod

fix: 资源导入接口(待自测)

huangjy 4 år sedan
förälder
incheckning
0cfe261a51

+ 2 - 5
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/ServiceResourceController.java

@@ -22,10 +22,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.io.ByteArrayInputStream;
@@ -80,7 +77,7 @@ public class ServiceResourceController {
     @PostMapping(value = "/import")
     @ApiImplicitParam(name = "fileId", value = "导入文件id")
     @ApiOperation(value = "授权主客体管理_服务资源导入")
-    public Result impExcel(@RequestBody String fileId) {
+    public Result impExcel(@RequestParam("fileId") String fileId) {
         ResponseStatus responseStatus = serviceResourceFacade.impExcel(fileId);
         if (!responseStatus.getStatusCode().equals("200")){
             return Result.fail(responseStatus.getStatusCode(), responseStatus.getMessage());

+ 1 - 1
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/download/DownloadController.java

@@ -123,7 +123,7 @@ public class DownloadController {
             } else if ("UserTemplate.xls".equals( resource.getFilename())) {
                 fileName = "人员信息模板.xls";
             }else if ("serviceResourceTemplate.xls".equals( resource.getFilename())) {
-                fileName = "授权主客体管理_服务资源导入.xls";
+                fileName = "客体_服务资源导入.xls";
             }
             response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
             response.addHeader("Content-Length", "" + resource.contentLength());

BIN
src/main/resources/template/serviceResourceTemplate.xls