From 7ba701d01fb2425ca00b6067a76bc157c73f3b7e Mon Sep 17 00:00:00 2001 From: luozukai Date: Sat, 18 May 2019 15:13:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=90=88=E5=90=8C=E4=BC=98=E5=8C=96][?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0][=E5=AE=8C=E5=96=84=E5=90=88=E5=90=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=9C=80=E6=B1=82]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract/WxRentContractController.java | 4 +- .../iformall/domain/po/WxRentContract.java | 44 +++++++++++++++++++ .../impl/WxRentContractServiceImpl.java | 9 ++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java index 9fa8bef3f..a73682555 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java @@ -52,10 +52,10 @@ public class WxRentContractController extends BaseController { @ApiImplicitParam(name = "startDate", value = "开始时间", dataType = "string", paramType = "query", required = true), @ApiImplicitParam(name = "endtDate", value = "结束时间", dataType = "string", paramType = "query", required = true)}) @SystemControllerLog(description = "获取两个时间相差,返回n月零n天") - public ResultData getDateDiff(String startDate, String endtDate) throws Exception{ + public ResultData getDateDiff(String startDate, String endDate) throws Exception{ logger.debug("[" + getIpAddr() + "] WxRentContractController::getTimeDiff"); SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); - int[] array = DateUtils.getDiff(sd.parse(startDate),sd.parse(endtDate)); + int[] array = DateUtils.getDiff(sd.parse(startDate),sd.parse(endDate)); Map map = new HashMap<>(); map.put("month",array[0]); map.put("day",array[1]); diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java index 210bb8866..3a62d4810 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java @@ -331,6 +331,50 @@ public class WxRentContract extends BaseEntity { @io.swagger.annotations.ApiModelProperty(value = "上传文件名", name = "fileNames") private String fileNames; + @io.swagger.annotations.ApiModelProperty(value = "总租期(月)", name = "totalPeriodMonth") + private Integer totalPeriodMonth; + + @io.swagger.annotations.ApiModelProperty(value = "总租期(天)", name = "totalPeriodDay") + private Integer totalPeriodDay; + + @io.swagger.annotations.ApiModelProperty(value = "租赁单价", name = "rentPrice") + private Integer rentPrice; + + @io.swagger.annotations.ApiModelProperty(value = "租金单位1日2月3年", name = "priceUnit") + private Integer priceUnit; + + public Integer getPriceUnit() { + return priceUnit; + } + + public void setPriceUnit(Integer priceUnit) { + this.priceUnit = priceUnit; + } + + public Integer getTotalPeriodMonth() { + return totalPeriodMonth; + } + + public void setTotalPeriodMonth(Integer totalPeriodMonth) { + this.totalPeriodMonth = totalPeriodMonth; + } + + public Integer getTotalPeriodDay() { + return totalPeriodDay; + } + + public void setTotalPeriodDay(Integer totalPeriodDay) { + this.totalPeriodDay = totalPeriodDay; + } + + public Integer getRentPrice() { + return rentPrice; + } + + public void setRentPrice(Integer rentPrice) { + this.rentPrice = rentPrice; + } + public String getRentInfo() { return rentInfo; } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 72bf802ed..682d4eed1 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -560,6 +560,15 @@ public class WxRentContractServiceImpl implements WxRentContractService { } } + public static void main(String[] args) throws Exception{ + SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); + String start = "2019-05-18"; + String end = "2019-05-24"; + int[] array = DateUtils.getDiff(sd.parse(start),sd.parse(end)); + System.out.println(array[0] +"月"); + System.out.println(array[1] +"天"); + } + @Override public Object getMerchants(WxRentContract wxRentContract) { List rentContractList = wxRentContractMapper.getMerchants(wxRentContract);