@@ -209,7 +209,7 @@ public class ExpertManage { | |||||
} | } | ||||
ExpertUserFullInfo one = iExpertUserFullInfoService.getOne(Wrappers.lambdaQuery(ExpertUserFullInfo.class) | ExpertUserFullInfo one = iExpertUserFullInfoService.getOne(Wrappers.lambdaQuery(ExpertUserFullInfo.class) | ||||
.eq(ExpertUserFullInfo::getPhoneNo, phoneNo)); | .eq(ExpertUserFullInfo::getPhoneNo, phoneNo)); | ||||
if (Objects.nonNull(one)) { | |||||
if (Objects.nonNull(one) && !one.getUserId().equals(userInfo.getId())) { | |||||
throw new BizException("该手机号已被专家注册,请确认后再填写"); | throw new BizException("该手机号已被专家注册,请确认后再填写"); | ||||
} | } | ||||
return userInfo.getId(); | return userInfo.getId(); | ||||
@@ -1,11 +1,13 @@ | |||||
package com.ningdatech.pmapi.expert.service; | package com.ningdatech.pmapi.expert.service; | ||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.ningdatech.pmapi.expert.entity.ExpertAvoidCompany; | import com.ningdatech.pmapi.expert.entity.ExpertAvoidCompany; | ||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
/** | /** | ||||
* <p> | * <p> | ||||
* 服务类 | |||||
* 服务类 | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author Liuxinxin | * @author Liuxinxin | ||||
@@ -13,4 +15,8 @@ import com.baomidou.mybatisplus.extension.service.IService; | |||||
*/ | */ | ||||
public interface IExpertAvoidCompanyService extends IService<ExpertAvoidCompany> { | public interface IExpertAvoidCompanyService extends IService<ExpertAvoidCompany> { | ||||
default void removeByUserId(Long userId) { | |||||
remove(Wrappers.lambdaQuery(ExpertAvoidCompany.class).eq(ExpertAvoidCompany::getUserId, userId)); | |||||
} | |||||
} | } |
@@ -106,13 +106,9 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { | |||||
// 专家信息审核通过之前,所有信息无需备份 | // 专家信息审核通过之前,所有信息无需备份 | ||||
iExpertUserFullInfoService.removeById(expertUserFullInfo.getId()); | iExpertUserFullInfoService.removeById(expertUserFullInfo.getId()); | ||||
// 删除所有专家标签字段 | // 删除所有专家标签字段 | ||||
LambdaQueryWrapper<ExpertTag> expertTagRemove = Wrappers.lambdaQuery(ExpertTag.class) | |||||
.eq(ExpertTag::getUserId, userId); | |||||
iExpertTagService.remove(expertTagRemove); | |||||
iExpertTagService.removeByUserId(userId); | |||||
// 删除所有专家字典字段 | // 删除所有专家字典字段 | ||||
LambdaQueryWrapper<ExpertDictionary> expertDictionaryRemove = Wrappers.lambdaQuery(ExpertDictionary.class) | |||||
.eq(ExpertDictionary::getUserId, userId); | |||||
iExpertDictionaryService.remove(expertDictionaryRemove); | |||||
iExpertDictionaryService.removeByUserId(userId); | |||||
// 删除所有专家履职意向申请 | // 删除所有专家履职意向申请 | ||||
// 补充审核逻辑 | // 补充审核逻辑 | ||||
LambdaQueryWrapper<ExpertMetaApply> expertMetaApplyRemove = Wrappers.lambdaQuery(ExpertMetaApply.class) | LambdaQueryWrapper<ExpertMetaApply> expertMetaApplyRemove = Wrappers.lambdaQuery(ExpertMetaApply.class) | ||||
@@ -121,9 +117,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { | |||||
.eq(ExpertMetaApply::getDisplayEnable, BoolDisplayEnum.N.name()); | .eq(ExpertMetaApply::getDisplayEnable, BoolDisplayEnum.N.name()); | ||||
iExpertMetaApplyService.remove(expertMetaApplyRemove); | iExpertMetaApplyService.remove(expertMetaApplyRemove); | ||||
// 删除回避单位 | // 删除回避单位 | ||||
LambdaQueryWrapper<ExpertAvoidCompany> expertAvoidCompanyRemove = Wrappers.lambdaQuery(ExpertAvoidCompany.class) | |||||
.eq(ExpertAvoidCompany::getUserId, userId); | |||||
iExpertAvoidCompanyService.remove(expertAvoidCompanyRemove); | |||||
iExpertAvoidCompanyService.removeByUserId(userId); | |||||
} | } | ||||
saveExpertUserFullInfo.setUserId(userId); | saveExpertUserFullInfo.setUserId(userId); | ||||
saveExpertUserFullInfo.setExpertAccountStatus(ExpertAccountStatusEnum.APPLYING.getKey()); | saveExpertUserFullInfo.setExpertAccountStatus(ExpertAccountStatusEnum.APPLYING.getKey()); | ||||
@@ -1,15 +1,16 @@ | |||||
package com.ningdatech.pmapi.meta.service; | package com.ningdatech.pmapi.meta.service; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | |||||
import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; | import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; | ||||
import com.ningdatech.pmapi.meta.model.entity.ExpertDictionary; | import com.ningdatech.pmapi.meta.model.entity.ExpertDictionary; | ||||
import com.baomidou.mybatisplus.extension.service.IService; | |||||
import java.util.Collection; | import java.util.Collection; | ||||
import java.util.List; | import java.util.List; | ||||
/** | /** | ||||
* <p> | * <p> | ||||
* 服务类 | |||||
* 服务类 | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author Liuxinxin | * @author Liuxinxin | ||||
@@ -28,4 +29,8 @@ public interface IExpertDictionaryService extends IService<ExpertDictionary> { | |||||
**/ | **/ | ||||
List<ExpertDictionary> listByUserId(Collection<Long> userIds, DictExpertInfoTypeEnum dictType); | List<ExpertDictionary> listByUserId(Collection<Long> userIds, DictExpertInfoTypeEnum dictType); | ||||
default void removeByUserId(Long userId) { | |||||
this.remove(Wrappers.lambdaQuery(ExpertDictionary.class).eq(ExpertDictionary::getUserId, userId)); | |||||
} | |||||
} | } |
@@ -1,11 +1,12 @@ | |||||
package com.ningdatech.pmapi.meta.service; | package com.ningdatech.pmapi.meta.service; | ||||
import com.ningdatech.pmapi.meta.model.entity.ExpertTag; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.ningdatech.pmapi.meta.model.entity.ExpertTag; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* 服务类 | |||||
* 服务类 | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author Liuxinxin | * @author Liuxinxin | ||||
@@ -13,4 +14,8 @@ import com.baomidou.mybatisplus.extension.service.IService; | |||||
*/ | */ | ||||
public interface IExpertTagService extends IService<ExpertTag> { | public interface IExpertTagService extends IService<ExpertTag> { | ||||
default void removeByUserId(Long userId) { | |||||
remove(Wrappers.lambdaQuery(ExpertTag.class).eq(ExpertTag::getUserId, userId)); | |||||
} | |||||
} | } |