|
@@ -1,60 +1,80 @@
|
|
|
-package com.ydd.app;
|
|
|
-
|
|
|
-import com.ydd.AppApplication;
|
|
|
-import com.ydd.app.service.ApiStatisticsService;
|
|
|
-import com.ydd.app.service.ApiWaimaiPrintService;
|
|
|
-import com.ydd.module.domain.WaimaiOrder;
|
|
|
-import com.ydd.module.push.MessagePushService;
|
|
|
-import com.ydd.module.service.IOrderPushMessageService;
|
|
|
-import com.ydd.module.service.IWaimaiOrderService;
|
|
|
-import org.apache.commons.collections4.CollectionUtils;
|
|
|
-import org.junit.runner.RunWith;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.boot.test.context.SpringBootTest;
|
|
|
-import org.springframework.test.context.junit4.SpringRunner;
|
|
|
-
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-@RunWith(SpringRunner.class)
|
|
|
-@SpringBootTest(classes = AppApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
|
|
-public class Test {
|
|
|
- @Autowired
|
|
|
- private IWaimaiOrderService iWaimaiOrderService;
|
|
|
- @Autowired
|
|
|
- private MessagePushService messagePushService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private IOrderPushMessageService iOrderPushMessageService;
|
|
|
- @Autowired
|
|
|
- private ApiStatisticsService apiStatisticsService;
|
|
|
- @Autowired
|
|
|
- private ApiWaimaiPrintService apiWaimaiPrintService;
|
|
|
-
|
|
|
-//
|
|
|
- public void test(){
|
|
|
- String title = "您有一个订单5分钟内没有骑手接单,请及时关注";
|
|
|
- String content = "您有一个订单5分钟内没有骑手接单,请及时关注";
|
|
|
- List<WaimaiOrder> list = iWaimaiOrderService.queryTimeOutFiveOrder();
|
|
|
- if (CollectionUtils.isNotEmpty(list)) {
|
|
|
- for (WaimaiOrder waimaiOrder : list) {
|
|
|
- messagePushService.riderMissedOrderMessage(waimaiOrder, title, content);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @org.junit.Test
|
|
|
- public void testtj(){
|
|
|
- System.out.println(apiStatisticsService.shop(185l,164l,3,null,null));
|
|
|
- }
|
|
|
-
|
|
|
- @org.junit.Test
|
|
|
- public void testPrint(){
|
|
|
-// ResObject res = elemeClient.getNonReachedOMessages("06143463292980a8ec66c0a2000102b5",77457529);
|
|
|
-// System.out.println(JSONObject.toJSONString(res));
|
|
|
- // elemeAuthClient.doRefreshToken("c54df9d9bcc3d605417111aea02f2e48");
|
|
|
-
|
|
|
- apiWaimaiPrintService.printTestWaimai("50005126", 1358L, "");
|
|
|
- }
|
|
|
-
|
|
|
-}
|
|
|
+//package com.ydd.app;
|
|
|
+//
|
|
|
+//import com.alibaba.fastjson.JSON;
|
|
|
+//import com.alibaba.fastjson.JSONArray;
|
|
|
+//import com.alibaba.fastjson.JSONObject;
|
|
|
+//import com.ydd.AppApplication;
|
|
|
+//import com.ydd.app.service.ApiStatisticsService;
|
|
|
+//import com.ydd.app.service.ApiWaimaiPrintService;
|
|
|
+//import com.ydd.module.domain.WaimaiOrder;
|
|
|
+//import com.ydd.module.push.MessagePushService;
|
|
|
+//import com.ydd.module.service.IOrderPushMessageService;
|
|
|
+//import com.ydd.module.service.IWaimaiOrderService;
|
|
|
+//import com.ydd.third.common.vo.ResObject;
|
|
|
+//import com.ydd.third.delivery.meituan.MeituanSgClient;
|
|
|
+//import com.ydd.third.delivery.vo.order.OrderVo;
|
|
|
+//import com.ydd.third.waimai.eleme.ElemeAuthClient;
|
|
|
+//import com.ydd.third.waimai.eleme.ElemeClient;
|
|
|
+//import org.apache.commons.collections4.CollectionUtils;
|
|
|
+//import org.junit.runner.RunWith;
|
|
|
+//import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+//import org.springframework.boot.test.context.SpringBootTest;
|
|
|
+//import org.springframework.test.context.junit4.SpringRunner;
|
|
|
+//
|
|
|
+//import javax.annotation.Resource;
|
|
|
+//import java.util.List;
|
|
|
+//import java.util.regex.Matcher;
|
|
|
+//import java.util.regex.Pattern;
|
|
|
+//
|
|
|
+//@RunWith(SpringRunner.class)
|
|
|
+//@SpringBootTest(classes = AppApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
|
|
+//public class Test {
|
|
|
+// @Autowired
|
|
|
+// private IWaimaiOrderService iWaimaiOrderService;
|
|
|
+// @Autowired
|
|
|
+// private MessagePushService messagePushService;
|
|
|
+//
|
|
|
+// @Autowired
|
|
|
+// private IOrderPushMessageService iOrderPushMessageService;
|
|
|
+// @Autowired
|
|
|
+// private ApiStatisticsService apiStatisticsService;
|
|
|
+// @Autowired
|
|
|
+// private ApiWaimaiPrintService apiWaimaiPrintService;
|
|
|
+// @Resource
|
|
|
+// private ElemeAuthClient elemeAuthClient;
|
|
|
+// @Resource
|
|
|
+// private ElemeClient elemeClient;
|
|
|
+// @Resource
|
|
|
+// private MeituanSgClient meituanSgClient;
|
|
|
+////
|
|
|
+// public void test(){
|
|
|
+// String title = "您有一个订单5分钟内没有骑手接单,请及时关注";
|
|
|
+// String content = "您有一个订单5分钟内没有骑手接单,请及时关注";
|
|
|
+// List<WaimaiOrder> list = iWaimaiOrderService.queryTimeOutFiveOrder();
|
|
|
+// if (CollectionUtils.isNotEmpty(list)) {
|
|
|
+// for (WaimaiOrder waimaiOrder : list) {
|
|
|
+// messagePushService.riderMissedOrderMessage(waimaiOrder, title, content);
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// @org.junit.Test
|
|
|
+// public void testtj(){
|
|
|
+// System.out.println(apiStatisticsService.shop(185l,164l,3,null,null));
|
|
|
+// }
|
|
|
+//
|
|
|
+// @org.junit.Test
|
|
|
+// public void testPrint(){
|
|
|
+//// ResObject res = elemeClient.getNonReachedOMessages("06143463292980a8ec66c0a2000102b5",77457529);
|
|
|
+//// System.out.println(JSONObject.toJSONString(res));
|
|
|
+// // elemeAuthClient.doRefreshToken("c54df9d9bcc3d605417111aea02f2e48");
|
|
|
+//
|
|
|
+// //apiWaimaiPrintService.printTestWaimai("50005126", 342514L,"4377979561300340297");.
|
|
|
+// OrderVo orderVo = new OrderVo();
|
|
|
+// orderVo.setZbToken("token_lt5wP20-mAgj4JUczj1ErQ");
|
|
|
+// orderVo.setOrderingSourceNo("56835752520387746");
|
|
|
+// meituanSgClient.zhongBaoFee(orderVo);
|
|
|
+// }
|
|
|
+//
|
|
|
+//}
|