Commit 3e177b16 authored by liwenbin's avatar liwenbin
parents fee0eb6c bcfd818b
...@@ -34,6 +34,8 @@ public class AssetForm implements Serializable{ ...@@ -34,6 +34,8 @@ public class AssetForm implements Serializable{
private String amount; private String amount;
private String term; private String term;
private String validity;
private String deadLine; private String deadLine;
...@@ -83,6 +85,7 @@ public class AssetForm implements Serializable{ ...@@ -83,6 +85,7 @@ public class AssetForm implements Serializable{
notifyMap.put("amount", this.amount); notifyMap.put("amount", this.amount);
notifyMap.put("term", this.term); notifyMap.put("term", this.term);
notifyMap.put("sceneId",sceneId); notifyMap.put("sceneId",sceneId);
notifyMap.put("validity", validity);
notifyMap.put("deadLine", this.deadLine); notifyMap.put("deadLine", this.deadLine);
notifyMap.put("exData", this.exData); notifyMap.put("exData", this.exData);
notifyMap.put("otherInformation", this.otherInformation); notifyMap.put("otherInformation", this.otherInformation);
......
...@@ -340,9 +340,16 @@ public class FundModuleServiceImpl implements IFundModuleService{ ...@@ -340,9 +340,16 @@ public class FundModuleServiceImpl implements IFundModuleService{
} }
result.setSuccess(true); result.setSuccess(true);
fundArray = JSONArray.parseArray(JSON.toJSONString(fundArray.stream().sorted(Comparator.comparingInt(o -> ((JSONObject) o).getInteger("priority"))).collect(Collectors.toList()))); fundArray = JSONArray.parseArray(JSON.toJSONString(fundArray.stream().sorted(Comparator.comparingInt(o -> ((JSONObject) o).getInteger("priority"))).collect(Collectors.toList())));
String fundProductId = fundArray.getJSONObject(0).getString("fundProductId"); StringBuilder fundInfo = new StringBuilder();
String fundId = fundArray.getJSONObject(0).getString("fundId"); for (int i=0;i < fundArray.size();i++){
result.setFundInfo(("null".equals(fundProductId) || StringUtils.isEmpty(fundProductId))?fundId:fundId+"_"+fundProductId); String fundProductId = fundArray.getJSONObject(i).getString("fundProductId");
String fundId = fundArray.getJSONObject(i).getString("fundId");
fundInfo.append(("null".equals(fundProductId) || StringUtils.isEmpty(fundProductId)) ? fundId : fundId + "_" + fundProductId).append(",");
}
if (fundInfo.length() > 1){
fundInfo.deleteCharAt(fundInfo.length() -1);
}
result.setFundInfo(fundInfo.toString());
configCondition.setResult(result); configCondition.setResult(result);
} }
FundConfigSimulationVO vo = new FundConfigSimulationVO(); FundConfigSimulationVO vo = new FundConfigSimulationVO();
......
package com.quantgroup.asset.distribution.fund; package com.quantgroup.asset.distribution.fund;
import com.alibaba.fastjson.JSON;
import com.quantgroup.asset.distribution.model.entity.fund.FundConfigSimulationVO;
import com.quantgroup.asset.distribution.model.response.GlobalResponse;
import com.quantgroup.asset.distribution.service.funding.IFundModuleService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
...@@ -17,6 +21,8 @@ public class FundModuleTest { ...@@ -17,6 +21,8 @@ public class FundModuleTest {
@Autowired @Autowired
private IFundModuleChannelFundConfigService channelFundConfigService; private IFundModuleChannelFundConfigService channelFundConfigService;
@Autowired
private IFundModuleService service;
@Test @Test
public void testFindBy() { public void testFindBy() {
...@@ -27,4 +33,11 @@ public class FundModuleTest { ...@@ -27,4 +33,11 @@ public class FundModuleTest {
// System.out.println(channelFundConfigService.getChannelFundConfigsByChannelOrFundId("1", null, 0, 20)); // System.out.println(channelFundConfigService.getChannelFundConfigsByChannelOrFundId("1", null, 0, 20));
// System.out.println(channelFundConfigService.getChannelFundConfigsByChannelOrFundId("1", null, 0, 20)); // System.out.println(channelFundConfigService.getChannelFundConfigsByChannelOrFundId("1", null, 0, 20));
} }
@Test
public void testS(){
FundConfigSimulationVO vo = (FundConfigSimulationVO) service.getAllConditionsOfFundConfig(50L).getBody();
GlobalResponse response = service.simulationCases(vo.getConditionsCase(),50L);
System.out.println(JSON.toJSONString(response));
}
} }
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