Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
pseer
gxpt_ht
Commits
59ebac6c
Commit
59ebac6c
authored
Jan 26, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除店员,删除关联的门店
parent
67c7dedd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
23 deletions
+3
-23
TiktokServiceImpl.java
...ain/java/share/system/service/impl/TiktokServiceImpl.java
+3
-23
No files found.
share-system/src/main/java/share/system/service/impl/TiktokServiceImpl.java
View file @
59ebac6c
...
...
@@ -44,7 +44,9 @@ public class TiktokServiceImpl implements TiktokService {
tokenMap
.
put
(
"client_key"
,
CLIENT_KEY
);
tokenMap
.
put
(
"client_secret"
,
CLIENT_SECRET
);
tokenMap
.
put
(
"grant_type"
,
"client_credentials"
);
String
post
=
HttpUtil
.
post
(
url
,
tokenMap
);
String
post
=
HttpRequest
.
post
(
url
)
.
contentType
(
"application/json"
)
.
body
(
new
JSONObject
(
tokenMap
).
toString
()).
execute
().
body
();
JSONObject
sessionKey
=
new
JSONObject
(
post
);
JSONObject
dataJson
=
sessionKey
.
getJSONObject
(
"data"
);
String
errorCode
=
dataJson
.
getStr
(
"error_code"
);
...
...
@@ -100,28 +102,6 @@ public class TiktokServiceImpl implements TiktokService {
return
data
.
getStr
(
"verify_token"
);
}
public
static
void
main
(
String
[]
args
)
{
String
url
=
"<a href=\"https://www.iesdouyin.com/share/commerce/"
+
"coupon/I0duaGdVYnp0RitYekxkNm11VHl3WUVCM2wvWXNmNEZDcXZ3aGZDYm9ka3R2VjdualNOT1VGVzMxUkxmdWowTVp2VWVBams1OFAyK3YrMm4yc0lhQm90a0hPb1ZNRFk5V3VxTkhIV3hZTHQyelByMFJ5R2YzSy9FRjZXNDgvMTBXVno1NW5MaFFOYzRQbnFtRExpZGF5YzI4aTdBK3d6dnk3eFBUTVd2VkRRZkM/"
+
"?schema_type=13&"
+
"object_id=I0duaGdVYnp0RitYekxkNm11VHl3WUVCM2wvWXNmNEZDcXZ3aGZDYm9ka3R2VjdualNOT1VGVzMxUkxmdWowTVp2VWVBams1OFAyK3YrMm4yc0lhQm90a0hPb1ZNRFk5V3VxTkhIV3hZTHQyelByMFJ5R2YzSy9FRjZXNDgvMTBXVno1NW5MaFFOYzRQbnFtRExpZGF5YzI4aTdBK3d6dnk3eFBUTVd2VkRRZkM&"
+
"utm_campaign=client_scan_share&"
+
"app=aweme&"
+
"utm_medium=ios&"
+
"tt_from=scan_share&"
+
"iid=&"
+
"utm_source=scan_share\">Found</a>."
;
//截取中间的object_id=到&之间的字符串
Pattern
pattern
=
Pattern
.
compile
(
"object_id=([^&]*)"
);
Matcher
matcher
=
pattern
.
matcher
(
url
);
if
(
matcher
.
find
())
{
String
objectId
=
matcher
.
group
(
1
);
System
.
out
.
println
(
objectId
);
}
else
{
System
.
out
.
println
(
"No match found"
);
}
}
@Override
public
String
verify
(
TiktokCouponDto
tiktokCouponDto
)
{
String
accessToken
=
obtain
();
...
...
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