Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
1b914cc2
Commit
1b914cc2
authored
Jul 28, 2018
by
Menethil
Browse files
修改首页排序为按时间降序
parent
8adb227a
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsService.java
View file @
1b914cc2
...
...
@@ -21,6 +21,7 @@ public class LitemallGoodsService {
public
List
<
LitemallGoods
>
queryByHot
(
int
offset
,
int
limit
)
{
LitemallGoodsExample
example
=
new
LitemallGoodsExample
();
example
.
or
().
andIsHotEqualTo
(
true
).
andDeletedEqualTo
(
false
);
example
.
setOrderByClause
(
"add_time desc"
);
PageHelper
.
startPage
(
offset
,
limit
);
return
goodsMapper
.
selectByExample
(
example
);
}
...
...
@@ -28,6 +29,7 @@ public class LitemallGoodsService {
public
List
<
LitemallGoods
>
queryByNew
(
int
offset
,
int
limit
)
{
LitemallGoodsExample
example
=
new
LitemallGoodsExample
();
example
.
or
().
andIsNewEqualTo
(
true
).
andDeletedEqualTo
(
false
);
example
.
setOrderByClause
(
"add_time desc"
);
PageHelper
.
startPage
(
offset
,
limit
);
return
goodsMapper
.
selectByExample
(
example
);
}
...
...
@@ -35,6 +37,7 @@ public class LitemallGoodsService {
public
List
<
LitemallGoods
>
queryByCategory
(
List
<
Integer
>
catList
,
int
offset
,
int
limit
)
{
LitemallGoodsExample
example
=
new
LitemallGoodsExample
();
example
.
or
().
andCategoryIdIn
(
catList
).
andDeletedEqualTo
(
false
);
example
.
setOrderByClause
(
"add_time desc"
);
PageHelper
.
startPage
(
offset
,
limit
);
return
goodsMapper
.
selectByExample
(
example
);
}
...
...
@@ -48,6 +51,7 @@ public class LitemallGoodsService {
public
List
<
LitemallGoods
>
queryByCategory
(
Integer
catId
,
int
offset
,
int
limit
)
{
LitemallGoodsExample
example
=
new
LitemallGoodsExample
();
example
.
or
().
andCategoryIdEqualTo
(
catId
).
andDeletedEqualTo
(
false
);
example
.
setOrderByClause
(
"add_time desc"
);
PageHelper
.
startPage
(
offset
,
limit
);
return
goodsMapper
.
selectByExample
(
example
);
}
...
...
Write
Preview
Supports
Markdown
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