Commit 88983819 by qwmqiuwenmin

fix

parent 0ac46631
...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.out.impl; ...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.out.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.gic.wechat.api.service.qywx.QywxUserApiService; import com.gic.wechat.api.service.qywx.QywxUserApiService;
...@@ -75,6 +76,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -75,6 +76,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}else{ }else{
unionIdJson = qywxUserApiService.getExternalUseridInfo(dto.getCorpid(), dto.getSuiteid(), dto.getExternalUserid()); unionIdJson = qywxUserApiService.getExternalUseridInfo(dto.getCorpid(), dto.getSuiteid(), dto.getExternalUserid());
} }
String userId1 = dto.getWxUserId();
log.info("【新增外部联系人回调】unionIdJson={}",JSON.toJSONString(unionIdJson)); log.info("【新增外部联系人回调】unionIdJson={}",JSON.toJSONString(unionIdJson));
String unionId = ""; String unionId = "";
...@@ -84,17 +86,28 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -84,17 +86,28 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String userId = ""; String userId = "";
if(StringUtils.isNotBlank(unionIdJson)){ if(StringUtils.isNotBlank(unionIdJson)){
JSONObject jo = JSON.parseObject(unionIdJson); JSONObject jo = JSON.parseObject(unionIdJson);
unionId = jo.getString("unionid"); String external_contact = jo.getString("external_contact");
name = jo.getString("name"); if(StringUtils.isNotBlank(external_contact)){
JSONObject jt = JSON.parseObject(external_contact);
unionId = jt.getString("unionid");
name = jt.getString("name");
}
follow_user = jo.getString("follow_user"); follow_user = jo.getString("follow_user");
if(StringUtils.isNotBlank(follow_user)){ if(StringUtils.isNotBlank(follow_user)){
JSONObject j = JSON.parseObject(follow_user); JSONArray j = JSON.parseArray(follow_user);
createTime = j.getString("createtime"); for (Object object : j) {
userId = j.getString("userid"); String followJson = JSON.toJSONString(object);
JSONObject follow = JSON.parseObject(followJson);
userId = follow.getString("userid");
if(userId.equals(userId1)){
createTime = follow.getString("createtime");
}
}
} }
} }
String key = "external" + userId + "_" + name + "_" + createTime; String key = "external" + userId1 + "_" + name + "_" + createTime;
RedisUtil.lock(key,2l); RedisUtil.lock(key,2l);
if(SELF_APP.equals(suiteid)){ if(SELF_APP.equals(suiteid)){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment