Examples of QuestionQuery


Examples of org.nutz.ngqa.api.meta.QuestionQuery

  @Ok("smart:/tag/one.jsp")
  public Object hasTag(@Param("tag")String tag, @Param("page")int page, @Param("pageSize") int pageSize) {
    if (Strings.isBlank(tag)) {
      return noTag(page, pageSize); //无tag的Question
    }
    QuestionQuery query = QuestionQuery.Page(page, pageSize);
    query.q.append("tags", tag); //tags是数组,支持直接查值
    return questionMS.query(query);
  }
View Full Code Here

Examples of org.nutz.ngqa.api.meta.QuestionQuery

    return questionMS.query(query);
  }
 
  @At({"/question/query/noTag/?","/question/query/noTag"})
  public Object noTag(@Param("page")int page, @Param("pageSize") int pageSize) {
    QuestionQuery query = QuestionQuery.Page(page, pageSize);
    query.q.append("tags", new BasicDBObject("$size", 0)); //无tag的Question
    return questionMS.query(query);
  }
View Full Code Here

Examples of org.nutz.ngqa.api.meta.QuestionQuery

    return questionMS.query(query);
  }
 
  @At({"/question/query/noanswer/?", "/question/query/noanswer"})
  public Object noAuswer(@Param("page")int page, @Param("pageSize") int pageSize) {
    QuestionQuery query = QuestionQuery.Page(page, pageSize);
    query.q.append("answers", new BasicDBObject("$size", 0));
    return questionMS.query(query);
  }
View Full Code Here

Examples of org.nutz.ngqa.api.meta.QuestionQuery

public class QuestionManageServiceImpl implements QuestionManageService {

  /**核心查询方法,通用查询*/
  public Pager<Question> query(QuestionQuery query) {
    if (query == null)
      query = new QuestionQuery();
    MCur cur = MCur.DESC("updatedAt");
    Pager<Question> pager = new Pager<Question>();
    pager.setCount(dao.count(Question.class, query.q));
    pager.setPage(query.page);
    pager.setPageSize(query.pageSize);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.