From 0f493bb87c2d423a7dc362db60c71e125903884e Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Tue, 9 Aug 2022 16:52:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E5=B9=BF=E5=9C=BA-=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E8=B5=84=E6=BA=90=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ResourceController.java | 9 ++++++ .../modules/resource/dao/ResourceDao.java | 4 +++ .../resource/service/ResourceService.java | 1 + .../service/impl/ResourceServiceImpl.java | 9 ++++++ .../resources/mapper/resource/ResourceDao.xml | 31 +++++++++++++++++++ 5 files changed, 54 insertions(+) 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 47deb781..4ae58ce3 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 @@ -572,4 +572,13 @@ public class ResourceController { public Result> selectDevelopDoc() { return new Result>().ok(resourceService.selectDevelopDoc()); } + + @GetMapping("/selectAppList") + @ApiOperation("能力广场-应用资源列表查询") + @LogOperation("能力广场-应用资源列表查询") + public Result selectAppLis(@RequestParam Map params) { + return new Result<>().ok(resourceService.selectAppList(params)); + } + + } \ 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 26257d31..756d246c 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 @@ -170,4 +170,8 @@ public interface ResourceDao extends BaseDao { List> selectDevelopDocResource(); List> resourceInstallationOrDataResourceDetails(Map params); + + List selectAppList(@Param("pageNum") int pageNum, @Param("type") Integer type); + + String selectPicByResId(@Param("id") String id); } \ 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 32a0589d..bd182f8c 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 @@ -135,4 +135,5 @@ public interface ResourceService extends CrudService> resourceInstallationOrDataResourceDetails(Map params); + Object selectAppList(Map params); } \ 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 53228125..5694e739 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 @@ -1469,6 +1469,15 @@ public class ResourceServiceImpl extends CrudServiceImpl(result, result2.size()); } + @Override + public Object selectAppList(Map params) { + int pageNum = Integer.parseInt(params.get("pageNum").toString()); + Integer type = params.containsKey("type") ? Integer.parseInt(params.get("type").toString()) : null; + List maps = resourceDao.selectAppList((pageNum - 1) * 9, type); + maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString()))); + return maps; + } + @Override public PageData> resourceInfrastructureDetails(Map params) { List> result; diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index 8d6a6232..c940b9fc 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -1477,4 +1477,35 @@ GROUP BY a.dept_id,b.name ORDER BY a.dept_id,b.name + + \ No newline at end of file