Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
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
youjj
cloud-platform
Commits
97889578
Commit
97889578
authored
Aug 30, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into jrz_dev
parents
a955cc3d
ed630904
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
20 deletions
+31
-20
AppAuthServiceImpl.java
...xiaoqi/security/auth/service/impl/AppAuthServiceImpl.java
+3
-3
AuthServiceImpl.java
...b/wxiaoqi/security/auth/service/impl/AuthServiceImpl.java
+3
-3
TourFeign.java
...src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
+1
-1
ArticleBiz.java
.../src/main/java/com/xxfc/platform/uccn/biz/ArticleBiz.java
+14
-11
ArticleMapper.java
...ain/java/com/xxfc/platform/uccn/mapper/ArticleMapper.java
+1
-1
ArticleMapper.xml
...x-uccn-server/src/main/resources/mapper/ArticleMapper.xml
+9
-1
No files found.
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/impl/AppAuthServiceImpl.java
View file @
97889578
...
...
@@ -123,16 +123,16 @@ public class AppAuthServiceImpl implements AuthService {
public
ObjectRestResponse
checkToken
(
String
token
)
{
try
{
if
(
StringUtils
.
isEmpty
(
token
)){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数不能为空"
);
return
ObjectRestResponse
.
createFailedResult
(
10003
,
"参数不能为空"
);
}
IJWTInfo
ijwtInfo
=
jwtTokenUtil
.
getInfoFromToken
(
token
);
if
(
ijwtInfo
==
null
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"token失效"
);
return
ObjectRestResponse
.
createFailedResult
(
10009
,
"token失效"
);
}
return
ObjectRestResponse
.
succ
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"token失效"
);
return
ObjectRestResponse
.
createFailedResult
(
10009
,
"token失效"
);
}
}
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/impl/AuthServiceImpl.java
View file @
97889578
...
...
@@ -120,16 +120,16 @@ public class AuthServiceImpl implements AuthService {
public
ObjectRestResponse
checkToken
(
String
token
)
{
try
{
if
(
StringUtils
.
isEmpty
(
token
)){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数不能为空"
);
return
ObjectRestResponse
.
createFailedResult
(
10003
,
"参数不能为空"
);
}
IJWTInfo
ijwtInfo
=
jwtTokenUtil
.
getInfoFromToken
(
token
);
if
(
ijwtInfo
==
null
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"token失效"
);
return
ObjectRestResponse
.
createFailedResult
(
10009
,
"token失效"
);
}
return
ObjectRestResponse
.
succ
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"token失效"
);
return
ObjectRestResponse
.
createFailedResult
(
10009
,
"token失效"
);
}
}
...
...
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
View file @
97889578
...
...
@@ -119,7 +119,7 @@ public interface TourFeign {
ObjectRestResponse
getOne
(
@PathVariable
Integer
id
);
//首页旅游列表
@GetMapping
(
value
=
"/gw/
app/
shopList"
)
@GetMapping
(
value
=
"/gw/shopList"
)
List
<
GoodDataVO
>
goodListAll
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"4"
)
Integer
limit
);
...
...
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/biz/ArticleBiz.java
View file @
97889578
...
...
@@ -12,6 +12,7 @@ import org.springframework.transaction.annotation.Transactional;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.security.SecureRandom
;
import
java.util.*
;
...
...
@@ -31,6 +32,8 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
private
final
Integer
HOME_PAGE_NUMBER
=
4
;
/**
* 文章列表
*
...
...
@@ -41,7 +44,7 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
*/
public
PageInfo
getArticleList
(
Integer
page
,
Integer
limit
,
Integer
type
)
{
PageHelper
.
startPage
(
page
,
limit
);
List
articleList
=
mapper
.
getArticleList
(
type
);
List
articleList
=
mapper
.
getArticleList
(
type
,
null
);
return
PageInfo
.
of
(
articleList
);
}
...
...
@@ -73,7 +76,7 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
*/
public
List
getThree
(
Integer
type
)
{
List
<
Article
>
articleList
=
mapper
.
getArticleList
(
type
);
List
<
Article
>
articleList
=
mapper
.
getArticleList
(
type
,
null
);
if
(!
Objects
.
isNull
(
articleList
))
{
int
size
=
articleList
.
size
();
if
(
RANDOM_NUMBER
>=
size
)
{
...
...
@@ -100,16 +103,16 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
* @return
*/
public
List
getHomePageArticle
(
Integer
type
)
{
List
<
Article
>
articleList
=
mapper
.
getArticleList
(
type
);
if
(
Objects
.
isNull
(
articleList
))
{
return
new
ArrayList
();
}
else
{
if
(
articleList
.
size
()
>
HOME_PAGE_NUMBER
)
{
return
articleList
.
subList
(
0
,
HOME_PAGE_NUMBER
);
}
else
{
List
<
Article
>
articleList
=
mapper
.
getArticleList
(
type
,
HOME_PAGE_NUMBER
);
//
if (Objects.isNull(articleList)) {
//
return new ArrayList();
//
} else {
//
if (articleList.size() > HOME_PAGE_NUMBER) {
//
return articleList.subList(0, HOME_PAGE_NUMBER);
//
} else {
return
articleList
;
}
}
//
}
//
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/mapper/ArticleMapper.java
View file @
97889578
...
...
@@ -15,5 +15,5 @@ public interface ArticleMapper extends Mapper<Article> {
* @param type
* @return
*/
List
<
Article
>
getArticleList
(
@Param
(
"type"
)
Integer
type
);
List
<
Article
>
getArticleList
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"limit"
)
Integer
limit
);
}
xx-uccn/xx-uccn-server/src/main/resources/mapper/ArticleMapper.xml
View file @
97889578
...
...
@@ -5,7 +5,15 @@
<select
id=
"getArticleList"
resultType=
"com.xxfc.platform.uccn.entity.Article"
>
select id, title,epitome,add_time,cover_image from article
where is_del=0 and status=1 and (type=#{type} or type=0) order by weight ASC ,add_time DESC
where
is_del=0
and status=1
and (type=#{type} or type=0)
order by
weight ASC ,add_time DESC
<if
test=
"limit != null"
>
limit #{limit}
</if>
</select>
</mapper>
\ No newline at end of file
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