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
3759d55c
Commit
3759d55c
authored
Aug 13, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户端积分日志
parent
75e7e80c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
23 deletions
+38
-23
AppMemberUserScoreLogRespVO.java
...troller/app/userScore/vo/AppMemberUserScoreLogRespVO.java
+10
-6
MemberUserScoreLogServiceImpl.java
...ember/service/scoreLog/MemberUserScoreLogServiceImpl.java
+28
-17
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/userScore/vo/AppMemberUserScoreLogRespVO.java
View file @
3759d55c
...
...
@@ -18,6 +18,8 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@NoArgsConstructor
@AllArgsConstructor
public
class
AppMemberUserScoreLogRespVO
{
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"积分数量"
)
private
Integer
scoreCount
;
@ApiModelProperty
(
value
=
"操作类型"
)
...
...
@@ -28,12 +30,12 @@ public class AppMemberUserScoreLogRespVO {
private
String
sourceTypeZh
;
@ApiModelProperty
(
value
=
"积分来源英文"
)
private
String
sourceTypeEn
;
@ApiModelProperty
(
value
=
"积分规则id"
)
private
Long
ruleId
;
@ApiModelProperty
(
value
=
"积分规则名称中文"
)
private
String
ruleNameZh
;
@ApiModelProperty
(
value
=
"积分规则名称英文"
)
private
String
ruleNameEn
;
//
@ApiModelProperty(value = "积分规则id")
//
private Long ruleId;
//
@ApiModelProperty(value = "积分规则名称中文")
//
private String ruleNameZh;
//
@ApiModelProperty(value = "积分规则名称英文")
//
private String ruleNameEn;
@ApiModelProperty
(
value
=
"日志时间"
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
createTime
;
...
...
@@ -43,4 +45,6 @@ public class AppMemberUserScoreLogRespVO {
private
String
descEn
=
""
;
@ApiModelProperty
(
value
=
"礼品兑换数量"
)
private
Integer
rewardCount
;
@ApiModelProperty
(
value
=
"是否过期"
)
private
Boolean
expired
=
false
;
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/scoreLog/MemberUserScoreLogServiceImpl.java
View file @
3759d55c
...
...
@@ -94,6 +94,33 @@ public class MemberUserScoreLogServiceImpl extends AbstractService<MemberUserSco
}
ArrayList
<
AppMemberUserScoreLogRespVO
>
appMemberUserScoreLogRespVOS
=
new
ArrayList
<>();
for
(
MemberUserScoreLogDO
userScoreLogDO
:
userScoreLogDOS
)
{
if
(
userScoreLogDO
.
getSourceType
()
==
ScoreSourceTypeEnum
.
SYSTEM_EXPIRED
.
getValue
())
{
HashMap
hashMap
=
JsonUtils
.
parseObject
(
userScoreLogDO
.
getExtParam
(),
HashMap
.
class
);
Object
scoreLogIds
=
hashMap
.
get
(
"scoreLogIds"
);
List
<
Long
>
scoreLogIdList
=
JsonUtils
.
parseArray
(
scoreLogIds
.
toString
(),
Long
.
class
);
for
(
Long
scoreLogId
:
scoreLogIdList
)
{
for
(
MemberUserScoreLogDO
scoreLogDO
:
userScoreLogDOS
)
{
if
(
scoreLogDO
.
getId
().
equals
(
scoreLogId
)
&&
scoreLogDO
.
getRuleId
()
!=
null
)
{
ScoreRuleBackDetailVO
scoreRule
=
scoreRuleService
.
getScoreRule
(
scoreLogDO
.
getRuleId
());
if
(
scoreRule
!=
null
)
{
AppMemberUserScoreLogRespVO
appMemberUserScoreLogRespVO
=
new
AppMemberUserScoreLogRespVO
(
userScoreLogDO
.
getId
(),
userScoreLogDO
.
getScoreCount
()
,
"-"
,
scoreLogDO
.
getSourceType
()
,
DictFrameworkUtils
.
getDictDataFromCache
(
"member_score_source"
,
scoreLogDO
.
getSourceType
().
toString
()).
getLabel
()
,
DictFrameworkUtils
.
getDictDataFromCache
(
"member_score_source"
,
scoreLogDO
.
getSourceType
().
toString
()).
getLabelEn
()
,
userScoreLogDO
.
getCreateTime
()
,
scoreRule
.
getDescEn
()
,
scoreRule
.
getDescZh
()
,
userScoreLogDO
.
getScoreCount
()
,
true
);
appMemberUserScoreLogRespVOS
.
add
(
appMemberUserScoreLogRespVO
);
}
}
}
}
continue
;
}
setScoreRuleLogDetail
(
userScoreLogDO
,
appMemberUserScoreLogRespVOS
);
}
return
appMemberUserScoreLogRespVOS
;
...
...
@@ -101,6 +128,7 @@ public class MemberUserScoreLogServiceImpl extends AbstractService<MemberUserSco
private
void
setScoreRuleLogDetail
(
MemberUserScoreLogDO
userScoreLogDO
,
ArrayList
<
AppMemberUserScoreLogRespVO
>
appMemberUserScoreLogRespVOS
)
{
AppMemberUserScoreLogRespVO
appMemberUserScoreLogRespVO
=
new
AppMemberUserScoreLogRespVO
();
appMemberUserScoreLogRespVO
.
setId
(
userScoreLogDO
.
getId
());
appMemberUserScoreLogRespVO
.
setSourceType
(
userScoreLogDO
.
getSourceType
());
appMemberUserScoreLogRespVO
.
setScoreCount
(
userScoreLogDO
.
getScoreCount
());
appMemberUserScoreLogRespVO
.
setOperateType
(
userScoreLogDO
.
getOperateType
()
==
1
?
"+"
:
"-"
);
...
...
@@ -115,14 +143,6 @@ public class MemberUserScoreLogServiceImpl extends AbstractService<MemberUserSco
appMemberUserScoreLogRespVO
.
setDescZh
(
"人工积分"
);
appMemberUserScoreLogRespVO
.
setDescEn
(
"Manually add points"
);
break
;
// 撤销兑换
case
4
:
appMemberUserScoreLogRespVO
.
setSourceTypeZh
(
DictFrameworkUtils
.
getDictDataFromCache
(
"member_score_source"
,
"4"
).
getLabel
());
appMemberUserScoreLogRespVO
.
setSourceTypeEn
(
DictFrameworkUtils
.
getDictDataFromCache
(
"member_score_source"
,
"4"
).
getLabelEn
());
// TODO:补充描述
appMemberUserScoreLogRespVO
.
setDescZh
(
DictFrameworkUtils
.
getDictDataFromCache
(
"member_score_source"
,
"4"
).
getLabel
());
appMemberUserScoreLogRespVO
.
setDescEn
(
DictFrameworkUtils
.
getDictDataFromCache
(
"member_score_source"
,
"4"
).
getLabelEn
());
break
;
// 活动积分
case
5
:
case
6
:
...
...
@@ -133,9 +153,6 @@ public class MemberUserScoreLogServiceImpl extends AbstractService<MemberUserSco
appMemberUserScoreLogRespVO
.
setSourceTypeEn
(
DictFrameworkUtils
.
getDictDataFromCache
(
"member_score_source"
,
String
.
valueOf
(
scoreSourceTypeEnum
.
getValue
())).
getLabelEn
());
ScoreRuleBackDetailVO
scoreRule
=
scoreRuleService
.
getScoreRule
(
userScoreLogDO
.
getRuleId
());
if
(
scoreRule
!=
null
)
{
appMemberUserScoreLogRespVO
.
setRuleId
(
userScoreLogDO
.
getRuleId
());
appMemberUserScoreLogRespVO
.
setRuleNameEn
(
scoreRule
.
getTitleEn
());
appMemberUserScoreLogRespVO
.
setRuleNameZh
(
scoreRule
.
getTitleZh
());
appMemberUserScoreLogRespVO
.
setDescEn
(
scoreRule
.
getDescEn
());
appMemberUserScoreLogRespVO
.
setDescZh
(
scoreRule
.
getDescZh
());
}
...
...
@@ -167,12 +184,6 @@ public class MemberUserScoreLogServiceImpl extends AbstractService<MemberUserSco
}
}
break
;
// 系统过期
case
3
:
appMemberUserScoreLogRespVO
.
setSourceTypeZh
(
DictFrameworkUtils
.
getDictDataFromCache
(
"member_score_source"
,
"3"
).
getLabel
());
appMemberUserScoreLogRespVO
.
setSourceTypeEn
(
DictFrameworkUtils
.
getDictDataFromCache
(
"member_score_source"
,
"3"
).
getLabelEn
());
appMemberUserScoreLogRespVO
.
setDescZh
(
"系统过期"
);
appMemberUserScoreLogRespVO
.
setDescEn
(
"System expiration"
);
}
}
appMemberUserScoreLogRespVOS
.
add
(
appMemberUserScoreLogRespVO
);
...
...
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