diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index 7c088faa..a18c9360 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -3,7 +3,6 @@ package io.renren.modules.resource.controller; import com.alibaba.fastjson.JSONObject; import io.renren.common.annotation.LogOperation; import io.renren.common.constant.Constant; -import io.renren.common.controller.FileUploadController; import io.renren.common.page.PageData; import io.renren.common.utils.Result; import io.renren.common.validator.ValidatorUtils; @@ -27,9 +26,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; -import java.util.Date; import java.util.Map; -import java.util.UUID; /** * 资源表 @@ -43,7 +40,8 @@ import java.util.UUID; public class ResourceController { @Value("${resource.devModelFilePath}") - private String delModelFilePath; + private String devModelFilePath; + @Autowired private ResourceService resourceService; @@ -157,7 +155,7 @@ public class ResourceController { public Result upload(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) { logger.info("上传文件:" + uploadFile.getOriginalFilename()); - File folder = new File(delModelFilePath); + File folder = new File(devModelFilePath); if (!folder.isDirectory()) { folder.mkdirs(); } @@ -181,7 +179,8 @@ public class ResourceController { } } - /*@GetMapping("export") + /* + @GetMapping("export") @ApiOperation("导出") @LogOperation("导出") //@RequiresPermissions("resource:resource:export") @@ -190,5 +189,5 @@ public class ResourceController { ExcelUtils.exportExcelToTarget(response, null, "资源表", list, ResourceExcel.class); } -*/ + */ } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index ec22068e..267a4667 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -17,6 +17,8 @@ import io.renren.modules.resource.entity.ResourceEntity; import io.renren.modules.resource.service.ResourceService; import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.UserDetail; +import io.renren.modules.sys.dto.SysDeptDTO; +import io.renren.modules.sys.service.SysDeptService; import org.apache.commons.io.IOUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -48,6 +50,8 @@ public class ResourceServiceImpl extends CrudServiceImpl wrapper = new QueryWrapper<>(); wrapper.eq("data_resource_id", resourceEntity.getId()) .eq("del_flag", 0);