Commit f67aca60 authored by shiyu's avatar shiyu

分页

parent 1bf12f85
......@@ -66,7 +66,6 @@ public class AdminGoodsController {
@Sort @RequestParam(defaultValue = "update_time") String sort,
@Order @RequestParam(defaultValue = "asc") String order) {
logger.info("【请求开始】操作人:[" + AuthSupport.userName()+ "] 商品管理->商品管理->查询,请求参数:name:{},page:{}", name, page);
return adminGoodsService.list(name, page, limit, sort, order);
}
......
......@@ -2,6 +2,7 @@ package com.wwdz.ch.admin.impl;
import com.github.pagehelper.PageInfo;
import com.wwdz.ch.admin.controller.AdminGoodsController;
import com.wwdz.ch.admin.entity.vo.BidRecordVo;
import com.wwdz.ch.core.util.ResponseUtil;
import com.wwdz.ch.db.dto.request.BidRecordRequestDto;
import com.wwdz.ch.admin.service.BidRecordService;
......@@ -15,6 +16,7 @@ import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Service
public class BidRecordServiceImpl implements BidRecordService {
......@@ -51,8 +53,9 @@ public class BidRecordServiceImpl implements BidRecordService {
try {
List<BidRecord> list = bidRecordManager.query(dto);
long total = PageInfo.of(list).getTotal();
List<BidRecordVo> bidRecordVoList = list.parallelStream().map(a -> new BidRecordVo(a)).collect(Collectors.toList());
data.put("total", total);
data.put("data", list);
data.put("data", bidRecordVoList);
return ResponseUtil.ok(data);
} catch (Exception e) {
logger.error("查询成交记录error{}", e);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment