Commit 357611e6 by fudahua

发送小程序消息

parent c2c94f6d
......@@ -10,6 +10,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
/**
* Created 2020/4/9.
*
......@@ -25,6 +27,10 @@ public class TestController extends WebBaseController {
@RequestMapping("/send-message-test")
public HaobanResponse testSendMessage(QywxXcxSendMessageQo qo) {
QywxXcxSendMessageDTO messageDTO = EntityUtil.changeEntityByOrika(QywxXcxSendMessageDTO.class, qo);
ArrayList<String> list = new ArrayList<>();
list.add(qo.getUserId());
messageDTO.setUserIds(list);
boolean b = qywxSuiteApiService.sendMessage("ww9ede832a84b7ae5f",
"ww2c34dc56739bb105", messageDTO);
if (b) {
......
......@@ -12,6 +12,13 @@ public class QywxXcxSendMessageQo implements Serializable {
private String title;
private String description;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getAppid() {
return appid;
......
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