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
6866f3b6
Commit
6866f3b6
authored
Aug 28, 2023
by
muhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 足迹分页
parent
8f0580b4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
ch-dao/src/main/java/com/wwdz/ch/db/impl/FootPrintDaoImpl.java
...o/src/main/java/com/wwdz/ch/db/impl/FootPrintDaoImpl.java
+8
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FootPrintServiceImpl.java
...c/main/java/com/wwdz/ch/wx/impl/FootPrintServiceImpl.java
+4
-4
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/impl/FootPrintDaoImpl.java
View file @
6866f3b6
...
...
@@ -9,6 +9,7 @@ import com.wwdz.ch.db.mapper.FootprintMapper;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -33,6 +34,13 @@ public class FootPrintDaoImpl implements FootPrintDao {
FootprintExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
);
criteria
.
andDeletedEqualTo
(
false
);
// 现在
Date
now
=
new
Date
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
now
);
calendar
.
add
(
Calendar
.
MONTH
,
-
1
);
Date
month
=
calendar
.
getTime
();
criteria
.
andUpdateTimeGreaterThan
(
month
);
example
.
orderBy
(
"update_time desc"
);
PageHelper
.
startPage
(
page
,
size
);
List
<
Footprint
>
list
=
footprintMapper
.
selectByExample
(
example
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FootPrintServiceImpl.java
View file @
6866f3b6
...
...
@@ -96,16 +96,16 @@ public class FootPrintServiceImpl implements FootPrintService {
itemResponseVo
.
setHomePageImage
(
getImage
(
item
));
// 设置日期类型
if
(
footprint
.
get
Add
Time
().
compareTo
(
today
)
>=
0
)
{
if
(
footprint
.
get
Update
Time
().
compareTo
(
today
)
>=
0
)
{
itemResponseVo
.
setTimeType
(
1
);
}
if
(
footprint
.
get
AddTime
().
compareTo
(
yesterday
)
>=
0
&&
footprint
.
getAdd
Time
().
compareTo
(
today
)
<
0
)
{
if
(
footprint
.
get
UpdateTime
().
compareTo
(
yesterday
)
>=
0
&&
footprint
.
getUpdate
Time
().
compareTo
(
today
)
<
0
)
{
itemResponseVo
.
setTimeType
(
2
);
}
if
(
footprint
.
get
AddTime
().
compareTo
(
week
)
>=
0
&&
footprint
.
getAdd
Time
().
compareTo
(
yesterday
)
<
0
)
{
if
(
footprint
.
get
UpdateTime
().
compareTo
(
week
)
>=
0
&&
footprint
.
getUpdate
Time
().
compareTo
(
yesterday
)
<
0
)
{
itemResponseVo
.
setTimeType
(
3
);
}
if
(
footprint
.
get
AddTime
().
compareTo
(
month
)
>=
0
&&
footprint
.
getAdd
Time
().
compareTo
(
week
)
<
0
)
{
if
(
footprint
.
get
UpdateTime
().
compareTo
(
month
)
>=
0
&&
footprint
.
getUpdate
Time
().
compareTo
(
week
)
<
0
)
{
itemResponseVo
.
setTimeType
(
4
);
}
...
...
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