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
c9447d36
Commit
c9447d36
authored
Dec 27, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
当订单从无收货人改为有收货人时需要冗余创建时间与创建人,以便新增订单收货人信息
parent
bb93aac5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+9
-3
OrderConsigneeBackVO.java
.../module/order/vo/orderConsignee/OrderConsigneeBackVO.java
+8
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
c9447d36
...
...
@@ -2079,6 +2079,8 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeBackVO
=
new
OrderConsigneeBackVO
();
// 会走这里,说明订单从无收货人改为有收货人
orderConsigneeBackVO
.
setIsCharge
(
true
);
orderConsigneeBackVO
.
setCreateTime
(
now
);
orderConsigneeBackVO
.
setCreator
(
updater
);
}
orderConsigneeBackVO
.
setCustomerNumber
(
consigneeDO
.
getNumber
());
}
...
...
@@ -5861,7 +5863,7 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
}
//
boolean
isConsignorChange
=
orderConsignorDO
!=
null
&&
!
Objects
.
equals
(
consignorVO
.
getCustomerId
(),
orderConsignorDO
.
getCustomerId
());
boolean
isConsigneeChange
=
orderConsigneeDO
!=
null
&&
Objects
.
nonNull
(
consigneeVO
)
&&
!
Objects
.
equals
(
consigneeVO
.
getCustomerId
(),
orderConsigneeDO
.
getCustomerId
(
));
boolean
isConsigneeChange
=
(
orderBackVO
.
getIsChargeNoConsignee
()
&&
orderConsigneeDO
!=
null
)
||
(
orderConsigneeDO
==
null
&&
Objects
.
nonNull
(
consigneeVO
))
||
(
orderConsigneeDO
!=
null
&&
Objects
.
nonNull
(
consigneeVO
)
&&
!
Objects
.
equals
(
consigneeVO
.
getCustomerId
(),
orderConsigneeDO
.
getCustomerId
()
));
// 收发货人信息变更
OrderConsignorDO
consignorDO
=
OrderConsignorConvert
.
INSTANCE
.
convert
(
consignorVO
);
...
...
@@ -5873,12 +5875,16 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
// 控货订单发货人无收货人属性变动,需要清空订单收货人信息
Boolean
isLimitUpdateConsignee
=
Boolean
.
FALSE
;
if
(
orderBackVO
.
getIsChargeNoConsignee
())
{
if
(
Objects
.
nonNull
(
c
onsigneeDO
))
{
orderConsigneeService
.
removeById
(
c
onsigneeDO
.
getId
());
if
(
Objects
.
nonNull
(
orderC
onsigneeDO
))
{
orderConsigneeService
.
removeById
(
orderC
onsigneeDO
.
getId
());
}
}
else
{
if
(
Objects
.
nonNull
(
consigneeDO
))
{
// 这里可能是由无收货人修改为有收货人,主键id为null
if
(
Objects
.
isNull
(
consigneeDO
.
getId
())){
consigneeDO
.
setUpdateTime
(
consigneeVO
.
getCreateTime
());
consigneeDO
.
setUpdater
(
consigneeVO
.
getCreator
());
}
orderConsigneeService
.
saveOrUpdate
(
consigneeDO
);
if
(
orderBackVO
.
getIsCargoControl
())
{
// 控货订单有收货人则限制修改收货人
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/orderConsignee/OrderConsigneeBackVO.java
View file @
c9447d36
package
cn
.
iocoder
.
yudao
.
module
.
order
.
vo
.
orderConsignee
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.*
;
import
java.util.*
;
...
...
@@ -104,6 +106,12 @@ public class OrderConsigneeBackVO {
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
true
)
private
Date
createTime
;
/**
* 创建者,目前使用 SysUser 的 id 编号
*
* 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
*/
private
String
creator
;
@ApiModelProperty
(
value
=
"是否变动业绩归属"
)
private
Boolean
isCharge
=
false
;
...
...
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