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
5a5a7b18
Commit
5a5a7b18
authored
Nov 10, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据时间范围筛选
parent
d85a8d41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
ch-dao/src/main/java/com/wwdz/ch/db/impl/ImRecordDaoImpl.java
...ao/src/main/java/com/wwdz/ch/db/impl/ImRecordDaoImpl.java
+11
-4
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/impl/ImRecordDaoImpl.java
View file @
5a5a7b18
...
@@ -34,17 +34,24 @@ public class ImRecordDaoImpl implements ImRecordDao {
...
@@ -34,17 +34,24 @@ public class ImRecordDaoImpl implements ImRecordDao {
ImRecordExample
.
Criteria
criteria
=
imRecordExample
.
createCriteria
();
ImRecordExample
.
Criteria
criteria
=
imRecordExample
.
createCriteria
();
criteria
.
andFromAccountEqualTo
(
dto
.
getFromAccount
())
criteria
.
andFromAccountEqualTo
(
dto
.
getFromAccount
())
.
andToAccountEqualTo
(
dto
.
getToAccount
());
.
andToAccountEqualTo
(
dto
.
getToAccount
());
if
(
StringUtils
.
hasLength
(
dto
.
getStartTime
()))
{
criteria
.
andMsgTimeGreaterThanOrEqualTo
(
DateUtils
.
parseString
(
dto
.
getStartTime
()));
}
if
(
StringUtils
.
hasLength
(
dto
.
getEndTime
()))
{
criteria
.
andMsgTimeLessThanOrEqualTo
(
DateUtils
.
parseString
(
dto
.
getEndTime
()));
}
imRecordExample
.
or
(
imRecordExample
.
createCriteria
()
ImRecordExample
.
Criteria
orCriteria
=
imRecordExample
.
createCriteria
();
imRecordExample
.
or
(
orCriteria
.
andFromAccountEqualTo
(
dto
.
getToAccount
())
.
andFromAccountEqualTo
(
dto
.
getToAccount
())
.
andToAccountEqualTo
(
dto
.
getFromAccount
()));
.
andToAccountEqualTo
(
dto
.
getFromAccount
()));
if
(
StringUtils
.
hasLength
(
dto
.
getStartTime
()))
{
if
(
StringUtils
.
hasLength
(
dto
.
getStartTime
()))
{
imRecordExample
.
createCriteria
()
.
andMsgTimeGreaterThanOrEqualTo
(
DateUtils
.
parseString
(
dto
.
getStartTime
()));
orCriteria
.
andMsgTimeGreaterThanOrEqualTo
(
DateUtils
.
parseString
(
dto
.
getStartTime
()));
}
}
if
(
StringUtils
.
hasLength
(
dto
.
getEndTime
()))
{
if
(
StringUtils
.
hasLength
(
dto
.
getEndTime
()))
{
imRecordExample
.
createCriteria
()
.
andMsgTimeLessThanOrEqualTo
(
DateUtils
.
parseString
(
dto
.
getEndTime
()));
orCriteria
.
andMsgTimeLessThanOrEqualTo
(
DateUtils
.
parseString
(
dto
.
getEndTime
()));
}
}
imRecordExample
.
orderBy
(
"msg_time
a
sc"
);
imRecordExample
.
orderBy
(
"msg_time
de
sc"
);
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
return
imRecordMapper
.
selectByExampleWithBLOBs
(
imRecordExample
);
return
imRecordMapper
.
selectByExampleWithBLOBs
(
imRecordExample
);
}
}
...
...
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