Commit 90a3dc6e authored by shiyu's avatar shiyu

成交价格

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