From 42a7a411706f757595e03948692cfe17ecf0ed57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Tue, 30 Jul 2024 23:08:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=8A=A5=E5=90=8D=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...petitionProjectRegistrationController.java | 30 +++++++++++++++++++ ...nnualCompetitionProjectRegistration.api.ts | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index 0d82f476..682ec7b7 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -123,6 +123,35 @@ public class AnnualCompetitionProjectRegistrationController { return Result.OK(); } + /** + * 1分页列表查询 + * + * @param annualCompetitionProjectRegistration + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "年度比赛项目报名-分页列表查询") + @ApiOperation(value = "年度比赛项目报名-分页列表查询", notes = "年度比赛项目报名-分页列表查询") + @GetMapping(value = "/liststu") + public Result> liststu(AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + //处理查询信息 + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + //根据用户角色决定查询信息 + queryWrapperAddRoleInfo(queryWrapper); + //查询 + IPage pageList = annualCompetitionProjectRegistrationService.page(page, queryWrapper); + //处理返回信息 + processData(pageList.getRecords()); + + return Result.OK(pageList); + } + /** * 1分页列表查询 @@ -249,6 +278,7 @@ public class AnnualCompetitionProjectRegistrationController { QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); Page page = new Page(pageNo, pageSize); LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //根据登录信息查询负责比赛 List compList =compService.query().eq("comp_admin",loginUser.getUsername()).list(); //判空 diff --git a/jeecgboot-vue3-master/src/views/annualcompetitionprojectregistration/student/AnnualCompetitionProjectRegistration.api.ts b/jeecgboot-vue3-master/src/views/annualcompetitionprojectregistration/student/AnnualCompetitionProjectRegistration.api.ts index fd07cd18..a10007e9 100644 --- a/jeecgboot-vue3-master/src/views/annualcompetitionprojectregistration/student/AnnualCompetitionProjectRegistration.api.ts +++ b/jeecgboot-vue3-master/src/views/annualcompetitionprojectregistration/student/AnnualCompetitionProjectRegistration.api.ts @@ -4,7 +4,7 @@ import {useMessage} from "/src/hooks/web/useMessage"; const {createConfirm} = useMessage(); enum Api { - list = '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/list', + list = '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/liststu', choose = '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/choose', save = '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/add', edit = '/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/edit',