From 62ef24761aa0a9f80386e5f3583c02911ee6bce9 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期五, 03 九月 2021 16:47:27 +0800 Subject: [PATCH] bug修复 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEldersAuthElderlyServiceImpl.java | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEldersAuthElderlyServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEldersAuthElderlyServiceImpl.java index 01cfc59..47e3d1d 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEldersAuthElderlyServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEldersAuthElderlyServiceImpl.java @@ -145,15 +145,22 @@ @Override public R updateEldersAuthElderly(EldersAuthElderlyDTO eldersAuthElderlyDTO) { ComEldersAuthElderlyDO comEldersAuthElderlyDO = this.baseMapper.selectById(eldersAuthElderlyDTO.getId()); + if(comEldersAuthElderlyDO == null){ + return R.fail("未查询到该老人信息"); + } if (!ObjectUtils.isEmpty(eldersAuthElderlyDTO.getName())) { comEldersAuthElderlyDO.setName(eldersAuthElderlyDTO.getName()); } - if (eldersAuthElderlyDTO.getIsExist() != null && eldersAuthElderlyDTO.getIsExist().intValue() != 1 - && eldersAuthElderlyDTO.getIsExist() != 2) { - return R.fail("参数错误,是否健在只能为1或2"); - } comEldersAuthElderlyDO.setIsExist(eldersAuthElderlyDTO.getIsExist()); comEldersAuthElderlyDO.setIsBigAge(eldersAuthElderlyDTO.getIsBigAge()); + if (!ObjectUtils.isEmpty(eldersAuthElderlyDTO.getIdCard())) { + try { + String idCard = AESUtil.encrypt128(eldersAuthElderlyDTO.getIdCard(), aesKey); + comEldersAuthElderlyDO.setIdCard(idCard); + } catch (Exception exp) { + log.error("身份证转义失败"); + } + } baseMapper.updateEldersAuthElderly(comEldersAuthElderlyDO); return R.ok(); } -- Gitblit v1.7.1