package com.ruoyi.web.controller.api; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.system.domain.TPersonalImg; import com.ruoyi.system.service.ITPersonalImgService; import com.ruoyi.system.service.ITPersonalPageService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * 个人页 API */ @Api(value = "个人页 API", tags = "个人页 API") @RestController @RequestMapping("/template") public class ApiTemplateController extends BaseController { @Autowired private ITPersonalImgService tPersonalImgService; @Autowired private ITPersonalPageService tPersonalPageService; /** * 查询个人页 图片列表 */ @ApiOperation("个人图片列表") @GetMapping("/allImg") public AjaxResult allImg(TPersonalImg tPersonalImg) { List<TPersonalImg> list = tPersonalImgService.selectTPersonalImgList(tPersonalImg); return AjaxResult.success(list); } /** * 获取个人页详细信息 */ @ApiOperation("获取个人页详细信息") @GetMapping(value = "/getPersonal/{id}") public AjaxResult getPersonal(@PathVariable("id") Long id) { return AjaxResult.success(tPersonalPageService.selectTPersonalPageById(id)); } }