修改只能绑定一个学生的问题
This commit is contained in:
parent
bada89d4c6
commit
21903ff992
|
@ -986,27 +986,6 @@ public class AppApiController {
|
||||||
relation.setCreateTime(new Date());
|
relation.setCreateTime(new Date());
|
||||||
relation.setStatus(2);
|
relation.setStatus(2);
|
||||||
relation.setRelation(params.get("salutation").toString());
|
relation.setRelation(params.get("salutation").toString());
|
||||||
Map<String,Object> opParams = new HashMap<>();
|
|
||||||
opParams.put("operation","editUserContactData");
|
|
||||||
opParams.put("accountNumber",globalValue.accountNumber);
|
|
||||||
opParams.put("passKey", KeysEntity.passKey);
|
|
||||||
opParams.put("empowerText",KeysEntity.empowerText);
|
|
||||||
List<Map<String,Object>> dataInfo = new ArrayList<>();
|
|
||||||
Map<String,Object> 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",
|
"operation": "editUserContactData",
|
||||||
|
@ -1038,7 +1017,7 @@ public class AppApiController {
|
||||||
|
|
||||||
@Login
|
@Login
|
||||||
@PostMapping("/remove")
|
@PostMapping("/remove")
|
||||||
public R removeBing(@LoginUser AppUserEntity user, @RequestBody List<Map<String,Object>> params) {
|
public R removeBind(@LoginUser AppUserEntity user, @RequestBody List<Map<String,Object>> params) {
|
||||||
//AppUserScopeEntity userScopeEntity = appUserScopeService.getById(user.getCurrentScopeId());
|
//AppUserScopeEntity userScopeEntity = appUserScopeService.getById(user.getCurrentScopeId());
|
||||||
Map<String,Object> opParams = new HashMap<>();
|
Map<String,Object> opParams = new HashMap<>();
|
||||||
opParams.put("operation","delUserContactData");
|
opParams.put("operation","delUserContactData");
|
||||||
|
@ -1047,8 +1026,17 @@ public class AppApiController {
|
||||||
opParams.put("empowerText",KeysEntity.empowerText);
|
opParams.put("empowerText",KeysEntity.empowerText);
|
||||||
List<Map<String,Object>> dataInfo = new ArrayList<>();
|
List<Map<String,Object>> dataInfo = new ArrayList<>();
|
||||||
Map<String,Object> info = new HashMap<>();
|
Map<String,Object> info = new HashMap<>();
|
||||||
info.put("objectUuid",user.getUserId());
|
List<String> list = new ArrayList<>();
|
||||||
dataInfo.add(info);
|
params.forEach(item -> {
|
||||||
|
list.add(item.get("personId").toString());
|
||||||
|
});
|
||||||
|
List<TenRelation> relations = relationService.list(new LambdaQueryWrapper<TenRelation>()
|
||||||
|
.eq(TenRelation::getParentId,user.getUserId())
|
||||||
|
.in(TenRelation::getStudentId,list));
|
||||||
|
relations.forEach(relation -> {
|
||||||
|
info.put("objectUuid",relation.getId());
|
||||||
|
dataInfo.add(info);
|
||||||
|
});
|
||||||
opParams.put("dataInfo",dataInfo);
|
opParams.put("dataInfo",dataInfo);
|
||||||
JSONObject jsonObject = opFeignClient.submitData(opParams);
|
JSONObject jsonObject = opFeignClient.submitData(opParams);
|
||||||
if(!jsonObject.getString("shrgStatus").equals("S")) {
|
if(!jsonObject.getString("shrgStatus").equals("S")) {
|
||||||
|
@ -1057,10 +1045,6 @@ public class AppApiController {
|
||||||
if(!jsonObject.getJSONArray("errInfo").isEmpty()) {
|
if(!jsonObject.getJSONArray("errInfo").isEmpty()) {
|
||||||
return R.error("同步联系人失败");
|
return R.error("同步联系人失败");
|
||||||
}
|
}
|
||||||
List<String> list = new ArrayList<>();
|
|
||||||
params.forEach(item -> {
|
|
||||||
list.add(item.get("personId").toString());
|
|
||||||
});
|
|
||||||
relationService.remove(new LambdaQueryWrapper<TenRelation>()
|
relationService.remove(new LambdaQueryWrapper<TenRelation>()
|
||||||
.eq(TenRelation::getParentId,user.getUserId())
|
.eq(TenRelation::getParentId,user.getUserId())
|
||||||
.in(TenRelation::getStudentId,list));
|
.in(TenRelation::getStudentId,list));
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class TenRelationController extends AbstractController {
|
||||||
opParams.put("empowerText",KeysEntity.empowerText);
|
opParams.put("empowerText",KeysEntity.empowerText);
|
||||||
List<Map<String,Object>> dataInfo = new ArrayList<>();
|
List<Map<String,Object>> dataInfo = new ArrayList<>();
|
||||||
Map<String,Object> info = new HashMap<>();
|
Map<String,Object> info = new HashMap<>();
|
||||||
info.put("objectUuid",tenRelation.getParentId().toString());
|
info.put("objectUuid",tenRelation.getId());
|
||||||
info.put("userUuid",tenRelation.getStudentId().toString());
|
info.put("userUuid",tenRelation.getStudentId().toString());
|
||||||
info.put("salutation",tenRelation.getRelation());
|
info.put("salutation",tenRelation.getRelation());
|
||||||
info.put("phoneNumber",appUser.getMobile());
|
info.put("phoneNumber",appUser.getMobile());
|
||||||
|
|
Loading…
Reference in New Issue