From dcb28f06ca086ed1c6d26c70cfb7cef0660f4f17 Mon Sep 17 00:00:00 2001 From: Aug <17674666882@163.com> Date: Thu, 7 Aug 2025 11:24:28 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apiService/impl/AuthenticationServiceImpl.java | 45 +++++++++------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/AuthenticationServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/AuthenticationServiceImpl.java index 084317c..66c852b 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/AuthenticationServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/AuthenticationServiceImpl.java @@ -48,6 +48,7 @@ public class AuthenticationServiceImpl implements AuthenticationService { EmployAuthenticationPerson cerNo = employAuthenticationPersonService.lambdaQuery() .eq(EmployAuthenticationPerson::getCerNo, employAuthenticationPerson.getCerNo()) .eq(EmployAuthenticationPerson::getStatus, "1") + .ne(EmployAuthenticationPerson::getUserId, hanHaiMember.getId()) .one(); if(null != cerNo){ @@ -55,21 +56,17 @@ public class AuthenticationServiceImpl implements AuthenticationService { } //如果存在则修改信息 + Date oldTime = CommonUtils.getCurrentTime(); + int addTime = 12;//12个余额 + //在当前有效期基础上增加时长 + Date newTime = CommonUtils.getValidTime(oldTime, addTime); if(null != one){ - if(!"1".equals(one.getStatus())){ - employAuthenticationPerson.setId(one.getId()); - employAuthenticationPerson.setStatus("0"); - employAuthenticationPersonService.updateById(employAuthenticationPerson); - message = "个人实名修改成功!"; - }else { - message = "审核已通过,不能修改!"; - } + employAuthenticationPerson.setId(one.getId()); + employAuthenticationPerson.setStatus("0"); + employAuthenticationPerson.setValidTime(newTime); + employAuthenticationPersonService.updateById(employAuthenticationPerson); + message = "个人实名修改成功!"; }else { - Date oldTime = CommonUtils.getCurrentTime(); - int addTime = 12;//12个余额 - //在当前有效期基础上增加时长 - Date newTime = CommonUtils.getValidTime(oldTime, addTime); - employAuthenticationPerson.setUserId(hanHaiMember.getId()); employAuthenticationPerson.setValidTime(newTime); boolean result = employAuthenticationPersonService.save(employAuthenticationPerson); @@ -112,21 +109,17 @@ public class AuthenticationServiceImpl implements AuthenticationService { .eq(EmployAhthenticationCompany::getUserId, hanHaiMember.getId()) .one(); //如果存在则修改信息 + Date oldTime = CommonUtils.getCurrentTime(); + int addTime = 12;//12个余额 + //在当前有效期基础上增加时长 + Date newTime = CommonUtils.getValidTime(oldTime, addTime); if(null != one){ - if(!"1".equals(one.getStatus())){ - employAhthenticationCompany.setId(one.getId()); - employAhthenticationCompany.setStatus("0"); - employAhthenticationCompanyService.updateById(employAhthenticationCompany); - message = "企业实名修改成功!"; - }else { - message = "审核已通过,不能修改!"; - } + employAhthenticationCompany.setId(one.getId()); + employAhthenticationCompany.setStatus("0"); + employAhthenticationCompany.setValidTime(newTime); + employAhthenticationCompanyService.updateById(employAhthenticationCompany); + message = "企业实名修改成功!"; }else { - Date oldTime = CommonUtils.getCurrentTime(); - int addTime = 12;//12个余额 - //在当前有效期基础上增加时长 - Date newTime = CommonUtils.getValidTime(oldTime, addTime); - employAhthenticationCompany.setUserId(hanHaiMember.getId()); employAhthenticationCompany.setValidTime(newTime); boolean result = employAhthenticationCompanyService.save(employAhthenticationCompany);