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 db444ade..19b7ae68 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 @@ -573,4 +573,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