Commit f4a28a00 by 墨竹

Merge remote-tracking branch 'origin/developer' into developer

parents 97961998 db5c6aea
......@@ -12,27 +12,35 @@ public class WxEnterpriseQwDTO implements Serializable {
private String corpid;
// 好办 助手
private String dkCorpid;
private String dkSuiteId ;
// 会员小程序dk
private String memberCorpid;
private String memberSuiteId ;
// 第三方
private String thirdCorpid;
// 自建
private String selfCorpid;
public String getDkSuiteId() {
return dkSuiteId;
}
public int getWxSecurityType() {
return wxSecurityType;
public String getMemberSuiteId() {
return memberSuiteId;
}
public void setWxSecurityType(int wxSecurityType) {
this.wxSecurityType = wxSecurityType;
public void setDkSuiteId(String dkSuiteId) {
this.dkSuiteId = dkSuiteId;
}
public String getSelfCorpid() {
return selfCorpid;
public void setMemberSuiteId(String memberSuiteId) {
this.memberSuiteId = memberSuiteId;
}
public void setSelfCorpid(String selfCorpid) {
this.selfCorpid = selfCorpid;
public int getWxSecurityType() {
return wxSecurityType;
}
public void setWxSecurityType(int wxSecurityType) {
this.wxSecurityType = wxSecurityType;
}
public String getWxEnterpriseId() {
......
......@@ -76,13 +76,13 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
qw.setThirdCorpid(app.getCorpid());
}else if(appType.equals(3)) {
qw.setDkCorpid(app.getCorpid());
qw.setDkSuiteId(app.getSiteId());
}else if(appType.equals(4)) {
qw.setMemberCorpid(app.getCorpid());
qw.setMemberSuiteId(app.getSiteId());
}
});
}
qw.setSelfCorpid(wxEnterprise.getCorpid());
logger.info("企微所有corpid信息={}",JSON.toJSON(qw));
return qw;
}
......
......@@ -323,8 +323,10 @@ public class StaffApiServiceImpl implements StaffApiService {
user = qywxUserApiService.getWorkWxUser(corpid, config.getWxSuiteid(), userId);
logger.info("成员详情(第三方)={}",JSON.toJSONString(user)) ;
UserDTO userSelf = qywxUserApiService.getSelfWorkWxUser(wxInfo.getDkCorpid(), secretSetting.getSecretVal(), user.getOpen_userid());
logger.info("成员详情(代开)={}",JSON.toJSONString(user)) ;
if (user != null && userSelf != null) {
user.setName(userSelf.getName());
user.setPosition(userSelf.getPosition());
}
} else {
user = qywxUserApiService.getSelfWorkWxUser(corpid, secretSetting.getSecretVal(), userId);
......@@ -351,6 +353,10 @@ public class StaffApiServiceImpl implements StaffApiService {
}
staff = (staff == null ? new TabHaobanStaff() : staff);
staff.setWxUserId(userId);
String openUserid = getOpenUserid(userId, corpid);
if (StringUtils.isNotBlank(openUserid)) {
staff.setWxOpenUseId(openUserid);
}
staff.setUpdateTime(new Date());
staff.setStatusFlag(1);
staff.setWxEnterpriseId(wxEnterpriseId);
......@@ -374,10 +380,6 @@ public class StaffApiServiceImpl implements StaffApiService {
if (StringUtils.isNotBlank(qr_code)) {
staff.setQrCode(qr_code);
}
String openUserid = getOpenUserid(userId, corpid);
if (StringUtils.isNotBlank(openUserid)) {
staff.setWxOpenUseId(openUserid);
}
//成员更改或更新
if (StringUtils.isBlank(staff.getStaffId())) {
logger.info("新增成员");
......
......@@ -175,10 +175,10 @@ public class QywxDeptSyncOperation implements BaseSyncOperation {
WxEnterpriseQwDTO wxInfo = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
if(wxInfo.getWxSecurityType()==4) {
list = this.qywxUserApiService.listDepartmentUser(wxEnterpriseDTO.getCorpid(), config.getWxSuiteid(), dataId, 1) ;
logger.info("通讯录(第三方)={}",JSON.toJSONString(list)) ;
logger.info("从(第三方)获取通讯录={}",JSON.toJSONString(list)) ;
}else {
list = this.qywxUserApiService.listSelfDepartmentUser(wxEnterpriseDTO.getCorpid(), secretSetting.getSecretVal(), dataId, 1);
logger.info("通讯录(代开)={}",JSON.toJSONString(list)) ;
logger.info("从(代开)获取通讯录={}",JSON.toJSONString(list)) ;
}
if (null == list) {
logger.info("微信获取部门成员异常:{},{}", taskId, dataId);
......
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