Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-backend
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
cloud-backend
Commits
2e23fc76
Commit
2e23fc76
authored
Jul 20, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.0
parent
d6c8b31a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
api-server/src/main/java/com/zq/api/feign/UserFeign.java
+1
-3
common-utils/src/main/java/com/zq/common/utils/WeixinUtils.java
+6
-4
No files found.
api-server/src/main/java/com/zq/api/feign/UserFeign.java
View file @
2e23fc76
...
...
@@ -4,15 +4,13 @@ import com.zq.api.config.FeignConfig;
import
com.zq.common.vo.ResultVo
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
/**
* @author wilmiam
* @since 2021-07-13 09:56
*/
@FeignClient
(
name
=
"USER-SERVER"
,
configuration
=
FeignConfig
.
class
)
@RequestMapping
(
"/user/app"
)
@FeignClient
(
name
=
"USER-SERVER"
,
path
=
"/user/app"
,
configuration
=
FeignConfig
.
class
)
public
interface
UserFeign
{
/**
...
...
common-utils/src/main/java/com/zq/common/utils/WeixinUtils.java
View file @
2e23fc76
...
...
@@ -114,7 +114,8 @@ public class WeixinUtils {
JSONObject
resultJsonObject
=
JSONObject
.
parseObject
(
result
);
String
errcode
=
resultJsonObject
.
getString
(
"errcode"
);
if
(
errcode
.
equals
(
"87014"
))
{
//当content内含有敏感信息,则返回87014
// 当content内含有敏感信息,则返回87014
if
(
"87014"
.
equals
(
errcode
))
{
log
.
warn
(
"包含敏感词,请重新输入!"
);
return
true
;
}
...
...
@@ -146,7 +147,7 @@ public class WeixinUtils {
CloseableHttpResponse
response
=
httpclient
.
execute
(
request
);
HttpEntity
httpEntity
=
response
.
getEntity
();
String
result
=
EntityUtils
.
toString
(
httpEntity
,
"UTF-8"
);
// 转成string
String
result
=
EntityUtils
.
toString
(
httpEntity
,
"UTF-8"
);
//打印检测结果
log
.
debug
(
"检测结果: {}"
,
result
);
...
...
@@ -154,7 +155,8 @@ public class WeixinUtils {
JSONObject
jso
=
JSONObject
.
parseObject
(
result
);
String
errcode
=
jso
.
getString
(
"errcode"
);
if
(
errcode
.
equals
(
"87014"
))
{
//当content内含有敏感信息,则返回87014
// 当content内含有敏感信息,则返回87014
if
(
"87014"
.
equals
(
errcode
))
{
log
.
warn
(
"图片内容违规,请重新上传!"
);
return
true
;
}
...
...
@@ -192,7 +194,7 @@ public class WeixinUtils {
* @param payMchId 商户号id
* @return
*/
public
static
String
postS
SL
(
String
requestUrl
,
Map
<
String
,
String
>
params
,
byte
[]
certFile
,
String
payMchId
)
{
public
static
String
postS
sl
(
String
requestUrl
,
Map
<
String
,
String
>
params
,
byte
[]
certFile
,
String
payMchId
)
{
StringBuilder
message
=
new
StringBuilder
();
try
{
KeyStore
keyStore
=
KeyStore
.
getInstance
(
"PKCS12"
);
...
...
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