├── README.md ├── 刘冰论文修改意见2.docx ├── 数据清洗程序流程图.vsdx ├── 刘冰_毕业设计(论文)正文.doc ├── 刘冰毕业论文修改意见.docx ├── 刘冰_毕业设计(论文)正文v2.doc ├── 刘冰_毕业设计(论文)正文v3.doc ├── 刘冰_毕业设计(论文)选题报告.doc ├── 刘冰毕业设计(论文)中期报告内容.doc ├── 刘冰毕业设计(论文)中期报告封面.doc ├── 基于Web的图书推荐系统展示平台.ppt ├── 基于Web的图书推荐系统展示平台.pptx ├── glyphicons-halflings.png ├── src ├── main │ ├── resources │ │ ├── Web.properties │ │ ├── Mysql.properties │ │ ├── log4j.xml │ │ ├── mybatis-config.xml │ │ └── cn │ │ │ └── edu │ │ │ └── ustb │ │ │ └── dm │ │ │ └── map │ │ │ ├── BookTagRelationMapper.xml │ │ │ ├── BookAuthorRelationMapper.xml │ │ │ ├── BookRelationMapper.xml │ │ │ ├── BindingTypeMapper.xml │ │ │ └── PublisherInfoMapper.xml │ ├── webapp │ │ ├── resources │ │ │ ├── img │ │ │ │ ├── default_book.jpg │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ └── glyphicons-halflings-white.png │ │ │ ├── css │ │ │ │ ├── header.css │ │ │ │ └── main.css │ │ │ └── js │ │ │ │ ├── main.js │ │ │ │ └── html5shiv.js │ │ └── WEB-INF │ │ │ ├── views │ │ │ ├── home.jsp │ │ │ ├── includes │ │ │ │ ├── footer.jsp │ │ │ │ ├── pagination.jsp │ │ │ │ └── header.jsp │ │ │ ├── resultList.jsp │ │ │ ├── bookInfo.jsp │ │ │ ├── resultListPage.jsp │ │ │ └── index.jsp │ │ │ ├── spring │ │ │ ├── root-context.xml │ │ │ └── appServlet │ │ │ │ └── servlet-context.xml │ │ │ └── web.xml │ └── java │ │ └── cn │ │ └── edu │ │ └── ustb │ │ ├── model │ │ ├── BookClassifyItemModel.java │ │ ├── BookListItemModel.java │ │ └── SearchResultPaginationModel.java │ │ ├── dm │ │ ├── model │ │ │ ├── BindingType.java │ │ │ ├── BookInfoWithBLOBs.java │ │ │ ├── AuthorInfoWithBLOBs.java │ │ │ ├── PublisherInfo.java │ │ │ ├── BookOnlineInfoWithBLOBs.java │ │ │ ├── NationalityInfo.java │ │ │ ├── BookTagRelation.java │ │ │ ├── BookAuthorRelation.java │ │ │ ├── BookRelation.java │ │ │ ├── TagInfo.java │ │ │ ├── AuthorInfo.java │ │ │ ├── BookAuthorInfo.java │ │ │ ├── BookPublishingInfoWithBLOBs.java │ │ │ └── BookPublishingInfo.java │ │ └── dao │ │ │ ├── BookRelationMapper.java │ │ │ ├── BookTagRelationMapper.java │ │ │ ├── BookAuthorRelationMapper.java │ │ │ ├── TagInfoMapper.java │ │ │ ├── BindingTypeMapper.java │ │ │ ├── PublisherInfoMapper.java │ │ │ ├── NationalityInfoMapper.java │ │ │ ├── BookAuthorInfoMapper.java │ │ │ ├── AuthorInfoMapper.java │ │ │ ├── BookInfoMapper.java │ │ │ ├── BookOnlineInfoMapper.java │ │ │ └── BookPublishingInfoMapper.java │ │ └── controller │ │ ├── BookInfoController.java │ │ └── IndexController.java └── test │ └── resources │ └── log4j.xml ├── .settings ├── org.eclipse.m2e.core.prefs ├── org.eclipse.core.resources.prefs ├── org.eclipse.wst.common.project.facet.core.xml ├── org.eclipse.wst.common.component ├── org.eclipse.jdt.core.prefs ├── org.eclipse.wst.validation.prefs └── org.springframework.ide.eclipse.beans.core.prefs ├── .springBeans ├── .classpath ├── .project ├── 刘冰_毕业设计(论文)任务书.doc └── pom.xml /README.md: -------------------------------------------------------------------------------- 1 | dm 2 | == 3 | 4 | dm -------------------------------------------------------------------------------- /刘冰论文修改意见2.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/刘冰论文修改意见2.docx -------------------------------------------------------------------------------- /数据清洗程序流程图.vsdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/数据清洗程序流程图.vsdx -------------------------------------------------------------------------------- /刘冰_毕业设计(论文)正文.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/刘冰_毕业设计(论文)正文.doc -------------------------------------------------------------------------------- /刘冰毕业论文修改意见.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/刘冰毕业论文修改意见.docx -------------------------------------------------------------------------------- /刘冰_毕业设计(论文)正文v2.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/刘冰_毕业设计(论文)正文v2.doc -------------------------------------------------------------------------------- /刘冰_毕业设计(论文)正文v3.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/刘冰_毕业设计(论文)正文v3.doc -------------------------------------------------------------------------------- /刘冰_毕业设计(论文)选题报告.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/刘冰_毕业设计(论文)选题报告.doc -------------------------------------------------------------------------------- /刘冰毕业设计(论文)中期报告内容.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/刘冰毕业设计(论文)中期报告内容.doc -------------------------------------------------------------------------------- /刘冰毕业设计(论文)中期报告封面.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/刘冰毕业设计(论文)中期报告封面.doc -------------------------------------------------------------------------------- /基于Web的图书推荐系统展示平台.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/基于Web的图书推荐系统展示平台.ppt -------------------------------------------------------------------------------- /基于Web的图书推荐系统展示平台.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/基于Web的图书推荐系统展示平台.pptx -------------------------------------------------------------------------------- /glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/glyphicons-halflings.png -------------------------------------------------------------------------------- /src/main/resources/Web.properties: -------------------------------------------------------------------------------- 1 | book_lpic=http://img3.douban.com/lpic/ 2 | book_mpic=http://img3.douban.com/mpic/ -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /src/main/webapp/resources/img/default_book.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/src/main/webapp/resources/img/default_book.jpg -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java/cn/edu/ustb/dm/wash/LabelWasher.java=UTF-8 3 | -------------------------------------------------------------------------------- /src/main/webapp/resources/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/src/main/webapp/resources/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /src/main/webapp/resources/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AugustLONG/dm/HEAD/src/main/webapp/resources/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /src/main/resources/Mysql.properties: -------------------------------------------------------------------------------- 1 | jdbc.driverClassName=com.mysql.jdbc.Driver 2 | jdbc.url=jdbc:mysql://10.16.49.6:3306/dm2?useUnicode=true&characterEncoding=UTF-8 3 | jdbc.username=root 4 | jdbc.password=123456 -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/webapp/resources/css/header.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | #header_title { 3 | font-size:28px; 4 | float:left; 5 | position:relative; 6 | } 7 | 8 | #header_middle { 9 | position:relative; 10 | float:left; 11 | margin: 20px 0 0 20px; 12 | } 13 | 14 | #header_search_text { 15 | width:400px; 16 | height:30px; 17 | } -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/home.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 2 | <%@ page session="false" pageEncoding="UTF-8"%> 3 | 4 | 5 | Home 6 | 7 | 8 |

9 | Hello world! 10 |

11 | 12 |

The time on the server is ${serverTime}.

13 | 14 | 15 | -------------------------------------------------------------------------------- /.springBeans: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/includes/footer.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 |
5 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.6 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 12 | org.eclipse.jdt.core.compiler.source=1.6 13 | -------------------------------------------------------------------------------- /src/main/webapp/resources/css/main.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | .book_line { 3 | padding: 15px 0 15px 0; 4 | border-bottom-width: 1px; 5 | border-bottom-color: #eaeaea; 6 | border-bottom-style: solid; 7 | } 8 | 9 | .book_recommend_classify { 10 | margin-top: 20px; 11 | } 12 | 13 | .tag_list_item { 14 | border-bottom-width: 1px; 15 | border-bottom-color: #eaeaea; 16 | border-bottom-style: solid; 17 | margin: 10px 0 0 0; 18 | } 19 | 20 | .book_rank { 21 | margin-top: 20px; 22 | } 23 | 24 | #statics { 25 | margin: 20px 0 20px 0; 26 | } 27 | 28 | .result_item { 29 | border-top: 1px dashed #ddd; 30 | padding: 20px 0 10px 0; 31 | } 32 | 33 | #content_right { 34 | margin-top: 20px; 35 | margin-bottom: 10px; 36 | } 37 | 38 | .book_recommend_row { 39 | margin-top: 10px; 40 | } -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/resultList.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 4 | 5 |
6 |
7 | 8 | 9 | 10 |
11 |
12 |
13 | ${item.title } 14 |
15 |
${item.author }
16 |
${item.publisher }
17 |
${item.date }
18 |
${item.price }
19 |
20 |
21 |
22 |
-------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/includes/pagination.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/model/BookClassifyItemModel.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.model; 2 | 3 | import java.util.List; 4 | 5 | public class BookClassifyItemModel { 6 | private String imageSrc; 7 | private String tagName; 8 | private List titleList; 9 | 10 | public String getImageSrc() { 11 | return imageSrc; 12 | } 13 | public String getTagName() { 14 | return tagName; 15 | } 16 | public List getTitleList() { 17 | return titleList; 18 | } 19 | public void setImageSrc(String imageSrc) { 20 | this.imageSrc = imageSrc; 21 | } 22 | public void setTagName(String tagName) { 23 | this.tagName = tagName; 24 | } 25 | public void setTitleList(List titleList) { 26 | this.titleList = titleList; 27 | } 28 | public TitleList createTitleList() { 29 | return new TitleList(); 30 | } 31 | 32 | public class TitleList { 33 | private Integer id; 34 | private String title; 35 | 36 | public void setId(Integer id) { 37 | this.id = id; 38 | } 39 | public Integer getId() { 40 | return id; 41 | } 42 | public void setTitle(String title) { 43 | this.title = title; 44 | } 45 | public String getTitle() { 46 | return title; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/test/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/webapp/resources/js/main.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $("#search_button").click(function(){ 3 | getPage(); 4 | }); 5 | 6 | $("#search_type1").click(function(){ 7 | $("#search_type").html($("#search_type1").html()); 8 | $("#search_type_value").val("titleResultList"); 9 | }); 10 | $("#search_type2").click(function(){ 11 | $("#search_type").html($("#search_type2").html()); 12 | $("#search_type_value").val("authorResultList"); 13 | }); 14 | $("#search_type3").click(function(){ 15 | $("#search_type").html($("#search_type3").html()); 16 | $("#search_type_value").val("publisherResultList"); 17 | }); 18 | 19 | $(".pagination_page").each(function(){ 20 | $(this).click(function(){ 21 | getPageWithFrom($(this).attr("value")); 22 | }); 23 | }); 24 | }); 25 | 26 | function getPage() { 27 | url = $("#search_type_value").val(); 28 | url += "?keyword=" + $(".search_keyword").val(); 29 | url += "&count=" + $("#search_count").val(); 30 | url += "&from=0&type=0"; 31 | location.href = encodeURI(url); 32 | } 33 | function getPageWithFrom(from) { 34 | url = $("#search_type_value").val(); 35 | url += "?keyword=" + $(".search_keyword").val(); 36 | url += "&count=" + $("#search_count").val(); 37 | url += "&from=" + from; 38 | url += "&type=0"; 39 | location.href = encodeURI(url); 40 | } -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/bookInfo.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ include file="includes/header.jsp"%> 4 | 5 |
6 |
7 |

${publishing.title }

8 |
9 |
10 | 11 |
12 |
    13 |
  • 14 |
    15 |
    作者:
    16 |
    ${publishing.auther_name }
    17 |
    出版社:
    18 |
    ${publishing.publisher }
    19 |
    出版年:
    20 |
    ${publishing.publication_date }
    21 |
    页数:
    22 |
    ${publishing.page }
    23 |
    定价:
    24 |
    ${publishing.list_price }
    25 |
    装帧:
    26 |
    ${publishing.binding }
    27 |
    ISBN:
    28 |
    ${publishing.isbn }
    29 |
    30 |
  • 31 |
32 |
33 | 34 |
35 |
36 |
37 |

内容简介

38 |
39 | ${publishing.directory } 40 |
41 |
42 |
43 |

作者简介

44 |
45 | ${author.introduction } 46 |
47 |
48 |
49 |
50 | 51 | <%@ include file="includes/footer.jsp"%> -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/spring/root-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | DM 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.springframework.ide.eclipse.core.springbuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.jsdt.core.javascriptValidator 25 | 26 | 27 | 28 | 29 | org.eclipse.wst.validation.validationbuilder 30 | 31 | 32 | 33 | 34 | org.eclipse.m2e.core.maven2Builder 35 | 36 | 37 | 38 | 39 | 40 | org.springframework.ide.eclipse.core.springnature 41 | org.eclipse.jdt.core.javanature 42 | org.eclipse.m2e.core.maven2Nature 43 | org.eclipse.wst.common.project.facet.core.nature 44 | org.eclipse.wst.common.modulecore.ModuleCoreNature 45 | org.eclipse.wst.jsdt.core.jsNature 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/resultListPage.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ include file="includes/header.jsp"%> 4 | 5 |
6 |
7 |
8 | 9 |
10 | 没有找到任何与"${pagination.keyword }"相关的图书 11 |
12 |
13 | 14 | 显示: ${pagination.from+1 }-${pagination.from+pagination.listCount }条, 共${pagination.totalCount }条 15 | 16 |
17 |
18 | <%@ include file="resultList.jsp"%> 19 |
20 |
21 | 22 | <%@ include file="includes/pagination.jsp" %> 23 | 24 |
25 |
26 | 27 |
28 |

29 | 图书排行 30 |

31 |
32 | 33 |
34 | 35 | 36 | 37 |
38 |
39 | ${item.title } 40 |
41 |
${item.author }
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | <%@ include file="includes/footer.jsp"%> -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | contextConfigLocation 9 | /WEB-INF/spring/root-context.xml 10 | 11 | 12 | 13 | 14 | org.springframework.web.context.ContextLoaderListener 15 | 16 | 17 | characterEncodingFilter 18 | org.springframework.web.filter.CharacterEncodingFilter 19 | 20 | encoding 21 | UTF-8 22 | 23 | 24 | forceEncoding 25 | true 26 | 27 | 28 | 29 | 30 | characterEncodingFilter 31 | /* 32 | 33 | 34 | 35 | 36 | 37 | appServlet 38 | org.springframework.web.servlet.DispatcherServlet 39 | 40 | contextConfigLocation 41 | /WEB-INF/spring/appServlet/servlet-context.xml 42 | 43 | 1 44 | 45 | 46 | 47 | appServlet 48 | / 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | #Fri Jun 06 17:00:12 BST 2008 2 | DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator; 3 | USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator; 4 | USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator; 5 | USER_PREFERENCE=overrideGlobalPreferencesfalse 6 | eclipse.preferences.version=1 7 | -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/model/BookListItemModel.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.model; 2 | 3 | import java.text.DateFormat; 4 | import java.text.SimpleDateFormat; 5 | import java.util.Date; 6 | 7 | public class BookListItemModel { 8 | private Integer id; 9 | private String imageSrc; 10 | private String title; 11 | private String author; 12 | private String publisher; 13 | private String date; 14 | private String price; 15 | private int star; 16 | 17 | public Integer getId() { 18 | return id; 19 | } 20 | public String getImageSrc() { 21 | return imageSrc; 22 | } 23 | public String getTitle() { 24 | return title; 25 | } 26 | public String getAuthor() { 27 | return author; 28 | } 29 | public String getPublisher() { 30 | return publisher; 31 | } 32 | public String getDate() { 33 | return date; 34 | } 35 | public String getPrice() { 36 | return price; 37 | } 38 | public int getStar() { 39 | return star; 40 | } 41 | public void setId(Integer id) { 42 | this.id = id; 43 | } 44 | public void setImageSrc(String imageSrc) { 45 | this.imageSrc = imageSrc; 46 | } 47 | public void setTitle(String title) { 48 | this.title = title; 49 | } 50 | public void setAuthor(String author) { 51 | this.author = author; 52 | } 53 | public void setPublisher(String publisher) { 54 | this.publisher = publisher; 55 | } 56 | public void setDate(Date date) { 57 | DateFormat df = new SimpleDateFormat("yyyy-MM"); 58 | this.date = df.format(date); 59 | } 60 | public void setPrice(Integer price) { 61 | if(price == null) 62 | price = 0; 63 | this.price = String.format("%.2f", price/100.0); 64 | } 65 | public void setStar(int star) { 66 | this.star = star; 67 | } 68 | public void setStar(Integer star1, Integer star2, Integer star3, Integer star4, Integer star5) { 69 | if(star1 == null) 70 | star1 = 0; 71 | if(star2 == null) 72 | star2 = 0; 73 | if(star3 == null) 74 | star3 = 0; 75 | if(star4 == null) 76 | star4 = 0; 77 | if(star5 == null) 78 | star5 = 0; 79 | int total = star1+star2+star3+star4+star5; 80 | if(total != 0) 81 | this.star = (star1 + 2*star2 + 3*star3 + 4*star4 + 5*star5) / (star1+star2+star3+star4+star5); 82 | else 83 | this.star = 0; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/BindingType.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class BindingType { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column binding_type.BINDING_ID 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private Integer BINDING_ID; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column binding_type.BINDING_NAME 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private String BINDING_NAME; 19 | 20 | /** 21 | * This method was generated by MyBatis Generator. 22 | * This method returns the value of the database column binding_type.BINDING_ID 23 | * 24 | * @return the value of binding_type.BINDING_ID 25 | * 26 | * @mbggenerated Sun May 19 11:22:56 CST 2013 27 | */ 28 | public Integer getBINDING_ID() { 29 | return BINDING_ID; 30 | } 31 | 32 | /** 33 | * This method was generated by MyBatis Generator. 34 | * This method sets the value of the database column binding_type.BINDING_ID 35 | * 36 | * @param BINDING_ID the value for binding_type.BINDING_ID 37 | * 38 | * @mbggenerated Sun May 19 11:22:56 CST 2013 39 | */ 40 | public void setBINDING_ID(Integer BINDING_ID) { 41 | this.BINDING_ID = BINDING_ID; 42 | } 43 | 44 | /** 45 | * This method was generated by MyBatis Generator. 46 | * This method returns the value of the database column binding_type.BINDING_NAME 47 | * 48 | * @return the value of binding_type.BINDING_NAME 49 | * 50 | * @mbggenerated Sun May 19 11:22:56 CST 2013 51 | */ 52 | public String getBINDING_NAME() { 53 | return BINDING_NAME; 54 | } 55 | 56 | /** 57 | * This method was generated by MyBatis Generator. 58 | * This method sets the value of the database column binding_type.BINDING_NAME 59 | * 60 | * @param BINDING_NAME the value for binding_type.BINDING_NAME 61 | * 62 | * @mbggenerated Sun May 19 11:22:56 CST 2013 63 | */ 64 | public void setBINDING_NAME(String BINDING_NAME) { 65 | this.BINDING_NAME = BINDING_NAME == null ? null : BINDING_NAME.trim(); 66 | } 67 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/BookInfoWithBLOBs.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class BookInfoWithBLOBs extends BookInfo { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column book_info.DESCRIPTION 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private String DESCRIPTION; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column book_info.DIRECTORY 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private String DIRECTORY; 19 | 20 | /** 21 | * This method was generated by MyBatis Generator. 22 | * This method returns the value of the database column book_info.DESCRIPTION 23 | * 24 | * @return the value of book_info.DESCRIPTION 25 | * 26 | * @mbggenerated Sun May 19 11:22:56 CST 2013 27 | */ 28 | public String getDESCRIPTION() { 29 | return DESCRIPTION; 30 | } 31 | 32 | /** 33 | * This method was generated by MyBatis Generator. 34 | * This method sets the value of the database column book_info.DESCRIPTION 35 | * 36 | * @param DESCRIPTION the value for book_info.DESCRIPTION 37 | * 38 | * @mbggenerated Sun May 19 11:22:56 CST 2013 39 | */ 40 | public void setDESCRIPTION(String DESCRIPTION) { 41 | this.DESCRIPTION = DESCRIPTION == null ? null : DESCRIPTION.trim(); 42 | } 43 | 44 | /** 45 | * This method was generated by MyBatis Generator. 46 | * This method returns the value of the database column book_info.DIRECTORY 47 | * 48 | * @return the value of book_info.DIRECTORY 49 | * 50 | * @mbggenerated Sun May 19 11:22:56 CST 2013 51 | */ 52 | public String getDIRECTORY() { 53 | return DIRECTORY; 54 | } 55 | 56 | /** 57 | * This method was generated by MyBatis Generator. 58 | * This method sets the value of the database column book_info.DIRECTORY 59 | * 60 | * @param DIRECTORY the value for book_info.DIRECTORY 61 | * 62 | * @mbggenerated Sun May 19 11:22:56 CST 2013 63 | */ 64 | public void setDIRECTORY(String DIRECTORY) { 65 | this.DIRECTORY = DIRECTORY == null ? null : DIRECTORY.trim(); 66 | } 67 | } -------------------------------------------------------------------------------- /src/main/webapp/resources/js/html5shiv.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); 5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); 8 | for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d selectByExample(BookRelationExample example); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table book_relation 52 | * 53 | * @mbggenerated Sun May 19 11:22:56 CST 2013 54 | */ 55 | int updateByExampleSelective(@Param("record") BookRelation record, @Param("example") BookRelationExample example); 56 | 57 | /** 58 | * This method was generated by MyBatis Generator. 59 | * This method corresponds to the database table book_relation 60 | * 61 | * @mbggenerated Sun May 19 11:22:56 CST 2013 62 | */ 63 | int updateByExample(@Param("record") BookRelation record, @Param("example") BookRelationExample example); 64 | } -------------------------------------------------------------------------------- /刘冰_毕业设计(论文)任务书.doc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

毕 业 设 计(论 文)任 务 书
14 | _____________________________________________________________
15 |

16 |

17 | 一、学生姓名:刘冰                学号:40950187
18 | 二、题目:基于Web的图书推荐系统展示平台
19 | 三、题目来源:真实  、    自拟  
21 | 四、结业方式:设计  、    论文  
22 | 五、主要内容:
采用BS结构,对图书推荐系统的内容进行查询、处理与展示。在服务器端采用Spring MVC框架与对象持久化技术对图书信息进行查询与处理,在客户端使用浏览器对数据进行展示与交互,最终达到图书推荐系统通过WEB平台展示的目的。
23 | 六、主要(技术)要求:
1.Java程序设计语言,MySQL关系数据库,Eclipse Java EE开发平台。
2.Spring MVC框架与面向对象数据映射框架。
3.Maven项目管理工具与Git版本控制工具。

24 | 七、日程安排:
第1周:    确定毕业设计题目的任务。
第2-5周:  明确设计目标和要求,查阅资料,完成选题报告与页面设计。
第6-11周: 进行项目配置与开发、部署,完成中期报告。
第12-16周:功能测试,BUG修复,工作总结,撰写论文,准备答辩。

25 | 八、主要参考文献和书目:
[1] Joshua Bloch. Effective Java中文版 [M]. 杨春华,俞黎敏译. 第2版. 北京: 机械工业出版社, 2009
[2] SpringSource公司, Bram Smeets, Seth Ladd. Spring 2企业应用开发 [M]. 翟育明, 杨春华等译. 北京: 人民邮电出版社, 2008
[3] 靳建林. 基于SSH和jQuery框架的网络购物平台的设计与实现 [D]. 安徽: 安徽理工大学, 2012
[4] 宋成明. 基于Spring、iBATIS与Structs的轻量级Java EE编程研究 [D]. 上海: 上海师范大学, 2007
[5] Tom Burton-West. Practical Relevance Ranking for 10 Million Books [J]. University of Michigan Library, 2012

26 |

指导教师签字:                年   月   日 27 |

学 生 签 字:                年   月   日 28 |

