com.github.pagehelper.PageInfo Java Examples

The following examples show how to use com.github.pagehelper.PageInfo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AdminUserController.java    From dts-shop with GNU Lesser General Public License v3.0 6 votes vote down vote up
@RequiresPermissions("admin:user:list")
@RequiresPermissionsDesc(menu = { "用户管理", "会员管理" }, button = "查询")
@GetMapping("/list")
public Object list(String username, String mobile, @RequestParam(defaultValue = "1") Integer page,
		@RequestParam(defaultValue = "10") Integer limit,
		@Sort @RequestParam(defaultValue = "add_time") String sort,
		@Order @RequestParam(defaultValue = "desc") String order) {
	logger.info("【请求开始】用户管理->会员管理->查询,请求参数,username:{},code:{},page:{}", username, mobile, page);

	List<DtsUser> userList = userService.querySelective(username, mobile, page, limit, sort, order);
	long total = PageInfo.of(userList).getTotal();
	Map<String, Object> data = new HashMap<>();
	data.put("total", total);
	data.put("items", userList);

	logger.info("【请求结束】用户管理->会员管理->查询:响应结果:{}", JSONObject.toJSONString(data));
	return ResponseUtil.ok(data);
}
 
Example #2
Source File: AdminAdController.java    From mall with MIT License 6 votes vote down vote up
@RequiresPermissions("admin:ad:list")
@RequiresPermissionsDesc(menu={"推广管理" , "广告管理"}, button="查询")
@GetMapping("/list")
public Object list(String name, String content,
                   @RequestParam(defaultValue = "1") Integer page,
                   @RequestParam(defaultValue = "10") Integer limit,
                   @Sort @RequestParam(defaultValue = "add_time") String sort,
                   @Order @RequestParam(defaultValue = "desc") String order) {
    List<LitemallAd> adList = adService.querySelective(name, content, page, limit, sort, order);
    long total = PageInfo.of(adList).getTotal();
    Map<String, Object> data = new HashMap<>();
    data.put("total", total);
    data.put("items", adList);

    return ResponseUtil.ok(data);
}
 
Example #3
Source File: ExamPaperAnswerController.java    From uexam-mysql with GNU Affero General Public License v3.0 6 votes vote down vote up
@RequestMapping(value = "/pageList", method = RequestMethod.POST)
public RestResponse<PageInfo<ExamPaperAnswerPageResponseVM>> pageList(@Valid ExamPaperAnswerPageVM model) {
    model.setCreateUser(getCurrentUser().getId());
    PageInfo<ExamPaperAnswer> pageInfo = examPaperAnswerService.studentPage(model);
    PageInfo<ExamPaperAnswerPageResponseVM> page = PageInfoHelper.copyMap(pageInfo, e -> {
        ExamPaperAnswerPageResponseVM vm = modelMapper.map(e, ExamPaperAnswerPageResponseVM.class);
        Subject subject = subjectService.selectById(vm.getSubjectId());
        vm.setDoTime(ExamUtil.secondToVM(e.getDoTime()));
        vm.setSystemScore(ExamUtil.scoreToVM(e.getSystemScore()));
        vm.setUserScore(ExamUtil.scoreToVM(e.getUserScore()));
        vm.setPaperScore(ExamUtil.scoreToVM(e.getPaperScore()));
        vm.setSubjectName(subject.getName());
        vm.setCreateTime(DateTimeUtil.dateFormat(e.getCreateTime()));
        return vm;
    });
    return RestResponse.ok(page);
}
 
Example #4
Source File: RequestAuditController.java    From seppb with MIT License 6 votes vote down vote up
@PostMapping(value = "/request/audit_query")
public PageInfo<RequestAudit> requestAuditQuery(HttpServletRequest request) {
	Map<String, Object> dataMap = new HashMap<>();
	dataMap.put(CommonParameter.ID, request.getParameter(CommonParameter.ID));
	dataMap.put("prId", request.getParameter("prId"));
	dataMap.put(CommonParameter.PRODUCT_ID, request.getParameter(CommonParameter.PRODUCT_ID));
	dataMap.put(CommonParameter.SUBMITTER, request.getParameter(CommonParameter.SUBMITTER));
	dataMap.put("auditStatus", request.getParameter("auditStatus"));
	if (!StringUtils.isEmpty(request.getParameter("submitTimeStart"))) {
		dataMap.put("submitTimeStart", request.getParameter("submitTimeStart") + " 00:00:00");
	}
	if (!StringUtils.isEmpty(request.getParameter("submitTimeEnd"))) {
		dataMap.put("submitTimeEnd", request.getParameter("submitTimeEnd") + " 23:59:59");
	}

	int pageNum = ParameterThreadLocal.getPageNum();
	int pageSize = ParameterThreadLocal.getPageSize();
	PageHelper.startPage(pageNum, pageSize);

	List<RequestAudit> requestAudits = requestAuditService.requestAuditQuery(dataMap);
	PageInfo<RequestAudit> pageInfo = new PageInfo<>(requestAudits);
	return pageInfo;
}
 
