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
75095e66
Commit
75095e66
authored
Sep 08, 2023
by
muhong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into quanku_0914
parents
2907056f
9248b8f0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
ch-admin-api/src/test/java/com/wwdz/ch/admin/impl/ElasticsearchUtilTest.java
...st/java/com/wwdz/ch/admin/impl/ElasticsearchUtilTest.java
+12
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
.../main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
+2
-4
ch-wx-api/src/main/java/com/wwdz/ch/wx/interceptor/LoginInterceptor.java
...ain/java/com/wwdz/ch/wx/interceptor/LoginInterceptor.java
+2
-0
No files found.
ch-admin-api/src/test/java/com/wwdz/ch/admin/impl/ElasticsearchUtilTest.java
View file @
75095e66
...
@@ -59,12 +59,22 @@ public class ElasticsearchUtilTest {
...
@@ -59,12 +59,22 @@ public class ElasticsearchUtilTest {
// esSearchRequestDto.setContent("清代");
// esSearchRequestDto.setContent("清代");
// esSearchRequestDto.setIncludes(Arrays.asList("id", "source", "name","images","updateTime", "createTime"));
// esSearchRequestDto.setIncludes(Arrays.asList("id", "source", "name","images","updateTime", "createTime"));
esSearchRequestDto
.
setPage
(
1
);
esSearchRequestDto
.
setPage
(
1
);
esSearchRequestDto
.
setSize
(
2
0
);
esSearchRequestDto
.
setSize
(
4
0
);
EsPageInfo
esPageInfo
=
itemEsDao
.
findList
(
esSearchRequestDto
);
EsPageInfo
esPageInfo
=
itemEsDao
.
findList
(
esSearchRequestDto
);
logger
.
info
(
"esPageInfo = {}"
,
esPageInfo
);
logger
.
info
(
"esPageInfo = {}"
,
esPageInfo
);
}
}
@Test
public
void
getCuewords
()
{
EsSearchRequestDto
esSearchRequestDto
=
new
EsSearchRequestDto
();
esSearchRequestDto
.
setContent
(
"清代"
);
esSearchRequestDto
.
setSize
(
20
);
List
<
ItemOfEs
>
itemOfEsList
=
itemEsDao
.
getCuewords
(
esSearchRequestDto
);
logger
.
info
(
"getCuewords = {}"
,
itemOfEsList
);
}
/* @Test
/* @Test
public void find2() throws IOException {
public void find2() throws IOException {
EsSearchRequestDto esSearchRequestDto = new EsSearchRequestDto();
EsSearchRequestDto esSearchRequestDto = new EsSearchRequestDto();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
View file @
75095e66
...
@@ -30,9 +30,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
...
@@ -30,9 +30,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
registry
.
addInterceptor
(
loginInterceptor
())
registry
.
addInterceptor
(
loginInterceptor
())
.
addPathPatterns
(
"/**"
)
.
addPathPatterns
(
"/**"
)
.
excludePathPatterns
(
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
.
excludePathPatterns
(
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/wx/user/loginByWx"
,
"/wx/user/loginByMobile"
,
"/wx/user/loginRegCaptcha"
,
"/wx/user/updateRegCaptcha"
,
"/wx/user/login"
,
"/wx/user/fillCode"
);
,
"/wx/user/loginByWx"
,
"/wx/user/loginByMobile"
,
"/wx/user/loginRegCaptcha"
,
"/wx/user/updateRegCaptcha"
,
"/wx/user/login"
,
"/wx/user/fillCode"
// , "/wx/item/page", "/wx/item/info", "/wx/item/findNames"
,
"/wx/queryPrice/**"
);
// , "/wx/favorites/info", "/wx/favorites/itemList"
// , "/wx/keyword/recommend", "/wx/queryPrice/**");
}
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/interceptor/LoginInterceptor.java
View file @
75095e66
...
@@ -44,7 +44,9 @@ public class LoginInterceptor implements HandlerInterceptor {
...
@@ -44,7 +44,9 @@ public class LoginInterceptor implements HandlerInterceptor {
String
token
=
request
.
getHeader
(
"Authorization"
);
String
token
=
request
.
getHeader
(
"Authorization"
);
Switch
switchh
=
switchService
.
findOnly
();
Switch
switchh
=
switchService
.
findOnly
();
boolean
isOpen
=
Objects
.
nonNull
(
switchh
)
&&
switchh
.
getState
()
==
1
;
boolean
isOpen
=
Objects
.
nonNull
(
switchh
)
&&
switchh
.
getState
()
==
1
;
logger
.
info
(
"isOpen:"
+
isOpen
);
String
url
=
request
.
getRequestURI
();
String
url
=
request
.
getRequestURI
();
logger
.
info
(
"url:"
+
url
);
if
(!
isOpen
)
{
if
(!
isOpen
)
{
if
(
Arrays
.
asList
(
excludeUrl
).
contains
(
url
))
{
if
(
Arrays
.
asList
(
excludeUrl
).
contains
(
url
))
{
return
true
;
return
true
;
...
...
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