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
684db67a
Commit
684db67a
authored
Aug 09, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单单询异常处理业务暂定
parent
bc49f8b0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
0 deletions
+79
-0
ErrorCodeConstants.java
.../iocoder/yudao/module/order/enums/ErrorCodeConstants.java
+6
-0
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+9
-0
OrderExceptionServiceImpl.java
...der/service/orderException/OrderExceptionServiceImpl.java
+45
-0
messages.properties
yudao-server/src/main/resources/i18n/messages.properties
+6
-0
messages_en.properties
yudao-server/src/main/resources/i18n/messages_en.properties
+7
-0
messages_zh.properties
yudao-server/src/main/resources/i18n/messages_zh.properties
+6
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/enums/ErrorCodeConstants.java
View file @
684db67a
...
...
@@ -394,4 +394,10 @@ public interface ErrorCodeConstants {
ErrorCode
ORDER_IS_PRE_INSTALLED
=
new
ErrorCode
(
1004001153
,
"order.is.pre.installed"
);
ErrorCode
ORDER_IS_NOT_PRE_INSTALLED
=
new
ErrorCode
(
1004001154
,
"order.is.not.pre.installed"
);
ErrorCode
ORDER_ITEM_CHARGING_NOT_NULL
=
new
ErrorCode
(
1004001155
,
"order.item.charging.not.null"
);
ErrorCode
ORDER_ITEM_IS_PAY_ADVANCE_NOT_NULL
=
new
ErrorCode
(
1004001156
,
"order.item.is.pay.advance.not.null"
);
ErrorCode
FREIGHT_CURRENCY_NOT_NULL
=
new
ErrorCode
(
1004001157
,
"order.item.freight.currency.not.null"
);
ErrorCode
FREIGHT_UNIT_NOT_NULL
=
new
ErrorCode
(
1004001158
,
"order.item.freight.unit.not.null"
);
ErrorCode
CLEARANCE_CURRENCY_NOT_NULL
=
new
ErrorCode
(
1004001159
,
"order.item.clearance.currency.not.null"
);
ErrorCode
CLEARANCE_UNIT_NOT_NULL
=
new
ErrorCode
(
1004001160
,
"order.item.clearance.unit.not.null"
);
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
View file @
684db67a
...
...
@@ -542,6 +542,15 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
continue
;
}
}
if
(
type
==
12
)
{
// 单询异常的参数单独处理, 以传参为准
it
.
setCharging
(
channelPriceParam
.
getCharging
());
it
.
setIsPayAdvance
(
channelPriceParam
.
getIsPayAdvance
());
it
.
setSeaFreightCurrency
(
channelPriceParam
.
getFreightCurrencyId
());
it
.
setSeaFreightVolume
(
channelPriceParam
.
getFreightUnitId
());
it
.
setClearanceFreightCurrency
(
channelPriceParam
.
getClearanceCurrencyId
());
it
.
setClearanceFreightVolume
(
channelPriceParam
.
getClearanceUnitId
());
}
if
(
it
.
getSeaFreightCurrency
()
==
0
||
it
.
getSeaFreightVolume
()
==
0L
)
{
throw
exception
(
ORDER_NO_QUOTE_NOT_CUSTOM_PRICE
);
}
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderException/OrderExceptionServiceImpl.java
View file @
684db67a
...
...
@@ -1005,11 +1005,53 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
if
(
Objects
.
isNull
(
channelPrice
.
getOrderItemId
()))
{
throw
exception
(
ORDER_ITEM_NOT_EXISTS
);
}
//得到以前的费用
OrderItemDO
orderItemDO
=
orderItemService
.
getOrderItem
(
channelPrice
.
getOrderItemId
());
if
(
Objects
.
isNull
(
orderItemDO
))
{
throw
exception
(
ORDER_ITEM_NOT_EXISTS
);
}
if
(
Objects
.
isNull
(
orderItemDO
.
getOneSeaFreight
())
||
orderItemDO
.
getOneSeaFreight
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
// TODO 当原商品未报价(运费值为0时)即可以自定义收费模式、货币单位、计量单位
if
(
Objects
.
isNull
(
channelPrice
.
getCharging
()))
{
throw
exception
(
ORDER_ITEM_CHARGING_NOT_NULL
);
}
orderItemDO
.
setCharging
(
channelPrice
.
getCharging
());
if
(
Objects
.
isNull
(
channelPrice
.
getIsPayAdvance
()))
{
throw
exception
(
ORDER_ITEM_IS_PAY_ADVANCE_NOT_NULL
);
}
orderItemDO
.
setIsPayAdvance
(
channelPrice
.
getIsPayAdvance
()
?
1
:
0
);
if
(
Objects
.
isNull
(
channelPrice
.
getIsPayAdvance
()))
{
throw
exception
(
ORDER_ITEM_IS_PAY_ADVANCE_NOT_NULL
);
}
if
(
Objects
.
isNull
(
channelPrice
.
getFreightCurrencyId
()))
{
throw
exception
(
FREIGHT_CURRENCY_NOT_NULL
);
}
orderItemDO
.
setSeaFreightCurrency
(
Math
.
toIntExact
(
channelPrice
.
getFreightCurrencyId
()));
if
(
Objects
.
isNull
(
channelPrice
.
getFreightUnitId
()))
{
throw
exception
(
FREIGHT_UNIT_NOT_NULL
);
}
orderItemDO
.
setSeaFreightVolume
(
channelPrice
.
getFreightUnitId
());
if
(
channelPrice
.
getCharging
()
==
0
){
if
(
Objects
.
isNull
(
channelPrice
.
getClearanceCurrencyId
()))
{
throw
exception
(
CLEARANCE_CURRENCY_NOT_NULL
);
}
orderItemDO
.
setClearanceFreightCurrency
(
Math
.
toIntExact
(
channelPrice
.
getClearanceCurrencyId
()));
if
(
Objects
.
isNull
(
channelPrice
.
getClearanceUnitId
()))
{
throw
exception
(
CLEARANCE_UNIT_NOT_NULL
);
}
orderItemDO
.
setClearanceFreightVolume
(
channelPrice
.
getClearanceUnitId
());
}
}
else
{
// TODO 如果原订单商品价格非未报价,则不采用前端传值的货币单位、计量单位、收费方式、是否预付等参数,以原有参数为准
channelPrice
.
setCharging
(
orderItemDO
.
getCharging
());
channelPrice
.
setIsPayAdvance
(
Objects
.
nonNull
(
orderItemDO
.
getIsPayAdvance
())
&&
orderItemDO
.
getIsPayAdvance
()
==
1
);
channelPrice
.
setFreightCurrencyId
(
Long
.
valueOf
(
orderItemDO
.
getSeaFreightCurrency
()));
channelPrice
.
setFreightUnitId
(
orderItemDO
.
getSeaFreightVolume
());
channelPrice
.
setClearanceCurrencyId
(
Long
.
valueOf
(
orderItemDO
.
getClearanceFreightCurrency
()));
channelPrice
.
setClearanceUnitId
(
orderItemDO
.
getClearanceFreightVolume
());
}
if
(
orderItemDO
.
getCharging
()
==
0
)
{
// 运费+清关费,两者都为0则不是自定义价格
if
(
channelPrice
.
getFreightFee
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
&&
channelPrice
.
getClearanceFee
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
...
...
@@ -1021,12 +1063,15 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
continue
;
}
}
channelPrice
.
setExceptionId
(
vo
.
getOrderExceptionId
());
channelPrice
.
setExceptionResultId
(
orderExceptionResult
.
getId
());
orderExceptionChannelPriceService
.
createExceptionChannelPrice
(
channelPrice
);
OrderChangePriceParam
priceParam
=
new
OrderChangePriceParam
();
BeanUtil
.
copyProperties
(
channelPrice
,
priceParam
);
priceParam
.
setFreightCurrencyId
(
orderItemDO
.
getSeaFreightCurrency
());
priceParam
.
setClearanceCurrencyId
(
orderItemDO
.
getClearanceFreightCurrency
());
inquiryPriceParams
.
add
(
priceParam
);
...
...
yudao-server/src/main/resources/i18n/messages.properties
View file @
684db67a
...
...
@@ -262,3 +262,9 @@ order.already.in.merge.pkg=
customer.is.new.or.old.no.change
=
order.is.pre.installed
=
order.is.not.pre.installed
=
order.item.charging.not.null
=
order.item.is.pay.advance.not.null
=
order.item.freight.currency.not.null
=
order.item.freight.unit.not.null
=
order.item.clearance.currency.not.null
=
order.item.clearance.unit.not.null
=
\ No newline at end of file
yudao-server/src/main/resources/i18n/messages_en.properties
View file @
684db67a
...
...
@@ -999,3 +999,10 @@ customer.is.new.or.old.no.change=customer current business type is {}, it's no c
order.is.pre.installed
=
Order pre installed
customer.delay.approval.times.more.then.one
=
delay approval times more then one
order.is.not.pre.installed
=
Order not pre installed, unable to package together
order.item.charging.not.null
=
The billing method for order products cannot be empty
order.item.is.pay.advance.not.null
=
Whether the ordered goods have been prepaid cannot be left blank
order.item.freight.currency.not.null
=
The currency unit for the shipping cost of the order item cannot be empty
order.item.freight.unit.not.null
=
The unit of measurement for shipping fees for order items cannot be empty
order.item.clearance.currency.not.null
=
Customs clearance fee for order goods, currency unit cannot be empty
order.item.clearance.unit.not.null
=
The unit of measurement for customs clearance fees for order goods cannot be empty
yudao-server/src/main/resources/i18n/messages_zh.properties
View file @
684db67a
...
...
@@ -1002,3 +1002,9 @@ order.already.in.merge.pkg=\u8BA2\u5355\u5DF2\u5728\u5408\u5305\u7BB1\u4E0B
customer.is.new.or.old.no.change
=
\u
5BA2
\u6237\u
5F53
\u
524D
\u
4E1A
\u
7EE9
\u
7C7B
\u
578B
\u
662F{}
\u
5BA2
\u6237\u
FF0C
\u
4E0D
\u9700\u8981\u
66F4
\u
65B0
order.is.pre.installed
=
\u
8BA2
\u5355\u
5DF2
\u9884\u
88C5
order.is.not.pre.installed
=
\u
8ba2
\u5355\u
672a
\u9884\u
88c5
\u
ff0c
\u
4e0d
\u
80fd
\u5408\u5305
order.item.charging.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
8ba1
\u
8d39
\u
65b9
\u
5f0f
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
order.item.is.pay.advance.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
662f
\u5426\u9884\u
4ed8
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
order.item.freight.currency.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
8fd0
\u
8d39
\u
8d27
\u
5e01
\u5355\u
4f4d
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
order.item.freight.unit.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
8fd0
\u
8d39
\u
8ba1
\u
91cf
\u5355\u
4f4d
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
order.item.clearance.currency.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
6e05
\u5173\u
8d39
\u
8d27
\u
5e01
\u5355\u
4f4d
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
order.item.clearance.unit.not.null
=
\u
8ba2
\u5355\u5546\u
54c1
\u
6e05
\u5173\u
8d39
\u
8ba1
\u
91cf
\u5355\u
4f4d
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
\ No newline at end of file
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