FileInfoController.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package com.fjhx.file.controller;
  2. import com.baomidou.dynamic.datasource.annotation.DS;
  3. import com.fjhx.file.entity.FileInfoSelectDto;
  4. import com.fjhx.file.entity.FileInfoVo;
  5. import com.fjhx.file.entity.SingDto;
  6. import com.fjhx.file.entity.SingVo;
  7. import com.fjhx.file.service.FileInfoService;
  8. import com.ruoyi.common.constant.DatasourceConstant;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.validation.annotation.Validated;
  11. import org.springframework.web.bind.annotation.PostMapping;
  12. import org.springframework.web.bind.annotation.RequestBody;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RestController;
  15. import java.util.List;
  16. import java.util.Map;
  17. /**
  18. * <p>
  19. * 文件表 前端控制器
  20. * </p>
  21. *
  22. * @author zlj
  23. * @since 2023-03-14
  24. */
  25. @DS(DatasourceConstant.BASE)
  26. @RestController
  27. @RequestMapping("/fileInfo")
  28. public class FileInfoController {
  29. @Autowired
  30. private FileInfoService fileInfoService;
  31. /**
  32. * 获取前端直传签名
  33. */
  34. @PostMapping("/getSing")
  35. public SingVo getSing(@Validated @RequestBody SingDto dto) {
  36. return fileInfoService.getSing(dto);
  37. }
  38. /**
  39. * 文件表列表
  40. */
  41. @PostMapping("/getList")
  42. public Map<String, List<FileInfoVo>> getList(@Validated @RequestBody FileInfoSelectDto dto) {
  43. return fileInfoService.getList(dto);
  44. }
  45. }