From d258577a5fb0cde7da555dd29017d8a23586caf9 Mon Sep 17 00:00:00 2001 From: peihao <1280253838@qq.com> Date: Fri, 3 Sep 2021 18:32:27 +0800 Subject: [PATCH] =?UTF-8?q?1.1.0=20=E5=9C=B0=E5=9D=97=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AuctionRecordController.java | 2 +- .../service/impl/BlocksServiceImpl.java | 4 +- .../com/air/land/entity/AuctionRecord.java | 2 +- .../impl/AuctionRecordServiceImpl.java | 4 +- .../service/impl/LandListedServiceImpl.java | 46 ++++++++++--------- .../service/impl/LandToListServiceImpl.java | 34 ++++++++++---- .../resources/mapper/AuctionRecordMapper.xml | 2 +- 7 files changed, 56 insertions(+), 38 deletions(-) diff --git a/air/src/main/java/com/air/applets/controller/AuctionRecordController.java b/air/src/main/java/com/air/applets/controller/AuctionRecordController.java index 45c60a8..255a6b1 100644 --- a/air/src/main/java/com/air/applets/controller/AuctionRecordController.java +++ b/air/src/main/java/com/air/applets/controller/AuctionRecordController.java @@ -44,7 +44,7 @@ public class AuctionRecordController { public R> getAuctionRecordPage(QueryPage page, String landListedId) { LambdaQueryWrapper query = Wrappers.query().lambda() .eq(StrUtil.isNotEmpty(landListedId), AuctionRecord::getLandListedId, landListedId) - .orderByDesc(AuctionRecord::getUpdateDate); + .orderByAsc(AuctionRecord::getRanking); IPage recordPage = auctionRecordService.page(page.toPage(), query); return R.ok(recordPage, "查询成功"); } diff --git a/air/src/main/java/com/air/housing/service/impl/BlocksServiceImpl.java b/air/src/main/java/com/air/housing/service/impl/BlocksServiceImpl.java index 1a9a1aa..e42981e 100644 --- a/air/src/main/java/com/air/housing/service/impl/BlocksServiceImpl.java +++ b/air/src/main/java/com/air/housing/service/impl/BlocksServiceImpl.java @@ -44,7 +44,7 @@ public class BlocksServiceImpl extends ServiceImpl impleme //计算去化率 BigDecimal destroyTotal = new BigDecimal(saleInfo.getDestroyTotal()); BigDecimal preSaleTotal = new BigDecimal(saleInfo.getPreSaleTotal()); - saleInfo.setDestroyTotalRate(destroyTotal.divide(preSaleTotal, 2, BigDecimal.ROUND_HALF_UP).doubleValue()); + saleInfo.setDestroyTotalRate(destroyTotal.divide(preSaleTotal, 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue()); } // 住宅均价 @@ -71,7 +71,7 @@ public class BlocksServiceImpl extends ServiceImpl impleme //计算去化率 BigDecimal destroyTotal = new BigDecimal(saleInfo.getDestroyTotal()); BigDecimal preSaleTotal = new BigDecimal(saleInfo.getPreSaleTotal()); - saleInfo.setDestroyTotalRate(destroyTotal.divide(preSaleTotal, 2, BigDecimal.ROUND_HALF_UP).doubleValue()); + saleInfo.setDestroyTotalRate(destroyTotal.divide(preSaleTotal, 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).doubleValue()); } }); } diff --git a/air/src/main/java/com/air/land/entity/AuctionRecord.java b/air/src/main/java/com/air/land/entity/AuctionRecord.java index b6dc5c0..757c635 100644 --- a/air/src/main/java/com/air/land/entity/AuctionRecord.java +++ b/air/src/main/java/com/air/land/entity/AuctionRecord.java @@ -44,7 +44,7 @@ public class AuctionRecord extends Model { private String landName; @ApiModelProperty(value = "排名") - private String ranking; + private Integer ranking; @ApiModelProperty(value = "举牌企业") private String raiseEnterprise; diff --git a/air/src/main/java/com/air/land/service/impl/AuctionRecordServiceImpl.java b/air/src/main/java/com/air/land/service/impl/AuctionRecordServiceImpl.java index 9496122..5e89c88 100644 --- a/air/src/main/java/com/air/land/service/impl/AuctionRecordServiceImpl.java +++ b/air/src/main/java/com/air/land/service/impl/AuctionRecordServiceImpl.java @@ -123,7 +123,7 @@ public class AuctionRecordServiceImpl extends ServiceImpl { List list = new ArrayList<>(); list.add(auctionRecord.getLandCode()); - list.add(auctionRecord.getRanking()); + list.add(auctionRecord.getRanking().toString()); list.add(auctionRecord.getRaiseEnterprise()); list.add(auctionRecord.getRaisePrice()); list.add(auctionRecord.getNominalFloorPrice()); diff --git a/air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java b/air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java index 57e32be..677d6db 100644 --- a/air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java +++ b/air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java @@ -196,8 +196,8 @@ public class LandListedServiceImpl extends ServiceImpl - order by ar.create_date desc + order by ar.ranking asc