|
|
@@ -0,0 +1,53 @@
|
|
|
+package cn.iocoder.yudao.server.controller.admin;
|
|
|
+
|
|
|
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
|
+import cn.iocoder.yudao.server.dal.dataobject.OaDocDO;
|
|
|
+import cn.iocoder.yudao.server.dal.mysql.OaMapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.google.common.collect.ImmutableList;
|
|
|
+import com.google.common.collect.ImmutableMap;
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.annotation.security.PermitAll;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+@Tag(name = "管理后台 - 门户首页接口")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/portal/home")
|
|
|
+@Validated
|
|
|
+public class HomeController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private OaMapper oaMapper;
|
|
|
+
|
|
|
+ @GetMapping("/red")
|
|
|
+ @PermitAll
|
|
|
+ public CommonResult<IPage<OaDocDO>> redFile(Integer pageNo,Integer pageSize) {
|
|
|
+ Page<OaDocDO> page = new Page<>(pageNo, pageSize);
|
|
|
+ IPage<OaDocDO> oaDocDOIPage = oaMapper.selectOaDocPage(page, ImmutableList.of(28, 143));
|
|
|
+ return CommonResult.success(oaDocDOIPage);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/notice")
|
|
|
+ @PermitAll
|
|
|
+ public CommonResult<IPage<OaDocDO>> noticeFile(Integer pageNo,Integer pageSize) {
|
|
|
+ Page<OaDocDO> page = new Page<>(pageNo, pageSize);
|
|
|
+ IPage<OaDocDO> oaDocDOIPage = oaMapper.selectOaDocPage(page, ImmutableList.of(25));
|
|
|
+ return CommonResult.success(oaDocDOIPage);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/news")
|
|
|
+ @PermitAll
|
|
|
+ public CommonResult<IPage<OaDocDO>> newsFile(Integer pageNo,Integer pageSize) {
|
|
|
+ Page<OaDocDO> page = new Page<>(pageNo, pageSize);
|
|
|
+ IPage<OaDocDO> oaDocDOIPage = oaMapper.selectOaDocPage(page, ImmutableList.of(14));
|
|
|
+ return CommonResult.success(oaDocDOIPage);
|
|
|
+ }
|
|
|
+}
|