|
@@ -621,7 +621,7 @@ public class WeiXinCorpController {
|
|
String sMsg = wxcpt.DecryptMsg(sReqMsgSig, sReqTimeStamp, sReqNonce, requestBody);
|
|
String sMsg = wxcpt.DecryptMsg(sReqMsgSig, sReqTimeStamp, sReqNonce, requestBody);
|
|
// TODO: 解析出明文xml标签的内容进行处理
|
|
// TODO: 解析出明文xml标签的内容进行处理
|
|
org.json.JSONObject jsonObject = XML.toJSONObject(sMsg);
|
|
org.json.JSONObject jsonObject = XML.toJSONObject(sMsg);
|
|
-// log.info("jcommonDevCallbackPost 解密后==son==" + jsonObject.toString());
|
|
|
|
|
|
+ log.info("jcommonDevCallbackPost 解密后==son==" + jsonObject.toString());
|
|
jsonObject = jsonObject.getJSONObject("xml");
|
|
jsonObject = jsonObject.getJSONObject("xml");
|
|
if(jsonObject.has("InfoType")){
|
|
if(jsonObject.has("InfoType")){
|
|
String infoType = jsonObject.getString("InfoType");
|
|
String infoType = jsonObject.getString("InfoType");
|
|
@@ -650,11 +650,12 @@ public class WeiXinCorpController {
|
|
String corpId = jsonObject.getString("AuthCorpId");
|
|
String corpId = jsonObject.getString("AuthCorpId");
|
|
org.json.JSONObject authUserJson = jsonObject.getJSONObject("AccountList");
|
|
org.json.JSONObject authUserJson = jsonObject.getJSONObject("AccountList");
|
|
String authUserId = authUserJson.getString("UserId");
|
|
String authUserId = authUserJson.getString("UserId");
|
|
|
|
+ System.out.println("authUserId="+authUserId);
|
|
User oneUser = userMapper.selectOne(new QueryWrapper<User>().eq("corpwx_userid", authUserId));
|
|
User oneUser = userMapper.selectOne(new QueryWrapper<User>().eq("corpwx_userid", authUserId));
|
|
if (oneUser == null) {
|
|
if (oneUser == null) {
|
|
//生成该用户
|
|
//生成该用户
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectById(corpId);
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectById(corpId);
|
|
- if (wxCorpInfo != null) {
|
|
|
|
|
|
+ if (wxCorpInfo != null && wxCorpInfo.getAuthMode() == 1) {//成员授权模式下,自动激活需要创建用户
|
|
Integer companyId = wxCorpInfo.getCompanyId();
|
|
Integer companyId = wxCorpInfo.getCompanyId();
|
|
if (wxCorpInfo.getSaasSyncContact() == 1) {
|
|
if (wxCorpInfo.getSaasSyncContact() == 1) {
|
|
//先插入表,不然前端用户立马点击进入应用会找不到人,
|
|
//先插入表,不然前端用户立马点击进入应用会找不到人,
|