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
2bcdd4c4
Commit
2bcdd4c4
authored
Dec 12, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发布的商品不符合规定就取消签到记录
parent
d4718040
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
...va/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
+5
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserSigninServiceImpl.java
.../main/java/com/wwdz/ch/wx/impl/UserSigninServiceImpl.java
+7
-0
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/SysSupplierItemServiceImpl.java
View file @
2bcdd4c4
...
...
@@ -616,14 +616,17 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
//发送短息通知用户商品违规被下架,跳转到个人藏馆
String
url
=
wxAppletApi
.
getUrlLink
(
"/pages/saleSelf/index"
,
"userId="
+
oldItem
.
getCreatorId
()
+
"&shareRecordId="
);
String
msg
=
"您发布的"
+
oldItem
.
getName
()
+
",内容涉嫌违反平台规定,已被平台下架,请前往"
+
url
+
"查看"
;
aliSmsSender
.
sendSms
(
oldItem
.
getCreatorId
(),
msg
);
//如果用户今天签到了,则取消签到记录
UserSignIn
todaySignIn
=
userSignInDao
.
findTodayRecord
(
oldItem
.
getCreatorId
());
if
(
todaySignIn
!=
null
)
{
UserSignIn
updateDto
=
new
UserSignIn
();
updateDto
.
setId
(
todaySignIn
.
getId
());
// updateDto.set
updateDto
.
setIsValid
(
false
);
userSignInDao
.
updateByPrimaryKey
(
updateDto
);
msg
=
"您发布的"
+
oldItem
.
getName
()
+
",内容涉嫌违反平台规定,已被平台下架,并取消了今天的签到记录,请前往"
+
url
+
"查看"
;
}
aliSmsSender
.
sendSms
(
oldItem
.
getCreatorId
(),
msg
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"违规下架失败 error : {}"
,
e
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserSigninServiceImpl.java
View file @
2bcdd4c4
...
...
@@ -86,6 +86,7 @@ public class UserSigninServiceImpl implements UserSigninService {
userSignin
.
setCreateTime
(
new
Date
());
userSignin
.
setUpdateTime
(
new
Date
());
userSignin
.
setConsecutiveDays
(
1
);
userSignin
.
setTotalConsecutiveDays
(
1
);
userSignin
.
setIsGet
(
false
);
userSignin
.
setIsReward
(
false
);
userSignin
.
setRewardLevel
(
SigninEnum
.
LevelEnum
.
ZERO
.
getCode
());
...
...
@@ -102,6 +103,8 @@ public class UserSigninServiceImpl implements UserSigninService {
consecutiveDays
=
yesterdaySignin
.
getConsecutiveDays
()
+
1
;
}
userSignin
.
setConsecutiveDays
(
consecutiveDays
);
userSignin
.
setTotalConsecutiveDays
(
yesterdaySignin
.
getTotalConsecutiveDays
()
+
1
);
switch
(
consecutiveDays
)
{
case
7
:
userSignin
.
setIsReward
(
true
);
...
...
@@ -221,6 +224,10 @@ public class UserSigninServiceImpl implements UserSigninService {
resultMap
.
put
(
"needConsecutiveDays"
,
7
);
}
}
//连续签到天数
UserSignIn
lastedRecord
=
userSignInDao
.
findLastedRecord
(
userId
);
resultMap
.
put
(
"totalConsecutiveDays"
,
lastedRecord
.
getTotalConsecutiveDays
()
==
null
?
0
:
lastedRecord
.
getTotalConsecutiveDays
());
//当前是几号
LocalDate
today
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyyMMdd"
);
...
...
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