Example #5
Source File: TestController.java    From fastdep with Apache License 2.0 6 votes vote down vote up
/**
     * datasource test
     * @return
     */
    //    @Transactional
    @GetMapping("test")
    public String test() {
        PageHelper.startPage(1, 1);
        List<UserRequestData> userRequestData = userRequestDataMapper.selectAll();
        PageInfo<UserRequestData> userRequestDataPageInfo = new PageInfo<>(userRequestData);
        System.out.println(userRequestDataPageInfo);
        PageHelper.startPage(1, 2);
        List<Test> tests = testMapper.selectAll();
        PageInfo<Test> testPageInfo = new PageInfo<>(tests);
        System.out.println(testPageInfo);
        return JSONObject.toJSONString(testPageInfo);
//        UserRequestData userRequestData1 = new UserRequestData();
//        userRequestData1.setUserId(11L);
//        userRequestDataMapper.insert(userRequestData1);
//        int i = 1 / 0;
//        testMapper.insert();
    }
 
Example #6
Source File: AdminController.java    From yfshop with Apache License 2.0 6 votes vote down vote up
/**
 * 分页查询
 *
 * @param pageNum
 * @param pageSize
 * @param tbSysUserJson
 * @return
 */
@RequestMapping(value = "page/{pageNum}/{pageSize}", method = RequestMethod.GET)
public BaseResult page(
        @PathVariable(required = true) int pageNum,
        @PathVariable(required = true) int pageSize,
        @RequestParam(required = false) String tbSysUserJson
) throws Exception {

    TbSysUser tbSysUser = null;
    if (tbSysUserJson != null) {
        tbSysUser = MapperUtils.json2pojo(tbSysUserJson, TbSysUser.class);
    }
    PageInfo pageInfo = adminService.page(pageNum, pageSize, tbSysUser);

    // 分页后的结果集
    List<TbSysUser> list = pageInfo.getList();

    // 封装 Cursor 对象
    BaseResult.Cursor cursor = new BaseResult.Cursor();
    cursor.setTotal(new Long(pageInfo.getTotal()).intValue());
    cursor.setOffset(pageInfo.getPageNum());
    cursor.setLimit(pageInfo.getPageSize());

    return BaseResult.ok(list, cursor);
}
 
Example #7
Source File: TpcMqConsumerController.java    From paascloud-master with Apache License 2.0 6 votes vote down vote up
/**
 * 查询订阅者列表.
 *
 * @param tpcMqConsumer the tpc mq consumer
 *
 * @return the wrapper
 */
@PostMapping(value = "/querySubscribeListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询订阅者列表")
public Wrapper<PageInfo<TpcMqSubscribeVo>> querySubscribeListWithPage(@ApiParam(name = "consumer", value = "Mq消费者") @RequestBody TpcMqConsumer tpcMqConsumer) {
	logger.info("查询Mq订阅列表tpcMqConsumerQuery={}", tpcMqConsumer);
	PageHelper.startPage(tpcMqConsumer.getPageNum(), tpcMqConsumer.getPageSize());
	tpcMqConsumer.setOrderBy("update_time desc");
	List<TpcMqSubscribeVo> list = tpcMqConsumerService.listSubscribeVoWithPage(tpcMqConsumer);
	PageInfo<TpcMqSubscribeVo> pageInfo = new PageInfo<>(list);
	if (PublicUtil.isNotEmpty(list)) {
		Map<Long, TpcMqSubscribeVo> tpcMqSubscribeVoMap = this.trans2Map(list);
		List<Long> subscribeIdList = new ArrayList<>(tpcMqSubscribeVoMap.keySet());
		List<TpcMqSubscribeVo> tagVoList = tpcMqConsumerService.listSubscribeVo(subscribeIdList);
		for (TpcMqSubscribeVo vo : tagVoList) {
			Long subscribeId = vo.getId();
			if (!tpcMqSubscribeVoMap.containsKey(subscribeId)) {
				continue;
			}
			TpcMqSubscribeVo tpcMqSubscribeVo = tpcMqSubscribeVoMap.get(subscribeId);
			tpcMqSubscribeVo.setTagVoList(vo.getTagVoList());
		}
		pageInfo.setList(new ArrayList<>(tpcMqSubscribeVoMap.values()));
	}
	return WrapMapper.ok(pageInfo);
}
 
