Esempio n. 1
0
 /*
  * 计算总页数和总记录数
  */
 public void calculateTotalPageAndRecordNumber(
     String print_company, String book_name, String ze_ren_editor, int print_status) {
   List<YinWu> yinWuList =
       yinWuMapper.calculateTotalPageAndRecordNumber(
           print_company, book_name, ze_ren_editor, print_status);
   recordNumber = yinWuList.size();
   int mod = recordNumber % this.PAGE_SIZE;
   totalPage = recordNumber / this.PAGE_SIZE;
   if (mod != 0) {
     totalPage++;
   }
 }
Esempio n. 2
0
  /*
   * 查询 选题 信息
   */
  public List<YinWu> queryYinWuInfo(
      String print_company,
      String book_name,
      String ze_ren_editor,
      int print_status,
      int currentPage) {
    // 限制每页显示的个数
    PageHelper.startPage(currentPage, 10);
    List<YinWu> yinWuList =
        yinWuMapper.calculateTotalPageAndRecordNumber(
            print_company, book_name, ze_ren_editor, print_status);

    return yinWuList;
  }
Esempio n. 3
0
 public List<YinWu> findAll() {
   // 限制每页显示的个数
   PageHelper.startPage(1, 10);
   List<YinWu> yinWuList = yinWuMapper.findAll();
   return yinWuList;
 }
Esempio n. 4
0
 public YinWu findById(int id) {
   YinWu yinWu = yinWuMapper.findById(id);
   return yinWu;
 }
Esempio n. 5
0
 public boolean delete(int id) {
   return yinWuMapper.delete(id);
 }
Esempio n. 6
0
 public boolean update(YinWu yinWu) {
   return yinWuMapper.update(yinWu);
 }
Esempio n. 7
0
 public void save(YinWu yinWu) {
   yinWuMapper.save(yinWu);
 }