Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fzm-joying
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
lei
fzm-joying
Commits
d46f29a4
Commit
d46f29a4
authored
Apr 24, 2022
by
33
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Api版权接口
parent
9616bd89
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
OpenSignUtils.java
...mon/src/main/java/com/fzm/common/utils/OpenSignUtils.java
+2
-1
CopyrightApiController.java
...om/fzm/portal/controller/open/CopyrightApiController.java
+6
-2
No files found.
joying-common/src/main/java/com/fzm/common/utils/OpenSignUtils.java
View file @
d46f29a4
...
...
@@ -13,10 +13,11 @@ import java.util.TreeMap;
*/
public
class
OpenSignUtils
{
public
static
void
verify
(
String
appKey
,
String
appKeySecret
,
String
bizJson
,
String
signature
)
{
public
static
void
verify
(
String
appKey
,
String
appKeySecret
,
String
biz
Id
,
String
biz
Json
,
String
signature
)
{
Map
<
String
,
String
>
param
=
new
TreeMap
<>();
param
.
put
(
"appKey"
,
appKey
);
param
.
put
(
"appKeySecret"
,
appKeySecret
);
param
.
put
(
"bizId"
,
bizId
);
param
.
put
(
"bizJson"
,
bizJson
);
StringBuilder
sb
=
new
StringBuilder
();
...
...
joying-portal/src/main/java/com/fzm/portal/controller/open/CopyrightApiController.java
View file @
d46f29a4
...
...
@@ -53,10 +53,14 @@ public class CopyrightApiController {
throw
GlobalException
.
newException
(
ResultCode
.
signature_wrong
);
}
String
bizId
=
baseOO
.
getBizId
();
if
(
StringUtils
.
isBlank
(
bizId
))
{
throw
GlobalException
.
newException
(
ResultCode
.
VALIDATE_FAILED
);
}
CopyrightOO
copyrightOO
=
baseOO
.
getData
();
OpenSignUtils
.
verify
(
appKey
,
openKeyDO
.
getAppKeySecret
(),
JSONUtil
.
toJsonStr
(
copyrightOO
),
signature
);
OpenSignUtils
.
verify
(
appKey
,
openKeyDO
.
getAppKeySecret
(),
bizId
,
JSONUtil
.
toJsonStr
(
copyrightOO
),
signature
);
String
bizId
=
baseOO
.
getBizId
();
CopyrightApiDO
apiDO
=
copyrightApiService
.
getByAppKeyAndBizId
(
appKey
,
bizId
);
if
(
apiDO
!=
null
)
{
return
ResponseModel
.
success
(
apiDO
.
getId
());
...
...
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