From 39e131948853f57f4fd199881056456e4dbcf7c1 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Mon, 17 Jun 2019 10:54:13 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A7=9F=E8=B5=81=E7=89=A9=E4=B8=9A=E5=90=88?= =?UTF-8?q?=E5=90=8C][=E4=BF=AE=E6=94=B9][=E4=BF=AE=E6=94=B9=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E6=96=B9=E5=BC=8F=E5=8F=8A=E5=88=A4=E6=96=AD=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=AD=98=E5=9C=A8=E5=90=88=E5=90=8C]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/contract/WxRentContractController.java | 6 ++---- .../iformall/service/impl/WxRentContractServiceImpl.java | 5 ++++- 2 files changed, 6 insertions(+), 5 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 d73b870ec..d58d8c923 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java @@ -9,10 +9,7 @@ import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.WxRentContract; -import com.iformall.domain.po.WxShop; import com.iformall.enums.EnumFromType; -import com.iformall.enums.EnumRentContractAdjustPeriod; -import com.iformall.enums.EnumRentShopType; import com.iformall.enums.EnumRentStartType; import com.iformall.mapper.WxRentContractMapper; import com.iformall.service.WxBillRentService; @@ -27,6 +24,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.text.SimpleDateFormat; @@ -236,7 +234,7 @@ public class WxRentContractController extends BaseController { wxRentContractService.exportContract(request,response,getTenantId(),id); } - @GetMapping("updateRentContractStatus") + @PostMapping("updateRentContractStatus") @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) @SystemControllerLog(description = "租赁合同-更新合同状态") public ResultData updateRentContractStatus(Long id) { 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 fc00214c6..7e89d7ca7 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -1332,13 +1332,16 @@ public class WxRentContractServiceImpl implements WxRentContractService { if (id == null) { return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); } + WxRentContract record = wxRentContractMapper.selectByPrimaryKey(id); + if (record == null) { + return new ResultData(ErrorCode.RENT_CONTRACT_IS_NOT_FOUND); + } //更新合同状态为签约 WxRentContract wxRentContract = new WxRentContract(); wxRentContract.setId(id); wxRentContract.setStatus(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()); wxRentContractMapper.updateByPrimaryKeySelective(wxRentContract); //建立账单 - WxRentContract record = wxRentContractMapper.selectByPrimaryKey(id); if (record != null && record.getMerchantId() != null && record.getStatus().equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()) &&