Authored by chenjian

bugfix

@@ -5,6 +5,7 @@ import java.util.List; @@ -5,6 +5,7 @@ import java.util.List;
5 5
6 import javax.annotation.PostConstruct; 6 import javax.annotation.PostConstruct;
7 7
  8 +import org.apache.commons.collections.CollectionUtils;
8 import org.apache.commons.lang3.StringUtils; 9 import org.apache.commons.lang3.StringUtils;
9 import org.slf4j.Logger; 10 import org.slf4j.Logger;
10 import org.slf4j.LoggerFactory; 11 import org.slf4j.LoggerFactory;
@@ -152,7 +153,7 @@ public class PinyouReportHandler implements ClickEventHandIntf { @@ -152,7 +153,7 @@ public class PinyouReportHandler implements ClickEventHandIntf {
152 153
153 ErpOrders orders = erpOrdersMapper.selectByOrderCode(Long.valueOf(orderCode)); 154 ErpOrders orders = erpOrdersMapper.selectByOrderCode(Long.valueOf(orderCode));
154 List<ErpOrdersGoods> orderGoodsList = erpOrdersGoodsMapper.selectByOrderCode(Long.valueOf(orderCode)); 155 List<ErpOrdersGoods> orderGoodsList = erpOrdersGoodsMapper.selectByOrderCode(Long.valueOf(orderCode));
155 - if(orders == null || orderGoodsList == null) { 156 + if(orders == null || CollectionUtils.isEmpty(orderGoodsList)) {
156 return null; 157 return null;
157 } 158 }
158 159
@@ -22,7 +22,7 @@ public class KafakTest { @@ -22,7 +22,7 @@ public class KafakTest {
22 @Test 22 @Test
23 public void kafakTest() throws Exception { 23 public void kafakTest() throws Exception {
24 System.out.println("++++======"); 24 System.out.println("++++======");
25 - kafkaTemplate.sendDefault("{\"uid\":\"8040768\",\"ts\":\"1492570964462\",\"param\":{\"C_ID\":\"1\",\"ORD_NUM\":\"170113812\"},\"os\":\"iPhone OS\",\"op\":\"YB_SC_ORD\",\"imei\":\"1b4747946de0c62\",\"udid\":\"1b4747946de0c624d348c57187cd7b02eb4126e0\",\"ip\":\"117.136.88.1\",\"idfa\":\"E65BC03A-6572-4B83-9706-D16BBFEAE51C\"}"); 25 + kafkaTemplate.sendDefault("{\"uid\":\"20000740\",\"ts\":\"1492570964462\",\"param\":{\"C_ID\":\"1\",\"ORD_NUM\":\"170129416\"},\"os\":\"iPhone OS\",\"op\":\"YB_SC_ORD\",\"imei\":\"1b4747946de0c62\",\"udid\":\"1b4747946de0c624d348c57187cd7b02eb4126e0\",\"ip\":\"117.136.88.1\",\"idfa\":\"E65BC03A-6572-4B83-9706-D16BBFEAE51C\"}");
26 26
27 Thread.sleep(300 * 1000); 27 Thread.sleep(300 * 1000);
28 } 28 }