Authored by zhengwen.ge

代码兼容处理

... ... @@ -8,6 +8,7 @@ import com.yoho.unions.dal.IUserOrdersDAO;
import com.yoho.unions.dal.model.UserOrders;
import com.yoho.unions.message.CommonMessageConsumer;
import com.yoho.unions.server.service.IOrderPushService;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -62,6 +63,8 @@ public class OrderPushConsumer implements CommonMessageConsumer {
UserOrders userOrders = new UserOrders();
//联盟id
userOrders.setUid(jsonObject.getString("clientId"));
String clientId = jsonObject.getString("clientId");
//订单号
userOrders.setOrderCode(jsonObject.getString("orderCode"));
//订单金额
... ... @@ -77,6 +80,12 @@ public class OrderPushConsumer implements CommonMessageConsumer {
//使用有货币、券,渠道
//第三方tracking_code
userOrders.setTrackingCode(unionCookie.getString("channel_code"));
//亿起发的wi对应的其实就是其他人的channel_code
if (StringUtils.isNotEmpty(clientId)){
if(clientId.equals("1001")||clientId.equals("2995")||clientId.equals("3415")||clientId.equals("3417")){
userOrders.setTrackingCode(unionCookie.getString("wi"));
}
}
//第三方用户id
userOrders.setUserId(unionCookie.getString("fl_uid"));
//创建时间
... ...
... ... @@ -76,6 +76,12 @@ public class ClickUnionRest {
clientIp = IPS[0];
}
request.setClientIp(clientIp);
//针对td做一下特殊处理,如果是0_0_ios_10.2 这种情况,则把0.0给截取掉
String td = request.getTd();
if (td.startsWith("0_0")){
String[] td1 = td.split("0_0_");
request.setTd(td1[1]);
}
clickUnion.info("addUnion with param is {}", request);
UnionResponse response = unionService.clickUnion(request);
log.info("addUnion with result is {}, and request is {}", response, request);
... ...