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
2bb309f0
Commit
2bb309f0
authored
Aug 15, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建订单为草稿订单时,重新编辑订单后,订单归属业务经理值为空的bug修复
parent
a7d5f3d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
OrderDO.java
...oder/yudao/module/order/dal/dataobject/order/OrderDO.java
+6
-0
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+8
-2
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/dataobject/order/OrderDO.java
View file @
2bb309f0
...
@@ -634,4 +634,10 @@ public class OrderDO extends BaseDO {
...
@@ -634,4 +634,10 @@ public class OrderDO extends BaseDO {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
Boolean
isChargeCustomer
;
private
Boolean
isChargeCustomer
;
@ApiModelProperty
(
value
=
"是否草稿订单变更"
)
@TableField
(
exist
=
false
)
private
Boolean
isChargeDraft
=
Boolean
.
FALSE
;
}
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
2bb309f0
...
@@ -1469,6 +1469,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -1469,6 +1469,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
isNull
(
oldOrderDO
))
{
if
(
Objects
.
isNull
(
oldOrderDO
))
{
throw
exception
(
ORDER_NOT_EXISTS
);
throw
exception
(
ORDER_NOT_EXISTS
);
}
}
if
(
oldOrderDO
.
getOrderNo
().
contains
(
"DRAFT"
)){
// 原单为草稿订单
updateObj
.
setIsChargeDraft
(
true
);
}
// 避免并发操作导致的订单编号覆盖,因订单编号为后台生成,所以订单编号更新以旧数据和新生成的为准,不使用前端传参参数
// 避免并发操作导致的订单编号覆盖,因订单编号为后台生成,所以订单编号更新以旧数据和新生成的为准,不使用前端传参参数
updateObj
.
setOrderNo
(
oldOrderDO
.
getOrderNo
());
updateObj
.
setOrderNo
(
oldOrderDO
.
getOrderNo
());
boolean
isResetOrderNo
=
Boolean
.
FALSE
;
boolean
isResetOrderNo
=
Boolean
.
FALSE
;
...
@@ -3043,7 +3047,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3043,7 +3047,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO
);
orderConsigneeDO
);
// 更新所属客户经理(业务员)
// 更新所属客户经理(业务员)
if
(!
OrderStatusEnum
.
DRAFT
.
getValue
().
equals
(
updateObj
.
getStatus
())
if
(!
OrderStatusEnum
.
DRAFT
.
getValue
().
equals
(
updateObj
.
getStatus
())
&&
Objects
.
nonNull
(
updateObj
.
getIsChargeCustomer
())
&&
updateObj
.
getIsChargeCustomer
())
{
&&
((
Objects
.
nonNull
(
updateObj
.
getIsChargeCustomer
())
&&
updateObj
.
getIsChargeCustomer
())
||
(
Objects
.
nonNull
(
updateObj
.
getIsChargeDraft
())
&&
updateObj
.
getIsChargeDraft
())))
{
addOrderCustomerService
(
updateObj
,
customerType
);
addOrderCustomerService
(
updateObj
,
customerType
);
}
}
}
}
...
@@ -3280,7 +3285,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -3280,7 +3285,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 更新所属客户经理(业务员)
// 更新所属客户经理(业务员)
if
(!
OrderStatusEnum
.
DRAFT
.
getValue
().
equals
(
updateObj
.
getStatus
())
if
(!
OrderStatusEnum
.
DRAFT
.
getValue
().
equals
(
updateObj
.
getStatus
())
&&
Objects
.
nonNull
(
updateObj
.
getIsChargeCustomer
())
&&
updateObj
.
getIsChargeCustomer
())
{
&&
((
Objects
.
nonNull
(
updateObj
.
getIsChargeCustomer
())
&&
updateObj
.
getIsChargeCustomer
())
||
(
Objects
.
nonNull
(
updateObj
.
getIsChargeDraft
())
&&
updateObj
.
getIsChargeDraft
())))
{
addOrderCustomerService
(
updateObj
,
customerType
);
addOrderCustomerService
(
updateObj
,
customerType
);
}
}
}
}
...
...
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