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
76d55aaa
Commit
76d55aaa
authored
Dec 17, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-chw' of
http://113.105.137.151:22280/youjj/cloud-platform
into dev-chw
parents
100ce890
0e87c96b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
ArticleBiz.java
.../src/main/java/com/xxfc/platform/uccn/biz/ArticleBiz.java
+8
-6
ArticleController.java
...n/java/com/xxfc/platform/uccn/rest/ArticleController.java
+1
-1
ArticleAdminController.java
...xxfc/platform/uccn/rest/admin/ArticleAdminController.java
+2
-2
No files found.
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/biz/ArticleBiz.java
View file @
76d55aaa
...
@@ -32,17 +32,17 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
...
@@ -32,17 +32,17 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
private
final
Integer
HOME_PAGE_NUMBER
=
4
;
private
final
Integer
HOME_PAGE_NUMBER
=
4
;
/**
/**
* 文章列表
* 资讯列表
*
* @param page
* @param page
* @param limit
* @param limit
* @param type
* @param type
* @param title
* @param typeId
* @param flag 是否过滤未启用数据
* @return
* @return
*/
*/
public
PageInfo
getArticleList
(
Integer
page
,
Integer
limit
,
Integer
type
,
String
title
,
Integer
typeId
)
{
public
PageInfo
getArticleList
(
Integer
page
,
Integer
limit
,
Integer
type
,
String
title
,
Integer
typeId
,
boolean
flag
)
{
PageHelper
.
startPage
(
page
,
limit
);
PageHelper
.
startPage
(
page
,
limit
);
Example
example
=
new
Example
(
Article
.
class
);
Example
example
=
new
Example
(
Article
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
Example
.
Criteria
criteria
=
example
.
createCriteria
();
...
@@ -56,7 +56,9 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
...
@@ -56,7 +56,9 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
criteria
.
andEqualTo
(
"typeId"
,
typeId
);
criteria
.
andEqualTo
(
"typeId"
,
typeId
);
}
}
criteria
.
andEqualTo
(
"isDel"
,
0
);
criteria
.
andEqualTo
(
"isDel"
,
0
);
if
(
flag
)
{
criteria
.
andEqualTo
(
"status"
,
1
);
criteria
.
andEqualTo
(
"status"
,
1
);
}
example
.
orderBy
(
"weight"
).
asc
();
example
.
orderBy
(
"weight"
).
asc
();
return
PageInfo
.
of
(
mapper
.
selectByExample
(
example
));
return
PageInfo
.
of
(
mapper
.
selectByExample
(
example
));
}
}
...
...
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/rest/ArticleController.java
View file @
76d55aaa
...
@@ -28,7 +28,7 @@ public class ArticleController extends BaseController<ArticleBiz, Article> {
...
@@ -28,7 +28,7 @@ public class ArticleController extends BaseController<ArticleBiz, Article> {
@RequestParam
(
name
=
"type"
,
defaultValue
=
"1"
)
Integer
type
,
@RequestParam
(
name
=
"type"
,
defaultValue
=
"1"
)
Integer
type
,
@RequestParam
(
value
=
"title"
,
required
=
false
)
String
title
,
@RequestParam
(
value
=
"title"
,
required
=
false
)
String
title
,
@RequestParam
(
value
=
"typeId"
,
required
=
false
)
Integer
typeId
)
{
@RequestParam
(
value
=
"typeId"
,
required
=
false
)
Integer
typeId
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
getArticleList
(
page
,
limit
,
type
,
title
,
typeId
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
getArticleList
(
page
,
limit
,
type
,
title
,
typeId
,
true
));
}
}
@GetMapping
(
"/app/unauth/one"
)
@GetMapping
(
"/app/unauth/one"
)
...
...
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/rest/admin/ArticleAdminController.java
View file @
76d55aaa
...
@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
@Api
(
tags
=
{
"文章"
})
@Api
(
tags
=
{
"文章"
})
public
class
ArticleAdminController
extends
BaseController
<
ArticleBiz
,
Article
>
{
public
class
ArticleAdminController
extends
BaseController
<
ArticleBiz
,
Article
>
{
@GetMapping
(
"
/
list"
)
@GetMapping
(
"list"
)
@ApiOperation
(
value
=
"获取文章列表"
)
@ApiOperation
(
value
=
"获取文章列表"
)
public
ObjectRestResponse
getArticleList
(
public
ObjectRestResponse
getArticleList
(
@RequestParam
(
name
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
name
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
...
@@ -28,7 +28,7 @@ public class ArticleAdminController extends BaseController<ArticleBiz, Article>
...
@@ -28,7 +28,7 @@ public class ArticleAdminController extends BaseController<ArticleBiz, Article>
@RequestParam
(
name
=
"type"
,
defaultValue
=
"1"
)
Integer
type
,
@RequestParam
(
name
=
"type"
,
defaultValue
=
"1"
)
Integer
type
,
@RequestParam
(
value
=
"title"
,
required
=
false
)
String
title
,
@RequestParam
(
value
=
"title"
,
required
=
false
)
String
title
,
@RequestParam
(
value
=
"typeId"
,
required
=
false
)
Integer
typeId
)
{
@RequestParam
(
value
=
"typeId"
,
required
=
false
)
Integer
typeId
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
getArticleList
(
page
,
limit
,
type
,
title
,
typeId
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
getArticleList
(
page
,
limit
,
type
,
title
,
typeId
,
false
));
}
}
@GetMapping
(
"/app/unauth/one"
)
@GetMapping
(
"/app/unauth/one"
)
...
...
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