AgreeReportConroller.java 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. package com.ydtech.modules.admin.controller;
  2. import com.ydtech.core.page.HttpResult;
  3. import com.ydtech.modules.admin.model.dto.AgreeReportQueryDto;
  4. import com.ydtech.modules.admin.model.report.user.agree.AgreeReportDto;
  5. import com.ydtech.modules.admin.service.AgreeReportService;
  6. import com.ydtech.modules.order.entity.BasePageResult;
  7. import io.swagger.annotations.Api;
  8. import io.swagger.annotations.ApiOperation;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.web.bind.annotation.PostMapping;
  11. import org.springframework.web.bind.annotation.RequestBody;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RestController;
  14. import java.util.List;
  15. /**
  16. * @version
  17. * @author: hxl
  18. * @Date: 2024/6/28 8:36
  19. * @Description: 控制台战略合作单位统计
  20. */
  21. @Api(tags = "控制台战略合作单位统计")
  22. @RequestMapping("/agreeReport")
  23. @RestController
  24. public class AgreeReportConroller {
  25. @Autowired
  26. private AgreeReportService agreeReportService;
  27. /**
  28. * @version
  29. * @author: hxl
  30. * @Date: 2024/6/28 8:36
  31. * @Description: 控制台战略合作单位统计
  32. */
  33. @PostMapping("queryPage")
  34. @ApiOperation(value = "控制台战略合作单位统计")
  35. public HttpResult<BasePageResult<AgreeReportDto>> queryPage(@RequestBody AgreeReportQueryDto agreeReportQueryDto) {
  36. try{
  37. BasePageResult<AgreeReportDto> result = agreeReportService.queryPage(agreeReportQueryDto);
  38. return HttpResult.ok("查询数据成功", result);
  39. }catch (Exception e){
  40. return HttpResult.error("查询错误"+e.getMessage());
  41. }
  42. }
  43. /**
  44. * @version
  45. * @author: whp
  46. * @Date: 2024/7/23
  47. * @Description: 查询保险公司列表
  48. */
  49. @PostMapping("getInsuranceCompany")
  50. @ApiOperation(value = "获取保险公司列表")
  51. public HttpResult<List<AgreeReportDto>> getInsuranceCompany() {
  52. try {
  53. List<AgreeReportDto> result = agreeReportService.getInsuranceCompany();
  54. return HttpResult.ok("查询数据成功", result);
  55. } catch (Exception e) {
  56. return HttpResult.error("查询错误" + e.getMessage());
  57. }
  58. }
  59. }