Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
f70fb10b
Commit
f70fb10b
authored
Dec 10, 2021
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改对接api 属性
Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent
9bbd1877
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/console/DeliveryInfoDTO.java
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/delivery/DeliveryService.java
+3
-8
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/console/DeliveryInfoDTO.java
View file @
f70fb10b
...
@@ -81,7 +81,7 @@ public class DeliveryInfoDTO {
...
@@ -81,7 +81,7 @@ public class DeliveryInfoDTO {
* 额外拓展属性 json
* 额外拓展属性 json
* @see cn.freemud.entities.dto.console.DeliveryInfoExpandFieldDTO
* @see cn.freemud.entities.dto.console.DeliveryInfoExpandFieldDTO
*/
*/
private
String
expandFields
;
private
DeliveryInfoExpandFieldDTO
expandFields
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/delivery/DeliveryService.java
View file @
f70fb10b
...
@@ -19,9 +19,7 @@ import cn.freemud.entities.dto.console.DeliveryInfoExpandFieldDTO;
...
@@ -19,9 +19,7 @@ import cn.freemud.entities.dto.console.DeliveryInfoExpandFieldDTO;
import
cn.freemud.entities.dto.console.NightDeliveryuInfo
;
import
cn.freemud.entities.dto.console.NightDeliveryuInfo
;
import
cn.freemud.entities.vo.ShoppingCartGoodsResponseVo
;
import
cn.freemud.entities.vo.ShoppingCartGoodsResponseVo
;
import
cn.freemud.utils.DateTimeUtil
;
import
cn.freemud.utils.DateTimeUtil
;
import
com.alibaba.fastjson.JSON
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -51,16 +49,14 @@ public interface DeliveryService {
...
@@ -51,16 +49,14 @@ public interface DeliveryService {
* @param amount 原始配送费价格
* @param amount 原始配送费价格
* @param expandFields 门店反馈的额外配送费配置
* @param expandFields 门店反馈的额外配送费配置
*/
*/
default
List
<
ExtraDeliveryDto
>
nightDeliveryAmountHandle
(
long
amount
,
String
expandFields
)
{
default
List
<
ExtraDeliveryDto
>
nightDeliveryAmountHandle
(
long
amount
,
DeliveryInfoExpandFieldDTO
expandFields
)
{
List
<
ExtraDeliveryDto
>
list
=
new
ArrayList
<>();
List
<
ExtraDeliveryDto
>
list
=
new
ArrayList
<>();
if
(
amount
>
0
)
{
if
(
amount
>
0
)
{
ExtraDeliveryDto
defaultAmount
=
new
ExtraDeliveryDto
(
ExtraDeliveryDto
.
TYPE_DEFAULT
,
amount
);
ExtraDeliveryDto
defaultAmount
=
new
ExtraDeliveryDto
(
ExtraDeliveryDto
.
TYPE_DEFAULT
,
amount
);
list
.
add
(
defaultAmount
);
list
.
add
(
defaultAmount
);
}
}
if
(
StringUtils
.
isNotBlank
(
expandFields
))
{
if
(
Objects
.
nonNull
(
expandFields
)
&&
CollectionUtils
.
isNotEmpty
(
expandFields
.
getNightDeliveryInfo
()))
{
DeliveryInfoExpandFieldDTO
expandField
=
JSON
.
parseObject
(
expandFields
,
DeliveryInfoExpandFieldDTO
.
class
);
for
(
NightDeliveryuInfo
info
:
expandFields
.
getNightDeliveryInfo
())
{
if
(
Objects
.
nonNull
(
expandField
)
&&
CollectionUtils
.
isNotEmpty
(
expandField
.
getNightDeliveryInfo
()))
{
for
(
NightDeliveryuInfo
info
:
expandField
.
getNightDeliveryInfo
())
{
if
(
info
.
getStatus
()
==
NightDeliveryuInfo
.
COMMON_STATUS_OPEN
)
{
if
(
info
.
getStatus
()
==
NightDeliveryuInfo
.
COMMON_STATUS_OPEN
)
{
// 当前时间在区间内
// 当前时间在区间内
try
{
try
{
...
@@ -81,7 +77,6 @@ public interface DeliveryService {
...
@@ -81,7 +77,6 @@ public interface DeliveryService {
}
}
}
}
}
}
}
return
list
;
return
list
;
}
}
...
...
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