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
b04d17c5
Commit
b04d17c5
authored
Mar 10, 2025
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: 汇率修改日期补齐
parent
5064e315
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
CurrencyRateServiceImpl.java
...ule/ecw/service/currencyRate/CurrencyRateServiceImpl.java
+10
-1
No files found.
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/currencyRate/CurrencyRateServiceImpl.java
View file @
b04d17c5
...
@@ -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.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Optional
;
...
@@ -65,7 +66,12 @@ public class CurrencyRateServiceImpl implements CurrencyRateService {
...
@@ -65,7 +66,12 @@ public class CurrencyRateServiceImpl implements CurrencyRateService {
throw
exception
(
CURRENCY_RATE_EXISTS
);
throw
exception
(
CURRENCY_RATE_EXISTS
);
}
}
mapper
.
insert
(
CurrencyRateConvert
.
INSTANCE
.
from
(
req
));
CurrencyRateDO
entity
=
CurrencyRateConvert
.
INSTANCE
.
from
(
req
);
Date
now
=
new
Date
();
entity
.
setCreateTime
(
now
);
entity
.
setUpdateTime
(
now
);
mapper
.
insert
(
entity
);
}
}
@Override
@Override
...
@@ -90,6 +96,7 @@ public class CurrencyRateServiceImpl implements CurrencyRateService {
...
@@ -90,6 +96,7 @@ public class CurrencyRateServiceImpl implements CurrencyRateService {
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
Date
now
=
new
Date
();
CurrencyRateLogDO
change
=
new
CurrencyRateLogDO
();
CurrencyRateLogDO
change
=
new
CurrencyRateLogDO
();
CurrencyRateDO
saved
=
Optional
.
ofNullable
(
mapper
.
selectById
(
id
))
CurrencyRateDO
saved
=
Optional
.
ofNullable
(
mapper
.
selectById
(
id
))
.
orElseThrow
(()
->
exception
(
CURRENCY_RATE_NOT_EXISTS
));
.
orElseThrow
(()
->
exception
(
CURRENCY_RATE_NOT_EXISTS
));
...
@@ -108,9 +115,11 @@ public class CurrencyRateServiceImpl implements CurrencyRateService {
...
@@ -108,9 +115,11 @@ public class CurrencyRateServiceImpl implements CurrencyRateService {
change
.
setRateId
(
id
);
change
.
setRateId
(
id
);
change
.
setRemarks
(
req
.
getRemarks
());
change
.
setRemarks
(
req
.
getRemarks
());
change
.
setCreateTime
(
now
);
logMapper
.
insert
(
change
);
logMapper
.
insert
(
change
);
CurrencyRateConvert
.
INSTANCE
.
update
(
saved
,
req
);
CurrencyRateConvert
.
INSTANCE
.
update
(
saved
,
req
);
saved
.
setUpdateTime
(
now
);
mapper
.
updateById
(
saved
);
mapper
.
updateById
(
saved
);
}
}
...
...
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