Example #8
Source File: AdminUserController.java    From mall with MIT License 6 votes vote down vote up
@RequiresPermissions("admin:user:list")
@RequiresPermissionsDesc(menu={"用户管理" , "会员管理"}, button="查询")
@GetMapping("/list")
public Object list(String username, String mobile,
                   @RequestParam(defaultValue = "1") Integer page,
                   @RequestParam(defaultValue = "10") Integer limit,
                   @Sort @RequestParam(defaultValue = "add_time") String sort,
                   @Order @RequestParam(defaultValue = "desc") String order) {
    List<LitemallUser> userList = userService.querySelective(username, mobile, page, limit, sort, order);
    long total = PageInfo.of(userList).getTotal();
    Map<String, Object> data = new HashMap<>();
    data.put("total", total);
    data.put("items", userList);

    return ResponseUtil.ok(data);
}
 
Example #9
Source File: StateMachineSchemeController.java    From agile-service-old with Apache License 2.0 6 votes vote down vote up
@Permission(type = ResourceType.ORGANIZATION)
@ApiOperation(value = "查询状态机方案列表")
@CustomPageRequest
@GetMapping
public ResponseEntity<PageInfo<StateMachineSchemeVO>> pagingQuery(@ApiIgnore
                                                               @SortDefault(value = "id", direction = Sort.Direction.DESC) PageRequest pageRequest,
                                                                  @PathVariable("organization_id") Long organizationId,
                                                                  @RequestParam(required = false) String name,
                                                                  @RequestParam(required = false) String description,
                                                                  @RequestParam(required = false) String[] param) {
    StateMachineSchemeVO schemeDTO = new StateMachineSchemeVO();
    schemeDTO.setOrganizationId(organizationId);
    schemeDTO.setName(name);
    schemeDTO.setDescription(description);
    return new ResponseEntity<>(schemeService.pageQuery(organizationId, pageRequest, schemeDTO, ParamUtils.arrToStr(param)), HttpStatus.OK);
}
 
Example #10
Source File: AdminHistoryController.java    From mall with MIT License 6 votes vote down vote up
@RequiresPermissions("admin:history:list")
@RequiresPermissionsDesc(menu={"用户管理" , "搜索历史"}, button="查询")
@GetMapping("/list")
public Object list(String userId, String keyword,
                   @RequestParam(defaultValue = "1") Integer page,
                   @RequestParam(defaultValue = "10") Integer limit,
                   @Sort @RequestParam(defaultValue = "add_time") String sort,
                   @Order @RequestParam(defaultValue = "desc") String order) {
    List<LitemallSearchHistory> footprintList = searchHistoryService.querySelective(userId, keyword, page, limit, sort, order);
    long total = PageInfo.of(footprintList).getTotal();
    Map<String, Object> data = new HashMap<>();
    data.put("total", total);
    data.put("items", footprintList);

    return ResponseUtil.ok(data);
}
 
Example #11
Source File: AdminArticleController.java    From dts-shop with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * 查询公告列表
 *
 * @param goodsSn
 * @param name
 * @param page
 * @param limit
 * @param sort
 * @param order
 * @return
 */
