diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java index 69c5861c0..4d414ea4c 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java @@ -69,7 +69,7 @@ public class WxPropertyContractController extends BaseController { logger.debug("[" + getIpAddr() + "] WxPropertyContractController::updateRentStartTime"); Integer rentStartType = wxPropertyContract.getRentStartType(); wxPropertyContract = wxPropertyContractMapper.selectByPrimaryKey(wxPropertyContract.getId()); - if(rentStartType.equals(EnumRentStartType.STARTTIME.getCode())){ + if(rentStartType!=null && rentStartType.equals(EnumRentStartType.STARTTIME.getCode())){ wxPropertyContract.setRentalStartDate(wxPropertyContract.getStartDate()); } MallUserInfo user = getUser(); 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 d1c8bc890..696ed660b 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java @@ -87,9 +87,8 @@ public class WxRentContractController extends BaseController { MallUserInfo user = getUser(); wxRentContract.setTenantId(user.getTenantId()); - wxRentContract.setAdjustPeriodHandle(); - if(wxRentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){ + if(wxRentContract.getRentStartType()!=null &&wxRentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){ wxRentContract.setRentalStartDate(wxRentContract.getStartDate()); } return wxRentContractService.save(wxRentContract, user.getId(),user.getName()); @@ -101,7 +100,7 @@ public class WxRentContractController extends BaseController { logger.debug("[" + getIpAddr() + "] WxRentContractController::updateRentStartTime"); Integer rentStartType = wxRentContract.getRentStartType(); wxRentContract = wxRentContractMapper.selectByPrimaryKey(wxRentContract.getId()); - if(rentStartType.equals(EnumRentStartType.STARTTIME.getCode())){ + if(rentStartType!=null && rentStartType.equals(EnumRentStartType.STARTTIME.getCode())){ wxRentContract.setRentalStartDate(wxRentContract.getStartDate()); } MallUserInfo user = getUser(); @@ -119,7 +118,7 @@ public class WxRentContractController extends BaseController { wxRentContract.setTenantId(user.getTenantId()); wxRentContract.setAdjustPeriodHandle(); wxRentContract.setRentPriceHandle(); - if(wxRentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){ + if(wxRentContract.getRentStartType()!=null && wxRentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){ wxRentContract.setRentalStartDate(wxRentContract.getStartDate()); } return wxRentContractService.update(wxRentContract, user.getId(),user.getName()); @@ -139,7 +138,7 @@ public class WxRentContractController extends BaseController { wxRentContract.setAdjustPeriodHandle(); wxRentContract.setRentPriceHandle(); - if(wxRentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){ + if(wxRentContract.getRentStartType()!=null &&wxRentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){ wxRentContract.setRentalStartDate(wxRentContract.getStartDate()); } return wxRentContractService.update(wxRentContract, user.getId(),user.getName()); @@ -153,7 +152,7 @@ public class WxRentContractController extends BaseController { wxRentContract.setTenantId(user.getTenantId()); wxRentContract.setAdjustPeriodHandle(); wxRentContract.setRentPriceHandle(); - if(wxRentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){ + if(wxRentContract.getRentStartType()!=null && wxRentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){ wxRentContract.setRentalStartDate(wxRentContract.getStartDate()); } return wxRentContractService.updateFile(wxRentContract, user.getId(),user.getName());