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
822ddb26
Commit
822ddb26
authored
Oct 12, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release-feat-zhangfeng' into 'release'
Release feat zhangfeng See merge request
!26
parents
01aadf5f
fc7a9aa2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
39 deletions
+24
-39
OrderVStrategy.java
.../module/member/mq/consumer/score/core/OrderVStrategy.java
+7
-7
ScoreRuleShareRecordServiceImpl.java
...ScoreRuleShareRecord/ScoreRuleShareRecordServiceImpl.java
+1
-1
OrderApi.java
.../main/java/cn/iocoder/boot/module/order/api/OrderApi.java
+2
-2
OrderApiImpl.java
.../java/cn/iocoder/yudao/module/order/api/OrderApiImpl.java
+3
-3
RewardServiceImpl.java
...yudao/module/reward/service/reward/RewardServiceImpl.java
+10
-7
RewardUpdateReqVO.java
...oder/yudao/module/reward/vo/reward/RewardUpdateReqVO.java
+1
-19
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/mq/consumer/score/core/OrderVStrategy.java
View file @
822ddb26
...
...
@@ -212,8 +212,8 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
userId
=
0L
;
}
}
// 校验首单
if
(!
isFirstOrderValid
(
user
Id
,
extraInfo
))
{
// 校验首单
:发货和收货都算首单,按客户查,只有发货人收货人都是首单才算首单
if
(!
isFirstOrderValid
(
consignorId
,
consignee
Id
,
extraInfo
))
{
return
null
;
}
// 校验积分上限,添加加分用户列表
...
...
@@ -260,14 +260,14 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
/**
* 校验是否为首单且首单是否有效
*/
private
boolean
isFirstOrderValid
(
Long
user
Id
,
ScoreRuleOrderVExtraVO
extraInfo
)
{
private
boolean
isFirstOrderValid
(
Long
consignorId
,
Long
consignee
Id
,
ScoreRuleOrderVExtraVO
extraInfo
)
{
if
(
extraInfo
.
getFirstOrder
()
==
YesOrNoTypeEnum
.
YES
.
ordinal
())
{
if
(
userId
==
null
||
userId
<=
0
)
{
log
.
info
(
"Order in shipping listener:
The user is not member,userId:{}"
,
use
rId
);
if
(
!
orderApi
.
isFirstOrder
(
consignorId
)
)
{
log
.
info
(
"Order in shipping listener:
consignor not first order,consignorId:{}"
,
consigno
rId
);
return
false
;
}
if
(!
orderApi
.
isFirstOrder
(
user
Id
))
{
log
.
info
(
"Order in shipping listener:
Not first order,userId:{}"
,
user
Id
);
if
(!
orderApi
.
isFirstOrder
(
consignee
Id
))
{
log
.
info
(
"Order in shipping listener:
consignee not first order,consigneeId:{}"
,
consignee
Id
);
return
false
;
}
}
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/ScoreRuleShareRecord/ScoreRuleShareRecordServiceImpl.java
View file @
822ddb26
...
...
@@ -72,7 +72,7 @@ public class ScoreRuleShareRecordServiceImpl extends AbstractService<ScoreRuleSh
if
(
item
.
getIpAddress
().
contains
(
"SHARE"
))
{
String
[]
split
=
item
.
getIpAddress
().
split
(
"_"
);
item
.
setIpAddress
(
split
[
split
.
length
-
1
]);
}
else
{
}
else
if
(
item
.
getIpAddress
().
contains
(
"RECOMMEND"
))
{
item
.
setIpAddress
(
"-"
);
}
item
.
setTypeZh
(
DictFrameworkUtils
.
getDictDataFromCache
(
"score_rule_type"
,
item
.
getType
().
toString
()).
getLabel
());
...
...
yudao-module-order/yudao-module-order-api/src/main/java/cn/iocoder/boot/module/order/api/OrderApi.java
View file @
822ddb26
...
...
@@ -14,9 +14,9 @@ public interface OrderApi {
*/
OrderRespDTO
getOrder
(
Long
id
,
String
orderNo
);
/**
* 判断
是否用户
首单
* 判断
客户是否
首单
*/
boolean
isFirstOrder
(
Long
us
erId
);
boolean
isFirstOrder
(
Long
custom
erId
);
/**
* 根据订单id获取所有订单项
*/
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/api/OrderApiImpl.java
View file @
822ddb26
...
...
@@ -87,9 +87,9 @@ public class OrderApiImpl implements OrderApi {
}
@Override
public
boolean
isFirstOrder
(
Long
us
erId
)
{
Long
count
=
orderService
.
selectCount
(
new
LambdaQueryWrapper
<
OrderDO
>().
eq
(
OrderDO:
:
getUserId
,
userId
));
return
count
<=
0
;
public
boolean
isFirstOrder
(
Long
custom
erId
)
{
// 只要发过货或者收过货都不算首单
return
orderConsignorService
.
selectCount
(
"customer_id"
,
customerId
)
<=
1
&&
orderConsigneeService
.
selectCount
(
"customer_id"
,
customerId
)
<=
1
;
}
@Override
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/service/reward/RewardServiceImpl.java
View file @
822ddb26
...
...
@@ -135,6 +135,13 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
throw
exception
(
REWARD_NOT_EXISTS
);
}
RewardDO
updateObj
=
new
RewardDO
();
// 此处为了兼容前端传值
List
<
RewardCreateReqVO
.
NodeAndPoints
>
nodeIds
=
updateReqVO
.
getNodeIds
();
if
(
CollectionUtil
.
isEmpty
(
nodeIds
))
{
throw
exception
(
REWARD_NODE_AND_POINTS_LIST_ERROR
);
}
RewardCreateReqVO
.
NodeAndPoints
nodeAndPoints
=
nodeIds
.
get
(
0
);
//未启用可编辑所有内容
if
(
rewardDO
.
getStatus
()
==
RewardStatusEnum
.
DISABLED
.
getValue
())
{
// 校验领取方式
...
...
@@ -150,19 +157,15 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
}
else
{
throw
exception
(
REWARD_START_OR_END_TIME_NOT_ALLOW
);
}
List
<
RewardUpdateReqVO
.
NodeAndPoints
>
nodeIds
=
updateReqVO
.
getNodeIds
();
if
(
CollectionUtil
.
isEmpty
(
nodeIds
))
{
throw
exception
(
REWARD_NODE_AND_POINTS_LIST_ERROR
);
}
RewardUpdateReqVO
.
NodeAndPoints
nodeAndPoints
=
nodeIds
.
get
(
0
);
updateObj
=
RewardConvert
.
INSTANCE
.
convert
(
updateReqVO
);
updateObj
.
setPointsRequire
(
nodeAndPoints
.
getPoints
());
updateObj
.
setNodeId
(
nodeAndPoints
.
getNodeId
());
updateObj
.
setNodeId
(
nodeAndPoints
.
getWareHouses
().
get
(
0
));
updateObj
.
setQuantityRemain
(
nodeAndPoints
.
getQuantityRemain
());
//已启用可编辑剩余数量和备注
}
else
if
(
rewardDO
.
getStatus
()
==
RewardStatusEnum
.
ENABLED
.
getValue
())
{
updateObj
.
setId
(
updateReqVO
.
getId
());
updateObj
.
setQuantityRemain
(
updateReqVO
.
getQuantityRemain
());
updateObj
.
setQuantityRemain
(
nodeAndPoints
.
getQuantityRemain
());
updateObj
.
setRemarkEn
(
updateReqVO
.
getRemarkEn
());
updateObj
.
setRemarkFr
(
updateReqVO
.
getRemarkFr
());
updateObj
.
setRemarkZh
(
updateReqVO
.
getRemarkZh
());
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardUpdateReqVO.java
View file @
822ddb26
...
...
@@ -44,19 +44,9 @@ public class RewardUpdateReqVO {
@ApiModelProperty
(
value
=
"法文礼品图片"
)
private
String
imgFr
;
//@ApiModelProperty(value = "兑换所需积分")
//@Min(value = 0)
//private Integer pointsRequire;
//@ApiModelProperty(value = "兑换网点")
//private Integer nodeId;
@ApiModelProperty
(
value
=
"兑换网点和积分列表"
,
required
=
true
)
@NotNull
(
message
=
"兑换网点列表不能为空"
)
private
List
<
RewardUpdateReqVO
.
NodeAndPoints
>
nodeIds
;
@ApiModelProperty
(
value
=
"剩余数量"
)
@Min
(
value
=
0
)
private
Integer
quantityRemain
;
private
List
<
RewardCreateReqVO
.
NodeAndPoints
>
nodeIds
;
@ApiModelProperty
(
value
=
"活动开始时间"
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
...
...
@@ -84,12 +74,4 @@ public class RewardUpdateReqVO {
@ApiModelProperty
(
value
=
"法文备注"
)
@Size
(
max
=
500
,
message
=
"法文备注长度不能超过500"
)
private
String
remarkFr
;
@Data
public
static
class
NodeAndPoints
{
@ApiModelProperty
(
value
=
"兑换网点"
)
private
Integer
nodeId
;
@ApiModelProperty
(
value
=
"兑换网点对应积分"
)
private
Integer
points
;
}
}
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