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
954da1d1
Commit
954da1d1
authored
Oct 19, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单收货信息切换bug修复
parent
474b7897
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
11 deletions
+55
-11
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+55
-11
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 @
954da1d1
...
...
@@ -312,7 +312,17 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
String
creator
=
String
.
valueOf
(
loginUser
!=
null
?
loginUser
.
getId
()
:
null
);
Date
now
=
new
Date
();
if
(
Objects
.
nonNull
(
createReqVO
.
getHarvestMethod
())
&&
createReqVO
.
getHarvestMethod
()
==
2
)
{
order
.
setCountry
(
createReqVO
.
getCountry
());
order
.
setProvince
(
createReqVO
.
getProvince
());
order
.
setCity
(
createReqVO
.
getCity
());
order
.
setConsigneeAddress
(
createReqVO
.
getConsigneeAddress
());
}
else
{
order
.
setCountry
(
0L
);
order
.
setProvince
(
0L
);
order
.
setCity
(
0L
);
order
.
setConsigneeAddress
(
""
);
}
order
.
setCreator
(
creator
);
order
.
setUpdater
(
creator
);
order
.
setCreateTime
(
now
);
...
...
@@ -619,8 +629,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO
.
setCompanyEn
(
createReqVO
.
getConsigneeCompanyEn
());
orderConsigneeDO
.
setHarvestMethod
(
createReqVO
.
getHarvestMethod
());
// 收货方式
if
(
StringUtils
.
isNotBlank
(
createReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
createReqVO
.
getConsigneeAddress
());
if
(
Objects
.
nonNull
(
createReqVO
.
getHarvestMethod
())
&&
createReqVO
.
getHarvestMethod
()
==
2
)
{
if
(
StringUtils
.
isNotBlank
(
createReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
createReqVO
.
getConsigneeAddress
());
}
}
else
{
orderConsigneeDO
.
setAddress
(
""
);
}
orderConsigneeDO
.
setCountry
(
createReqVO
.
getCountry
());
orderConsigneeDO
.
setProvince
(
createReqVO
.
getProvince
());
...
...
@@ -879,9 +893,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO
.
setHarvestMethod
(
createReqVO
.
getHarvestMethod
());
//收货方式
if
(
StringUtils
.
isNotBlank
(
createReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
createReqVO
.
getConsigneeAddress
());
if
(
Objects
.
nonNull
(
createReqVO
.
getHarvestMethod
())
&&
createReqVO
.
getHarvestMethod
()
==
2
)
{
if
(
StringUtils
.
isNotBlank
(
createReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
createReqVO
.
getConsigneeAddress
());
}
}
else
{
orderConsigneeDO
.
setAddress
(
""
);
}
orderConsigneeDO
.
setCountry
(
createReqVO
.
getCountry
());
orderConsigneeDO
.
setProvince
(
createReqVO
.
getProvince
());
...
...
@@ -1627,7 +1644,17 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
Date
now
=
new
Date
();
updateObj
.
setUpdater
(
updater
);
updateObj
.
setUpdateTime
(
now
);
if
(
Objects
.
nonNull
(
updateReqVO
.
getHarvestMethod
())
&&
updateReqVO
.
getHarvestMethod
()
==
2
)
{
updateObj
.
setCountry
(
updateReqVO
.
getCountry
());
updateObj
.
setProvince
(
updateReqVO
.
getProvince
());
updateObj
.
setCity
(
updateReqVO
.
getCity
());
updateObj
.
setConsigneeAddress
(
updateReqVO
.
getConsigneeAddress
());
}
else
{
updateObj
.
setCountry
(
0L
);
updateObj
.
setProvince
(
0L
);
updateObj
.
setCity
(
0L
);
updateObj
.
setConsigneeAddress
(
""
);
}
departureDO
.
setUpdater
(
updater
);
departureDO
.
setUpdateTime
(
now
);
departureDO
.
setDepartureCountryId
(
logisticsInfoDto
.
getStartCountryId
());
...
...
@@ -2947,6 +2974,15 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeBackVO
.
setAddress
(
updateReqVO
.
getConsigneeAddress
());
orderConsigneeBackVO
.
setHarvestMethod
(
updateReqVO
.
getHarvestMethod
());
vo
.
setConsigneeVO
(
orderConsigneeBackVO
);
vo
.
setCountry
(
updateReqVO
.
getCountry
());
vo
.
setProvince
(
updateReqVO
.
getProvince
());
vo
.
setCity
(
updateReqVO
.
getCity
());
vo
.
setConsigneeAddress
(
updateReqVO
.
getConsigneeAddress
());
}
else
{
vo
.
setCountry
(
0L
);
vo
.
setProvince
(
0L
);
vo
.
setCity
(
0L
);
vo
.
setConsigneeAddress
(
""
);
}
applyInfoList
.
add
(
infoVO
);
}
...
...
@@ -3214,8 +3250,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
orderConsigneeDO
.
setCompanyEn
(
updateReqVO
.
getConsigneeCompanyEn
());
orderConsigneeDO
.
setHarvestMethod
(
updateReqVO
.
getHarvestMethod
());
// 收货方式
if
(
StringUtils
.
isNotBlank
(
updateReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
updateReqVO
.
getConsigneeAddress
());
if
(
Objects
.
nonNull
(
updateReqVO
.
getHarvestMethod
())
&&
updateReqVO
.
getHarvestMethod
()
==
2
)
{
if
(
StringUtils
.
isNotBlank
(
updateReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
updateReqVO
.
getConsigneeAddress
());
}
}
else
{
orderConsigneeDO
.
setAddress
(
""
);
}
orderConsigneeDO
.
setCountry
(
updateReqVO
.
getCountry
());
orderConsigneeDO
.
setProvince
(
updateReqVO
.
getProvince
());
...
...
@@ -3481,8 +3521,12 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
throw
exception
(
CONSIGNEE_PHONE_IS_EXTERNAL
);
}
orderConsigneeDO
.
setHarvestMethod
(
updateReqVO
.
getHarvestMethod
());
// 收货方式
if
(
StringUtils
.
isNotBlank
(
updateReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
updateReqVO
.
getConsigneeAddress
());
if
(
Objects
.
nonNull
(
updateReqVO
.
getHarvestMethod
())
&&
updateReqVO
.
getHarvestMethod
()
==
2
)
{
if
(
StringUtils
.
isNotBlank
(
updateReqVO
.
getConsigneeAddress
()))
{
orderConsigneeDO
.
setAddress
(
updateReqVO
.
getConsigneeAddress
());
}
}
else
{
orderConsigneeDO
.
setAddress
(
""
);
}
orderConsigneeDO
.
setOrderId
(
updateObj
.
getOrderId
());
orderConsigneeDO
.
setUpdater
(
updater
);
...
...
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