| @@ -12,7 +12,7 @@ public enum ErrorCode{ | |||||
| * 系统级别 | * 系统级别 | ||||
| * 1000-1999 | * 1000-1999 | ||||
| */ | */ | ||||
| SYS_SERVER_ERROR(1000, "服务器请求异常"), | |||||
| SYS_SERVER_ERROR(1000, "系统异常"), | |||||
| SYS_PARAMETER_ERROR(1001, "参数不合法"), | SYS_PARAMETER_ERROR(1001, "参数不合法"), | ||||
| SYS_PARAMETER_NOT_NULL(1002, "参数不能为空"), | SYS_PARAMETER_NOT_NULL(1002, "参数不能为空"), | ||||
| SYS_PARAMETER_TYPE_ERROR(1003, "参数类型异常"), | SYS_PARAMETER_TYPE_ERROR(1003, "参数类型异常"), | ||||
| @@ -270,6 +270,14 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| String message; | String message; | ||||
| boolean hasFlow = true; | boolean hasFlow = true; | ||||
| if (record.getId() == null) { | if (record.getId() == null) { | ||||
| if (record.getOperationType().equals(EnumContractOperationType.WHOLE.getCode())) { | |||||
| WxPropertyContract propertyContractQuery = new WxPropertyContract(); | |||||
| propertyContractQuery.setRentContractId(record.getRentContractId()); | |||||
| int propertyContractCount = wxPropertyContractMapper.selectCount(propertyContractQuery); | |||||
| if (propertyContractCount > 0) { | |||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| hasFlow = false; | hasFlow = false; | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| record.setId(idWorker.nextId()); | record.setId(idWorker.nextId()); | ||||