From 40a8d4f5253a9c402b965c683f7f4cf4d7adead0 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Mon, 9 Jan 2023 16:00:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E7=85=A7=E6=98=AF=E5=90=A6=E8=AF=84?= =?UTF-8?q?=E5=88=86=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TAbilityApplicationController.java | 20 +++++++++++++++---- .../impl/TAbilityApplicationServiceImpl.java | 19 +++++++++++++++++- 2 files changed, 34 insertions(+), 5 deletions(-) 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 202c8383..e86cc3c0 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 @@ -787,13 +787,25 @@ public class TAbilityApplicationController { @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") + @ApiImplicitParam(name = "oneEnded", value = "是否完成(true, false)", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "score", value = "是否已评分(true, false)", paramType = "query", dataType = "String") } ) - public Result> pageForScore(@ApiIgnore @RequestParam Map params) { + public Result>> pageForScore(@ApiIgnore @RequestParam Map params) { + final UserDetail user = SecurityUser.getUser(); + params.put("user_id", user == null ? null : user.getId()); PageData page = tAbilityApplicationService.page(params); - return new Result>().ok(page); + List> mapList = page.getList().stream().map(index -> { + Map temp = new LinkedHashMap<>(); + temp.put("applyNumber", index.getApplyNumber()); + temp.put("approveStatus", index.getApproveStatus()); + temp.put("createDate", index.getCreateDate()); + temp.put("system", index.getSystem()); + temp.put("resourceId", index.getResourceId()); + return temp; + }).collect(Collectors.toList()); + PageData> pageData = new PageData<>(mapList, page.getTotal()); + return new Result>>().ok(pageData); } } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java index 47059aa4..18f9e5f7 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java @@ -56,7 +56,7 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl