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
8cfc9ee6
Commit
8cfc9ee6
authored
Feb 26, 2025
by
332784038@qq.com
Committed by
wux
Feb 27, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新汇率业务冲突修复
parent
58592794
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
2 deletions
+22
-2
CurrencyRateConvert.java
.../module/ecw/convert/currencyRate/CurrencyRateConvert.java
+4
-0
CurrecyApiImpl.java
.../iocoder/yudao/module/ecw/service/api/CurrecyApiImpl.java
+3
-2
CurrencyRateService.java
.../module/ecw/service/currencyRate/CurrencyRateService.java
+9
-0
CurrencyRateServiceImpl.java
...ule/ecw/service/currencyRate/CurrencyRateServiceImpl.java
+6
-0
No files found.
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/convert/currencyRate/CurrencyRateConvert.java
View file @
8cfc9ee6
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
convert
.
currencyRate
;
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
convert
.
currencyRate
;
import
cn.iocoder.yudao.module.ecw.api.currency.dto.ExchangeRateRespDTO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateDO
;
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.CurrencyRateCreateReqVO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateUpdateReqVO
;
import
cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateUpdateReqVO
;
...
@@ -7,11 +8,14 @@ import org.mapstruct.Mapper;
...
@@ -7,11 +8,14 @@ import org.mapstruct.Mapper;
import
org.mapstruct.MappingTarget
;
import
org.mapstruct.MappingTarget
;
import
org.mapstruct.factory.Mappers
;
import
org.mapstruct.factory.Mappers
;
import
java.util.List
;
@Mapper
@Mapper
public
interface
CurrencyRateConvert
{
public
interface
CurrencyRateConvert
{
CurrencyRateConvert
INSTANCE
=
Mappers
.
getMapper
(
CurrencyRateConvert
.
class
);
CurrencyRateConvert
INSTANCE
=
Mappers
.
getMapper
(
CurrencyRateConvert
.
class
);
CurrencyRateDO
from
(
CurrencyRateCreateReqVO
req
);
CurrencyRateDO
from
(
CurrencyRateCreateReqVO
req
);
List
<
ExchangeRateRespDTO
>
convertList2
(
List
<
CurrencyRateDO
>
currencyRateDOList
);
void
update
(
@MappingTarget
CurrencyRateDO
saved
,
CurrencyRateUpdateReqVO
req
);
void
update
(
@MappingTarget
CurrencyRateDO
saved
,
CurrencyRateUpdateReqVO
req
);
}
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/api/CurrecyApiImpl.java
View file @
8cfc9ee6
...
@@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.ecw.api.currency.CurrencyApi;
...
@@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.ecw.api.currency.CurrencyApi;
import
cn.iocoder.yudao.module.ecw.api.currency.dto.CurrencyRespDTO
;
import
cn.iocoder.yudao.module.ecw.api.currency.dto.CurrencyRespDTO
;
import
cn.iocoder.yudao.module.ecw.api.currency.dto.ExchangeRateRespDTO
;
import
cn.iocoder.yudao.module.ecw.api.currency.dto.ExchangeRateRespDTO
;
import
cn.iocoder.yudao.module.ecw.convert.currency.CurrencyConvert
;
import
cn.iocoder.yudao.module.ecw.convert.currency.CurrencyConvert
;
import
cn.iocoder.yudao.module.ecw.convert.currencyRate.CurrencyRateConvert
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currency.CurrencyDO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currency.CurrencyDO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateDO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currencyRate.CurrencyRateDO
;
import
cn.iocoder.yudao.module.ecw.service.currency.CurrencyService
;
import
cn.iocoder.yudao.module.ecw.service.currency.CurrencyService
;
...
@@ -111,7 +112,7 @@ public class CurrecyApiImpl implements CurrencyApi {
...
@@ -111,7 +112,7 @@ public class CurrecyApiImpl implements CurrencyApi {
@Override
@Override
public
List
<
ExchangeRateRespDTO
>
getAllCurrencyRate
()
{
public
List
<
ExchangeRateRespDTO
>
getAllCurrencyRate
()
{
List
<
ExchangeRateDO
>
exchangeRateDOS
=
exchangeRateService
.
selectList
();
List
<
CurrencyRateDO
>
currencyRateDOS
=
currencyRateService
.
queryAll
();
return
ExchangeRateConvert
.
INSTANCE
.
convertList2
(
exchange
RateDOS
);
return
CurrencyRateConvert
.
INSTANCE
.
convertList2
(
currency
RateDOS
);
}
}
}
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/currencyRate/CurrencyRateService.java
View file @
8cfc9ee6
...
@@ -12,6 +12,7 @@ import cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateUpdateReqVO;
...
@@ -12,6 +12,7 @@ import cn.iocoder.yudao.module.ecw.vo.currencyRate.CurrencyRateUpdateReqVO;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.math.RoundingMode
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Optional
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
...
@@ -139,6 +140,14 @@ public interface CurrencyRateService {
...
@@ -139,6 +140,14 @@ public interface CurrencyRateService {
*/
*/
PageResult
<
CurrencyRateDO
>
query
(
CurrencyRateQueryParamVO
param
);
PageResult
<
CurrencyRateDO
>
query
(
CurrencyRateQueryParamVO
param
);
/**
* 查询全部汇率数据
*
* @return 结果
*/
List
<
CurrencyRateDO
>
queryAll
();
/**
/**
* 更新汇率信息。
* 更新汇率信息。
*
*
...
...
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/currencyRate/CurrencyRateServiceImpl.java
View file @
8cfc9ee6
...
@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -87,6 +88,11 @@ public class CurrencyRateServiceImpl implements CurrencyRateService {
...
@@ -87,6 +88,11 @@ public class CurrencyRateServiceImpl implements CurrencyRateService {
return
mapper
.
selectPage
(
param
);
return
mapper
.
selectPage
(
param
);
}
}
@Override
public
List
<
CurrencyRateDO
>
queryAll
()
{
return
mapper
.
selectList
();
}
@Override
@Override
public
void
update
(
long
id
,
CurrencyRateUpdateReqVO
req
)
{
public
void
update
(
long
id
,
CurrencyRateUpdateReqVO
req
)
{
rate
(
req
.
getSourceAmount
(),
req
.
getTargetAmount
());
// check rate
rate
(
req
.
getSourceAmount
(),
req
.
getTargetAmount
());
// check rate
...
...
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