@RequiresPermissions("admin:article:list")
@RequiresPermissionsDesc(menu = { "推广管理", "公告管理" }, button = "查询")
@GetMapping("/list")
public Object list(String title, @RequestParam(defaultValue = "1") Integer page,
		@RequestParam(defaultValue = "10") Integer limit,
		@Sort @RequestParam(defaultValue = "add_time") String sort,
		@Order @RequestParam(defaultValue = "desc") String order) {
	logger.info("【请求开始】推广管理->公告管理->查询,请求参数:title:{},page:{}", title, page);

	List<DtsArticle> articleList = articleService.querySelective(title, page, limit, sort, order);
	long total = PageInfo.of(articleList).getTotal();
	Map<String, Object> data = new HashMap<>();
	data.put("total", total);
	data.put("items", articleList);

	logger.info("【请求结束】推广管理->公告管理->查询,响应结果:{}", JSONObject.toJSONString(data));
	return ResponseUtil.ok(data);
	
}
 
Example #12
Source File: UserController.java    From sqlhelper with GNU Lesser General Public License v3.0 6 votes vote down vote up
@GetMapping("/_useSqlhelper_over_pageHelper")
public Page list_sqlhelper_over_pageHelper(
        @RequestParam(name = "pageNo") Integer pageNo,
        @RequestParam(name = "pageSize") Integer pageSize,
        @RequestParam(name = "sort", required = false) String sort,
        @RequestParam(value = "countColumn", required = false) String countColumn) {

    Page page = PageHelper.offsetPage(pageNo, pageSize);
    // Page page = PageHelper.startPage(pageNo, pageSize, sort);
    page.setCountColumn(countColumn);
    User queryCondition = new User();
    queryCondition.setAge(10);
    List<User> users = userDao.selectByLimit(queryCondition);
    String json = JSONBuilderProvider.simplest().toJson(users);
    System.out.println(json);
    json = JSONBuilderProvider.simplest().toJson(users);
    System.out.println(json);
    PageInfo pageInfo1 = new PageInfo(page);
    json = JSONBuilderProvider.simplest().toJson(pageInfo1);
    System.out.println(json);
    PageInfo pageInfo2 = new PageInfo(users);
    json = JSONBuilderProvider.simplest().toJson(pageInfo2);
    System.out.println(json);
    return page;
}
 
Example #13
Source File: AdminFeedbackController.java    From dts-shop with GNU Lesser General Public License v3.0 6 votes vote down vote up
@RequiresPermissions("admin:feedback:list")
@RequiresPermissionsDesc(menu = { "用户管理", "意见反馈" }, button = "查询")
@GetMapping("/list")
public Object list(Integer userId, String username, @RequestParam(defaultValue = "1") Integer page,
		@RequestParam(defaultValue = "10") Integer limit,
		@Sort @RequestParam(defaultValue = "add_time") String sort,
		@Order @RequestParam(defaultValue = "desc") String order) {
	logger.info("【请求开始】用户管理->意见反馈->查询,请求参数:userId:{},username:{},page:{}", userId, username, page);

	List<DtsFeedback> feedbackList = feedbackService.querySelective(userId, username, page, limit, sort, order);
	long total = PageInfo.of(feedbackList).getTotal();
	Map<String, Object> data = new HashMap<>();
	data.put("total", total);
	data.put("items", feedbackList);

	logger.info("【请求结束】用户管理->意见反馈->查询,响应结果:{}", JSONObject.toJSONString(data));
	return ResponseUtil.ok(data);
}
 
Example #14
Source File: DeliveriesController.java    From maintain with MIT License 5 votes vote down vote up
@GetMapping
public ModelAndView index(DeliveryHead deliveryHead) {
	PageInfo<DeliveryHead> pageInfo = this.getPageInfo(deliveryHead, DeliveryHead.class, this.deliveryHeadService, "getDeliveryHeadList");
	ModelAndView mv = this.buildBaseModelAndView("deliveries/list", pageInfo);
	mv.addObject("deliveryHead", deliveryHead);
	mv.addObject("deliveryHeadList", pageInfo.getList());
	mv.addObject("appStatus", DeliveryHeadConstant.getAPP_STATUS_MAP());
	mv.addObject("appStatusJson", new Gson().toJson(DeliveryHeadConstant.getAPP_STATUS_MAP()));
	return mv;
}
 
Example #15
Source File: GradeController.java    From sms-ssm with MIT License 5 votes vote down vote up
/**
 * @description: 分页查询:根据年级名称获取指定/所有年级信息列表
 * @param: page
 * @param: rows
 * @param: gradename
 * @date: 2019-06-15 1:14 PM
 * @return: java.util.Map<java.lang.String, java.lang.Object>
 */
