|
@@ -1,51 +1,20 @@
|
|
|
package com.palatform.yijia;
|
|
|
+import com.platform.yijia.utils.weixinapp.WxPushUtil;
|
|
|
+import me.chanjar.weixin.mp.bean.template.WxMpTemplateData;
|
|
|
|
|
|
-import com.platform.yijia.pojo.PayOrder;
|
|
|
-import com.platform.yijia.service.PayOrderService;
|
|
|
-import com.platform.yijia.utils.FeiEPrinterUtil;
|
|
|
-import org.junit.jupiter.api.Test;
|
|
|
-import org.springframework.boot.test.context.SpringBootTest;
|
|
|
-
|
|
|
-import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
-@SpringBootTest
|
|
|
class YijiaApplicationTests {
|
|
|
|
|
|
-// @Resource
|
|
|
-// private PayOrderService payOrderService;
|
|
|
- @Test
|
|
|
- public void contextLoads() {
|
|
|
-// String ordNo = "2546627325194192730676";
|
|
|
-// List<PayOrder> list = payOrderService.getPayOrderList(ordNo);
|
|
|
-// //logger.info("根据订单号,查询订单"+gson.toJson(list));
|
|
|
-// String sn = "921611605"; //测试打印机 sn:921611605 key:72338zma
|
|
|
-// String content;
|
|
|
-// if (list != null && list.size() == 1) {
|
|
|
-// content = "<CB>支付小票--商户联</CB><BR>";
|
|
|
-// //content += "--------------------------------<BR>";
|
|
|
-// content += "订单号:" + list.get(0).getOrderNo() + " <BR>";
|
|
|
-// content += "时间:" + list.get(0).getCreatedDate().toString() + "<BR>";
|
|
|
-// content += "油站:" + list.get(0).getStationName() + " 元<BR>";
|
|
|
-// content += "油品: " + list.get(0).getOilName() + " 元<BR>";
|
|
|
-// content += "油量: " + list.get(0).getOrderLiters() + " 升<BR>";
|
|
|
-// content += "单价: " + list.get(0).getOilPirce() + " L/元<BR>";
|
|
|
-// content += "金额: " + list.get(0).getReceivableAmt().toString() + " 元<BR>";
|
|
|
-// content += "优惠: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
-// content += "支付: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
-// content += "--------------------------------<BR>";
|
|
|
-// content = "<CB>支付小票--顾客联</CB><BR>";
|
|
|
-// //content += "--------------------------------<BR>";
|
|
|
-// content += "订单号:" + list.get(0).getOrderNo() + " <BR>";
|
|
|
-// content += "时间:" + list.get(0).getCreatedDate().toString() + "<BR>";
|
|
|
-// content += "油站:" + list.get(0).getStationName() + " 元<BR>";
|
|
|
-// content += "油品: " + list.get(0).getOilName() + " 元<BR>";
|
|
|
-// content += "油量: " + list.get(0).getOrderLiters() + " 升<BR>";
|
|
|
-// content += "单价: " + list.get(0).getOilPirce() + " L/元<BR>";
|
|
|
-// content += "金额: " + list.get(0).getReceivableAmt().toString() + " 元<BR>";
|
|
|
-// content += "优惠: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
-// content += "支付: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
-// FeiEPrinterUtil.printReceipt(sn, content);
|
|
|
- // }
|
|
|
- }
|
|
|
+// public static void main(String[] args) {
|
|
|
+// WxPushUtil wxPushUtil = new WxPushUtil();
|
|
|
+// String appId ="";
|
|
|
+// String appSecret ="";
|
|
|
+// String templateId ="";
|
|
|
+// String openId ="";
|
|
|
+// List<WxMpTemplateData> wxMpTemplateDataList = new ArrayList<>();
|
|
|
+// wxPushUtil.push(appId, appSecret, templateId, openId, wxMpTemplateDataList);
|
|
|
+// }
|
|
|
+
|
|
|
}
|