From d96e946899570797c865441f7c0d17d8e32fbe73 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 25 Oct 2019 16:36:11 +0800 Subject: [PATCH 1/5] =?UTF-8?q?[=E5=AE=A1=E6=89=B9=E5=BE=85=E5=8A=9E][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=9F=A5=E8=AF=A2=E6=80=BB=E6=95=B0]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/workflow/WxFlowAbleController.java | 11 +++++++++++ .../main/java/com/iformall/service/WxFlowService.java | 5 ++++- .../com/iformall/service/impl/WxFlowServiceImpl.java | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java b/mallinkAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java index 8139bdd32..c142822aa 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java @@ -56,6 +56,17 @@ public class WxFlowAbleController extends BaseController { return wxFlowService.list(flowType,pageNum,pageSize,getUserId(),getTenantId()); } + /** + * 待办总数 + */ + @ApiOperation("待办总数") + @GetMapping(value = "/getTotal") + @SystemControllerLog(description = "工作流-待办总数") + public ResultData getTotal() { + logger.debug("[" + getIpAddr() + "] FlowAbleController::getTotal"); + return wxFlowService.getTotal(getUserId(), getTenantId()); + } + /** * 我的申请列表 */ diff --git a/mallinkService/src/main/java/com/iformall/service/WxFlowService.java b/mallinkService/src/main/java/com/iformall/service/WxFlowService.java index 9bae8b461..ce39c1b2b 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxFlowService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxFlowService.java @@ -6,7 +6,7 @@ import com.iformall.domain.po.WxFlowConfig; import com.iformall.domain.po.WxFlowModel; import com.iformall.domain.po.WxFlowRecord; import org.springframework.web.bind.annotation.RequestBody; -import javax.servlet.http.HttpServletResponse; + import java.util.List; import java.util.Map; @@ -125,4 +125,7 @@ public interface WxFlowService { * @return */ List getModelBybusiness(WxFlowModel wxFlowModel); + + ResultData getTotal(Long userId, String tenantId); + } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index f9f4434f7..bbcc3fead 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -1542,6 +1542,13 @@ public class WxFlowServiceImpl implements WxFlowService { return wxFlowModelMapper.getModelBybusiness(wxFlowModel); } + @Override + public ResultData getTotal(Long userId, String tenantId) { + TaskQuery taskQuery = taskService.createTaskQuery(); + int total = taskQuery.taskCandidateOrAssigned(userId.toString()).list().size(); + return new ResultData(total); + } + public static void main(String[] args) { new Thread(() -> System.out.println(1 + "hello world")).start(); From d85f011e3a99d155bf5231f9397eaa5094611624 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 25 Oct 2019 17:58:45 +0800 Subject: [PATCH 2/5] =?UTF-8?q?[=E5=95=86=E6=88=B7=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E6=B6=88=E8=B4=B9][=E4=BF=AE=E6=94=B9][=E6=9F=A5=E8=AF=A2]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/WxMerchantMapper.xml | 84 +++++++++++-------- 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml b/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml index d554d840b..68b7f590c 100644 --- a/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml @@ -424,47 +424,61 @@ SELECT m.id, m.`img_url` cover, m.`name` merchantName, m.`link_person` linkName, - ifnull(consume.consumeCount,0) consumeCount,ifnull(consumePeople.consumeCountP,0),ifnull(price.tradeAmt,0) - tradeAmt + ifnull(consume.consumeCount,0) consumeCount,ifnull(consumePeople.consumeCountP,0) as consumeCountP, + ifnull(price.tradeAmt,0) tradeAmt FROM wx_merchant m left join (SELECT count(*) as consumeCount,cm.merchant_id FROM wx_coupon_order o LEFT JOIN wx_coupon co ON (o.`coupon_id` = co.id) From 5cfc21814e5ce2b7f22819f73f7be834a460ea1a Mon Sep 17 00:00:00 2001 From: Burce Date: Fri, 25 Oct 2019 17:59:35 +0800 Subject: [PATCH 4/5] =?UTF-8?q?[=E6=8B=9B=E5=95=86][=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF]=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../invest/InvestBaseController.java | 11 ++- .../invest/InvestCustomerController.java | 16 ++-- .../com/iformall/log/TableOperateAspect.java | 3 + .../domain/vo/invest/InvestCustomerVo.java | 1 - .../invest/impl/InvestBizServiceImpl.java | 94 ++++++++++++------- .../impl/InvestCustomerServiceImpl.java | 8 +- 6 files changed, 87 insertions(+), 46 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestBaseController.java b/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestBaseController.java index d3abfb8de..5a069ca28 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestBaseController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestBaseController.java @@ -43,9 +43,6 @@ public class InvestBaseController extends BaseController { return new InvestResultData(r); } catch (MallinkException e) { log.error("execute error", e); - if (Objects.equals(Result.SUCCESS, e.getErrorCode())) { - return new InvestResultData(); - } return new InvestResultData(e.getErrorCode(), e.getMessage()); } catch (NullPointerException e) { ErrorCode errorCode = ErrorCode.SYS_NULLPOINTER_ERROR ; @@ -66,11 +63,17 @@ public class InvestBaseController extends BaseController { } } - public void importData(T t, Consumer action) { + public InvestResultData importData(T t, Consumer action) { try { log.debug("[" + getIpAddr() + "] request , params : {}", JSON.toJSONString(t)); InvestUserContext.setUser(getUser()); action.accept(t); + return new InvestResultData(); + } catch (MallinkException e) { + if (Objects.equals(Result.SUCCESS, e.getErrorCode())) { + return new InvestResultData(Result.SUCCESS, e.getMessage()); + } + throw e; } finally { InvestUserContext.remove(); } diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestCustomerController.java b/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestCustomerController.java index da6316136..95dfa326b 100755 --- a/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestCustomerController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestCustomerController.java @@ -86,12 +86,12 @@ public class InvestCustomerController extends InvestBaseController{ return execute(customerDto, p -> investBizService.updateCustomerAndDemand(p)); } - @ApiOperation("导出客户信息") - @GetMapping("/exportCustomer") - @SystemControllerLog(description = "招商管理-导出客户信息") - public void exportCustomer(InvestDemandQuery params, HttpServletResponse response) { - exportData(params, response, (p, u) -> investBizService.exportCustomer(p, u)); - } + //@ApiOperation("导出客户信息") + //@GetMapping("/exportCustomer") + //@SystemControllerLog(description = "招商管理-导出客户信息") + //public void exportCustomer(InvestDemandQuery params, HttpServletResponse response) { + // exportData(params, response, (p, u) -> investBizService.exportCustomer(p, u)); + //} @ApiOperation("导出客户信息模板") @GetMapping("/exportCustomerTemplate") @@ -103,8 +103,8 @@ public class InvestCustomerController extends InvestBaseController{ @ApiOperation("导入客户信息" ) @PostMapping(value = "/importCustomer", consumes = "multipart/*", headers = "content-type=multipart/form-data") @SystemControllerLog(description = "招商管理-导入客户信息") - public void importCustomer(@RequestParam("file") MultipartFile file) { - importData(file, p -> investBizService.importCustomer(p)); + public InvestResultData importCustomer(@RequestParam("file") MultipartFile file) { + return importData(file, p -> investBizService.importCustomer(p)); } } diff --git a/mallinkAdmin/src/main/java/com/iformall/log/TableOperateAspect.java b/mallinkAdmin/src/main/java/com/iformall/log/TableOperateAspect.java index 2f46ac4ed..d65be0d47 100644 --- a/mallinkAdmin/src/main/java/com/iformall/log/TableOperateAspect.java +++ b/mallinkAdmin/src/main/java/com/iformall/log/TableOperateAspect.java @@ -143,6 +143,9 @@ public class TableOperateAspect { for (Field field : fields) { String annotationVal = field.getAnnotation(LogColumn.class).value(); Object value = FieldUtils.readDeclaredField(entity, field.getName(), true); + if(Objects.isNull(value)) { + continue; + } if (field.getType().isEnum()) { value = InvestHelper.getEnumVal(InvestHelper.valueOf(value.getClass(), ((Enum) value).name())); } diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestCustomerVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestCustomerVo.java index 3ca1197b0..fbe0d01bb 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestCustomerVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestCustomerVo.java @@ -5,7 +5,6 @@ import com.iformall.domain.po.invest.InvestCustomerEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; @Data @EqualsAndHashCode(callSuper = true) diff --git a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java index a07f85d16..2063e943a 100644 --- a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java @@ -184,8 +184,8 @@ public class InvestBizServiceImpl implements InvestBizService { targetFile.mkdirs(); } String fileName = "invest_1.xlsx"; - //int dot = mFile.getOriginalFilename().lastIndexOf('.'); - //fileName = fileName + mFile.getOriginalFilename().substring(dot); + int dot = mFile.getOriginalFilename().lastIndexOf('.'); + fileName = fileName + mFile.getOriginalFilename().substring(dot); File lFile = new File(fpath + File.separator + fileName); @@ -256,7 +256,7 @@ public class InvestBizServiceImpl implements InvestBizService { log.error(e.getMessage()); // 删除缓存文件 file.delete(); - return; + throw new MallinkException(ErrorCode.MEM_IMPORT_ERR.getCode(), "导入模板失败: 模板数据解析失败"); } // 删除缓存文件 file.delete(); @@ -264,7 +264,7 @@ public class InvestBizServiceImpl implements InvestBizService { if (datalist == null) { log.error("导入模板失败: 模板数据解析失败"); setRedisValue(importKey, "1", "0", "0", "1", true); - return; + throw new MallinkException(ErrorCode.MEM_IMPORT_ERR.getCode(), "导入模板失败: 模板数据解析失败"); } List successList = datalist.getList(); @@ -280,6 +280,7 @@ public class InvestBizServiceImpl implements InvestBizService { //添加到redis里 setRedisValue(importKey, "" + total, "" + all_success, "0", "" + all_fail, total == all_fail); if (CollectionUtils.isEmpty(successList)) { + stringRedisTemplate.expire(importKey, 3, TimeUnit.SECONDS); return; } //品牌信息 @@ -300,8 +301,15 @@ public class InvestBizServiceImpl implements InvestBizService { List customers = customerService.list(customerQuery); Map customerMap = getMap(customers, InvestCustomerEntity::getPhone); + //商铺信息 + LambdaQueryWrapper demandQuery = new LambdaQueryWrapper<>(); + Collection customerIds = getIds(customers, InvestCustomerEntity::getId); + demandQuery.in(CollectionUtils.isNotEmpty(customerIds), InvestDemandEntity::getCustomerId, customerIds); + List demandList = demandService.list(demandQuery); + Map demandMap = getMap(demandList, InvestDemandEntity::getCustomerId); + try { - successList.parallelStream().forEach(customer -> { + successList.forEach(customer -> { if (StringUtils.isBlank(customer.getPhone())) { stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); log.error("负责人电话为空", customer.toString()); @@ -327,17 +335,25 @@ public class InvestBizServiceImpl implements InvestBizService { log.error("经营业态为空", customer.toString()); return; } - InvestDemandDto customerBase = convetCustomer(customer, brandMap, businesseMap, shopMap, customerMap); - if (customerBase == null) { + InvestDemandDto toImportCustomer = convetCustomer(customer, brandMap, businesseMap, shopMap, customerMap.get(customer.getPhone()), demandMap); + if (toImportCustomer == null) { stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); log.error("customerBase null"); + return; + } + if (Objects.isNull(customerMap.get(customer.getPhone()))) { + saveCustomerAndDemand(toImportCustomer); + } else { + toImportCustomer.getCustomer().setId(customerMap.get(customer.getPhone()).getId()); + updateCustomerAndDemand(toImportCustomer); } - saveCustomerAndDemand(customerBase) ; }); } catch (Exception e) { setRedisValue(importKey, "1", "0", "0", "1", true); - e.printStackTrace(); - log.error("导入模板失败:" + e.getMessage()); + log.error("导入模板失败", e); + throw new MallinkException(ErrorCode.MEM_IMPORT_ERR.getCode(), "导入模板失败"); + } finally { + stringRedisTemplate.expire(importKey, 3, TimeUnit.SECONDS); } } @@ -351,30 +367,42 @@ public class InvestBizServiceImpl implements InvestBizService { return getMap(brands, WxBrand::getName); } - private InvestDemandDto convetCustomer(InvestCustomerVo customerVoT, Map brandMap, Map businesseMap, Map shopMap, Map customerMap) { - InvestCustomerEntity customerEntity = new InvestCustomerEntity(); - if (Objects.isNull(brandMap.get(customerVoT.getBrandName()))) { + private InvestDemandDto convetCustomer(InvestCustomerVo importCustomerVo, Map brandMap, Map businesseMap, Map shopMap, InvestCustomerEntity dbCustomer, Map demandMap) { + InvestCustomerEntity customerEntity = null; + InvestDemandEntity demandEntity = null; + if (Objects.isNull(dbCustomer)) { + customerEntity = new InvestCustomerEntity(); + } else { + customerEntity = dbCustomer; + demandEntity = demandMap.get(dbCustomer.getId()); + } + if (Objects.isNull(demandEntity)) { + demandEntity = new InvestDemandEntity(); + } + if (Objects.isNull(brandMap.get(importCustomerVo.getBrandName()))) { return null; } - customerEntity.setBrandId(brandMap.get(customerVoT.getBrandName()).getId()); + customerEntity.setBrandId(brandMap.get(importCustomerVo.getBrandName()).getId()); - if (Objects.isNull(businesseMap.get(customerVoT.getBusiness()))) { + if (Objects.isNull(businesseMap.get(importCustomerVo.getBusiness()))) { return null; } - customerEntity.setBusinessId(businesseMap.get(customerVoT.getBusiness()).getId()); + customerEntity.setBusinessId(businesseMap.get(importCustomerVo.getBusiness()).getId()); - InvestDemandEntity demandEntity = new InvestDemandEntity(); - if (Objects.isNull(shopMap.get(customerVoT.getShopNumber()))) { + if (Objects.isNull(shopMap.get(importCustomerVo.getShopNumber()))) { return null; } - demandEntity.setTargetId(shopMap.get(customerVoT.getShopNumber()).getId()); + customerEntity.setName(importCustomerVo.getName()); + customerEntity.setPhone(importCustomerVo.getPhone()); + customerEntity.setType(importCustomerVo.getType()); + demandEntity.setTargetId(shopMap.get(importCustomerVo.getShopNumber()).getId()); demandEntity.setTargetType(EnumInvestType.RENT); Map intent = new HashMap<>(); - if (Objects.nonNull(customerVoT.getRentArea())) { - intent.put(InvestDemandEntity.KEY_RENT_AREA, customerVoT.getRentArea()); + if (Objects.nonNull(importCustomerVo.getRentArea())) { + intent.put(InvestDemandEntity.KEY_RENT_AREA, importCustomerVo.getRentArea()); } - if (Objects.nonNull(customerVoT.getOpeningTime())) { - intent.put(InvestDemandEntity.KEY_OPENING_TIME, customerVoT.getOpeningTime()); + if (Objects.nonNull(importCustomerVo.getOpeningTime())) { + intent.put(InvestDemandEntity.KEY_OPENING_TIME, importCustomerVo.getOpeningTime()); } if (!intent.isEmpty()) { @@ -384,12 +412,6 @@ public class InvestBizServiceImpl implements InvestBizService { InvestDemandDto demandDto = new InvestDemandDto(); demandDto.setCustomer(customerEntity); demandDto.setDemand(demandEntity); - if (Objects.isNull(customerMap.get(customerVoT.getPhone()))) { - //TODO insert - } else { - //TODO update - } - return demandDto; } @@ -399,7 +421,7 @@ public class InvestBizServiceImpl implements InvestBizService { stringRedisTemplate.opsForHash().put(importKey, "processCount", processCount); stringRedisTemplate.opsForHash().put(importKey, "failCount", failCount); if (fail) { - stringRedisTemplate.expire(importKey, 10, TimeUnit.SECONDS); + stringRedisTemplate.expire(importKey, 3, TimeUnit.SECONDS); } } @@ -719,7 +741,12 @@ public class InvestBizServiceImpl implements InvestBizService { if (Objects.isNull(demandEntity.getCustomerId())) { demandEntity.setCustomerId(customerId); } - demandService.updateById(demandEntity); + InvestDemandEntity dbDemand = demandService.getByCustomerId(customerId); + if (Objects.isNull(dbDemand)) { + demandService.save(demandEntity); + } else { + demandService.updateById(demandEntity); + } saveMessage(demandEntity, demandDto.getCustomer()); return true; } @@ -730,7 +757,7 @@ public class InvestBizServiceImpl implements InvestBizService { } Long owner = demandEntity.getOwner(); if (Objects.nonNull(owner) && !Objects.equals(owner, 0L)) { - List ownerArray = Arrays.asList(owner); + List ownerArray = Collections.singletonList(owner); demandService.saveBatchMessage(ownerArray, EnumInvestMessageType.CUSTOMER_CREATE.getInfo(), EnumInvestMessageTag.CUSTOMER_CREATE, EnumFollowType.DEMAND, customerEntity.getId()); } } @@ -1124,6 +1151,9 @@ public class InvestBizServiceImpl implements InvestBizService { } private Collection getIds(Collection dataList, Function mapper) { + if (CollectionUtils.isEmpty(dataList)) { + return Collections.emptyList(); + } return InvestHelper.getIds(dataList, mapper); } } diff --git a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestCustomerServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestCustomerServiceImpl.java index 14f871102..c9f03c884 100755 --- a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestCustomerServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestCustomerServiceImpl.java @@ -6,10 +6,12 @@ import com.iformall.common.TableLog; import com.iformall.domain.po.invest.InvestCustomerEntity; import com.iformall.domain.vo.invest.InvestCustomerVo; import com.iformall.enums.EnumCustomerType; +import com.iformall.enums.EnumInvestChannel; import com.iformall.mapper.InvestCustomerMapper; import com.iformall.service.WxBrandService; import com.iformall.service.WxBusinessService; import com.iformall.service.invest.InvestCustomerService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -33,6 +35,7 @@ public class InvestCustomerServiceImpl extends InvestBaseServiceImpl updateWrapper) { return super.updateActon(entity, updateWrapper, this::checkBeforeSaveOrUpdate); @@ -48,10 +51,13 @@ public class InvestCustomerServiceImpl extends InvestBaseServiceImpl Date: Fri, 25 Oct 2019 18:22:23 +0800 Subject: [PATCH 5/5] =?UTF-8?q?[=E5=AE=A1=E6=89=B9][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E6=BB=9E=E7=BA=B3=E9=87=91]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/service/impl/WxBillAllServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java index 99a9554cb..8ef7995cb 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java @@ -967,7 +967,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { wxBillRent.setUpdatetime(updateDate); if (oldLatePrice != null) { wxBillRent.setLatePayPrice(newLatePrice); - wxBillRent.setOwe(newPrice + dbBill.getServiceChargePay() + newLatePrice - dbBill.getPay()); + wxBillRent.setOwe(dbBill.getReceivePay() + dbBill.getServiceChargePay() + newLatePrice - dbBill.getPay()); wxBillRentMapper.updateById(wxBillRent); addBillAction(EnumBillAction.UPDATE_LATE_PAY_MONEY, id, oldLatePrice, newLatePrice, user); } else { @@ -1022,7 +1022,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { wxBillProperty.setUpdatetime(updateDate); if (oldLatePrice != null) { wxBillProperty.setLatePayPrice(newLatePrice); - wxBillProperty.setOwe(newPrice + dbBill.getServiceChargePay() + newLatePrice - dbBill.getPay()); + wxBillProperty.setOwe(dbBill.getReceivePay() + dbBill.getServiceChargePay() + newLatePrice - dbBill.getPay()); wxBillPropertyMapper.updateById(wxBillProperty); addBillAction(EnumBillAction.UPDATE_LATE_PAY_MONEY, id, oldLatePrice, newLatePrice, user); } else {