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
01f41691
Commit
01f41691
authored
Jan 07, 2025
by
wux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "fix:手动更新会员等级信息后,等级记录中匹配规则不对。"
This reverts commit
cd1173d7
.
parent
4984806c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
23 deletions
+14
-23
MemberUserLevelDetailsController.java
.../admin/levelDetails/MemberUserLevelDetailsController.java
+14
-23
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 @
01f41691
...
@@ -50,42 +50,33 @@ public class MemberUserLevelDetailsController {
...
@@ -50,42 +50,33 @@ public class MemberUserLevelDetailsController {
@ApiOperation
(
"更新等级详情"
)
@ApiOperation
(
"更新等级详情"
)
public
CommonResult
<
Boolean
>
update
(
@Valid
@RequestBody
MemberUserLevelDetailsQueryVO
reqVO
)
{
public
CommonResult
<
Boolean
>
update
(
@Valid
@RequestBody
MemberUserLevelDetailsQueryVO
reqVO
)
{
MemberUserLevelDetailsDO
memberUserLevelDetailsDO
;
Long
id
=
reqVO
.
getId
()
;
if
(
reqVO
.
getId
()
!=
null
){
memberUserLevelDetailsDO
=
memberUserLevelDetailsService
.
getById
(
reqVO
.
getId
()
);
MemberUserLevelDetailsDO
memberUserLevelDetailsDO
=
memberUserLevelDetailsService
.
getById
(
id
);
if
(
memberUserLevelDetailsDO
==
null
)
{
if
(
memberUserLevelDetailsDO
==
null
)
{
return
error
(
ErrorCodeConstants
.
LEVEL_DETAILs_NOT_EXISTS
);
return
error
(
ErrorCodeConstants
.
LEVEL_DETAILs_NOT_EXISTS
);
}
}
}
else
{
LambdaQueryWrapper
<
MemberUserLevelConfigDO
>
wrapper
=
new
LambdaQueryWrapper
<>();
memberUserLevelDetailsDO
=
new
MemberUserLevelDetailsDO
();
wrapper
.
eq
(
MemberUserLevelConfigDO:
:
getLevel
,
reqVO
.
getLevel
());
}
// 执行查询
MemberUserLevelConfigDO
configDO
;
MemberUserLevelConfigDO
configDO
=
memberUserLevelConfigMapper
.
selectOne
(
wrapper
);
String
levelConfigName
=
""
;
if
(
configDO
==
null
){
if
(
memberUserLevelDetailsDO
.
getConfigId
()!=
null
){
configDO
=
memberUserLevelConfigMapper
.
selectById
(
memberUserLevelDetailsDO
.
getConfigId
());
if
(
configDO
==
null
)
{
return
error
(
ErrorCodeConstants
.
LEVEL_RULE_NOT_EXISTS
);
return
error
(
ErrorCodeConstants
.
LEVEL_RULE_NOT_EXISTS
);
}
}
if
(!
configDO
.
getLevel
().
equals
(
reqVO
.
getLevel
())){
memberUserLevelDetailsDO
.
setConfigId
(
null
);
}
else
{
levelConfigName
=
configDO
.
getName
();
}
}
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
memberUserLevelDetailsDO
.
setLevel
(
reqVO
.
getLevel
());
memberUserLevelDetailsDO
.
setLevel
(
reqVO
.
getLevel
());
memberUserLevelDetailsDO
.
setMemberId
(
reqVO
.
getMemberId
());
memberUserLevelDetailsDO
.
setValidityPeriod
(
reqVO
.
getValidityPeriod
());
memberUserLevelDetailsDO
.
setValidityPeriod
(
reqVO
.
getValidityPeriod
());
memberUserLevelDetailsDO
.
setSpecificSettings
(
reqVO
.
getSpecificSettings
());
memberUserLevelDetailsDO
.
setSpecificSettings
(
reqVO
.
getSpecificSettings
());
memberUserLevelDetailsDO
.
setRemarks
(
reqVO
.
getRemarks
());
memberUserLevelDetailsDO
.
setRemarks
(
reqVO
.
getRemarks
());
memberUserLevelDetailsDO
.
setConfigId
(
configDO
.
getId
());
memberUserLevelDetailsDO
.
setUpdateTime
(
new
Date
());
memberUserLevelDetailsDO
.
setUpdateTime
(
new
Date
());
memberUserLevelDetailsDO
.
setUpdater
(
String
.
valueOf
(
loginUser
.
getId
()));
memberUserLevelDetailsDO
.
setUpdater
(
String
.
valueOf
(
loginUser
.
getId
()));
memberUserLevelDetailsService
.
saveOrUpdate
(
memberUserLevelDetailsDO
);
memberUserLevelDetailsService
.
updateById
(
memberUserLevelDetailsDO
);
//添加操作日志
//添加操作日志
MemberUserLevelOperateLogDO
memberUserLevelOperateLogDo
=
MemberUserLevelOperateLogDO
.
builder
()
MemberUserLevelOperateLogDO
memberUserLevelOperateLogDo
=
MemberUserLevelOperateLogDO
.
builder
()
.
configId
(
memberUserLevelDetailsDO
.
getConfigId
())
.
configId
(
memberUserLevelDetailsDO
.
getConfigId
())
.
configName
(
levelConfigName
)
.
configName
(
configDO
.
getName
()
)
.
memberId
(
memberUserLevelDetailsDO
.
getMemberId
())
.
memberId
(
memberUserLevelDetailsDO
.
getMemberId
())
.
operator
(
loginUser
.
getNickname
())
.
operator
(
loginUser
.
getNickname
())
.
remarks
(
memberUserLevelDetailsDO
.
getRemarks
())
.
remarks
(
memberUserLevelDetailsDO
.
getRemarks
())
...
...
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