|
@@ -1,14 +1,16 @@
|
|
|
package com.simuwang.manage.api.fund;
|
|
|
|
|
|
import com.simuwang.base.pojo.vo.FundInformationVO;
|
|
|
+import com.simuwang.base.pojo.vo.FundReportFrequencyVO;
|
|
|
import com.simuwang.manage.service.FundInformationService;
|
|
|
-import org.checkerframework.checker.units.qual.A;
|
|
|
+import com.simuwang.manage.service.FundReportFrequencyService;
|
|
|
+import com.smppw.common.pojo.ResultVo;
|
|
|
+import com.smppw.common.pojo.enums.status.ResultCode;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -22,8 +24,14 @@ import java.util.Map;
|
|
|
@RequestMapping("/fund")
|
|
|
public class FundInformationController {
|
|
|
|
|
|
+ private static final Logger logger = LoggerFactory.getLogger(FundInformationController.class);
|
|
|
+
|
|
|
+
|
|
|
@Autowired
|
|
|
private FundInformationService fundInformationService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private FundReportFrequencyService fundReportFrequencyService;
|
|
|
/**
|
|
|
* 搜索输入框查询
|
|
|
* @param keyword
|
|
@@ -54,4 +62,17 @@ public class FundInformationController {
|
|
|
List<FundInformationVO> result = fundInformationService.searchFundInfoList(fundId,fundShortName,companyShortName,navFrequency,assetFrequency,startDate,endDate);
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("/save-frequency")
|
|
|
+ public ResultVo saveFundReportFrequency(@RequestBody FundReportFrequencyVO fundReportFrequency){
|
|
|
+ ResultVo vo = new ResultVo(ResultCode.SAVE_SUCCESS);
|
|
|
+ try{
|
|
|
+ fundReportFrequencyService.saveFundReportFrequency(fundReportFrequency);
|
|
|
+ }catch (Exception e){
|
|
|
+ vo = new ResultVo(ResultCode.SAVE_FAILED);
|
|
|
+ logger.error(e.getMessage(),e);
|
|
|
+ }
|
|
|
+ return vo;
|
|
|
+ }
|
|
|
+
|
|
|
}
|