Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
08abc82f
Commit
08abc82f
authored
Mar 21, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
37d1cf30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/api/WxAppletApi.java
ch-wx-api/src/main/java/com/wwdz/ch/wx/api/WxAppletApi.java
+25
-0
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/api/WxAppletApi.java
View file @
08abc82f
...
@@ -27,6 +27,9 @@ public class WxAppletApi {
...
@@ -27,6 +27,9 @@ public class WxAppletApi {
@Autowired
@Autowired
WxLoginManager
wxLoginManager
;
WxLoginManager
wxLoginManager
;
/* @Autowired
ItemShortUrlServer itemShortUrlServer;*/
// 微信小程序音视频内容安全识别地址
// 微信小程序音视频内容安全识别地址
private
static
final
String
MEDIA_CHECK_URL
=
"https://api.weixin.qq.com/wxa/media_check_async?access_token=%s"
;
private
static
final
String
MEDIA_CHECK_URL
=
"https://api.weixin.qq.com/wxa/media_check_async?access_token=%s"
;
...
@@ -47,4 +50,26 @@ public class WxAppletApi {
...
@@ -47,4 +50,26 @@ public class WxAppletApi {
logger
.
info
(
"[checkMedia] response :{}"
,
responseStr
);
logger
.
info
(
"[checkMedia] response :{}"
,
responseStr
);
return
responseStr
;
return
responseStr
;
}
}
public
String
getUrlLink
(
WxCheckMediaRequestDto
dto
)
{
String
accessToken
=
wxLoginManager
.
getAccessToken
();
String
url
=
String
.
format
(
MEDIA_CHECK_URL
,
accessToken
);
OkHttpUtil
okHttpUtil
=
OkHttpUtil
.
builder
().
url
(
url
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"media_url"
,
dto
.
getMediaUrl
());
map
.
put
(
"media_type"
,
dto
.
getMediaType
());
map
.
put
(
"version"
,
2
);
map
.
put
(
"scene"
,
4
);
map
.
put
(
"openid"
,
dto
.
getWxOpenId
());
okHttpUtil
.
addParams
(
map
);
okHttpUtil
.
post
(
true
);
String
responseStr
=
okHttpUtil
.
async
();
logger
.
info
(
"[checkMedia] response :{}"
,
responseStr
);
return
responseStr
;
}
}
}
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