Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_fund
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周鹏
tamp_fund
Commits
1112cd91
Commit
1112cd91
authored
Apr 26, 2021
by
zp
Browse files
Options
Browse Files
Download
Plain Diff
add
parents
6bd358f7
7277f5b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
ProductController.java
...ain/java/com/tanpu/fund/controller/ProductController.java
+1
-1
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+14
-3
No files found.
src/main/java/com/tanpu/fund/controller/ProductController.java
View file @
1112cd91
...
...
@@ -49,7 +49,7 @@ public class ProductController implements ProductApi {
@Override
public
CommonResp
<
List
<
ProductInfoVO
>>
getProductListNotNetInfo
(
List
<
String
>
ids
)
{
return
CommonResp
.
success
();
return
CommonResp
.
success
(
this
.
productService
.
getProductListNotNet
(
ids
)
);
}
@Override
...
...
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
1112cd91
package
com
.
tanpu
.
fund
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateField
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateTime
;
...
...
@@ -796,7 +797,7 @@ public class ProductServiceImpl implements ProductService, Constant {
if
(
i
<
fundNavs
.
size
()
-
1
)
{
FundNav
pre
=
fundNavs
.
get
(
i
+
1
);
if
(
pre
.
getNav
().
compareTo
(
BigDecimal
.
ZERO
)
==
1
)
{
if
(
pre
.
getNav
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
BigDecimal
dailyIncrease
=
f
.
getNav
().
subtract
(
pre
.
getNav
()).
divide
(
pre
.
getNav
(),
4
,
BigDecimal
.
ROUND_HALF_UP
);
vo
.
setDailyIncrease
(
BigDecimalUtil
.
multiply100
(
dailyIncrease
));
}
...
...
@@ -1557,8 +1558,18 @@ public class ProductServiceImpl implements ProductService, Constant {
@Override
public
List
<
ProductInfoVO
>
getProductListNotNet
(
List
<
String
>
ids
)
{
return
null
;
IfaImportedNonavFundExample
example
=
new
IfaImportedNonavFundExample
();
example
.
createCriteria
().
andIdIn
(
ids
);
List
<
IfaImportedNonavFund
>
ifaImportedNonavFunds
=
this
.
ifaImportedNonavFundMapper
.
selectByExample
(
example
);
if
(
CollUtil
.
isEmpty
(
ifaImportedNonavFunds
))
{
return
new
ArrayList
<>(
0
);
}
return
ifaImportedNonavFunds
.
stream
().
map
(
ls
->
{
ProductInfoVO
vo
=
new
ProductInfoVO
();
vo
.
setFundId
(
ls
.
getId
());
vo
.
setFundName
(
ls
.
getFundName
());
return
vo
;
}).
collect
(
Collectors
.
toList
());
}
@Override
...
...
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