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
75672463
Commit
75672463
authored
Oct 17, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(601): 订单V值触发修改
parent
6302496a
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
196 additions
and
92 deletions
+196
-92
OrderVStrategy.java
.../module/member/mq/consumer/score/core/OrderVStrategy.java
+119
-59
ScoreRuleService.java
...dao/module/member/service/scoreRule/ScoreRuleService.java
+7
-9
ScoreRuleServiceImpl.java
...module/member/service/scoreRule/ScoreRuleServiceImpl.java
+12
-22
OrderApi.java
.../main/java/cn/iocoder/boot/module/order/api/OrderApi.java
+5
-0
OrderOperateLogDTO.java
...iocoder/boot/module/order/api/dto/OrderOperateLogDTO.java
+42
-0
OrderRespDTO.java
...va/cn/iocoder/boot/module/order/api/dto/OrderRespDTO.java
+0
-2
OrderApiImpl.java
.../java/cn/iocoder/yudao/module/order/api/OrderApiImpl.java
+11
-0
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 @
75672463
This diff is collapsed.
Click to expand it.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/scoreRule/ScoreRuleService.java
View file @
75672463
...
...
@@ -109,20 +109,12 @@ public interface ScoreRuleService extends IService<ScoreRuleDO> {
ScoreRuleDO
getEnabledOrderVScoreRuleByTransportType
(
Integer
transportType
);
/**
* 根据类型获取已启用积分规则
* 根据类型获取已启用积分规则
(仅推荐和注册)
* @param scoreRuleType
* @return
*/
ScoreRuleDO
getEnableScoreRuleByType
(
ScoreRuleTypeEnum
scoreRuleType
);
/**
* 根据类型获取已启用积分规则(带运输类型)
* @param scoreRuleType
* @param transportType
* @return
*/
ScoreRuleDO
getEnableScoreRuleByType
(
ScoreRuleTypeEnum
scoreRuleType
,
TransportTypeEnum
transportType
);
List
<
WarehouseTreeRegionSimpleVO
>
getWarehouseTreeRegionListSimple
();
/**
...
...
@@ -151,4 +143,10 @@ public interface ScoreRuleService extends IService<ScoreRuleDO> {
* @return
*/
Boolean
setScoreRuleSwitch
(
SwitchReqVo
switchReqVo
);
/**
* 获取当前时间已启用的订单V值规则
* @return
*/
List
<
ScoreRuleDO
>
getEnableOrderVRule
();
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/scoreRule/ScoreRuleServiceImpl.java
View file @
75672463
...
...
@@ -31,6 +31,7 @@ import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleRegisterExtraV
import
cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleShareExtraVO
;
import
cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRulerRecommendExtraVO
;
import
cn.iocoder.yudao.module.system.api.user.AdminUserApi
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.ListUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -596,28 +597,6 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
return
enableScoreRule
;
}
@Override
public
ScoreRuleDO
getEnableScoreRuleByType
(
ScoreRuleTypeEnum
scoreRuleType
,
TransportTypeEnum
transportType
)
{
ScoreRuleDO
enableScoreRule
;
switch
(
scoreRuleType
)
{
case
ORDER_V:
enableScoreRule
=
scoreRuleRedisDao
.
getEnableScoreRule
(
scoreRuleType
,
transportType
);
if
(
enableScoreRule
==
null
)
{
enableScoreRule
=
getEnabledOrderVScoreRuleByTransportType
(
transportType
.
getValue
());
if
(
enableScoreRule
==
null
)
{
return
null
;
}
scoreRuleRedisDao
.
setEnableScoreRule
(
enableScoreRule
);
}
return
enableScoreRule
;
case
RECOMMEND:
case
REGISTER:
return
getEnableScoreRuleByType
(
scoreRuleType
);
default
:
return
null
;
}
}
@Override
public
List
<
WarehouseTreeRegionSimpleVO
>
getWarehouseTreeRegionListSimple
()
{
List
<
WarehouseTreeRegionVO
>
list
=
ListUtils
.
sum
(
...
...
@@ -726,4 +705,15 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
public
Boolean
setScoreRuleSwitch
(
SwitchReqVo
switchReqVo
)
{
return
scoreRuleRedisDao
.
setScoreRuleSwitch
(
switchReqVo
.
getSwitchState
());
}
@Override
public
List
<
ScoreRuleDO
>
getEnableOrderVRule
()
{
LambdaQueryWrapper
<
ScoreRuleDO
>
queryWrapper
=
new
LambdaQuery
<
ScoreRuleDO
>()
.
eq
(
ScoreRuleDO:
:
getType
,
ScoreRuleTypeEnum
.
ORDER_V
.
getValue
())
.
eq
(
ScoreRuleDO:
:
getStatus
,
ScoreRuleStatusEnum
.
ENABLED
.
getValue
())
.
lt
(
ScoreRuleDO:
:
getStartTime
,
LocalDateTime
.
now
())
.
gt
(
ScoreRuleDO:
:
getEndTime
,
LocalDateTime
.
now
());
List
<
ScoreRuleDO
>
scoreRuleDOS
=
scoreRuleMapper
.
selectList
(
queryWrapper
);
return
scoreRuleDOS
;
}
}
yudao-module-order/yudao-module-order-api/src/main/java/cn/iocoder/boot/module/order/api/OrderApi.java
View file @
75672463
package
cn
.
iocoder
.
boot
.
module
.
order
.
api
;
import
cn.iocoder.boot.module.order.api.dto.OrderItemRespDTO
;
import
cn.iocoder.boot.module.order.api.dto.OrderOperateLogDTO
;
import
cn.iocoder.boot.module.order.api.dto.OrderRespDTO
;
import
java.util.List
;
...
...
@@ -21,6 +22,10 @@ public interface OrderApi {
* 根据订单id获取所有订单项
*/
List
<
OrderItemRespDTO
>
getOrderItemsByOrderId
(
Long
orderId
);
/**
* 添加订单操作日志
*/
void
createOrderOperateLog
(
OrderOperateLogDTO
orderId
);
/**
...
...
yudao-module-order/yudao-module-order-api/src/main/java/cn/iocoder/boot/module/order/api/dto/OrderOperateLogDTO.java
0 → 100644
View file @
75672463
package
cn
.
iocoder
.
boot
.
module
.
order
.
api
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
/**
* 订单操作日志 DTO
*/
@Data
public
class
OrderOperateLogDTO
{
@ApiModelProperty
(
value
=
"订单ID"
,
required
=
true
)
@NotNull
(
message
=
"订单ID不能为空"
)
private
Long
orderId
;
@ApiModelProperty
(
value
=
"变更后订单详情数据"
)
private
String
body
;
@ApiModelProperty
(
value
=
"请求地址"
)
private
String
requestUrl
;
@ApiModelProperty
(
value
=
"变更类型"
)
private
String
type
;
@ApiModelProperty
(
value
=
"变更描述"
)
private
String
msg
;
@ApiModelProperty
(
value
=
"备注说明"
)
private
String
note
;
@ApiModelProperty
(
value
=
"操作人类型:1 会员 2 管理员"
)
private
Integer
userType
;
@ApiModelProperty
(
value
=
"创建者"
)
private
String
creator
;
@ApiModelProperty
(
value
=
"创建者名称"
)
private
String
creatorName
;
}
yudao-module-order/yudao-module-order-api/src/main/java/cn/iocoder/boot/module/order/api/dto/OrderRespDTO.java
View file @
75672463
package
cn
.
iocoder
.
boot
.
module
.
order
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
@Data
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/api/OrderApiImpl.java
View file @
75672463
...
...
@@ -13,6 +13,8 @@ import cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderObjective.OrderObjectiveDO
;
import
cn.iocoder.yudao.module.order.service.order.*
;
import
cn.iocoder.yudao.module.order.service.order.impl.OrderItemServiceImpl
;
import
cn.iocoder.yudao.module.order.service.orderOperateLog.OrderOperateLogService
;
import
cn.iocoder.yudao.module.order.vo.orderOperateLog.OrderOperateLogCreateReqVO
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.google.common.base.Joiner
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -45,6 +47,8 @@ public class OrderApiImpl implements OrderApi {
private
OrderItemServiceImpl
orderItemService
;
@Resource
private
OrderConsignorService
orderConsignorService
;
@Resource
private
OrderOperateLogService
orderOperateLogService
;
@Override
public
OrderRespDTO
getOrder
(
Long
id
,
String
orderNo
)
{
...
...
@@ -101,6 +105,13 @@ public class OrderApiImpl implements OrderApi {
return
null
;
}
@Override
public
void
createOrderOperateLog
(
OrderOperateLogDTO
orderOperateLogDTO
)
{
OrderOperateLogCreateReqVO
createReqVO
=
new
OrderOperateLogCreateReqVO
();
BeanUtils
.
copyProperties
(
orderOperateLogDTO
,
createReqVO
);
orderOperateLogService
.
createOrderAsyncOperateLog
(
createReqVO
);
}
@Override
public
boolean
mergeOrder
(
Long
customerIdSaved
,
Long
customerIdDeleted
)
{
...
...
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