From a09436b1626476cddc74bf2f278219fa076bcc32 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Wed, 27 Apr 2022 14:08:54 +0800 Subject: [PATCH] ... --- .../resource/service/impl/ResourceServiceImpl.java | 10 +--------- .../controller/TResourceMountApplyController.java | 3 ++- .../service/impl/TResourceMountApplyServiceImpl.java | 4 +++- 3 files changed, 6 insertions(+), 11 deletions(-) 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 43cf61a7..d01d52d9 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 @@ -21,19 +21,11 @@ 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; -import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.OutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -129,7 +121,7 @@ public class ResourceServiceImpl extends CrudServiceImpl wrapper = new QueryWrapper<>(); wrapper.eq("data_resource_id", resourceEntity.getId()) - .eq("del_f lag", 0); + .eq("del_flag", 0); List attrEntities = attrDao.selectList(wrapper); resourceDTO.setInfoList(attrEntities); return resourceDTO; diff --git a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/controller/TResourceMountApplyController.java b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/controller/TResourceMountApplyController.java index aee4cee4..f5af6525 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/controller/TResourceMountApplyController.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/controller/TResourceMountApplyController.java @@ -46,7 +46,8 @@ public class TResourceMountApplyController { @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"), @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"), @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), - @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String") + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "creator", value = "创建者id", paramType = "query", dataType = "Long") }) // @RequiresPermissions("resourceMountApply:tresourcemountapply:page") public Result> page(@ApiIgnore @RequestParam Map params) { diff --git a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/service/impl/TResourceMountApplyServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/service/impl/TResourceMountApplyServiceImpl.java index 668cee06..b54d4886 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/service/impl/TResourceMountApplyServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/service/impl/TResourceMountApplyServiceImpl.java @@ -22,7 +22,9 @@ public class TResourceMountApplyServiceImpl extends CrudServiceImpl getWrapper(Map params) { QueryWrapper wrapper = new QueryWrapper<>(); - + if (params.containsKey("creator")) { //查该用户创建的资源 + wrapper.eq("creator", Long.valueOf(params.get("creator").toString())); + } return wrapper; }