diff --git a/novel-front/src/main/java/xyz/zinglizingli/books/mapper/BookParseLogMapper.java b/novel-front/src/main/java/xyz/zinglizingli/books/mapper/BookParseLogMapper.java new file mode 100644 index 0000000..54a15bf --- /dev/null +++ b/novel-front/src/main/java/xyz/zinglizingli/books/mapper/BookParseLogMapper.java @@ -0,0 +1,30 @@ +package xyz.zinglizingli.books.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import xyz.zinglizingli.books.po.BookParseLog; +import xyz.zinglizingli.books.po.BookParseLogExample; + +public interface BookParseLogMapper { + int countByExample(BookParseLogExample example); + + int deleteByExample(BookParseLogExample example); + + int deleteByPrimaryKey(Long id); + + int insert(BookParseLog record); + + int insertSelective(BookParseLog record); + + List selectByExample(BookParseLogExample example); + + BookParseLog selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") BookParseLog record, @Param("example") BookParseLogExample example); + + int updateByExample(@Param("record") BookParseLog record, @Param("example") BookParseLogExample example); + + int updateByPrimaryKeySelective(BookParseLog record); + + int updateByPrimaryKey(BookParseLog record); +} \ No newline at end of file diff --git a/novel-front/src/main/java/xyz/zinglizingli/books/po/BookParseLog.java b/novel-front/src/main/java/xyz/zinglizingli/books/po/BookParseLog.java new file mode 100644 index 0000000..25a6802 --- /dev/null +++ b/novel-front/src/main/java/xyz/zinglizingli/books/po/BookParseLog.java @@ -0,0 +1,65 @@ +package xyz.zinglizingli.books.po; + +import java.util.Date; + +public class BookParseLog { + private Long id; + + private String bookUrl; + + private String bookName; + + private Float score; + + private Date createTime; + + private Byte priority; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getBookUrl() { + return bookUrl; + } + + public void setBookUrl(String bookUrl) { + this.bookUrl = bookUrl == null ? null : bookUrl.trim(); + } + + public String getBookName() { + return bookName; + } + + public void setBookName(String bookName) { + this.bookName = bookName == null ? null : bookName.trim(); + } + + public Float getScore() { + return score; + } + + public void setScore(Float score) { + this.score = score; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Byte getPriority() { + return priority; + } + + public void setPriority(Byte priority) { + this.priority = priority; + } +} \ No newline at end of file diff --git a/novel-front/src/main/java/xyz/zinglizingli/books/po/BookParseLogExample.java b/novel-front/src/main/java/xyz/zinglizingli/books/po/BookParseLogExample.java new file mode 100644 index 0000000..39e4a84 --- /dev/null +++ b/novel-front/src/main/java/xyz/zinglizingli/books/po/BookParseLogExample.java @@ -0,0 +1,581 @@ +package xyz.zinglizingli.books.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BookParseLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public BookParseLogExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andBookUrlIsNull() { + addCriterion("book_url is null"); + return (Criteria) this; + } + + public Criteria andBookUrlIsNotNull() { + addCriterion("book_url is not null"); + return (Criteria) this; + } + + public Criteria andBookUrlEqualTo(String value) { + addCriterion("book_url =", value, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookUrlNotEqualTo(String value) { + addCriterion("book_url <>", value, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookUrlGreaterThan(String value) { + addCriterion("book_url >", value, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookUrlGreaterThanOrEqualTo(String value) { + addCriterion("book_url >=", value, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookUrlLessThan(String value) { + addCriterion("book_url <", value, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookUrlLessThanOrEqualTo(String value) { + addCriterion("book_url <=", value, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookUrlLike(String value) { + addCriterion("book_url like", value, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookUrlNotLike(String value) { + addCriterion("book_url not like", value, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookUrlIn(List values) { + addCriterion("book_url in", values, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookUrlNotIn(List values) { + addCriterion("book_url not in", values, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookUrlBetween(String value1, String value2) { + addCriterion("book_url between", value1, value2, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookUrlNotBetween(String value1, String value2) { + addCriterion("book_url not between", value1, value2, "bookUrl"); + return (Criteria) this; + } + + public Criteria andBookNameIsNull() { + addCriterion("book_name is null"); + return (Criteria) this; + } + + public Criteria andBookNameIsNotNull() { + addCriterion("book_name is not null"); + return (Criteria) this; + } + + public Criteria andBookNameEqualTo(String value) { + addCriterion("book_name =", value, "bookName"); + return (Criteria) this; + } + + public Criteria andBookNameNotEqualTo(String value) { + addCriterion("book_name <>", value, "bookName"); + return (Criteria) this; + } + + public Criteria andBookNameGreaterThan(String value) { + addCriterion("book_name >", value, "bookName"); + return (Criteria) this; + } + + public Criteria andBookNameGreaterThanOrEqualTo(String value) { + addCriterion("book_name >=", value, "bookName"); + return (Criteria) this; + } + + public Criteria andBookNameLessThan(String value) { + addCriterion("book_name <", value, "bookName"); + return (Criteria) this; + } + + public Criteria andBookNameLessThanOrEqualTo(String value) { + addCriterion("book_name <=", value, "bookName"); + return (Criteria) this; + } + + public Criteria andBookNameLike(String value) { + addCriterion("book_name like", value, "bookName"); + return (Criteria) this; + } + + public Criteria andBookNameNotLike(String value) { + addCriterion("book_name not like", value, "bookName"); + return (Criteria) this; + } + + public Criteria andBookNameIn(List values) { + addCriterion("book_name in", values, "bookName"); + return (Criteria) this; + } + + public Criteria andBookNameNotIn(List values) { + addCriterion("book_name not in", values, "bookName"); + return (Criteria) this; + } + + public Criteria andBookNameBetween(String value1, String value2) { + addCriterion("book_name between", value1, value2, "bookName"); + return (Criteria) this; + } + + public Criteria andBookNameNotBetween(String value1, String value2) { + addCriterion("book_name not between", value1, value2, "bookName"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Float value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Float value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Float value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Float value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Float value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Float value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Float value1, Float value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Float value1, Float value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andPriorityIsNull() { + addCriterion("priority is null"); + return (Criteria) this; + } + + public Criteria andPriorityIsNotNull() { + addCriterion("priority is not null"); + return (Criteria) this; + } + + public Criteria andPriorityEqualTo(Byte value) { + addCriterion("priority =", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotEqualTo(Byte value) { + addCriterion("priority <>", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityGreaterThan(Byte value) { + addCriterion("priority >", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityGreaterThanOrEqualTo(Byte value) { + addCriterion("priority >=", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityLessThan(Byte value) { + addCriterion("priority <", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityLessThanOrEqualTo(Byte value) { + addCriterion("priority <=", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityIn(List values) { + addCriterion("priority in", values, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotIn(List values) { + addCriterion("priority not in", values, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityBetween(Byte value1, Byte value2) { + addCriterion("priority between", value1, value2, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotBetween(Byte value1, Byte value2) { + addCriterion("priority not between", value1, value2, "priority"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/novel-front/src/main/resources/mybatis/mapping/BookParseLogMapper.xml b/novel-front/src/main/resources/mybatis/mapping/BookParseLogMapper.xml new file mode 100644 index 0000000..7aded6d --- /dev/null +++ b/novel-front/src/main/resources/mybatis/mapping/BookParseLogMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, book_url, book_name, score, create_time, priority + + + + + delete from book_parse_log + where id = #{id,jdbcType=BIGINT} + + + delete from book_parse_log + + + + + + insert into book_parse_log (id, book_url, book_name, + score, create_time, priority + ) + values (#{id,jdbcType=BIGINT}, #{bookUrl,jdbcType=VARCHAR}, #{bookName,jdbcType=VARCHAR}, + #{score,jdbcType=REAL}, #{createTime,jdbcType=TIMESTAMP}, #{priority,jdbcType=TINYINT} + ) + + + insert into book_parse_log + + + id, + + + book_url, + + + book_name, + + + score, + + + create_time, + + + priority, + + + + + #{id,jdbcType=BIGINT}, + + + #{bookUrl,jdbcType=VARCHAR}, + + + #{bookName,jdbcType=VARCHAR}, + + + #{score,jdbcType=REAL}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{priority,jdbcType=TINYINT}, + + + + + + update book_parse_log + + + id = #{record.id,jdbcType=BIGINT}, + + + book_url = #{record.bookUrl,jdbcType=VARCHAR}, + + + book_name = #{record.bookName,jdbcType=VARCHAR}, + + + score = #{record.score,jdbcType=REAL}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + priority = #{record.priority,jdbcType=TINYINT}, + + + + + + + + update book_parse_log + set id = #{record.id,jdbcType=BIGINT}, + book_url = #{record.bookUrl,jdbcType=VARCHAR}, + book_name = #{record.bookName,jdbcType=VARCHAR}, + score = #{record.score,jdbcType=REAL}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + priority = #{record.priority,jdbcType=TINYINT} + + + + + + update book_parse_log + + + book_url = #{bookUrl,jdbcType=VARCHAR}, + + + book_name = #{bookName,jdbcType=VARCHAR}, + + + score = #{score,jdbcType=REAL}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + priority = #{priority,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update book_parse_log + set book_url = #{bookUrl,jdbcType=VARCHAR}, + book_name = #{bookName,jdbcType=VARCHAR}, + score = #{score,jdbcType=REAL}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + priority = #{priority,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file