Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
41c191d3
Commit
41c191d3
authored
Jan 03, 2025
by
Smile
Committed by
wux
Jan 09, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员等级修改,1.定时任务从高等级往下匹配,2.可手动设置等级
parent
44c56a7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
14 deletions
+24
-14
MemberUserLevelDetailsController.java
.../admin/levelDetails/MemberUserLevelDetailsController.java
+19
-13
messages_en.properties
yudao-server/src/main/resources/i18n/messages_en.properties
+3
-1
messages_fr.properties
yudao-server/src/main/resources/i18n/messages_fr.properties
+2
-0
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/admin/levelDetails/MemberUserLevelDetailsController.java
View file @
41c191d3
...
...
@@ -50,28 +50,34 @@ public class MemberUserLevelDetailsController {
@ApiOperation
(
"更新等级详情"
)
public
CommonResult
<
Boolean
>
update
(
@Valid
@RequestBody
MemberUserLevelDetailsQueryVO
reqVO
)
{
Long
id
=
reqVO
.
getId
();
MemberUserLevelDetailsDO
memberUserLevelDetailsDO
=
memberUserLevelDetailsService
.
getById
(
id
);
if
(
memberUserLevelDetailsDO
==
null
)
{
return
error
(
ErrorCodeConstants
.
LEVEL_DETAILs_NOT_EXISTS
);
MemberUserLevelDetailsDO
memberUserLevelDetailsDO
;
if
(
reqVO
.
getId
()
!=
null
){
memberUserLevelDetailsDO
=
memberUserLevelDetailsService
.
getById
(
reqVO
.
getId
());
if
(
memberUserLevelDetailsDO
==
null
)
{
return
error
(
ErrorCodeConstants
.
LEVEL_DETAILs_NOT_EXISTS
);
}
}
else
{
memberUserLevelDetailsDO
=
new
MemberUserLevelDetailsDO
();
}
LambdaQueryWrapper
<
MemberUserLevelConfigDO
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
MemberUserLevelConfigDO:
:
getLevel
,
reqVO
.
getLevel
());
// 执行查询
MemberUserLevelConfigDO
configDO
=
memberUserLevelConfigMapper
.
selectOne
(
wrapper
);
if
(
configDO
==
null
){
return
error
(
ErrorCodeConstants
.
LEVEL_RULE_NOT_EXISTS
);
MemberUserLevelConfigDO
configDO
=
new
MemberUserLevelConfigDO
();
if
(
memberUserLevelDetailsDO
.
getConfigId
()!=
null
){
configDO
=
memberUserLevelConfigMapper
.
selectById
(
memberUserLevelDetailsDO
.
getConfigId
());
if
(
configDO
==
null
)
{
return
error
(
ErrorCodeConstants
.
LEVEL_RULE_NOT_EXISTS
);
}
if
(
configDO
.
getLevel
().
equals
(
reqVO
.
getLevel
())){
memberUserLevelDetailsDO
.
setConfigId
(
null
);
}
}
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
memberUserLevelDetailsDO
.
setLevel
(
reqVO
.
getLevel
());
memberUserLevelDetailsDO
.
setMemberId
(
reqVO
.
getMemberId
());
memberUserLevelDetailsDO
.
setValidityPeriod
(
reqVO
.
getValidityPeriod
());
memberUserLevelDetailsDO
.
setSpecificSettings
(
reqVO
.
getSpecificSettings
());
memberUserLevelDetailsDO
.
setRemarks
(
reqVO
.
getRemarks
());
memberUserLevelDetailsDO
.
setConfigId
(
configDO
.
getId
());
memberUserLevelDetailsDO
.
setUpdateTime
(
new
Date
());
memberUserLevelDetailsDO
.
setUpdater
(
String
.
valueOf
(
loginUser
.
getId
()));
memberUserLevelDetailsService
.
updateById
(
memberUserLevelDetailsDO
);
memberUserLevelDetailsService
.
saveOrUpdate
(
memberUserLevelDetailsDO
);
//添加操作日志
MemberUserLevelOperateLogDO
memberUserLevelOperateLogDo
=
MemberUserLevelOperateLogDO
.
builder
()
...
...
yudao-server/src/main/resources/i18n/messages_en.properties
View file @
41c191d3
...
...
@@ -1058,7 +1058,9 @@ currency.not.exist = currency not exist
date.format.error
=
date format error, for example : 2024-01-01 12:11:11
redeem.cancel.status.error
=
record status must be redeeming
level.bound.range.error
=
upper count must greater than lower count
level.bound.range.conflict
=
score range exist conflict
level.bound.range.conflict
=
score range exist conflict'
level.rule.not.exists
=
Membership level rule does not exist
level.details.not.exists
=
Membership level details do not exist
score.operate.idempotent.error
=
idempotent key conflict
score.rule.not.exists
=
score rule not exists
...
...
yudao-server/src/main/resources/i18n/messages_fr.properties
View file @
41c191d3
...
...
@@ -1057,6 +1057,8 @@ date.format.error=Format de date incorrect, format correct : 2024-01-01 12:11:11
redeem.cancel.status.error
=
Seules les enregistrements avec un statut "en
\u
00E9change" peuvent
\u
00EAtre annul
\u
00E9s
level.bound.range.error
=
La valeur sup
\u
00E9rieure doit
\u
00EAtre sup
\u
00E9rieure
\u
00E0 la valeur inf
\u
00E9rieure
level.bound.range.conflict
=
Conflit dans la plage des points de fid
\u
00E9lit
\u
00E9
level.rule.not.exists
=
La r
\u
00E8gle du niveau de membre n'existe pas
level.details.not.exists
=
Les d
\u
00E9tails du niveau de membre n'existent pas
score.operate.idempotent.error
=
Conflit de cl
\u
00E9 idempotente
score.rule.not.exists
=
La r
\u
00E8gle de points n'existe pas
...
...
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