@Test public void testbatchRegardTest() { CaringRequest caringRequest = new CaringRequest(); caringRequest.setCaringperson("我是客服"); caringRequest.setCaringType("28"); caringRequest.setContent("我是短信内容"); caringRequest.setCustomerno("用户昵称"); caringRequest.setDpId("654321"); caringRequest.setGatewayId(1L); caringRequest.setOids(new String[] {"999999"}); caringRequest.setTids(new String[] {"123456"}); System.out.println(JackSonMapper.toCJsonString(caringRequest)); DefaultRequestBuilder requestBuilder = MockMvcRequestBuilders.post("/batch/regard"); requestBuilder.characterEncoding("UTF-8"); requestBuilder.body( JackSonMapper.toCJsonString(caringRequest).getBytes(Charset.forName("UTF-8"))); requestBuilder.contentType(MediaType.APPLICATION_JSON); requestBuilder.accept(MediaType.APPLICATION_JSON); try { this.mockMvc.perform(requestBuilder).andExpect(new StatusResultMatchers().isOk()); } catch (Exception e) { e.printStackTrace(); } }
@Test public void testGetCustomerOrdersShipData() { List<Map<String, Object>> objs = orders.getCustomerOrdersShipData(); for (Map<String, Object> objects : objs) { logger.info(JackSonMapper.toJsonString(objects)); } }
@Test public void testGetWwListByDpId() { // List<Map<String, Object>> ship = shipRepository.getWwListByDpId("a"); // List<String> ship = shipRepository.getWwListByDpId("a"); List<Map<String, Object>> ship = orders.getOrderReceptionWwListByDpId("a"); System.out.println(JackSonMapper.toJsonString(ship)); }
@Test public void testUrPayOrdersLogList() { PageRequest pr = new PageRequest(0, 20); UrPayOrdersLogVo ship = orders.urPayOrdersLogList(pr, "65927470"); System.out.println(JackSonMapper.toJsonString(ship)); // ship = orders.urPayOrdersLogList(pr, "b"); // System.out.println(JackSonMapper.toJsonString(ship)); }
@Test public void testShippingNotice() { List<OrderDomain> list = null; // re.getOrders("68790050"); System.out.println(JackSonMapper.toJsonString(list)); Map<String, List<OrderDomain>> map = new HashMap<String, List<OrderDomain>>(); map.put("68790050", list); orderService.shippingNotice(map); }
@Test public void autoSetTest() { TraderateAutoSetRequest traderateAutoSetRequest = new TraderateAutoSetRequest(); traderateAutoSetRequest.setDpId("100571094"); traderateAutoSetRequest.setType("order_success"); traderateAutoSetRequest.setContent("非常棒的买家,收到宝贝有任何问题请立即与小店售后联系!"); traderateAutoSetRequest.setStatus(0); DefaultRequestBuilder requestBuilder = MockMvcRequestBuilders.post("/traderate/autoset"); requestBuilder.characterEncoding("UTF-8"); requestBuilder.body( JackSonMapper.toCJsonString(traderateAutoSetRequest).getBytes(Charset.forName("UTF-8"))); requestBuilder.contentType(MediaType.APPLICATION_JSON); requestBuilder.accept(MediaType.APPLICATION_JSON); try { this.mockMvc.perform(requestBuilder).andExpect(new StatusResultMatchers().isOk()); } catch (Exception e) { e.printStackTrace(); } }
@Test public void testFindCusOrdsByTid() { // shipRepository.updateCusOrdsByTid("a"); // CustomerOrdersShipDomain ship = shipRepository.findCusOrdsByTid("b"); // System.out.println(JackSonMapper.toJsonString(ship)); // // int[] updas = orders.updateCusOrdsShipHide(true, "b"); // ship = shipRepository.findCusOrdsByTid("b"); // System.out.println(JackSonMapper.toJsonString(ship)); // // // int upda = orders.updateCusOrdsShipHide("b"); // System.out.println(JackSonMapper.toJsonString(upda)); //// shipRepository.updateCusOrdsByTid("a"); // // ship = shipRepository.findCusOrdsByTid("b"); // System.out.println(JackSonMapper.toJsonString(ship)); List<String> list = new ArrayList<String>(); list.add("100000000000001"); list.add("100000000000002"); List<CustomerOrdersShipDomain> l = shipRepository.getByTidIn(list); System.out.println(JackSonMapper.toJsonString(l)); }