Authored by zhengwen.ge

update

... ... @@ -44,7 +44,7 @@ public class PinYouServiceImpl implements IPinYouService {
String client_type = ClientTypeEnum.IOS.getName();
String idfa = requestBO.getIdfa();
String imei = requestBO.getImei();
if(StringUtils.isEmpty(idfa)){
if(idfa.equals("")||StringUtils.isEmpty(idfa)){
client_type = ClientTypeEnum.ANDROID.getName();
os = ClientTypeEnum.ANDROID.getName();
}
... ... @@ -54,6 +54,7 @@ public class PinYouServiceImpl implements IPinYouService {
String jp = "1";
//用户id
String user_id = requestBO.getUser_id();
boolean isNum = user_id.matches("[0-9]+");
//用户行为事件
String event = requestBO.getEvent();
//用户行为数据
... ... @@ -74,7 +75,7 @@ public class PinYouServiceImpl implements IPinYouService {
if(event.equals(EnentValueEnum.ADD_CART.getName())||event.equals(EnentValueEnum.VIEW_ITEM.getName())){
stringBuffer= stringBuffer.append("&p=").append(event_value);
}
if(StringUtils.isNotEmpty(user_id)){
if(StringUtils.isNotEmpty(user_id)&& user_id.matches("[0-9]+")){
stringBuffer = stringBuffer.append("&user_id=").append(user_id);
}
if(client_type.equalsIgnoreCase(ClientTypeEnum.ANDROID.getName())){
... ... @@ -101,7 +102,7 @@ public class PinYouServiceImpl implements IPinYouService {
os=ClientTypeEnum.IOS.getName();
String idfa = requestBO.getIdfa();
String imei = requestBO.getImei();
if(StringUtils.isEmpty(idfa)){
if(idfa.equals("")||StringUtils.isEmpty(idfa)){
client_type = ClientTypeEnum.ANDROID.getName();
os=ClientTypeEnum.ANDROID.getName();
}
... ... @@ -123,8 +124,7 @@ public class PinYouServiceImpl implements IPinYouService {
.append(advertiser).append("&os=").append(os)
.append("&ts=").append(currentTime)
.append("&ip=").append(ip)
.append("&df=0").append("&user_id=")
.append(user_id).append("&order=").append(order)
.append("&df=0").append("&order=").append(order)
.append("&money=").append(money)
.append("&plist=").append(plist);
String url = null;
... ... @@ -137,6 +137,9 @@ public class PinYouServiceImpl implements IPinYouService {
String iam = MD5.md5(idfa);
stringBuffer = stringBuffer.append("&iam=").append(iam);
}
if(StringUtils.isNotEmpty(user_id)&& user_id.matches("[0-9]+")){
stringBuffer = stringBuffer.append("&user_id=").append(user_id);
}
if(orderStatus.equals("1")||orderStatus.equals("2")){
stringBuffer = stringBuffer.append("&gl=9466");
}else{
... ...
... ... @@ -43,12 +43,14 @@ public class PinYouTask {
if(viewSizeInt>0){
for(int i=0; i < viewSizeInt; i++){
viewPinYouRequestBOList = redisListCache.rightPop(UNION_VIEW_KEY, List.class);
ViewPinYouRequestBO viewPinYouRequestBO = redisListCache.rightPop(UNION_VIEW_KEY, ViewPinYouRequestBO.class);
viewPinYouRequestBOList.add(viewPinYouRequestBO);
}
}
if(transSizeInt>0){
for(int i=0; i < transSizeInt; i++){
transPinYouRequestBOList = redisListCache.rightPop(UNION_TRANS_KEY, List.class);
TransPinYouRequestBO transPinYouRequestBO = redisListCache.rightPop(UNION_TRANS_KEY, TransPinYouRequestBO.class);
transPinYouRequestBOList.add(transPinYouRequestBO);
}
}
... ...