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
ccac072e
Commit
ccac072e
authored
Aug 02, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单V值删除单次获取最高积分逻辑
parent
b2238b69
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
OderVStrategy.java
...o/module/member/mq/consumer/score/core/OderVStrategy.java
+2
-3
ScoreRuleServiceImpl.java
...module/member/service/scoreRule/ScoreRuleServiceImpl.java
+2
-2
ScoreRuleBaseVO.java
...der/yudao/module/member/vo/scoreRule/ScoreRuleBaseVO.java
+4
-5
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/mq/consumer/score/core/OderVStrategy.java
View file @
ccac072e
...
...
@@ -107,9 +107,7 @@ public class OderVStrategy implements ScoreRuleStrategy {
BigDecimal
orgWVolume
=
order
.
getOrgWVolume
();
scoreCount
=
computeScoreCount
(
orgWVolume
,
orderVRules
);
}
if
(
scoreCount
>
scoreRuleDO
.
getGetScoreOnce
())
{
scoreCount
=
scoreRuleDO
.
getGetScoreOnce
();
}
else
if
(
scoreCount
<=
0
)
{
if
(
scoreCount
<=
0
)
{
log
.
info
(
"Order in shipping listener: The score count is less than or equal to 0,orderId:{}"
,
orderId
);
return
;
}
...
...
@@ -177,6 +175,7 @@ public class OderVStrategy implements ScoreRuleStrategy {
try
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"orderId"
,
orderId
);
// TODO:增加订单号和唯一键
memberUserScoreApi
.
operateScore
(
MemberUserScoreOperateReqDTO
.
builder
()
.
memberId
(
userId
)
.
scoreCount
(
scoreCount
)
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/scoreRule/ScoreRuleServiceImpl.java
View file @
ccac072e
...
...
@@ -58,10 +58,10 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
private
void
verifyCommon
(
ScoreRuleBaseVO
scoreRuleIn
)
{
//校验公共入参
if
(
scoreRuleIn
.
getGetScoreOnce
()
<=
0
)
{
if
(
scoreRuleIn
.
get
Type
()
!=
ScoreRuleTypeEnum
.
ORDER_V
.
getValue
()
&&
scoreRuleIn
.
get
GetScoreOnce
()
<=
0
)
{
throw
exception
(
SCORE_RULE_FIELD_ERROR
);
}
if
(
scoreRuleIn
.
getMaxScoreTotal
()
<=
0
)
{
if
(
scoreRuleIn
.
get
Type
()
!=
ScoreRuleTypeEnum
.
RECOMMEND
.
getValue
()
&&
scoreRuleIn
.
get
MaxScoreTotal
()
<=
0
)
{
throw
exception
(
SCORE_RULE_FIELD_ERROR
);
}
if
(
scoreRuleIn
.
getStartTime
().
after
((
scoreRuleIn
.
getEndTime
()))
||
scoreRuleIn
.
getEndTime
().
before
(
Date
.
from
(
Instant
.
now
())))
{
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/vo/scoreRule/ScoreRuleBaseVO.java
View file @
ccac072e
...
...
@@ -45,12 +45,11 @@ public class ScoreRuleBaseVO {
@ApiModelProperty
(
value
=
"封面图英文"
)
private
String
coverImageEn
;
@ApiModelProperty
(
value
=
"单次获取积分数,订单V值中代表单次最高获取积分数"
,
required
=
true
)
@NotNull
(
message
=
"单次获取积分数不能为空"
)
private
Integer
getScoreOnce
;
@ApiModelProperty
(
value
=
"单次获取积分数(订单V值不传)"
,
required
=
true
)
private
Integer
getScoreOnce
=
0
;
@ApiModelProperty
(
value
=
"累积最高积分(注册
直接传null
)"
,
required
=
true
)
private
Integer
maxScoreTotal
;
@ApiModelProperty
(
value
=
"累积最高积分(注册
不传
)"
,
required
=
true
)
private
Integer
maxScoreTotal
=
0
;
@ApiModelProperty
(
value
=
"活动开始时间"
,
required
=
true
)
@NotNull
(
message
=
"活动开始时间不能为空"
)
...
...
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