FundNavAssetController.java 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. package com.simuwang.manage.api.navAsset;
  2. import com.simuwang.base.common.support.MybatisPage;
  3. import com.simuwang.base.pojo.dto.query.DistributionPageQuery;
  4. import com.simuwang.base.pojo.dto.query.FundNavAssetPageQuery;
  5. import com.simuwang.base.pojo.vo.*;
  6. import com.simuwang.manage.service.FundNavAssetService;
  7. import com.smppw.common.pojo.ResultVo;
  8. import jakarta.servlet.http.HttpServletRequest;
  9. import jakarta.servlet.http.HttpServletResponse;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.web.bind.annotation.*;
  12. import org.springframework.web.multipart.MultipartFile;
  13. /**
  14. * 净值规模管理
  15. * Author: chenjianhua
  16. * Date: 2024/9/15 16:46
  17. * Description: ${DESCRIPTION}
  18. */
  19. @RestController
  20. @RequestMapping("/v1/nav-asset")
  21. public class FundNavAssetController {
  22. @Autowired
  23. private FundNavAssetService fundNavAssetService;
  24. /**
  25. * 基金净值规模页面展示查询
  26. * @param fundNavAssetPageQuery
  27. * @return
  28. */
  29. @RequestMapping("search-nav-asset-list")
  30. public MybatisPage<FundNavAssetVO> searchNavAssetList(FundNavAssetPageQuery fundNavAssetPageQuery){
  31. MybatisPage<FundNavAssetVO> result = fundNavAssetService.searchNavAssetList(fundNavAssetPageQuery);
  32. return result;
  33. }
  34. /**
  35. * 新增基金规模
  36. * @param fundAssetVO
  37. * @return
  38. */
  39. @PostMapping("/save-fund-asset")
  40. public ResultVo saveFundAsset(@RequestBody FundAssetVO fundAssetVO){
  41. fundNavAssetService.saveFundAsset(fundAssetVO);
  42. return ResultVo.ok(true);
  43. }
  44. /**
  45. * 新增基金规模
  46. * @param fundNavVO
  47. * @return
  48. */
  49. @PostMapping("/save-fund-nav")
  50. public ResultVo saveFundNav(@RequestBody FundNavVO fundNavVO){
  51. fundNavAssetService.saveFundNav(fundNavVO);
  52. return ResultVo.ok(true);
  53. }
  54. @RequestMapping("/delete-fund-nav-asset")
  55. public ResultVo deleteFundNavAsset(@RequestBody FundNavAssetDelListVO fundNavAssetDelListVO){
  56. fundNavAssetService.deleteFundNavAsset(fundNavAssetDelListVO);
  57. return ResultVo.ok(true);
  58. }
  59. /**
  60. * 上传分红信息
  61. * @param file
  62. * @param response
  63. * @param request
  64. * @return
  65. */
  66. @RequestMapping("upload-nav-asset")
  67. public ResultVo uploadNavAsset(@RequestParam(value = "file",required = false) MultipartFile file, HttpServletResponse response, HttpServletRequest request){
  68. ResultVo vo = fundNavAssetService.uploadNavAsset(file);
  69. return vo;
  70. }
  71. }