Commit f60f1a19 authored by shiyu's avatar shiyu

Merge branch 'qiandao_v1.0.1' into qiandao_v1.0

# Conflicts:
#	ch-dao/src/main/java/com/wwdz/ch/db/dao/qiandao/SignInTaskDao.java
#	ch-dao/src/main/java/com/wwdz/ch/db/impl/qiandao/SignInTaskDaoImpl.java
#	ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/SignInTaskServiceImpl.java
#	ch-wx-api/src/main/java/com/wwdz/ch/wx/service/qiandao/SignInTaskService.java
parents 77d8c97d 8c488527
package com.wwdz.ch.core.consts.qiandao;
import com.wwdz.ch.core.consts.AfterSaleEnum;
public class SignInTaskEnum {
/**
* 签到任务状态
*/
public enum StateEnum {
NOT_START(0, "未开始"),
PROCESSING(1, "进行中"),
END(2, "已结束"),
DELETED(-1, "已删除"),
;
private int code;
private String des;
StateEnum(int code, String des) {
this.code = code;
this.des = des;
}
public static String getNameByCode(int code) {
for (SignInTaskEnum.StateEnum stateEnum : SignInTaskEnum.StateEnum.values()) {
if (code == stateEnum.getCode()) {
return stateEnum.getDes();
}
}
return null;
}
public int getCode() {
return code;
}
public String getDes() {
return des;
}
}
/**
* 签到任务状态
*/
public enum TypeEnum {
CONTINUOUS(1, "连续签到任务"),
ACCUMULATE(2, "累计签到任务"),
;
private int code;
private String des;
TypeEnum(int code, String des) {
this.code = code;
this.des = des;
}
public static String getNameByCode(int code) {
for (SignInTaskEnum.TypeEnum typeEnum : SignInTaskEnum.TypeEnum.values()) {
if (code == typeEnum.getCode()) {
return typeEnum.getDes();
}
}
return null;
}
public int getCode() {
return code;
}
public String getDes() {
return des;
}
}
}
package com.wwdz.ch.db.dao.qiandao;
import com.wwdz.ch.db.domain.qiandao.QdUserSignIn;
import com.wwdz.ch.db.dto.request.qiandao.QdUserSignInRequestDto;
import java.util.List;
public interface QdUserSignInDao {
boolean insert(QdUserSignIn qdUserSignIn);
QdUserSignIn findLastedRecord(long userId);
List<QdUserSignIn> findList(QdUserSignInRequestDto dto);
/**
* 查询昨天的签到记录
* @param userId
* @return
*/
QdUserSignIn findYesterdayRecord(long userId);
QdUserSignIn findTodayRecord(long userId);
/**
* 判断某一日期是否签到过
* @param userId
* @param date
* @return
*/
boolean isExisted(long userId, String date);
QdUserSignIn findRecord(long userId, String date, Integer consecutiveDays);
boolean update(QdUserSignIn userSignin);
boolean updateByPrimaryKey(QdUserSignIn userSignin);
boolean deleteTodayRecord(long userId);
boolean updateInvalid(QdUserSignInRequestDto dto);
}
package com.wwdz.ch.db.dao.qiandao;
import com.wwdz.ch.db.domain.qiandao.QdUserSignInNote;
import com.wwdz.ch.db.dto.request.qiandao.QdUserSignInNoteRequestDto;
import java.util.List;
public interface QdUserSignInNoteDao {
boolean insert(QdUserSignInNote qdUserSignInNote);
List<QdUserSignInNote> findByPage(QdUserSignInNoteRequestDto dto);
}
package com.wwdz.ch.db.dao.qiandao; package com.wwdz.ch.db.dao.qiandao;
import com.wwdz.ch.db.domain.qiandao.SignInTask;
import com.wwdz.ch.db.dto.request.qiandao.SignInTaskRequestDto; import com.wwdz.ch.db.dto.request.qiandao.SignInTaskRequestDto;
public interface SignInTaskDao { import java.util.List;
int insert(SignInTaskRequestDto signInTaskRequestDto);
int delete(SignInTaskRequestDto signInTaskRequestDto);
public interface SignInTaskDao {
boolean insert(SignInTask signInTask);
List<SignInTask> findByPage(SignInTaskRequestDto dto);
} }
package com.wwdz.ch.db.domain.qiandao;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data;
/**
* @author shiyu
* @date 2024/12/19
*/
@Data
public class QdGiveLikeRecord implements Entity {
/**
* id
*/
private Long id;
/**
* 用户id
*/
private Long userId;
/**
* 笔记id
*/
private Long noteId;
/**
* 笔记创建人id
*/
private Long noteCreatorId;
/**
* 点赞时间
*/
private Date createTime;
/**
* 更新时间
*/
private Integer updateTime;
/**
* 是否有效
*/
private Boolean isValid;
private static final long serialVersionUID = 1L;
@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(", noteId=").append(noteId);
sb.append(", noteCreatorId=").append(noteCreatorId);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", isValid=").append(isValid);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
QdGiveLikeRecord other = (QdGiveLikeRecord) 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.getNoteId() == null ? other.getNoteId() == null : this.getNoteId().equals(other.getNoteId()))
&& (this.getNoteCreatorId() == null ? other.getNoteCreatorId() == null : this.getNoteCreatorId().equals(other.getNoteCreatorId()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getIsValid() == null ? other.getIsValid() == null : this.getIsValid().equals(other.getIsValid()));
}
@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 + ((getNoteId() == null) ? 0 : getNoteId().hashCode());
result = prime * result + ((getNoteCreatorId() == null) ? 0 : getNoteCreatorId().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getIsValid() == null) ? 0 : getIsValid().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "BIGINT", false),
userId("user_id", "userId", "BIGINT", false),
noteId("note_id", "noteId", "BIGINT", false),
noteCreatorId("note_creator_id", "noteCreatorId", "BIGINT", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "INTEGER", false),
isValid("is_valid", "isValid", "BIT", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @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 qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> 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 qd_give_like_record
*
* @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
package com.wwdz.ch.db.domain.qiandao;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class QdGiveLikeRecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public QdGiveLikeRecordExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
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 qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public QdGiveLikeRecordExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public QdGiveLikeRecordExample 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;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(this);
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
QdGiveLikeRecordExample example = new QdGiveLikeRecordExample();
return example.createCriteria();
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("user_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdNotEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("user_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdGreaterThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("user_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdGreaterThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("user_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdLessThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("user_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdLessThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("user_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andNoteIdIsNull() {
addCriterion("note_id is null");
return (Criteria) this;
}
public Criteria andNoteIdIsNotNull() {
addCriterion("note_id is not null");
return (Criteria) this;
}
public Criteria andNoteIdEqualTo(Long value) {
addCriterion("note_id =", value, "noteId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteIdEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteIdNotEqualTo(Long value) {
addCriterion("note_id <>", value, "noteId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteIdNotEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteIdGreaterThan(Long value) {
addCriterion("note_id >", value, "noteId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteIdGreaterThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteIdGreaterThanOrEqualTo(Long value) {
addCriterion("note_id >=", value, "noteId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteIdGreaterThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteIdLessThan(Long value) {
addCriterion("note_id <", value, "noteId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteIdLessThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteIdLessThanOrEqualTo(Long value) {
addCriterion("note_id <=", value, "noteId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteIdLessThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteIdIn(List<Long> values) {
addCriterion("note_id in", values, "noteId");
return (Criteria) this;
}
public Criteria andNoteIdNotIn(List<Long> values) {
addCriterion("note_id not in", values, "noteId");
return (Criteria) this;
}
public Criteria andNoteIdBetween(Long value1, Long value2) {
addCriterion("note_id between", value1, value2, "noteId");
return (Criteria) this;
}
public Criteria andNoteIdNotBetween(Long value1, Long value2) {
addCriterion("note_id not between", value1, value2, "noteId");
return (Criteria) this;
}
public Criteria andNoteCreatorIdIsNull() {
addCriterion("note_creator_id is null");
return (Criteria) this;
}
public Criteria andNoteCreatorIdIsNotNull() {
addCriterion("note_creator_id is not null");
return (Criteria) this;
}
public Criteria andNoteCreatorIdEqualTo(Long value) {
addCriterion("note_creator_id =", value, "noteCreatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteCreatorIdEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_creator_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteCreatorIdNotEqualTo(Long value) {
addCriterion("note_creator_id <>", value, "noteCreatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteCreatorIdNotEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_creator_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteCreatorIdGreaterThan(Long value) {
addCriterion("note_creator_id >", value, "noteCreatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteCreatorIdGreaterThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_creator_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteCreatorIdGreaterThanOrEqualTo(Long value) {
addCriterion("note_creator_id >=", value, "noteCreatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteCreatorIdGreaterThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_creator_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteCreatorIdLessThan(Long value) {
addCriterion("note_creator_id <", value, "noteCreatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteCreatorIdLessThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_creator_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteCreatorIdLessThanOrEqualTo(Long value) {
addCriterion("note_creator_id <=", value, "noteCreatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNoteCreatorIdLessThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("note_creator_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNoteCreatorIdIn(List<Long> values) {
addCriterion("note_creator_id in", values, "noteCreatorId");
return (Criteria) this;
}
public Criteria andNoteCreatorIdNotIn(List<Long> values) {
addCriterion("note_creator_id not in", values, "noteCreatorId");
return (Criteria) this;
}
public Criteria andNoteCreatorIdBetween(Long value1, Long value2) {
addCriterion("note_creator_id between", value1, value2, "noteCreatorId");
return (Criteria) this;
}
public Criteria andNoteCreatorIdNotBetween(Long value1, Long value2) {
addCriterion("note_creator_id not between", value1, value2, "noteCreatorId");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("create_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("create_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("create_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("create_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("create_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("create_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Integer value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("update_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Integer value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeNotEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("update_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Integer value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("update_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Integer value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("update_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Integer value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("update_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Integer value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("update_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Integer> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Integer> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Integer value1, Integer value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Integer value1, Integer value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andIsValidIsNull() {
addCriterion("is_valid is null");
return (Criteria) this;
}
public Criteria andIsValidIsNotNull() {
addCriterion("is_valid is not null");
return (Criteria) this;
}
public Criteria andIsValidEqualTo(Boolean value) {
addCriterion("is_valid =", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("is_valid = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidNotEqualTo(Boolean value) {
addCriterion("is_valid <>", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidNotEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("is_valid <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidGreaterThan(Boolean value) {
addCriterion("is_valid >", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidGreaterThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("is_valid > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidGreaterThanOrEqualTo(Boolean value) {
addCriterion("is_valid >=", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidGreaterThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("is_valid >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidLessThan(Boolean value) {
addCriterion("is_valid <", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidLessThanColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("is_valid < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidLessThanOrEqualTo(Boolean value) {
addCriterion("is_valid <=", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidLessThanOrEqualToColumn(QdGiveLikeRecord.Column column) {
addCriterion(new StringBuilder("is_valid <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidIn(List<Boolean> values) {
addCriterion("is_valid in", values, "isValid");
return (Criteria) this;
}
public Criteria andIsValidNotIn(List<Boolean> values) {
addCriterion("is_valid not in", values, "isValid");
return (Criteria) this;
}
public Criteria andIsValidBetween(Boolean value1, Boolean value2) {
addCriterion("is_valid between", value1, value2, "isValid");
return (Criteria) this;
}
public Criteria andIsValidNotBetween(Boolean value1, Boolean value2) {
addCriterion("is_valid not between", value1, value2, "isValid");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private QdGiveLikeRecordExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(QdGiveLikeRecordExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public QdGiveLikeRecordExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @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 interface was generated by MyBatis Generator.
* This interface corresponds to the database table qd_give_like_record
*
* @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 qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria add(Criteria add);
}
}
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
...@@ -4,6 +4,8 @@ import java.io.Serializable; ...@@ -4,6 +4,8 @@ import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data; import lombok.Data;
/** /**
...@@ -11,7 +13,7 @@ import lombok.Data; ...@@ -11,7 +13,7 @@ import lombok.Data;
* @date 2024/12/18 * @date 2024/12/18
*/ */
@Data @Data
public class QdUser implements Serializable { public class QdUser implements Entity {
/** /**
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database table qd_user * This field corresponds to the database table qd_user
......
...@@ -4,6 +4,8 @@ import java.io.Serializable; ...@@ -4,6 +4,8 @@ import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data; import lombok.Data;
/** /**
...@@ -11,7 +13,7 @@ import lombok.Data; ...@@ -11,7 +13,7 @@ import lombok.Data;
* @date 2024/12/18 * @date 2024/12/18
*/ */
@Data @Data
public class QdUserSignIn implements Serializable { public class QdUserSignIn implements Entity {
/** /**
* id * id
*/ */
......
package com.wwdz.ch.db.domain.qiandao; package com.wwdz.ch.db.domain.qiandao;
import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data; import lombok.Data;
/** /**
...@@ -11,7 +11,7 @@ import lombok.Data; ...@@ -11,7 +11,7 @@ import lombok.Data;
* @date 2024/12/18 * @date 2024/12/18
*/ */
@Data @Data
public class QdUserSignInNote implements Serializable { public class QdUserSignInNote implements Entity {
private Long id; private Long id;
/** /**
......
...@@ -4,6 +4,8 @@ import java.io.Serializable; ...@@ -4,6 +4,8 @@ import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data; import lombok.Data;
/** /**
...@@ -11,7 +13,7 @@ import lombok.Data; ...@@ -11,7 +13,7 @@ import lombok.Data;
* @date 2024/12/18 * @date 2024/12/18
*/ */
@Data @Data
public class QdUserSignInTask implements Serializable { public class QdUserSignInTask implements Entity {
private Long id; private Long id;
/** /**
......
package com.wwdz.ch.db.dto.request.qiandao;
import com.wwdz.ch.db.dto.request.BaseRequestDto;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
@Data
public class QdUserSignInNoteRequestDto extends BaseRequestDto implements Entity {
/**
* 用户id
*/
private Long userId;
/**
* 签到任务id
*/
private Long taskId;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 图片,分号分割
*/
private String image;
/**
* 音频
*/
private String audio;
/**
* 对应签到的日期
*/
private String signInDate;
/**
* 对应签到记录的id
*/
private Long recordId;
/**
* 是否公开
*/
private Boolean isPrivate;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 是否删除
*/
private Boolean isDeleted;
}
package com.wwdz.ch.db.dto.request.qiandao;
import com.wwdz.ch.db.dto.request.BaseRequestDto;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
@Data
public class QdUserSignInRequestDto extends BaseRequestDto implements Entity {
/**
* id
*/
private Long id;
/**
* 签到任务id
*/
private Long taskId;
/**
* 用户id
*/
private Long userId;
/**
* 签到时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
private Date startQueryTime;
private Date endQueryTime;
/**
* 签到日期
*/
private String signInDate;
/**
* 连续天数
*/
private Integer consecutiveDays;
/**
* 是否有奖励
*/
private Boolean isReward;
/**
* 奖励等级
*/
private Integer rewardLevel;
/**
* 是否领取奖励
*/
private Boolean isGet;
/**
* 是否有效
*/
private Boolean isValid;
}
package com.wwdz.ch.db.dto.request.qiandao; package com.wwdz.ch.db.dto.request.qiandao;
import com.wwdz.ch.db.dto.request.BaseRequestDto;
import com.xxdxxs.entity.Entity; import com.xxdxxs.entity.Entity;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
@Data @Data
public class SignInTaskRequestDto implements Entity { public class SignInTaskRequestDto extends BaseRequestDto implements Entity {
private Long id; private Long id;
......
package com.wwdz.ch.db.impl.qiandao;
import com.wwdz.ch.db.dao.qiandao.QdUserSignInDao;
import com.wwdz.ch.db.domain.qiandao.QdUserSignIn;
import com.wwdz.ch.db.domain.qiandao.QdUserSignInExample;
import com.wwdz.ch.db.dto.request.qiandao.QdUserSignInRequestDto;
import com.wwdz.ch.db.mapper.qiandao.QdUserSignInMapper;
import com.xxdxxs.db.component.JdbcHelper;
import com.xxdxxs.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.time.LocalDate;
import java.util.List;
@Repository
public class QdUserSignInDaoImpl implements QdUserSignInDao {
@Autowired
QdUserSignInMapper qdUserSignInMapper;
@Override
public boolean insert(QdUserSignIn qdQdUserSignIn) {
qdQdUserSignIn.setIsValid(true);
return qdUserSignInMapper.insert(qdQdUserSignIn) > 0;
}
@Override
public QdUserSignIn findLastedRecord(long userId) {
QdUserSignInExample example = new QdUserSignInExample();
QdUserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andIsValidEqualTo(true);
example.setOrderByClause("create_time desc");
return qdUserSignInMapper.selectOneByExample(example);
}
@Override
public List<QdUserSignIn> findList(QdUserSignInRequestDto dto) {
QdUserSignInExample example = new QdUserSignInExample();
QdUserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(dto.getUserId());
JdbcHelper.ifPresent(dto.getStartQueryTime(), criteria :: andCreateTimeGreaterThanOrEqualTo);
JdbcHelper.ifPresent(dto.getEndQueryTime(), criteria :: andCreateTimeLessThanOrEqualTo);
criteria.andIsValidEqualTo(true);
example.setOrderByClause("create_time desc");
return qdUserSignInMapper.selectByExample(example);
}
@Override
public QdUserSignIn findYesterdayRecord(long userId) {
LocalDate yesterday = LocalDate.now().minusDays(1);
String yesterdayString = DateUtils.DATE.format(yesterday);
QdUserSignInExample example = new QdUserSignInExample();
QdUserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andSignInDateEqualTo(yesterdayString);
criteria.andIsValidEqualTo(true);
return qdUserSignInMapper.selectOneByExample(example);
}
@Override
public QdUserSignIn findTodayRecord(long userId) {
LocalDate today = LocalDate.now();
String todayString = DateUtils.DATE.format(today);
QdUserSignInExample example = new QdUserSignInExample();
QdUserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andSignInDateEqualTo(todayString);
criteria.andIsValidEqualTo(true);
return qdUserSignInMapper.selectOneByExample(example);
}
@Override
public boolean isExisted(long userId, String date) {
QdUserSignInExample example = new QdUserSignInExample();
QdUserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andSignInDateEqualTo(date);
criteria.andIsValidEqualTo(true);
return qdUserSignInMapper.countByExample(example) > 0;
}
@Override
public QdUserSignIn findRecord(long userId, String date, Integer consecutiveDays) {
QdUserSignInExample example = new QdUserSignInExample();
QdUserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andSignInDateEqualTo(date);
JdbcHelper.ifPresent(consecutiveDays, criteria::andConsecutiveDaysEqualTo);
criteria.andIsValidEqualTo(true);
return qdUserSignInMapper.selectOneByExample(example);
}
@Override
public boolean update(QdUserSignIn userSignin) {
QdUserSignInExample example = new QdUserSignInExample();
QdUserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userSignin.getUserId());
criteria.andSignInDateEqualTo(userSignin.getSignInDate());
return qdUserSignInMapper.updateByExampleSelective(userSignin, example) > 0;
}
@Override
public boolean updateByPrimaryKey(QdUserSignIn userSignin) {
return qdUserSignInMapper.updateByPrimaryKeySelective(userSignin) > 0;
}
@Override
public boolean deleteTodayRecord(long userId) {
LocalDate today = LocalDate.now();
String todayString = DateUtils.DATE.format(today);
QdUserSignInExample example = new QdUserSignInExample();
QdUserSignInExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andSignInDateEqualTo(todayString);
return qdUserSignInMapper.deleteByExample(example) > 0;
}
@Override
public boolean updateInvalid(QdUserSignInRequestDto dto) {
QdUserSignInExample example = new QdUserSignInExample();
QdUserSignInExample.Criteria criteria = example.createCriteria();
JdbcHelper.ifPresent(dto.getStartQueryTime(), criteria::andCreateTimeGreaterThan);
JdbcHelper.ifPresent(dto.getSignInDate(), criteria::andSignInDateEqualTo);
criteria.andUserIdEqualTo(dto.getUserId());
criteria.andIsValidEqualTo(true);
QdUserSignIn userSignin = new QdUserSignIn();
userSignin.setIsValid(false);
return qdUserSignInMapper.updateByExampleSelective(userSignin, example) > 0;
}
}
package com.wwdz.ch.db.impl.qiandao;
import com.github.pagehelper.PageHelper;
import com.wwdz.ch.db.dao.qiandao.QdUserSignInDao;
import com.wwdz.ch.db.dao.qiandao.QdUserSignInNoteDao;
import com.wwdz.ch.db.domain.qiandao.QdUserSignInNote;
import com.wwdz.ch.db.domain.qiandao.QdUserSignInNoteExample;
import com.wwdz.ch.db.dto.request.qiandao.QdUserSignInNoteRequestDto;
import com.wwdz.ch.db.mapper.qiandao.QdUserSignInNoteMapper;
import com.xxdxxs.db.component.JdbcHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public class QdUserSignInNoteDaoImpl implements QdUserSignInNoteDao {
@Autowired
QdUserSignInNoteMapper qdUserSignInNoteMapper;
@Override
public boolean insert(QdUserSignInNote qdUserSignInNote) {
return qdUserSignInNoteMapper.insert(qdUserSignInNote) > 0;
}
@Override
public List<QdUserSignInNote> findByPage(QdUserSignInNoteRequestDto dto) {
QdUserSignInNoteExample example = new QdUserSignInNoteExample();
QdUserSignInNoteExample.Criteria criteria = example.createCriteria();
JdbcHelper.ifPresent(dto.getTaskId(), criteria :: andTaskIdEqualTo);
JdbcHelper.ifPresent(dto.getUserId(), criteria :: andUserIdEqualTo);
JdbcHelper.ifPresent(dto.getIsPrivate(), criteria :: andIsPrivateEqualTo);
PageHelper.startPage(dto.getPage(), dto.getLimit());
example.setOrderByClause("create_time desc");
return qdUserSignInNoteMapper.selectByExample(example);
}
}
package com.wwdz.ch.db.impl.qiandao; package com.wwdz.ch.db.impl.qiandao;
import com.github.pagehelper.PageHelper;
import com.wwdz.ch.db.dao.qiandao.SignInTaskDao; import com.wwdz.ch.db.dao.qiandao.SignInTaskDao;
import com.wwdz.ch.db.domain.qiandao.SignInTask;
import com.wwdz.ch.db.domain.qiandao.SignInTaskExample;
import com.wwdz.ch.db.dto.request.qiandao.SignInTaskRequestDto; import com.wwdz.ch.db.dto.request.qiandao.SignInTaskRequestDto;
import com.wwdz.ch.db.mapper.qiandao.SignInTaskMapper; import com.wwdz.ch.db.mapper.qiandao.SignInTaskMapper;
import com.xxdxxs.db.component.JdbcHelper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
@Repository @Repository
public class SignInTaskDaoImpl implements SignInTaskDao { public class SignInTaskDaoImpl implements SignInTaskDao {
@Autowired @Autowired
SignInTaskMapper signInTaskMapper; SignInTaskMapper signInTaskMapper;
@Override @Override
public int insert(SignInTaskRequestDto signInTaskRequestDto) { public boolean insert(SignInTask signInTask) {
Date now = new Date();
signInTask.setCreateTime(now);
signInTask.setUpdateTime(now);
return signInTaskMapper.insert(signInTask) > 0;
}
return signInTaskMapper.insert(signInTaskRequestDto) ; @Override
public List<SignInTask> findByPage(SignInTaskRequestDto dto) {
SignInTaskExample example = new SignInTaskExample();
SignInTaskExample.Criteria criteria = example.createCriteria();
JdbcHelper.ifPresent(dto.getCreatorId(), criteria :: andCreatorIdEqualTo);
PageHelper.startPage(dto.getPage(), dto.getLimit());
example.setOrderByClause("create_time desc");
return signInTaskMapper.selectByExample(example);
} }
} }
package com.wwdz.ch.db.mapper.qiandao;
import com.wwdz.ch.db.domain.qiandao.QdGiveLikeRecord;
import com.wwdz.ch.db.domain.qiandao.QdGiveLikeRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface QdGiveLikeRecordMapper {
long countByExample(QdGiveLikeRecordExample example);
int deleteByExample(QdGiveLikeRecordExample example);
int deleteByPrimaryKey(Long id);
int insert(QdGiveLikeRecord record);
int insertSelective(QdGiveLikeRecord record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
QdGiveLikeRecord selectOneByExample(QdGiveLikeRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
QdGiveLikeRecord selectOneByExampleSelective(@Param("example") QdGiveLikeRecordExample example, @Param("selective") QdGiveLikeRecord.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<QdGiveLikeRecord> selectByExampleSelective(@Param("example") QdGiveLikeRecordExample example, @Param("selective") QdGiveLikeRecord.Column ... selective);
List<QdGiveLikeRecord> selectByExample(QdGiveLikeRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_give_like_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
QdGiveLikeRecord selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") QdGiveLikeRecord.Column ... selective);
QdGiveLikeRecord selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") QdGiveLikeRecord record, @Param("example") QdGiveLikeRecordExample example);
int updateByExample(@Param("record") QdGiveLikeRecord record, @Param("example") QdGiveLikeRecordExample example);
int updateByPrimaryKeySelective(QdGiveLikeRecord record);
int updateByPrimaryKey(QdGiveLikeRecord record);
}
\ No newline at end of file
...@@ -3,8 +3,11 @@ package com.wwdz.ch.db.mapper.qiandao; ...@@ -3,8 +3,11 @@ package com.wwdz.ch.db.mapper.qiandao;
import com.wwdz.ch.db.domain.qiandao.QdUserSignIn; import com.wwdz.ch.db.domain.qiandao.QdUserSignIn;
import com.wwdz.ch.db.domain.qiandao.QdUserSignInExample; import com.wwdz.ch.db.domain.qiandao.QdUserSignInExample;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@Mapper
public interface QdUserSignInMapper { public interface QdUserSignInMapper {
long countByExample(QdUserSignInExample example); long countByExample(QdUserSignInExample example);
......
...@@ -3,8 +3,11 @@ package com.wwdz.ch.db.mapper.qiandao; ...@@ -3,8 +3,11 @@ package com.wwdz.ch.db.mapper.qiandao;
import com.wwdz.ch.db.domain.qiandao.QdUserSignInNote; import com.wwdz.ch.db.domain.qiandao.QdUserSignInNote;
import com.wwdz.ch.db.domain.qiandao.QdUserSignInNoteExample; import com.wwdz.ch.db.domain.qiandao.QdUserSignInNoteExample;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@Mapper
public interface QdUserSignInNoteMapper { public interface QdUserSignInNoteMapper {
long countByExample(QdUserSignInNoteExample example); long countByExample(QdUserSignInNoteExample example);
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wwdz.ch.db.mapper.qiandao.QdGiveLikeRecordMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.qiandao.QdGiveLikeRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="note_id" jdbcType="BIGINT" property="noteId" />
<result column="note_creator_id" jdbcType="BIGINT" property="noteCreatorId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="INTEGER" property="updateTime" />
<result column="is_valid" jdbcType="BIT" property="isValid" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, user_id, note_id, note_creator_id, create_time, update_time, is_valid
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdGiveLikeRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from qd_give_like_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, note_id, note_creator_id, create_time, update_time, is_valid
</otherwise>
</choose>
from qd_give_like_record
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from qd_give_like_record
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, note_id, note_creator_id, create_time, update_time, is_valid
</otherwise>
</choose>
from qd_give_like_record
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from qd_give_like_record
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdGiveLikeRecordExample">
delete from qd_give_like_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.qiandao.QdGiveLikeRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into qd_give_like_record (user_id, note_id, note_creator_id,
create_time, update_time, is_valid
)
values (#{userId,jdbcType=BIGINT}, #{noteId,jdbcType=BIGINT}, #{noteCreatorId,jdbcType=BIGINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=INTEGER}, #{isValid,jdbcType=BIT}
)
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.qiandao.QdGiveLikeRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into qd_give_like_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="noteId != null">
note_id,
</if>
<if test="noteCreatorId != null">
note_creator_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isValid != null">
is_valid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="noteId != null">
#{noteId,jdbcType=BIGINT},
</if>
<if test="noteCreatorId != null">
#{noteCreatorId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=INTEGER},
</if>
<if test="isValid != null">
#{isValid,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdGiveLikeRecordExample" resultType="java.lang.Long">
select count(*) from qd_give_like_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update qd_give_like_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.noteId != null">
note_id = #{record.noteId,jdbcType=BIGINT},
</if>
<if test="record.noteCreatorId != null">
note_creator_id = #{record.noteCreatorId,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=INTEGER},
</if>
<if test="record.isValid != null">
is_valid = #{record.isValid,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update qd_give_like_record
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
note_id = #{record.noteId,jdbcType=BIGINT},
note_creator_id = #{record.noteCreatorId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=INTEGER},
is_valid = #{record.isValid,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.qiandao.QdGiveLikeRecord">
update qd_give_like_record
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="noteId != null">
note_id = #{noteId,jdbcType=BIGINT},
</if>
<if test="noteCreatorId != null">
note_creator_id = #{noteCreatorId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=INTEGER},
</if>
<if test="isValid != null">
is_valid = #{isValid,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.qiandao.QdGiveLikeRecord">
update qd_give_like_record
set user_id = #{userId,jdbcType=BIGINT},
note_id = #{noteId,jdbcType=BIGINT},
note_creator_id = #{noteCreatorId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=INTEGER},
is_valid = #{isValid,jdbcType=BIT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdGiveLikeRecordExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from qd_give_like_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, note_id, note_creator_id, create_time, update_time, is_valid
</otherwise>
</choose>
from qd_give_like_record
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wwdz.ch.db.mapper.qiandao.QdUserMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.qiandao.QdUser">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="gender" jdbcType="INTEGER" property="gender" />
<result column="birthday" jdbcType="DATE" property="birthday" />
<result column="last_login_time" jdbcType="TIMESTAMP" property="lastLoginTime" />
<result column="last_login_ip" jdbcType="VARCHAR" property="lastLoginIp" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="nick_name" jdbcType="VARCHAR" property="nickName" />
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
<result column="avatar" jdbcType="VARCHAR" property="avatar" />
<result column="profile" jdbcType="VARCHAR" property="profile" />
<result column="background" jdbcType="VARCHAR" property="background" />
<result column="wx_openid" jdbcType="VARCHAR" property="wxOpenid" />
<result column="wx_unionid" jdbcType="VARCHAR" property="wxUnionid" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="province" jdbcType="VARCHAR" property="province" />
<result column="city" jdbcType="VARCHAR" property="city" />
<result column="area" jdbcType="VARCHAR" property="area" />
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="BIT" property="deleted" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, user_name, `password`, gender, birthday, last_login_time, last_login_ip, `level`,
nick_name, mobile, avatar, profile, background, wx_openid, wx_unionid, `status`,
province, city, area, add_time, update_time, deleted, remark
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from qd_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_name, `password`, gender, birthday, last_login_time, last_login_ip, `level`,
nick_name, mobile, avatar, profile, background, wx_openid, wx_unionid, `status`,
province, city, area, add_time, update_time, deleted, remark
</otherwise>
</choose>
from qd_user
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from qd_user
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<include refid="Base_Column_List" />
from qd_user
where id = #{id,jdbcType=BIGINT}
and deleted =
<choose>
<when test="andLogicalDeleted">
1
</when>
<otherwise>
0
</otherwise>
</choose>
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_name, `password`, gender, birthday, last_login_time, last_login_ip, `level`,
nick_name, mobile, avatar, profile, background, wx_openid, wx_unionid, `status`,
province, city, area, add_time, update_time, deleted, remark
</otherwise>
</choose>
from qd_user
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from qd_user
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserExample">
delete from qd_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.qiandao.QdUser">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into qd_user (user_name, `password`, gender,
birthday, last_login_time, last_login_ip,
`level`, nick_name, mobile,
avatar, profile, background,
wx_openid, wx_unionid, `status`,
province, city, area,
add_time, update_time, deleted,
remark)
values (#{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER},
#{birthday,jdbcType=DATE}, #{lastLoginTime,jdbcType=TIMESTAMP}, #{lastLoginIp,jdbcType=VARCHAR},
#{level,jdbcType=INTEGER}, #{nickName,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
#{avatar,jdbcType=VARCHAR}, #{profile,jdbcType=VARCHAR}, #{background,jdbcType=VARCHAR},
#{wxOpenid,jdbcType=VARCHAR}, #{wxUnionid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR},
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT},
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.qiandao.QdUser">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into qd_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userName != null">
user_name,
</if>
<if test="password != null">
`password`,
</if>
<if test="gender != null">
gender,
</if>
<if test="birthday != null">
birthday,
</if>
<if test="lastLoginTime != null">
last_login_time,
</if>
<if test="lastLoginIp != null">
last_login_ip,
</if>
<if test="level != null">
`level`,
</if>
<if test="nickName != null">
nick_name,
</if>
<if test="mobile != null">
mobile,
</if>
<if test="avatar != null">
avatar,
</if>
<if test="profile != null">
profile,
</if>
<if test="background != null">
background,
</if>
<if test="wxOpenid != null">
wx_openid,
</if>
<if test="wxUnionid != null">
wx_unionid,
</if>
<if test="status != null">
`status`,
</if>
<if test="province != null">
province,
</if>
<if test="city != null">
city,
</if>
<if test="area != null">
area,
</if>
<if test="addTime != null">
add_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="deleted != null">
deleted,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="gender != null">
#{gender,jdbcType=INTEGER},
</if>
<if test="birthday != null">
#{birthday,jdbcType=DATE},
</if>
<if test="lastLoginTime != null">
#{lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if test="lastLoginIp != null">
#{lastLoginIp,jdbcType=VARCHAR},
</if>
<if test="level != null">
#{level,jdbcType=INTEGER},
</if>
<if test="nickName != null">
#{nickName,jdbcType=VARCHAR},
</if>
<if test="mobile != null">
#{mobile,jdbcType=VARCHAR},
</if>
<if test="avatar != null">
#{avatar,jdbcType=VARCHAR},
</if>
<if test="profile != null">
#{profile,jdbcType=VARCHAR},
</if>
<if test="background != null">
#{background,jdbcType=VARCHAR},
</if>
<if test="wxOpenid != null">
#{wxOpenid,jdbcType=VARCHAR},
</if>
<if test="wxUnionid != null">
#{wxUnionid,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="province != null">
#{province,jdbcType=VARCHAR},
</if>
<if test="city != null">
#{city,jdbcType=VARCHAR},
</if>
<if test="area != null">
#{area,jdbcType=VARCHAR},
</if>
<if test="addTime != null">
#{addTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deleted != null">
#{deleted,jdbcType=BIT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserExample" resultType="java.lang.Long">
select count(*) from qd_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update qd_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userName != null">
user_name = #{record.userName,jdbcType=VARCHAR},
</if>
<if test="record.password != null">
`password` = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.gender != null">
gender = #{record.gender,jdbcType=INTEGER},
</if>
<if test="record.birthday != null">
birthday = #{record.birthday,jdbcType=DATE},
</if>
<if test="record.lastLoginTime != null">
last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if test="record.lastLoginIp != null">
last_login_ip = #{record.lastLoginIp,jdbcType=VARCHAR},
</if>
<if test="record.level != null">
`level` = #{record.level,jdbcType=INTEGER},
</if>
<if test="record.nickName != null">
nick_name = #{record.nickName,jdbcType=VARCHAR},
</if>
<if test="record.mobile != null">
mobile = #{record.mobile,jdbcType=VARCHAR},
</if>
<if test="record.avatar != null">
avatar = #{record.avatar,jdbcType=VARCHAR},
</if>
<if test="record.profile != null">
profile = #{record.profile,jdbcType=VARCHAR},
</if>
<if test="record.background != null">
background = #{record.background,jdbcType=VARCHAR},
</if>
<if test="record.wxOpenid != null">
wx_openid = #{record.wxOpenid,jdbcType=VARCHAR},
</if>
<if test="record.wxUnionid != null">
wx_unionid = #{record.wxUnionid,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
`status` = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.province != null">
province = #{record.province,jdbcType=VARCHAR},
</if>
<if test="record.city != null">
city = #{record.city,jdbcType=VARCHAR},
</if>
<if test="record.area != null">
area = #{record.area,jdbcType=VARCHAR},
</if>
<if test="record.addTime != null">
add_time = #{record.addTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.deleted != null">
deleted = #{record.deleted,jdbcType=BIT},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update qd_user
set id = #{record.id,jdbcType=BIGINT},
user_name = #{record.userName,jdbcType=VARCHAR},
`password` = #{record.password,jdbcType=VARCHAR},
gender = #{record.gender,jdbcType=INTEGER},
birthday = #{record.birthday,jdbcType=DATE},
last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
last_login_ip = #{record.lastLoginIp,jdbcType=VARCHAR},
`level` = #{record.level,jdbcType=INTEGER},
nick_name = #{record.nickName,jdbcType=VARCHAR},
mobile = #{record.mobile,jdbcType=VARCHAR},
avatar = #{record.avatar,jdbcType=VARCHAR},
profile = #{record.profile,jdbcType=VARCHAR},
background = #{record.background,jdbcType=VARCHAR},
wx_openid = #{record.wxOpenid,jdbcType=VARCHAR},
wx_unionid = #{record.wxUnionid,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=INTEGER},
province = #{record.province,jdbcType=VARCHAR},
city = #{record.city,jdbcType=VARCHAR},
area = #{record.area,jdbcType=VARCHAR},
add_time = #{record.addTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
deleted = #{record.deleted,jdbcType=BIT},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.qiandao.QdUser">
update qd_user
<set>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="password != null">
`password` = #{password,jdbcType=VARCHAR},
</if>
<if test="gender != null">
gender = #{gender,jdbcType=INTEGER},
</if>
<if test="birthday != null">
birthday = #{birthday,jdbcType=DATE},
</if>
<if test="lastLoginTime != null">
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if test="lastLoginIp != null">
last_login_ip = #{lastLoginIp,jdbcType=VARCHAR},
</if>
<if test="level != null">
`level` = #{level,jdbcType=INTEGER},
</if>
<if test="nickName != null">
nick_name = #{nickName,jdbcType=VARCHAR},
</if>
<if test="mobile != null">
mobile = #{mobile,jdbcType=VARCHAR},
</if>
<if test="avatar != null">
avatar = #{avatar,jdbcType=VARCHAR},
</if>
<if test="profile != null">
profile = #{profile,jdbcType=VARCHAR},
</if>
<if test="background != null">
background = #{background,jdbcType=VARCHAR},
</if>
<if test="wxOpenid != null">
wx_openid = #{wxOpenid,jdbcType=VARCHAR},
</if>
<if test="wxUnionid != null">
wx_unionid = #{wxUnionid,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=INTEGER},
</if>
<if test="province != null">
province = #{province,jdbcType=VARCHAR},
</if>
<if test="city != null">
city = #{city,jdbcType=VARCHAR},
</if>
<if test="area != null">
area = #{area,jdbcType=VARCHAR},
</if>
<if test="addTime != null">
add_time = #{addTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.qiandao.QdUser">
update qd_user
set user_name = #{userName,jdbcType=VARCHAR},
`password` = #{password,jdbcType=VARCHAR},
gender = #{gender,jdbcType=INTEGER},
birthday = #{birthday,jdbcType=DATE},
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
last_login_ip = #{lastLoginIp,jdbcType=VARCHAR},
`level` = #{level,jdbcType=INTEGER},
nick_name = #{nickName,jdbcType=VARCHAR},
mobile = #{mobile,jdbcType=VARCHAR},
avatar = #{avatar,jdbcType=VARCHAR},
profile = #{profile,jdbcType=VARCHAR},
background = #{background,jdbcType=VARCHAR},
wx_openid = #{wxOpenid,jdbcType=VARCHAR},
wx_unionid = #{wxUnionid,jdbcType=VARCHAR},
`status` = #{status,jdbcType=INTEGER},
province = #{province,jdbcType=VARCHAR},
city = #{city,jdbcType=VARCHAR},
area = #{area,jdbcType=VARCHAR},
add_time = #{addTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deleted = #{deleted,jdbcType=BIT},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from qd_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_name, `password`, gender, birthday, last_login_time, last_login_ip, `level`,
nick_name, mobile, avatar, profile, background, wx_openid, wx_unionid, `status`,
province, city, area, add_time, update_time, deleted, remark
</otherwise>
</choose>
from qd_user
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
<update id="logicalDeleteByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
update qd_user set deleted = 1
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
update qd_user set deleted = 1
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wwdz.ch.db.mapper.qiandao.QdUserSignInMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.qiandao.QdUserSignIn">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="task_id" jdbcType="BIGINT" property="taskId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="sign_in_date" jdbcType="VARCHAR" property="signInDate" />
<result column="consecutive_days" jdbcType="INTEGER" property="consecutiveDays" />
<result column="is_reward" jdbcType="BIT" property="isReward" />
<result column="reward_level" jdbcType="INTEGER" property="rewardLevel" />
<result column="is_get" jdbcType="BIT" property="isGet" />
<result column="is_valid" jdbcType="BIT" property="isValid" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, task_id, user_id, create_time, update_time, sign_in_date, consecutive_days, is_reward,
reward_level, is_get, is_valid
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from qd_user_sign_in
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, task_id, user_id, create_time, update_time, sign_in_date, consecutive_days, is_reward,
reward_level, is_get, is_valid
</otherwise>
</choose>
from qd_user_sign_in
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from qd_user_sign_in
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, task_id, user_id, create_time, update_time, sign_in_date, consecutive_days, is_reward,
reward_level, is_get, is_valid
</otherwise>
</choose>
from qd_user_sign_in
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from qd_user_sign_in
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInExample">
delete from qd_user_sign_in
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignIn">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into qd_user_sign_in (task_id, user_id, create_time,
update_time, sign_in_date, consecutive_days,
is_reward, reward_level, is_get,
is_valid)
values (#{taskId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{signInDate,jdbcType=VARCHAR}, #{consecutiveDays,jdbcType=INTEGER},
#{isReward,jdbcType=BIT}, #{rewardLevel,jdbcType=INTEGER}, #{isGet,jdbcType=BIT},
#{isValid,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignIn">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into qd_user_sign_in
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskId != null">
task_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="signInDate != null">
sign_in_date,
</if>
<if test="consecutiveDays != null">
consecutive_days,
</if>
<if test="isReward != null">
is_reward,
</if>
<if test="rewardLevel != null">
reward_level,
</if>
<if test="isGet != null">
is_get,
</if>
<if test="isValid != null">
is_valid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null">
#{taskId,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="signInDate != null">
#{signInDate,jdbcType=VARCHAR},
</if>
<if test="consecutiveDays != null">
#{consecutiveDays,jdbcType=INTEGER},
</if>
<if test="isReward != null">
#{isReward,jdbcType=BIT},
</if>
<if test="rewardLevel != null">
#{rewardLevel,jdbcType=INTEGER},
</if>
<if test="isGet != null">
#{isGet,jdbcType=BIT},
</if>
<if test="isValid != null">
#{isValid,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInExample" resultType="java.lang.Long">
select count(*) from qd_user_sign_in
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update qd_user_sign_in
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.taskId != null">
task_id = #{record.taskId,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.signInDate != null">
sign_in_date = #{record.signInDate,jdbcType=VARCHAR},
</if>
<if test="record.consecutiveDays != null">
consecutive_days = #{record.consecutiveDays,jdbcType=INTEGER},
</if>
<if test="record.isReward != null">
is_reward = #{record.isReward,jdbcType=BIT},
</if>
<if test="record.rewardLevel != null">
reward_level = #{record.rewardLevel,jdbcType=INTEGER},
</if>
<if test="record.isGet != null">
is_get = #{record.isGet,jdbcType=BIT},
</if>
<if test="record.isValid != null">
is_valid = #{record.isValid,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update qd_user_sign_in
set id = #{record.id,jdbcType=BIGINT},
task_id = #{record.taskId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
sign_in_date = #{record.signInDate,jdbcType=VARCHAR},
consecutive_days = #{record.consecutiveDays,jdbcType=INTEGER},
is_reward = #{record.isReward,jdbcType=BIT},
reward_level = #{record.rewardLevel,jdbcType=INTEGER},
is_get = #{record.isGet,jdbcType=BIT},
is_valid = #{record.isValid,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignIn">
update qd_user_sign_in
<set>
<if test="taskId != null">
task_id = #{taskId,jdbcType=BIGINT},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="signInDate != null">
sign_in_date = #{signInDate,jdbcType=VARCHAR},
</if>
<if test="consecutiveDays != null">
consecutive_days = #{consecutiveDays,jdbcType=INTEGER},
</if>
<if test="isReward != null">
is_reward = #{isReward,jdbcType=BIT},
</if>
<if test="rewardLevel != null">
reward_level = #{rewardLevel,jdbcType=INTEGER},
</if>
<if test="isGet != null">
is_get = #{isGet,jdbcType=BIT},
</if>
<if test="isValid != null">
is_valid = #{isValid,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignIn">
update qd_user_sign_in
set task_id = #{taskId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
sign_in_date = #{signInDate,jdbcType=VARCHAR},
consecutive_days = #{consecutiveDays,jdbcType=INTEGER},
is_reward = #{isReward,jdbcType=BIT},
reward_level = #{rewardLevel,jdbcType=INTEGER},
is_get = #{isGet,jdbcType=BIT},
is_valid = #{isValid,jdbcType=BIT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from qd_user_sign_in
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, task_id, user_id, create_time, update_time, sign_in_date, consecutive_days, is_reward,
reward_level, is_get, is_valid
</otherwise>
</choose>
from qd_user_sign_in
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wwdz.ch.db.mapper.qiandao.QdUserSignInNoteMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.qiandao.QdUserSignInNote">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="task_id" jdbcType="BIGINT" property="taskId" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="image" jdbcType="VARCHAR" property="image" />
<result column="audio" jdbcType="VARCHAR" property="audio" />
<result column="sign_in_date" jdbcType="VARCHAR" property="signInDate" />
<result column="record_id" jdbcType="BIGINT" property="recordId" />
<result column="is_private" jdbcType="BIT" property="isPrivate" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_deleted" jdbcType="BIT" property="isDeleted" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, user_id, task_id, title, content, image, audio, sign_in_date, record_id, is_private,
create_time, update_time, is_deleted
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInNoteExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from qd_user_sign_in_note
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, task_id, title, content, image, audio, sign_in_date, record_id, is_private,
create_time, update_time, is_deleted
</otherwise>
</choose>
from qd_user_sign_in_note
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from qd_user_sign_in_note
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, task_id, title, content, image, audio, sign_in_date, record_id, is_private,
create_time, update_time, is_deleted
</otherwise>
</choose>
from qd_user_sign_in_note
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from qd_user_sign_in_note
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInNoteExample">
delete from qd_user_sign_in_note
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInNote">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into qd_user_sign_in_note (user_id, task_id, title,
content, image, audio,
sign_in_date, record_id, is_private,
create_time, update_time, is_deleted
)
values (#{userId,jdbcType=BIGINT}, #{taskId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, #{audio,jdbcType=VARCHAR},
#{signInDate,jdbcType=VARCHAR}, #{recordId,jdbcType=BIGINT}, #{isPrivate,jdbcType=BIT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}
)
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInNote">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into qd_user_sign_in_note
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="taskId != null">
task_id,
</if>
<if test="title != null">
title,
</if>
<if test="content != null">
content,
</if>
<if test="image != null">
image,
</if>
<if test="audio != null">
audio,
</if>
<if test="signInDate != null">
sign_in_date,
</if>
<if test="recordId != null">
record_id,
</if>
<if test="isPrivate != null">
is_private,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isDeleted != null">
is_deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="taskId != null">
#{taskId,jdbcType=BIGINT},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="image != null">
#{image,jdbcType=VARCHAR},
</if>
<if test="audio != null">
#{audio,jdbcType=VARCHAR},
</if>
<if test="signInDate != null">
#{signInDate,jdbcType=VARCHAR},
</if>
<if test="recordId != null">
#{recordId,jdbcType=BIGINT},
</if>
<if test="isPrivate != null">
#{isPrivate,jdbcType=BIT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null">
#{isDeleted,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInNoteExample" resultType="java.lang.Long">
select count(*) from qd_user_sign_in_note
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update qd_user_sign_in_note
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.taskId != null">
task_id = #{record.taskId,jdbcType=BIGINT},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=VARCHAR},
</if>
<if test="record.image != null">
image = #{record.image,jdbcType=VARCHAR},
</if>
<if test="record.audio != null">
audio = #{record.audio,jdbcType=VARCHAR},
</if>
<if test="record.signInDate != null">
sign_in_date = #{record.signInDate,jdbcType=VARCHAR},
</if>
<if test="record.recordId != null">
record_id = #{record.recordId,jdbcType=BIGINT},
</if>
<if test="record.isPrivate != null">
is_private = #{record.isPrivate,jdbcType=BIT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDeleted != null">
is_deleted = #{record.isDeleted,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update qd_user_sign_in_note
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
task_id = #{record.taskId,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
content = #{record.content,jdbcType=VARCHAR},
image = #{record.image,jdbcType=VARCHAR},
audio = #{record.audio,jdbcType=VARCHAR},
sign_in_date = #{record.signInDate,jdbcType=VARCHAR},
record_id = #{record.recordId,jdbcType=BIGINT},
is_private = #{record.isPrivate,jdbcType=BIT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInNote">
update qd_user_sign_in_note
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="taskId != null">
task_id = #{taskId,jdbcType=BIGINT},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="image != null">
image = #{image,jdbcType=VARCHAR},
</if>
<if test="audio != null">
audio = #{audio,jdbcType=VARCHAR},
</if>
<if test="signInDate != null">
sign_in_date = #{signInDate,jdbcType=VARCHAR},
</if>
<if test="recordId != null">
record_id = #{recordId,jdbcType=BIGINT},
</if>
<if test="isPrivate != null">
is_private = #{isPrivate,jdbcType=BIT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null">
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInNote">
update qd_user_sign_in_note
set user_id = #{userId,jdbcType=BIGINT},
task_id = #{taskId,jdbcType=BIGINT},
title = #{title,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
image = #{image,jdbcType=VARCHAR},
audio = #{audio,jdbcType=VARCHAR},
sign_in_date = #{signInDate,jdbcType=VARCHAR},
record_id = #{recordId,jdbcType=BIGINT},
is_private = #{isPrivate,jdbcType=BIT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInNoteExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from qd_user_sign_in_note
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, task_id, title, content, image, audio, sign_in_date, record_id, is_private,
create_time, update_time, is_deleted
</otherwise>
</choose>
from qd_user_sign_in_note
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wwdz.ch.db.mapper.qiandao.QdUserSignInTaskMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.qiandao.QdUserSignInTask">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="task_id" jdbcType="BIGINT" property="taskId" />
<result column="create_time_time" jdbcType="TIMESTAMP" property="createTimeTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_valid" jdbcType="BIT" property="isValid" />
<result column="state" jdbcType="INTEGER" property="state" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, user_id, task_id, create_time_time, update_time, is_valid, `state`
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInTaskExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from qd_user_sign_in_task
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, task_id, create_time_time, update_time, is_valid, `state`
</otherwise>
</choose>
from qd_user_sign_in_task
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from qd_user_sign_in_task
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, task_id, create_time_time, update_time, is_valid, `state`
</otherwise>
</choose>
from qd_user_sign_in_task
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from qd_user_sign_in_task
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInTaskExample">
delete from qd_user_sign_in_task
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInTask">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into qd_user_sign_in_task (user_id, task_id, create_time_time,
update_time, is_valid, `state`
)
values (#{userId,jdbcType=BIGINT}, #{taskId,jdbcType=BIGINT}, #{createTimeTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{isValid,jdbcType=BIT}, #{state,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInTask">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into qd_user_sign_in_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="taskId != null">
task_id,
</if>
<if test="createTimeTime != null">
create_time_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isValid != null">
is_valid,
</if>
<if test="state != null">
`state`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="taskId != null">
#{taskId,jdbcType=BIGINT},
</if>
<if test="createTimeTime != null">
#{createTimeTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isValid != null">
#{isValid,jdbcType=BIT},
</if>
<if test="state != null">
#{state,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInTaskExample" resultType="java.lang.Long">
select count(*) from qd_user_sign_in_task
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update qd_user_sign_in_task
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.taskId != null">
task_id = #{record.taskId,jdbcType=BIGINT},
</if>
<if test="record.createTimeTime != null">
create_time_time = #{record.createTimeTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isValid != null">
is_valid = #{record.isValid,jdbcType=BIT},
</if>
<if test="record.state != null">
`state` = #{record.state,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update qd_user_sign_in_task
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
task_id = #{record.taskId,jdbcType=BIGINT},
create_time_time = #{record.createTimeTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_valid = #{record.isValid,jdbcType=BIT},
`state` = #{record.state,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInTask">
update qd_user_sign_in_task
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="taskId != null">
task_id = #{taskId,jdbcType=BIGINT},
</if>
<if test="createTimeTime != null">
create_time_time = #{createTimeTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isValid != null">
is_valid = #{isValid,jdbcType=BIT},
</if>
<if test="state != null">
`state` = #{state,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInTask">
update qd_user_sign_in_task
set user_id = #{userId,jdbcType=BIGINT},
task_id = #{taskId,jdbcType=BIGINT},
create_time_time = #{createTimeTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_valid = #{isValid,jdbcType=BIT},
`state` = #{state,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.qiandao.QdUserSignInTaskExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from qd_user_sign_in_task
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, task_id, create_time_time, update_time, is_valid, `state`
</otherwise>
</choose>
from qd_user_sign_in_task
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper.qiandao" <javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper.qiandao"
targetProject="ch-dao/src/main/java"/> targetProject="ch-dao/src/main/java"/>
<table tableName="qd_user_sign_in_note" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true"> <table tableName="qd_give_like_record" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<generatedKey column="id" sqlStatement="Mysql" identity="true" /> <generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table> </table>
......
package com.wwdz.ch.wx.impl.qiandao; package com.wwdz.ch.wx.impl.qiandao;
import com.wwdz.ch.core.consts.qiandao.SignInTaskEnum;
import com.wwdz.ch.core.type.Result; import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dao.qiandao.SignInTaskDao; import com.wwdz.ch.db.dao.qiandao.SignInTaskDao;
import com.wwdz.ch.db.domain.qiandao.SignInTask; import com.wwdz.ch.db.domain.qiandao.SignInTask;
import com.wwdz.ch.db.dto.request.qiandao.SignInTaskRequestDto; import com.wwdz.ch.db.dto.request.qiandao.SignInTaskRequestDto;
import com.wwdz.ch.db.mapper.qiandao.SignInTaskMapper;
import com.wwdz.ch.wx.service.qiandao.SignInTaskService; import com.wwdz.ch.wx.service.qiandao.SignInTaskService;
import com.xxdxxs.utils.EntityMapper;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.HashMap;
@Service @Service
public class SignInTaskServiceImpl implements SignInTaskService { public class SignInTaskServiceImpl implements SignInTaskService {
@Autowired
SignInTaskDao signInTaskDao;
private static final Logger logger = LoggerFactory.getLogger(SignInTaskServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(SignInTaskServiceImpl.class);
@Autowired
SignInTaskDao signInTaskDao;
@Override @Override
public Result addSign(SignInTaskRequestDto dto) { public Result add(SignInTaskRequestDto dto) {
try {
dto.setCreateTime(new Date()); SignInTask signInTask = new SignInTask();
dto.setUpdateTime(new Date()); EntityMapper.copyAttribute(dto, signInTask);
signInTaskDao.insert(dto); signInTask.setState(SignInTaskEnum.StateEnum.NOT_START.getCode());
signInTaskDao.insert(signInTask);
return Result.success(); return Result.success();
} catch (Exception e) {
logger.error("新增签到任务失败 error :{}", e);
} }
return Result.failed();
@Override
public void findlist(int pageNum, int pageSize) throws Exception {
} }
} }
...@@ -5,11 +5,10 @@ import com.wwdz.ch.db.dto.request.qiandao.SignInTaskRequestDto; ...@@ -5,11 +5,10 @@ import com.wwdz.ch.db.dto.request.qiandao.SignInTaskRequestDto;
public interface SignInTaskService { public interface SignInTaskService {
Result addSign(SignInTaskRequestDto dto); /**
* 新增签到任务
void findlist(int pageNum ,int pageSize) throws Exception; * @param dto
* @return
*/
Result add(SignInTaskRequestDto dto);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment