ApiTemplateController.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package com.ruoyi.web.controller.api;
  2. import com.ruoyi.common.core.controller.BaseController;
  3. import com.ruoyi.common.core.domain.AjaxResult;
  4. import com.ruoyi.system.domain.TPersonalImg;
  5. import com.ruoyi.system.service.ITPersonalImgService;
  6. import com.ruoyi.system.service.ITPersonalPageService;
  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.GetMapping;
  11. import org.springframework.web.bind.annotation.PathVariable;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RestController;
  14. import java.util.List;
  15. /**
  16. * 个人页 API
  17. */
  18. @Api(value = "个人页 API", tags = "个人页 API")
  19. @RestController
  20. @RequestMapping("/template")
  21. public class ApiTemplateController extends BaseController {
  22. @Autowired
  23. private ITPersonalImgService tPersonalImgService;
  24. @Autowired
  25. private ITPersonalPageService tPersonalPageService;
  26. /**
  27. * 查询个人页 图片列表
  28. */
  29. @ApiOperation("个人图片列表")
  30. @GetMapping("/allImg")
  31. public AjaxResult allImg(TPersonalImg tPersonalImg)
  32. {
  33. List<TPersonalImg> list = tPersonalImgService.selectTPersonalImgList(tPersonalImg);
  34. return AjaxResult.success(list);
  35. }
  36. /**
  37. * 获取个人页详细信息
  38. */
  39. @ApiOperation("获取个人页详细信息")
  40. @GetMapping(value = "/getPersonal/{id}")
  41. public AjaxResult getPersonal(@PathVariable("id") Long id)
  42. {
  43. return AjaxResult.success(tPersonalPageService.selectTPersonalPageById(id));
  44. }
  45. }