1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-10-30 02:13:10 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

删除独立的作者、出版社、缩略图表;修正部分字段;实现部分Service以及Controller;项目框架基本建立

This commit is contained in:
2022-03-12 21:56:37 +08:00
parent 3813f54c5e
commit dffb94a148
42 changed files with 801 additions and 1205 deletions

View File

@@ -1,23 +1,24 @@
package plus.bookshelf;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Hello world!
*
*/
@SpringBootApplication(scanBasePackages = { "plus.bookshelf" })
@SpringBootApplication(scanBasePackages = {"plus.bookshelf"})
@RestController
@MapperScan("plus.bookshelf.mapper")
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
@MapperScan("plus.bookshelf.Dao.Mapper")
public class App {
public static void main(String[] args) {
System.out.println("Dreams remain daydreams until they are put into action. \n" +
"Now, let's start.");
// 启动SpringBoot项目
SpringApplication.run(App.class, args);
}
@RequestMapping("/")

View File

@@ -0,0 +1,5 @@
package plus.bookshelf.Controller.Controller;
public class BaseController {
public static final String CONTENT_TYPE_FORMED = "application/x-www-form-urlencoded";
}

View File

@@ -0,0 +1,38 @@
package plus.bookshelf.Controller.Controller;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import plus.bookshelf.Controller.VO.BookVO;
import plus.bookshelf.Service.Model.BookModel;
import plus.bookshelf.Service.Service.BookService;
@Controller("book")
@RequestMapping("/apiv1/book")
public class BookController extends BaseController {
@Autowired
BookService bookService;
@RequestMapping(value = "get", method = {RequestMethod.GET})
@ResponseBody
public BookVO get(@RequestParam(value = "id") Integer id) {
if (id == null) {
return null;
}
BookModel bookModel = bookService.getBookById(id);
BookVO bookVO = convertFromModel(bookModel);
return bookVO;
}
private BookVO convertFromModel(BookModel bookModel) {
BookVO bookVO = new BookVO();
BeanUtils.copyProperties(bookModel, bookVO);
return bookVO;
}
}

View File

@@ -0,0 +1,36 @@
package plus.bookshelf.Controller.VO;
import lombok.Data;
import plus.bookshelf.Common.Enum.Language;
import plus.bookshelf.Service.Model.CategoryModel;
@Data
public class BookVO {
// 书籍id
Integer id;
// 书名
String bookName;
// 书籍简介
String description;
// 作者姓名
String author;
//书籍所属分类
CategoryModel category;
// 出版社
String publishingHouse;
// 语言
Language language;
// 来源(版权)信息
String copyright;
// 缩略图
String thumbnail;
}

View File

@@ -1,69 +0,0 @@
package plus.bookshelf.Dao.DO;
public class AuthorDO {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_author_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_author_info.name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
private String name;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_author_info.id
*
* @return the value of book_author_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_author_info.id
*
* @param id the value for book_author_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_author_info.name
*
* @return the value of book_author_info.name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_author_info.name
*
* @param name the value for book_author_info.name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
}

View File

@@ -1,30 +1,48 @@
package plus.bookshelf.Dao.DO;
public class BookDO extends BookDOKey {
public class BookDO {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.id
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.book_name
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String bookName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.category_id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer categoryId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.publishing_house_id
* This field corresponds to the database column book_info.publishing_house
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer publishingHouseId;
private String publishingHouse;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.language
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String language;
@@ -33,7 +51,7 @@ public class BookDO extends BookDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.copyright
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String copyright;
@@ -42,26 +60,92 @@ public class BookDO extends BookDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.is_delete
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Boolean isDelete;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.thumbnail
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String thumbnail;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.author
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String author;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.description
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String description;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.id
*
* @return the value of book_info.id
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.id
*
* @param id the value for book_info.id
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.book_name
*
* @return the value of book_info.book_name
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getBookName() {
return bookName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.book_name
*
* @param bookName the value for book_info.book_name
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setBookName(String bookName) {
this.bookName = bookName == null ? null : bookName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.category_id
*
* @return the value of book_info.category_id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getCategoryId() {
return categoryId;
@@ -73,7 +157,7 @@ public class BookDO extends BookDOKey {
*
* @param categoryId the value for book_info.category_id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setCategoryId(Integer categoryId) {
this.categoryId = categoryId;
@@ -81,26 +165,26 @@ public class BookDO extends BookDOKey {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.publishing_house_id
* This method returns the value of the database column book_info.publishing_house
*
* @return the value of book_info.publishing_house_id
* @return the value of book_info.publishing_house
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getPublishingHouseId() {
return publishingHouseId;
public String getPublishingHouse() {
return publishingHouse;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.publishing_house_id
* This method sets the value of the database column book_info.publishing_house
*
* @param publishingHouseId the value for book_info.publishing_house_id
* @param publishingHouse the value for book_info.publishing_house
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setPublishingHouseId(Integer publishingHouseId) {
this.publishingHouseId = publishingHouseId;
public void setPublishingHouse(String publishingHouse) {
this.publishingHouse = publishingHouse == null ? null : publishingHouse.trim();
}
/**
@@ -109,7 +193,7 @@ public class BookDO extends BookDOKey {
*
* @return the value of book_info.language
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getLanguage() {
return language;
@@ -121,7 +205,7 @@ public class BookDO extends BookDOKey {
*
* @param language the value for book_info.language
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setLanguage(String language) {
this.language = language == null ? null : language.trim();
@@ -133,7 +217,7 @@ public class BookDO extends BookDOKey {
*
* @return the value of book_info.copyright
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getCopyright() {
return copyright;
@@ -145,7 +229,7 @@ public class BookDO extends BookDOKey {
*
* @param copyright the value for book_info.copyright
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setCopyright(String copyright) {
this.copyright = copyright == null ? null : copyright.trim();
@@ -157,7 +241,7 @@ public class BookDO extends BookDOKey {
*
* @return the value of book_info.is_delete
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Boolean getIsDelete() {
return isDelete;
@@ -169,19 +253,67 @@ public class BookDO extends BookDOKey {
*
* @param isDelete the value for book_info.is_delete
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setIsDelete(Boolean isDelete) {
this.isDelete = isDelete;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.thumbnail
*
* @return the value of book_info.thumbnail
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getThumbnail() {
return thumbnail;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.thumbnail
*
* @param thumbnail the value for book_info.thumbnail
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setThumbnail(String thumbnail) {
this.thumbnail = thumbnail == null ? null : thumbnail.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.author
*
* @return the value of book_info.author
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getAuthor() {
return author;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.author
*
* @param author the value for book_info.author
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setAuthor(String author) {
this.author = author == null ? null : author.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.description
*
* @return the value of book_info.description
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getDescription() {
return description;
@@ -193,7 +325,7 @@ public class BookDO extends BookDOKey {
*
* @param description the value for book_info.description
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setDescription(String description) {
this.description = description == null ? null : description.trim();

View File

@@ -1,69 +0,0 @@
package plus.bookshelf.Dao.DO;
public class BookDOKey {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
private Byte id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_info.book_name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
private String bookName;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.id
*
* @return the value of book_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public Byte getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.id
*
* @param id the value for book_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public void setId(Byte id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_info.book_name
*
* @return the value of book_info.book_name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public String getBookName() {
return bookName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_info.book_name
*
* @param bookName the value for book_info.book_name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public void setBookName(String bookName) {
this.bookName = bookName == null ? null : bookName.trim();
}
}

View File

@@ -6,7 +6,7 @@ public class CategoryDO {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column category_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer id;
@@ -15,25 +15,25 @@ public class CategoryDO {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column category_info.name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String name;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column category_info.isShow
* This field corresponds to the database column category_info.is_show
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Boolean isshow;
private Boolean isShow;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column category_info.order
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer order;
@@ -42,25 +42,25 @@ public class CategoryDO {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column category_info.level
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer level;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column category_info.parentId
* This field corresponds to the database column category_info.parent_id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer parentid;
private Integer parentId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column category_info.description
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String description;
@@ -70,7 +70,7 @@ public class CategoryDO {
*
* @return the value of category_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getId() {
return id;
@@ -82,7 +82,7 @@ public class CategoryDO {
*
* @param id the value for category_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setId(Integer id) {
this.id = id;
@@ -94,7 +94,7 @@ public class CategoryDO {
*
* @return the value of category_info.name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getName() {
return name;
@@ -106,7 +106,7 @@ public class CategoryDO {
*
* @param name the value for category_info.name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
@@ -114,26 +114,26 @@ public class CategoryDO {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column category_info.isShow
* This method returns the value of the database column category_info.is_show
*
* @return the value of category_info.isShow
* @return the value of category_info.is_show
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Boolean getIsshow() {
return isshow;
public Boolean getIsShow() {
return isShow;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column category_info.isShow
* This method sets the value of the database column category_info.is_show
*
* @param isshow the value for category_info.isShow
* @param isShow the value for category_info.is_show
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setIsshow(Boolean isshow) {
this.isshow = isshow;
public void setIsShow(Boolean isShow) {
this.isShow = isShow;
}
/**
@@ -142,7 +142,7 @@ public class CategoryDO {
*
* @return the value of category_info.order
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getOrder() {
return order;
@@ -154,7 +154,7 @@ public class CategoryDO {
*
* @param order the value for category_info.order
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setOrder(Integer order) {
this.order = order;
@@ -166,7 +166,7 @@ public class CategoryDO {
*
* @return the value of category_info.level
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getLevel() {
return level;
@@ -178,7 +178,7 @@ public class CategoryDO {
*
* @param level the value for category_info.level
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setLevel(Integer level) {
this.level = level;
@@ -186,26 +186,26 @@ public class CategoryDO {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column category_info.parentId
* This method returns the value of the database column category_info.parent_id
*
* @return the value of category_info.parentId
* @return the value of category_info.parent_id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getParentid() {
return parentid;
public Integer getParentId() {
return parentId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column category_info.parentId
* This method sets the value of the database column category_info.parent_id
*
* @param parentid the value for category_info.parentId
* @param parentId the value for category_info.parent_id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setParentid(Integer parentid) {
this.parentid = parentid;
public void setParentId(Integer parentId) {
this.parentId = parentId;
}
/**
@@ -214,7 +214,7 @@ public class CategoryDO {
*
* @return the value of category_info.description
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getDescription() {
return description;
@@ -226,7 +226,7 @@ public class CategoryDO {
*
* @param description the value for category_info.description
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setDescription(String description) {
this.description = description == null ? null : description.trim();

View File

@@ -2,13 +2,31 @@ package plus.bookshelf.Dao.DO;
import java.util.Date;
public class FileDO extends FileDOKey {
public class FileDO {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.id
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.book_id
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer bookId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.file_display_name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String fileDisplayName;
@@ -17,7 +35,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.file_name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String fileName;
@@ -26,7 +44,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.file_format
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String fileFormat;
@@ -35,7 +53,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.number_of_pages
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer numberOfPages;
@@ -44,7 +62,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.watermark
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Boolean watermark;
@@ -53,7 +71,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.advertising
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Boolean advertising;
@@ -62,7 +80,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.book_origin
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Byte bookOrigin;
@@ -71,7 +89,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.thumbnail
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String thumbnail;
@@ -80,7 +98,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.file_create_at
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Date fileCreateAt;
@@ -89,7 +107,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.file_modified_at
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Date fileModifiedAt;
@@ -98,7 +116,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.file_size
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer fileSize;
@@ -107,7 +125,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.hash_md5
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String hashMd5;
@@ -116,7 +134,7 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.hash_sha1
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String hashSha1;
@@ -125,17 +143,65 @@ public class FileDO extends FileDOKey {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.hash_sha256
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String hashSha256;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column file_info.id
*
* @return the value of file_info.id
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column file_info.id
*
* @param id the value for file_info.id
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column file_info.book_id
*
* @return the value of file_info.book_id
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getBookId() {
return bookId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column file_info.book_id
*
* @param bookId the value for file_info.book_id
*
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setBookId(Integer bookId) {
this.bookId = bookId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column file_info.file_display_name
*
* @return the value of file_info.file_display_name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getFileDisplayName() {
return fileDisplayName;
@@ -147,7 +213,7 @@ public class FileDO extends FileDOKey {
*
* @param fileDisplayName the value for file_info.file_display_name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setFileDisplayName(String fileDisplayName) {
this.fileDisplayName = fileDisplayName == null ? null : fileDisplayName.trim();
@@ -159,7 +225,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.file_name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getFileName() {
return fileName;
@@ -171,7 +237,7 @@ public class FileDO extends FileDOKey {
*
* @param fileName the value for file_info.file_name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setFileName(String fileName) {
this.fileName = fileName == null ? null : fileName.trim();
@@ -183,7 +249,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.file_format
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getFileFormat() {
return fileFormat;
@@ -195,7 +261,7 @@ public class FileDO extends FileDOKey {
*
* @param fileFormat the value for file_info.file_format
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setFileFormat(String fileFormat) {
this.fileFormat = fileFormat == null ? null : fileFormat.trim();
@@ -207,7 +273,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.number_of_pages
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getNumberOfPages() {
return numberOfPages;
@@ -219,7 +285,7 @@ public class FileDO extends FileDOKey {
*
* @param numberOfPages the value for file_info.number_of_pages
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setNumberOfPages(Integer numberOfPages) {
this.numberOfPages = numberOfPages;
@@ -231,7 +297,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.watermark
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Boolean getWatermark() {
return watermark;
@@ -243,7 +309,7 @@ public class FileDO extends FileDOKey {
*
* @param watermark the value for file_info.watermark
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setWatermark(Boolean watermark) {
this.watermark = watermark;
@@ -255,7 +321,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.advertising
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Boolean getAdvertising() {
return advertising;
@@ -267,7 +333,7 @@ public class FileDO extends FileDOKey {
*
* @param advertising the value for file_info.advertising
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setAdvertising(Boolean advertising) {
this.advertising = advertising;
@@ -279,7 +345,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.book_origin
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Byte getBookOrigin() {
return bookOrigin;
@@ -291,7 +357,7 @@ public class FileDO extends FileDOKey {
*
* @param bookOrigin the value for file_info.book_origin
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setBookOrigin(Byte bookOrigin) {
this.bookOrigin = bookOrigin;
@@ -303,7 +369,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.thumbnail
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getThumbnail() {
return thumbnail;
@@ -315,7 +381,7 @@ public class FileDO extends FileDOKey {
*
* @param thumbnail the value for file_info.thumbnail
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setThumbnail(String thumbnail) {
this.thumbnail = thumbnail == null ? null : thumbnail.trim();
@@ -327,7 +393,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.file_create_at
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Date getFileCreateAt() {
return fileCreateAt;
@@ -339,7 +405,7 @@ public class FileDO extends FileDOKey {
*
* @param fileCreateAt the value for file_info.file_create_at
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setFileCreateAt(Date fileCreateAt) {
this.fileCreateAt = fileCreateAt;
@@ -351,7 +417,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.file_modified_at
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Date getFileModifiedAt() {
return fileModifiedAt;
@@ -363,7 +429,7 @@ public class FileDO extends FileDOKey {
*
* @param fileModifiedAt the value for file_info.file_modified_at
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setFileModifiedAt(Date fileModifiedAt) {
this.fileModifiedAt = fileModifiedAt;
@@ -375,7 +441,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.file_size
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getFileSize() {
return fileSize;
@@ -387,7 +453,7 @@ public class FileDO extends FileDOKey {
*
* @param fileSize the value for file_info.file_size
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setFileSize(Integer fileSize) {
this.fileSize = fileSize;
@@ -399,7 +465,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.hash_md5
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getHashMd5() {
return hashMd5;
@@ -411,7 +477,7 @@ public class FileDO extends FileDOKey {
*
* @param hashMd5 the value for file_info.hash_md5
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setHashMd5(String hashMd5) {
this.hashMd5 = hashMd5 == null ? null : hashMd5.trim();
@@ -423,7 +489,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.hash_sha1
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getHashSha1() {
return hashSha1;
@@ -435,7 +501,7 @@ public class FileDO extends FileDOKey {
*
* @param hashSha1 the value for file_info.hash_sha1
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setHashSha1(String hashSha1) {
this.hashSha1 = hashSha1 == null ? null : hashSha1.trim();
@@ -447,7 +513,7 @@ public class FileDO extends FileDOKey {
*
* @return the value of file_info.hash_sha256
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getHashSha256() {
return hashSha256;
@@ -459,7 +525,7 @@ public class FileDO extends FileDOKey {
*
* @param hashSha256 the value for file_info.hash_sha256
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setHashSha256(String hashSha256) {
this.hashSha256 = hashSha256 == null ? null : hashSha256.trim();

View File

@@ -1,69 +0,0 @@
package plus.bookshelf.Dao.DO;
public class FileDOKey {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_info.book_id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
private Integer bookId;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column file_info.id
*
* @return the value of file_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column file_info.id
*
* @param id the value for file_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column file_info.book_id
*
* @return the value of file_info.book_id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public Integer getBookId() {
return bookId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column file_info.book_id
*
* @param bookId the value for file_info.book_id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public void setBookId(Integer bookId) {
this.bookId = bookId;
}
}

View File

@@ -6,7 +6,7 @@ public class FileObjectDO {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_object_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer id;
@@ -15,7 +15,7 @@ public class FileObjectDO {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_object_info.fileId
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Integer fileid;
@@ -24,7 +24,7 @@ public class FileObjectDO {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_object_info.storage_medium_type
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private Byte storageMediumType;
@@ -33,7 +33,7 @@ public class FileObjectDO {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_object_info.file_path
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String filePath;
@@ -42,7 +42,7 @@ public class FileObjectDO {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_object_info.file_pwd
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String filePwd;
@@ -51,7 +51,7 @@ public class FileObjectDO {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_object_info.file_share_code
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String fileShareCode;
@@ -60,7 +60,7 @@ public class FileObjectDO {
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_object_info.additional_fields
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
private String additionalFields;
@@ -70,7 +70,7 @@ public class FileObjectDO {
*
* @return the value of file_object_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getId() {
return id;
@@ -82,7 +82,7 @@ public class FileObjectDO {
*
* @param id the value for file_object_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setId(Integer id) {
this.id = id;
@@ -94,7 +94,7 @@ public class FileObjectDO {
*
* @return the value of file_object_info.fileId
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Integer getFileid() {
return fileid;
@@ -106,7 +106,7 @@ public class FileObjectDO {
*
* @param fileid the value for file_object_info.fileId
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setFileid(Integer fileid) {
this.fileid = fileid;
@@ -118,7 +118,7 @@ public class FileObjectDO {
*
* @return the value of file_object_info.storage_medium_type
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public Byte getStorageMediumType() {
return storageMediumType;
@@ -130,7 +130,7 @@ public class FileObjectDO {
*
* @param storageMediumType the value for file_object_info.storage_medium_type
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setStorageMediumType(Byte storageMediumType) {
this.storageMediumType = storageMediumType;
@@ -142,7 +142,7 @@ public class FileObjectDO {
*
* @return the value of file_object_info.file_path
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getFilePath() {
return filePath;
@@ -154,7 +154,7 @@ public class FileObjectDO {
*
* @param filePath the value for file_object_info.file_path
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setFilePath(String filePath) {
this.filePath = filePath == null ? null : filePath.trim();
@@ -166,7 +166,7 @@ public class FileObjectDO {
*
* @return the value of file_object_info.file_pwd
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getFilePwd() {
return filePwd;
@@ -178,7 +178,7 @@ public class FileObjectDO {
*
* @param filePwd the value for file_object_info.file_pwd
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setFilePwd(String filePwd) {
this.filePwd = filePwd == null ? null : filePwd.trim();
@@ -190,7 +190,7 @@ public class FileObjectDO {
*
* @return the value of file_object_info.file_share_code
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getFileShareCode() {
return fileShareCode;
@@ -202,7 +202,7 @@ public class FileObjectDO {
*
* @param fileShareCode the value for file_object_info.file_share_code
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setFileShareCode(String fileShareCode) {
this.fileShareCode = fileShareCode == null ? null : fileShareCode.trim();
@@ -214,7 +214,7 @@ public class FileObjectDO {
*
* @return the value of file_object_info.additional_fields
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public String getAdditionalFields() {
return additionalFields;
@@ -226,7 +226,7 @@ public class FileObjectDO {
*
* @param additionalFields the value for file_object_info.additional_fields
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
public void setAdditionalFields(String additionalFields) {
this.additionalFields = additionalFields == null ? null : additionalFields.trim();

View File

@@ -1,69 +0,0 @@
package plus.bookshelf.Dao.DO;
public class PublishingHouseDO {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_publishing_house_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_publishing_house_info.name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
private String name;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_publishing_house_info.id
*
* @return the value of book_publishing_house_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_publishing_house_info.id
*
* @param id the value for book_publishing_house_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_publishing_house_info.name
*
* @return the value of book_publishing_house_info.name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_publishing_house_info.name
*
* @param name the value for book_publishing_house_info.name
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
}

View File

@@ -1,69 +0,0 @@
package plus.bookshelf.Dao.DO;
public class ThumbnailDO {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_thumbnail_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column book_thumbnail_info.path
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
private String path;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_thumbnail_info.id
*
* @return the value of book_thumbnail_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_thumbnail_info.id
*
* @param id the value for book_thumbnail_info.id
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column book_thumbnail_info.path
*
* @return the value of book_thumbnail_info.path
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public String getPath() {
return path;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column book_thumbnail_info.path
*
* @param path the value for book_thumbnail_info.path
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
public void setPath(String path) {
this.path = path == null ? null : path.trim();
}
}

View File

@@ -1,53 +0,0 @@
package plus.bookshelf.Dao.Mapper;
import plus.bookshelf.Dao.DO.AuthorDO;
public interface AuthorDOMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_author_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_author_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int insert(AuthorDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_author_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int insertSelective(AuthorDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_author_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
AuthorDO selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_author_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int updateByPrimaryKeySelective(AuthorDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_author_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int updateByPrimaryKey(AuthorDO record);
}

View File

@@ -1,22 +1,21 @@
package plus.bookshelf.Dao.Mapper;
import plus.bookshelf.Dao.DO.BookDO;
import plus.bookshelf.Dao.DO.BookDOKey;
public interface BookDOMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int deleteByPrimaryKey(BookDOKey key);
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int insert(BookDO record);
@@ -24,7 +23,7 @@ public interface BookDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int insertSelective(BookDO record);
@@ -32,15 +31,15 @@ public interface BookDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
BookDO selectByPrimaryKey(BookDOKey key);
BookDO selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int updateByPrimaryKeySelective(BookDO record);
@@ -48,7 +47,7 @@ public interface BookDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int updateByPrimaryKeyWithBLOBs(BookDO record);
@@ -56,7 +55,7 @@ public interface BookDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int updateByPrimaryKey(BookDO record);
}

View File

@@ -7,7 +7,7 @@ public interface CategoryDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int deleteByPrimaryKey(Integer id);
@@ -15,7 +15,7 @@ public interface CategoryDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int insert(CategoryDO record);
@@ -23,7 +23,7 @@ public interface CategoryDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int insertSelective(CategoryDO record);
@@ -31,7 +31,7 @@ public interface CategoryDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
CategoryDO selectByPrimaryKey(Integer id);
@@ -39,7 +39,7 @@ public interface CategoryDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int updateByPrimaryKeySelective(CategoryDO record);
@@ -47,7 +47,7 @@ public interface CategoryDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int updateByPrimaryKeyWithBLOBs(CategoryDO record);
@@ -55,7 +55,9 @@ public interface CategoryDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int updateByPrimaryKey(CategoryDO record);
CategoryDO[] selectChildrenByCategoryId(Integer id);
}

View File

@@ -1,22 +1,21 @@
package plus.bookshelf.Dao.Mapper;
import plus.bookshelf.Dao.DO.FileDO;
import plus.bookshelf.Dao.DO.FileDOKey;
public interface FileDOMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int deleteByPrimaryKey(FileDOKey key);
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int insert(FileDO record);
@@ -24,7 +23,7 @@ public interface FileDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int insertSelective(FileDO record);
@@ -32,15 +31,15 @@ public interface FileDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
FileDO selectByPrimaryKey(FileDOKey key);
FileDO selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int updateByPrimaryKeySelective(FileDO record);
@@ -48,7 +47,7 @@ public interface FileDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int updateByPrimaryKey(FileDO record);
}

View File

@@ -7,7 +7,7 @@ public interface FileObjectDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_object_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int deleteByPrimaryKey(Integer id);
@@ -15,7 +15,7 @@ public interface FileObjectDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_object_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int insert(FileObjectDO record);
@@ -23,7 +23,7 @@ public interface FileObjectDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_object_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int insertSelective(FileObjectDO record);
@@ -31,7 +31,7 @@ public interface FileObjectDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_object_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
FileObjectDO selectByPrimaryKey(Integer id);
@@ -39,7 +39,7 @@ public interface FileObjectDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_object_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int updateByPrimaryKeySelective(FileObjectDO record);
@@ -47,7 +47,7 @@ public interface FileObjectDOMapper {
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_object_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
* @mbg.generated Sat Mar 12 21:38:13 SGT 2022
*/
int updateByPrimaryKey(FileObjectDO record);
}

View File

@@ -1,53 +0,0 @@
package plus.bookshelf.Dao.Mapper;
import plus.bookshelf.Dao.DO.PublishingHouseDO;
public interface PublishingHouseDOMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_publishing_house_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_publishing_house_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int insert(PublishingHouseDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_publishing_house_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int insertSelective(PublishingHouseDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_publishing_house_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
PublishingHouseDO selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_publishing_house_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int updateByPrimaryKeySelective(PublishingHouseDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_publishing_house_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int updateByPrimaryKey(PublishingHouseDO record);
}

View File

@@ -1,53 +0,0 @@
package plus.bookshelf.Dao.Mapper;
import plus.bookshelf.Dao.DO.ThumbnailDO;
public interface ThumbnailDOMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_thumbnail_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_thumbnail_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int insert(ThumbnailDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_thumbnail_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int insertSelective(ThumbnailDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_thumbnail_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
ThumbnailDO selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_thumbnail_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int updateByPrimaryKeySelective(ThumbnailDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table book_thumbnail_info
*
* @mbg.generated Sat Mar 12 18:53:08 SGT 2022
*/
int updateByPrimaryKey(ThumbnailDO record);
}

View File

@@ -0,0 +1,50 @@
package plus.bookshelf.Service.Impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import plus.bookshelf.Dao.DO.BookDO;
import plus.bookshelf.Dao.Mapper.BookDOMapper;
import plus.bookshelf.Service.Model.BookModel;
import plus.bookshelf.Service.Model.CategoryModel;
import plus.bookshelf.Service.Service.BookService;
import plus.bookshelf.Service.Service.CategoryService;
@Service
public class BookServiceImpl implements BookService {
@Autowired
private BookDOMapper bookDOMapper;
@Autowired
private CategoryService categoryService;
@Override
@Transactional
public BookModel getBookById(Integer id) {
// 查询得到bookDO
BookDO bookDO = bookDOMapper.selectByPrimaryKey(id);
// 查询得到categoryModel
CategoryModel categoryModel = categoryService.getCategoryById(bookDO.getCategoryId());
BookModel bookModel = convertFromDataObjecct(bookDO, categoryModel);
return bookModel;
}
private BookModel convertFromDataObjecct(BookDO bookDO, CategoryModel categoryModel) {
BookModel bookModel = new BookModel();
if (bookDO == null) {
return null;
}
bookModel.setId(bookDO.getId());
bookModel.setBookName(bookDO.getBookName());
bookModel.setDescription(bookDO.getDescription());
bookModel.setAuthor(bookDO.getAuthor());
bookModel.setCategory(categoryModel);
bookModel.setPublishingHouse(bookDO.getPublishingHouse());
bookModel.setCopyright(bookDO.getCopyright());
bookModel.setIsDelete(bookDO.getIsDelete());
bookModel.setThumbnail(bookDO.getThumbnail());
return bookModel;
}
}

View File

@@ -0,0 +1,52 @@
package plus.bookshelf.Service.Impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import plus.bookshelf.Dao.DO.CategoryDO;
import plus.bookshelf.Dao.Mapper.CategoryDOMapper;
import plus.bookshelf.Service.Model.CategoryModel;
import plus.bookshelf.Service.Service.CategoryService;
@Service
public class CategoryServiceImpl implements CategoryService {
@Autowired
private CategoryDOMapper categoryDOMapper;
@Override
public CategoryModel getCategoryById(Integer id) {
CategoryDO categoryDO = categoryDOMapper.selectByPrimaryKey(id);
CategoryModel categoryModel = convertFromDataObject(categoryDO);
// // 获得儿子
// CategoryDO[] childrenDO = categoryDOMapper.selectChildrenByCategoryId(categoryDO.getId());
// CategoryModel[] children = new CategoryModel[childrenDO.length];
// int index = 0;
// for (CategoryDO childDO : childrenDO) {
// children[index++] = convertFromDataObject(childDO);
// }
//
// categoryModel.setChildren(children);
return categoryModel;
}
// 转换时不转换父亲与儿子,否则会陷入死循环
private CategoryModel convertFromDataObject(CategoryDO categoryDO) {
if (categoryDO == null) {
return null;
}
//设置属性
CategoryModel categoryModel = new CategoryModel();
categoryModel.setId(categoryDO.getId());
categoryModel.setName(categoryDO.getName());
categoryModel.setDescription(categoryDO.getDescription());
categoryModel.setIsShow(categoryDO.getIsShow());
categoryModel.setOrder(categoryDO.getOrder());
categoryModel.setLevel(categoryDO.getLevel());
categoryModel.setParentId(categoryDO.getParentId());
return categoryModel;
}
}

View File

@@ -1,9 +0,0 @@
package plus.bookshelf.Service.Model.Book;
public class AuthorModel {
// 作者Id
Integer id;
// 作者姓名
String name;
}

View File

@@ -1,9 +0,0 @@
package plus.bookshelf.Service.Model.Book;
public class PublishingHouseModel {
// 出版社Id
Integer id;
// 出版社名称
String name;
}

View File

@@ -1,10 +0,0 @@
package plus.bookshelf.Service.Model.Book;
public class ThumbnailModel {
// 书籍缩略图Id
Integer id;
// 缩略图路径
String path;
}

View File

@@ -1,8 +1,9 @@
package plus.bookshelf.Service.Model.Book;
package plus.bookshelf.Service.Model;
import lombok.Data;
import plus.bookshelf.Common.Enum.Language;
import plus.bookshelf.Service.Model.Category.CategoryModel;
@Data
public class BookModel {
// 书籍id
@@ -15,13 +16,13 @@ public class BookModel {
String description;
// 作者姓名
AuthorModel[] author;
String author;
//书籍所属分类
CategoryModel category;
// 出版社
PublishingHouseModel publishingHouse;
String publishingHouse;
// 语言
Language language;
@@ -31,4 +32,7 @@ public class BookModel {
// 是否删除
Boolean isDelete;
// 缩略图
String thumbnail;
}

View File

@@ -1,15 +1,18 @@
package plus.bookshelf.Service.Model.Category;
package plus.bookshelf.Service.Model;
import lombok.Data;
@Data
public class CategoryModel {
// 分类名称
Integer id;
// 分类名称
Integer name;
String name;
// 分类简介
Integer description;
String description;
Boolean isShow;
@@ -20,12 +23,9 @@ public class CategoryModel {
// 分类级别 0为一级分类, 1为二级分类...
Integer level;
// 所属父分类Id
// 父分类
Integer parentId;
// 父分类
CategoryModel parent;
// 子分类集合
CategoryModel[] children;
// // 子分类集合
// Integer[] childrenId;
}

View File

@@ -1,10 +1,11 @@
package plus.bookshelf.Service.Model.File;
package plus.bookshelf.Service.Model;
import lombok.Data;
import org.joda.time.DateTime;
import plus.bookshelf.Common.Enum.BookOrigin;
import plus.bookshelf.Common.Enum.FileFormatEnum;
import plus.bookshelf.Service.Model.Book.ThumbnailModel;
@Data
public class FileModel {
// 文件Id
@@ -34,9 +35,6 @@ public class FileModel {
// 文件来源 电子版/扫描版
BookOrigin bookOrigin;
// 缩略图
ThumbnailModel thumbnail;
// 文件创建时间
DateTime fileCreateAt;

View File

@@ -1,7 +1,9 @@
package plus.bookshelf.Service.Model.File;
package plus.bookshelf.Service.Model;
import lombok.Data;
import plus.bookshelf.Common.Enum.FileStorageMediumEnum;
@Data
public class FileObjectModel {
// 文件存储介质Id

View File

@@ -0,0 +1,12 @@
package plus.bookshelf.Service.Service;
import plus.bookshelf.Service.Model.BookModel;
public interface BookService {
/**
* 通过书籍Id获取书籍
* @param id
* @return
*/
BookModel getBookById(Integer id);
}

View File

@@ -0,0 +1,12 @@
package plus.bookshelf.Service.Service;
import plus.bookshelf.Service.Model.CategoryModel;
public interface CategoryService {
/**
* 通过分类Id获取分类
* @param id
* @return
*/
CategoryModel getCategoryById(Integer id);
}