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',