@PostMapping("/getGradeList")
@ResponseBody
public Map<String, Object> getGradeList(Integer page, Integer rows, String gradename) {

    //注意:使用Java Bean传递gradename,防止以下异常 !
    //org.springframework.web.util.NestedServletException: Request processing failed;
    // nested exception is org.mybatis.spring.MyBatisSystemException:
    // nested exception is org.apache.ibatis.reflection.ReflectionException:
    // There is no getter for property named 'name' in 'class java.lang.String'
    Grade grade = new Grade();
    grade.setName(gradename);

    //设置每页的记录数
    PageHelper.startPage(page, rows);
    //根据年级名称获取指定或全部年级信息列表
    List<Grade> list = gradeService.selectList(grade);
    //封装信息列表
    PageInfo<Grade> pageInfo = new PageInfo<>(list);
    //获取总记录数
    long total = pageInfo.getTotal();
    //获取当前页数据列表
    List<Grade> gradeList = pageInfo.getList();
    //存储数据对象
    result.put("total", total);
    result.put("rows", gradeList);

    return result;
}
 
Example #16
Source File: MainController.java    From dbys with GNU General Public License v3.0 5 votes vote down vote up
@RequestMapping(value = {"/", "index"}, produces = "text/plain;charset=UTF-8", method = RequestMethod.GET)
String index(Model model) {
    PageInfo ysbs = ysService.getYs("电影", 1, 12);
    PageInfo ysbs1 = ysService.getYs("电视剧", 1, 12);
    PageInfo ysbs2 = ysService.getYs("综艺", 1, 12);
    PageInfo ysbs3 = ysService.getYs("动漫", 1, 12);
    model.addAttribute("dy", ysbs.getList());
    model.addAttribute("dsj", ysbs1.getList());
    model.addAttribute("zy", ysbs2.getList());
    model.addAttribute("dm", ysbs3.getList());
    return "index";
}
 
Example #17
Source File: CommonPage.java    From HIS with Apache License 2.0 5 votes vote down vote up
/**
 * 将PageHelper分页后的list转为分页信息
 */
public static <T> CommonPage<T> restPage(List<T> list,Long total) {
    CommonPage<T> result = new CommonPage<T>();
    PageInfo<T> pageInfo = new PageInfo<T>(list);
    result.setTotalPage(pageInfo.getPages());
    result.setPageNum(pageInfo.getPageNum());
    result.setPageSize(pageInfo.getPageSize());
    result.setTotal(total);
    result.setList(pageInfo.getList());
    return result;
}
 
Example #18
Source File: SysGeneratorServiceImpl.java    From open-capacity-platform with Apache License 2.0 5 votes vote down vote up
@Override
public PageResult queryList(Map<String, Object> map) {
    //设置分页信息,分别是当前页数和每页显示的总记录数【记住:必须在mapper接口中的方法执行之前设置该分页信息】
    PageHelper.startPage(MapUtils.getInteger(map, "page"),MapUtils.getInteger(map, "limit"),true);

    List list = sysGeneratorDao.queryList(map);
    PageInfo pageInfo = new PageInfo<>(list);
    return PageResult.builder().data(pageInfo.getList()).code(0).count(pageInfo.getTotal()).build();
}
 
Example #19
Source File: IssueServiceImpl.java    From agile-service-old with Apache License 2.0 5 votes vote down vote up
@Override
public PageInfo<IssueListTestVO> listIssueWithoutSubToTestComponent(Long projectId, SearchVO searchVO, PageRequest pageRequest, Long organizationId) {
    //连表查询需要设置主表别名
    pageRequest.setSort(PageUtil.sortResetOrder(pageRequest.getSort(), SEARCH, new HashMap<>()));
    //pageRequest.resetOrder(SEARCH, new HashMap<>());
    PageInfo<IssueDTO> issueDOPage = PageHelper.startPage(pageRequest.getPage(), pageRequest.getSize(),
            PageUtil.sortToSql(pageRequest.getSort())).doSelectPageInfo(() -> issueMapper.listIssueWithoutSubToTestComponent(projectId, searchVO.getSearchArgs(),
            searchVO.getAdvancedSearchArgs(), searchVO.getOtherArgs(), searchVO.getContents()));
    return handleIssueListTestDoToDto(issueDOPage, organizationId, projectId);
}
 
