资源简介
jsp+mysql 直接源代码 有任何问题联系我1164360302
代码片段和文件信息
package com.shuangyulin;
import java.util.ArrayList;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.shuangyulin.mapper.BookMapper;
import com.shuangyulin.po.Book;
import com.shuangyulin.po.BookType;
@Service @Transactional
public class BookService {
@Resource BookMapper bookMapper;
/*每页显示记录数目*/
private final int PAGE_SIZE = 5;
/*保存查询后总的页数*/
private int totalPage;
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getTotalPage() {
return totalPage;
}
/*保存查询到的总记录数*/
private int recordNumber;
public void setRecordNumber(int recordNumber) {
this.recordNumber = recordNumber;
}
public int getRecordNumber() {
return recordNumber;
}
/*添加Book信息*/
public void addBook(Book book) throws Exception {
bookMapper.addBook(book);
}
/*查询Book信息*/
public ArrayList queryBook(String bookNameBookType bookTypeString barcodeString publishDateint currentPage) throws Exception {
String where = “where 1=1“;
if(!bookName.equals(““)) where = where + “ and t_book.bookName like ‘%“ + bookName + “%‘“;
if(null != bookType && bookType.getBookTypeId() != null && bookType.getBookTypeId()!=0) where += “ and t_book.bookType=“ + bookType.getBookTypeId();
if(!barcode.equals(““)) where = where + “ and t_book.barcode like ‘%“ + barcode + “%‘“;
if(!publishDate.equals(““)) where = where + “ and t_book.publishDate like ‘%“ + publishDate + “%‘“;
int startIndex = (currentPage-1) * this.PAGE_SIZE;
return bookMapper.queryBook(where startIndex this.PAGE_SIZE);
}
//查询图书信息
public ArrayList queryBook(String bookNameBookType bookTypeString barcodeString publishDate) throws Exception {
String where = “where 1=1“;
if(!bookName.equals(““)) where = where + “ and t_book.bookName like ‘%“ + bookName + “%‘“;
if(null != bookType && bookType.getBookTypeId() != null && bookType.getBookTypeId()!=0) where += “ and t_book.bookType=“ + bookType.getBookTypeId();
if(!barcode.equals(““)) where = where + “ and t_book.barcode like ‘%“ + barcode + “%‘“;
if(!publishDate.equals(““)) where = where + “ and t_book.publishDate like ‘%“ + publishDate + “%‘“;
return bookMapper.queryBookList(where);
}
public ArrayList queryAllBookInfo() throws Exception {
return bookMapper.queryBookList(“where 1=1“);
}
/*计算总的页数和记录数*/
public void queryTotalPageAndRecordNumber(String bookNameBookType bookTypeString barcodeString publishDate) throws Exception {
String where = “where 1=1“;
if(!bookName.equals(““)) where = where + “ and t_book.bookName like ‘%“ + bookName + “%‘“;
if(null != bookType && bookType.getBookTypeId() != null && bookType.getB
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 965 2018-06-05 16:49 mmcc\.classpath
文件 1037 2018-06-05 12:41 mmcc\.project
文件 567 2018-06-05 12:41 mmcc\.settings\.jsdtscope
文件 256 2018-06-05 13:42 mmcc\.settings\org.eclipse.core.resources.prefs
文件 364 2018-06-05 12:41 mmcc\.settings\org.eclipse.jdt.core.prefs
文件 640 2018-06-05 12:41 mmcc\.settings\org.eclipse.wst.common.component
文件 345 2018-06-05 12:41 mmcc\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2018-06-05 12:41 mmcc\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2018-06-05 12:41 mmcc\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 4653 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\BookService.class
文件 1507 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\controller\ba
文件 1500 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\controller\ba
文件 3497 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\controller\ba
文件 11335 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\controller\BookController.class
文件 1425 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\controller\BookTypeController$1.class
文件 6051 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\controller\BookTypeController.class
文件 4447 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\controller\SystemController.class
文件 320 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\mapper\AdminMapper.class
文件 954 2018-06-05 12:41 mmcc\build\classes\com\shuangyulin\mapper\AdminMapper.xm
文件 1513 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\mapper\BookMapper.class
文件 2463 2018-06-05 12:41 mmcc\build\classes\com\shuangyulin\mapper\BookMapper.xm
文件 881 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\mapper\BookTypeMapper.class
文件 2115 2018-06-05 12:41 mmcc\build\classes\com\shuangyulin\mapper\BookTypeMapper.xm
文件 929 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\po\Admin.class
文件 2519 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\po\Book.class
文件 1263 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\po\BookType.class
文件 2061 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\service\AdminService.class
文件 4669 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\service\BookService.class
文件 3041 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\service\BookTypeService.class
文件 7230 2018-06-08 20:42 mmcc\build\classes\com\shuangyulin\utils\ExportExcelUtil.class
............此处省略263个文件信息
相关资源
- JSP+MYSQL小区物业管理系统 SSH
- JSP+MYSQL学生信息管理系统--毕业设计
- 学生宿舍管理系统javabean+servlet+jsp+m
- JSP+MYSQL学生信息管理系统 毕业设计
- jsp+mysql+tomcat购物网站
- 基于SSH的电子商城系统 jsp 毕业设计
- jsp+mysql购物商城系统
- JAVA JSP+MYSQL在线教学系统 源代码 论文
- JSP+mysql开发的类似淘宝的购物网站
- JSP+MYSQL设备管理系统-毕业设计
- 基于 Servlet+jsp+mysql 开发 javaWeb 养老院
- 在线投票系统源代码JSP+MySql
- jsp+mysql实现注册登录和管理员登陆实
- Eclipsejsp+MySQL 汽车销售信息管理系统
- jsp+mysql网上书店
- jsp+mysql 毕业论文评审系统
- jsp+Mysql做的留言板 界面豪华 大方 美
- jdbc 源代码 jsp+mysql
- 在线选课系统 java servlet+ jsp+mysql+css
- Servlet+Jsp+MySql用户登录实例224192
- JSP+MySql实现的网络在线投票系统
- jsp+mysql的聊天室
- jsp+mysql+mvc模式管理系统
- 简单的JSP+MySQL+MyEclipse图书管理系统的
- 毕业设计选题系统JSP+MySQL
- jsp+mysql火车订票系统
- JSP+mysql成绩录入查询系统
- j2ee实验-实现用户登录功能-servlet+js
- 网络交友网站源码javabean+JSP+Mysql
- jsp+mysql图书馆管理系统
评论
共有 条评论