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
e938cb88
Commit
e938cb88
authored
May 18, 2021
by
etscript
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加机构产品池基金净值搜索接口
parent
9b1e8af5
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
0 deletions
+46
-0
ProductForPcApi.java
src/main/java/com/tanpu/fund/api/ProductForPcApi.java
+4
-0
ProductForPcController.java
...ava/com/tanpu/fund/controller/ProductForPcController.java
+5
-0
FundInfoCustomMapper.java
...pu/fund/mapper/generator/custom/FundInfoCustomMapper.java
+2
-0
ProductForPcService.java
...main/java/com/tanpu/fund/service/ProductForPcService.java
+3
-0
ProductForPcServiceImpl.java
.../com/tanpu/fund/service/impl/ProductForPcServiceImpl.java
+14
-0
FundInfoCustomMapper.xml
...main/resources/mybatis/customize/FundInfoCustomMapper.xml
+18
-0
No files found.
src/main/java/com/tanpu/fund/api/ProductForPcApi.java
View file @
e938cb88
...
...
@@ -20,4 +20,8 @@ public interface ProductForPcApi {
@GetMapping
(
"/get/privatefund/newnet"
)
CommonResp
<
List
<
Net
>>
getPrivatefundNewnet
(
@RequestParam
(
"list"
)
List
<
String
>
list
);
@ApiOperation
(
"获取私有基金最新净值"
)
@GetMapping
(
"/get/orgfund/newnet"
)
CommonResp
<
List
<
Net
>>
getOrgfundNewnet
(
@RequestParam
(
"list"
)
List
<
String
>
list
);
}
src/main/java/com/tanpu/fund/controller/ProductForPcController.java
View file @
e938cb88
...
...
@@ -25,4 +25,9 @@ public class ProductForPcController implements ProductForPcApi {
public
CommonResp
<
List
<
Net
>>
getPrivatefundNewnet
(
List
<
String
>
list
)
{
return
CommonResp
.
success
(
productForPcService
.
getPrivatefundNewnet
(
list
));
}
@Override
public
CommonResp
<
List
<
Net
>>
getOrgfundNewnet
(
List
<
String
>
list
)
{
return
CommonResp
.
success
(
productForPcService
.
getPrivatefundNewnet
(
list
));
}
}
src/main/java/com/tanpu/fund/mapper/generator/custom/FundInfoCustomMapper.java
View file @
e938cb88
...
...
@@ -46,6 +46,8 @@ public interface FundInfoCustomMapper {
*/
List
<
FundNav
>
getPrivateFundInfoNewNet
(
@Param
(
"list"
)
List
<
String
>
fundIdList
);
List
<
FundNav
>
getOrgFundInfoNewNet
(
@Param
(
"list"
)
List
<
String
>
fundIdList
);
@Select
(
"select t.id as fileId,t.logical_path as previewUrl from fund_file_record t where t.id in(${list})"
)
List
<
FilePreviewResp
>
getFilePreviewUrl
(
@Param
(
"list"
)
String
list
);
...
...
src/main/java/com/tanpu/fund/service/ProductForPcService.java
View file @
e938cb88
...
...
@@ -12,4 +12,7 @@ public interface ProductForPcService {
List
<
Net
>
getFundNewnet
(
List
<
String
>
list
);
List
<
Net
>
getPrivatefundNewnet
(
List
<
String
>
list
);
List
<
Net
>
getOrgfundNewnet
(
List
<
String
>
list
);
}
src/main/java/com/tanpu/fund/service/impl/ProductForPcServiceImpl.java
View file @
e938cb88
...
...
@@ -49,4 +49,18 @@ public class ProductForPcServiceImpl implements ProductForPcService {
}
return
new
ArrayList
<>(
0
);
}
@Override
public
List
<
Net
>
getOrgfundNewnet
(
List
<
String
>
list
)
{
List
<
FundNav
>
fundInfoNewNet
=
fundInfoCustomMapper
.
getOrgFundInfoNewNet
(
list
);
if
(
CollectionUtils
.
isNotEmpty
(
fundInfoNewNet
))
{
return
fundInfoNewNet
.
stream
().
map
(
item
->
Net
.
builder
()
.
fundId
(
item
.
getFundId
())
.
netDate
(
item
.
getPriceDate
().
getTime
())
.
netValue
(
BigDecimalUtil
.
toString
(
item
.
getNav
(),
4
))
.
cumulativeNav
(
BigDecimalUtil
.
toString
(
item
.
getCumulativeNavWithdrawal
(),
4
))
.
build
()).
collect
(
Collectors
.
toList
());
}
return
new
ArrayList
<>(
0
);
}
}
src/main/resources/mybatis/customize/FundInfoCustomMapper.xml
View file @
e938cb88
...
...
@@ -66,4 +66,22 @@
left join ifa_imported_fund_nav res on t.fund_id = res.fund_id and t.price_date = res.price_date
</select>
<select
id=
"getOrgFundInfoNewNet"
parameterType=
"java.lang.String"
resultType=
"com.tanpu.fund.entity.generator.FundNav"
>
select
res.id as id,
res.fund_id as fundId,
res.price_date as priceDate,
res.nav as nav,
res.cumulative_nav as cumulativeNav,
res.cumulative_nav_withdrawal as cumulativeNavWithdrawal,
res.ishigh_or_low as ishighOrLow,
res.tohigh_nav_ratio as tohighNavRatio
from
(SELECT fund_id, max(price_date) as price_date FROM org_fund_nav WHERE fund_id in
<foreach
close=
")"
collection=
"list"
item=
"fundId"
open=
"("
separator=
","
>
#{fundId}
</foreach>
GROUP by fund_id) t
left join org_fund_nav res on t.fund_id = res.fund_id and t.price_date = res.price_date
</select>
</mapper>
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