Example #20
Source File: BizCommentServiceImpl.java    From OneBlog with GNU General Public License v3.0 5 votes vote down vote up
/**
 * @param vo
 * @return
 */
@Override
public Map<String, Object> list(CommentConditionVO vo) {
    PageInfo pageInfo = findPageBreakByCondition(vo);
    Map<String, Object> map = new HashMap<>();
    if (pageInfo != null) {
        map.put("commentList", convert2DTO(pageInfo.getList()));
        map.put("total", pageInfo.getTotal());
        map.put("hasNextPage", pageInfo.isHasNextPage());
        map.put("nextPage", pageInfo.getNextPage());
    }
    return map;
}
 
Example #21
Source File: SinkerSchemaService.java    From DBus with Apache License 2.0 5 votes vote down vote up
public PageInfo<SinkerTopologySchema> search(Integer pageNum, Integer pageSize, String dsName, String schemaName, String sinkerName, String targetTopic) {
    Map<String, Object> map = new HashMap<>();
    ParamUtils.putNotNull(map, "dsName", dsName);
    ParamUtils.putNotNull(map, "schemaName", schemaName);
    ParamUtils.putNotNull(map, "sinkerName", sinkerName);
    ParamUtils.putNotNull(map, "targetTopic", targetTopic);
    PageHelper.startPage(pageNum, pageSize);
    return new PageInfo(sinkerTopologySchemaMapper.search(map));
}
 
Example #22
Source File: AccountController.java    From spring-boot-vue-admin with Apache License 2.0 5 votes vote down vote up
@PreAuthorize("hasAuthority('account:search')")
@PostMapping("/search")
public Result search(@RequestBody final Map<String, Object> param) {
  PageHelper.startPage((Integer) param.get("page"), (Integer) param.get("size"));
  final List<AccountWithRole> list = this.accountService.findWithRoleBy(param);
  final PageInfo<AccountWithRole> pageInfo = new PageInfo<>(list);
  return ResultGenerator.genOkResult(pageInfo);
}
 
Example #23
Source File: CommonPage.java    From HIS with Apache License 2.0 5 votes vote down vote up
/**
 * 将PageHelper分页后的list转为分页信息
 */
public static <T> CommonPage<T> restPage(List<T> list,Long total) {
    CommonPage<T> result = new CommonPage<T>();
    PageInfo<T> pageInfo = new PageInfo<T>(list);
    result.setTotalPage(pageInfo.getPages());
    result.setPageNum(pageInfo.getPageNum());
    result.setPageSize(pageInfo.getPageSize());
    result.setTotal(total);
    result.setList(pageInfo.getList());
    return result;
}
 
Example #24
Source File: ShippingServiceImpl.java    From mmall-kay-Java with Apache License 2.0 5 votes vote down vote up
@Override
public ServerResponse<PageInfo> list(Integer userId,int pageNum,int pageSize) {
    PageHelper.startPage(pageNum,pageSize);
    List<Shipping> shippingList = shippingMapper.selectByUserId(userId);
    PageInfo pageInfo = new PageInfo<>(shippingList);
    return ServerResponse.createBySuccess(pageInfo);
}
 
Example #25
Source File: AttAchServiceImpl.java    From my-site with Apache License 2.0 5 votes vote down vote up
@Override
@Cacheable(value = "attCaches", key = "'atts' + #p0")
public PageInfo<AttAchDto> getAtts(int pageNum, int pageSize) {
    PageHelper.startPage(pageNum, pageSize);
    List<AttAchDto> atts = attAchDao.getAtts();
    PageInfo<AttAchDto> pageInfo = new PageInfo<>(atts);
    return pageInfo;
}
 
