Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
marketing
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dingjy
marketing
Commits
c77b32ab
Commit
c77b32ab
authored
Mar 27, 2024
by
宋新宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '3-抖音短剧及短剧app归因接入' into 'release_20240327_01'
短剧APP归因 See merge request
!15
parents
559260f4
29475398
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
DyVideoUniversalProcess.java
...m/lwby/marketing/att/dyvideo/DyVideoUniversalProcess.java
+1
-1
HttpUtil.java
src/main/java/com/lwby/marketing/util/HttpUtil.java
+16
-0
No files found.
src/main/java/com/lwby/marketing/att/dyvideo/DyVideoUniversalProcess.java
View file @
c77b32ab
package
com
.
lwby
.
marketing
.
att
.
dyvideo
;
package
com
.
lwby
.
marketing
.
att
.
dyvideo
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alicp.jetcache.anno.CacheRefresh
;
import
com.alicp.jetcache.anno.CacheRefresh
;
...
@@ -11,6 +10,7 @@ import com.lwby.marketing.att.UniversalProcess;
...
@@ -11,6 +10,7 @@ import com.lwby.marketing.att.UniversalProcess;
import
com.lwby.marketing.att.bystory.CallBackType
;
import
com.lwby.marketing.att.bystory.CallBackType
;
import
com.lwby.marketing.att.novel.AttributionType
;
import
com.lwby.marketing.att.novel.AttributionType
;
import
com.lwby.marketing.po.ThirdAccountDy
;
import
com.lwby.marketing.po.ThirdAccountDy
;
import
com.lwby.marketing.util.HttpUtil
;
import
com.lwby.marketing.vo.AppChannelVO
;
import
com.lwby.marketing.vo.AppChannelVO
;
import
com.lwby.marketing.vo.DeliveryDeviceInfo
;
import
com.lwby.marketing.vo.DeliveryDeviceInfo
;
import
com.lwby.marketing.vo.StoryNovelAction
;
import
com.lwby.marketing.vo.StoryNovelAction
;
...
...
src/main/java/com/lwby/marketing/util/HttpUtil.java
View file @
c77b32ab
...
@@ -15,6 +15,22 @@ import java.io.*;
...
@@ -15,6 +15,22 @@ import java.io.*;
*/
*/
public
class
HttpUtil
{
public
class
HttpUtil
{
public
static
String
post
(
String
url
,
String
toJson
)
throws
IOException
{
HttpClient
httpClient
=
new
HttpClient
();
PostMethod
postMethod
=
new
PostMethod
(
url
);
RequestEntity
se
=
new
StringRequestEntity
(
toJson
,
"application/json"
,
"UTF-8"
);
postMethod
.
setRequestEntity
(
se
);
postMethod
.
setRequestHeader
(
"Content-Type"
,
"application/json"
);
//默认的重试策略
postMethod
.
getParams
().
setParameter
(
HttpMethodParams
.
RETRY_HANDLER
,
new
DefaultHttpMethodRetryHandler
());
postMethod
.
getParams
().
setParameter
(
HttpMethodParams
.
SO_TIMEOUT
,
5000
);
//设置超时时间
int
httpStatus
=
httpClient
.
executeMethod
(
postMethod
);
InputStream
bodystreams
=
postMethod
.
getResponseBodyAsStream
();
String
body
=
convertStreamToString
(
bodystreams
);
return
body
;
}
public
static
String
postDy
(
String
url
,
String
toJson
,
String
token
)
throws
IOException
{
public
static
String
postDy
(
String
url
,
String
toJson
,
String
token
)
throws
IOException
{
HttpClient
httpClient
=
new
HttpClient
();
HttpClient
httpClient
=
new
HttpClient
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment