Commit 90a3dc6e authored by shiyu's avatar shiyu

成交价格

parent 2ad601f6
......@@ -31,7 +31,7 @@ public class BidRecordVo implements Entity {
private Integer bidTime;
@ApiModelProperty(value = "成交价格", name = "price")
private Double price;
private Long price;
@ApiModelProperty(value = "钱币描述", name = "extra")
private String extra;
......@@ -54,7 +54,7 @@ public class BidRecordVo implements Entity {
this.cid = record.getCid();
this.images = Arrays.asList(record.getImages().split(";"));
this.bidTime = record.getBidTime();
this.price = record.getPrice() / (double)100;
this.price = Math.round(record.getPrice() / (double)100);
this.buyer = record.getBuyer();
this.platform = record.getPlatform();
this.extra = record.getExtra();
......
......@@ -43,8 +43,10 @@ public class BidRecordServiceImpl implements BidRecordService {
}
@Override
public List<BidRecord> queryByCid(Integer cid) {
return bidRecordDao.queryByCid(cid);
public List<BidRecordVo> queryByCid(Integer cid) {
List<BidRecord> list = bidRecordDao.queryByCid(cid);
List<BidRecordVo> bidRecordVoList = list.parallelStream().map(a -> new BidRecordVo(a)).collect(Collectors.toList());
return bidRecordVoList;
}
@Override
......
......@@ -14,7 +14,7 @@ public interface BidRecordService {
BidRecordVo queryById(Long id);
List<BidRecord> queryByCid (Integer cid);
List<BidRecordVo> queryByCid (Integer cid);
Object query (BidRecordRequestDto dto);
......
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