From 80bb545457b4c9da5e3041a6cf5eea0331482c2c Mon Sep 17 00:00:00 2001 From: wangliwen Date: Mon, 9 Jan 2023 11:53:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=98=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fuse/service/impl/TbFuseServiceImpl.java | 9 ++++++-- .../TAbilityApplicationController.java | 21 +++++++++++++++++++ .../main/resources/mapper/fuse/TbFuseDao.xml | 16 ++++++++++---- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/fuse/service/impl/TbFuseServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/fuse/service/impl/TbFuseServiceImpl.java index c0aeb241..61682934 100644 --- a/renren-admin/src/main/java/io/renren/modules/fuse/service/impl/TbFuseServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/fuse/service/impl/TbFuseServiceImpl.java @@ -240,8 +240,13 @@ public class TbFuseServiceImpl extends CrudServiceImpl list = fuseResourceDao.selectList(wrapper); - Map> resourceMap = list.stream().filter(index -> index.getType() != null).collect(Collectors.groupingBy(TbFuseResourceEntity::getType)); - + result = list.stream().map(index -> { + TbFuseResourceDTO dto = new TbFuseResourceDTO(); + dto.setFuseId(fuseId); + BeanUtils.copyProperties(index, dto); + return dto; + }).collect(Collectors.toList()); +// Map> resourceMap = list.stream().filter(index -> index.getType() != null).collect(Collectors.groupingBy(TbFuseResourceEntity::getType)); // resourceMap.forEach((type, value) -> { // if ("组件服务".equals(type)) { // result.addAll(value.stream().map(attr -> { diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java index 6f9eaf71..202c8383 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java @@ -775,4 +775,25 @@ public class TAbilityApplicationController { return new Result().ok(tAbilityApplicationService.getApplyPriceCount()); } + /** + * 根据能力资源id获取该能力申请使用分页 + * + * @param params + * @return + */ + @GetMapping("page_for_score") + @ApiOperation("用于评分的分页") + @ApiImplicitParams({@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 = "ended", value = "是否完成(true, false)", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "resourceId", value = "资源id", paramType = "query", dataType = "String") + } + ) + public Result> pageForScore(@ApiIgnore @RequestParam Map params) { + PageData page = tAbilityApplicationService.page(params); + return new Result>().ok(page); + } + } \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/fuse/TbFuseDao.xml b/renren-admin/src/main/resources/mapper/fuse/TbFuseDao.xml index 4e5c5b1e..b0e46a7d 100644 --- a/renren-admin/src/main/resources/mapper/fuse/TbFuseDao.xml +++ b/renren-admin/src/main/resources/mapper/fuse/TbFuseDao.xml @@ -24,10 +24,18 @@