From f2c0202ed038706ceb74bd53fc4d3b093957d655 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Mon, 8 Apr 2019 16:47:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E7=A7=9F=E8=B5=81=E5=90=88=E5=90=8C][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E7=94=9F=E6=88=90=E8=B4=A6=E5=8D=95]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/domain/po/WxRentContract.java | 22 +++++++++++++++++++ .../impl/WxRentContractServiceImpl.java | 17 +++++++------- 2 files changed, 31 insertions(+), 8 deletions(-) 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 3be5e3dc0..21f268798 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java @@ -59,6 +59,12 @@ public class WxRentContract implements Serializable { @Transient private String buildArea; + @Transient + private String priceStr; + + @Transient + private String depositStr; + public String getBuilding() { return building; } @@ -592,6 +598,22 @@ public class WxRentContract implements Serializable { this.fileNames = fileNames; } + public String getPriceStr() { + return priceStr; + } + + public void setPriceStr(String priceStr) { + this.priceStr = priceStr; + } + + public String getDepositStr() { + return depositStr; + } + + public void setDepositStr(String depositStr) { + this.depositStr = depositStr; + } + public static enum Field { Id_ASC("`id` ASC"), Id_DESC("`id` DESC"), MerchantId_ASC("`merchant_id` ASC"), MerchantId_DESC("`merchant_id` DESC"), Price_ASC("`price` ASC"), Price_DESC("`price` DESC"), RentalStartDate_ASC("`rental_start_date` ASC"), RentalStartDate_DESC("`rental_start_date` DESC"), RentalEndDate_ASC("`rental_end_date` ASC"), RentalEndDate_DESC("`rental_end_date` DESC"), SignDate_ASC("`sign_date` ASC"), SignDate_DESC("`sign_date` DESC"), ReceivePeriod_ASC("`receive_period` ASC"), ReceivePeriod_DESC("`receive_period` DESC"), TenantId_ASC("`tenant_id` ASC"), TenantId_DESC("`tenant_id` DESC"), Filepath_ASC("`filepath` ASC"), Filepath_DESC("`filepath` DESC"), Status_ASC("`status` ASC"), Status_DESC("`status` DESC"), ContractNumber_ASC("`contract_number` ASC"), ContractNumber_DESC("`contract_number` DESC"), Deposit_ASC("`deposit` ASC"), Deposit_DESC("`deposit` DESC"), PayDate_ASC("`pay_date` ASC"), PayDate_DESC("`pay_date` DESC"), IsDel_ASC("`is_del` ASC"), IsDel_DESC("`is_del` DESC"), MerchantName_ASC("`merchant_name` ASC"), MerchantName_DESC("`merchant_name` DESC"), Brand_ASC("`brand` ASC"), Brand_DESC("`brand` DESC"), BusinessId_ASC("`business_id` ASC"), BusinessId_DESC("`business_id` DESC"), ShopType_ASC("`shop_type` ASC"), ShopType_DESC("`shop_type` DESC"), ShopId_ASC("`shop_id` ASC"), ShopId_DESC("`shop_id` DESC"), Updatetime_ASC("`updatetime` ASC"), Updatetime_DESC("`updatetime` DESC"), Createtime_ASC("`createtime` ASC"), Createtime_DESC("`createtime` DESC"); private String value; 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 24fc9cb28..7f645d97a 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -285,13 +285,16 @@ public class WxRentContractServiceImpl implements WxRentContractService { wxBillRent.setIsPreview(EnumIsPreview.YES.getCode()); List resultList = wxBillRentMapper.findList(wxBillRent); - ResultData resultData = null; + // 更新 + ResultData resultData = getResultDataForUpdate(record, userId); + if (dbRent.getRentShopType().equals(EnumRentShopType.SHOP.getCode())) { - // 更新 - resultData = getResultDataForUpdate(record, userId); - //删除预账单,重新生成 - wxBillRentMapper.deletePreviewBill(record); - resultList = buildRent(new WxMerchant(), null, record, EnumIsPreview.YES.getCode()); + if (record.getReceivePeriod() != null && record.getLease() != null && record.getPrice() != null) { + + //删除预账单,重新生成 + wxBillRentMapper.deletePreviewBill(record); + resultList = buildRent(new WxMerchant(), null, record, EnumIsPreview.YES.getCode()); + } }else{ boolean change = false; if (CollectionUtils.isEmpty(resultList)) { @@ -330,8 +333,6 @@ public class WxRentContractServiceImpl implements WxRentContractService { } } } - // 更新 - resultData = getResultDataForUpdate(record, userId); //有改变,删除预账单,重新生成 if (change) { wxBillRentMapper.deletePreviewBill(record); From 74edb21abb7c782f37b0e38984915b25cec65c8c Mon Sep 17 00:00:00 2001 From: hupeng Date: Mon, 8 Apr 2019 17:43:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E5=8D=A1=E5=88=B8][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=A1=E5=88=B8=E7=9A=84=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E4=B8=BA=E6=9B=B4=E6=94=B9=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=80=92=E5=BA=8F,=E9=80=82=E5=BA=94=E7=BD=AE=E9=A1=B6?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/controller/WxCouponChannelController.java | 2 +- .../java/com/iformall/controller/WxCouponChannelController.java | 2 +- .../com/iformall/service/impl/WxCouponChannelServiceImpl.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WxCouponChannelController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WxCouponChannelController.java index 428ba8f92..930c997ad 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/WxCouponChannelController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/WxCouponChannelController.java @@ -54,7 +54,7 @@ public class WxCouponChannelController extends BaseController { wxCouponChannel.setStatus(null); } wxCouponChannel.setTenantId(getUser().getTenantId()); - wxCouponChannel.setSortColumns(WxCouponChannel.Field.Id_DESC); + wxCouponChannel.setSortColumns(WxCouponChannel.Field.UpdateDate_DESC); final PageInfo page = wxCouponChannelService.listPageCVo(wxCouponChannel, pageNum, pageSize); return new ResultData(page); } diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxCouponChannelController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxCouponChannelController.java index 97e7bb0e2..314fc2d02 100644 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxCouponChannelController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxCouponChannelController.java @@ -39,7 +39,7 @@ public class WxCouponChannelController extends BaseController { if (null == wxCouponChannel) wxCouponChannel = new WxCouponChannel(); wxCouponChannel.setTenantId(getTenantId()); wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); - wxCouponChannel.setSortColumns(WxCouponChannel.Field.CreateDate_DESC); + wxCouponChannel.setSortColumns(WxCouponChannel.Field.UpdateDate_DESC); PageInfo page = wxCouponChannelService.listPageCVo(wxCouponChannel, pageNum, pageSize); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java index 0d3727a7e..669b79328 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java @@ -67,7 +67,6 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { record.setId(idWorker.nextId()); wxCouponChannelMapper.insertSelective(record); } else { - if (record.getCouponId() != null && record.getStatus() != null) { WxCouponChannel orignal = getById(record.getId()); if (orignal.getStatus().equals(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode()) @@ -100,6 +99,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { wxOrderService.updateOrderGroupStatusByCouponChannelId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); } } + record.setUpdateDate(new Date()); wxCouponChannelMapper.updateByPrimaryKeySelective(record); } return new ResultData();