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
04497658
Commit
04497658
authored
Feb 26, 2025
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refactor-currency-rate' into release
parents
8300fc7c
bd7eeeb8
Changes
30
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
962 additions
and
256 deletions
+962
-256
20250222-currency-rate.sql
sql/v2.4/20250222-currency-rate.sql
+62
-0
ExchangeRateRespDTO.java
...udao/module/ecw/api/currency/dto/ExchangeRateRespDTO.java
+9
-1
ErrorCodeConstants.java
...cn/iocoder/yudao/module/ecw/enums/ErrorCodeConstants.java
+7
-1
CurrencyRateController.java
...controller/admin/currencyRate/CurrencyRateController.java
+86
-0
CurrencyRateConvert.java
.../module/ecw/convert/currencyRate/CurrencyRateConvert.java
+17
-0
CurrencyRateDO.java
...odule/ecw/dal/dataobject/currencyRate/CurrencyRateDO.java
+71
-0
CurrencyRateLogDO.java
...le/ecw/dal/dataobject/currencyRate/CurrencyRateLogDO.java
+72
-0
CurrencyRateLogMapper.java
...ule/ecw/dal/mysql/currencyRate/CurrencyRateLogMapper.java
+9
-0
CurrencyRateMapper.java
...module/ecw/dal/mysql/currencyRate/CurrencyRateMapper.java
+37
-0
CurrecyApiImpl.java
.../iocoder/yudao/module/ecw/service/api/CurrecyApiImpl.java
+58
-145
CurrencyRateService.java
.../module/ecw/service/currencyRate/CurrencyRateService.java
+166
-0
CurrencyRateServiceImpl.java
...ule/ecw/service/currencyRate/CurrencyRateServiceImpl.java
+128
-0
CurrencyRateCreateReqVO.java
...o/module/ecw/vo/currencyRate/CurrencyRateCreateReqVO.java
+47
-0
CurrencyRateQueryParamVO.java
.../module/ecw/vo/currencyRate/CurrencyRateQueryParamVO.java
+38
-0
CurrencyRateUpdateReqVO.java
...o/module/ecw/vo/currencyRate/CurrencyRateUpdateReqVO.java
+34
-0
LadingTemplateMapper.xml
.../resources/mapper/ladingTemplate/LadingTemplateMapper.xml
+0
-12
WarehouseMapper.xml
...w-impl/src/resources/mapper/warehouse/WarehouseMapper.xml
+0
-12
ZhongPaoMapper.xml
...ecw-impl/src/resources/mapper/zhongPao/ZhongPaoMapper.xml
+0
-12
OrderBusinessServiceImpl.java
...le/order/service/order/impl/OrderBusinessServiceImpl.java
+10
-5
OrderQueryServiceImpl.java
...odule/order/service/order/impl/OrderQueryServiceImpl.java
+78
-51
ProdCostCalculation.java
...r/yudao/module/product/component/ProdCostCalculation.java
+7
-7
CouponServiceImpl.java
...module/product/service/coupon/impl/CouponServiceImpl.java
+6
-2
ProductPriceServiceImpl.java
...product/service/product/impl/ProductPriceServiceImpl.java
+2
-2
AirBillReceivableExcelExportListener.java
...ipment/listener/AirBillReceivableExcelExportListener.java
+1
-1
ShipmentReceivableExcelExportListener2.java
...ment/listener/ShipmentReceivableExcelExportListener2.java
+1
-1
MakeBillOfLadingServiceImpl.java
...service/makeBillOfLading/MakeBillOfLadingServiceImpl.java
+1
-1
ReceiptController.java
...le/wealth/controller/admin/receipt/ReceiptController.java
+3
-2
messages_en.properties
yudao-server/src/main/resources/i18n/messages_en.properties
+4
-0
messages_fr.properties
yudao-server/src/main/resources/i18n/messages_fr.properties
+4
-1
messages_zh.properties
yudao-server/src/main/resources/i18n/messages_zh.properties
+4
-0
No files found.
sql/v2.4/20250222-currency-rate.sql
0 → 100644
View file @
04497658
CREATE
TABLE
IF
NOT
EXISTS
`ecw_currency_rate`
(
`id`
BIGINT
AUTO_INCREMENT
,
`source_id`
BIGINT
NOT
NULL
COMMENT
'原币种'
,
`target_id`
BIGINT
NOT
NULL
COMMENT
'支付币种'
,
`source_amount`
DECIMAL
(
14
,
4
)
NOT
NULL
COMMENT
'原币种金额'
,
`target_amount`
DECIMAL
(
14
,
4
)
NOT
NULL
COMMENT
'支付币种金额'
,
`countries`
JSON
NOT
NULL
COMMENT
'国家'
,
`expiration`
DATE
NOT
NULL
COMMENT
'有效日期'
,
`remarks`
VARCHAR
(
255
)
NULL
COMMENT
'备注'
,
`creator`
VARCHAR
(
32
)
NOT
NULL
COMMENT
'创建者'
,
`create_time`
DATETIME
NOT
NULL
COMMENT
'创建时间'
,
`updater`
VARCHAR
(
32
)
NOT
NULL
COMMENT
'更新者'
,
`update_time`
DATETIME
NOT
NULL
COMMENT
'更新时间'
,
`deleted`
BIT
(
1
)
NOT
NULL
DEFAULT
b
'0'
COMMENT
'是否删除'
,
PRIMARY
KEY
(
`id`
)
)
COMMENT
'币种汇率表'
;
CREATE
TABLE
IF
NOT
EXISTS
`ecw_currency_rate_log`
(
`id`
BIGINT
AUTO_INCREMENT
,
`rate_id`
BIGINT
NOT
NULL
COMMENT
'汇率编号'
,
`source_amount1`
DECIMAL
(
14
,
4
)
NOT
NULL
COMMENT
'修改前原币种金额'
,
`source_amount2`
DECIMAL
(
14
,
4
)
NOT
NULL
COMMENT
'修改后原币种金额'
,
`target_amount1`
DECIMAL
(
14
,
4
)
NOT
NULL
COMMENT
'修改前支付币种金额'
,
`target_amount2`
DECIMAL
(
14
,
4
)
NOT
NULL
COMMENT
'修改后支付币种金额'
,
`expiration1`
DATE
NOT
NULL
COMMENT
'修改前有效期'
,
`expiration2`
DATE
NOT
NULL
COMMENT
'修改后有效期'
,
`remarks`
VARCHAR
(
255
)
NULL
COMMENT
'备注'
,
`creator`
VARCHAR
(
32
)
NOT
NULL
COMMENT
'创建者'
,
`create_time`
DATETIME
NOT
NULL
COMMENT
'创建时间'
,
`updater`
VARCHAR
(
32
)
NOT
NULL
COMMENT
'更新者'
,
`update_time`
DATETIME
NOT
NULL
COMMENT
'更新时间'
,
`deleted`
BIT
(
1
)
NOT
NULL
DEFAULT
b
'0'
COMMENT
'是否删除'
,
PRIMARY
KEY
(
`id`
)
)
COMMENT
'币种汇率变更表'
;
BEGIN
;
INSERT
INTO
`system_dict_type`
(
`name`
,
`type`
,
`status`
,
`remark`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
)
VALUES
(
'货币汇率状态'
,
'currency_rate_status'
,
0
,
NULL
,
'1'
,
'2022-05-23 23:29:07'
,
'1'
,
'2022-05-23 23:34:59'
,
b
'0'
);
INSERT
INTO
`system_dict_data`
(
`sort`
,
`label`
,
`value`
,
`dict_type`
,
`status`
,
`color_type`
,
`css_class`
,
`remark`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
,
`label_en`
)
VALUES
(
0
,
'已过期'
,
'1'
,
'currency_rate_status'
,
0
,
'warning'
,
''
,
NULL
,
'1'
,
'2022-11-18 00:18:34'
,
'1'
,
'2023-01-15 18:09:43'
,
b
'0'
,
'Expired'
),
(
1
,
'生效中'
,
'0'
,
'currency_rate_status'
,
0
,
'warning'
,
''
,
NULL
,
'1'
,
'2022-11-18 00:18:34'
,
'1'
,
'2023-01-15 18:09:43'
,
b
'0'
,
'Active'
);
SET
@
parent
=
1244
;
INSERT
INTO
`system_menu`
(
`name`
,
`permission`
,
`menu_type`
,
`sort`
,
`parent_id`
,
`path`
,
`icon`
,
`component`
,
`status`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
,
`is_show_in_menu_bar`
,
`name_en`
,
`keepalive`
,
`redirect`
)
VALUES
(
'货币汇率'
,
'ecw:currency:rate:query'
,
2
,
3
,
@
parent
,
'currencyRate'
,
'money'
,
'ecw/currencyRate/index'
,
0
,
'115'
,
'2023-07-09 16:02:32'
,
'115'
,
'2023-07-12 22:33:09'
,
b
'0'
,
b
'1'
,
'currency rate'
,
b
'0'
,
NULL
);
SET
@
parent
=
LAST_INSERT_ID
();
INSERT
INTO
`system_menu`
(
`name`
,
`permission`
,
`menu_type`
,
`sort`
,
`parent_id`
,
`path`
,
`icon`
,
`component`
,
`status`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
,
`is_show_in_menu_bar`
,
`name_en`
,
`keepalive`
,
`redirect`
)
VALUES
(
'货币汇率新增'
,
'ecw:currency:rate:create'
,
3
,
1
,
@
parent
,
''
,
''
,
''
,
0
,
'115'
,
'2023-07-09 16:02:32'
,
'115'
,
'2023-07-12 22:33:09'
,
b
'0'
,
b
'0'
,
'create'
,
b
'0'
,
NULL
),
(
'货币汇率编辑'
,
'ecw:currency:rate:update'
,
3
,
2
,
@
parent
,
''
,
''
,
''
,
0
,
'115'
,
'2023-07-09 16:02:32'
,
'115'
,
'2023-07-12 22:33:09'
,
b
'0'
,
b
'0'
,
'update'
,
b
'0'
,
NULL
),
(
'货币汇率删除'
,
'ecw:currency:rate:delete'
,
3
,
3
,
@
parent
,
''
,
''
,
''
,
0
,
'115'
,
'2023-07-09 16:02:32'
,
'115'
,
'2023-07-12 22:33:09'
,
b
'0'
,
b
'0'
,
'delete'
,
b
'0'
,
NULL
),
(
'货币汇率日志'
,
'ecw:currency:rate:history'
,
3
,
4
,
@
parent
,
''
,
''
,
''
,
0
,
'115'
,
'2023-07-09 16:02:32'
,
'115'
,
'2023-07-12 22:33:09'
,
b
'0'
,
b
'0'
,
'history'
,
b
'0'
,
NULL
);
COMMIT
;
\ No newline at end of file
yudao-module-ecw/yudao-module-ecw-api/src/main/java/cn/iocoder/yudao/module/ecw/api/currency/dto/ExchangeRateRespDTO.java
View file @
04497658
...
...
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.ecw.api.currency.dto;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
...
...
@@ -20,7 +21,14 @@ public class ExchangeRateRespDTO {
private
String
targetCurrencyCode
;
@ApiModelProperty
(
value
=
"汇率"
)
private
java
.
math
.
BigDecimal
currencyRate
;
private
BigDecimal
currencyRate
;
@ApiModelProperty
(
value
=
"原币种基础兑换金额"
)
private
BigDecimal
sourceCurrencyAmount
;
@ApiModelProperty
(
value
=
"目标币种基础兑换金额"
)
private
BigDecimal
targetCurrencyAmount
;
@ApiModelProperty
(
value
=
"汇率有效期"
)
private
Date
expireDate
;
}
yudao-module-ecw/yudao-module-ecw-api/src/main/java/cn/iocoder/yudao/module/ecw/enums/ErrorCodeConstants.java
View file @
04497658
...
...
@@ -151,10 +151,13 @@ public interface ErrorCodeConstants {
ErrorCode
CUSTOMER_CANNOT_DELAY_APPROVAL_WITH_NO_ENTER_OPEN_SEA_TIME
=
new
ErrorCode
(
1004006028
,
"customer.cannot.delay.approval.with.no.enter.open.sea.time"
);
ErrorCode
EXCHANGE_RATE_NOT_EXISTS
=
new
ErrorCode
(
1004006029
,
"currency.rate.not.exists"
);
ErrorCode
CURRENCY_RATE_NOT_EXISTS
=
new
ErrorCode
(
1004006029
,
"currency.rate.not.exists"
);
ErrorCode
EXCHANGE_RATE_LOG_NOT_EXISTS
=
new
ErrorCode
(
1004006030
,
"汇率变更日志不存在"
);
ErrorCode
EXCHANGE_RATE_EXISTS
=
new
ErrorCode
(
1004006031
,
"currency.rate.exists"
);
ErrorCode
CURRENCY_RATE_EXISTS
=
new
ErrorCode
(
1004006031
,
"currency.rate.exists"
);
ErrorCode
EXCHANGE_RATE_EXPIRE
=
new
ErrorCode
(
1004006032
,
"currency.rate.disable"
);
ErrorCode
CURRENCY_RATE_EXPIRED
=
new
ErrorCode
(
1004006032
,
"currency.rate.disable"
);
ErrorCode
EXCHANGE_RATE_NOT_EXISTS_PARAM
=
new
ErrorCode
(
1004006033
,
"currency.rate.to.not.exists"
);
...
...
@@ -191,6 +194,9 @@ public interface ErrorCodeConstants {
ErrorCode
AREA_CODE_NOT_NULL
=
new
ErrorCode
(
1004006044
,
"area.code.not.null"
);
ErrorCode
CURRENCY_ID_NOT_NULL
=
new
ErrorCode
(
1004006045
,
"currency.id.not.null"
);
ErrorCode
CURRENCY_RATE_COUNTRIES_INVALID
=
new
ErrorCode
(
1004006055
,
"currency.rate.countries.invalid"
);
ErrorCode
CURRENCY_RATE_PAIR_INVALID
=
new
ErrorCode
(
1004006056
,
"currency.rate.pair.invalid"
);
ErrorCode
CURRENCY_RATE_AMOUNT_INVALID
=
new
ErrorCode
(
1004006057
,
"currency.rate.amount.invalid"
);
ErrorCode
CURRENCY_RATE_TOO_SMALL
=
new
ErrorCode
(
1004006059
,
"currency.rate.too.small"
);
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/controller/admin/currencyRate/CurrencyRateController.java
0 → 100644
View file @
04497658
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
controller
.
admin
.
currencyRate
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateDO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateLogDO
;
import
cn.iocoder.yudao.module.ecw.service.currencyRate.CurrencyRateService
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateCreateReqVO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateQueryParamVO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateUpdateReqVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
@Validated
@RestController
@Api
(
tags
=
"管理后台 - 货币汇率"
)
@RequestMapping
(
"/ecw/currency-rate"
)
public
class
CurrencyRateController
{
@Autowired
private
CurrencyRateService
service
;
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建汇率信息"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:currency:rate:create')"
)
public
CommonResult
<
Boolean
>
create
(
@Valid
@RequestBody
CurrencyRateCreateReqVO
req
)
{
service
.
create
(
req
);
return
success
(
true
);
}
@PutMapping
(
"/update"
)
@ApiOperation
(
"更新汇率信息"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:currency:rate:update')"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
<
Boolean
>
update
(
@RequestParam
(
"id"
)
Long
id
,
@Valid
@RequestBody
CurrencyRateUpdateReqVO
req
)
{
service
.
update
(
id
,
req
);
return
success
(
true
);
}
@DeleteMapping
(
"/delete"
)
@ApiOperation
(
"删除汇率信息"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:currency:rate:delete')"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
<
Boolean
>
delete
(
@RequestParam
(
"id"
)
Long
id
)
{
service
.
delete
(
id
);
return
success
(
true
);
}
@GetMapping
(
"/page"
)
@ApiOperation
(
"分页查询汇率信息"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:currency:rate:query')"
)
public
CommonResult
<
PageResult
<
CurrencyRateDO
>>
page
(
@Valid
CurrencyRateQueryParamVO
param
)
{
return
success
(
service
.
query
(
param
));
}
@GetMapping
(
"/get"
)
@ApiOperation
(
"根据币种获取汇率信息"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:currency:rate:query')"
)
public
CommonResult
<
CurrencyRateDO
>
get
(
@RequestParam
(
"sourceId"
)
Long
sourceId
,
@RequestParam
(
"targetId"
)
Long
targetId
)
{
return
success
(
service
.
find
(
sourceId
,
targetId
));
}
@GetMapping
(
"/logs"
)
@ApiOperation
(
"根据币种获取汇率根据货币符号"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:currency:rate:history')"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
public
CommonResult
<
PageResult
<
CurrencyRateLogDO
>>
logs
(
@RequestParam
(
"id"
)
Long
id
,
PageParam
page
)
{
return
success
(
service
.
history
(
id
,
page
));
}
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/convert/currencyRate/CurrencyRateConvert.java
0 → 100644
View file @
04497658
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
convert
.
currencyRate
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateDO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateCreateReqVO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateUpdateReqVO
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.MappingTarget
;
import
org.mapstruct.factory.Mappers
;
@Mapper
public
interface
CurrencyRateConvert
{
CurrencyRateConvert
INSTANCE
=
Mappers
.
getMapper
(
CurrencyRateConvert
.
class
);
CurrencyRateDO
from
(
CurrencyRateCreateReqVO
req
);
void
update
(
@MappingTarget
CurrencyRateDO
saved
,
CurrencyRateUpdateReqVO
req
);
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/dal/dataobject/currencyRate/CurrencyRateDO.java
0 → 100644
View file @
04497658
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
dal
.
dataobject
.
currencyRate
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
cn.iocoder.yudao.framework.mybatis.core.type.JsonLongSetTypeHandler
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.util.Set
;
/**
* 货币汇率 DO
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName
(
"ecw_currency_rate"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
CurrencyRateDO
extends
BaseDO
{
/**
*
*/
@TableId
private
Long
id
;
/**
* 原币种
*/
private
Long
sourceId
;
/**
* 支付币种
*/
private
Long
targetId
;
/**
* 原币种金额
*/
private
BigDecimal
sourceAmount
;
/**
* 支付币种金额
*/
private
BigDecimal
targetAmount
;
/**
* 国家
*/
@TableField
(
typeHandler
=
JsonLongSetTypeHandler
.
class
)
private
Set
<
Long
>
countries
;
/**
* 有效期
*/
private
LocalDate
expiration
;
/**
* 备注
*/
private
String
remarks
;
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/dal/dataobject/currencyRate/CurrencyRateLogDO.java
0 → 100644
View file @
04497658
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
dal
.
dataobject
.
currencyRate
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
/**
* 货币汇率变更历史 DO
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName
(
"ecw_currency_rate_log"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
CurrencyRateLogDO
extends
BaseDO
{
/**
*
*/
@TableId
private
Long
id
;
/**
* 汇率编号
*/
private
Long
rateId
;
/**
* 原币种变更前金额
*/
private
BigDecimal
sourceAmount1
;
/**
* 原币种变更后金额
*/
private
BigDecimal
sourceAmount2
;
/**
* 支付币种变更前金额
*/
private
BigDecimal
targetAmount1
;
/**
* 支付币种变更后金额
*/
private
BigDecimal
targetAmount2
;
/**
* 有效期
*/
private
LocalDate
expiration1
;
/**
* 有效期
*/
private
LocalDate
expiration2
;
/**
* 备注
*/
private
String
remarks
;
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/dal/mysql/currencyRate/CurrencyRateLogMapper.java
0 → 100644
View file @
04497658
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
dal
.
mysql
.
currencyRate
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateLogDO
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
CurrencyRateLogMapper
extends
AbstractMapper
<
CurrencyRateLogDO
>
{
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/dal/mysql/currencyRate/CurrencyRateMapper.java
0 → 100644
View file @
04497658
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
dal
.
mysql
.
currencyRate
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateDO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateQueryParamVO
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.time.LocalDate
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.function.Consumer
;
@Mapper
public
interface
CurrencyRateMapper
extends
AbstractMapper
<
CurrencyRateDO
>
{
default
PageResult
<
CurrencyRateDO
>
selectPage
(
CurrencyRateQueryParamVO
param
)
{
LocalDate
now
=
LocalDate
.
now
();
Set
<
Long
>
countries
=
Optional
.
ofNullable
(
param
.
getCountries
()).
orElse
(
Collections
.
emptySet
());
Consumer
<
LambdaQueryWrapper
<
CurrencyRateDO
>>
countriesQuery
=
it
->
countries
.
stream
().
limit
(
5
).
forEach
(
id
->
it
.
or
().
apply
(
"json_contains(`countries`, {0})"
,
String
.
valueOf
(
id
)));
LambdaQueryWrapper
<
CurrencyRateDO
>
wrapper
=
Wrappers
.
lambdaQuery
(
CurrencyRateDO
.
class
)
.
eq
(
param
.
getSourceId
()
!=
null
,
CurrencyRateDO:
:
getSourceId
,
param
.
getSourceId
())
.
eq
(
param
.
getTargetId
()
!=
null
,
CurrencyRateDO:
:
getTargetId
,
param
.
getTargetId
())
.
and
(!
countries
.
isEmpty
(),
countriesQuery
)
.
gt
(
param
.
getExpired
()
==
Boolean
.
FALSE
,
CurrencyRateDO:
:
getExpiration
,
now
)
.
lt
(
param
.
getExpired
()
==
Boolean
.
TRUE
,
CurrencyRateDO:
:
getExpiration
,
now
)
.
gt
(
param
.
getExpirationAfter
()
!=
null
,
CurrencyRateDO:
:
getExpiration
,
param
.
getExpirationAfter
())
.
lt
(
param
.
getExpirationBefore
()
!=
null
,
CurrencyRateDO:
:
getExpiration
,
param
.
getExpirationBefore
())
.
orderByDesc
(
Arrays
.
asList
(
CurrencyRateDO:
:
getUpdateTime
,
CurrencyRateDO:
:
getExpiration
));
return
selectPage
(
param
,
wrapper
);
}
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/api/CurrecyApiImpl.java
View file @
04497658
This diff is collapsed.
Click to expand it.
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/currencyRate/CurrencyRateService.java
0 → 100644
View file @
04497658
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
service
.
currencyRate
;
import
cn.iocoder.yudao.framework.common.exception.ServiceException
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateDO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateLogDO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateCreateReqVO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateQueryParamVO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateUpdateReqVO
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.time.LocalDate
;
import
java.util.Optional
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.
CURRENCY_RATE_AMOUNT_INVALID
;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.
CURRENCY_RATE_EXPIRED
;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.
CURRENCY_RATE_NOT_EXISTS
;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.
CURRENCY_RATE_TOO_SMALL
;
/**
* 货币汇率服务
*/
public
interface
CurrencyRateService
{
/**
* 汇率精度。
*/
int
RATE_SCALE
=
8
;
/**
* 汇率四舍五入。
*/
RoundingMode
RATE_ROUNDING
=
RoundingMode
.
HALF_UP
;
/**
* 计算两个金额的汇率。
*
* @param source 原金额
* @param target 目标金额
* @return 汇率
* @throws ServiceException 金额小于或等零,或者汇率小于精度下最小值
*/
default
BigDecimal
rate
(
BigDecimal
source
,
BigDecimal
target
)
throws
ServiceException
{
if
(
source
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
||
target
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
throw
exception
(
CURRENCY_RATE_AMOUNT_INVALID
);
}
return
Optional
.
of
(
target
.
divide
(
source
,
RATE_SCALE
,
RATE_ROUNDING
))
.
filter
(
it
->
it
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
.
orElseThrow
(()
->
exception
(
CURRENCY_RATE_TOO_SMALL
));
}
/**
* 获得两个币种的兑换基础值。
*
* @param sourceId 原币种编号
* @param targetId 支付币种编号
* @return 获得两个币种的兑换基础值
* @throws ServiceException 汇率不存在或过期
*/
default
CurrencyRateDO
exchangeBaseValue
(
long
sourceId
,
long
targetId
)
throws
ServiceException
{
CurrencyRateDO
entity
=
Optional
.
ofNullable
(
find
(
sourceId
,
targetId
))
.
orElseThrow
(()
->
exception
(
CURRENCY_RATE_NOT_EXISTS
));
LocalDate
now
=
LocalDate
.
now
();
if
(
now
.
isAfter
(
entity
.
getExpiration
()))
{
throw
exception
(
CURRENCY_RATE_EXPIRED
,
String
.
valueOf
(
sourceId
),
String
.
valueOf
(
targetId
));
}
return
entity
;
}
/**
* 计算两个币种的汇率。
*
* @param sourceId 原币种编号
* @param targetId 支付币种编号
* @return 汇率比值,为空则表示汇率不存在
* @throws ServiceException 汇率不存在或过期
*/
default
BigDecimal
rate
(
long
sourceId
,
long
targetId
)
throws
ServiceException
{
CurrencyRateDO
entity
=
Optional
.
ofNullable
(
find
(
sourceId
,
targetId
))
.
orElseThrow
(()
->
exception
(
CURRENCY_RATE_NOT_EXISTS
));
LocalDate
now
=
LocalDate
.
now
();
if
(
now
.
isAfter
(
entity
.
getExpiration
()))
{
throw
exception
(
CURRENCY_RATE_EXPIRED
,
String
.
valueOf
(
sourceId
),
String
.
valueOf
(
targetId
));
}
return
rate
(
entity
.
getSourceAmount
(),
entity
.
getTargetAmount
());
}
/**
* 计算两个币种的汇率。
*
* @param sourceId 原币种编号
* @param targetId 支付币种编号
* @param tryOpposite 如果不存在则使用反向汇率计算
* @return 汇率比值,为空则表示汇率不存在
* @throws ServiceException 汇率不存在或过期或反向汇率过小
*/
default
BigDecimal
rate
(
long
sourceId
,
long
targetId
,
boolean
tryOpposite
)
throws
ServiceException
{
try
{
return
rate
(
sourceId
,
targetId
);
}
catch
(
ServiceException
e
)
{
if
(!
tryOpposite
)
{
throw
e
;
}
return
BigDecimal
.
ONE
.
divide
(
rate
(
targetId
,
sourceId
),
RATE_SCALE
,
RATE_ROUNDING
);
}
}
/**
* 创建新汇率。
*
* @param req 创建请求
* @throws ServiceException 汇率已存在或金额国家等参数不合法
*/
void
create
(
CurrencyRateCreateReqVO
req
);
/**
* 获取汇率信息。
*
* @param sourceId 原币种编号
* @param targetId 支付币种编号
* @return 汇率信息,可能为空
*/
CurrencyRateDO
find
(
long
sourceId
,
long
targetId
);
/**
* 分页查询汇率。
*
* @param param 分页参数
* @return 分页结果
*/
PageResult
<
CurrencyRateDO
>
query
(
CurrencyRateQueryParamVO
param
);
/**
* 更新汇率信息。
*
* @param id 汇率信息编号
* @param req 更新请求
* @throws ServiceException 汇率不存在或金额等参数不合法
*/
void
update
(
long
id
,
CurrencyRateUpdateReqVO
req
);
/**
* 删除汇率信息。
*
* @param id 汇率信息编号
*/
void
delete
(
long
id
);
/**
* 分页查询汇率变更历史。
*
* @param id 汇率信息编号
* @param param 分页参数
* @return 分页结果
*/
PageResult
<
CurrencyRateLogDO
>
history
(
long
id
,
PageParam
param
);
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/currencyRate/CurrencyRateServiceImpl.java
0 → 100644
View file @
04497658
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
service
.
currencyRate
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.ecw.convert.currencyRate.CurrencyRateConvert
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateDO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateLogDO
;
import
cn.iocoder.yudao.module.ecw.dal.mysql.currencyRate.CurrencyRateLogMapper
;
import
cn.iocoder.yudao.module.ecw.dal.mysql.currencyRate.CurrencyRateMapper
;
import
cn.iocoder.yudao.module.ecw.service.country.CountryService
;
import
cn.iocoder.yudao.module.ecw.service.currency.CurrencyService
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateCreateReqVO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateQueryParamVO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateUpdateReqVO
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Optional
;
import
java.util.Set
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.
CURRENCY_NOT_EXISTS
;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.
CURRENCY_RATE_COUNTRIES_INVALID
;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.
CURRENCY_RATE_EXISTS
;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.
CURRENCY_RATE_NOT_EXISTS
;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.
CURRENCY_RATE_PAIR_INVALID
;
@Service
public
class
CurrencyRateServiceImpl
implements
CurrencyRateService
{
@Autowired
private
CountryService
countryService
;
@Autowired
private
CurrencyService
currencyService
;
@Autowired
private
CurrencyRateMapper
mapper
;
@Autowired
private
CurrencyRateLogMapper
logMapper
;
// 检查指定币种是否存在
private
void
currency
(
long
id
)
{
Optional
.
ofNullable
(
currencyService
.
getCurrency
((
int
)
id
))
.
orElseThrow
(()
->
exception
(
CURRENCY_NOT_EXISTS
));
}
@Override
public
void
create
(
CurrencyRateCreateReqVO
req
)
{
long
sourceId
=
req
.
getSourceId
();
long
targetId
=
req
.
getTargetId
();
Set
<
Long
>
countries
=
req
.
getCountries
();
if
(
sourceId
==
targetId
)
{
throw
exception
(
CURRENCY_RATE_PAIR_INVALID
);
}
rate
(
req
.
getSourceAmount
(),
req
.
getTargetAmount
());
// check rate
if
(
countries
.
isEmpty
()
||
(
countries
.
size
()
!=
countryService
.
getCountryList
(
countries
).
size
()))
{
throw
exception
(
CURRENCY_RATE_COUNTRIES_INVALID
);
}
// check if currencies exist
currency
(
sourceId
);
currency
(
targetId
);
if
(
find
(
sourceId
,
targetId
)
!=
null
)
{
throw
exception
(
CURRENCY_RATE_EXISTS
);
}
mapper
.
insert
(
CurrencyRateConvert
.
INSTANCE
.
from
(
req
));
}
@Override
public
CurrencyRateDO
find
(
long
sourceId
,
long
targetId
)
{
LambdaQueryWrapper
<
CurrencyRateDO
>
wrapper
=
Wrappers
.
lambdaQuery
(
CurrencyRateDO
.
class
)
.
eq
(
CurrencyRateDO:
:
getSourceId
,
sourceId
)
.
eq
(
CurrencyRateDO:
:
getTargetId
,
targetId
);
return
mapper
.
selectOne
(
wrapper
);
}
@Override
public
PageResult
<
CurrencyRateDO
>
query
(
CurrencyRateQueryParamVO
param
)
{
return
mapper
.
selectPage
(
param
);
}
@Override
public
void
update
(
long
id
,
CurrencyRateUpdateReqVO
req
)
{
rate
(
req
.
getSourceAmount
(),
req
.
getTargetAmount
());
// check rate
CurrencyRateLogDO
change
=
new
CurrencyRateLogDO
();
CurrencyRateDO
saved
=
Optional
.
ofNullable
(
mapper
.
selectById
(
id
))
.
orElseThrow
(()
->
exception
(
CURRENCY_RATE_NOT_EXISTS
));
// 修改前
change
.
setSourceAmount1
(
saved
.
getSourceAmount
());
change
.
setTargetAmount1
(
saved
.
getTargetAmount
());
change
.
setExpiration1
(
saved
.
getExpiration
());
// 修改后
change
.
setSourceAmount2
(
req
.
getSourceAmount
());
change
.
setTargetAmount2
(
req
.
getTargetAmount
());
change
.
setExpiration2
(
req
.
getExpiration
());
change
.
setRateId
(
id
);
change
.
setRemarks
(
req
.
getRemarks
());
logMapper
.
insert
(
change
);
CurrencyRateConvert
.
INSTANCE
.
update
(
saved
,
req
);
mapper
.
updateById
(
saved
);
}
@Override
public
void
delete
(
long
id
)
{
mapper
.
deleteById
(
id
);
}
@Override
public
PageResult
<
CurrencyRateLogDO
>
history
(
long
id
,
PageParam
param
)
{
LambdaQueryWrapper
<
CurrencyRateLogDO
>
wrapper
=
Wrappers
.
lambdaQuery
(
CurrencyRateLogDO
.
class
)
.
eq
(
CurrencyRateLogDO:
:
getRateId
,
id
)
.
orderByDesc
(
CurrencyRateLogDO:
:
getCreateTime
);
return
logMapper
.
selectPage
(
param
,
wrapper
);
}
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/vo/currencyRate/CurrencyRateCreateReqVO.java
0 → 100644
View file @
04497658
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
vo
.
currencyRate
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.util.Set
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY
;
@Data
@ApiModel
(
"管理后台 - 货币汇率创建 Request VO"
)
public
class
CurrencyRateCreateReqVO
{
@ApiModelProperty
(
value
=
"原币种"
,
required
=
true
)
@NotNull
(
message
=
"原币种不能为空"
)
private
Long
sourceId
;
@ApiModelProperty
(
value
=
"支付币种"
,
required
=
true
)
@NotNull
(
message
=
"支付币种不能为空"
)
private
Long
targetId
;
@ApiModelProperty
(
value
=
"原币种金额"
,
required
=
true
)
@NotNull
(
message
=
"原币种不能为空"
)
@Min
(
0
)
private
BigDecimal
sourceAmount
;
@ApiModelProperty
(
value
=
"支付币种"
,
required
=
true
)
@NotNull
(
message
=
"支付币种不能为空"
)
@Min
(
0
)
private
BigDecimal
targetAmount
;
@ApiModelProperty
(
value
=
"国家"
,
required
=
true
)
@NotNull
(
message
=
"至少选择一个国家"
)
private
Set
<
Long
>
countries
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@ApiModelProperty
(
value
=
"汇率有效截止日期"
)
private
LocalDate
expiration
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remarks
;
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/vo/currencyRate/CurrencyRateQueryParamVO.java
0 → 100644
View file @
04497658
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
vo
.
currencyRate
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.time.LocalDate
;
import
java.util.Set
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY
;
@Data
@ApiModel
(
"管理后台 - 货币汇率查询 VO"
)
public
class
CurrencyRateQueryParamVO
extends
PageParam
{
@ApiModelProperty
(
value
=
"原币种"
)
private
Long
sourceId
;
@ApiModelProperty
(
value
=
"支付币种"
)
private
Long
targetId
;
@ApiModelProperty
(
value
=
"国家(最多五个)"
)
@Length
(
max
=
5
)
private
Set
<
Long
>
countries
;
@ApiModelProperty
(
value
=
"状态"
)
private
Boolean
expired
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@ApiModelProperty
(
value
=
"有效期大于"
)
private
LocalDate
expirationAfter
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@ApiModelProperty
(
value
=
"有效期小于"
)
private
LocalDate
expirationBefore
;
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/vo/currencyRate/CurrencyRateUpdateReqVO.java
0 → 100644
View file @
04497658
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
vo
.
currencyRate
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY
;
@Data
@ApiModel
(
"管理后台 - 货币汇率更新 Request VO"
)
public
class
CurrencyRateUpdateReqVO
{
@ApiModelProperty
(
value
=
"原币种金额"
,
required
=
true
)
@NotNull
(
message
=
"原币种不能为空"
)
@Min
(
0
)
private
BigDecimal
sourceAmount
;
@ApiModelProperty
(
value
=
"支付币种"
,
required
=
true
)
@NotNull
(
message
=
"支付币种不能为空"
)
@Min
(
0
)
private
BigDecimal
targetAmount
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@ApiModelProperty
(
value
=
"汇率有效截止日期"
)
private
LocalDate
expiration
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remarks
;
}
yudao-module-ecw/yudao-module-ecw-impl/src/resources/mapper/ladingTemplate/LadingTemplateMapper.xml
deleted
100644 → 0
View file @
8300fc7c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.ecw.dal.mysql.ladingTemplate.LadingTemplateMapper"
>
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>
yudao-module-ecw/yudao-module-ecw-impl/src/resources/mapper/warehouse/WarehouseMapper.xml
deleted
100644 → 0
View file @
8300fc7c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.ecw.dal.mysql.warehouse.WarehouseMapper"
>
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>
yudao-module-ecw/yudao-module-ecw-impl/src/resources/mapper/zhongPao/ZhongPaoMapper.xml
deleted
100644 → 0
View file @
8300fc7c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.ecw.dal.mysql.zhongPao.ZhongPaoMapper"
>
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderBusinessServiceImpl.java
View file @
04497658
...
...
@@ -2528,8 +2528,9 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
if
(
Objects
.
isNull
(
exchangeRateRespDTO
))
{
throw
exception
(
EXCHANGE_RATE_NOT_EXISTS_PARAM
,
currencyRespDTOMap
.
get
(
feeDto
.
getCurrencyId
()).
getFuhao
(),
currencyRespDTOMap
.
get
(
1
).
getFuhao
());
}
oldFreightAndClearanceFee
=
oldFreightAndClearanceFee
.
add
(
feeDto
.
getAmount
().
multiply
(
exchangeRateRespDTO
.
getCurrencyRate
()));
// oldFreightAndClearanceFee = oldFreightAndClearanceFee.add(feeDto.getAmount().multiply(exchangeRateRespDTO.getCurrencyRate()));
// 调整汇率计算为新的逻辑公式: 待计算原币种金额 * 目标支付币种金额基础值 / 原币种金额基础值(注:这里的币种金额基础值为后台设定的汇兑基础值) ,最终结果保留两位小数点四舍五入
oldFreightAndClearanceFee
=
oldFreightAndClearanceFee
.
add
(
feeDto
.
getAmount
().
multiply
(
exchangeRateRespDTO
.
getTargetCurrencyAmount
()).
divide
(
exchangeRateRespDTO
.
getSourceCurrencyAmount
(),
2
,
RoundingMode
.
HALF_UP
));
}
else
{
oldFreightAndClearanceFee
=
oldFreightAndClearanceFee
.
add
(
feeDto
.
getAmount
());
...
...
@@ -2550,7 +2551,9 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
if
(
Objects
.
isNull
(
exchangeRateRespDTO
))
{
throw
exception
(
EXCHANGE_RATE_NOT_EXISTS_PARAM
,
currencyRespDTOMap
.
get
(
feeDto
.
getCurrencyId
()).
getFuhao
(),
currencyRespDTOMap
.
get
(
1
).
getFuhao
());
}
newFreightAndClearanceFee
=
newFreightAndClearanceFee
.
add
(
feeDto
.
getAmount
().
multiply
(
exchangeRateRespDTO
.
getCurrencyRate
()));
// newFreightAndClearanceFee = newFreightAndClearanceFee.add(feeDto.getAmount().multiply(exchangeRateRespDTO.getCurrencyRate()));
// 调整汇率计算为新的逻辑公式: 待计算原币种金额 * 目标支付币种金额基础值 / 原币种金额基础值(注:这里的币种金额基础值为后台设定的汇兑基础值) ,最终结果保留两位小数点四舍五入
newFreightAndClearanceFee
=
newFreightAndClearanceFee
.
add
(
feeDto
.
getAmount
().
multiply
(
exchangeRateRespDTO
.
getTargetCurrencyAmount
()).
divide
(
exchangeRateRespDTO
.
getSourceCurrencyAmount
(),
2
,
RoundingMode
.
HALF_UP
));
}
else
{
newFreightAndClearanceFee
=
newFreightAndClearanceFee
.
add
(
feeDto
.
getAmount
());
}
...
...
@@ -4072,12 +4075,14 @@ public class OrderBusinessServiceImpl extends AbstractService<OrderMapper, Order
BigDecimal
totalOnePrice
=
BigDecimal
.
ZERO
;
if
(
Objects
.
nonNull
(
param
.
getOneFreight
())
&&
param
.
getOneFreight
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
ExchangeRateRespDTO
freightExchangeRate
=
currencyApi
.
getCurrencyRate
(
Long
.
valueOf
(
param
.
getFreightCurrency
().
toString
()),
targetId
);
totalOnePrice
=
totalOnePrice
.
add
(
param
.
getOneFreight
().
multiply
(
freightExchangeRate
.
getCurrencyRate
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
));
// 调整汇率计算为新的逻辑公式: 待计算原币种金额 * 目标支付币种金额基础值 / 原币种金额基础值(注:这里的币种金额基础值为后台设定的汇兑基础值) ,最终结果保留两位小数点四舍五入
totalOnePrice
=
totalOnePrice
.
add
(
param
.
getOneFreight
().
multiply
(
freightExchangeRate
.
getTargetCurrencyAmount
()).
divide
(
freightExchangeRate
.
getSourceCurrencyAmount
(),
2
,
RoundingMode
.
HALF_UP
));
}
if
(
param
.
getCharging
()
==
0
)
{
if
(
Objects
.
nonNull
(
param
.
getOneClearanceFee
())
&&
param
.
getOneClearanceFee
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
ExchangeRateRespDTO
clearanceExchangeRate
=
currencyApi
.
getCurrencyRate
(
Long
.
valueOf
(
param
.
getClearanceFeeCurrency
().
toString
()),
targetId
);
totalOnePrice
=
totalOnePrice
.
add
(
param
.
getOneClearanceFee
().
multiply
(
clearanceExchangeRate
.
getCurrencyRate
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
));
// 调整汇率计算为新的逻辑公式: 待计算原币种金额 * 目标支付币种金额基础值 / 原币种金额基础值(注:这里的币种金额基础值为后台设定的汇兑基础值) ,最终结果保留两位小数点四舍五入
totalOnePrice
=
totalOnePrice
.
add
(
param
.
getOneClearanceFee
().
multiply
(
clearanceExchangeRate
.
getTargetCurrencyAmount
()).
divide
(
clearanceExchangeRate
.
getSourceCurrencyAmount
(),
2
,
RoundingMode
.
HALF_UP
));
}
}
orderItemDO
.
setTotalOnePrice
(
totalOnePrice
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java
View file @
04497658
This diff is collapsed.
Click to expand it.
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/component/ProdCostCalculation.java
View file @
04497658
...
...
@@ -471,7 +471,7 @@ public class ProdCostCalculation {
if
(
costDto
.
getTotalWorth
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
// 因为货值为RMB计算,保价费应换算为目标货币(默认为美元)
BigDecimal
insuranceFee
=
costDto
.
getTotalWorth
().
multiply
(
new
BigDecimal
(
"1.1"
))
.
multiply
(
new
BigDecimal
(
"0.002"
)).
multiply
(
exchangeRateRespDTO
.
get
CurrencyRate
()).
setScale
(
0
,
RoundingMode
.
HALF_UP
);
.
multiply
(
new
BigDecimal
(
"0.002"
)).
multiply
(
exchangeRateRespDTO
.
get
TargetCurrencyAmount
()).
divide
(
exchangeRateRespDTO
.
getSourceCurrencyAmount
(),
0
,
RoundingMode
.
HALF_UP
);
costDto
.
setInsuranceFee
(
insuranceFee
);
feeDto
.
setAmount
(
insuranceFee
);
}
else
{
...
...
@@ -1582,9 +1582,9 @@ public class ProdCostCalculation {
if
(
Objects
.
nonNull
(
priceStepDO
))
{
BigDecimal
productClearancePrice
=
pr
oductExchangeRate
.
getCurrencyRat
e
().
multiply
(
pr
iceStepDO
.
getClearancePrice
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
pr
iceStepDO
.
getClearancePric
e
().
multiply
(
pr
oductExchangeRate
.
getTargetCurrencyAmount
()).
divide
(
productExchangeRate
.
getSourceCurrencyAmount
(),
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
lineClearanceBasePrice
.
getClearancePrice
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
...
...
@@ -1634,9 +1634,9 @@ public class ProdCostCalculation {
clearanceBasePrice
.
getClearancePriceUnit
(),
1L
);
BigDecimal
productClearancePrice
=
productExchangeRate
.
getCurrencyRat
e
().
multiply
(
clearanceBasePrice
.
getClearancePrice
()).
setScale
(
2
,
clearanceBasePrice
.
getClearancePric
e
().
multiply
(
productExchangeRate
.
getTargetCurrencyAmount
()).
divide
(
productExchangeRate
.
getSourceCurrencyAmount
(),
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
lineClearancePrice
=
lineClearanceBasePrice
.
getProductClearanceAsExchangePrice
();
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/coupon/impl/CouponServiceImpl.java
View file @
04497658
...
...
@@ -1196,11 +1196,13 @@ public class CouponServiceImpl extends AbstractService<CouponMapper, CouponDO> i
freightRateRespDTO
.
setSourceCurrencyId
(
dto
.
getReduceCurrencyId
().
longValue
());
freightRateRespDTO
.
setTargetCurrencyId
(
rmbCurrency
.
longValue
());
freightRateRespDTO
.
setCurrencyRate
(
new
BigDecimal
(
"1"
));
freightRateRespDTO
.
setSourceCurrencyAmount
(
new
BigDecimal
(
"1"
));
freightRateRespDTO
.
setTargetCurrencyAmount
(
new
BigDecimal
(
"1"
));
}
}
BigDecimal
freightRMBReduceAmount
=
dto
.
getReduceAmount
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
&&
Objects
.
nonNull
(
dto
.
getReduceCurrencyId
())
&&
Objects
.
nonNull
(
freightRateRespDTO
.
getCurrencyRate
())
&&
freightRateRespDTO
.
getCurrencyRate
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
?
dto
.
getReduceAmount
().
multiply
(
freightRateRespDTO
.
get
CurrencyRate
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
)
:
BigDecimal
.
ZERO
;
dto
.
getReduceAmount
().
multiply
(
freightRateRespDTO
.
get
TargetCurrencyAmount
()).
divide
(
freightRateRespDTO
.
getSourceCurrencyAmount
(),
2
,
RoundingMode
.
HALF_UP
)
:
BigDecimal
.
ZERO
;
ExchangeRateRespDTO
clearanceFeeRateRespDTO
=
new
ExchangeRateRespDTO
();
if
(
Objects
.
nonNull
(
dto
.
getClearanceReduceCurrencyId
()))
{
clearanceFeeRateRespDTO
=
currencyApi
.
getCurrencyRate
(
dto
.
getClearanceReduceCurrencyId
().
longValue
(),
rmbCurrency
.
longValue
());
...
...
@@ -1210,11 +1212,13 @@ public class CouponServiceImpl extends AbstractService<CouponMapper, CouponDO> i
clearanceFeeRateRespDTO
.
setSourceCurrencyId
(
rmbCurrency
.
longValue
());
clearanceFeeRateRespDTO
.
setTargetCurrencyId
(
rmbCurrency
.
longValue
());
clearanceFeeRateRespDTO
.
setCurrencyRate
(
new
BigDecimal
(
"1"
));
clearanceFeeRateRespDTO
.
setSourceCurrencyAmount
(
new
BigDecimal
(
"1"
));
clearanceFeeRateRespDTO
.
setTargetCurrencyAmount
(
new
BigDecimal
(
"1"
));
}
}
BigDecimal
clearanceFeeRMBReduceAmount
=
dto
.
getClearanceReduceAmount
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
&&
Objects
.
nonNull
(
dto
.
getClearanceReduceCurrencyId
())
&&
Objects
.
nonNull
(
clearanceFeeRateRespDTO
.
getCurrencyRate
())
&&
clearanceFeeRateRespDTO
.
getCurrencyRate
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
?
dto
.
getClearanceReduceAmount
().
multiply
(
clearanceFeeRateRespDTO
.
get
CurrencyRate
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
)
:
BigDecimal
.
ZERO
;
dto
.
getClearanceReduceAmount
().
multiply
(
clearanceFeeRateRespDTO
.
get
TargetCurrencyAmount
()).
divide
(
clearanceFeeRateRespDTO
.
getSourceCurrencyAmount
(),
2
,
RoundingMode
.
HALF_UP
)
:
BigDecimal
.
ZERO
;
dto
.
setTotalRMBReduceAmount
(
freightRMBReduceAmount
.
add
(
clearanceFeeRMBReduceAmount
));
// 封装优惠详情
CouponInfoVO
infoVO
=
new
CouponInfoVO
();
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/product/impl/ProductPriceServiceImpl.java
View file @
04497658
...
...
@@ -2369,9 +2369,9 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
int
result
=
0
;
if
(
productPrice
.
getClearancePriceUnit
()
!=
channelPrice
.
getClearancePriceUnit
())
{
ExchangeRateRespDTO
productExchangeRate
=
currencyApi
.
getCurrencyRate
(
productPrice
.
getClearancePriceUnit
(),
1L
);
BigDecimal
productClearancePrice
=
product
ExchangeRate
.
getCurrencyRate
().
multiply
(
productPrice
.
getClearancePrice
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
productClearancePrice
=
product
Price
.
getClearancePrice
().
multiply
(
productExchangeRate
.
getTargetCurrencyAmount
()).
divide
(
productExchangeRate
.
getSourceCurrencyAmount
(),
2
,
BigDecimal
.
ROUND_HALF_UP
);
ExchangeRateRespDTO
channelExchangeRate
=
currencyApi
.
getCurrencyRate
(
channelPrice
.
getClearancePriceUnit
(),
1L
);
BigDecimal
channelClearancePrice
=
channel
ExchangeRate
.
getCurrencyRate
().
multiply
(
channelPrice
.
getClearancePrice
()).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
channelClearancePrice
=
channel
Price
.
getClearancePrice
().
multiply
(
channelExchangeRate
.
getTargetCurrencyAmount
()).
divide
(
channelExchangeRate
.
getSourceCurrencyAmount
(),
2
,
BigDecimal
.
ROUND_HALF_UP
);
result
=
productClearancePrice
.
compareTo
(
channelClearancePrice
);
}
else
{
result
=
productPrice
.
getClearancePrice
().
compareTo
(
channelPrice
.
getClearancePrice
());
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/AirBillReceivableExcelExportListener.java
View file @
04497658
...
...
@@ -522,7 +522,7 @@ public class AirBillReceivableExcelExportListener {
private
BigDecimal
changeAmountToDestCurrency
(
Long
fromCurrencyId
,
Long
toCurrencyId
,
BigDecimal
fromAmount
){
BigDecimal
destAmount
=
BigDecimal
.
ZERO
;
ExchangeRateRespDTO
currencyRate
=
currencyApi
.
getCurrencyRate
(
fromCurrencyId
,
toCurrencyId
);
destAmount
=
fromAmount
.
multiply
(
currencyRate
.
get
CurrencyRate
()
);
destAmount
=
fromAmount
.
multiply
(
currencyRate
.
get
TargetCurrencyAmount
()).
divide
(
currencyRate
.
getSourceCurrencyAmount
(),
2
,
RoundingMode
.
HALF_UP
);
return
destAmount
;
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/listener/ShipmentReceivableExcelExportListener2.java
View file @
04497658
...
...
@@ -631,7 +631,7 @@ public class ShipmentReceivableExcelExportListener2 {
BigDecimal
fromAmount
)
{
BigDecimal
destAmount
=
BigDecimal
.
ZERO
;
ExchangeRateRespDTO
currencyRate
=
currencyApi
.
getCurrencyRate
(
fromCurrencyId
,
toCurrencyId
);
destAmount
=
fromAmount
.
multiply
(
currencyRate
.
get
CurrencyRate
()
);
destAmount
=
fromAmount
.
multiply
(
currencyRate
.
get
TargetCurrencyAmount
()).
divide
(
currencyRate
.
getSourceCurrencyAmount
(),
2
,
RoundingMode
.
HALF_UP
);
return
destAmount
;
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/makeBillOfLading/MakeBillOfLadingServiceImpl.java
View file @
04497658
...
...
@@ -1338,7 +1338,7 @@ public class MakeBillOfLadingServiceImpl extends AbstractService<MakeBillOfLadin
private
BigDecimal
changeAmountToDestCurrency
(
Long
fromCurrencyId
,
Long
toCurrencyId
,
BigDecimal
fromAmount
)
{
BigDecimal
destAmount
=
BigDecimal
.
ZERO
;
ExchangeRateRespDTO
currencyRate
=
currencyApi
.
getCurrencyRate
(
fromCurrencyId
,
toCurrencyId
);
destAmount
=
fromAmount
.
multiply
(
currencyRate
.
get
CurrencyRate
()
);
destAmount
=
fromAmount
.
multiply
(
currencyRate
.
get
TargetCurrencyAmount
()).
divide
(
currencyRate
.
getSourceCurrencyAmount
(),
2
,
RoundingMode
.
HALF_UP
);
return
destAmount
;
}
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receipt/ReceiptController.java
View file @
04497658
...
...
@@ -53,6 +53,7 @@ import javax.servlet.ServletOutputStream;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.net.URLEncoder
;
import
java.util.Collection
;
import
java.util.HashMap
;
...
...
@@ -573,7 +574,7 @@ public class ReceiptController {
}
else
{
if
(
StrUtil
.
isNotBlank
(
currencyRespDTO
.
getFuhao
()))
{
ExchangeRateRespDTO
exchangeRateRespDTO
=
currencyApi
.
getCurrencyRateByCode
(
currencyRespDTO
.
getFuhao
(),
"$"
);
usdTotal
=
usdTotal
.
add
(
receivableBackVO
.
getTotalAmount
().
multiply
(
exchangeRateRespDTO
.
get
CurrencyRate
()
));
usdTotal
=
usdTotal
.
add
(
receivableBackVO
.
getTotalAmount
().
multiply
(
exchangeRateRespDTO
.
get
TargetCurrencyAmount
()).
divide
(
exchangeRateRespDTO
.
getSourceCurrencyAmount
(),
2
,
RoundingMode
.
HALF_UP
));
}
}
...
...
@@ -606,7 +607,7 @@ public class ReceiptController {
if
(
StrUtil
.
isNotBlank
(
currencyRespDTO
.
getFuhao
()))
{
ExchangeRateRespDTO
exchangeRateRespDTO
=
currencyApi
.
getCurrencyRateByCode
(
currencyRespDTO
.
getFuhao
(),
"$"
);
usdTotal
=
usdTotal
.
add
(
receivableBackVO
.
getTotalAmount
().
multiply
(
exchangeRateRespDTO
.
get
CurrencyRate
()
));
usdTotal
=
usdTotal
.
add
(
receivableBackVO
.
getTotalAmount
().
multiply
(
exchangeRateRespDTO
.
get
TargetCurrencyAmount
()).
divide
(
exchangeRateRespDTO
.
getSourceCurrencyAmount
(),
2
,
RoundingMode
.
HALF_UP
));
}
}
...
...
yudao-server/src/main/resources/i18n/messages_en.properties
View file @
04497658
...
...
@@ -861,6 +861,10 @@ currency.rate.exists=currency rate exists
currency.rate.not.exists
=
currency rate not exists
currency.rate.disable
=
Currency {} Exchange rate for currency {} has expired, please reset
currency.rate.to.not.exists
=
Currency {} Exchange rate for currency {} not exists
currency.rate.too.small
=
currency rate too small
currency.rate.amount.invalid
=
currency amount must be greater than 0
currency.rate.countries.invalid
=
currency rate countries invalid
currency.rate.pair.invalid
=
currency rate parties must not be identical
not.find.dest.region
=
Destination information not found
dest.region.freight.currency.not.null
=
Destination [{}] cannot find freight related currency settings
...
...
yudao-server/src/main/resources/i18n/messages_fr.properties
View file @
04497658
...
...
@@ -861,7 +861,10 @@ currency.rate.exists=Le taux de change existe
currency.rate.not.exists
=
Le taux de change introuvable
currency.rate.disable
=
Le taux de change de la devise {} vers {} est expir
\u
00E9, veuillez le r
\u
00E9initialiser
currency.rate.to.not.exists
=
Le taux de change de la devise {} vers {} est introuvable
currency.rate.too.small
=
Taux de change trop faible
currency.rate.amount.invalid
=
Le montant en devise doit être supérieur à 0
currency.rate.countries.invalid
=
Taux de change Pays Non valide
currency.rate.pair.invalid
=
Les parties du taux de change ne doivent pas être identiques
not.find.dest.region
=
Informations sur la destination introuvables
dest.region.freight.currency.not.null
=
Aucune configuration de devise pour les frais de transport
\u
00E0 la destination
\u3010
{}
\u3011
dest.region.clearance.currency.not.null
=
Aucune configuration de devise pour les frais de d
\u
00E9douanement
\u
00E0 la destination
\u3010
{}
\u3011
...
...
yudao-server/src/main/resources/i18n/messages_zh.properties
View file @
04497658
...
...
@@ -598,6 +598,10 @@ currency.rate.exists=\u6C47\u7387\u5DF2\u5B58\u5728
currency.rate.not.exists
=
\u
6C47
\u7387\u
4E0D
\u
5B58
\u5728
currency.rate.disable
=
\u
5E01
\u
79CD{}
\u
5BF9
\u
5E94
\u
5E01
\u
79CD{}
\u
6C47
\u7387\u
5DF2
\u
8FC7
\u
671F,
\u
8BF7
\u
91CD
\u
65B0
\u
8BBE
\u
7F6E
currency.rate.to.not.exists
=
\u
5E01
\u
79CD{}
\u
5BF9
\u
5E94
\u
5E01
\u
79CD{}
\u
6C47
\u7387\u
4E0D
\u
5B58
\u5728
currency.rate.too.small
=
\u
6c47
\u7387\u
592a
\u
5c0f
currency.rate.amount.invalid
=
\u
91d1
\u
989d
\u
5fc5
\u
987b
\u5927\u
5c0f
\u0030
currency.rate.countries.invalid
=
\u
56fd
\u
5bb6
\u5217\u8868\u
5fc5
\u
586b
\u
4e14
\u
4e3a
\u6709\u6548\u
503c
currency.rate.pair.invalid
=
\u
6c47
\u7387\u
8d27
\u
5e01
\u
53cc
\u
65b9
\u
4e0d
\u
80fd
\u
76f8
\u
540c
product.price.not.exists
=
\u
4EA7
\u
54C1
\u
4EF7
\u
683C
\u
4E0D
\u
5B58
\u5728
shelf.not.exists
=
\u
8D27
\u
67B6
\u
4E0D
\u
5B58
\u5728
busi.pwd.not.exists
=
\u
4E1A
\u
52A1
\u
5BC6
\u7801\u
4E0D
\u
5B58
\u5728
...
...
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