|
@@ -348,6 +348,7 @@ public class WeiXinCorpController {
|
|
|
String forObject = this.restTemplate.getForObject(getTicketUrl, String.class);
|
|
|
JSONObject json = JSONObject.parseObject(forObject);
|
|
|
log.info("返回:"+json.toJSONString());
|
|
|
+ System.out.println("返回:"+json.toJSONString());
|
|
|
if (json.getIntValue("errcode") == 0) {
|
|
|
String ticket = json.getString("ticket");
|
|
|
Item it = new Item();
|
|
@@ -376,6 +377,8 @@ public class WeiXinCorpController {
|
|
|
packageParams.put("sign", sign);
|
|
|
packageParams.put("appid", wxCorpInfo.getCorpid());//这里使用企业微信corpId
|
|
|
msg.data = packageParams;
|
|
|
+ System.out.println("最后返回:"+packageParams);
|
|
|
+ log.info("最后返回:"+packageParams);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
msg.setError(e.getMessage());
|
|
@@ -1301,7 +1304,7 @@ public class WeiXinCorpController {
|
|
|
JSONArray jsonArray = obj.getJSONObject("auth_info").getJSONArray("agent");
|
|
|
for (int i=0;i<jsonArray.size(); i++) {
|
|
|
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
|
- if (jsonObject.getString("name").equals("客户管家")) {
|
|
|
+ if (jsonObject.getString("name").contains("客户管家")) {
|
|
|
int agentId = jsonObject.getInteger("agentid");
|
|
|
data.setAgentid(agentId);
|
|
|
//授权模式:0为管理员授权;1为成员授权
|
|
@@ -1435,7 +1438,7 @@ public class WeiXinCorpController {
|
|
|
JSONArray jsonArray = obj.getJSONObject("auth_info").getJSONArray("agent");
|
|
|
for (int i=0;i<jsonArray.size(); i++) {
|
|
|
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
|
- if (jsonObject.getString("name").equals("客户管家")) {
|
|
|
+ if (jsonObject.getString("name").contains("客户管家")) {
|
|
|
int agentId = jsonObject.getInteger("agentid");
|
|
|
data.setAgentid(agentId);
|
|
|
}
|