Authored by tanling

union_data在unionCookie里面

@@ -55,6 +55,16 @@ public class UserOrders { @@ -55,6 +55,16 @@ public class UserOrders {
55 //目前没有使用 55 //目前没有使用
56 private Integer isPush; 56 private Integer isPush;
57 57
  58 + private String unionData;
  59 +
  60 + public String getUnionData() {
  61 + return unionData;
  62 + }
  63 +
  64 + public void setUnionData(String unionData) {
  65 + this.unionData = unionData;
  66 + }
  67 +
58 public Integer getId() { 68 public Integer getId() {
59 return id; 69 return id;
60 } 70 }
@@ -63,8 +63,7 @@ public class OrderPushConsumer implements CommonMessageConsumer { @@ -63,8 +63,7 @@ public class OrderPushConsumer implements CommonMessageConsumer {
63 63
64 64
65 // 将从订单那边传过来的union_data 存进db 65 // 将从订单那边传过来的union_data 存进db
66 - JSONObject jsonObject = JSON.parseObject(orderData);  
67 - String unionData = jsonObject.getString("union_data"); 66 + String unionData = userOrders.getUnionData();
68 67
69 if (org.apache.commons.lang3.StringUtils.isNotBlank(unionData)){ 68 if (org.apache.commons.lang3.StringUtils.isNotBlank(unionData)){
70 UserOrdersRelation userOrdersRelation = new UserOrdersRelation(); 69 UserOrdersRelation userOrdersRelation = new UserOrdersRelation();
@@ -81,6 +80,8 @@ public class OrderPushConsumer implements CommonMessageConsumer { @@ -81,6 +80,8 @@ public class OrderPushConsumer implements CommonMessageConsumer {
81 JSONObject jsonObject = JSON.parseObject(orderData); 80 JSONObject jsonObject = JSON.parseObject(orderData);
82 JSONObject unionCookie = JSONObject.parseObject(jsonObject.getString("unionCookie")); 81 JSONObject unionCookie = JSONObject.parseObject(jsonObject.getString("unionCookie"));
83 UserOrders userOrders = new UserOrders(); 82 UserOrders userOrders = new UserOrders();
  83 +
  84 + userOrders.setUnionData(unionCookie.getString("union_data"));
84 //联盟id 85 //联盟id
85 userOrders.setUid(jsonObject.getString("clientId")); 86 userOrders.setUid(jsonObject.getString("clientId"));
86 87