| @@ -967,14 +967,15 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| // return; | // return; | ||||
| //} | //} | ||||
| if (StringUtils.isNotBlank(investTaskEntity.getOwner())) { | |||||
| investTaskEntity.setStatus(EnumTaskStatus.NEGOTIATING); | |||||
| if (StringUtils.isBlank(investTaskEntity.getOwner())) { | |||||
| investTaskEntity.setStatus(EnumTaskStatus.CREATED); | |||||
| } else { | } else { | ||||
| WxShop shop = shopService.getById(investTaskEntity.getTargetId()); | WxShop shop = shopService.getById(investTaskEntity.getTargetId()); | ||||
| Map<Long, WxRentContract> shopContractMap = getWxRentContractMap(shop); | Map<Long, WxRentContract> shopContractMap = getWxRentContractMap(shop); | ||||
| WxRentContract contract = shopContractMap.get(shop.getId()); | WxRentContract contract = shopContractMap.get(shop.getId()); | ||||
| if (Objects.nonNull(contract)) { | if (Objects.nonNull(contract)) { | ||||
| InvestHelper.addContractId(investTaskEntity.getContent(), contract.getId(), null); | InvestHelper.addContractId(investTaskEntity.getContent(), contract.getId(), null); | ||||
| investTaskEntity.setStatus(EnumTaskStatus.FINISH); | |||||
| } else { | } else { | ||||
| WxRentContract contractQuery = new WxRentContract(); | WxRentContract contractQuery = new WxRentContract(); | ||||
| contractQuery.setTenantId(InvestUserContext.getUser().getTenantId()); | contractQuery.setTenantId(InvestUserContext.getUser().getTenantId()); | ||||
| @@ -984,6 +985,8 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| int count = rentContractService.selectContractCountByShopId(contractQuery); | int count = rentContractService.selectContractCountByShopId(contractQuery); | ||||
| if (count > 0) { | if (count > 0) { | ||||
| investTaskEntity.setStatus(EnumTaskStatus.INTENTION); | investTaskEntity.setStatus(EnumTaskStatus.INTENTION); | ||||
| } else { | |||||
| investTaskEntity.setStatus(EnumTaskStatus.NEGOTIATING); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||