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 b9c5bdc..16a6852 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 @@ -986,27 +986,6 @@ public class AppApiController { relation.setCreateTime(new Date()); relation.setStatus(2); relation.setRelation(params.get("salutation").toString()); - Map opParams = new HashMap<>(); - opParams.put("operation","editUserContactData"); - opParams.put("accountNumber",globalValue.accountNumber); - opParams.put("passKey", KeysEntity.passKey); - opParams.put("empowerText",KeysEntity.empowerText); - List> dataInfo = new ArrayList<>(); - Map info = new HashMap<>(); - info.put("objectUuid",user.getUserId().toString()); - info.put("userUuid",user.getUserId().toString()); - info.put("salutation",params.get("salutation")); - info.put("phoneNumber",user.getMobile()); - info.put("orderNumber",1); - dataInfo.add(info); - opParams.put("dataInfo",dataInfo); - /* JSONObject jsonObject = opFeignClient.submitData(opParams); - if(!jsonObject.getString("shrgStatus").equals("S")) { - return R.error("同步联系人失败"); - } - if(!jsonObject.getJSONArray("errInfo").isEmpty()) { - return R.error("同步联系人失败"); - }*/ /* 请求参数: { "operation": "editUserContactData", @@ -1038,7 +1017,7 @@ public class AppApiController { @Login @PostMapping("/remove") - public R removeBing(@LoginUser AppUserEntity user, @RequestBody List> params) { + public R removeBind(@LoginUser AppUserEntity user, @RequestBody List> params) { //AppUserScopeEntity userScopeEntity = appUserScopeService.getById(user.getCurrentScopeId()); Map opParams = new HashMap<>(); opParams.put("operation","delUserContactData"); @@ -1047,8 +1026,17 @@ public class AppApiController { opParams.put("empowerText",KeysEntity.empowerText); List> dataInfo = new ArrayList<>(); Map info = new HashMap<>(); - info.put("objectUuid",user.getUserId()); - dataInfo.add(info); + List list = new ArrayList<>(); + params.forEach(item -> { + list.add(item.get("personId").toString()); + }); + List relations = relationService.list(new LambdaQueryWrapper() + .eq(TenRelation::getParentId,user.getUserId()) + .in(TenRelation::getStudentId,list)); + relations.forEach(relation -> { + info.put("objectUuid",relation.getId()); + dataInfo.add(info); + }); opParams.put("dataInfo",dataInfo); JSONObject jsonObject = opFeignClient.submitData(opParams); if(!jsonObject.getString("shrgStatus").equals("S")) { @@ -1057,10 +1045,6 @@ public class AppApiController { if(!jsonObject.getJSONArray("errInfo").isEmpty()) { return R.error("同步联系人失败"); } - List list = new ArrayList<>(); - params.forEach(item -> { - list.add(item.get("personId").toString()); - }); relationService.remove(new LambdaQueryWrapper() .eq(TenRelation::getParentId,user.getUserId()) .in(TenRelation::getStudentId,list)); 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 984e50f..cb35ca6 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.getParentId().toString()); + info.put("objectUuid",tenRelation.getId()); info.put("userUuid",tenRelation.getStudentId().toString()); info.put("salutation",tenRelation.getRelation()); info.put("phoneNumber",appUser.getMobile());