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);