系(所)负责人章:                年   月   日 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/AuthorInfoWithBLOBs.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class AuthorInfoWithBLOBs extends AuthorInfo { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column author_info.AUTHOR_NAME 7 | * 8 | * @mbggenerated Sun May 12 15:15:24 CST 2013 9 | */ 10 | private String AUTHOR_NAME; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column author_info.INTRODUCTION 15 | * 16 | * @mbggenerated Sun May 12 15:15:24 CST 2013 17 | */ 18 | private String INTRODUCTION; 19 | 20 | /** 21 | * This method was generated by MyBatis Generator. 22 | * This method returns the value of the database column author_info.AUTHOR_NAME 23 | * 24 | * @return the value of author_info.AUTHOR_NAME 25 | * 26 | * @mbggenerated Sun May 12 15:15:24 CST 2013 27 | */ 28 | public String getAUTHOR_NAME() { 29 | return AUTHOR_NAME; 30 | } 31 | 32 | /** 33 | * This method was generated by MyBatis Generator. 34 | * This method sets the value of the database column author_info.AUTHOR_NAME 35 | * 36 | * @param AUTHOR_NAME the value for author_info.AUTHOR_NAME 37 | * 38 | * @mbggenerated Sun May 12 15:15:24 CST 2013 39 | */ 40 | public void setAUTHOR_NAME(String AUTHOR_NAME) { 41 | this.AUTHOR_NAME = AUTHOR_NAME == null ? null : AUTHOR_NAME.trim(); 42 | } 43 | 44 | /** 45 | * This method was generated by MyBatis Generator. 46 | * This method returns the value of the database column author_info.INTRODUCTION 47 | * 48 | * @return the value of author_info.INTRODUCTION 49 | * 50 | * @mbggenerated Sun May 12 15:15:24 CST 2013 51 | */ 52 | public String getINTRODUCTION() { 53 | return INTRODUCTION; 54 | } 55 | 56 | /** 57 | * This method was generated by MyBatis Generator. 58 | * This method sets the value of the database column author_info.INTRODUCTION 59 | * 60 | * @param INTRODUCTION the value for author_info.INTRODUCTION 61 | * 62 | * @mbggenerated Sun May 12 15:15:24 CST 2013 63 | */ 64 | public void setINTRODUCTION(String INTRODUCTION) { 65 | this.INTRODUCTION = INTRODUCTION == null ? null : INTRODUCTION.trim(); 66 | } 67 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/PublisherInfo.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class PublisherInfo { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column publisher_info.PUBLISHER_ID 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private Integer PUBLISHER_ID; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column publisher_info.PUBLISHER_NAME 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private String PUBLISHER_NAME; 19 | 20 | /** 21 | * This method was generated by MyBatis Generator. 22 | * This method returns the value of the database column publisher_info.PUBLISHER_ID 23 | * 24 | * @return the value of publisher_info.PUBLISHER_ID 25 | * 26 | * @mbggenerated Sun May 19 11:22:56 CST 2013 27 | */ 28 | public Integer getPUBLISHER_ID() { 29 | return PUBLISHER_ID; 30 | } 31 | 32 | /** 33 | * This method was generated by MyBatis Generator. 34 | * This method sets the value of the database column publisher_info.PUBLISHER_ID 35 | * 36 | * @param PUBLISHER_ID the value for publisher_info.PUBLISHER_ID 37 | * 38 | * @mbggenerated Sun May 19 11:22:56 CST 2013 39 | */ 40 | public void setPUBLISHER_ID(Integer PUBLISHER_ID) { 41 | this.PUBLISHER_ID = PUBLISHER_ID; 42 | } 43 | 44 | /** 45 | * This method was generated by MyBatis Generator. 46 | * This method returns the value of the database column publisher_info.PUBLISHER_NAME 47 | * 48 | * @return the value of publisher_info.PUBLISHER_NAME 49 | * 50 | * @mbggenerated Sun May 19 11:22:56 CST 2013 51 | */ 52 | public String getPUBLISHER_NAME() { 53 | return PUBLISHER_NAME; 54 | } 55 | 56 | /** 57 | * This method was generated by MyBatis Generator. 58 | * This method sets the value of the database column publisher_info.PUBLISHER_NAME 59 | * 60 | * @param PUBLISHER_NAME the value for publisher_info.PUBLISHER_NAME 61 | * 62 | * @mbggenerated Sun May 19 11:22:56 CST 2013 63 | */ 64 | public void setPUBLISHER_NAME(String PUBLISHER_NAME) { 65 | this.PUBLISHER_NAME = PUBLISHER_NAME == null ? null : PUBLISHER_NAME.trim(); 66 | } 67 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/BookOnlineInfoWithBLOBs.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class BookOnlineInfoWithBLOBs extends BookOnlineInfo { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column book_online_info.label 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private String label; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column book_online_info.together_bought 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private String together_bought; 19 | 20 | /** 21 | * This method was generated by MyBatis Generator. 22 | * This method returns the value of the database column book_online_info.label 23 | * 24 | * @return the value of book_online_info.label 25 | * 26 | * @mbggenerated Sun May 19 11:22:56 CST 2013 27 | */ 28 | public String getLabel() { 29 | return label; 30 | } 31 | 32 | /** 33 | * This method was generated by MyBatis Generator. 34 | * This method sets the value of the database column book_online_info.label 35 | * 36 | * @param label the value for book_online_info.label 37 | * 38 | * @mbggenerated Sun May 19 11:22:56 CST 2013 39 | */ 40 | public void setLabel(String label) { 41 | this.label = label == null ? null : label.trim(); 42 | } 43 | 44 | /** 45 | * This method was generated by MyBatis Generator. 46 | * This method returns the value of the database column book_online_info.together_bought 47 | * 48 | * @return the value of book_online_info.together_bought 49 | * 50 | * @mbggenerated Sun May 19 11:22:56 CST 2013 51 | */ 52 | public String getTogether_bought() { 53 | return together_bought; 54 | } 55 | 56 | /** 57 | * This method was generated by MyBatis Generator. 58 | * This method sets the value of the database column book_online_info.together_bought 59 | * 60 | * @param together_bought the value for book_online_info.together_bought 61 | * 62 | * @mbggenerated Sun May 19 11:22:56 CST 2013 63 | */ 64 | public void setTogether_bought(String together_bought) { 65 | this.together_bought = together_bought == null ? null : together_bought.trim(); 66 | } 67 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/dao/BookTagRelationMapper.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.dao; 2 | 3 | import cn.edu.ustb.dm.model.BookTagRelation; 4 | import cn.edu.ustb.dm.model.BookTagRelationExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface BookTagRelationMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table book_tag_relation 12 | * 13 | * @mbggenerated Sun May 19 11:22:56 CST 2013 14 | */ 15 | int countByExample(BookTagRelationExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table book_tag_relation 20 | * 21 | * @mbggenerated Sun May 19 11:22:56 CST 2013 22 | */ 23 | int deleteByExample(BookTagRelationExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table book_tag_relation 28 | * 29 | * @mbggenerated Sun May 19 11:22:56 CST 2013 30 | */ 31 | int insert(BookTagRelation record); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table book_tag_relation 36 | * 37 | * @mbggenerated Sun May 19 11:22:56 CST 2013 38 | */ 39 | int insertSelective(BookTagRelation record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table book_tag_relation 44 | * 45 | * @mbggenerated Sun May 19 11:22:56 CST 2013 46 | */ 47 | List selectByExample(BookTagRelationExample example); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table book_tag_relation 52 | * 53 | * @mbggenerated Sun May 19 11:22:56 CST 2013 54 | */ 55 | int updateByExampleSelective(@Param("record") BookTagRelation record, @Param("example") BookTagRelationExample example); 56 | 57 | /** 58 | * This method was generated by MyBatis Generator. 59 | * This method corresponds to the database table book_tag_relation 60 | * 61 | * @mbggenerated Sun May 19 11:22:56 CST 2013 62 | */ 63 | int updateByExample(@Param("record") BookTagRelation record, @Param("example") BookTagRelationExample example); 64 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/NationalityInfo.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class NationalityInfo { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column nationality_info.NATIONALITY_ID 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private Integer NATIONALITY_ID; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column nationality_info.NATIONALITY_NAME 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private String NATIONALITY_NAME; 19 | 20 | /** 21 | * This method was generated by MyBatis Generator. 22 | * This method returns the value of the database column nationality_info.NATIONALITY_ID 23 | * 24 | * @return the value of nationality_info.NATIONALITY_ID 25 | * 26 | * @mbggenerated Sun May 19 11:22:56 CST 2013 27 | */ 28 | public Integer getNATIONALITY_ID() { 29 | return NATIONALITY_ID; 30 | } 31 | 32 | /** 33 | * This method was generated by MyBatis Generator. 34 | * This method sets the value of the database column nationality_info.NATIONALITY_ID 35 | * 36 | * @param NATIONALITY_ID the value for nationality_info.NATIONALITY_ID 37 | * 38 | * @mbggenerated Sun May 19 11:22:56 CST 2013 39 | */ 40 | public void setNATIONALITY_ID(Integer NATIONALITY_ID) { 41 | this.NATIONALITY_ID = NATIONALITY_ID; 42 | } 43 | 44 | /** 45 | * This method was generated by MyBatis Generator. 46 | * This method returns the value of the database column nationality_info.NATIONALITY_NAME 47 | * 48 | * @return the value of nationality_info.NATIONALITY_NAME 49 | * 50 | * @mbggenerated Sun May 19 11:22:56 CST 2013 51 | */ 52 | public String getNATIONALITY_NAME() { 53 | return NATIONALITY_NAME; 54 | } 55 | 56 | /** 57 | * This method was generated by MyBatis Generator. 58 | * This method sets the value of the database column nationality_info.NATIONALITY_NAME 59 | * 60 | * @param NATIONALITY_NAME the value for nationality_info.NATIONALITY_NAME 61 | * 62 | * @mbggenerated Sun May 19 11:22:56 CST 2013 63 | */ 64 | public void setNATIONALITY_NAME(String NATIONALITY_NAME) { 65 | this.NATIONALITY_NAME = NATIONALITY_NAME == null ? null : NATIONALITY_NAME.trim(); 66 | } 67 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/dao/BookAuthorRelationMapper.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.dao; 2 | 3 | import cn.edu.ustb.dm.model.BookAuthorRelation; 4 | import cn.edu.ustb.dm.model.BookAuthorRelationExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface BookAuthorRelationMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table book_author_relation 12 | * 13 | * @mbggenerated Sun May 19 11:22:56 CST 2013 14 | */ 15 | int countByExample(BookAuthorRelationExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table book_author_relation 20 | * 21 | * @mbggenerated Sun May 19 11:22:56 CST 2013 22 | */ 23 | int deleteByExample(BookAuthorRelationExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table book_author_relation 28 | * 29 | * @mbggenerated Sun May 19 11:22:56 CST 2013 30 | */ 31 | int insert(BookAuthorRelation record); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table book_author_relation 36 | * 37 | * @mbggenerated Sun May 19 11:22:56 CST 2013 38 | */ 39 | int insertSelective(BookAuthorRelation record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table book_author_relation 44 | * 45 | * @mbggenerated Sun May 19 11:22:56 CST 2013 46 | */ 47 | List selectByExample(BookAuthorRelationExample example); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table book_author_relation 52 | * 53 | * @mbggenerated Sun May 19 11:22:56 CST 2013 54 | */ 55 | int updateByExampleSelective(@Param("record") BookAuthorRelation record, @Param("example") BookAuthorRelationExample example); 56 | 57 | /** 58 | * This method was generated by MyBatis Generator. 59 | * This method corresponds to the database table book_author_relation 60 | * 61 | * @mbggenerated Sun May 19 11:22:56 CST 2013 62 | */ 63 | int updateByExample(@Param("record") BookAuthorRelation record, @Param("example") BookAuthorRelationExample example); 64 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/controller/BookInfoController.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.controller; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.util.Locale; 6 | import java.util.Properties; 7 | 8 | import javax.annotation.Resource; 9 | 10 | import org.apache.ibatis.session.SqlSession; 11 | import org.apache.ibatis.session.SqlSessionFactory; 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | import org.springframework.stereotype.Controller; 15 | import org.springframework.ui.Model; 16 | import org.springframework.web.bind.annotation.RequestMapping; 17 | import org.springframework.web.bind.annotation.RequestMethod; 18 | import org.springframework.web.bind.annotation.RequestParam; 19 | 20 | import cn.edu.ustb.dm.dao.BookAuthorInfoMapper; 21 | import cn.edu.ustb.dm.dao.BookOnlineInfoMapper; 22 | import cn.edu.ustb.dm.dao.BookPublishingInfoMapper; 23 | 24 | @Controller 25 | public class BookInfoController { 26 | @Resource 27 | private SqlSessionFactory sqlSessionFactory; 28 | 29 | private static final Logger logger = LoggerFactory.getLogger(BookInfoController.class); 30 | private Properties properties; 31 | private SqlSession session; 32 | private BookPublishingInfoMapper publishingInfoMapper; 33 | private BookOnlineInfoMapper onlineInfoMapper; 34 | private BookAuthorInfoMapper authorInfoMapper; 35 | 36 | private Properties getProperties() { 37 | if(properties == null) { 38 | properties = new Properties(); 39 | try { 40 | InputStream in = getClass().getResourceAsStream("/Web.properties"); 41 | properties.load(in); 42 | } catch (IOException e) { 43 | e.printStackTrace(); 44 | } 45 | } 46 | return properties; 47 | } 48 | private BookPublishingInfoMapper getPublishingInfoMapper() { 49 | if(publishingInfoMapper == null) 50 | publishingInfoMapper = session.getMapper(BookPublishingInfoMapper.class); 51 | return publishingInfoMapper; 52 | } 53 | private BookOnlineInfoMapper getOnlineInfoMapper() { 54 | if(onlineInfoMapper == null) 55 | onlineInfoMapper = session.getMapper(BookOnlineInfoMapper.class); 56 | return onlineInfoMapper; 57 | } 58 | private BookAuthorInfoMapper getBookAuthorInfoMapper() { 59 | if(authorInfoMapper == null) 60 | authorInfoMapper = session.getMapper(BookAuthorInfoMapper.class); 61 | return authorInfoMapper; 62 | } 63 | 64 | private void resetMapper() { 65 | publishingInfoMapper = null; 66 | onlineInfoMapper = null; 67 | authorInfoMapper = null; 68 | } 69 | 70 | @RequestMapping(value="/bookInfo", method = RequestMethod.GET) 71 | public String bookInfo(Locale locale, Model model, 72 | @RequestParam("id") int id) { 73 | resetMapper(); 74 | session = sqlSessionFactory.openSession(); 75 | try { 76 | model.addAttribute("imageSrc", getProperties().getProperty("book_lpic")); 77 | model.addAttribute("publishing", getPublishingInfoMapper().selectByPrimaryKey(id)); 78 | model.addAttribute("online", getOnlineInfoMapper().selectByPrimaryKey(id)); 79 | model.addAttribute("author", getBookAuthorInfoMapper().selectByPrimaryKey(id)); 80 | session.commit(); 81 | } finally { 82 | session.close(); 83 | } 84 | return "bookInfo"; 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/BookTagRelation.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class BookTagRelation { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column book_tag_relation.BOOK_ID 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private Integer BOOK_ID; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column book_tag_relation.TAG_ID 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private Integer TAG_ID; 19 | 20 | /** 21 | * This field was generated by MyBatis Generator. 22 | * This field corresponds to the database column book_tag_relation.USEAGE_NUM 23 | * 24 | * @mbggenerated Sun May 19 11:22:56 CST 2013 25 | */ 26 | private Integer USEAGE_NUM; 27 | 28 | /** 29 | * This method was generated by MyBatis Generator. 30 | * This method returns the value of the database column book_tag_relation.BOOK_ID 31 | * 32 | * @return the value of book_tag_relation.BOOK_ID 33 | * 34 | * @mbggenerated Sun May 19 11:22:56 CST 2013 35 | */ 36 | public Integer getBOOK_ID() { 37 | return BOOK_ID; 38 | } 39 | 40 | /** 41 | * This method was generated by MyBatis Generator. 42 | * This method sets the value of the database column book_tag_relation.BOOK_ID 43 | * 44 | * @param BOOK_ID the value for book_tag_relation.BOOK_ID 45 | * 46 | * @mbggenerated Sun May 19 11:22:56 CST 2013 47 | */ 48 | public void setBOOK_ID(Integer BOOK_ID) { 49 | this.BOOK_ID = BOOK_ID; 50 | } 51 | 52 | /** 53 | * This method was generated by MyBatis Generator. 54 | * This method returns the value of the database column book_tag_relation.TAG_ID 55 | * 56 | * @return the value of book_tag_relation.TAG_ID 57 | * 58 | * @mbggenerated Sun May 19 11:22:56 CST 2013 59 | */ 60 | public Integer getTAG_ID() { 61 | return TAG_ID; 62 | } 63 | 64 | /** 65 | * This method was generated by MyBatis Generator. 66 | * This method sets the value of the database column book_tag_relation.TAG_ID 67 | * 68 | * @param TAG_ID the value for book_tag_relation.TAG_ID 69 | * 70 | * @mbggenerated Sun May 19 11:22:56 CST 2013 71 | */ 72 | public void setTAG_ID(Integer TAG_ID) { 73 | this.TAG_ID = TAG_ID; 74 | } 75 | 76 | /** 77 | * This method was generated by MyBatis Generator. 78 | * This method returns the value of the database column book_tag_relation.USEAGE_NUM 79 | * 80 | * @return the value of book_tag_relation.USEAGE_NUM 81 | * 82 | * @mbggenerated Sun May 19 11:22:56 CST 2013 83 | */ 84 | public Integer getUSEAGE_NUM() { 85 | return USEAGE_NUM; 86 | } 87 | 88 | /** 89 | * This method was generated by MyBatis Generator. 90 | * This method sets the value of the database column book_tag_relation.USEAGE_NUM 91 | * 92 | * @param USEAGE_NUM the value for book_tag_relation.USEAGE_NUM 93 | * 94 | * @mbggenerated Sun May 19 11:22:56 CST 2013 95 | */ 96 | public void setUSEAGE_NUM(Integer USEAGE_NUM) { 97 | this.USEAGE_NUM = USEAGE_NUM; 98 | } 99 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/dao/TagInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.dao; 2 | 3 | import cn.edu.ustb.dm.model.TagInfo; 4 | import cn.edu.ustb.dm.model.TagInfoExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface TagInfoMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table tag_info 12 | * 13 | * @mbggenerated Sun May 19 11:22:56 CST 2013 14 | */ 15 | int countByExample(TagInfoExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table tag_info 20 | * 21 | * @mbggenerated Sun May 19 11:22:56 CST 2013 22 | */ 23 | int deleteByExample(TagInfoExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table tag_info 28 | * 29 | * @mbggenerated Sun May 19 11:22:56 CST 2013 30 | */ 31 | int deleteByPrimaryKey(Integer TAG_ID); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table tag_info 36 | * 37 | * @mbggenerated Sun May 19 11:22:56 CST 2013 38 | */ 39 | int insert(TagInfo record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table tag_info 44 | * 45 | * @mbggenerated Sun May 19 11:22:56 CST 2013 46 | */ 47 | int insertSelective(TagInfo record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table tag_info 52 | * 53 | * @mbggenerated Sun May 19 11:22:56 CST 2013 54 | */ 55 | List selectByExample(TagInfoExample example); 56 | 57 | /** 58 | * This method was generated by MyBatis Generator. 59 | * This method corresponds to the database table tag_info 60 | * 61 | * @mbggenerated Sun May 19 11:22:56 CST 2013 62 | */ 63 | TagInfo selectByPrimaryKey(Integer TAG_ID); 64 | 65 | /** 66 | * This method was generated by MyBatis Generator. 67 | * This method corresponds to the database table tag_info 68 | * 69 | * @mbggenerated Sun May 19 11:22:56 CST 2013 70 | */ 71 | int updateByExampleSelective(@Param("record") TagInfo record, @Param("example") TagInfoExample example); 72 | 73 | /** 74 | * This method was generated by MyBatis Generator. 75 | * This method corresponds to the database table tag_info 76 | * 77 | * @mbggenerated Sun May 19 11:22:56 CST 2013 78 | */ 79 | int updateByExample(@Param("record") TagInfo record, @Param("example") TagInfoExample example); 80 | 81 | /** 82 | * This method was generated by MyBatis Generator. 83 | * This method corresponds to the database table tag_info 84 | * 85 | * @mbggenerated Sun May 19 11:22:56 CST 2013 86 | */ 87 | int updateByPrimaryKeySelective(TagInfo record); 88 | 89 | /** 90 | * This method was generated by MyBatis Generator. 91 | * This method corresponds to the database table tag_info 92 | * 93 | * @mbggenerated Sun May 19 11:22:56 CST 2013 94 | */ 95 | int updateByPrimaryKey(TagInfo record); 96 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/dao/BindingTypeMapper.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.dao; 2 | 3 | import cn.edu.ustb.dm.model.BindingType; 4 | import cn.edu.ustb.dm.model.BindingTypeExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface BindingTypeMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table binding_type 12 | * 13 | * @mbggenerated Sun May 19 11:22:56 CST 2013 14 | */ 15 | int countByExample(BindingTypeExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table binding_type 20 | * 21 | * @mbggenerated Sun May 19 11:22:56 CST 2013 22 | */ 23 | int deleteByExample(BindingTypeExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table binding_type 28 | * 29 | * @mbggenerated Sun May 19 11:22:56 CST 2013 30 | */ 31 | int deleteByPrimaryKey(Integer BINDING_ID); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table binding_type 36 | * 37 | * @mbggenerated Sun May 19 11:22:56 CST 2013 38 | */ 39 | int insert(BindingType record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table binding_type 44 | * 45 | * @mbggenerated Sun May 19 11:22:56 CST 2013 46 | */ 47 | int insertSelective(BindingType record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table binding_type 52 | * 53 | * @mbggenerated Sun May 19 11:22:56 CST 2013 54 | */ 55 | List selectByExample(BindingTypeExample example); 56 | 57 | /** 58 | * This method was generated by MyBatis Generator. 59 | * This method corresponds to the database table binding_type 60 | * 61 | * @mbggenerated Sun May 19 11:22:56 CST 2013 62 | */ 63 | BindingType selectByPrimaryKey(Integer BINDING_ID); 64 | 65 | /** 66 | * This method was generated by MyBatis Generator. 67 | * This method corresponds to the database table binding_type 68 | * 69 | * @mbggenerated Sun May 19 11:22:56 CST 2013 70 | */ 71 | int updateByExampleSelective(@Param("record") BindingType record, @Param("example") BindingTypeExample example); 72 | 73 | /** 74 | * This method was generated by MyBatis Generator. 75 | * This method corresponds to the database table binding_type 76 | * 77 | * @mbggenerated Sun May 19 11:22:56 CST 2013 78 | */ 79 | int updateByExample(@Param("record") BindingType record, @Param("example") BindingTypeExample example); 80 | 81 | /** 82 | * This method was generated by MyBatis Generator. 83 | * This method corresponds to the database table binding_type 84 | * 85 | * @mbggenerated Sun May 19 11:22:56 CST 2013 86 | */ 87 | int updateByPrimaryKeySelective(BindingType record); 88 | 89 | /** 90 | * This method was generated by MyBatis Generator. 91 | * This method corresponds to the database table binding_type 92 | * 93 | * @mbggenerated Sun May 19 11:22:56 CST 2013 94 | */ 95 | int updateByPrimaryKey(BindingType record); 96 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/BookAuthorRelation.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class BookAuthorRelation { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column book_author_relation.BOOK_ID 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private Integer BOOK_ID; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column book_author_relation.AUTHOR_ID 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private Integer AUTHOR_ID; 19 | 20 | /** 21 | * This field was generated by MyBatis Generator. 22 | * This field corresponds to the database column book_author_relation.AUTHOR_TYPE_ID 23 | * 24 | * @mbggenerated Sun May 19 11:22:56 CST 2013 25 | */ 26 | private Integer AUTHOR_TYPE_ID; 27 | 28 | /** 29 | * This method was generated by MyBatis Generator. 30 | * This method returns the value of the database column book_author_relation.BOOK_ID 31 | * 32 | * @return the value of book_author_relation.BOOK_ID 33 | * 34 | * @mbggenerated Sun May 19 11:22:56 CST 2013 35 | */ 36 | public Integer getBOOK_ID() { 37 | return BOOK_ID; 38 | } 39 | 40 | /** 41 | * This method was generated by MyBatis Generator. 42 | * This method sets the value of the database column book_author_relation.BOOK_ID 43 | * 44 | * @param BOOK_ID the value for book_author_relation.BOOK_ID 45 | * 46 | * @mbggenerated Sun May 19 11:22:56 CST 2013 47 | */ 48 | public void setBOOK_ID(Integer BOOK_ID) { 49 | this.BOOK_ID = BOOK_ID; 50 | } 51 | 52 | /** 53 | * This method was generated by MyBatis Generator. 54 | * This method returns the value of the database column book_author_relation.AUTHOR_ID 55 | * 56 | * @return the value of book_author_relation.AUTHOR_ID 57 | * 58 | * @mbggenerated Sun May 19 11:22:56 CST 2013 59 | */ 60 | public Integer getAUTHOR_ID() { 61 | return AUTHOR_ID; 62 | } 63 | 64 | /** 65 | * This method was generated by MyBatis Generator. 66 | * This method sets the value of the database column book_author_relation.AUTHOR_ID 67 | * 68 | * @param AUTHOR_ID the value for book_author_relation.AUTHOR_ID 69 | * 70 | * @mbggenerated Sun May 19 11:22:56 CST 2013 71 | */ 72 | public void setAUTHOR_ID(Integer AUTHOR_ID) { 73 | this.AUTHOR_ID = AUTHOR_ID; 74 | } 75 | 76 | /** 77 | * This method was generated by MyBatis Generator. 78 | * This method returns the value of the database column book_author_relation.AUTHOR_TYPE_ID 79 | * 80 | * @return the value of book_author_relation.AUTHOR_TYPE_ID 81 | * 82 | * @mbggenerated Sun May 19 11:22:56 CST 2013 83 | */ 84 | public Integer getAUTHOR_TYPE_ID() { 85 | return AUTHOR_TYPE_ID; 86 | } 87 | 88 | /** 89 | * This method was generated by MyBatis Generator. 90 | * This method sets the value of the database column book_author_relation.AUTHOR_TYPE_ID 91 | * 92 | * @param AUTHOR_TYPE_ID the value for book_author_relation.AUTHOR_TYPE_ID 93 | * 94 | * @mbggenerated Sun May 19 11:22:56 CST 2013 95 | */ 96 | public void setAUTHOR_TYPE_ID(Integer AUTHOR_TYPE_ID) { 97 | this.AUTHOR_TYPE_ID = AUTHOR_TYPE_ID; 98 | } 99 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/model/SearchResultPaginationModel.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.model; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class SearchResultPaginationModel { 7 | private String keyword; 8 | private Integer from; 9 | private Integer count; 10 | private Integer totalCount; 11 | private Integer listCount; 12 | private Integer pageCount; 13 | private Integer currentPage; 14 | private Integer prevPage; 15 | private Integer nextPage; 16 | private List pageList; 17 | private boolean isFirst; 18 | private boolean isLast; 19 | 20 | public String getKeyword() { 21 | return keyword; 22 | } 23 | public Integer getFrom() { 24 | return from; 25 | } 26 | public Integer getCount() { 27 | return count; 28 | } 29 | public Integer getTotalCount() { 30 | return totalCount; 31 | } 32 | public Integer getListCount() { 33 | return listCount; 34 | } 35 | public Integer getPageCount() { 36 | if(count != 0) { 37 | if(totalCount%count != 0) 38 | return totalCount/count + 1; 39 | else 40 | return totalCount/count; 41 | } else 42 | return 0; 43 | } 44 | public Integer getCurrentPage() { 45 | if(count != 0) { 46 | return from/count + 1; 47 | } else 48 | return 0; 49 | } 50 | public Integer getPrevPage() { 51 | return getFrom() - getCount(); 52 | } 53 | public Integer getNextPage() { 54 | return getFrom() + getCount(); 55 | } 56 | public List getPageList() { 57 | List list = new ArrayList(); 58 | int count = getPageCount(); 59 | int curr = getCurrentPage(); 60 | if(count < 8){ 61 | for(int i=1; i<=count; i++) { 62 | list.add(new PageList(i)); 63 | } 64 | } else { 65 | if(curr < 5) { 66 | for(int i=1; i<=5; i++) { 67 | list.add(new PageList(i)); 68 | } 69 | list.add(new PageList(0)); 70 | list.add(new PageList(count)); 71 | } else if(curr < count-3) { 72 | list.add(new PageList(1)); 73 | list.add(new PageList(0)); 74 | list.add(new PageList(curr-1)); 75 | list.add(new PageList(curr)); 76 | list.add(new PageList(curr+1)); 77 | list.add(new PageList(0)); 78 | list.add(new PageList(count)); 79 | } else { 80 | list.add(new PageList(1)); 81 | list.add(new PageList(0)); 82 | for(int i=count-4; i<=count; i++) { 83 | list.add(new PageList(i)); 84 | } 85 | } 86 | } 87 | return list; 88 | } 89 | public boolean getIsFirst() { 90 | if(getCurrentPage() == 1) { 91 | return true; 92 | } 93 | return false; 94 | } 95 | public boolean getIsLast() { 96 | if(getCurrentPage().equals(getPageCount())) { 97 | return true; 98 | } 99 | return false; 100 | } 101 | public void setKeyword(String keyword) { 102 | this.keyword = keyword; 103 | } 104 | public void setFrom(Integer from) { 105 | this.from = from; 106 | } 107 | public void setCount(Integer count) { 108 | this.count = count; 109 | } 110 | public void setTotalCount(Integer totalCount) { 111 | this.totalCount = totalCount; 112 | } 113 | public void setListCount(Integer listCount) { 114 | this.listCount = listCount; 115 | } 116 | 117 | public class PageList { 118 | private int id; 119 | private int from; 120 | 121 | public PageList(int id) { 122 | this.id = id; 123 | } 124 | 125 | public int getId() { 126 | return id; 127 | } 128 | public int getFrom() { 129 | return (id-1)*count; 130 | } 131 | } 132 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/dao/PublisherInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.dao; 2 | 3 | import cn.edu.ustb.dm.model.PublisherInfo; 4 | import cn.edu.ustb.dm.model.PublisherInfoExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface PublisherInfoMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table publisher_info 12 | * 13 | * @mbggenerated Sun May 19 11:22:56 CST 2013 14 | */ 15 | int countByExample(PublisherInfoExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table publisher_info 20 | * 21 | * @mbggenerated Sun May 19 11:22:56 CST 2013 22 | */ 23 | int deleteByExample(PublisherInfoExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table publisher_info 28 | * 29 | * @mbggenerated Sun May 19 11:22:56 CST 2013 30 | */ 31 | int deleteByPrimaryKey(Integer PUBLISHER_ID); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table publisher_info 36 | * 37 | * @mbggenerated Sun May 19 11:22:56 CST 2013 38 | */ 39 | int insert(PublisherInfo record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table publisher_info 44 | * 45 | * @mbggenerated Sun May 19 11:22:56 CST 2013 46 | */ 47 | int insertSelective(PublisherInfo record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table publisher_info 52 | * 53 | * @mbggenerated Sun May 19 11:22:56 CST 2013 54 | */ 55 | List selectByExample(PublisherInfoExample example); 56 | 57 | /** 58 | * This method was generated by MyBatis Generator. 59 | * This method corresponds to the database table publisher_info 60 | * 61 | * @mbggenerated Sun May 19 11:22:56 CST 2013 62 | */ 63 | PublisherInfo selectByPrimaryKey(Integer PUBLISHER_ID); 64 | 65 | /** 66 | * This method was generated by MyBatis Generator. 67 | * This method corresponds to the database table publisher_info 68 | * 69 | * @mbggenerated Sun May 19 11:22:56 CST 2013 70 | */ 71 | int updateByExampleSelective(@Param("record") PublisherInfo record, @Param("example") PublisherInfoExample example); 72 | 73 | /** 74 | * This method was generated by MyBatis Generator. 75 | * This method corresponds to the database table publisher_info 76 | * 77 | * @mbggenerated Sun May 19 11:22:56 CST 2013 78 | */ 79 | int updateByExample(@Param("record") PublisherInfo record, @Param("example") PublisherInfoExample example); 80 | 81 | /** 82 | * This method was generated by MyBatis Generator. 83 | * This method corresponds to the database table publisher_info 84 | * 85 | * @mbggenerated Sun May 19 11:22:56 CST 2013 86 | */ 87 | int updateByPrimaryKeySelective(PublisherInfo record); 88 | 89 | /** 90 | * This method was generated by MyBatis Generator. 91 | * This method corresponds to the database table publisher_info 92 | * 93 | * @mbggenerated Sun May 19 11:22:56 CST 2013 94 | */ 95 | int updateByPrimaryKey(PublisherInfo record); 96 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/BookRelation.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class BookRelation { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column book_relation.BOOK_ID 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private Integer BOOK_ID; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column book_relation.RELATION_BOOK_ID 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private Integer RELATION_BOOK_ID; 19 | 20 | /** 21 | * This field was generated by MyBatis Generator. 22 | * This field corresponds to the database column book_relation.RELATION_BOOK_NAME 23 | * 24 | * @mbggenerated Sun May 19 11:22:56 CST 2013 25 | */ 26 | private String RELATION_BOOK_NAME; 27 | 28 | /** 29 | * This method was generated by MyBatis Generator. 30 | * This method returns the value of the database column book_relation.BOOK_ID 31 | * 32 | * @return the value of book_relation.BOOK_ID 33 | * 34 | * @mbggenerated Sun May 19 11:22:56 CST 2013 35 | */ 36 | public Integer getBOOK_ID() { 37 | return BOOK_ID; 38 | } 39 | 40 | /** 41 | * This method was generated by MyBatis Generator. 42 | * This method sets the value of the database column book_relation.BOOK_ID 43 | * 44 | * @param BOOK_ID the value for book_relation.BOOK_ID 45 | * 46 | * @mbggenerated Sun May 19 11:22:56 CST 2013 47 | */ 48 | public void setBOOK_ID(Integer BOOK_ID) { 49 | this.BOOK_ID = BOOK_ID; 50 | } 51 | 52 | /** 53 | * This method was generated by MyBatis Generator. 54 | * This method returns the value of the database column book_relation.RELATION_BOOK_ID 55 | * 56 | * @return the value of book_relation.RELATION_BOOK_ID 57 | * 58 | * @mbggenerated Sun May 19 11:22:56 CST 2013 59 | */ 60 | public Integer getRELATION_BOOK_ID() { 61 | return RELATION_BOOK_ID; 62 | } 63 | 64 | /** 65 | * This method was generated by MyBatis Generator. 66 | * This method sets the value of the database column book_relation.RELATION_BOOK_ID 67 | * 68 | * @param RELATION_BOOK_ID the value for book_relation.RELATION_BOOK_ID 69 | * 70 | * @mbggenerated Sun May 19 11:22:56 CST 2013 71 | */ 72 | public void setRELATION_BOOK_ID(Integer RELATION_BOOK_ID) { 73 | this.RELATION_BOOK_ID = RELATION_BOOK_ID; 74 | } 75 | 76 | /** 77 | * This method was generated by MyBatis Generator. 78 | * This method returns the value of the database column book_relation.RELATION_BOOK_NAME 79 | * 80 | * @return the value of book_relation.RELATION_BOOK_NAME 81 | * 82 | * @mbggenerated Sun May 19 11:22:56 CST 2013 83 | */ 84 | public String getRELATION_BOOK_NAME() { 85 | return RELATION_BOOK_NAME; 86 | } 87 | 88 | /** 89 | * This method was generated by MyBatis Generator. 90 | * This method sets the value of the database column book_relation.RELATION_BOOK_NAME 91 | * 92 | * @param RELATION_BOOK_NAME the value for book_relation.RELATION_BOOK_NAME 93 | * 94 | * @mbggenerated Sun May 19 11:22:56 CST 2013 95 | */ 96 | public void setRELATION_BOOK_NAME(String RELATION_BOOK_NAME) { 97 | this.RELATION_BOOK_NAME = RELATION_BOOK_NAME == null ? null : RELATION_BOOK_NAME.trim(); 98 | } 99 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/dao/NationalityInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.dao; 2 | 3 | import cn.edu.ustb.dm.model.NationalityInfo; 4 | import cn.edu.ustb.dm.model.NationalityInfoExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface NationalityInfoMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table nationality_info 12 | * 13 | * @mbggenerated Sun May 19 11:22:56 CST 2013 14 | */ 15 | int countByExample(NationalityInfoExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table nationality_info 20 | * 21 | * @mbggenerated Sun May 19 11:22:56 CST 2013 22 | */ 23 | int deleteByExample(NationalityInfoExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table nationality_info 28 | * 29 | * @mbggenerated Sun May 19 11:22:56 CST 2013 30 | */ 31 | int deleteByPrimaryKey(Integer NATIONALITY_ID); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table nationality_info 36 | * 37 | * @mbggenerated Sun May 19 11:22:56 CST 2013 38 | */ 39 | int insert(NationalityInfo record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table nationality_info 44 | * 45 | * @mbggenerated Sun May 19 11:22:56 CST 2013 46 | */ 47 | int insertSelective(NationalityInfo record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table nationality_info 52 | * 53 | * @mbggenerated Sun May 19 11:22:56 CST 2013 54 | */ 55 | List selectByExample(NationalityInfoExample example); 56 | 57 | /** 58 | * This method was generated by MyBatis Generator. 59 | * This method corresponds to the database table nationality_info 60 | * 61 | * @mbggenerated Sun May 19 11:22:56 CST 2013 62 | */ 63 | NationalityInfo selectByPrimaryKey(Integer NATIONALITY_ID); 64 | 65 | /** 66 | * This method was generated by MyBatis Generator. 67 | * This method corresponds to the database table nationality_info 68 | * 69 | * @mbggenerated Sun May 19 11:22:56 CST 2013 70 | */ 71 | int updateByExampleSelective(@Param("record") NationalityInfo record, @Param("example") NationalityInfoExample example); 72 | 73 | /** 74 | * This method was generated by MyBatis Generator. 75 | * This method corresponds to the database table nationality_info 76 | * 77 | * @mbggenerated Sun May 19 11:22:56 CST 2013 78 | */ 79 | int updateByExample(@Param("record") NationalityInfo record, @Param("example") NationalityInfoExample example); 80 | 81 | /** 82 | * This method was generated by MyBatis Generator. 83 | * This method corresponds to the database table nationality_info 84 | * 85 | * @mbggenerated Sun May 19 11:22:56 CST 2013 86 | */ 87 | int updateByPrimaryKeySelective(NationalityInfo record); 88 | 89 | /** 90 | * This method was generated by MyBatis Generator. 91 | * This method corresponds to the database table nationality_info 92 | * 93 | * @mbggenerated Sun May 19 11:22:56 CST 2013 94 | */ 95 | int updateByPrimaryKey(NationalityInfo record); 96 | } -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/includes/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 2 | <%@ page language="java" contentType="text/html; charset=UTF-8" 3 | pageEncoding="UTF-8"%> 4 | 5 | 6 | 7 | 8 | 图书推荐系统 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 |

56 |
57 |
58 | "titleResultList" 60 | "${searchType }"> 61 | "20" 63 | "${pagination.count }"> 64 |
65 |
66 | 76 | 81 |
82 | 83 | 84 |
85 |
86 |
87 |
-------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/TagInfo.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class TagInfo { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column tag_info.TAG_ID 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private Integer TAG_ID; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column tag_info.NAME 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private String NAME; 19 | 20 | /** 21 | * This field was generated by MyBatis Generator. 22 | * This field corresponds to the database column tag_info.COUNT 23 | * 24 | * @mbggenerated Sun May 19 11:22:56 CST 2013 25 | */ 26 | private Integer COUNT; 27 | 28 | /** 29 | * This field was generated by MyBatis Generator. 30 | * This field corresponds to the database column tag_info.LEVEL 31 | * 32 | * @mbggenerated Sun May 19 11:22:56 CST 2013 33 | */ 34 | private Integer LEVEL; 35 | 36 | /** 37 | * This method was generated by MyBatis Generator. 38 | * This method returns the value of the database column tag_info.TAG_ID 39 | * 40 | * @return the value of tag_info.TAG_ID 41 | * 42 | * @mbggenerated Sun May 19 11:22:56 CST 2013 43 | */ 44 | public Integer getTAG_ID() { 45 | return TAG_ID; 46 | } 47 | 48 | /** 49 | * This method was generated by MyBatis Generator. 50 | * This method sets the value of the database column tag_info.TAG_ID 51 | * 52 | * @param TAG_ID the value for tag_info.TAG_ID 53 | * 54 | * @mbggenerated Sun May 19 11:22:56 CST 2013 55 | */ 56 | public void setTAG_ID(Integer TAG_ID) { 57 | this.TAG_ID = TAG_ID; 58 | } 59 | 60 | /** 61 | * This method was generated by MyBatis Generator. 62 | * This method returns the value of the database column tag_info.NAME 63 | * 64 | * @return the value of tag_info.NAME 65 | * 66 | * @mbggenerated Sun May 19 11:22:56 CST 2013 67 | */ 68 | public String getNAME() { 69 | return NAME; 70 | } 71 | 72 | /** 73 | * This method was generated by MyBatis Generator. 74 | * This method sets the value of the database column tag_info.NAME 75 | * 76 | * @param NAME the value for tag_info.NAME 77 | * 78 | * @mbggenerated Sun May 19 11:22:56 CST 2013 79 | */ 80 | public void setNAME(String NAME) { 81 | this.NAME = NAME == null ? null : NAME.trim(); 82 | } 83 | 84 | /** 85 | * This method was generated by MyBatis Generator. 86 | * This method returns the value of the database column tag_info.COUNT 87 | * 88 | * @return the value of tag_info.COUNT 89 | * 90 | * @mbggenerated Sun May 19 11:22:56 CST 2013 91 | */ 92 | public Integer getCOUNT() { 93 | return COUNT; 94 | } 95 | 96 | /** 97 | * This method was generated by MyBatis Generator. 98 | * This method sets the value of the database column tag_info.COUNT 99 | * 100 | * @param COUNT the value for tag_info.COUNT 101 | * 102 | * @mbggenerated Sun May 19 11:22:56 CST 2013 103 | */ 104 | public void setCOUNT(Integer COUNT) { 105 | this.COUNT = COUNT; 106 | } 107 | 108 | /** 109 | * This method was generated by MyBatis Generator. 110 | * This method returns the value of the database column tag_info.LEVEL 111 | * 112 | * @return the value of tag_info.LEVEL 113 | * 114 | * @mbggenerated Sun May 19 11:22:56 CST 2013 115 | */ 116 | public Integer getLEVEL() { 117 | return LEVEL; 118 | } 119 | 120 | /** 121 | * This method was generated by MyBatis Generator. 122 | * This method sets the value of the database column tag_info.LEVEL 123 | * 124 | * @param LEVEL the value for tag_info.LEVEL 125 | * 126 | * @mbggenerated Sun May 19 11:22:56 CST 2013 127 | */ 128 | public void setLEVEL(Integer LEVEL) { 129 | this.LEVEL = LEVEL; 130 | } 131 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/dao/BookAuthorInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.dao; 2 | 3 | import cn.edu.ustb.dm.model.BookAuthorInfo; 4 | import cn.edu.ustb.dm.model.BookAuthorInfoExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface BookAuthorInfoMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table book_author_info 12 | * 13 | * @mbggenerated Sun May 19 11:22:56 CST 2013 14 | */ 15 | int countByExample(BookAuthorInfoExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table book_author_info 20 | * 21 | * @mbggenerated Sun May 19 11:22:56 CST 2013 22 | */ 23 | int deleteByExample(BookAuthorInfoExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table book_author_info 28 | * 29 | * @mbggenerated Sun May 19 11:22:56 CST 2013 30 | */ 31 | int deleteByPrimaryKey(Integer book_id); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table book_author_info 36 | * 37 | * @mbggenerated Sun May 19 11:22:56 CST 2013 38 | */ 39 | int insert(BookAuthorInfo record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table book_author_info 44 | * 45 | * @mbggenerated Sun May 19 11:22:56 CST 2013 46 | */ 47 | int insertSelective(BookAuthorInfo record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table book_author_info 52 | * 53 | * @mbggenerated Sun May 19 11:22:56 CST 2013 54 | */ 55 | List selectByExampleWithBLOBs(BookAuthorInfoExample example); 56 | 57 | /** 58 | * This method was generated by MyBatis Generator. 59 | * This method corresponds to the database table book_author_info 60 | * 61 | * @mbggenerated Sun May 19 11:22:56 CST 2013 62 | */ 63 | List selectByExample(BookAuthorInfoExample example); 64 | 65 | /** 66 | * This method was generated by MyBatis Generator. 67 | * This method corresponds to the database table book_author_info 68 | * 69 | * @mbggenerated Sun May 19 11:22:56 CST 2013 70 | */ 71 | BookAuthorInfo selectByPrimaryKey(Integer book_id); 72 | 73 | /** 74 | * This method was generated by MyBatis Generator. 75 | * This method corresponds to the database table book_author_info 76 | * 77 | * @mbggenerated Sun May 19 11:22:56 CST 2013 78 | */ 79 | int updateByExampleSelective(@Param("record") BookAuthorInfo record, @Param("example") BookAuthorInfoExample example); 80 | 81 | /** 82 | * This method was generated by MyBatis Generator. 83 | * This method corresponds to the database table book_author_info 84 | * 85 | * @mbggenerated Sun May 19 11:22:56 CST 2013 86 | */ 87 | int updateByExampleWithBLOBs(@Param("record") BookAuthorInfo record, @Param("example") BookAuthorInfoExample example); 88 | 89 | /** 90 | * This method was generated by MyBatis Generator. 91 | * This method corresponds to the database table book_author_info 92 | * 93 | * @mbggenerated Sun May 19 11:22:56 CST 2013 94 | */ 95 | int updateByExample(@Param("record") BookAuthorInfo record, @Param("example") BookAuthorInfoExample example); 96 | 97 | /** 98 | * This method was generated by MyBatis Generator. 99 | * This method corresponds to the database table book_author_info 100 | * 101 | * @mbggenerated Sun May 19 11:22:56 CST 2013 102 | */ 103 | int updateByPrimaryKeySelective(BookAuthorInfo record); 104 | 105 | /** 106 | * This method was generated by MyBatis Generator. 107 | * This method corresponds to the database table book_author_info 108 | * 109 | * @mbggenerated Sun May 19 11:22:56 CST 2013 110 | */ 111 | int updateByPrimaryKeyWithBLOBs(BookAuthorInfo record); 112 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/dao/AuthorInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.dao; 2 | 3 | import cn.edu.ustb.dm.model.AuthorInfo; 4 | import cn.edu.ustb.dm.model.AuthorInfoExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface AuthorInfoMapper { 9 | /** 10 | * This method was generated by MyBatis Generator. 11 | * This method corresponds to the database table author_info 12 | * 13 | * @mbggenerated Sun May 19 11:22:56 CST 2013 14 | */ 15 | int countByExample(AuthorInfoExample example); 16 | 17 | /** 18 | * This method was generated by MyBatis Generator. 19 | * This method corresponds to the database table author_info 20 | * 21 | * @mbggenerated Sun May 19 11:22:56 CST 2013 22 | */ 23 | int deleteByExample(AuthorInfoExample example); 24 | 25 | /** 26 | * This method was generated by MyBatis Generator. 27 | * This method corresponds to the database table author_info 28 | * 29 | * @mbggenerated Sun May 19 11:22:56 CST 2013 30 | */ 31 | int deleteByPrimaryKey(Integer AUTHOR_ID); 32 | 33 | /** 34 | * This method was generated by MyBatis Generator. 35 | * This method corresponds to the database table author_info 36 | * 37 | * @mbggenerated Sun May 19 11:22:56 CST 2013 38 | */ 39 | int insert(AuthorInfo record); 40 | 41 | /** 42 | * This method was generated by MyBatis Generator. 43 | * This method corresponds to the database table author_info 44 | * 45 | * @mbggenerated Sun May 19 11:22:56 CST 2013 46 | */ 47 | int insertSelective(AuthorInfo record); 48 | 49 | /** 50 | * This method was generated by MyBatis Generator. 51 | * This method corresponds to the database table author_info 52 | * 53 | * @mbggenerated Sun May 19 11:22:56 CST 2013 54 | */ 55 | List selectByExampleWithBLOBs(AuthorInfoExample example); 56 | 57 | /** 58 | * This method was generated by MyBatis Generator. 59 | * This method corresponds to the database table author_info 60 | * 61 | * @mbggenerated Sun May 19 11:22:56 CST 2013 62 | */ 63 | List selectByExample(AuthorInfoExample example); 64 | 65 | /** 66 | * This method was generated by MyBatis Generator. 67 | * This method corresponds to the database table author_info 68 | * 69 | * @mbggenerated Sun May 19 11:22:56 CST 2013 70 | */ 71 | AuthorInfo selectByPrimaryKey(Integer AUTHOR_ID); 72 | 73 | /** 74 | * This method was generated by MyBatis Generator. 75 | * This method corresponds to the database table author_info 76 | * 77 | * @mbggenerated Sun May 19 11:22:56 CST 2013 78 | */ 79 | int updateByExampleSelective(@Param("record") AuthorInfo record, @Param("example") AuthorInfoExample example); 80 | 81 | /** 82 | * This method was generated by MyBatis Generator. 83 | * This method corresponds to the database table author_info 84 | * 85 | * @mbggenerated Sun May 19 11:22:56 CST 2013 86 | */ 87 | int updateByExampleWithBLOBs(@Param("record") AuthorInfo record, @Param("example") AuthorInfoExample example); 88 | 89 | /** 90 | * This method was generated by MyBatis Generator. 91 | * This method corresponds to the database table author_info 92 | * 93 | * @mbggenerated Sun May 19 11:22:56 CST 2013 94 | */ 95 | int updateByExample(@Param("record") AuthorInfo record, @Param("example") AuthorInfoExample example); 96 | 97 | /** 98 | * This method was generated by MyBatis Generator. 99 | * This method corresponds to the database table author_info 100 | * 101 | * @mbggenerated Sun May 19 11:22:56 CST 2013 102 | */ 103 | int updateByPrimaryKeySelective(AuthorInfo record); 104 | 105 | /** 106 | * This method was generated by MyBatis Generator. 107 | * This method corresponds to the database table author_info 108 | * 109 | * @mbggenerated Sun May 19 11:22:56 CST 2013 110 | */ 111 | int updateByPrimaryKeyWithBLOBs(AuthorInfo record); 112 | 113 | /** 114 | * This method was generated by MyBatis Generator. 115 | * This method corresponds to the database table author_info 116 | * 117 | * @mbggenerated Sun May 19 11:22:56 CST 2013 118 | */ 119 | int updateByPrimaryKey(AuthorInfo record); 120 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/dao/BookInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.dao; 2 | 3 | import cn.edu.ustb.dm.model.BookInfo; 4 | import cn.edu.ustb.dm.model.BookInfoExample; 5 | import cn.edu.ustb.dm.model.BookInfoWithBLOBs; 6 | import java.util.List; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | public interface BookInfoMapper { 10 | /** 11 | * This method was generated by MyBatis Generator. 12 | * This method corresponds to the database table book_info 13 | * 14 | * @mbggenerated Sun May 19 11:22:56 CST 2013 15 | */ 16 | int countByExample(BookInfoExample example); 17 | 18 | /** 19 | * This method was generated by MyBatis Generator. 20 | * This method corresponds to the database table book_info 21 | * 22 | * @mbggenerated Sun May 19 11:22:56 CST 2013 23 | */ 24 | int deleteByExample(BookInfoExample example); 25 | 26 | /** 27 | * This method was generated by MyBatis Generator. 28 | * This method corresponds to the database table book_info 29 | * 30 | * @mbggenerated Sun May 19 11:22:56 CST 2013 31 | */ 32 | int deleteByPrimaryKey(Integer BOOK_ID); 33 | 34 | /** 35 | * This method was generated by MyBatis Generator. 36 | * This method corresponds to the database table book_info 37 | * 38 | * @mbggenerated Sun May 19 11:22:56 CST 2013 39 | */ 40 | int insert(BookInfoWithBLOBs record); 41 | 42 | /** 43 | * This method was generated by MyBatis Generator. 44 | * This method corresponds to the database table book_info 45 | * 46 | * @mbggenerated Sun May 19 11:22:56 CST 2013 47 | */ 48 | int insertSelective(BookInfoWithBLOBs record); 49 | 50 | /** 51 | * This method was generated by MyBatis Generator. 52 | * This method corresponds to the database table book_info 53 | * 54 | * @mbggenerated Sun May 19 11:22:56 CST 2013 55 | */ 56 | List selectByExampleWithBLOBs(BookInfoExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table book_info 61 | * 62 | * @mbggenerated Sun May 19 11:22:56 CST 2013 63 | */ 64 | List selectByExample(BookInfoExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table book_info 69 | * 70 | * @mbggenerated Sun May 19 11:22:56 CST 2013 71 | */ 72 | BookInfoWithBLOBs selectByPrimaryKey(Integer BOOK_ID); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table book_info 77 | * 78 | * @mbggenerated Sun May 19 11:22:56 CST 2013 79 | */ 80 | int updateByExampleSelective(@Param("record") BookInfoWithBLOBs record, @Param("example") BookInfoExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table book_info 85 | * 86 | * @mbggenerated Sun May 19 11:22:56 CST 2013 87 | */ 88 | int updateByExampleWithBLOBs(@Param("record") BookInfoWithBLOBs record, @Param("example") BookInfoExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table book_info 93 | * 94 | * @mbggenerated Sun May 19 11:22:56 CST 2013 95 | */ 96 | int updateByExample(@Param("record") BookInfo record, @Param("example") BookInfoExample example); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table book_info 101 | * 102 | * @mbggenerated Sun May 19 11:22:56 CST 2013 103 | */ 104 | int updateByPrimaryKeySelective(BookInfoWithBLOBs record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table book_info 109 | * 110 | * @mbggenerated Sun May 19 11:22:56 CST 2013 111 | */ 112 | int updateByPrimaryKeyWithBLOBs(BookInfoWithBLOBs record); 113 | 114 | /** 115 | * This method was generated by MyBatis Generator. 116 | * This method corresponds to the database table book_info 117 | * 118 | * @mbggenerated Sun May 19 11:22:56 CST 2013 119 | */ 120 | int updateByPrimaryKey(BookInfo record); 121 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/AuthorInfo.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class AuthorInfo { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column author_info.AUTHOR_ID 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private Integer AUTHOR_ID; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column author_info.AUTHOR_NAME 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private String AUTHOR_NAME; 19 | 20 | /** 21 | * This field was generated by MyBatis Generator. 22 | * This field corresponds to the database column author_info.NATIONALITY_ID 23 | * 24 | * @mbggenerated Sun May 19 11:22:56 CST 2013 25 | */ 26 | private Integer NATIONALITY_ID; 27 | 28 | /** 29 | * This field was generated by MyBatis Generator. 30 | * This field corresponds to the database column author_info.INTRODUCTION 31 | * 32 | * @mbggenerated Sun May 19 11:22:56 CST 2013 33 | */ 34 | private String INTRODUCTION; 35 | 36 | /** 37 | * This method was generated by MyBatis Generator. 38 | * This method returns the value of the database column author_info.AUTHOR_ID 39 | * 40 | * @return the value of author_info.AUTHOR_ID 41 | * 42 | * @mbggenerated Sun May 19 11:22:56 CST 2013 43 | */ 44 | public Integer getAUTHOR_ID() { 45 | return AUTHOR_ID; 46 | } 47 | 48 | /** 49 | * This method was generated by MyBatis Generator. 50 | * This method sets the value of the database column author_info.AUTHOR_ID 51 | * 52 | * @param AUTHOR_ID the value for author_info.AUTHOR_ID 53 | * 54 | * @mbggenerated Sun May 19 11:22:56 CST 2013 55 | */ 56 | public void setAUTHOR_ID(Integer AUTHOR_ID) { 57 | this.AUTHOR_ID = AUTHOR_ID; 58 | } 59 | 60 | /** 61 | * This method was generated by MyBatis Generator. 62 | * This method returns the value of the database column author_info.AUTHOR_NAME 63 | * 64 | * @return the value of author_info.AUTHOR_NAME 65 | * 66 | * @mbggenerated Sun May 19 11:22:56 CST 2013 67 | */ 68 | public String getAUTHOR_NAME() { 69 | return AUTHOR_NAME; 70 | } 71 | 72 | /** 73 | * This method was generated by MyBatis Generator. 74 | * This method sets the value of the database column author_info.AUTHOR_NAME 75 | * 76 | * @param AUTHOR_NAME the value for author_info.AUTHOR_NAME 77 | * 78 | * @mbggenerated Sun May 19 11:22:56 CST 2013 79 | */ 80 | public void setAUTHOR_NAME(String AUTHOR_NAME) { 81 | this.AUTHOR_NAME = AUTHOR_NAME == null ? null : AUTHOR_NAME.trim(); 82 | } 83 | 84 | /** 85 | * This method was generated by MyBatis Generator. 86 | * This method returns the value of the database column author_info.NATIONALITY_ID 87 | * 88 | * @return the value of author_info.NATIONALITY_ID 89 | * 90 | * @mbggenerated Sun May 19 11:22:56 CST 2013 91 | */ 92 | public Integer getNATIONALITY_ID() { 93 | return NATIONALITY_ID; 94 | } 95 | 96 | /** 97 | * This method was generated by MyBatis Generator. 98 | * This method sets the value of the database column author_info.NATIONALITY_ID 99 | * 100 | * @param NATIONALITY_ID the value for author_info.NATIONALITY_ID 101 | * 102 | * @mbggenerated Sun May 19 11:22:56 CST 2013 103 | */ 104 | public void setNATIONALITY_ID(Integer NATIONALITY_ID) { 105 | this.NATIONALITY_ID = NATIONALITY_ID; 106 | } 107 | 108 | /** 109 | * This method was generated by MyBatis Generator. 110 | * This method returns the value of the database column author_info.INTRODUCTION 111 | * 112 | * @return the value of author_info.INTRODUCTION 113 | * 114 | * @mbggenerated Sun May 19 11:22:56 CST 2013 115 | */ 116 | public String getINTRODUCTION() { 117 | return INTRODUCTION; 118 | } 119 | 120 | /** 121 | * This method was generated by MyBatis Generator. 122 | * This method sets the value of the database column author_info.INTRODUCTION 123 | * 124 | * @param INTRODUCTION the value for author_info.INTRODUCTION 125 | * 126 | * @mbggenerated Sun May 19 11:22:56 CST 2013 127 | */ 128 | public void setINTRODUCTION(String INTRODUCTION) { 129 | this.INTRODUCTION = INTRODUCTION == null ? null : INTRODUCTION.trim(); 130 | } 131 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/BookAuthorInfo.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class BookAuthorInfo { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column book_author_info.book_id 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private Integer book_id; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column book_author_info.author_name 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private String author_name; 19 | 20 | /** 21 | * This field was generated by MyBatis Generator. 22 | * This field corresponds to the database column book_author_info.introduction 23 | * 24 | * @mbggenerated Sun May 19 11:22:56 CST 2013 25 | */ 26 | private String introduction; 27 | 28 | /** 29 | * This field was generated by MyBatis Generator. 30 | * This field corresponds to the database column book_author_info.content 31 | * 32 | * @mbggenerated Sun May 19 11:22:56 CST 2013 33 | */ 34 | private String content; 35 | 36 | /** 37 | * This method was generated by MyBatis Generator. 38 | * This method returns the value of the database column book_author_info.book_id 39 | * 40 | * @return the value of book_author_info.book_id 41 | * 42 | * @mbggenerated Sun May 19 11:22:56 CST 2013 43 | */ 44 | public Integer getBook_id() { 45 | return book_id; 46 | } 47 | 48 | /** 49 | * This method was generated by MyBatis Generator. 50 | * This method sets the value of the database column book_author_info.book_id 51 | * 52 | * @param book_id the value for book_author_info.book_id 53 | * 54 | * @mbggenerated Sun May 19 11:22:56 CST 2013 55 | */ 56 | public void setBook_id(Integer book_id) { 57 | this.book_id = book_id; 58 | } 59 | 60 | /** 61 | * This method was generated by MyBatis Generator. 62 | * This method returns the value of the database column book_author_info.author_name 63 | * 64 | * @return the value of book_author_info.author_name 65 | * 66 | * @mbggenerated Sun May 19 11:22:56 CST 2013 67 | */ 68 | public String getAuthor_name() { 69 | return author_name; 70 | } 71 | 72 | /** 73 | * This method was generated by MyBatis Generator. 74 | * This method sets the value of the database column book_author_info.author_name 75 | * 76 | * @param author_name the value for book_author_info.author_name 77 | * 78 | * @mbggenerated Sun May 19 11:22:56 CST 2013 79 | */ 80 | public void setAuthor_name(String author_name) { 81 | this.author_name = author_name == null ? null : author_name.trim(); 82 | } 83 | 84 | /** 85 | * This method was generated by MyBatis Generator. 86 | * This method returns the value of the database column book_author_info.introduction 87 | * 88 | * @return the value of book_author_info.introduction 89 | * 90 | * @mbggenerated Sun May 19 11:22:56 CST 2013 91 | */ 92 | public String getIntroduction() { 93 | return introduction; 94 | } 95 | 96 | /** 97 | * This method was generated by MyBatis Generator. 98 | * This method sets the value of the database column book_author_info.introduction 99 | * 100 | * @param introduction the value for book_author_info.introduction 101 | * 102 | * @mbggenerated Sun May 19 11:22:56 CST 2013 103 | */ 104 | public void setIntroduction(String introduction) { 105 | this.introduction = introduction == null ? null : introduction.trim(); 106 | } 107 | 108 | /** 109 | * This method was generated by MyBatis Generator. 110 | * This method returns the value of the database column book_author_info.content 111 | * 112 | * @return the value of book_author_info.content 113 | * 114 | * @mbggenerated Sun May 19 11:22:56 CST 2013 115 | */ 116 | public String getContent() { 117 | return content; 118 | } 119 | 120 | /** 121 | * This method was generated by MyBatis Generator. 122 | * This method sets the value of the database column book_author_info.content 123 | * 124 | * @param content the value for book_author_info.content 125 | * 126 | * @mbggenerated Sun May 19 11:22:56 CST 2013 127 | */ 128 | public void setContent(String content) { 129 | this.content = content == null ? null : content.trim(); 130 | } 131 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/dao/BookOnlineInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.dao; 2 | 3 | import cn.edu.ustb.dm.model.BookOnlineInfo; 4 | import cn.edu.ustb.dm.model.BookOnlineInfoExample; 5 | import cn.edu.ustb.dm.model.BookOnlineInfoWithBLOBs; 6 | import java.util.List; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | public interface BookOnlineInfoMapper { 10 | /** 11 | * This method was generated by MyBatis Generator. 12 | * This method corresponds to the database table book_online_info 13 | * 14 | * @mbggenerated Sun May 19 11:22:56 CST 2013 15 | */ 16 | int countByExample(BookOnlineInfoExample example); 17 | 18 | /** 19 | * This method was generated by MyBatis Generator. 20 | * This method corresponds to the database table book_online_info 21 | * 22 | * @mbggenerated Sun May 19 11:22:56 CST 2013 23 | */ 24 | int deleteByExample(BookOnlineInfoExample example); 25 | 26 | /** 27 | * This method was generated by MyBatis Generator. 28 | * This method corresponds to the database table book_online_info 29 | * 30 | * @mbggenerated Sun May 19 11:22:56 CST 2013 31 | */ 32 | int deleteByPrimaryKey(Integer book_id); 33 | 34 | /** 35 | * This method was generated by MyBatis Generator. 36 | * This method corresponds to the database table book_online_info 37 | * 38 | * @mbggenerated Sun May 19 11:22:56 CST 2013 39 | */ 40 | int insert(BookOnlineInfoWithBLOBs record); 41 | 42 | /** 43 | * This method was generated by MyBatis Generator. 44 | * This method corresponds to the database table book_online_info 45 | * 46 | * @mbggenerated Sun May 19 11:22:56 CST 2013 47 | */ 48 | int insertSelective(BookOnlineInfoWithBLOBs record); 49 | 50 | /** 51 | * This method was generated by MyBatis Generator. 52 | * This method corresponds to the database table book_online_info 53 | * 54 | * @mbggenerated Sun May 19 11:22:56 CST 2013 55 | */ 56 | List selectByExampleWithBLOBs(BookOnlineInfoExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table book_online_info 61 | * 62 | * @mbggenerated Sun May 19 11:22:56 CST 2013 63 | */ 64 | List selectByExample(BookOnlineInfoExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table book_online_info 69 | * 70 | * @mbggenerated Sun May 19 11:22:56 CST 2013 71 | */ 72 | BookOnlineInfoWithBLOBs selectByPrimaryKey(Integer book_id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table book_online_info 77 | * 78 | * @mbggenerated Sun May 19 11:22:56 CST 2013 79 | */ 80 | int updateByExampleSelective(@Param("record") BookOnlineInfoWithBLOBs record, @Param("example") BookOnlineInfoExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table book_online_info 85 | * 86 | * @mbggenerated Sun May 19 11:22:56 CST 2013 87 | */ 88 | int updateByExampleWithBLOBs(@Param("record") BookOnlineInfoWithBLOBs record, @Param("example") BookOnlineInfoExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table book_online_info 93 | * 94 | * @mbggenerated Sun May 19 11:22:56 CST 2013 95 | */ 96 | int updateByExample(@Param("record") BookOnlineInfo record, @Param("example") BookOnlineInfoExample example); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table book_online_info 101 | * 102 | * @mbggenerated Sun May 19 11:22:56 CST 2013 103 | */ 104 | int updateByPrimaryKeySelective(BookOnlineInfoWithBLOBs record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table book_online_info 109 | * 110 | * @mbggenerated Sun May 19 11:22:56 CST 2013 111 | */ 112 | int updateByPrimaryKeyWithBLOBs(BookOnlineInfoWithBLOBs record); 113 | 114 | /** 115 | * This method was generated by MyBatis Generator. 116 | * This method corresponds to the database table book_online_info 117 | * 118 | * @mbggenerated Sun May 19 11:22:56 CST 2013 119 | */ 120 | int updateByPrimaryKey(BookOnlineInfo record); 121 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/BookPublishingInfoWithBLOBs.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class BookPublishingInfoWithBLOBs extends BookPublishingInfo { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column book_publishing_info.title 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private String title; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column book_publishing_info.auther_name 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private String auther_name; 19 | 20 | /** 21 | * This field was generated by MyBatis Generator. 22 | * This field corresponds to the database column book_publishing_info.description 23 | * 24 | * @mbggenerated Sun May 19 11:22:56 CST 2013 25 | */ 26 | private String description; 27 | 28 | /** 29 | * This field was generated by MyBatis Generator. 30 | * This field corresponds to the database column book_publishing_info.directory 31 | * 32 | * @mbggenerated Sun May 19 11:22:56 CST 2013 33 | */ 34 | private String directory; 35 | 36 | /** 37 | * This method was generated by MyBatis Generator. 38 | * This method returns the value of the database column book_publishing_info.title 39 | * 40 | * @return the value of book_publishing_info.title 41 | * 42 | * @mbggenerated Sun May 19 11:22:56 CST 2013 43 | */ 44 | public String getTitle() { 45 | return title; 46 | } 47 | 48 | /** 49 | * This method was generated by MyBatis Generator. 50 | * This method sets the value of the database column book_publishing_info.title 51 | * 52 | * @param title the value for book_publishing_info.title 53 | * 54 | * @mbggenerated Sun May 19 11:22:56 CST 2013 55 | */ 56 | public void setTitle(String title) { 57 | this.title = title == null ? null : title.trim(); 58 | } 59 | 60 | /** 61 | * This method was generated by MyBatis Generator. 62 | * This method returns the value of the database column book_publishing_info.auther_name 63 | * 64 | * @return the value of book_publishing_info.auther_name 65 | * 66 | * @mbggenerated Sun May 19 11:22:56 CST 2013 67 | */ 68 | public String getAuther_name() { 69 | return auther_name; 70 | } 71 | 72 | /** 73 | * This method was generated by MyBatis Generator. 74 | * This method sets the value of the database column book_publishing_info.auther_name 75 | * 76 | * @param auther_name the value for book_publishing_info.auther_name 77 | * 78 | * @mbggenerated Sun May 19 11:22:56 CST 2013 79 | */ 80 | public void setAuther_name(String auther_name) { 81 | this.auther_name = auther_name == null ? null : auther_name.trim(); 82 | } 83 | 84 | /** 85 | * This method was generated by MyBatis Generator. 86 | * This method returns the value of the database column book_publishing_info.description 87 | * 88 | * @return the value of book_publishing_info.description 89 | * 90 | * @mbggenerated Sun May 19 11:22:56 CST 2013 91 | */ 92 | public String getDescription() { 93 | return description; 94 | } 95 | 96 | /** 97 | * This method was generated by MyBatis Generator. 98 | * This method sets the value of the database column book_publishing_info.description 99 | * 100 | * @param description the value for book_publishing_info.description 101 | * 102 | * @mbggenerated Sun May 19 11:22:56 CST 2013 103 | */ 104 | public void setDescription(String description) { 105 | this.description = description == null ? null : description.trim(); 106 | } 107 | 108 | /** 109 | * This method was generated by MyBatis Generator. 110 | * This method returns the value of the database column book_publishing_info.directory 111 | * 112 | * @return the value of book_publishing_info.directory 113 | * 114 | * @mbggenerated Sun May 19 11:22:56 CST 2013 115 | */ 116 | public String getDirectory() { 117 | return directory; 118 | } 119 | 120 | /** 121 | * This method was generated by MyBatis Generator. 122 | * This method sets the value of the database column book_publishing_info.directory 123 | * 124 | * @param directory the value for book_publishing_info.directory 125 | * 126 | * @mbggenerated Sun May 19 11:22:56 CST 2013 127 | */ 128 | public void setDirectory(String directory) { 129 | this.directory = directory == null ? null : directory.trim(); 130 | } 131 | } -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/dao/BookPublishingInfoMapper.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.dao; 2 | 3 | import cn.edu.ustb.dm.model.BookPublishingInfo; 4 | import cn.edu.ustb.dm.model.BookPublishingInfoExample; 5 | import cn.edu.ustb.dm.model.BookPublishingInfoWithBLOBs; 6 | import java.util.List; 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | public interface BookPublishingInfoMapper { 10 | /** 11 | * This method was generated by MyBatis Generator. 12 | * This method corresponds to the database table book_publishing_info 13 | * 14 | * @mbggenerated Sun May 19 11:22:56 CST 2013 15 | */ 16 | int countByExample(BookPublishingInfoExample example); 17 | 18 | /** 19 | * This method was generated by MyBatis Generator. 20 | * This method corresponds to the database table book_publishing_info 21 | * 22 | * @mbggenerated Sun May 19 11:22:56 CST 2013 23 | */ 24 | int deleteByExample(BookPublishingInfoExample example); 25 | 26 | /** 27 | * This method was generated by MyBatis Generator. 28 | * This method corresponds to the database table book_publishing_info 29 | * 30 | * @mbggenerated Sun May 19 11:22:56 CST 2013 31 | */ 32 | int deleteByPrimaryKey(Integer book_id); 33 | 34 | /** 35 | * This method was generated by MyBatis Generator. 36 | * This method corresponds to the database table book_publishing_info 37 | * 38 | * @mbggenerated Sun May 19 11:22:56 CST 2013 39 | */ 40 | int insert(BookPublishingInfoWithBLOBs record); 41 | 42 | /** 43 | * This method was generated by MyBatis Generator. 44 | * This method corresponds to the database table book_publishing_info 45 | * 46 | * @mbggenerated Sun May 19 11:22:56 CST 2013 47 | */ 48 | int insertSelective(BookPublishingInfoWithBLOBs record); 49 | 50 | /** 51 | * This method was generated by MyBatis Generator. 52 | * This method corresponds to the database table book_publishing_info 53 | * 54 | * @mbggenerated Sun May 19 11:22:56 CST 2013 55 | */ 56 | List selectByExampleWithBLOBs(BookPublishingInfoExample example); 57 | 58 | /** 59 | * This method was generated by MyBatis Generator. 60 | * This method corresponds to the database table book_publishing_info 61 | * 62 | * @mbggenerated Sun May 19 11:22:56 CST 2013 63 | */ 64 | List selectByExample(BookPublishingInfoExample example); 65 | 66 | /** 67 | * This method was generated by MyBatis Generator. 68 | * This method corresponds to the database table book_publishing_info 69 | * 70 | * @mbggenerated Sun May 19 11:22:56 CST 2013 71 | */ 72 | BookPublishingInfoWithBLOBs selectByPrimaryKey(Integer book_id); 73 | 74 | /** 75 | * This method was generated by MyBatis Generator. 76 | * This method corresponds to the database table book_publishing_info 77 | * 78 | * @mbggenerated Sun May 19 11:22:56 CST 2013 79 | */ 80 | int updateByExampleSelective(@Param("record") BookPublishingInfoWithBLOBs record, @Param("example") BookPublishingInfoExample example); 81 | 82 | /** 83 | * This method was generated by MyBatis Generator. 84 | * This method corresponds to the database table book_publishing_info 85 | * 86 | * @mbggenerated Sun May 19 11:22:56 CST 2013 87 | */ 88 | int updateByExampleWithBLOBs(@Param("record") BookPublishingInfoWithBLOBs record, @Param("example") BookPublishingInfoExample example); 89 | 90 | /** 91 | * This method was generated by MyBatis Generator. 92 | * This method corresponds to the database table book_publishing_info 93 | * 94 | * @mbggenerated Sun May 19 11:22:56 CST 2013 95 | */ 96 | int updateByExample(@Param("record") BookPublishingInfo record, @Param("example") BookPublishingInfoExample example); 97 | 98 | /** 99 | * This method was generated by MyBatis Generator. 100 | * This method corresponds to the database table book_publishing_info 101 | * 102 | * @mbggenerated Sun May 19 11:22:56 CST 2013 103 | */ 104 | int updateByPrimaryKeySelective(BookPublishingInfoWithBLOBs record); 105 | 106 | /** 107 | * This method was generated by MyBatis Generator. 108 | * This method corresponds to the database table book_publishing_info 109 | * 110 | * @mbggenerated Sun May 19 11:22:56 CST 2013 111 | */ 112 | int updateByPrimaryKeyWithBLOBs(BookPublishingInfoWithBLOBs record); 113 | 114 | /** 115 | * This method was generated by MyBatis Generator. 116 | * This method corresponds to the database table book_publishing_info 117 | * 118 | * @mbggenerated Sun May 19 11:22:56 CST 2013 119 | */ 120 | int updateByPrimaryKey(BookPublishingInfo record); 121 | } -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | cn.edu 6 | ustb 7 | DM 8 | war 9 | 1.0.0-BUILD-SNAPSHOT 10 | 11 | 1.6 12 | 3.2.2.RELEASE 13 | 1.6.10 14 | 1.6.6 15 | 16 | 17 | 18 | 19 | org.springframework 20 | spring-context 21 | ${org.springframework-version} 22 | 23 | 24 | 25 | commons-logging 26 | commons-logging 27 | 28 | 29 | 30 | 31 | org.springframework 32 | spring-webmvc 33 | ${org.springframework-version} 34 | 35 | 36 | org.springframework 37 | spring-jdbc 38 | ${org.springframework-version} 39 | 40 | 41 | 42 | 43 | org.aspectj 44 | aspectjrt 45 | ${org.aspectj-version} 46 | 47 | 48 | 49 | 50 | org.slf4j 51 | slf4j-api 52 | ${org.slf4j-version} 53 | 54 | 55 | org.slf4j 56 | jcl-over-slf4j 57 | ${org.slf4j-version} 58 | runtime 59 | 60 | 61 | org.slf4j 62 | slf4j-log4j12 63 | ${org.slf4j-version} 64 | runtime 65 | 66 | 67 | log4j 68 | log4j 69 | 1.2.15 70 | 71 | 72 | javax.mail 73 | mail 74 | 75 | 76 | javax.jms 77 | jms 78 | 79 | 80 | com.sun.jdmk 81 | jmxtools 82 | 83 | 84 | com.sun.jmx 85 | jmxri 86 | 87 | 88 | runtime 89 | 90 | 91 | 92 | 93 | javax.inject 94 | javax.inject 95 | 1 96 | 97 | 98 | 99 | 100 | javax.servlet 101 | servlet-api 102 | 2.5 103 | provided 104 | 105 | 106 | javax.servlet.jsp 107 | jsp-api 108 | 2.1 109 | provided 110 | 111 | 112 | javax.servlet 113 | jstl 114 | 1.2 115 | 116 | 117 | taglibs 118 | standard 119 | 1.1.2 120 | 121 | 122 | 123 | 124 | junit 125 | junit 126 | 4.7 127 | test 128 | 129 | 130 | 131 | 132 | org.mybatis 133 | mybatis 134 | 3.2.2 135 | 136 | 137 | org.mybatis 138 | mybatis-spring 139 | 1.2.0 140 | 141 | 142 | 143 | 144 | mysql 145 | mysql-connector-java 146 | 5.1.24 147 | 148 | 149 | 150 | 151 | 152 | maven-eclipse-plugin 153 | 2.9 154 | 155 | 156 | org.springframework.ide.eclipse.core.springnature 157 | 158 | 159 | org.springframework.ide.eclipse.core.springbuilder 160 | 161 | true 162 | true 163 | 164 | 165 | 166 | org.apache.maven.plugins 167 | maven-compiler-plugin 168 | 2.5.1 169 | 170 | 1.6 171 | 1.6 172 | -Xlint:all 173 | true 174 | true 175 | 176 | 177 | 178 | org.codehaus.mojo 179 | exec-maven-plugin 180 | 1.2.1 181 | 182 | org.test.int1.Main 183 | 184 | 185 | 186 | 187 | 188 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ include file="includes/header.jsp"%> 4 | 5 |
6 |
7 |
8 |

9 | 相关图书推荐 10 |

11 | 12 |
13 | 14 |
15 |
16 | 17 | 18 | 19 |
20 |
21 | ${item.title } 22 |
23 |
${item.author }
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | 33 |
34 |

35 | 分类热门图书 36 |

37 | 38 |
39 | 40 |
41 | 42 |
${item.tagName}
43 | 50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |

59 | 图书分类 60 |

61 |
62 |
63 |
64 | [文学] 65 | 小说 66 | 随笔 67 | 散文 68 | 日本文学 69 |
70 |
71 | 童话 72 | 诗歌 73 | 名著 74 | 港台 75 | (更多) 76 |
77 |
78 |
79 |
80 | [流行] 81 | 漫画 82 | 绘本 83 | 推理 84 | 青春 85 |
86 |
87 | 言情 88 | 科幻 89 | 武侠 90 | 奇幻 91 | (更多) 92 |
93 |
94 |
95 |
96 | [文化] 97 | 历史 98 | 哲学 99 | 传记 100 | 设计 101 |
102 |
103 | 建筑 104 | 电影 105 | 回忆录 106 | 音乐 107 | (更多) 108 |
109 |
110 |
111 |
112 | [生活] 113 | 旅行 114 | 励志 115 | 职场 116 | 美食 117 |
118 |
119 | 教育 120 | 灵修 121 | 健康 122 | 家居 123 | (更多) 124 |
125 |
126 |
127 |
128 | [经管] 129 | 经济学 130 | 管理 131 | 金融 132 | 商业 133 |
134 |
135 | 营销 136 | 理财 137 | 股票 138 | 企业史 139 | (更多) 140 |
141 |
142 |
143 |
144 | [科技] 145 | 科普 146 | 互联网 147 | 编程 148 | 交互设计 149 |
150 |
151 | 算法 152 | 通信 153 | 神经网络 154 | (更多) 155 |
156 |
157 |
158 |
159 |
160 |

161 | 图书排行 162 |

163 | 164 |
165 | 166 |
167 |
168 | 169 | 170 | 171 |
172 |
173 | ${item.title} 174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 | 183 | <%@ include file="includes/footer.jsp"%> -------------------------------------------------------------------------------- /.settings/org.springframework.ide.eclipse.beans.core.prefs: -------------------------------------------------------------------------------- 1 | #Mon Oct 18 12:37:52 EDT 2010 2 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.osgi.org/xmlns/blueprint/v1.0.0= 3 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/aop= 4 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/batch= 5 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/beans= 6 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/context= 7 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/faces= 8 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/flex= 9 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration= 10 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/file= 11 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/http= 12 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/httpinvoker= 13 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/ip= 14 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/jdbc= 15 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/jms= 16 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/jmx= 17 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/mail= 18 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/rmi= 19 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/security= 20 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/stream= 21 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/ws= 22 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/xml= 23 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/jdbc= 24 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/jee= 25 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/jms= 26 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/lang= 27 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/mvc= 28 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/osgi= 29 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/osgi-compendium= 30 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/oxm= 31 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/p= 32 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/security= 33 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/task= 34 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/tx= 35 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/util= 36 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/web-services= 37 | //org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/webflow-config= 38 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.osgi.org/xmlns/blueprint/v1.0.0=bp 39 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/aop=aop 40 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/batch=batch 41 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/beans=beans 42 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/context=context 43 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/faces=faces 44 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/flex=flex 45 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration=int 46 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/file=int-file 47 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/http=int-http 48 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/httpinvoker=int-httpinvoker 49 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/ip=int-ip 50 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/jdbc=int-jdbc 51 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/jms=int-jms 52 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/jmx=int-jmx 53 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/mail=int-mail 54 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/rmi=int-rmi 55 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/security=int-security 56 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/stream=int-stream 57 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/ws=int-ws 58 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/xml=int-xml 59 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/jdbc=jdbc 60 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/jee=jee 61 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/jms=jms 62 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/lang=lang 63 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/mvc=mvc 64 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/osgi=osgi 65 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/osgi-compendium=osgix 66 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/oxm=oxm 67 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/p=p 68 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/security=sec 69 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/task=task 70 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/tx=tx 71 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/util=util 72 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/web-services=ws 73 | //org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/webflow-config=flow 74 | eclipse.preferences.version=1 75 | org.springframework.ide.eclipse.beans.core.default.version.check.classpath=true 76 | org.springframework.ide.eclipse.beans.core.enable.project.preferences=false 77 | org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false 78 | org.springframework.ide.eclipse.beans.core.loadNamespaceHandlerFromClasspath=false 79 | -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.controller; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | import java.util.Locale; 8 | import java.util.Properties; 9 | 10 | import javax.annotation.Resource; 11 | 12 | import org.apache.ibatis.session.SqlSession; 13 | import org.apache.ibatis.session.SqlSessionFactory; 14 | import org.slf4j.Logger; 15 | import org.slf4j.LoggerFactory; 16 | import org.springframework.stereotype.Controller; 17 | import org.springframework.ui.Model; 18 | import org.springframework.web.bind.annotation.RequestMapping; 19 | import org.springframework.web.bind.annotation.RequestMethod; 20 | 21 | import cn.edu.ustb.dm.dao.BookInfoMapper; 22 | import cn.edu.ustb.dm.dao.BookPublishingInfoMapper; 23 | import cn.edu.ustb.dm.dao.BookTagRelationMapper; 24 | import cn.edu.ustb.dm.dao.TagInfoMapper; 25 | import cn.edu.ustb.dm.model.BookInfo; 26 | import cn.edu.ustb.dm.model.BookInfoExample; 27 | import cn.edu.ustb.dm.model.BookPublishingInfoExample; 28 | import cn.edu.ustb.dm.model.BookPublishingInfoWithBLOBs; 29 | import cn.edu.ustb.dm.model.BookTagRelation; 30 | import cn.edu.ustb.dm.model.BookTagRelationExample; 31 | import cn.edu.ustb.dm.model.TagInfo; 32 | import cn.edu.ustb.dm.model.TagInfoExample; 33 | import cn.edu.ustb.model.BookListItemModel; 34 | import cn.edu.ustb.model.BookClassifyItemModel; 35 | 36 | @Controller 37 | public class IndexController { 38 | @Resource 39 | private SqlSessionFactory sqlSessionFactory; 40 | 41 | private static final Logger logger = LoggerFactory.getLogger(IndexController.class); 42 | private Properties properties; 43 | private SqlSession session; 44 | private BookInfoMapper bookInfoMapper; 45 | private BookPublishingInfoMapper bookPublishingMapper; 46 | private TagInfoMapper tagInfoMapper; 47 | private BookTagRelationMapper bookTagRelationMapper; 48 | private List bookRecommendList; 49 | private List bookRecommendClassifyList; 50 | private List bookRankList; 51 | 52 | private Properties getProperties() { 53 | if(properties == null) { 54 | properties = new Properties(); 55 | try { 56 | InputStream in = getClass().getResourceAsStream("/Web.properties"); 57 | properties.load(in); 58 | } catch (IOException e) { 59 | e.printStackTrace(); 60 | } 61 | } 62 | return properties; 63 | } 64 | private BookInfoMapper getBookInfoMapper() { 65 | if(bookInfoMapper == null) { 66 | bookInfoMapper = session.getMapper(BookInfoMapper.class); 67 | } 68 | return bookInfoMapper; 69 | } 70 | private BookPublishingInfoMapper getBookPublishingMapper() { 71 | if(bookPublishingMapper == null) { 72 | bookPublishingMapper = session.getMapper(BookPublishingInfoMapper.class); 73 | } 74 | return bookPublishingMapper; 75 | } 76 | private TagInfoMapper getTagInfoMapper() { 77 | if(tagInfoMapper == null) { 78 | tagInfoMapper = session.getMapper(TagInfoMapper.class); 79 | } 80 | return tagInfoMapper; 81 | } 82 | private BookTagRelationMapper getBookTagRelationMapper() { 83 | if(bookTagRelationMapper == null) { 84 | bookTagRelationMapper = session.getMapper(BookTagRelationMapper.class); 85 | } 86 | return bookTagRelationMapper; 87 | } 88 | private List getBookRecommendList() { 89 | if(bookRecommendList == null) { 90 | bookRecommendList = new ArrayList(6); 91 | BookInfoExample infoExample = new BookInfoExample(); 92 | infoExample.setOrderByClause("NUMBER_TOREAD DESC limit 30"); 93 | infoExample.or().andTITLE_PAGE_IMAGESIsNotNull(); 94 | List bookInfoList = getBookInfoMapper().selectByExample(infoExample); 95 | int i=0; 96 | for(BookInfo bookInfo : bookInfoList) { 97 | logger.info("bookInfo i = " + i); 98 | if(bookInfo.getTITLE_PAGE_IMAGES().trim().length() != 0) { 99 | if(i<6) 100 | i++; 101 | else 102 | break; 103 | logger.info("bookInfo with image i = " + i); 104 | BookListItemModel item = new BookListItemModel(); 105 | item.setId(bookInfo.getBOOK_ID()); 106 | item.setImageSrc(getProperties().getProperty("book_mpic") + bookInfo.getTITLE_PAGE_IMAGES()); 107 | item.setTitle(bookInfo.getTITLE()); 108 | BookPublishingInfoExample publishingExample = new BookPublishingInfoExample(); 109 | publishingExample.or().andBook_idEqualTo(bookInfo.getBOOK_ID()); 110 | List bookPublishingList = 111 | getBookPublishingMapper().selectByExampleWithBLOBs(publishingExample); 112 | item.setAuthor(bookPublishingList.get(0).getAuther_name()); 113 | item.setStar(bookInfo.getNUMBER_STAR1(), bookInfo.getNUMBER_STAR2(), 114 | bookInfo.getNUMBER_STAR3(), bookInfo.getNUMBER_STAR4(), 115 | bookInfo.getNUMBER_STAR5()); 116 | bookRecommendList.add(item); 117 | } 118 | } 119 | } 120 | return bookRecommendList; 121 | } 122 | private List getBookRecommendClassifyList() { 123 | if(bookRecommendClassifyList == null) { 124 | bookRecommendClassifyList = new ArrayList(12); 125 | TagInfoExample tagExample = new TagInfoExample(); 126 | tagExample.setOrderByClause("COUNT DESC limit 12"); 127 | List tagInfoList = this.getTagInfoMapper().selectByExample(tagExample); 128 | for(int i=0; i<12&&i relationList = 135 | getBookTagRelationMapper().selectByExample(relationExample); 136 | List titleList = new ArrayList(2); 137 | int j = 0; 138 | for(BookTagRelation relation : relationList) { 139 | BookInfoExample bookExample = new BookInfoExample(); 140 | bookExample.or().andBOOK_IDEqualTo(relation.getBOOK_ID()); 141 | List bookList = getBookInfoMapper().selectByExample(bookExample); 142 | if(bookList.size() > 0) { 143 | BookInfo bookInfo = bookList.get(0); 144 | if(bookInfo.getTITLE_PAGE_IMAGES() != null && 145 | bookInfo.getTITLE_PAGE_IMAGES().trim().length() != 0) { 146 | if(j<2) 147 | j++; 148 | else 149 | break; 150 | if(j == 1) 151 | item.setImageSrc(getProperties().getProperty("book_mpic") 152 | + bookInfo.getTITLE_PAGE_IMAGES()); 153 | BookClassifyItemModel.TitleList title = item.createTitleList(); 154 | title.setId(bookInfo.getBOOK_ID()); 155 | title.setTitle(bookInfo.getTITLE()); 156 | titleList.add(title); 157 | } 158 | } 159 | } 160 | item.setTitleList(titleList); 161 | bookRecommendClassifyList.add(item); 162 | } 163 | } 164 | return bookRecommendClassifyList; 165 | } 166 | private List getBookRankList() { 167 | if(bookRankList == null) { 168 | bookRankList = new ArrayList(16); 169 | BookInfoExample example = new BookInfoExample(); 170 | example.setOrderByClause("NUMBER_REVIEW DESC limit 40"); 171 | example.or().andTITLE_PAGE_IMAGESIsNotNull(); 172 | List bookList = getBookInfoMapper().selectByExample(example); 173 | int i = 0; 174 | for(BookInfo bookInfo : bookList) { 175 | if(bookInfo.getTITLE_PAGE_IMAGES().trim().length() != 0) { 176 | if(i<16) 177 | i++; 178 | else 179 | break; 180 | BookListItemModel item = new BookListItemModel(); 181 | item.setId(bookInfo.getBOOK_ID()); 182 | item.setImageSrc(getProperties().getProperty("book_mpic") 183 | + bookInfo.getTITLE_PAGE_IMAGES()); 184 | item.setTitle(bookInfo.getTITLE()); 185 | bookRankList.add(item); 186 | } 187 | } 188 | } 189 | return bookRankList; 190 | } 191 | 192 | @RequestMapping(value="/", method = RequestMethod.GET) 193 | public String index(Locale locale, Model model){ 194 | session = sqlSessionFactory.openSession(); 195 | try { 196 | model.addAttribute("bookRecommendList", getBookRecommendList()); 197 | model.addAttribute("bookRecommendClassifyList", getBookRecommendClassifyList()); 198 | model.addAttribute("bookRankList", getBookRankList()); 199 | session.commit(); 200 | } finally { 201 | session.close(); 202 | } 203 | return "index"; 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /src/main/resources/cn/edu/ustb/dm/map/BookTagRelationMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | and ${criterion.condition} 28 | 29 | 30 | and ${criterion.condition} #{criterion.value} 31 | 32 | 33 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 34 | 35 | 36 | and ${criterion.condition} 37 | 38 | #{listItem} 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | and ${criterion.condition} 62 | 63 | 64 | and ${criterion.condition} #{criterion.value} 65 | 66 | 67 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 68 | 69 | 70 | and ${criterion.condition} 71 | 72 | #{listItem} 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 88 | BOOK_ID, TAG_ID, USEAGE_NUM 89 | 90 | 109 | 110 | 115 | delete from book_tag_relation 116 | 117 | 118 | 119 | 120 | 121 | 126 | insert into book_tag_relation (BOOK_ID, TAG_ID, USEAGE_NUM 127 | ) 128 | values (#{BOOK_ID,jdbcType=INTEGER}, #{TAG_ID,jdbcType=INTEGER}, #{USEAGE_NUM,jdbcType=INTEGER} 129 | ) 130 | 131 | 132 | 137 | insert into book_tag_relation 138 | 139 | 140 | BOOK_ID, 141 | 142 | 143 | TAG_ID, 144 | 145 | 146 | USEAGE_NUM, 147 | 148 | 149 | 150 | 151 | #{BOOK_ID,jdbcType=INTEGER}, 152 | 153 | 154 | #{TAG_ID,jdbcType=INTEGER}, 155 | 156 | 157 | #{USEAGE_NUM,jdbcType=INTEGER}, 158 | 159 | 160 | 161 | 172 | 173 | 178 | update book_tag_relation 179 | 180 | 181 | BOOK_ID = #{record.BOOK_ID,jdbcType=INTEGER}, 182 | 183 | 184 | TAG_ID = #{record.TAG_ID,jdbcType=INTEGER}, 185 | 186 | 187 | USEAGE_NUM = #{record.USEAGE_NUM,jdbcType=INTEGER}, 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 200 | update book_tag_relation 201 | set BOOK_ID = #{record.BOOK_ID,jdbcType=INTEGER}, 202 | TAG_ID = #{record.TAG_ID,jdbcType=INTEGER}, 203 | USEAGE_NUM = #{record.USEAGE_NUM,jdbcType=INTEGER} 204 | 205 | 206 | 207 | 208 | -------------------------------------------------------------------------------- /src/main/resources/cn/edu/ustb/dm/map/BookAuthorRelationMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | and ${criterion.condition} 28 | 29 | 30 | and ${criterion.condition} #{criterion.value} 31 | 32 | 33 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 34 | 35 | 36 | and ${criterion.condition} 37 | 38 | #{listItem} 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | and ${criterion.condition} 62 | 63 | 64 | and ${criterion.condition} #{criterion.value} 65 | 66 | 67 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 68 | 69 | 70 | and ${criterion.condition} 71 | 72 | #{listItem} 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 88 | BOOK_ID, AUTHOR_ID, AUTHOR_TYPE_ID 89 | 90 | 109 | 110 | 115 | delete from book_author_relation 116 | 117 | 118 | 119 | 120 | 121 | 126 | insert into book_author_relation (BOOK_ID, AUTHOR_ID, AUTHOR_TYPE_ID 127 | ) 128 | values (#{BOOK_ID,jdbcType=INTEGER}, #{AUTHOR_ID,jdbcType=INTEGER}, #{AUTHOR_TYPE_ID,jdbcType=INTEGER} 129 | ) 130 | 131 | 132 | 137 | insert into book_author_relation 138 | 139 | 140 | BOOK_ID, 141 | 142 | 143 | AUTHOR_ID, 144 | 145 | 146 | AUTHOR_TYPE_ID, 147 | 148 | 149 | 150 | 151 | #{BOOK_ID,jdbcType=INTEGER}, 152 | 153 | 154 | #{AUTHOR_ID,jdbcType=INTEGER}, 155 | 156 | 157 | #{AUTHOR_TYPE_ID,jdbcType=INTEGER}, 158 | 159 | 160 | 161 | 172 | 173 | 178 | update book_author_relation 179 | 180 | 181 | BOOK_ID = #{record.BOOK_ID,jdbcType=INTEGER}, 182 | 183 | 184 | AUTHOR_ID = #{record.AUTHOR_ID,jdbcType=INTEGER}, 185 | 186 | 187 | AUTHOR_TYPE_ID = #{record.AUTHOR_TYPE_ID,jdbcType=INTEGER}, 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 200 | update book_author_relation 201 | set BOOK_ID = #{record.BOOK_ID,jdbcType=INTEGER}, 202 | AUTHOR_ID = #{record.AUTHOR_ID,jdbcType=INTEGER}, 203 | AUTHOR_TYPE_ID = #{record.AUTHOR_TYPE_ID,jdbcType=INTEGER} 204 | 205 | 206 | 207 | 208 | -------------------------------------------------------------------------------- /src/main/resources/cn/edu/ustb/dm/map/BookRelationMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | and ${criterion.condition} 28 | 29 | 30 | and ${criterion.condition} #{criterion.value} 31 | 32 | 33 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 34 | 35 | 36 | and ${criterion.condition} 37 | 38 | #{listItem} 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | and ${criterion.condition} 62 | 63 | 64 | and ${criterion.condition} #{criterion.value} 65 | 66 | 67 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 68 | 69 | 70 | and ${criterion.condition} 71 | 72 | #{listItem} 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 88 | BOOK_ID, RELATION_BOOK_ID, RELATION_BOOK_NAME 89 | 90 | 109 | 110 | 115 | delete from book_relation 116 | 117 | 118 | 119 | 120 | 121 | 126 | insert into book_relation (BOOK_ID, RELATION_BOOK_ID, RELATION_BOOK_NAME 127 | ) 128 | values (#{BOOK_ID,jdbcType=INTEGER}, #{RELATION_BOOK_ID,jdbcType=INTEGER}, #{RELATION_BOOK_NAME,jdbcType=VARCHAR} 129 | ) 130 | 131 | 132 | 137 | insert into book_relation 138 | 139 | 140 | BOOK_ID, 141 | 142 | 143 | RELATION_BOOK_ID, 144 | 145 | 146 | RELATION_BOOK_NAME, 147 | 148 | 149 | 150 | 151 | #{BOOK_ID,jdbcType=INTEGER}, 152 | 153 | 154 | #{RELATION_BOOK_ID,jdbcType=INTEGER}, 155 | 156 | 157 | #{RELATION_BOOK_NAME,jdbcType=VARCHAR}, 158 | 159 | 160 | 161 | 172 | 173 | 178 | update book_relation 179 | 180 | 181 | BOOK_ID = #{record.BOOK_ID,jdbcType=INTEGER}, 182 | 183 | 184 | RELATION_BOOK_ID = #{record.RELATION_BOOK_ID,jdbcType=INTEGER}, 185 | 186 | 187 | RELATION_BOOK_NAME = #{record.RELATION_BOOK_NAME,jdbcType=VARCHAR}, 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 200 | update book_relation 201 | set BOOK_ID = #{record.BOOK_ID,jdbcType=INTEGER}, 202 | RELATION_BOOK_ID = #{record.RELATION_BOOK_ID,jdbcType=INTEGER}, 203 | RELATION_BOOK_NAME = #{record.RELATION_BOOK_NAME,jdbcType=VARCHAR} 204 | 205 | 206 | 207 | 208 | -------------------------------------------------------------------------------- /src/main/java/cn/edu/ustb/dm/model/BookPublishingInfo.java: -------------------------------------------------------------------------------- 1 | package cn.edu.ustb.dm.model; 2 | 3 | public class BookPublishingInfo { 4 | /** 5 | * This field was generated by MyBatis Generator. 6 | * This field corresponds to the database column book_publishing_info.book_id 7 | * 8 | * @mbggenerated Sun May 19 11:22:56 CST 2013 9 | */ 10 | private Integer book_id; 11 | 12 | /** 13 | * This field was generated by MyBatis Generator. 14 | * This field corresponds to the database column book_publishing_info.isbn 15 | * 16 | * @mbggenerated Sun May 19 11:22:56 CST 2013 17 | */ 18 | private String isbn; 19 | 20 | /** 21 | * This field was generated by MyBatis Generator. 22 | * This field corresponds to the database column book_publishing_info.binding 23 | * 24 | * @mbggenerated Sun May 19 11:22:56 CST 2013 25 | */ 26 | private String binding; 27 | 28 | /** 29 | * This field was generated by MyBatis Generator. 30 | * This field corresponds to the database column book_publishing_info.list_price 31 | * 32 | * @mbggenerated Sun May 19 11:22:56 CST 2013 33 | */ 34 | private String list_price; 35 | 36 | /** 37 | * This field was generated by MyBatis Generator. 38 | * This field corresponds to the database column book_publishing_info.page 39 | * 40 | * @mbggenerated Sun May 19 11:22:56 CST 2013 41 | */ 42 | private String page; 43 | 44 | /** 45 | * This field was generated by MyBatis Generator. 46 | * This field corresponds to the database column book_publishing_info.publisher 47 | * 48 | * @mbggenerated Sun May 19 11:22:56 CST 2013 49 | */ 50 | private String publisher; 51 | 52 | /** 53 | * This field was generated by MyBatis Generator. 54 | * This field corresponds to the database column book_publishing_info.publication_date 55 | * 56 | * @mbggenerated Sun May 19 11:22:56 CST 2013 57 | */ 58 | private String publication_date; 59 | 60 | /** 61 | * This field was generated by MyBatis Generator. 62 | * This field corresponds to the database column book_publishing_info.title_page_images 63 | * 64 | * @mbggenerated Sun May 19 11:22:56 CST 2013 65 | */ 66 | private String title_page_images; 67 | 68 | /** 69 | * This method was generated by MyBatis Generator. 70 | * This method returns the value of the database column book_publishing_info.book_id 71 | * 72 | * @return the value of book_publishing_info.book_id 73 | * 74 | * @mbggenerated Sun May 19 11:22:56 CST 2013 75 | */ 76 | public Integer getBook_id() { 77 | return book_id; 78 | } 79 | 80 | /** 81 | * This method was generated by MyBatis Generator. 82 | * This method sets the value of the database column book_publishing_info.book_id 83 | * 84 | * @param book_id the value for book_publishing_info.book_id 85 | * 86 | * @mbggenerated Sun May 19 11:22:56 CST 2013 87 | */ 88 | public void setBook_id(Integer book_id) { 89 | this.book_id = book_id; 90 | } 91 | 92 | /** 93 | * This method was generated by MyBatis Generator. 94 | * This method returns the value of the database column book_publishing_info.isbn 95 | * 96 | * @return the value of book_publishing_info.isbn 97 | * 98 | * @mbggenerated Sun May 19 11:22:56 CST 2013 99 | */ 100 | public String getIsbn() { 101 | return isbn; 102 | } 103 | 104 | /** 105 | * This method was generated by MyBatis Generator. 106 | * This method sets the value of the database column book_publishing_info.isbn 107 | * 108 | * @param isbn the value for book_publishing_info.isbn 109 | * 110 | * @mbggenerated Sun May 19 11:22:56 CST 2013 111 | */ 112 | public void setIsbn(String isbn) { 113 | this.isbn = isbn == null ? null : isbn.trim(); 114 | } 115 | 116 | /** 117 | * This method was generated by MyBatis Generator. 118 | * This method returns the value of the database column book_publishing_info.binding 119 | * 120 | * @return the value of book_publishing_info.binding 121 | * 122 | * @mbggenerated Sun May 19 11:22:56 CST 2013 123 | */ 124 | public String getBinding() { 125 | return binding; 126 | } 127 | 128 | /** 129 | * This method was generated by MyBatis Generator. 130 | * This method sets the value of the database column book_publishing_info.binding 131 | * 132 | * @param binding the value for book_publishing_info.binding 133 | * 134 | * @mbggenerated Sun May 19 11:22:56 CST 2013 135 | */ 136 | public void setBinding(String binding) { 137 | this.binding = binding == null ? null : binding.trim(); 138 | } 139 | 140 | /** 141 | * This method was generated by MyBatis Generator. 142 | * This method returns the value of the database column book_publishing_info.list_price 143 | * 144 | * @return the value of book_publishing_info.list_price 145 | * 146 | * @mbggenerated Sun May 19 11:22:56 CST 2013 147 | */ 148 | public String getList_price() { 149 | return list_price; 150 | } 151 | 152 | /** 153 | * This method was generated by MyBatis Generator. 154 | * This method sets the value of the database column book_publishing_info.list_price 155 | * 156 | * @param list_price the value for book_publishing_info.list_price 157 | * 158 | * @mbggenerated Sun May 19 11:22:56 CST 2013 159 | */ 160 | public void setList_price(String list_price) { 161 | this.list_price = list_price == null ? null : list_price.trim(); 162 | } 163 | 164 | /** 165 | * This method was generated by MyBatis Generator. 166 | * This method returns the value of the database column book_publishing_info.page 167 | * 168 | * @return the value of book_publishing_info.page 169 | * 170 | * @mbggenerated Sun May 19 11:22:56 CST 2013 171 | */ 172 | public String getPage() { 173 | return page; 174 | } 175 | 176 | /** 177 | * This method was generated by MyBatis Generator. 178 | * This method sets the value of the database column book_publishing_info.page 179 | * 180 | * @param page the value for book_publishing_info.page 181 | * 182 | * @mbggenerated Sun May 19 11:22:56 CST 2013 183 | */ 184 | public void setPage(String page) { 185 | this.page = page == null ? null : page.trim(); 186 | } 187 | 188 | /** 189 | * This method was generated by MyBatis Generator. 190 | * This method returns the value of the database column book_publishing_info.publisher 191 | * 192 | * @return the value of book_publishing_info.publisher 193 | * 194 | * @mbggenerated Sun May 19 11:22:56 CST 2013 195 | */ 196 | public String getPublisher() { 197 | return publisher; 198 | } 199 | 200 | /** 201 | * This method was generated by MyBatis Generator. 202 | * This method sets the value of the database column book_publishing_info.publisher 203 | * 204 | * @param publisher the value for book_publishing_info.publisher 205 | * 206 | * @mbggenerated Sun May 19 11:22:56 CST 2013 207 | */ 208 | public void setPublisher(String publisher) { 209 | this.publisher = publisher == null ? null : publisher.trim(); 210 | } 211 | 212 | /** 213 | * This method was generated by MyBatis Generator. 214 | * This method returns the value of the database column book_publishing_info.publication_date 215 | * 216 | * @return the value of book_publishing_info.publication_date 217 | * 218 | * @mbggenerated Sun May 19 11:22:56 CST 2013 219 | */ 220 | public String getPublication_date() { 221 | return publication_date; 222 | } 223 | 224 | /** 225 | * This method was generated by MyBatis Generator. 226 | * This method sets the value of the database column book_publishing_info.publication_date 227 | * 228 | * @param publication_date the value for book_publishing_info.publication_date 229 | * 230 | * @mbggenerated Sun May 19 11:22:56 CST 2013 231 | */ 232 | public void setPublication_date(String publication_date) { 233 | this.publication_date = publication_date == null ? null : publication_date.trim(); 234 | } 235 | 236 | /** 237 | * This method was generated by MyBatis Generator. 238 | * This method returns the value of the database column book_publishing_info.title_page_images 239 | * 240 | * @return the value of book_publishing_info.title_page_images 241 | * 242 | * @mbggenerated Sun May 19 11:22:56 CST 2013 243 | */ 244 | public String getTitle_page_images() { 245 | return title_page_images; 246 | } 247 | 248 | /** 249 | * This method was generated by MyBatis Generator. 250 | * This method sets the value of the database column book_publishing_info.title_page_images 251 | * 252 | * @param title_page_images the value for book_publishing_info.title_page_images 253 | * 254 | * @mbggenerated Sun May 19 11:22:56 CST 2013 255 | */ 256 | public void setTitle_page_images(String title_page_images) { 257 | this.title_page_images = title_page_images == null ? null : title_page_images.trim(); 258 | } 259 | } -------------------------------------------------------------------------------- /src/main/resources/cn/edu/ustb/dm/map/BindingTypeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | and ${criterion.condition} 27 | 28 | 29 | and ${criterion.condition} #{criterion.value} 30 | 31 | 32 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 33 | 34 | 35 | and ${criterion.condition} 36 | 37 | #{listItem} 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | and ${criterion.condition} 61 | 62 | 63 | and ${criterion.condition} #{criterion.value} 64 | 65 | 66 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 67 | 68 | 69 | and ${criterion.condition} 70 | 71 | #{listItem} 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 87 | BINDING_ID, BINDING_NAME 88 | 89 | 108 | 119 | 120 | 125 | delete from binding_type 126 | where BINDING_ID = #{BINDING_ID,jdbcType=INTEGER} 127 | 128 | 129 | 134 | delete from binding_type 135 | 136 | 137 | 138 | 139 | 140 | 145 | insert into binding_type (BINDING_ID, BINDING_NAME) 146 | values (#{BINDING_ID,jdbcType=INTEGER}, #{BINDING_NAME,jdbcType=VARCHAR}) 147 | 148 | 149 | 154 | insert into binding_type 155 | 156 | 157 | BINDING_ID, 158 | 159 | 160 | BINDING_NAME, 161 | 162 | 163 | 164 | 165 | #{BINDING_ID,jdbcType=INTEGER}, 166 | 167 | 168 | #{BINDING_NAME,jdbcType=VARCHAR}, 169 | 170 | 171 | 172 | 183 | 184 | 189 | update binding_type 190 | 191 | 192 | BINDING_ID = #{record.BINDING_ID,jdbcType=INTEGER}, 193 | 194 | 195 | BINDING_NAME = #{record.BINDING_NAME,jdbcType=VARCHAR}, 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 208 | update binding_type 209 | set BINDING_ID = #{record.BINDING_ID,jdbcType=INTEGER}, 210 | BINDING_NAME = #{record.BINDING_NAME,jdbcType=VARCHAR} 211 | 212 | 213 | 214 | 215 | 216 | 221 | update binding_type 222 | 223 | 224 | BINDING_NAME = #{BINDING_NAME,jdbcType=VARCHAR}, 225 | 226 | 227 | where BINDING_ID = #{BINDING_ID,jdbcType=INTEGER} 228 | 229 | 230 | 235 | update binding_type 236 | set BINDING_NAME = #{BINDING_NAME,jdbcType=VARCHAR} 237 | where BINDING_ID = #{BINDING_ID,jdbcType=INTEGER} 238 | 239 | -------------------------------------------------------------------------------- /src/main/resources/cn/edu/ustb/dm/map/PublisherInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | and ${criterion.condition} 27 | 28 | 29 | and ${criterion.condition} #{criterion.value} 30 | 31 | 32 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 33 | 34 | 35 | and ${criterion.condition} 36 | 37 | #{listItem} 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | and ${criterion.condition} 61 | 62 | 63 | and ${criterion.condition} #{criterion.value} 64 | 65 | 66 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 67 | 68 | 69 | and ${criterion.condition} 70 | 71 | #{listItem} 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 87 | PUBLISHER_ID, PUBLISHER_NAME 88 | 89 | 108 | 119 | 120 | 125 | delete from publisher_info 126 | where PUBLISHER_ID = #{PUBLISHER_ID,jdbcType=INTEGER} 127 | 128 | 129 | 134 | delete from publisher_info 135 | 136 | 137 | 138 | 139 | 140 | 145 | insert into publisher_info (PUBLISHER_ID, PUBLISHER_NAME) 146 | values (#{PUBLISHER_ID,jdbcType=INTEGER}, #{PUBLISHER_NAME,jdbcType=VARCHAR}) 147 | 148 | 149 | 154 | insert into publisher_info 155 | 156 | 157 | PUBLISHER_ID, 158 | 159 | 160 | PUBLISHER_NAME, 161 | 162 | 163 | 164 | 165 | #{PUBLISHER_ID,jdbcType=INTEGER}, 166 | 167 | 168 | #{PUBLISHER_NAME,jdbcType=VARCHAR}, 169 | 170 | 171 | 172 | 183 | 184 | 189 | update publisher_info 190 | 191 | 192 | PUBLISHER_ID = #{record.PUBLISHER_ID,jdbcType=INTEGER}, 193 | 194 | 195 | PUBLISHER_NAME = #{record.PUBLISHER_NAME,jdbcType=VARCHAR}, 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 208 | update publisher_info 209 | set PUBLISHER_ID = #{record.PUBLISHER_ID,jdbcType=INTEGER}, 210 | PUBLISHER_NAME = #{record.PUBLISHER_NAME,jdbcType=VARCHAR} 211 | 212 | 213 | 214 | 215 | 216 | 221 | update publisher_info 222 | 223 | 224 | PUBLISHER_NAME = #{PUBLISHER_NAME,jdbcType=VARCHAR}, 225 | 226 | 227 | where PUBLISHER_ID = #{PUBLISHER_ID,jdbcType=INTEGER} 228 | 229 | 230 | 235 | update publisher_info 236 | set PUBLISHER_NAME = #{PUBLISHER_NAME,jdbcType=VARCHAR} 237 | where PUBLISHER_ID = #{PUBLISHER_ID,jdbcType=INTEGER} 238 | 239 | --------------------------------------------------------------------------------