Toggle navigation
Toggle navigation
This project
Loading...
Sign in
YOHOBUY
/
yohobuy-union
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
zhengwen.ge
8 years ago
Commit
064c5604578479bf01b84df616355bb6cfd32a9b
1 parent
24aaf382
update
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
server/src/main/java/com/yoho/unions/server/restapi/UnionRest.java
server/src/main/java/com/yoho/unions/server/service/impl/DingdangServiceImpl.java
server/src/main/java/com/yoho/unions/server/service/impl/PinYouServiceImpl.java
server/src/main/java/com/yoho/unions/server/restapi/UnionRest.java
View file @
064c560
...
...
@@ -76,6 +76,14 @@ public class UnionRest {
return
response
;
}
@RequestMapping
(
value
=
"/addBigData"
)
@ResponseBody
public
UnionResponseBO
addBigData
(
int
beginTime
,
int
endTime
)
{
log
.
info
(
"enter addBigData,beginTimeis {},endTime is {}"
,
beginTime
,
endTime
);
UnionResponseBO
response
=
dingdangService
.
addBigData
(
beginTime
,
endTime
);
return
response
;
}
/**
* 资讯下载,上报yas
* @param request
...
...
server/src/main/java/com/yoho/unions/server/service/impl/DingdangServiceImpl.java
View file @
064c560
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.netflix.config.DynamicIntProperty
;
import
com.netflix.config.DynamicPropertyFactory
;
import
com.yoho.core.cache.CacheClient
;
import
com.yoho.core.common.utils.MD5
;
import
com.yoho.service.model.union.request.ActiveUnionRequestBO
;
import
com.yoho.service.model.union.request.AddUnionRequestBO
;
import
com.yoho.service.model.union.request.ClickUnionRequestBO
;
...
...
@@ -256,12 +257,20 @@ public class DingdangServiceImpl implements DingdangService {
String
idfa
=
unionActivityLogs
.
getIdfa
();
String
imei
=
unionActivityLogs
.
getImei
();
int
createTime
=
unionActivityLogs
.
getCreateTime
();
int
saveTime
=
createTime
-
3
*
60
*
60
;
int
saveTime
=
createTime
-
2
*
60
*
60
;
UnionClickLogs
unionClickLogs
=
null
;
if
(
StringUtils
.
isNotEmpty
(
idfa
)){
unionClickLogs
=
unionClickLogsDAO
.
selectByIdfa
(
idfa
,
saveTime
,
createTime
);
if
(
null
==
unionClickLogs
){
String
MD5Idfa
=
MD5
.
md5
(
idfa
);
unionClickLogs
=
unionClickLogsDAO
.
selectByIdfa
(
MD5Idfa
,
saveTime
,
createTime
);
}
}
else
{
unionClickLogs
=
unionClickLogsDAO
.
selectByImei
(
imei
,
saveTime
,
createTime
);
if
(
null
==
unionClickLogs
){
String
MD5Imei
=
MD5
.
md5
(
imei
);
unionClickLogs
=
unionClickLogsDAO
.
selectByIdfa
(
MD5Imei
,
saveTime
,
createTime
);
}
}
//如果依然为空,则用td+IP的形式去匹配
String
td
=
unionActivityLogs
.
getTd
();
...
...
server/src/main/java/com/yoho/unions/server/service/impl/PinYouServiceImpl.java
View file @
064c560
...
...
@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
java.net.URLDecoder
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -215,7 +216,7 @@ public class PinYouServiceImpl implements IPinYouService {
public
UnionResponse
sendUrl
(
String
url
)
{
log
.
info
(
"pinyou sendUrl url is {}"
,
url
);
try
{
url
=
URL
Decoder
.
de
code
(
url
,
"UTF-8"
);
url
=
URL
Encoder
.
en
code
(
url
,
"UTF-8"
);
Pair
<
Integer
,
String
>
pair
=
HttpUtils
.
httpGet
(
url
);
log
.
info
(
"pinyou sendUrl union success url={}, and result={}"
,
url
,
pair
);
if
(
pair
.
getLeft
()
!=
200
)
{
...
...
Please
register
or
login
to post a comment