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
a90de638
Commit
a90de638
authored
Dec 16, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
所有大于领取礼物日期的签到记录全部设置为无效,过去未领取的奖励作废
parent
91bf371a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/UserSignInDaoImpl.java
.../src/main/java/com/wwdz/ch/db/impl/UserSignInDaoImpl.java
+1
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserSigninServiceImpl.java
.../main/java/com/wwdz/ch/wx/impl/UserSigninServiceImpl.java
+21
-0
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/impl/UserSignInDaoImpl.java
View file @
a90de638
...
...
@@ -123,6 +123,7 @@ public class UserSignInDaoImpl implements UserSignInDao {
UserSignInExample
example
=
new
UserSignInExample
();
UserSignInExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getStartQueryTime
(),
criteria:
:
andCreateTimeGreaterThan
);
JdbcHelper
.
ifPresent
(
dto
.
getSignInDate
(),
criteria:
:
andSignInDateEqualTo
);
criteria
.
andUserIdEqualTo
(
dto
.
getUserId
());
criteria
.
andIsValidEqualTo
(
true
);
UserSignIn
userSignin
=
new
UserSignIn
();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserSigninServiceImpl.java
View file @
a90de638
...
...
@@ -163,6 +163,27 @@ public class UserSigninServiceImpl implements UserSigninService {
userSignInRequestDto
.
setUserId
(
dto
.
getUserId
());
userSignInRequestDto
.
setStartQueryTime
(
userSignin
.
getCreateTime
());
userSignInDao
.
updateInvalid
(
userSignInRequestDto
);
if
(
userSignin
.
getConsecutiveDays
()
>=
14
)
{
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
LocalDate
date
=
LocalDate
.
parse
(
dto
.
getSignInDate
(),
formatter
);
LocalDate
newDate
=
date
.
minusDays
(
7
);
String
newDateString
=
newDate
.
format
(
formatter
);
UserSignInRequestDto
beforeUpdateDto
=
new
UserSignInRequestDto
();
beforeUpdateDto
.
setUserId
(
dto
.
getUserId
());
beforeUpdateDto
.
setSignInDate
(
newDateString
);
userSignInDao
.
updateInvalid
(
beforeUpdateDto
);
}
if
(
userSignin
.
getConsecutiveDays
()
==
21
)
{
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
LocalDate
date
=
LocalDate
.
parse
(
dto
.
getSignInDate
(),
formatter
);
LocalDate
newDate
=
date
.
minusDays
(
14
);
String
newDateString
=
newDate
.
format
(
formatter
);
UserSignInRequestDto
beforeUpdateDto
=
new
UserSignInRequestDto
();
beforeUpdateDto
.
setUserId
(
dto
.
getUserId
());
beforeUpdateDto
.
setSignInDate
(
newDateString
);
userSignInDao
.
updateInvalid
(
beforeUpdateDto
);
}
//创建赠品订单
DistributionOrder
distributionOrder
=
new
DistributionOrder
();
...
...
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