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 6b3d82bb..c6f02a0c 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 @@ -678,4 +678,12 @@ public class ResourceController { return new Result().ok(resourceService.getSquareList(jsonObject)); } + @GetMapping("/getAppListByDept") + @ApiOperation("/根据部门查询部门上架应用列表") + @LogOperation("/根据部门查询部门上架应用列表") + public Result getAppListByDept(String key) { + return new Result().ok(resourceService.getAppListByDept(key)); + } + + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java index 22682303..d9e6e957 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java @@ -215,4 +215,6 @@ public interface ResourceDao extends BaseDao { @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize); Integer getSquareListCount(@Param("type") String type, @Param("deptType") Integer deptType, @Param("area") String area); + + List getAppListByDept(@Param("deptId") Long deptId, @Param("key") String key); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java index db38453c..91a83caf 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java @@ -159,4 +159,7 @@ public interface ResourceService extends CrudService + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml b/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml index 45a309ba..f05608a6 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml @@ -7,12 +7,11 @@ select t1.*,(select t2.name from sys_dept t2 where t2.id=t1.pid)parentName from sys_dept t1 where 1 = 1 AND name != '访客部门' - t1.id in + AND t1.id in #{id} - order by t1.sort asc