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()) &&