@Override
  public void updateCandidatesCount(List<String> staffIds, String rewardId) {
    List<Candidate> candList = candidateDao.findCandidatesByRewardIdandStaffIds(rewardId, staffIds);
    for (Candidate cand : candList) {
      cand.setNominatecount(cand.getNominatecount() + 1);
      candidateDao.update(cand);
    }
    //		int xxx=candidateDao.updateCandidatesNominateCount(rewardId, staffIds);
    //		System.out.println(xxx);

  }
 @Override
 public void AddCandidateToReward(SysUser caller, String rewardId, CandidateRule candidateRule) {
   Reward reward = rewardDao.findById(Reward.class, rewardId);
   Date now = DateUtil.getTime();
   Set<Staff> staffs =
       candidateRuleLogic.getQualifiedStaffsFromCandidateRuleId(candidateRule.getId());
   for (Staff staff : staffs) {
     if (staff.isDeleted() != 1) {
       Candidate candidate = new Candidate();
       candidate.setReward(reward);
       candidate.setStaff(staff);
       candidate.setCreatedAt(now);
       candidate.setCreatedBy(caller);
       candidate.setLastModifiedAt(now);
       candidate.setLastModifiedBy(caller);
       candidateDao.save(candidate);
     }
   }
 }
 @Override
 public List<Candidate> getCandidatesFromRewardAndQueryVo(
     String rewardId, WinnersRecordQueryVo queryVo) {
   return candidateDao.findCandidatesByRewardIdAndQueryVo(rewardId, queryVo);
 }
 @Override
 public List<Candidate> getCandidatesFromReward(String rewardId) {
   return candidateDao.findCandidatesByRewardId(rewardId);
 }