diff --git a/litemall-db/src/main/java/org/linlinjava/litemall/db/dao/LitemallFeedbackMapper.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/dao/LitemallFeedbackMapper.java new file mode 100644 index 00000000..f1c973ba --- /dev/null +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/dao/LitemallFeedbackMapper.java @@ -0,0 +1,214 @@ +package org.linlinjava.litemall.db.dao; + +import org.apache.ibatis.annotations.Param; +import org.linlinjava.litemall.db.domain.LitemallFeedback; +import org.linlinjava.litemall.db.domain.LitemallFeedbackExample; + +import java.util.List; + +public interface LitemallFeedbackMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + long countByExample(LitemallFeedbackExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + int deleteWithVersionByExample(@Param("version") Integer version, @Param("example") LitemallFeedbackExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + int deleteByExample(LitemallFeedbackExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + int deleteWithVersionByPrimaryKey(@Param("version") Integer version, @Param("key") Integer key); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + int deleteByPrimaryKey(Integer id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + int insert(LitemallFeedback record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + int insertSelective(LitemallFeedback record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + LitemallFeedback selectOneByExample(LitemallFeedbackExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + LitemallFeedback selectOneByExampleSelective(@Param("example") LitemallFeedbackExample example, @Param("selective") LitemallFeedback.Column... selective); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + List selectByExampleSelective(@Param("example") LitemallFeedbackExample example, @Param("selective") LitemallFeedback.Column... selective); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + List selectByExample(LitemallFeedbackExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + LitemallFeedback selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") LitemallFeedback.Column... selective); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + LitemallFeedback selectByPrimaryKey(Integer id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + LitemallFeedback selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + int updateWithVersionByExample(@Param("version") Integer version, @Param("record") LitemallFeedback record, @Param("example") LitemallFeedbackExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + int updateWithVersionByExampleSelective(@Param("version") Integer version, @Param("record") LitemallFeedback record, @Param("example") LitemallFeedbackExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") LitemallFeedback record, @Param("example") LitemallFeedbackExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + int updateByExample(@Param("record") LitemallFeedback record, @Param("example") LitemallFeedbackExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + int updateWithVersionByPrimaryKey(@Param("version") Integer version, @Param("record") LitemallFeedback record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + int updateWithVersionByPrimaryKeySelective(@Param("version") Integer version, @Param("record") LitemallFeedback record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(LitemallFeedback record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + int updateByPrimaryKey(LitemallFeedback record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + int logicalDeleteByExample(@Param("example") LitemallFeedbackExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + int logicalDeleteByPrimaryKey(Integer id); +} \ No newline at end of file diff --git a/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallFeedback.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallFeedback.java new file mode 100644 index 00000000..a75bbc9c --- /dev/null +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallFeedback.java @@ -0,0 +1,703 @@ +package org.linlinjava.litemall.db.domain; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Arrays; + +public class LitemallFeedback { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public static final Boolean NOT_DELETED = false; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public static final Boolean IS_DELETED = true; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.id + * + * @mbg.generated + */ + private Integer id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.user_id + * + * @mbg.generated + */ + private Integer userId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.username + * + * @mbg.generated + */ + private String username; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.mobile + * + * @mbg.generated + */ + private String mobile; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.feed_type + * + * @mbg.generated + */ + private String feedType; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.content + * + * @mbg.generated + */ + private String content; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.status + * + * @mbg.generated + */ + private Integer status; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.has_picture + * + * @mbg.generated + */ + private Boolean hasPicture; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.pic_urls + * + * @mbg.generated + */ + private String[] picUrls; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.add_time + * + * @mbg.generated + */ + private LocalDateTime addTime; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.deleted + * + * @mbg.generated + */ + private Boolean deleted; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column litemall_feedback.version + * + * @mbg.generated + */ + private Integer version; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.id + * + * @return the value of litemall_feedback.id + * + * @mbg.generated + */ + public Integer getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.id + * + * @param id the value for litemall_feedback.id + * + * @mbg.generated + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.user_id + * + * @return the value of litemall_feedback.user_id + * + * @mbg.generated + */ + public Integer getUserId() { + return userId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.user_id + * + * @param userId the value for litemall_feedback.user_id + * + * @mbg.generated + */ + public void setUserId(Integer userId) { + this.userId = userId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.username + * + * @return the value of litemall_feedback.username + * + * @mbg.generated + */ + public String getUsername() { + return username; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.username + * + * @param username the value for litemall_feedback.username + * + * @mbg.generated + */ + public void setUsername(String username) { + this.username = username; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.mobile + * + * @return the value of litemall_feedback.mobile + * + * @mbg.generated + */ + public String getMobile() { + return mobile; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.mobile + * + * @param mobile the value for litemall_feedback.mobile + * + * @mbg.generated + */ + public void setMobile(String mobile) { + this.mobile = mobile; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.feed_type + * + * @return the value of litemall_feedback.feed_type + * + * @mbg.generated + */ + public String getFeedType() { + return feedType; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.feed_type + * + * @param feedType the value for litemall_feedback.feed_type + * + * @mbg.generated + */ + public void setFeedType(String feedType) { + this.feedType = feedType; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.content + * + * @return the value of litemall_feedback.content + * + * @mbg.generated + */ + public String getContent() { + return content; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.content + * + * @param content the value for litemall_feedback.content + * + * @mbg.generated + */ + public void setContent(String content) { + this.content = content; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.status + * + * @return the value of litemall_feedback.status + * + * @mbg.generated + */ + public Integer getStatus() { + return status; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.status + * + * @param status the value for litemall_feedback.status + * + * @mbg.generated + */ + public void setStatus(Integer status) { + this.status = status; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.has_picture + * + * @return the value of litemall_feedback.has_picture + * + * @mbg.generated + */ + public Boolean getHasPicture() { + return hasPicture; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.has_picture + * + * @param hasPicture the value for litemall_feedback.has_picture + * + * @mbg.generated + */ + public void setHasPicture(Boolean hasPicture) { + this.hasPicture = hasPicture; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.pic_urls + * + * @return the value of litemall_feedback.pic_urls + * + * @mbg.generated + */ + public String[] getPicUrls() { + return picUrls; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.pic_urls + * + * @param picUrls the value for litemall_feedback.pic_urls + * + * @mbg.generated + */ + public void setPicUrls(String[] picUrls) { + this.picUrls = picUrls; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.add_time + * + * @return the value of litemall_feedback.add_time + * + * @mbg.generated + */ + public LocalDateTime getAddTime() { + return addTime; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.add_time + * + * @param addTime the value for litemall_feedback.add_time + * + * @mbg.generated + */ + public void setAddTime(LocalDateTime addTime) { + this.addTime = addTime; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.deleted + * + * @return the value of litemall_feedback.deleted + * + * @mbg.generated + */ + public Boolean getDeleted() { + return deleted; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.deleted + * + * @param deleted the value for litemall_feedback.deleted + * + * @mbg.generated + */ + public void setDeleted(Boolean deleted) { + this.deleted = deleted; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column litemall_feedback.version + * + * @return the value of litemall_feedback.version + * + * @mbg.generated + */ + public Integer getVersion() { + return version; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column litemall_feedback.version + * + * @param version the value for litemall_feedback.version + * + * @mbg.generated + */ + public void setVersion(Integer version) { + this.version = version; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", username=").append(username); + sb.append(", mobile=").append(mobile); + sb.append(", feedType=").append(feedType); + sb.append(", content=").append(content); + sb.append(", status=").append(status); + sb.append(", hasPicture=").append(hasPicture); + sb.append(", picUrls=").append(picUrls); + sb.append(", addTime=").append(addTime); + sb.append(", deleted=").append(deleted); + sb.append(", version=").append(version); + sb.append("]"); + return sb.toString(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LitemallFeedback other = (LitemallFeedback) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername())) + && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile())) + && (this.getFeedType() == null ? other.getFeedType() == null : this.getFeedType().equals(other.getFeedType())) + && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getHasPicture() == null ? other.getHasPicture() == null : this.getHasPicture().equals(other.getHasPicture())) + && (Arrays.equals(this.getPicUrls(), other.getPicUrls())) + && (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime())) + && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted())) + && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion())); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode()); + result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode()); + result = prime * result + ((getFeedType() == null) ? 0 : getFeedType().hashCode()); + result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getHasPicture() == null) ? 0 : getHasPicture().hashCode()); + result = prime * result + (Arrays.hashCode(getPicUrls())); + result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode()); + result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode()); + result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode()); + return result; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public void andLogicalDeleted(boolean deleted) { + setDeleted(deleted ? IS_DELETED : NOT_DELETED); + } + + /** + * This enum was generated by MyBatis Generator. + * This enum corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public enum Column { + id("id", "id", "INTEGER", false), + userId("user_id", "userId", "INTEGER", false), + username("username", "username", "VARCHAR", false), + mobile("mobile", "mobile", "VARCHAR", false), + feedType("feed_type", "feedType", "VARCHAR", false), + content("content", "content", "VARCHAR", false), + status("status", "status", "INTEGER", true), + hasPicture("has_picture", "hasPicture", "BIT", false), + picUrls("pic_urls", "picUrls", "VARCHAR", false), + addTime("add_time", "addTime", "TIMESTAMP", false), + deleted("deleted", "deleted", "BIT", false), + version("version", "version", "INTEGER", false); + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + private static final String BEGINNING_DELIMITER = "`"; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + private static final String ENDING_DELIMITER = "`"; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + private final String column; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + private final boolean isColumnNameDelimited; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + private final String javaProperty; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + private final String jdbcType; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public String value() { + return this.column; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public String getValue() { + return this.column; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public String getJavaProperty() { + return this.javaProperty; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public String getJdbcType() { + return this.jdbcType; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { + this.column = column; + this.javaProperty = javaProperty; + this.jdbcType = jdbcType; + this.isColumnNameDelimited = isColumnNameDelimited; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public String desc() { + return this.getEscapedColumnName() + " DESC"; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public String asc() { + return this.getEscapedColumnName() + " ASC"; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public static Column[] excludes(Column ... excludes) { + ArrayList columns = new ArrayList<>(Arrays.asList(Column.values())); + if (excludes != null && excludes.length > 0) { + columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); + } + return columns.toArray(new Column[]{}); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public String getEscapedColumnName() { + if (this.isColumnNameDelimited) { + return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); + } else { + return this.column; + } + } + } +} \ No newline at end of file diff --git a/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallFeedbackExample.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallFeedbackExample.java new file mode 100644 index 00000000..5d80f40a --- /dev/null +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallFeedbackExample.java @@ -0,0 +1,2072 @@ +package org.linlinjava.litemall.db.domain; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class LitemallFeedbackExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + public LitemallFeedbackExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public LitemallFeedbackExample orderBy(String orderByClause) { + this.setOrderByClause(orderByClause); + return this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public LitemallFeedbackExample orderBy(String ... orderByClauses) { + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < orderByClauses.length; i++) { + sb.append(orderByClauses[i]); + if (i < orderByClauses.length - 1) { + sb.append(" , "); + } + } + this.setOrderByClause(sb.toString()); + return this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(this); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List picUrlsCriteria; + + protected List allCriteria; + + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + picUrlsCriteria = new ArrayList(); + } + + public List getPicUrlsCriteria() { + return picUrlsCriteria; + } + + protected void addPicUrlsCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + picUrlsCriteria.add(new Criterion(condition, value, "org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler")); + allCriteria = null; + } + + protected void addPicUrlsCriterion(String condition, String[] value1, String[] value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + picUrlsCriteria.add(new Criterion(condition, value1, value2, "org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler")); + allCriteria = null; + } + + public boolean isValid() { + return criteria.size() > 0 + || picUrlsCriteria.size() > 0; + } + + public List getAllCriteria() { + if (allCriteria == null) { + allCriteria = new ArrayList(); + allCriteria.addAll(criteria); + allCriteria.addAll(picUrlsCriteria); + } + return allCriteria; + } + + 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)); + allCriteria = null; + } + + 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)); + allCriteria = null; + } + + 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)); + allCriteria = null; + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andIdEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andIdNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andIdGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andIdGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andIdLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andIdLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString()); + 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(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Integer value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUserIdEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("user_id = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Integer value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUserIdNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("user_id <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Integer value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUserIdGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("user_id > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUserIdGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("user_id >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Integer value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUserIdLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("user_id < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Integer value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUserIdLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("user_id <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Integer value1, Integer value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Integer value1, Integer value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUsernameIsNull() { + addCriterion("username is null"); + return (Criteria) this; + } + + public Criteria andUsernameIsNotNull() { + addCriterion("username is not null"); + return (Criteria) this; + } + + public Criteria andUsernameEqualTo(String value) { + addCriterion("username =", value, "username"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUsernameEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("username = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUsernameNotEqualTo(String value) { + addCriterion("username <>", value, "username"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUsernameNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("username <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUsernameGreaterThan(String value) { + addCriterion("username >", value, "username"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUsernameGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("username > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUsernameGreaterThanOrEqualTo(String value) { + addCriterion("username >=", value, "username"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUsernameGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("username >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUsernameLessThan(String value) { + addCriterion("username <", value, "username"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUsernameLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("username < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUsernameLessThanOrEqualTo(String value) { + addCriterion("username <=", value, "username"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andUsernameLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("username <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andUsernameLike(String value) { + addCriterion("username like", value, "username"); + return (Criteria) this; + } + + public Criteria andUsernameNotLike(String value) { + addCriterion("username not like", value, "username"); + return (Criteria) this; + } + + public Criteria andUsernameIn(List values) { + addCriterion("username in", values, "username"); + return (Criteria) this; + } + + public Criteria andUsernameNotIn(List values) { + addCriterion("username not in", values, "username"); + return (Criteria) this; + } + + public Criteria andUsernameBetween(String value1, String value2) { + addCriterion("username between", value1, value2, "username"); + return (Criteria) this; + } + + public Criteria andUsernameNotBetween(String value1, String value2) { + addCriterion("username not between", value1, value2, "username"); + return (Criteria) this; + } + + public Criteria andMobileIsNull() { + addCriterion("mobile is null"); + return (Criteria) this; + } + + public Criteria andMobileIsNotNull() { + addCriterion("mobile is not null"); + return (Criteria) this; + } + + public Criteria andMobileEqualTo(String value) { + addCriterion("mobile =", value, "mobile"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andMobileEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("mobile = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andMobileNotEqualTo(String value) { + addCriterion("mobile <>", value, "mobile"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andMobileNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("mobile <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andMobileGreaterThan(String value) { + addCriterion("mobile >", value, "mobile"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andMobileGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("mobile > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andMobileGreaterThanOrEqualTo(String value) { + addCriterion("mobile >=", value, "mobile"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andMobileGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("mobile >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andMobileLessThan(String value) { + addCriterion("mobile <", value, "mobile"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andMobileLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("mobile < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andMobileLessThanOrEqualTo(String value) { + addCriterion("mobile <=", value, "mobile"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andMobileLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("mobile <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andMobileLike(String value) { + addCriterion("mobile like", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileNotLike(String value) { + addCriterion("mobile not like", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileIn(List values) { + addCriterion("mobile in", values, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileNotIn(List values) { + addCriterion("mobile not in", values, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileBetween(String value1, String value2) { + addCriterion("mobile between", value1, value2, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileNotBetween(String value1, String value2) { + addCriterion("mobile not between", value1, value2, "mobile"); + return (Criteria) this; + } + + public Criteria andFeedTypeIsNull() { + addCriterion("feed_type is null"); + return (Criteria) this; + } + + public Criteria andFeedTypeIsNotNull() { + addCriterion("feed_type is not null"); + return (Criteria) this; + } + + public Criteria andFeedTypeEqualTo(String value) { + addCriterion("feed_type =", value, "feedType"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andFeedTypeEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("feed_type = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andFeedTypeNotEqualTo(String value) { + addCriterion("feed_type <>", value, "feedType"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andFeedTypeNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("feed_type <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andFeedTypeGreaterThan(String value) { + addCriterion("feed_type >", value, "feedType"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andFeedTypeGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("feed_type > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andFeedTypeGreaterThanOrEqualTo(String value) { + addCriterion("feed_type >=", value, "feedType"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andFeedTypeGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("feed_type >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andFeedTypeLessThan(String value) { + addCriterion("feed_type <", value, "feedType"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andFeedTypeLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("feed_type < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andFeedTypeLessThanOrEqualTo(String value) { + addCriterion("feed_type <=", value, "feedType"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andFeedTypeLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("feed_type <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andFeedTypeLike(String value) { + addCriterion("feed_type like", value, "feedType"); + return (Criteria) this; + } + + public Criteria andFeedTypeNotLike(String value) { + addCriterion("feed_type not like", value, "feedType"); + return (Criteria) this; + } + + public Criteria andFeedTypeIn(List values) { + addCriterion("feed_type in", values, "feedType"); + return (Criteria) this; + } + + public Criteria andFeedTypeNotIn(List values) { + addCriterion("feed_type not in", values, "feedType"); + return (Criteria) this; + } + + public Criteria andFeedTypeBetween(String value1, String value2) { + addCriterion("feed_type between", value1, value2, "feedType"); + return (Criteria) this; + } + + public Criteria andFeedTypeNotBetween(String value1, String value2) { + addCriterion("feed_type not between", value1, value2, "feedType"); + return (Criteria) this; + } + + public Criteria andContentIsNull() { + addCriterion("content is null"); + return (Criteria) this; + } + + public Criteria andContentIsNotNull() { + addCriterion("content is not null"); + return (Criteria) this; + } + + public Criteria andContentEqualTo(String value) { + addCriterion("content =", value, "content"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andContentEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("content = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andContentNotEqualTo(String value) { + addCriterion("content <>", value, "content"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andContentNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("content <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andContentGreaterThan(String value) { + addCriterion("content >", value, "content"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andContentGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("content > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andContentGreaterThanOrEqualTo(String value) { + addCriterion("content >=", value, "content"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andContentGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("content >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andContentLessThan(String value) { + addCriterion("content <", value, "content"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andContentLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("content < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andContentLessThanOrEqualTo(String value) { + addCriterion("content <=", value, "content"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andContentLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("content <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andContentLike(String value) { + addCriterion("content like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotLike(String value) { + addCriterion("content not like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentIn(List values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List values) { + addCriterion("content not in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentBetween(String value1, String value2) { + addCriterion("content between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andContentNotBetween(String value1, String value2) { + addCriterion("content not between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andStatusEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("`status` = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andStatusNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("`status` <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andStatusGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("`status` > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andStatusGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("`status` >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andStatusLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("`status` < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andStatusLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("`status` <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andHasPictureIsNull() { + addCriterion("has_picture is null"); + return (Criteria) this; + } + + public Criteria andHasPictureIsNotNull() { + addCriterion("has_picture is not null"); + return (Criteria) this; + } + + public Criteria andHasPictureEqualTo(Boolean value) { + addCriterion("has_picture =", value, "hasPicture"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andHasPictureEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("has_picture = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andHasPictureNotEqualTo(Boolean value) { + addCriterion("has_picture <>", value, "hasPicture"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andHasPictureNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("has_picture <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andHasPictureGreaterThan(Boolean value) { + addCriterion("has_picture >", value, "hasPicture"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andHasPictureGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("has_picture > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andHasPictureGreaterThanOrEqualTo(Boolean value) { + addCriterion("has_picture >=", value, "hasPicture"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andHasPictureGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("has_picture >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andHasPictureLessThan(Boolean value) { + addCriterion("has_picture <", value, "hasPicture"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andHasPictureLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("has_picture < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andHasPictureLessThanOrEqualTo(Boolean value) { + addCriterion("has_picture <=", value, "hasPicture"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andHasPictureLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("has_picture <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andHasPictureIn(List values) { + addCriterion("has_picture in", values, "hasPicture"); + return (Criteria) this; + } + + public Criteria andHasPictureNotIn(List values) { + addCriterion("has_picture not in", values, "hasPicture"); + return (Criteria) this; + } + + public Criteria andHasPictureBetween(Boolean value1, Boolean value2) { + addCriterion("has_picture between", value1, value2, "hasPicture"); + return (Criteria) this; + } + + public Criteria andHasPictureNotBetween(Boolean value1, Boolean value2) { + addCriterion("has_picture not between", value1, value2, "hasPicture"); + return (Criteria) this; + } + + public Criteria andPicUrlsIsNull() { + addCriterion("pic_urls is null"); + return (Criteria) this; + } + + public Criteria andPicUrlsIsNotNull() { + addCriterion("pic_urls is not null"); + return (Criteria) this; + } + + public Criteria andPicUrlsEqualTo(String[] value) { + addPicUrlsCriterion("pic_urls =", value, "picUrls"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andPicUrlsEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("pic_urls = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlsNotEqualTo(String[] value) { + addPicUrlsCriterion("pic_urls <>", value, "picUrls"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andPicUrlsNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("pic_urls <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlsGreaterThan(String[] value) { + addPicUrlsCriterion("pic_urls >", value, "picUrls"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andPicUrlsGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("pic_urls > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlsGreaterThanOrEqualTo(String[] value) { + addPicUrlsCriterion("pic_urls >=", value, "picUrls"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andPicUrlsGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("pic_urls >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlsLessThan(String[] value) { + addPicUrlsCriterion("pic_urls <", value, "picUrls"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andPicUrlsLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("pic_urls < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlsLessThanOrEqualTo(String[] value) { + addPicUrlsCriterion("pic_urls <=", value, "picUrls"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andPicUrlsLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("pic_urls <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andPicUrlsLike(String[] value) { + addPicUrlsCriterion("pic_urls like", value, "picUrls"); + return (Criteria) this; + } + + public Criteria andPicUrlsNotLike(String[] value) { + addPicUrlsCriterion("pic_urls not like", value, "picUrls"); + return (Criteria) this; + } + + public Criteria andPicUrlsIn(List values) { + addPicUrlsCriterion("pic_urls in", values, "picUrls"); + return (Criteria) this; + } + + public Criteria andPicUrlsNotIn(List values) { + addPicUrlsCriterion("pic_urls not in", values, "picUrls"); + return (Criteria) this; + } + + public Criteria andPicUrlsBetween(String[] value1, String[] value2) { + addPicUrlsCriterion("pic_urls between", value1, value2, "picUrls"); + return (Criteria) this; + } + + public Criteria andPicUrlsNotBetween(String[] value1, String[] value2) { + addPicUrlsCriterion("pic_urls not between", value1, value2, "picUrls"); + return (Criteria) this; + } + + public Criteria andAddTimeIsNull() { + addCriterion("add_time is null"); + return (Criteria) this; + } + + public Criteria andAddTimeIsNotNull() { + addCriterion("add_time is not null"); + return (Criteria) this; + } + + public Criteria andAddTimeEqualTo(LocalDateTime value) { + addCriterion("add_time =", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andAddTimeEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("add_time = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeNotEqualTo(LocalDateTime value) { + addCriterion("add_time <>", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andAddTimeNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("add_time <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeGreaterThan(LocalDateTime value) { + addCriterion("add_time >", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andAddTimeGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("add_time > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("add_time >=", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andAddTimeGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("add_time >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeLessThan(LocalDateTime value) { + addCriterion("add_time <", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andAddTimeLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("add_time < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("add_time <=", value, "addTime"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andAddTimeLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("add_time <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andAddTimeIn(List values) { + addCriterion("add_time in", values, "addTime"); + return (Criteria) this; + } + + public Criteria andAddTimeNotIn(List values) { + addCriterion("add_time not in", values, "addTime"); + return (Criteria) this; + } + + public Criteria andAddTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("add_time between", value1, value2, "addTime"); + return (Criteria) this; + } + + public Criteria andAddTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("add_time not between", value1, value2, "addTime"); + return (Criteria) this; + } + + public Criteria andDeletedIsNull() { + addCriterion("deleted is null"); + return (Criteria) this; + } + + public Criteria andDeletedIsNotNull() { + addCriterion("deleted is not null"); + return (Criteria) this; + } + + public Criteria andDeletedEqualTo(Boolean value) { + addCriterion("deleted =", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andDeletedEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("deleted = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedNotEqualTo(Boolean value) { + addCriterion("deleted <>", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andDeletedNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("deleted <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThan(Boolean value) { + addCriterion("deleted >", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andDeletedGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("deleted > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedGreaterThanOrEqualTo(Boolean value) { + addCriterion("deleted >=", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andDeletedGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("deleted >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedLessThan(Boolean value) { + addCriterion("deleted <", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andDeletedLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("deleted < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedLessThanOrEqualTo(Boolean value) { + addCriterion("deleted <=", value, "deleted"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andDeletedLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("deleted <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andDeletedIn(List values) { + addCriterion("deleted in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotIn(List values) { + addCriterion("deleted not in", values, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedBetween(Boolean value1, Boolean value2) { + addCriterion("deleted between", value1, value2, "deleted"); + return (Criteria) this; + } + + public Criteria andDeletedNotBetween(Boolean value1, Boolean value2) { + addCriterion("deleted not between", value1, value2, "deleted"); + return (Criteria) this; + } + + public Criteria andVersionIsNull() { + addCriterion("version is null"); + return (Criteria) this; + } + + public Criteria andVersionIsNotNull() { + addCriterion("version is not null"); + return (Criteria) this; + } + + public Criteria andVersionEqualTo(Integer value) { + addCriterion("version =", value, "version"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andVersionEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("version = ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andVersionNotEqualTo(Integer value) { + addCriterion("version <>", value, "version"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andVersionNotEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("version <> ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andVersionGreaterThan(Integer value) { + addCriterion("version >", value, "version"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andVersionGreaterThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("version > ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andVersionGreaterThanOrEqualTo(Integer value) { + addCriterion("version >=", value, "version"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andVersionGreaterThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("version >= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andVersionLessThan(Integer value) { + addCriterion("version <", value, "version"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andVersionLessThanColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("version < ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andVersionLessThanOrEqualTo(Integer value) { + addCriterion("version <=", value, "version"); + return (Criteria) this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andVersionLessThanOrEqualToColumn(LitemallFeedback.Column column) { + addCriterion(new StringBuilder("version <= ").append(column.getEscapedColumnName()).toString()); + return (Criteria) this; + } + + public Criteria andVersionIn(List values) { + addCriterion("version in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotIn(List values) { + addCriterion("version not in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionBetween(Integer value1, Integer value2) { + addCriterion("version between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotBetween(Integer value1, Integer value2) { + addCriterion("version not between", value1, value2, "version"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table litemall_feedback + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + private LitemallFeedbackExample example; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + protected Criteria(LitemallFeedbackExample example) { + super(); + this.example = example; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public LitemallFeedbackExample example() { + return this.example; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andIf(boolean ifAdd, ICriteriaAdd add) { + if (ifAdd) { + add.add(this); + } + return this; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public Criteria andLogicalDeleted(boolean deleted) { + return deleted ? andDeletedEqualTo(LitemallFeedback.IS_DELETED) : andDeletedNotEqualTo(LitemallFeedback.IS_DELETED); + } + + /** + * This interface was generated by MyBatis Generator. + * This interface corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + public interface ICriteriaAdd { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table litemall_feedback + * + * @mbg.generated + * @project https://github.com/itfsw/mybatis-generator-plugin + */ + Criteria add(Criteria add); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table litemall_feedback + * + * @mbg.generated + */ + 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/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallFeedbackService.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallFeedbackService.java new file mode 100644 index 00000000..d09dadae --- /dev/null +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallFeedbackService.java @@ -0,0 +1,72 @@ +package org.linlinjava.litemall.db.service; + +import com.github.pagehelper.PageHelper; +import org.linlinjava.litemall.db.dao.LitemallFeedbackMapper; +import org.linlinjava.litemall.db.domain.LitemallFeedback; +import org.linlinjava.litemall.db.domain.LitemallFeedbackExample; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +import java.util.List; + +/** + * @author Yogeek + * @date 2018/8/27 11:39 + */ +@Service +public class LitemallFeedbackService { + @Autowired + private LitemallFeedbackMapper feedbackMapper; + + //提交 + public Integer add(LitemallFeedback feedback) { + return feedbackMapper.insertSelective(feedback); + } + + public List querySelective(Integer userId, String username, Integer page, Integer limit, String sort, String order) { + LitemallFeedbackExample example = new LitemallFeedbackExample(); + LitemallFeedbackExample.Criteria criteria = example.createCriteria(); + + if(userId != null){ + criteria.andUserIdEqualTo(userId); + } + if(!StringUtils.isEmpty(username)){ + criteria.andUsernameLike("%" + username + "%"); + } + criteria.andDeletedEqualTo(false); + + if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) { + example.setOrderByClause(sort + " " + order); + } + + PageHelper.startPage(page, limit); + return feedbackMapper.selectByExample(example); + } + + public int countSelective(Integer userId, String username, Integer page, Integer limit, String sort, String order) { + LitemallFeedbackExample example = new LitemallFeedbackExample(); + LitemallFeedbackExample.Criteria criteria = example.createCriteria(); + + if(userId != null){ + criteria.andUserIdEqualTo(userId); + } + if(!StringUtils.isEmpty(username)){ + criteria.andUsernameLike("%" + username + "%"); + } + criteria.andDeletedEqualTo(false); + return (int)feedbackMapper.countByExample(example); + } + + public LitemallFeedback findById(Integer id) { + return feedbackMapper.selectByPrimaryKey(id); + } + + public void updateById(LitemallFeedback feedback) { + feedbackMapper.updateByPrimaryKeySelective(feedback); + } + + public void delete(Integer id) { + feedbackMapper.logicalDeleteByPrimaryKey(id); + } +} diff --git a/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallFeedbackMapper.xml b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallFeedbackMapper.xml new file mode 100644 index 00000000..2a17e5d2 --- /dev/null +++ b/litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallFeedbackMapper.xml @@ -0,0 +1,774 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} and #{criterion.secondValue,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} + + + + + + + + + + + + + + + + + + + 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,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} and #{criterion.secondValue,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} + + + + + + + + + + + + + version = #{version,jdbcType=INTEGER} + + + + + + + + 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,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} and #{criterion.secondValue,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler} + + + + + + + + + + + + + id, user_id, username, mobile, feed_type, content, `status`, has_picture, pic_urls, + add_time, deleted, version + + + + + + + + + delete from litemall_feedback + where id = #{id,jdbcType=INTEGER} + + + + delete from litemall_feedback + + + + + + + + SELECT LAST_INSERT_ID() + + insert into litemall_feedback (user_id, username, mobile, + feed_type, content, `status`, + has_picture, pic_urls, + add_time, deleted, version + ) + values (#{userId,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, + #{feedType,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, + #{hasPicture,jdbcType=BIT}, #{picUrls,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + #{addTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}, #{version,jdbcType=INTEGER} + ) + + + + + SELECT LAST_INSERT_ID() + + insert into litemall_feedback + + + user_id, + + + username, + + + mobile, + + + feed_type, + + + content, + + + `status`, + + + has_picture, + + + pic_urls, + + + add_time, + + + deleted, + + + version, + + + + + #{userId,jdbcType=INTEGER}, + + + #{username,jdbcType=VARCHAR}, + + + #{mobile,jdbcType=VARCHAR}, + + + #{feedType,jdbcType=VARCHAR}, + + + #{content,jdbcType=VARCHAR}, + + + #{status,jdbcType=INTEGER}, + + + #{hasPicture,jdbcType=BIT}, + + + #{picUrls,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + + + #{addTime,jdbcType=TIMESTAMP}, + + + #{deleted,jdbcType=BIT}, + + + #{version,jdbcType=INTEGER}, + + + + + + + update litemall_feedback + + + id = #{record.id,jdbcType=INTEGER}, + + + user_id = #{record.userId,jdbcType=INTEGER}, + + + username = #{record.username,jdbcType=VARCHAR}, + + + mobile = #{record.mobile,jdbcType=VARCHAR}, + + + feed_type = #{record.feedType,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=INTEGER}, + + + has_picture = #{record.hasPicture,jdbcType=BIT}, + + + pic_urls = #{record.picUrls,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + + + add_time = #{record.addTime,jdbcType=TIMESTAMP}, + + + deleted = #{record.deleted,jdbcType=BIT}, + + + version = #{record.version,jdbcType=INTEGER}, + + + + + + + + + update litemall_feedback + set id = #{record.id,jdbcType=INTEGER}, + user_id = #{record.userId,jdbcType=INTEGER}, + username = #{record.username,jdbcType=VARCHAR}, + mobile = #{record.mobile,jdbcType=VARCHAR}, + feed_type = #{record.feedType,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=INTEGER}, + has_picture = #{record.hasPicture,jdbcType=BIT}, + pic_urls = #{record.picUrls,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + add_time = #{record.addTime,jdbcType=TIMESTAMP}, + deleted = #{record.deleted,jdbcType=BIT}, + version = #{record.version,jdbcType=INTEGER} + + + + + + + update litemall_feedback + + + user_id = #{userId,jdbcType=INTEGER}, + + + username = #{username,jdbcType=VARCHAR}, + + + mobile = #{mobile,jdbcType=VARCHAR}, + + + feed_type = #{feedType,jdbcType=VARCHAR}, + + + content = #{content,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=INTEGER}, + + + has_picture = #{hasPicture,jdbcType=BIT}, + + + pic_urls = #{picUrls,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + + + add_time = #{addTime,jdbcType=TIMESTAMP}, + + + deleted = #{deleted,jdbcType=BIT}, + + + version = #{version,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + + update litemall_feedback + set user_id = #{userId,jdbcType=INTEGER}, + username = #{username,jdbcType=VARCHAR}, + mobile = #{mobile,jdbcType=VARCHAR}, + feed_type = #{feedType,jdbcType=VARCHAR}, + content = #{content,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=INTEGER}, + has_picture = #{hasPicture,jdbcType=BIT}, + pic_urls = #{picUrls,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + add_time = #{addTime,jdbcType=TIMESTAMP}, + deleted = #{deleted,jdbcType=BIT}, + version = #{version,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + + + + + update litemall_feedback set deleted = 1 + + + + + + + update litemall_feedback set deleted = 1 + where id = #{id,jdbcType=INTEGER} + + + + delete from litemall_feedback + where version = #{version,jdbcType=INTEGER} + and id = #{key,jdbcType=INTEGER} + + + + delete from litemall_feedback + + + + + + + update litemall_feedback + set version = version + 1, + id = #{record.id,jdbcType=INTEGER}, + user_id = #{record.userId,jdbcType=INTEGER}, + username = #{record.username,jdbcType=VARCHAR}, + mobile = #{record.mobile,jdbcType=VARCHAR}, + feed_type = #{record.feedType,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=INTEGER}, + has_picture = #{record.hasPicture,jdbcType=BIT}, + pic_urls = #{record.picUrls,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + add_time = #{record.addTime,jdbcType=TIMESTAMP}, + deleted = #{record.deleted,jdbcType=BIT} + + + + + + + update litemall_feedback + + + version = version + 1, + + id = #{record.id,jdbcType=INTEGER}, + + + user_id = #{record.userId,jdbcType=INTEGER}, + + + username = #{record.username,jdbcType=VARCHAR}, + + + mobile = #{record.mobile,jdbcType=VARCHAR}, + + + feed_type = #{record.feedType,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=INTEGER}, + + + has_picture = #{record.hasPicture,jdbcType=BIT}, + + + pic_urls = #{record.picUrls,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + + + add_time = #{record.addTime,jdbcType=TIMESTAMP}, + + + deleted = #{record.deleted,jdbcType=BIT}, + + + + + + + + + + update litemall_feedback + set version = version + 1, + user_id = #{record.userId,jdbcType=INTEGER}, + username = #{record.username,jdbcType=VARCHAR}, + mobile = #{record.mobile,jdbcType=VARCHAR}, + feed_type = #{record.feedType,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=INTEGER}, + has_picture = #{record.hasPicture,jdbcType=BIT}, + pic_urls = #{record.picUrls,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + add_time = #{record.addTime,jdbcType=TIMESTAMP}, + deleted = #{record.deleted,jdbcType=BIT} + where version = #{version,jdbcType=INTEGER} + and id = #{record.id,jdbcType=INTEGER} + + + + update litemall_feedback + + + version = version + 1, + + user_id = #{record.userId,jdbcType=INTEGER}, + + + username = #{record.username,jdbcType=VARCHAR}, + + + mobile = #{record.mobile,jdbcType=VARCHAR}, + + + feed_type = #{record.feedType,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=INTEGER}, + + + has_picture = #{record.hasPicture,jdbcType=BIT}, + + + pic_urls = #{record.picUrls,jdbcType=VARCHAR,typeHandler=org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler}, + + + add_time = #{record.addTime,jdbcType=TIMESTAMP}, + + + deleted = #{record.deleted,jdbcType=BIT}, + + + + where version = #{version,jdbcType=INTEGER} + and id = #{record.id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxFeedbackController.java b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxFeedbackController.java new file mode 100644 index 00000000..66c220d4 --- /dev/null +++ b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxFeedbackController.java @@ -0,0 +1,102 @@ +package org.linlinjava.litemall.wx.web; + +import com.alibaba.fastjson.JSONObject; +import org.linlinjava.litemall.core.util.RegexUtil; +import org.linlinjava.litemall.core.util.ResponseUtil; +import org.linlinjava.litemall.db.domain.LitemallFeedback; +import org.linlinjava.litemall.db.domain.LitemallUser; +import org.linlinjava.litemall.db.service.LitemallFeedbackService; +import org.linlinjava.litemall.db.service.LitemallUserService; +import org.linlinjava.litemall.wx.annotation.LoginUser; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; +import java.io.BufferedReader; +import java.io.IOException; +import java.time.LocalDateTime; + + +/** + * @author Yogeek + * @date 2018/8/25 14:10 + */ +@RestController +@RequestMapping("/wx/feedback") +@Validated +public class WxFeedbackController { + private final Log logger = LogFactory.getLog(WxFeedbackController.class); + + @Autowired + private LitemallFeedbackService feedbackService; + @Autowired + protected HttpServletRequest request; + @Autowired + private LitemallUserService userService; + + /** + * 意见反馈 + */ + @PostMapping("submit") + @ResponseBody + public Object save(@LoginUser Integer userId){ + if(userId == null){ + return ResponseUtil.unlogin(); + } + + LitemallUser user = userService.findById(userId); + String username = user.getUsername(); + //获取客户端对象 + JSONObject feedbackJson = this.getJsonRequest(); + + if (null != feedbackJson) { + LitemallFeedback feedback = new LitemallFeedback(); + + String mobile = feedbackJson.getString("mobile"); + // 测试手机号码是否正确 + if (!RegexUtil.isMobileExact(mobile)) { + return ResponseUtil.badArgument(); + } + String[] feedType = new String [] {"请选择反馈类型", "商品相关", "功能异常", "优化建议", "其他"}; + int index = feedbackJson.getInteger("index"); + String content = feedbackJson.getString("content"); + + feedback.setUserId(userId); + feedback.setUsername(username); + feedback.setMobile(mobile); + feedback.setAddTime(LocalDateTime.now()); + feedback.setFeedType(feedType[index]); + //状态默认是0,1表示状态已发生变化 + feedback.setStatus(1); + feedback.setContent(content); + feedbackService.add(feedback); + + return ResponseUtil.ok("感谢您的反馈"); + } + return ResponseUtil.badArgument(); + } + + private JSONObject getJsonRequest() { + JSONObject result = null; + StringBuilder sb = new StringBuilder(); + try (BufferedReader reader = request.getReader();) { + char[] buff = new char[1024]; + int len; + while ((len = reader.read(buff)) != -1) { + sb.append(buff, 0, len); + } + result = JSONObject.parseObject(sb.toString()); + } catch (IOException e) { + e.printStackTrace(); + } + + return result; + } + +}