Пример #1
0
  @Override
  public boolean removeRecommend(Cond cond) {
    cond.buildRemoveRecommendCond();
    for (long qid : cond.getQid()) {
      if (qid <= 0) {
        continue;
      }
      RecommendTransient rt = new RecommendTransient();
      rt.setQid(qid);

      questionRepository.removeRecommend(questionRepository.buildRecommendation(rt));
    }
    return true;
  }
Пример #2
0
  @Override
  public boolean addRecommend(Cond cond) {
    cond.buildAddRecommendCond();
    for (long qid : cond.getQid()) {
      if (qid <= 0) {
        continue;
      }
      RecommendTransient rt = new RecommendTransient();
      rt.setQid(qid);
      rt.setRecommendTime(cond.getRecommendTime());
      rt.setUserid(cond.getOperatorid());

      questionRepository.addRecommend(questionRepository.buildRecommendation(rt));
    }
    return true;
  }