|
@@ -44,7 +44,7 @@ public class PinYouServiceImpl implements IPinYouService { |
|
@@ -44,7 +44,7 @@ public class PinYouServiceImpl implements IPinYouService { |
44
|
String client_type = ClientTypeEnum.IOS.getName();
|
44
|
String client_type = ClientTypeEnum.IOS.getName();
|
45
|
String idfa = requestBO.getIdfa();
|
45
|
String idfa = requestBO.getIdfa();
|
46
|
String imei = requestBO.getImei();
|
46
|
String imei = requestBO.getImei();
|
47
|
- if(StringUtils.isEmpty(idfa)){
|
47
|
+ if(idfa.equals("")||StringUtils.isEmpty(idfa)){
|
48
|
client_type = ClientTypeEnum.ANDROID.getName();
|
48
|
client_type = ClientTypeEnum.ANDROID.getName();
|
49
|
os = ClientTypeEnum.ANDROID.getName();
|
49
|
os = ClientTypeEnum.ANDROID.getName();
|
50
|
}
|
50
|
}
|
|
@@ -54,6 +54,7 @@ public class PinYouServiceImpl implements IPinYouService { |
|
@@ -54,6 +54,7 @@ public class PinYouServiceImpl implements IPinYouService { |
54
|
String jp = "1";
|
54
|
String jp = "1";
|
55
|
//用户id
|
55
|
//用户id
|
56
|
String user_id = requestBO.getUser_id();
|
56
|
String user_id = requestBO.getUser_id();
|
|
|
57
|
+ boolean isNum = user_id.matches("[0-9]+");
|
57
|
//用户行为事件
|
58
|
//用户行为事件
|
58
|
String event = requestBO.getEvent();
|
59
|
String event = requestBO.getEvent();
|
59
|
//用户行为数据
|
60
|
//用户行为数据
|
|
@@ -74,7 +75,7 @@ public class PinYouServiceImpl implements IPinYouService { |
|
@@ -74,7 +75,7 @@ public class PinYouServiceImpl implements IPinYouService { |
74
|
if(event.equals(EnentValueEnum.ADD_CART.getName())||event.equals(EnentValueEnum.VIEW_ITEM.getName())){
|
75
|
if(event.equals(EnentValueEnum.ADD_CART.getName())||event.equals(EnentValueEnum.VIEW_ITEM.getName())){
|
75
|
stringBuffer= stringBuffer.append("&p=").append(event_value);
|
76
|
stringBuffer= stringBuffer.append("&p=").append(event_value);
|
76
|
}
|
77
|
}
|
77
|
- if(StringUtils.isNotEmpty(user_id)){
|
78
|
+ if(StringUtils.isNotEmpty(user_id)&& user_id.matches("[0-9]+")){
|
78
|
stringBuffer = stringBuffer.append("&user_id=").append(user_id);
|
79
|
stringBuffer = stringBuffer.append("&user_id=").append(user_id);
|
79
|
}
|
80
|
}
|
80
|
if(client_type.equalsIgnoreCase(ClientTypeEnum.ANDROID.getName())){
|
81
|
if(client_type.equalsIgnoreCase(ClientTypeEnum.ANDROID.getName())){
|
|
@@ -101,7 +102,7 @@ public class PinYouServiceImpl implements IPinYouService { |
|
@@ -101,7 +102,7 @@ public class PinYouServiceImpl implements IPinYouService { |
101
|
os=ClientTypeEnum.IOS.getName();
|
102
|
os=ClientTypeEnum.IOS.getName();
|
102
|
String idfa = requestBO.getIdfa();
|
103
|
String idfa = requestBO.getIdfa();
|
103
|
String imei = requestBO.getImei();
|
104
|
String imei = requestBO.getImei();
|
104
|
- if(StringUtils.isEmpty(idfa)){
|
105
|
+ if(idfa.equals("")||StringUtils.isEmpty(idfa)){
|
105
|
client_type = ClientTypeEnum.ANDROID.getName();
|
106
|
client_type = ClientTypeEnum.ANDROID.getName();
|
106
|
os=ClientTypeEnum.ANDROID.getName();
|
107
|
os=ClientTypeEnum.ANDROID.getName();
|
107
|
}
|
108
|
}
|
|
@@ -123,8 +124,7 @@ public class PinYouServiceImpl implements IPinYouService { |
|
@@ -123,8 +124,7 @@ public class PinYouServiceImpl implements IPinYouService { |
123
|
.append(advertiser).append("&os=").append(os)
|
124
|
.append(advertiser).append("&os=").append(os)
|
124
|
.append("&ts=").append(currentTime)
|
125
|
.append("&ts=").append(currentTime)
|
125
|
.append("&ip=").append(ip)
|
126
|
.append("&ip=").append(ip)
|
126
|
- .append("&df=0").append("&user_id=")
|
|
|
127
|
- .append(user_id).append("&order=").append(order)
|
127
|
+ .append("&df=0").append("&order=").append(order)
|
128
|
.append("&money=").append(money)
|
128
|
.append("&money=").append(money)
|
129
|
.append("&plist=").append(plist);
|
129
|
.append("&plist=").append(plist);
|
130
|
String url = null;
|
130
|
String url = null;
|
|
@@ -137,6 +137,9 @@ public class PinYouServiceImpl implements IPinYouService { |
|
@@ -137,6 +137,9 @@ public class PinYouServiceImpl implements IPinYouService { |
137
|
String iam = MD5.md5(idfa);
|
137
|
String iam = MD5.md5(idfa);
|
138
|
stringBuffer = stringBuffer.append("&iam=").append(iam);
|
138
|
stringBuffer = stringBuffer.append("&iam=").append(iam);
|
139
|
}
|
139
|
}
|
|
|
140
|
+ if(StringUtils.isNotEmpty(user_id)&& user_id.matches("[0-9]+")){
|
|
|
141
|
+ stringBuffer = stringBuffer.append("&user_id=").append(user_id);
|
|
|
142
|
+ }
|
140
|
if(orderStatus.equals("1")||orderStatus.equals("2")){
|
143
|
if(orderStatus.equals("1")||orderStatus.equals("2")){
|
141
|
stringBuffer = stringBuffer.append("&gl=9466");
|
144
|
stringBuffer = stringBuffer.append("&gl=9466");
|
142
|
}else{
|
145
|
}else{
|