Commit bf232fba authored by 钱坤's avatar 钱坤

查询指数,若无参数,默认返回空列表

parent 7208ba50
...@@ -91,7 +91,7 @@ public interface ProductApi { ...@@ -91,7 +91,7 @@ public interface ProductApi {
@ApiOperation("历史业绩 对比指数") @ApiOperation("历史业绩 对比指数")
@GetMapping("/track/recor/index") @GetMapping("/track/recor/index")
CommonResp<List<TrackRecordVO>> getTrackRecordInfoIndex(@ApiParam("对比指数ID") @RequestParam("indexId") String indexId); CommonResp<List<TrackRecordVO>> getTrackRecordInfoIndex(@ApiParam("对比指数ID") @RequestParam(name = "indexId", required = false) String indexId);
@ApiOperation("历史净值") @ApiOperation("历史净值")
@GetMapping("/track/net") @GetMapping("/track/net")
......
...@@ -25,6 +25,8 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -25,6 +25,8 @@ import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
@RestController @RestController
...@@ -86,6 +88,9 @@ public class ProductController implements ProductApi { ...@@ -86,6 +88,9 @@ public class ProductController implements ProductApi {
@Override @Override
public CommonResp<List<TrackRecordVO>> getTrackRecordInfoIndex(String indexId) { public CommonResp<List<TrackRecordVO>> getTrackRecordInfoIndex(String indexId) {
if (StringUtils.isBlank(indexId)) {
return CommonResp.success(Collections.emptyList());
}
return feignClientForPublicfund.getTrackRecordInfoIndex(indexId); return feignClientForPublicfund.getTrackRecordInfoIndex(indexId);
} }
......
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