主要完善了注释
This commit is contained in:
parent
8c1e1719fa
commit
f47bba49d1
@ -3,7 +3,7 @@ weixin4j
|
|||||||
|
|
||||||
微信开发工具包
|
微信开发工具包
|
||||||
-------------
|
-------------
|
||||||
> `weixin4j`是一个用java编写针对微信开发的工具包,包含[weixin4j-mp](./weixin4j-mp)(微信公众平台API)、[weixin4j-qy](./weixin4j-qy)(微信企业号API)以及[weixin4j-server](./weixin4j-server)(微信回调消息服务器)三个工程.
|
> `weixin4j`是一个用Java编写针对微信开发的工具包,包含[weixin4j-mp](./weixin4j-mp)(微信公众平台API)、[weixin4j-qy](./weixin4j-qy)(微信企业号API)以及[weixin4j-server](./weixin4j-server)(微信回调消息服务器)三个工程.
|
||||||
|
|
||||||
模块说明
|
模块说明
|
||||||
-------
|
-------
|
||||||
@ -35,8 +35,6 @@ weixin4j
|
|||||||
|
|
||||||
接下来
|
接下来
|
||||||
------
|
------
|
||||||
* [公众号第三方服务应用](https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419318292&token=&lang=zh_CN)
|
|
||||||
|
|
||||||
* [微信硬件平台](http://iot.weixin.qq.com/)
|
* [微信硬件平台](http://iot.weixin.qq.com/)
|
||||||
|
|
||||||
* [微信小店](http://mp.weixin.qq.com/wiki/6/ae98ac4a7219405153cedc9dddccacca.html)
|
* [微信小店](http://mp.weixin.qq.com/wiki/6/ae98ac4a7219405153cedc9dddccacca.html)
|
||||||
|
|||||||
@ -155,7 +155,7 @@ public class WeixinProxy {
|
|||||||
* 第三方组件(永久刷新令牌机制)
|
* 第三方组件(永久刷新令牌机制)
|
||||||
*
|
*
|
||||||
* @param perTicketManager
|
* @param perTicketManager
|
||||||
* 第三方组件永久刷新令牌
|
* 第三方组件永久刷新token
|
||||||
* {@link com.foxinmy.weixin4j.mp.api.ComponentApi#getPerCodeManager(String)}
|
* {@link com.foxinmy.weixin4j.mp.api.ComponentApi#getPerCodeManager(String)}
|
||||||
* @param componentTokenManager
|
* @param componentTokenManager
|
||||||
* 第三方组件凭证token
|
* 第三方组件凭证token
|
||||||
|
|||||||
@ -26,9 +26,9 @@ public class WeixinMpAccount extends WeixinAccount {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param appId
|
* @param appId
|
||||||
* 应用组件ID 必填
|
* 应用ID 使用普通接口(WeixinProxy对象)必须填写
|
||||||
* @param appSecret
|
* @param appSecret
|
||||||
* 应用组件密钥 使用普通接口(WeixinProxy对象)必须填写
|
* 应用密钥 使用普通接口(WeixinProxy对象)必须填写
|
||||||
* @param components
|
* @param components
|
||||||
* 应用组件集合 使用套件接口(WeixinComponentProxy#ComponentApi)必须填写
|
* 应用组件集合 使用套件接口(WeixinComponentProxy#ComponentApi)必须填写
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -207,7 +207,7 @@ public class WeixinProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送客服消息(需要管理员对应用有使用权限,对收件人touser、toparty、totag有查看权限,否则本次调用失败)
|
* 发送消息提醒(需要管理员对应用有使用权限,对收件人touser、toparty、totag有查看权限,否则本次调用失败)
|
||||||
* <p>
|
* <p>
|
||||||
* 1) 发送人员列表存在错误的userid:执行发送,开发者需注意返回结果说明</br>
|
* 1) 发送人员列表存在错误的userid:执行发送,开发者需注意返回结果说明</br>
|
||||||
* 2)发送人员不在通讯录权限范围内:不执行发送任务,返回首个出错的userid</br>
|
* 2)发送人员不在通讯录权限范围内:不执行发送任务,返回首个出错的userid</br>
|
||||||
@ -215,7 +215,7 @@ public class WeixinProxy {
|
|||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param message
|
* @param message
|
||||||
* 客服消息对象
|
* 消息对象
|
||||||
* @return 如果对应用或收件人、部门、标签任何一个无权限,则本次发送失败;如果收件人、部门或标签不存在,发送仍然执行,但返回无效的部分
|
* @return 如果对应用或收件人、部门、标签任何一个无权限,则本次发送失败;如果收件人、部门或标签不存在,发送仍然执行,但返回无效的部分
|
||||||
* </br> { "errcode": 0, "errmsg": "ok", "invaliduser": "UserID1",
|
* </br> { "errcode": 0, "errmsg": "ok", "invaliduser": "UserID1",
|
||||||
* "invalidparty":"PartyID1", "invalidtag":"TagID1" }
|
* "invalidparty":"PartyID1", "invalidtag":"TagID1" }
|
||||||
@ -245,7 +245,7 @@ public class WeixinProxy {
|
|||||||
* 发送客服消息
|
* 发送客服消息
|
||||||
*
|
*
|
||||||
* @param message
|
* @param message
|
||||||
* 客服消息对象
|
* 消息对象
|
||||||
* @return 发送结果
|
* @return 发送结果
|
||||||
* @see <a href=
|
* @see <a href=
|
||||||
* "http://qydev.weixin.qq.com/wiki/index.php?title=%E4%BC%81%E4%B8%9A%E5%AE%A2%E6%9C%8D%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E">
|
* "http://qydev.weixin.qq.com/wiki/index.php?title=%E4%BC%81%E4%B8%9A%E5%AE%A2%E6%9C%8D%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E">
|
||||||
|
|||||||
@ -47,7 +47,7 @@ public class NotifyApi extends QyApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送消息(需要管理员对应用有使用权限,对收件人touser、toparty、totag有查看权限,否则本次调用失败)
|
* 发送消息提醒(需要管理员对应用有使用权限,对收件人touser、toparty、totag有查看权限,否则本次调用失败)
|
||||||
* <p>
|
* <p>
|
||||||
* 1) 发送人员列表存在错误的userid:执行发送,开发者需注意返回结果说明</br>
|
* 1) 发送人员列表存在错误的userid:执行发送,开发者需注意返回结果说明</br>
|
||||||
* 2)发送人员不在通讯录权限范围内:不执行发送任务,返回首个出错的userid</br>
|
* 2)发送人员不在通讯录权限范围内:不执行发送任务,返回首个出错的userid</br>
|
||||||
@ -55,7 +55,7 @@ public class NotifyApi extends QyApi {
|
|||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param message
|
* @param message
|
||||||
* 普通消息对象
|
* 消息对象
|
||||||
* @return 如果无权限,则本次发送失败;如果收件人不存在或未关注,发送仍然执行。两种情况下均返回无效的部分</br> { "errcode":
|
* @return 如果无权限,则本次发送失败;如果收件人不存在或未关注,发送仍然执行。两种情况下均返回无效的部分</br> { "errcode":
|
||||||
* 0, "errmsg": "ok", "invaliduser": "UserID1",
|
* 0, "errmsg": "ok", "invaliduser": "UserID1",
|
||||||
* "invalidparty":"PartyID1", "invalidtag":"TagID1" }
|
* "invalidparty":"PartyID1", "invalidtag":"TagID1" }
|
||||||
@ -126,7 +126,7 @@ public class NotifyApi extends QyApi {
|
|||||||
* 发送客服消息
|
* 发送客服消息
|
||||||
*
|
*
|
||||||
* @param message
|
* @param message
|
||||||
* 客服消息对象
|
* 消息对象
|
||||||
* @return 发送结果
|
* @return 发送结果
|
||||||
* @see <a
|
* @see <a
|
||||||
* href="http://qydev.weixin.qq.com/wiki/index.php?title=%E4%BC%81%E4%B8%9A%E5%AE%A2%E6%9C%8D%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E">客服接口说明</a>
|
* href="http://qydev.weixin.qq.com/wiki/index.php?title=%E4%BC%81%E4%B8%9A%E5%AE%A2%E6%9C%8D%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E">客服接口说明</a>
|
||||||
|
|||||||
@ -20,8 +20,8 @@ import com.foxinmy.weixin4j.tuple.NotifyTuple;
|
|||||||
* @see com.foxinmy.weixin4j.tuple.File
|
* @see com.foxinmy.weixin4j.tuple.File
|
||||||
* @see com.foxinmy.weixin4j.tuple.News
|
* @see com.foxinmy.weixin4j.tuple.News
|
||||||
* @see com.foxinmy.weixin4j.tuple.MpNews
|
* @see com.foxinmy.weixin4j.tuple.MpNews
|
||||||
* @see <a
|
* @see <a href=
|
||||||
* href="http://qydev.weixin.qq.com/wiki/index.php?title=%E6%B6%88%E6%81%AF%E7%B1%BB%E5%9E%8B%E5%8F%8A%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F">消息说明</a>
|
* "http://qydev.weixin.qq.com/wiki/index.php?title=%E6%B6%88%E6%81%AF%E7%B1%BB%E5%9E%8B%E5%8F%8A%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F">消息说明</a>
|
||||||
*/
|
*/
|
||||||
public class NotifyMessage implements Serializable {
|
public class NotifyMessage implements Serializable {
|
||||||
|
|
||||||
@ -51,22 +51,13 @@ public class NotifyMessage implements Serializable {
|
|||||||
this(agentid, tuple, new IdParameter(), false);
|
this(agentid, tuple, new IdParameter(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public NotifyMessage(int agentId, NotifyTuple tuple, IdParameter target,
|
public NotifyMessage(int agentId, NotifyTuple tuple, IdParameter target, boolean isSafe) {
|
||||||
boolean isSafe) {
|
|
||||||
this.agentId = agentId;
|
this.agentId = agentId;
|
||||||
this.safe = isSafe ? 1 : 0;
|
this.safe = isSafe ? 1 : 0;
|
||||||
this.tuple = tuple;
|
this.tuple = tuple;
|
||||||
this.target = target;
|
this.target = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSafe() {
|
|
||||||
return safe;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSafe(boolean isSafe) {
|
|
||||||
this.safe = isSafe ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getAgentId() {
|
public int getAgentId() {
|
||||||
return agentId;
|
return agentId;
|
||||||
}
|
}
|
||||||
@ -79,9 +70,20 @@ public class NotifyMessage implements Serializable {
|
|||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setTarget(IdParameter target) {
|
||||||
|
this.target = target;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSafe() {
|
||||||
|
return safe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSafe(boolean isSafe) {
|
||||||
|
this.safe = isSafe ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "NotifyMessage [agentId=" + agentId + ", safe=" + safe
|
return "NotifyMessage [agentId=" + agentId + ", safe=" + safe + ", tuple=" + tuple + ", target=" + target + "]";
|
||||||
+ ", tuple=" + tuple + ", target=" + target + "]";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ public class WeixinQyAccount extends WeixinAccount {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param corpid
|
* @param corpid
|
||||||
* 企业ID 必填
|
* 企业ID 使用普通接口(WeixinProxy对象)必须填写
|
||||||
* @param corpsecret
|
* @param corpsecret
|
||||||
* 管理组的凭证密钥 使用普通接口(WeixinProxy对象)必须填写
|
* 管理组的凭证密钥 使用普通接口(WeixinProxy对象)必须填写
|
||||||
* @param suites
|
* @param suites
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user