| | |
| | | package com.ruoyi.doublePrevention.service.baseService.impl;
|
| | |
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.metadata.IPage;
|
| | | import com.github.pagehelper.Page;
|
| | | import com.github.pagehelper.PageHelper;
|
| | | import com.ruoyi.common.exception.BusinessException;
|
| | | import com.ruoyi.common.utils.BeanCopyUtils;
|
| | | import com.ruoyi.doublePrevention.entity.PreventRiskEvent;
|
| | | import com.ruoyi.doublePrevention.entity.RiskOldInfo;
|
| | | import com.ruoyi.doublePrevention.entity.dto.req.RiskOldInfoQueryReqDTO;
|
| | | import com.ruoyi.doublePrevention.entity.dto.resp.RiskOldInfoQueryRespDTO;
|
| | | import com.ruoyi.doublePrevention.enums.ErrorCodes;
|
| | | import com.ruoyi.doublePrevention.repository.RiskOldInfoRepository;
|
| | | import com.ruoyi.doublePrevention.service.baseService.RiskOldInfoService;
|
| | | import com.ruoyi.doublePrevention.vo.ResultVO;
|
| | | import com.ruoyi.project.system.user.mapper.UserMapper;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.util.ObjectUtils;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | @Service
|
| | |
| | | if (ObjectUtils.isEmpty(queryReqDTO.getPageSize())){
|
| | | throw new BusinessException("分页信息不能为空");
|
| | | }
|
| | | if (ObjectUtils.isEmpty(queryReqDTO.getPageIndex())){
|
| | | if (ObjectUtils.isEmpty(queryReqDTO.getPageNum())){
|
| | | throw new BusinessException("分页信息不能为空");
|
| | | }
|
| | |
|
| | |
| | | queryReqDTO.setMajor(null);
|
| | | }
|
| | |
|
| | | Integer pageIndex = queryReqDTO.getPageIndex();
|
| | | Integer pageIndex = queryReqDTO.getPageNum();
|
| | | Integer pageSize = queryReqDTO.getPageSize();
|
| | |
|
| | | Page<RiskOldInfo> page = PageHelper.startPage(pageIndex, pageSize);
|
| | |
| | |
|
| | | resultVO.setData(result);
|
| | | resultVO.setCount((int) page.getTotal());
|
| | | resultVO.setPageIndex(page.getPageNum());
|
| | | resultVO.setPageNum(page.getPageNum());
|
| | | resultVO.setPageSize(page.getPageSize());
|
| | |
|
| | | return resultVO;
|
| | | }
|
| | |
|
| | |
|
| | | }
|