Alex пре 4 година
родитељ
комит
0f53aa5da5

+ 50 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ApiTemplateController.java

@@ -0,0 +1,50 @@
+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));
+    }
+
+}

+ 1 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java

@@ -115,6 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers("/druid/**").anonymous()
                 // 放行api业务
                 .antMatchers("/api/**").anonymous()
+                // 放行个人页业务
                 .antMatchers("/template/**").anonymous()
                 // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()