修改绑定学生无法删除问题
This commit is contained in:
parent
21903ff992
commit
04999c2708
|
@ -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);
|
||||
|
|
|
@ -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<String,Object> info = new HashMap<>();
|
||||
params.forEach(item -> {
|
||||
TenParent tenParent = tenParentService.getById(item.get("id"));
|
||||
info.put("objectUuid",tenParent.getUserId().toString());
|
||||
List<TenRelation> relations = relationService.list(new LambdaQueryWrapper<TenRelation>().eq(TenRelation::getParentId,tenParent.getUserId()));
|
||||
List<Long> 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());
|
||||
|
|
|
@ -72,7 +72,7 @@ public class TenRelationController extends AbstractController {
|
|||
opParams.put("empowerText",KeysEntity.empowerText);
|
||||
List<Map<String,Object>> dataInfo = new ArrayList<>();
|
||||
Map<String,Object> 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());
|
||||
|
|
Loading…
Reference in New Issue