Commit 62cf7313 authored by huagnxiner's avatar huagnxiner

修改头像获取连接代码提交

parent 3319b069
...@@ -564,6 +564,13 @@ public class UserController extends BaseController { ...@@ -564,6 +564,13 @@ public class UserController extends BaseController {
logger.info("******SYNC_TO_CRM_RESULT*******" + updateResult); logger.info("******SYNC_TO_CRM_RESULT*******" + updateResult);
} }
} }
//获取用户的头像
AttachmentListResponse headImgRes = attachmentInterface.queryByResourceIdAndResouceType(String.valueOf(id), "hgs_user_headImg");
String headImgURL=null;
if (null != headImgRes.getObjectList() && !headImgRes.getObjectList().isEmpty()) {
BaseAttachment attachment = (BaseAttachment) headImgRes.getObjectList().get(0);
headImgURL=attachment.getRemotePath();
}
//调用团立方接口,同步修改的数据团立方,修改手机号或者姓名才发送数据 //调用团立方接口,同步修改的数据团立方,修改手机号或者姓名才发送数据
JsonConfig jsonConfig=new JsonConfig(); JsonConfig jsonConfig=new JsonConfig();
jsonConfig.registerDefaultValueProcessor(Integer.class, new DefaultValueProcessor() { jsonConfig.registerDefaultValueProcessor(Integer.class, new DefaultValueProcessor() {
...@@ -583,7 +590,7 @@ public class UserController extends BaseController { ...@@ -583,7 +590,7 @@ public class UserController extends BaseController {
mdto.setAccid(oldEntity.getAccId()); mdto.setAccid(oldEntity.getAccId());
mdto.setName(entity.getRealName()); mdto.setName(entity.getRealName());
mdto.setTel(entity.getMobile()); mdto.setTel(entity.getMobile());
mdto.setAvatar(oldEntity.getHeadImgURL()); mdto.setAvatar(headImgURL);
String messObj = JSONObject.fromObject(mdto,jsonConfig).toString(); String messObj = JSONObject.fromObject(mdto,jsonConfig).toString();
logger.info("******SYNC_TO_TRL*******" + messObj); logger.info("******SYNC_TO_TRL*******" + messObj);
String res = HttpClientUtil.doPostJson(tlfSendMessageUrl, messObj, ""); String res = HttpClientUtil.doPostJson(tlfSendMessageUrl, messObj, "");
......
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