|
|
@ -385,9 +385,17 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Integer getVolunteerCount(String customerId) { |
|
|
|
public Integer getVolunteerCount(String customerId, String pidsPrefix) { |
|
|
|
LambdaQueryWrapper<VolunteerInfoEntity> query = new LambdaQueryWrapper<>(); |
|
|
|
query.eq(VolunteerInfoEntity::getCustomerId, customerId); |
|
|
|
|
|
|
|
Optional.ofNullable(customerId).ifPresent((cId) -> { |
|
|
|
query.eq(VolunteerInfoEntity::getCustomerId, cId); |
|
|
|
}); |
|
|
|
|
|
|
|
Optional.ofNullable(pidsPrefix).ifPresent((pidsPrefixt) -> { |
|
|
|
query.likeRight(VolunteerInfoEntity::getPids, pidsPrefixt); |
|
|
|
}); |
|
|
|
|
|
|
|
return baseDao.selectCount(query); |
|
|
|
} |
|
|
|
} |
|
|
|