Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
afanti-open-api
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
java-ms
afanti-open-api
Commits
9d82b1f2
Commit
9d82b1f2
authored
Apr 28, 2023
by
陈炎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎨
红旗数据api-优化
parent
8ae0fcda
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
TokenInterceptor.java
.../com/afanticar/afantiopenapi/config/TokenInterceptor.java
+1
-1
HongqiAwemeIncentiveQuarter.java
...antiopenapi/model/entity/HongqiAwemeIncentiveQuarter.java
+1
-1
BaseService.java
...java/com/afanticar/afantiopenapi/service/BaseService.java
+1
-1
No files found.
src/main/java/com/afanticar/afantiopenapi/config/TokenInterceptor.java
View file @
9d82b1f2
...
@@ -33,7 +33,7 @@ public class TokenInterceptor implements HandlerInterceptor {
...
@@ -33,7 +33,7 @@ public class TokenInterceptor implements HandlerInterceptor {
}
}
String
token
=
request
.
getHeader
(
"authorization"
);
String
token
=
request
.
getHeader
(
"authorization"
);
if
(
StrUtil
.
isNotBlank
(
token
))
{
if
(
StrUtil
.
isNotBlank
(
token
))
{
request
.
setAttribute
(
"clientId"
,
JWTUtils
.
getClientId
(
token
.
substring
(
8
)
));
request
.
setAttribute
(
"clientId"
,
JWTUtils
.
getClientId
(
token
));
}
else
{
}
else
{
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setStatus
(
HttpServletResponse
.
SC_UNAUTHORIZED
);
response
.
setStatus
(
HttpServletResponse
.
SC_UNAUTHORIZED
);
...
...
src/main/java/com/afanticar/afantiopenapi/model/entity/HongqiAwemeIncentiveQuarter.java
View file @
9d82b1f2
...
@@ -14,7 +14,7 @@ import java.util.Date;
...
@@ -14,7 +14,7 @@ import java.util.Date;
* @since 2023/4/26/026
* @since 2023/4/26/026
*/
*/
@Data
@Data
@TableName
(
"hongqi_
liv
e_incentive_quarter"
)
@TableName
(
"hongqi_
awem
e_incentive_quarter"
)
@JsonNaming
(
value
=
com
.
fasterxml
.
jackson
.
databind
.
PropertyNamingStrategy
.
SnakeCaseStrategy
.
class
)
@JsonNaming
(
value
=
com
.
fasterxml
.
jackson
.
databind
.
PropertyNamingStrategy
.
SnakeCaseStrategy
.
class
)
@JSONType
(
naming
=
com
.
alibaba
.
fastjson
.
PropertyNamingStrategy
.
SnakeCase
)
@JSONType
(
naming
=
com
.
alibaba
.
fastjson
.
PropertyNamingStrategy
.
SnakeCase
)
public
class
HongqiAwemeIncentiveQuarter
{
public
class
HongqiAwemeIncentiveQuarter
{
...
...
src/main/java/com/afanticar/afantiopenapi/service/BaseService.java
View file @
9d82b1f2
...
@@ -26,7 +26,7 @@ public class BaseService {
...
@@ -26,7 +26,7 @@ public class BaseService {
int
waiting
=
50
;
int
waiting
=
50
;
public
BaseResponse
baseValidator
(
HttpServletRequest
request
,
String
clientId
,
String
dataType
,
Integer
limit
,
Integer
limitPeriod
)
{
public
BaseResponse
baseValidator
(
HttpServletRequest
request
,
String
clientId
,
String
dataType
,
Integer
limit
,
Integer
limitPeriod
)
{
if
(!
clientId
.
equals
(
request
.
get
Header
(
BaseController
.
header
)))
{
if
(!
clientId
.
equals
(
request
.
get
Attribute
(
BaseController
.
header
)))
{
return
BaseController
.
error
(
"403"
,
"认证用户无访问此数据的权限!"
);
return
BaseController
.
error
(
"403"
,
"认证用户无访问此数据的权限!"
);
}
}
String
fawKey
=
String
.
format
(
"%s:limit"
,
dataType
);
String
fawKey
=
String
.
format
(
"%s:limit"
,
dataType
);
...
...
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