Commit ae1c0658 authored by 张亚辉's avatar 张亚辉

公募分红处理

parent ebd1415e
...@@ -30,7 +30,7 @@ public interface ProductOrderApi { ...@@ -30,7 +30,7 @@ public interface ProductOrderApi {
@ApiOperation("查询基金分红信息") @ApiOperation("查询基金分红信息")
@GetMapping("/get/fund/bounsinfo") @GetMapping("/get/fund/bounsinfo")
CommonResp<List<FundBounsResp>> getFundBounsinfo(@ApiParam("基金代码") @RequestParam("list") List<String> list, CommonResp<List<FundBounsResp>> getFundBounsinfo(@ApiParam("基金代码") @RequestParam(value = "list", required = false) List<String> list,
@ApiParam("指定日期") @RequestParam("date") String date); @ApiParam("分红除息日") @RequestParam("date") String date);
} }
...@@ -44,7 +44,7 @@ public class ProductOrderController implements ProductOrderApi { ...@@ -44,7 +44,7 @@ public class ProductOrderController implements ProductOrderApi {
@Override @Override
public CommonResp<List<FundBounsResp>> getFundBounsinfo(List<String> list, String date) { public CommonResp<List<FundBounsResp>> getFundBounsinfo(List<String> list, String date) {
if (CollectionUtils.isEmpty(list) || StringUtils.isBlank(date)) { if (StringUtils.isBlank(date)) {
return CommonResp.error(CommonResp.PARAMETER_INVALID_STATUS_CODE, CommonResp.PARAMETER_INVALID_MESSAGE); return CommonResp.error(CommonResp.PARAMETER_INVALID_STATUS_CODE, CommonResp.PARAMETER_INVALID_MESSAGE);
} }
......
...@@ -132,13 +132,19 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant { ...@@ -132,13 +132,19 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
@Override @Override
public List<FundBounsResp> getFundBounsinfo(List<String> list, String date) { public List<FundBounsResp> getFundBounsinfo(List<String> list, String date) {
LambdaQueryWrapper<TxFundDistribution> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TxFundDistribution> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TxFundDistribution::getExDate, date)
.eq(TxFundDistribution::getDeleteTag, BizEnums.DeleteTag.tag_init);
if (CollectionUtils.isNotEmpty(list)) {
queryWrapper.in(TxFundDistribution::getFundCode, list);
}
final List<TxFundDistribution> distributionList = this.txFundDistributionMapper final List<TxFundDistribution> distributionList = this.txFundDistributionMapper
.selectList(queryWrapper.ge(TxFundDistribution::getExDate, date) .selectList(queryWrapper);
.in(TxFundDistribution::getFundCode, list)
.eq(TxFundDistribution::getDeleteTag, BizEnums.DeleteTag.tag_init));
if (CollectionUtils.isNotEmpty(distributionList)) { if (CollectionUtils.isNotEmpty(distributionList)) {
// 查询分红权益日内基金净值 // 查询分红除息日内基金净值
TxFundNavExample fundNavExample = new TxFundNavExample(); TxFundNavExample fundNavExample = new TxFundNavExample();
fundNavExample.createCriteria() fundNavExample.createCriteria()
.andFundIdIn(distributionList.stream().map(c -> String.valueOf(c.getFundId())).collect(Collectors.toList())) .andFundIdIn(distributionList.stream().map(c -> String.valueOf(c.getFundId())).collect(Collectors.toList()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment