|
@@ -3,18 +3,26 @@ import com.platform.yijia.utils.weixinapp.WxPushUtil;
|
|
import me.chanjar.weixin.mp.bean.template.WxMpTemplateData;
|
|
import me.chanjar.weixin.mp.bean.template.WxMpTemplateData;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
+import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
class YijiaApplicationTests {
|
|
class YijiaApplicationTests {
|
|
|
|
|
|
// public static void main(String[] args) {
|
|
// public static void main(String[] args) {
|
|
// WxPushUtil wxPushUtil = new WxPushUtil();
|
|
// WxPushUtil wxPushUtil = new WxPushUtil();
|
|
-// String appId ="";
|
|
|
|
-// String appSecret ="";
|
|
|
|
-// String templateId ="";
|
|
|
|
-// String openId ="";
|
|
|
|
-// List<WxMpTemplateData> wxMpTemplateDataList = new ArrayList<>();
|
|
|
|
-// wxPushUtil.push(appId, appSecret, templateId, openId, wxMpTemplateDataList);
|
|
|
|
|
|
+// String appId ="wxc8189d3b3a7283e0";
|
|
|
|
+// String appSecret ="3f18fc7e4b02de2f8a14f55b55ab6245";
|
|
|
|
+// String templateId ="CPZ8l9FyIA30jq0rkm5uCozySSVwFO6gOvnFSWvCSrI";
|
|
|
|
+// String openId ="oJR5R6r4EJhaORFcPap70r_mtFZo";
|
|
|
|
+// List<WxMpTemplateData> wxMpTemplate = new ArrayList<>();
|
|
|
|
+// wxMpTemplate.add(new WxMpTemplateData("first","李先生,您好!您的本次消费明细如下:", "#363636"));
|
|
|
|
+// wxMpTemplate.add(new WxMpTemplateData("keyword1", "宁欣门店1", "#1C1C1C"));
|
|
|
|
+// wxMpTemplate.add(new WxMpTemplateData("keyword2", "2个", "#0000CD"));
|
|
|
|
+// wxMpTemplate.add(new WxMpTemplateData("keyword3", "168.8元", "#0000CD"));
|
|
|
|
+// wxMpTemplate.add(new WxMpTemplateData("keyword4", new Date().toString(), "#0000CD"));
|
|
|
|
+// wxMpTemplate.add(new WxMpTemplateData("keyword5", "2014120900189", "#0000CD"));
|
|
|
|
+// wxMpTemplate.add(new WxMpTemplateData("remark", "欢迎您再次光临!", "#0000CD"));
|
|
|
|
+// wxPushUtil.push(appId, appSecret, templateId, openId, wxMpTemplate);
|
|
// }
|
|
// }
|
|
|
|
|
|
}
|
|
}
|