Codota Logo
WxMaTemplateMessage
Code IndexAdd Codota to your IDE (free)

How to use
WxMaTemplateMessage
in
cn.binarywang.wx.miniapp.bean

Best Java code snippets using cn.binarywang.wx.miniapp.bean.WxMaTemplateMessage (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: linlinjava/litemall

private void sendMsg(String touser, String templatId, String[] parms, String page, String color, String emphasisKeyword) {
  LitemallUserFormid userFormid = formIdService.queryByOpenId(touser);
  if (userFormid == null)
    return;
  WxMaTemplateMessage msg = new WxMaTemplateMessage();
  msg.setTemplateId(templatId);
  msg.setToUser(touser);
  msg.setFormId(userFormid.getFormid());
  msg.setPage(page);
  msg.setColor(color);
  msg.setEmphasisKeyword(emphasisKeyword);
  msg.setData(createMsgData(parms));
  try {
    wxMaService.getMsgService().sendTemplateMsg(msg);
    if (formIdService.updateUserFormId(userFormid) == 0) {
      logger.warn("更新数据已失效");
    }
  } catch (Exception e) {
    e.printStackTrace();
  }
}
origin: com.github.binarywang/weixin-java-miniapp

@Override
public JsonElement serialize(WxMaTemplateMessage message, Type typeOfSrc, JsonSerializationContext context) {
 JsonObject messageJson = new JsonObject();
 messageJson.addProperty("touser", message.getToUser());
 messageJson.addProperty("template_id", message.getTemplateId());
 if (message.getPage() != null) {
  messageJson.addProperty("page", message.getPage());
 if (message.getFormId() != null) {
  messageJson.addProperty("form_id", message.getFormId());
 if (message.getColor() != null) {
  messageJson.addProperty("color", message.getColor());
 if (message.getEmphasisKeyword() != null) {
  messageJson.addProperty("emphasis_keyword", message.getEmphasisKeyword());
 messageJson.add("data", data);
 if (message.getData() == null) {
  return messageJson;
 for (WxMaTemplateData datum : message.getData()) {
  JsonObject dataJson = new JsonObject();
  dataJson.addProperty("value", datum.getValue());
origin: binarywang/WxJava

@Override
public JsonElement serialize(WxMaTemplateMessage message, Type typeOfSrc, JsonSerializationContext context) {
 JsonObject messageJson = new JsonObject();
 messageJson.addProperty("touser", message.getToUser());
 messageJson.addProperty("template_id", message.getTemplateId());
 if (message.getPage() != null) {
  messageJson.addProperty("page", message.getPage());
 if (message.getFormId() != null) {
  messageJson.addProperty("form_id", message.getFormId());
 if (message.getColor() != null) {
  messageJson.addProperty("color", message.getColor());
 if (message.getEmphasisKeyword() != null) {
  messageJson.addProperty("emphasis_keyword", message.getEmphasisKeyword());
 messageJson.add("data", data);
 if (message.getData() == null) {
  return messageJson;
 for (WxMaTemplateData datum : message.getData()) {
  JsonObject dataJson = new JsonObject();
  dataJson.addProperty("value", datum.getValue());
cn.binarywang.wx.miniapp.beanWxMaTemplateMessage

Javadoc

模板消息. 参考 https://mp.weixin.qq.com/debug/wxadoc/dev/api/notice.html#接口说明 模板消息部分

Most used methods

  • <init>
  • getColor
  • getData
  • getEmphasisKeyword
  • getFormId
  • getPage
  • getTemplateId
  • getToUser
  • setColor
  • setData
  • setEmphasisKeyword
  • setFormId
  • setEmphasisKeyword,
  • setFormId,
  • setPage,
  • setTemplateId,
  • setToUser,
  • toJson

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now