From 04999c2708cf397115bf6981cc6d0326a4ebd1c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=8D=9A?= Date: Wed, 6 Nov 2024 16:45:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=91=E5=AE=9A=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E6=97=A0=E6=B3=95=E5=88=A0=E9=99=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/app/controller/AppApiController.java | 2 +- .../modules/ten/controller/TenParentController.java | 7 ++++++- .../modules/ten/controller/TenRelationController.java | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/app/controller/AppApiController.java b/shapelight-admin/src/main/java/net/shapelight/modules/app/controller/AppApiController.java index 16a6852..d3ac0db 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/app/controller/AppApiController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/app/controller/AppApiController.java @@ -1034,7 +1034,7 @@ public class AppApiController { .eq(TenRelation::getParentId,user.getUserId()) .in(TenRelation::getStudentId,list)); relations.forEach(relation -> { - info.put("objectUuid",relation.getId()); + info.put("objectUuid",relation.getId().toString()); dataInfo.add(info); }); opParams.put("dataInfo",dataInfo); diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenParentController.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenParentController.java index db0b501..56f5781 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenParentController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenParentController.java @@ -31,6 +31,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; @RestController @RequestMapping("ten/parent") @@ -78,7 +79,11 @@ public class TenParentController { Map info = new HashMap<>(); params.forEach(item -> { TenParent tenParent = tenParentService.getById(item.get("id")); - info.put("objectUuid",tenParent.getUserId().toString()); + List relations = relationService.list(new LambdaQueryWrapper().eq(TenRelation::getParentId,tenParent.getUserId())); + List ids = relations.stream().map(TenRelation::getId).collect(Collectors.toList()); + ids.stream().forEach(id -> { + info.put("objectUuid",id.toString()); + }); dataInfo.add(info); tenParentService.removeById(item.get("id")); appUserService.removeById(tenParent.getUserId()); diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRelationController.java b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRelationController.java index cb35ca6..cd3d638 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRelationController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/ten/controller/TenRelationController.java @@ -72,7 +72,7 @@ public class TenRelationController extends AbstractController { opParams.put("empowerText",KeysEntity.empowerText); List> dataInfo = new ArrayList<>(); Map info = new HashMap<>(); - info.put("objectUuid",tenRelation.getId()); + info.put("objectUuid",tenRelation.getId().toString()); info.put("userUuid",tenRelation.getStudentId().toString()); info.put("salutation",tenRelation.getRelation()); info.put("phoneNumber",appUser.getMobile());