Example #26
Source File: TestMissionController.java    From seppb with MIT License 5 votes vote down vote up
@RequestMapping(value = "/tms/query", method = RequestMethod.POST)
public PageInfo<TestMission> testMissionQuery(HttpServletRequest request) {

	Map<String, Object> dataMap = new HashMap<>();
	dataMap.put(CommonParameter.PRODUCT_ID, ParameterThreadLocal.getProductId());
	dataMap.put(CommonParameter.ID, request.getParameter(CommonParameter.ID));
	dataMap.put(CommonParameter.REQ_ID, request.getParameter(CommonParameter.REQ_ID));
	dataMap.put(CommonParameter.REL_ID, request.getParameter(CommonParameter.REL_ID));
	dataMap.put("planId", request.getParameter("planId"));
	dataMap.put("type", request.getParameter("type"));
	dataMap.put(CommonParameter.SPLITER, request.getParameter(CommonParameter.SPLITER));
	String status = request.getParameter(CommonParameter.STATUS);
	if (!StringUtils.isEmpty(status)) {
		dataMap.put("sts", Arrays.asList(status.split(",")));
	}
	dataMap.put(CommonParameter.RESPONSER, request.getParameter(CommonParameter.RESPONSER));
	if (!StringUtils.isEmpty(request.getParameter("splitDateBegin"))) {
		dataMap.put("splitDateBegin", request.getParameter("splitDateBegin") + " 00:00:00");
	}
	if (!StringUtils.isEmpty(request.getParameter("splitDateEnd"))) {
		dataMap.put("splitDateEnd", request.getParameter("splitDateEnd") + " 23:59:59");
	}
	if (!StringUtils.isEmpty(request.getParameter("planToBegin"))) {
		dataMap.put("planToBegin", request.getParameter("planToBegin") + " 00:00:00");
	}
	if (!StringUtils.isEmpty(request.getParameter("planToEnd"))) {
		dataMap.put("planToEnd", request.getParameter("planToEnd") + " 23:59:59");
	}

	PageHelper.startPage(ParameterThreadLocal.getPageNum(), ParameterThreadLocal.getPageSize());

	List<TestMission> list = testMissionService.testMissionQuery(dataMap);
	PageInfo<TestMission> pageInfo = new PageInfo<>(list);
	return pageInfo;
}
 
Example #27
Source File: AgentFinancialController.java    From charging_pile_cloud with MIT License 5 votes vote down vote up
/**
 * 获取充值记录
 * @param coinCharge
 * @return
 */
@RequestMapping(value = "getStockUserCoinCharges", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(notes = "", value = "")
public Map<String, Object> getAppStockUserCoinCharges(StockUserChargeVO coinCharge, PageUtil pageUtil) {
    if(coinCharge.getAgentUserId()==null){
        return ResponseUtil.getNotNormalMap(ResponseMsg.ID_IS_EMPTY);
    }
    PageInfo<StockUserChargeVO> lists = stockUserChargeService.getAdminStockUserCoinCharges(coinCharge,pageUtil);
    return ResponseUtil.getSuccessMap(lists);
}
 
Example #28
Source File: StockUserMoneyDetailServiceImpl.java    From charging_pile_cloud with MIT License 5 votes vote down vote up
/**
 * 后台查询资产流水
 * @param vo
 * @param pageUtil
 * @return
 */

@Override
public PageInfo<StockUserMoneyDetailVO> getAdminMoneyDetails(StockUserMoneyDetailVO vo, PageUtil pageUtil) {
    PageUtil.page(pageUtil);
    List<StockUserMoneyDetailVO> lists = stockUserMoneyDetailMapper.getAdminMoneyDetails(vo);
    return new PageInfo<>(lists);
}
 
Example #29
Source File: OpcRpcService.java    From paascloud-master with Apache License 2.0 5 votes vote down vote up
public Wrapper<PageInfo<MqMessageVo>> queryMessageListWithPage(final MessageQueryDto messageQueryDto) {
	Wrapper<PageInfo<MqMessageVo>> wrapper = opcMqMessageFeignApi.queryMessageListWithPage(messageQueryDto);
	if (wrapper == null) {
		log.error("查询消息记录 失败 result is null");
		throw new TpcBizException(ErrorCodeEnum.GL99990002);
	}
	return wrapper;
}
 
Example #30
Source File: MybatisAnnotationController.java    From loc-framework with MIT License 5 votes vote down vote up
@RequestMapping(value = "/mybatisPageNO", method = RequestMethod.GET)
public PageInfo mybatisPageNO(int pageNo, int pageSize) throws SQLException {
  PageHelper.startPage(pageNo, pageSize);
  List<DemoInfo> demoInfoList = demoInfoRead.getAllDemoInfo();
  log.info("demo info list are {}", demoInfoList.stream().map(DemoInfo::toString)
      .collect(Collectors.joining(",")));
  PageInfo<DemoInfo> pageValue = new PageInfo<>(demoInfoList);
  log.info("page value is {}", pageValue);
  return pageValue;
}