Commit 88983819 by qwmqiuwenmin

fix

parent 0ac46631
......@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.out.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
......@@ -75,6 +76,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}else{
unionIdJson = qywxUserApiService.getExternalUseridInfo(dto.getCorpid(), dto.getSuiteid(), dto.getExternalUserid());
}
String userId1 = dto.getWxUserId();
log.info("【新增外部联系人回调】unionIdJson={}",JSON.toJSONString(unionIdJson));
String unionId = "";
......@@ -84,17 +86,28 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String userId = "";
if(StringUtils.isNotBlank(unionIdJson)){
JSONObject jo = JSON.parseObject(unionIdJson);
unionId = jo.getString("unionid");
name = jo.getString("name");
String external_contact = jo.getString("external_contact");
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");
if(StringUtils.isNotBlank(follow_user)){
JSONObject j = JSON.parseObject(follow_user);
createTime = j.getString("createtime");
userId = j.getString("userid");
JSONArray j = JSON.parseArray(follow_user);
for (Object object : j) {
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);
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