|
@@ -55,7 +55,6 @@ import com.citu.module.menduner.system.util.RedisUtils;
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
@@ -528,8 +527,8 @@ public class PersonIntegrationServiceImpl implements PersonIntegrationService {
|
|
|
|
|
|
@Override
|
|
|
public void addEnterpriseTalentPool(Long enterpriseId, Long userId) {
|
|
|
- List<EnterpriseTalentPoolDO> talentPool = talentPoolMapper.selectByEnterpriseIdAndUserId(enterpriseId, userId);
|
|
|
- if (!talentPool.isEmpty()) {
|
|
|
+ EnterpriseTalentPoolDO talentPool = talentPoolMapper.selectByEnterpriseIdAndUserId(enterpriseId, userId);
|
|
|
+ if (null != talentPool) {
|
|
|
return;
|
|
|
}
|
|
|
talentPoolMapper.insert(
|
|
@@ -540,16 +539,13 @@ public class PersonIntegrationServiceImpl implements PersonIntegrationService {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- @Transactional
|
|
|
@Override
|
|
|
public void removeEnterpriseTalentPool(Long enterpriseId, Long userId) {
|
|
|
- List<EnterpriseTalentPoolDO> talentPools = talentPoolMapper.selectByEnterpriseIdAndUserId(enterpriseId, userId);
|
|
|
- if (talentPools.isEmpty()) {
|
|
|
+ EnterpriseTalentPoolDO talentPool = talentPoolMapper.selectByEnterpriseIdAndUserId(enterpriseId, userId);
|
|
|
+ if (null == talentPool) {
|
|
|
return;
|
|
|
}
|
|
|
- for (EnterpriseTalentPoolDO talentPool : talentPools) {
|
|
|
- talentPoolMapper.deleteById(talentPool.getId());
|
|
|
- }
|
|
|
+ talentPoolMapper.deleteById(talentPool.getId());
|
|
|
}
|
|
|
|
|
|
|