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
98a91803
Commit
98a91803
authored
Aug 28, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改新闻系列接口
parent
7bc73f87
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
Article.java
.../src/main/java/com/xxfc/platform/uccn/entity/Article.java
+2
-0
ArticleBiz.java
.../src/main/java/com/xxfc/platform/uccn/biz/ArticleBiz.java
+1
-1
ArticleMapper.xml
...x-uccn-server/src/main/resources/mapper/ArticleMapper.xml
+1
-1
No files found.
xx-uccn/xx-uccn-api/src/main/java/com/xxfc/platform/uccn/entity/Article.java
View file @
98a91803
...
...
@@ -10,6 +10,7 @@ import tk.mybatis.mapper.annotation.KeySql;
import
tk.mybatis.mapper.code.IdentityDialect
;
import
javax.persistence.Column
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.util.Date
;
...
...
@@ -26,6 +27,7 @@ public class Article {
@Id
@KeySql
(
dialect
=
IdentityDialect
.
MYSQL
)
// @GeneratedValue(generator = "JDBC")
private
Integer
id
;
/**
* 标题
...
...
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/biz/ArticleBiz.java
View file @
98a91803
...
...
@@ -135,7 +135,7 @@ public class ArticleBiz extends BaseBiz<ArticleMapper, Article> {
Example
exa
=
Example
.
builder
(
Article
.
class
).
where
(
WeekendSqls
.<
Article
>
custom
()
.
andEqualTo
(
Article:
:
getIsDel
,
0
)
).
build
();
).
orderByAsc
(
"weight"
).
orderByDesc
(
"addTime"
).
build
();
List
<
Article
>
articles
=
mapper
.
selectByExample
(
exa
);
return
PageInfo
.
of
(
articles
);
...
...
xx-uccn/xx-uccn-server/src/main/resources/mapper/ArticleMapper.xml
View file @
98a91803
...
...
@@ -5,7 +5,7 @@
<select
id=
"getArticleList"
resultType=
"com.xxfc.platform.uccn.entity.Article"
>
select title,epitome,add_time,cover_image from article
where is_del=0 and status=1 and (type=#{type} or type=0) order by weight
DESC
,add_time DESC
where is_del=0 and status=1 and (type=#{type} or type=0) order by weight
ASC
,add_time DESC
</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