diff --git a/src/main/java/com/lh/service/CrowdfundingServiceImpl.java b/src/main/java/com/lh/service/CrowdfundingServiceImpl.java index b4638dd..f1f0977 100644 --- a/src/main/java/com/lh/service/CrowdfundingServiceImpl.java +++ b/src/main/java/com/lh/service/CrowdfundingServiceImpl.java @@ -49,7 +49,7 @@ public class CrowdfundingServiceImpl implements CrowdfundingService { @Transactional(rollbackFor = Exception.class) public void addCrowdUser(Participant participant) throws MyException { //精网号重复 - if (crowdfundingMapper.queryCrowdUser(new Participant(null,participant.getJwcode(),null,null)) != null) { + if (!crowdfundingMapper.queryCrowdUser(participant).isEmpty()) { throw new MyException("精网号重复"); } //精网号不能为空