zheng-ucenter生成基本代码
This commit is contained in:
parent
d70cd68459
commit
ebaeb8b907
|
@ -19,9 +19,11 @@
|
|||
</properties>
|
||||
|
||||
<modules>
|
||||
<module>zheng-ucenter-common</module>
|
||||
<module>zheng-ucenter-dao</module>
|
||||
<module>zheng-ucenter-service</module>
|
||||
<module>zheng-ucenter-home</module>
|
||||
<module>zheng-ucenter-rpc-api</module>
|
||||
<module>zheng-ucenter-web</module>
|
||||
<module>zheng-ucenter-rpc-service</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
<version>1.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>zheng-ucenter-service</artifactId>
|
||||
<artifactId>zheng-ucenter-common</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>zheng-ucenter-service</name>
|
||||
<name>zheng-ucenter-common</name>
|
||||
<url>http://www.zhangshuzheng.cn</url>
|
||||
|
||||
<properties>
|
||||
|
@ -19,29 +19,16 @@
|
|||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zheng</groupId>
|
||||
<artifactId>zheng-ucenter-dao</artifactId>
|
||||
<artifactId>zheng-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<!-- servlet -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.5</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>zheng-ucenter-service</finalName>
|
||||
<finalName>zheng-ucenter-common</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
|
@ -0,0 +1,11 @@
|
|||
package com.zheng.ucenter.common.constant;
|
||||
|
||||
import com.zheng.common.base.BaseConstants;
|
||||
|
||||
/**
|
||||
* ucenter系统常量类
|
||||
* Created by shuzheng on 2017/4/26.
|
||||
*/
|
||||
public class UcenterConstant extends BaseConstants {
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.zheng.ucenter.common.constant;
|
||||
|
||||
import com.zheng.common.base.BaseResult;
|
||||
|
||||
/**
|
||||
* ucenter系统常量枚举类
|
||||
* Created by shuzheng on 2017/4/26.
|
||||
*/
|
||||
public class UcenterResult extends BaseResult {
|
||||
|
||||
public UcenterResult(UcenterResultConstant cmsResultConstant, Object data) {
|
||||
super(cmsResultConstant.getCode(), cmsResultConstant.getMessage(), data);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.zheng.ucenter.common.constant;
|
||||
|
||||
/**
|
||||
* ucenter系统接口结果常量枚举类
|
||||
* Created by shuzheng on 2017/4/26.
|
||||
*/
|
||||
public enum UcenterResultConstant {
|
||||
|
||||
FAILED(0, "failed"),
|
||||
SUCCESS(1, "success");
|
||||
|
||||
public int code;
|
||||
|
||||
public String message;
|
||||
|
||||
UcenterResultConstant(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
}
|
|
@ -21,9 +21,8 @@
|
|||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zheng</groupId>
|
||||
<artifactId>zheng-common</artifactId>
|
||||
<artifactId>zheng-ucenter-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@ -39,6 +38,9 @@
|
|||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<excludes>
|
||||
<exclude>generatorConfig.xml</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* 代码生成类
|
||||
* Created by ZhangShuzheng on 2017/1/10.
|
||||
* Created by ZhangShuzheng on 2017/4/26.
|
||||
*/
|
||||
public class Generator {
|
||||
|
||||
|
@ -17,10 +17,10 @@ public class Generator {
|
|||
private static String DATABASE = "zheng";
|
||||
private static String TABLE_PREFIX = "ucenter_";
|
||||
private static String PACKAGE_NAME = "com.zheng.ucenter";
|
||||
private static String JDBC_DRIVER = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.driver");
|
||||
private static String JDBC_URL = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.url");
|
||||
private static String JDBC_USERNAME = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.username");
|
||||
private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("jdbc").get("master.jdbc.password");
|
||||
private static String JDBC_DRIVER = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.driver");
|
||||
private static String JDBC_URL = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.url");
|
||||
private static String JDBC_USERNAME = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.username");
|
||||
private static String JDBC_PASSWORD = PropertiesFileUtil.getInstance("generator").get("generator.jdbc.password");
|
||||
// 需要insert后返回主键的表配置,key:表名,value:主键名
|
||||
private static Map<String, String> LAST_INSERT_ID_TABLES = new HashMap<>();
|
||||
static {
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package com.zheng.ucenter.dao.mapper;
|
||||
|
||||
import com.zheng.ucenter.dao.model.UcenterOauth;
|
||||
import com.zheng.ucenter.dao.model.UcenterOauthExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UcenterOauthMapper {
|
||||
long countByExample(UcenterOauthExample example);
|
||||
|
||||
int deleteByExample(UcenterOauthExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer oauthId);
|
||||
|
||||
int insert(UcenterOauth record);
|
||||
|
||||
int insertSelective(UcenterOauth record);
|
||||
|
||||
List<UcenterOauth> selectByExample(UcenterOauthExample example);
|
||||
|
||||
UcenterOauth selectByPrimaryKey(Integer oauthId);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UcenterOauth record, @Param("example") UcenterOauthExample example);
|
||||
|
||||
int updateByExample(@Param("record") UcenterOauth record, @Param("example") UcenterOauthExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UcenterOauth record);
|
||||
|
||||
int updateByPrimaryKey(UcenterOauth record);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package com.zheng.ucenter.dao.mapper;
|
||||
|
||||
import com.zheng.ucenter.dao.model.UcenterUserDetails;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserDetailsExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UcenterUserDetailsMapper {
|
||||
long countByExample(UcenterUserDetailsExample example);
|
||||
|
||||
int deleteByExample(UcenterUserDetailsExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer userId);
|
||||
|
||||
int insert(UcenterUserDetails record);
|
||||
|
||||
int insertSelective(UcenterUserDetails record);
|
||||
|
||||
List<UcenterUserDetails> selectByExample(UcenterUserDetailsExample example);
|
||||
|
||||
UcenterUserDetails selectByPrimaryKey(Integer userId);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UcenterUserDetails record, @Param("example") UcenterUserDetailsExample example);
|
||||
|
||||
int updateByExample(@Param("record") UcenterUserDetails record, @Param("example") UcenterUserDetailsExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UcenterUserDetails record);
|
||||
|
||||
int updateByPrimaryKey(UcenterUserDetails record);
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.zheng.ucenter.dao.mapper;
|
||||
|
||||
import com.zheng.ucenter.dao.model.UcenterUserLog;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserLogExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UcenterUserLogMapper {
|
||||
long countByExample(UcenterUserLogExample example);
|
||||
|
||||
int deleteByExample(UcenterUserLogExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer userLogId);
|
||||
|
||||
int insert(UcenterUserLog record);
|
||||
|
||||
int insertSelective(UcenterUserLog record);
|
||||
|
||||
List<UcenterUserLog> selectByExampleWithBLOBs(UcenterUserLogExample example);
|
||||
|
||||
List<UcenterUserLog> selectByExample(UcenterUserLogExample example);
|
||||
|
||||
UcenterUserLog selectByPrimaryKey(Integer userLogId);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UcenterUserLog record, @Param("example") UcenterUserLogExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") UcenterUserLog record, @Param("example") UcenterUserLogExample example);
|
||||
|
||||
int updateByExample(@Param("record") UcenterUserLog record, @Param("example") UcenterUserLogExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UcenterUserLog record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(UcenterUserLog record);
|
||||
|
||||
int updateByPrimaryKey(UcenterUserLog record);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package com.zheng.ucenter.dao.mapper;
|
||||
|
||||
import com.zheng.ucenter.dao.model.UcenterUser;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UcenterUserMapper {
|
||||
long countByExample(UcenterUserExample example);
|
||||
|
||||
int deleteByExample(UcenterUserExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer userId);
|
||||
|
||||
int insert(UcenterUser record);
|
||||
|
||||
int insertSelective(UcenterUser record);
|
||||
|
||||
List<UcenterUser> selectByExample(UcenterUserExample example);
|
||||
|
||||
UcenterUser selectByPrimaryKey(Integer userId);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UcenterUser record, @Param("example") UcenterUserExample example);
|
||||
|
||||
int updateByExample(@Param("record") UcenterUser record, @Param("example") UcenterUserExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UcenterUser record);
|
||||
|
||||
int updateByPrimaryKey(UcenterUser record);
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.zheng.ucenter.dao.mapper;
|
||||
|
||||
import com.zheng.ucenter.dao.model.UcenterUserOauth;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserOauthExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UcenterUserOauthMapper {
|
||||
long countByExample(UcenterUserOauthExample example);
|
||||
|
||||
int deleteByExample(UcenterUserOauthExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer userOauthId);
|
||||
|
||||
int insert(UcenterUserOauth record);
|
||||
|
||||
int insertSelective(UcenterUserOauth record);
|
||||
|
||||
List<UcenterUserOauth> selectByExampleWithBLOBs(UcenterUserOauthExample example);
|
||||
|
||||
List<UcenterUserOauth> selectByExample(UcenterUserOauthExample example);
|
||||
|
||||
UcenterUserOauth selectByPrimaryKey(Integer userOauthId);
|
||||
|
||||
int updateByExampleSelective(@Param("record") UcenterUserOauth record, @Param("example") UcenterUserOauthExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") UcenterUserOauth record, @Param("example") UcenterUserOauthExample example);
|
||||
|
||||
int updateByExample(@Param("record") UcenterUserOauth record, @Param("example") UcenterUserOauthExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(UcenterUserOauth record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(UcenterUserOauth record);
|
||||
|
||||
int updateByPrimaryKey(UcenterUserOauth record);
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.zheng.ucenter.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class UcenterOauth implements Serializable {
|
||||
/**
|
||||
* 编号
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer oauthId;
|
||||
|
||||
/**
|
||||
* 认证方式名称
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String name;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getOauthId() {
|
||||
return oauthId;
|
||||
}
|
||||
|
||||
public void setOauthId(Integer oauthId) {
|
||||
this.oauthId = oauthId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", oauthId=").append(oauthId);
|
||||
sb.append(", name=").append(name);
|
||||
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;
|
||||
}
|
||||
UcenterOauth other = (UcenterOauth) that;
|
||||
return (this.getOauthId() == null ? other.getOauthId() == null : this.getOauthId().equals(other.getOauthId()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getOauthId() == null) ? 0 : getOauthId().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,353 @@
|
|||
package com.zheng.ucenter.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UcenterOauthExample implements Serializable {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Integer offset;
|
||||
|
||||
public UcenterOauthExample() {
|
||||
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;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Integer offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Integer getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria implements Serializable {
|
||||
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 andOauthIdIsNull() {
|
||||
addCriterion("oauth_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdIsNotNull() {
|
||||
addCriterion("oauth_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdEqualTo(Integer value) {
|
||||
addCriterion("oauth_id =", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdNotEqualTo(Integer value) {
|
||||
addCriterion("oauth_id <>", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdGreaterThan(Integer value) {
|
||||
addCriterion("oauth_id >", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("oauth_id >=", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdLessThan(Integer value) {
|
||||
addCriterion("oauth_id <", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("oauth_id <=", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdIn(List<Integer> values) {
|
||||
addCriterion("oauth_id in", values, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdNotIn(List<Integer> values) {
|
||||
addCriterion("oauth_id not in", values, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("oauth_id between", value1, value2, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("oauth_id not between", value1, value2, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("name =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("name <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("name >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("name >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("name <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("name <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("name like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("name not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("name in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("name not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("name between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("name not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria implements Serializable {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion implements Serializable {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,219 @@
|
|||
package com.zheng.ucenter.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class UcenterUser implements Serializable {
|
||||
/**
|
||||
* 编号
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 密码(MD5(密码+盐))
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 盐
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String salt;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 性别(0:未知,1:男,2:女)
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Byte sex;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 注册时间
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 注册IP地址
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String createIp;
|
||||
|
||||
/**
|
||||
* 最后登录时间
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Date lastLoginTime;
|
||||
|
||||
/**
|
||||
* 最后登录IP地址
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String lastLoginIp;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getSalt() {
|
||||
return salt;
|
||||
}
|
||||
|
||||
public void setSalt(String salt) {
|
||||
this.salt = salt;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public Byte getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(Byte sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getCreateIp() {
|
||||
return createIp;
|
||||
}
|
||||
|
||||
public void setCreateIp(String createIp) {
|
||||
this.createIp = createIp;
|
||||
}
|
||||
|
||||
public Date getLastLoginTime() {
|
||||
return lastLoginTime;
|
||||
}
|
||||
|
||||
public void setLastLoginTime(Date lastLoginTime) {
|
||||
this.lastLoginTime = lastLoginTime;
|
||||
}
|
||||
|
||||
public String getLastLoginIp() {
|
||||
return lastLoginIp;
|
||||
}
|
||||
|
||||
public void setLastLoginIp(String lastLoginIp) {
|
||||
this.lastLoginIp = lastLoginIp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", userId=").append(userId);
|
||||
sb.append(", password=").append(password);
|
||||
sb.append(", salt=").append(salt);
|
||||
sb.append(", nickname=").append(nickname);
|
||||
sb.append(", sex=").append(sex);
|
||||
sb.append(", avatar=").append(avatar);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", createIp=").append(createIp);
|
||||
sb.append(", lastLoginTime=").append(lastLoginTime);
|
||||
sb.append(", lastLoginIp=").append(lastLoginIp);
|
||||
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;
|
||||
}
|
||||
UcenterUser other = (UcenterUser) that;
|
||||
return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
|
||||
&& (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
|
||||
&& (this.getSalt() == null ? other.getSalt() == null : this.getSalt().equals(other.getSalt()))
|
||||
&& (this.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname()))
|
||||
&& (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
|
||||
&& (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||
&& (this.getCreateIp() == null ? other.getCreateIp() == null : this.getCreateIp().equals(other.getCreateIp()))
|
||||
&& (this.getLastLoginTime() == null ? other.getLastLoginTime() == null : this.getLastLoginTime().equals(other.getLastLoginTime()))
|
||||
&& (this.getLastLoginIp() == null ? other.getLastLoginIp() == null : this.getLastLoginIp().equals(other.getLastLoginIp()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
|
||||
result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
|
||||
result = prime * result + ((getSalt() == null) ? 0 : getSalt().hashCode());
|
||||
result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode());
|
||||
result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
|
||||
result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
result = prime * result + ((getCreateIp() == null) ? 0 : getCreateIp().hashCode());
|
||||
result = prime * result + ((getLastLoginTime() == null) ? 0 : getLastLoginTime().hashCode());
|
||||
result = prime * result + ((getLastLoginIp() == null) ? 0 : getLastLoginIp().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,147 @@
|
|||
package com.zheng.ucenter.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class UcenterUserDetails implements Serializable {
|
||||
/**
|
||||
* 编号
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 个性签名
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 真实姓名
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Date birthday;
|
||||
|
||||
/**
|
||||
* 帐号安全问题
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String question;
|
||||
|
||||
/**
|
||||
* 帐号安全答案
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String answer;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getSignature() {
|
||||
return signature;
|
||||
}
|
||||
|
||||
public void setSignature(String signature) {
|
||||
this.signature = signature;
|
||||
}
|
||||
|
||||
public String getRealName() {
|
||||
return realName;
|
||||
}
|
||||
|
||||
public void setRealName(String realName) {
|
||||
this.realName = realName;
|
||||
}
|
||||
|
||||
public Date getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthday(Date birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public String getQuestion() {
|
||||
return question;
|
||||
}
|
||||
|
||||
public void setQuestion(String question) {
|
||||
this.question = question;
|
||||
}
|
||||
|
||||
public String getAnswer() {
|
||||
return answer;
|
||||
}
|
||||
|
||||
public void setAnswer(String answer) {
|
||||
this.answer = answer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", userId=").append(userId);
|
||||
sb.append(", signature=").append(signature);
|
||||
sb.append(", realName=").append(realName);
|
||||
sb.append(", birthday=").append(birthday);
|
||||
sb.append(", question=").append(question);
|
||||
sb.append(", answer=").append(answer);
|
||||
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;
|
||||
}
|
||||
UcenterUserDetails other = (UcenterUserDetails) that;
|
||||
return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
|
||||
&& (this.getSignature() == null ? other.getSignature() == null : this.getSignature().equals(other.getSignature()))
|
||||
&& (this.getRealName() == null ? other.getRealName() == null : this.getRealName().equals(other.getRealName()))
|
||||
&& (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
|
||||
&& (this.getQuestion() == null ? other.getQuestion() == null : this.getQuestion().equals(other.getQuestion()))
|
||||
&& (this.getAnswer() == null ? other.getAnswer() == null : this.getAnswer().equals(other.getAnswer()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
|
||||
result = prime * result + ((getSignature() == null) ? 0 : getSignature().hashCode());
|
||||
result = prime * result + ((getRealName() == null) ? 0 : getRealName().hashCode());
|
||||
result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
|
||||
result = prime * result + ((getQuestion() == null) ? 0 : getQuestion().hashCode());
|
||||
result = prime * result + ((getAnswer() == null) ? 0 : getAnswer().hashCode());
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,624 @@
|
|||
package com.zheng.ucenter.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class UcenterUserDetailsExample implements Serializable {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Integer offset;
|
||||
|
||||
public UcenterUserDetailsExample() {
|
||||
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;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Integer offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Integer getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria implements Serializable {
|
||||
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 andUserIdIsNull() {
|
||||
addCriterion("user_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIsNotNull() {
|
||||
addCriterion("user_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdEqualTo(Integer value) {
|
||||
addCriterion("user_id =", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotEqualTo(Integer value) {
|
||||
addCriterion("user_id <>", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdGreaterThan(Integer value) {
|
||||
addCriterion("user_id >", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_id >=", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdLessThan(Integer value) {
|
||||
addCriterion("user_id <", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_id <=", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIn(List<Integer> values) {
|
||||
addCriterion("user_id in", values, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotIn(List<Integer> values) {
|
||||
addCriterion("user_id not in", values, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_id between", value1, value2, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_id not between", value1, value2, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureIsNull() {
|
||||
addCriterion("signature is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureIsNotNull() {
|
||||
addCriterion("signature is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureEqualTo(String value) {
|
||||
addCriterion("signature =", value, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureNotEqualTo(String value) {
|
||||
addCriterion("signature <>", value, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureGreaterThan(String value) {
|
||||
addCriterion("signature >", value, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("signature >=", value, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureLessThan(String value) {
|
||||
addCriterion("signature <", value, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureLessThanOrEqualTo(String value) {
|
||||
addCriterion("signature <=", value, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureLike(String value) {
|
||||
addCriterion("signature like", value, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureNotLike(String value) {
|
||||
addCriterion("signature not like", value, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureIn(List<String> values) {
|
||||
addCriterion("signature in", values, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureNotIn(List<String> values) {
|
||||
addCriterion("signature not in", values, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureBetween(String value1, String value2) {
|
||||
addCriterion("signature between", value1, value2, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSignatureNotBetween(String value1, String value2) {
|
||||
addCriterion("signature not between", value1, value2, "signature");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameIsNull() {
|
||||
addCriterion("real_name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameIsNotNull() {
|
||||
addCriterion("real_name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameEqualTo(String value) {
|
||||
addCriterion("real_name =", value, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameNotEqualTo(String value) {
|
||||
addCriterion("real_name <>", value, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameGreaterThan(String value) {
|
||||
addCriterion("real_name >", value, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("real_name >=", value, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameLessThan(String value) {
|
||||
addCriterion("real_name <", value, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("real_name <=", value, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameLike(String value) {
|
||||
addCriterion("real_name like", value, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameNotLike(String value) {
|
||||
addCriterion("real_name not like", value, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameIn(List<String> values) {
|
||||
addCriterion("real_name in", values, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameNotIn(List<String> values) {
|
||||
addCriterion("real_name not in", values, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameBetween(String value1, String value2) {
|
||||
addCriterion("real_name between", value1, value2, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRealNameNotBetween(String value1, String value2) {
|
||||
addCriterion("real_name not between", value1, value2, "realName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayIsNull() {
|
||||
addCriterion("birthday is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayIsNotNull() {
|
||||
addCriterion("birthday is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayEqualTo(Date value) {
|
||||
addCriterion("birthday =", value, "birthday");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayNotEqualTo(Date value) {
|
||||
addCriterion("birthday <>", value, "birthday");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayGreaterThan(Date value) {
|
||||
addCriterion("birthday >", value, "birthday");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("birthday >=", value, "birthday");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayLessThan(Date value) {
|
||||
addCriterion("birthday <", value, "birthday");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayLessThanOrEqualTo(Date value) {
|
||||
addCriterion("birthday <=", value, "birthday");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayIn(List<Date> values) {
|
||||
addCriterion("birthday in", values, "birthday");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayNotIn(List<Date> values) {
|
||||
addCriterion("birthday not in", values, "birthday");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayBetween(Date value1, Date value2) {
|
||||
addCriterion("birthday between", value1, value2, "birthday");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andBirthdayNotBetween(Date value1, Date value2) {
|
||||
addCriterion("birthday not between", value1, value2, "birthday");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionIsNull() {
|
||||
addCriterion("question is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionIsNotNull() {
|
||||
addCriterion("question is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionEqualTo(String value) {
|
||||
addCriterion("question =", value, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionNotEqualTo(String value) {
|
||||
addCriterion("question <>", value, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionGreaterThan(String value) {
|
||||
addCriterion("question >", value, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("question >=", value, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionLessThan(String value) {
|
||||
addCriterion("question <", value, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionLessThanOrEqualTo(String value) {
|
||||
addCriterion("question <=", value, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionLike(String value) {
|
||||
addCriterion("question like", value, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionNotLike(String value) {
|
||||
addCriterion("question not like", value, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionIn(List<String> values) {
|
||||
addCriterion("question in", values, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionNotIn(List<String> values) {
|
||||
addCriterion("question not in", values, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionBetween(String value1, String value2) {
|
||||
addCriterion("question between", value1, value2, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andQuestionNotBetween(String value1, String value2) {
|
||||
addCriterion("question not between", value1, value2, "question");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerIsNull() {
|
||||
addCriterion("answer is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerIsNotNull() {
|
||||
addCriterion("answer is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerEqualTo(String value) {
|
||||
addCriterion("answer =", value, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerNotEqualTo(String value) {
|
||||
addCriterion("answer <>", value, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerGreaterThan(String value) {
|
||||
addCriterion("answer >", value, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("answer >=", value, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerLessThan(String value) {
|
||||
addCriterion("answer <", value, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerLessThanOrEqualTo(String value) {
|
||||
addCriterion("answer <=", value, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerLike(String value) {
|
||||
addCriterion("answer like", value, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerNotLike(String value) {
|
||||
addCriterion("answer not like", value, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerIn(List<String> values) {
|
||||
addCriterion("answer in", values, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerNotIn(List<String> values) {
|
||||
addCriterion("answer not in", values, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerBetween(String value1, String value2) {
|
||||
addCriterion("answer between", value1, value2, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAnswerNotBetween(String value1, String value2) {
|
||||
addCriterion("answer not between", value1, value2, "answer");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria implements Serializable {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion implements Serializable {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,884 @@
|
|||
package com.zheng.ucenter.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class UcenterUserExample implements Serializable {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Integer offset;
|
||||
|
||||
public UcenterUserExample() {
|
||||
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;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Integer offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Integer getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria implements Serializable {
|
||||
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 andUserIdIsNull() {
|
||||
addCriterion("user_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIsNotNull() {
|
||||
addCriterion("user_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdEqualTo(Integer value) {
|
||||
addCriterion("user_id =", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotEqualTo(Integer value) {
|
||||
addCriterion("user_id <>", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdGreaterThan(Integer value) {
|
||||
addCriterion("user_id >", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_id >=", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdLessThan(Integer value) {
|
||||
addCriterion("user_id <", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_id <=", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIn(List<Integer> values) {
|
||||
addCriterion("user_id in", values, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotIn(List<Integer> values) {
|
||||
addCriterion("user_id not in", values, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_id between", value1, value2, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_id not between", value1, value2, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIsNull() {
|
||||
addCriterion("password is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIsNotNull() {
|
||||
addCriterion("password is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordEqualTo(String value) {
|
||||
addCriterion("password =", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotEqualTo(String value) {
|
||||
addCriterion("password <>", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordGreaterThan(String value) {
|
||||
addCriterion("password >", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("password >=", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLessThan(String value) {
|
||||
addCriterion("password <", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLessThanOrEqualTo(String value) {
|
||||
addCriterion("password <=", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLike(String value) {
|
||||
addCriterion("password like", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotLike(String value) {
|
||||
addCriterion("password not like", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIn(List<String> values) {
|
||||
addCriterion("password in", values, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotIn(List<String> values) {
|
||||
addCriterion("password not in", values, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordBetween(String value1, String value2) {
|
||||
addCriterion("password between", value1, value2, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotBetween(String value1, String value2) {
|
||||
addCriterion("password not between", value1, value2, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltIsNull() {
|
||||
addCriterion("salt is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltIsNotNull() {
|
||||
addCriterion("salt is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltEqualTo(String value) {
|
||||
addCriterion("salt =", value, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltNotEqualTo(String value) {
|
||||
addCriterion("salt <>", value, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltGreaterThan(String value) {
|
||||
addCriterion("salt >", value, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("salt >=", value, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltLessThan(String value) {
|
||||
addCriterion("salt <", value, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltLessThanOrEqualTo(String value) {
|
||||
addCriterion("salt <=", value, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltLike(String value) {
|
||||
addCriterion("salt like", value, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltNotLike(String value) {
|
||||
addCriterion("salt not like", value, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltIn(List<String> values) {
|
||||
addCriterion("salt in", values, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltNotIn(List<String> values) {
|
||||
addCriterion("salt not in", values, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltBetween(String value1, String value2) {
|
||||
addCriterion("salt between", value1, value2, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSaltNotBetween(String value1, String value2) {
|
||||
addCriterion("salt not between", value1, value2, "salt");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameIsNull() {
|
||||
addCriterion("nickname is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameIsNotNull() {
|
||||
addCriterion("nickname is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameEqualTo(String value) {
|
||||
addCriterion("nickname =", value, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameNotEqualTo(String value) {
|
||||
addCriterion("nickname <>", value, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameGreaterThan(String value) {
|
||||
addCriterion("nickname >", value, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("nickname >=", value, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameLessThan(String value) {
|
||||
addCriterion("nickname <", value, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameLessThanOrEqualTo(String value) {
|
||||
addCriterion("nickname <=", value, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameLike(String value) {
|
||||
addCriterion("nickname like", value, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameNotLike(String value) {
|
||||
addCriterion("nickname not like", value, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameIn(List<String> values) {
|
||||
addCriterion("nickname in", values, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameNotIn(List<String> values) {
|
||||
addCriterion("nickname not in", values, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameBetween(String value1, String value2) {
|
||||
addCriterion("nickname between", value1, value2, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNicknameNotBetween(String value1, String value2) {
|
||||
addCriterion("nickname not between", value1, value2, "nickname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexIsNull() {
|
||||
addCriterion("sex is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexIsNotNull() {
|
||||
addCriterion("sex is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexEqualTo(Byte value) {
|
||||
addCriterion("sex =", value, "sex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexNotEqualTo(Byte value) {
|
||||
addCriterion("sex <>", value, "sex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexGreaterThan(Byte value) {
|
||||
addCriterion("sex >", value, "sex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexGreaterThanOrEqualTo(Byte value) {
|
||||
addCriterion("sex >=", value, "sex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexLessThan(Byte value) {
|
||||
addCriterion("sex <", value, "sex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexLessThanOrEqualTo(Byte value) {
|
||||
addCriterion("sex <=", value, "sex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexIn(List<Byte> values) {
|
||||
addCriterion("sex in", values, "sex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexNotIn(List<Byte> values) {
|
||||
addCriterion("sex not in", values, "sex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexBetween(Byte value1, Byte value2) {
|
||||
addCriterion("sex between", value1, value2, "sex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSexNotBetween(Byte value1, Byte value2) {
|
||||
addCriterion("sex not between", value1, value2, "sex");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarIsNull() {
|
||||
addCriterion("avatar is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarIsNotNull() {
|
||||
addCriterion("avatar is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarEqualTo(String value) {
|
||||
addCriterion("avatar =", value, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarNotEqualTo(String value) {
|
||||
addCriterion("avatar <>", value, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarGreaterThan(String value) {
|
||||
addCriterion("avatar >", value, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("avatar >=", value, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarLessThan(String value) {
|
||||
addCriterion("avatar <", value, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarLessThanOrEqualTo(String value) {
|
||||
addCriterion("avatar <=", value, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarLike(String value) {
|
||||
addCriterion("avatar like", value, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarNotLike(String value) {
|
||||
addCriterion("avatar not like", value, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarIn(List<String> values) {
|
||||
addCriterion("avatar in", values, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarNotIn(List<String> values) {
|
||||
addCriterion("avatar not in", values, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarBetween(String value1, String value2) {
|
||||
addCriterion("avatar between", value1, value2, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAvatarNotBetween(String value1, String value2) {
|
||||
addCriterion("avatar not between", value1, value2, "avatar");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<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 andCreateIpIsNull() {
|
||||
addCriterion("create_ip is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpIsNotNull() {
|
||||
addCriterion("create_ip is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpEqualTo(String value) {
|
||||
addCriterion("create_ip =", value, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpNotEqualTo(String value) {
|
||||
addCriterion("create_ip <>", value, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpGreaterThan(String value) {
|
||||
addCriterion("create_ip >", value, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("create_ip >=", value, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpLessThan(String value) {
|
||||
addCriterion("create_ip <", value, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpLessThanOrEqualTo(String value) {
|
||||
addCriterion("create_ip <=", value, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpLike(String value) {
|
||||
addCriterion("create_ip like", value, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpNotLike(String value) {
|
||||
addCriterion("create_ip not like", value, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpIn(List<String> values) {
|
||||
addCriterion("create_ip in", values, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpNotIn(List<String> values) {
|
||||
addCriterion("create_ip not in", values, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpBetween(String value1, String value2) {
|
||||
addCriterion("create_ip between", value1, value2, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateIpNotBetween(String value1, String value2) {
|
||||
addCriterion("create_ip not between", value1, value2, "createIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeIsNull() {
|
||||
addCriterion("last_login_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeIsNotNull() {
|
||||
addCriterion("last_login_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeEqualTo(Date value) {
|
||||
addCriterion("last_login_time =", value, "lastLoginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeNotEqualTo(Date value) {
|
||||
addCriterion("last_login_time <>", value, "lastLoginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeGreaterThan(Date value) {
|
||||
addCriterion("last_login_time >", value, "lastLoginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("last_login_time >=", value, "lastLoginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeLessThan(Date value) {
|
||||
addCriterion("last_login_time <", value, "lastLoginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("last_login_time <=", value, "lastLoginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeIn(List<Date> values) {
|
||||
addCriterion("last_login_time in", values, "lastLoginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeNotIn(List<Date> values) {
|
||||
addCriterion("last_login_time not in", values, "lastLoginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("last_login_time between", value1, value2, "lastLoginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("last_login_time not between", value1, value2, "lastLoginTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpIsNull() {
|
||||
addCriterion("last_login_ip is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpIsNotNull() {
|
||||
addCriterion("last_login_ip is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpEqualTo(String value) {
|
||||
addCriterion("last_login_ip =", value, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpNotEqualTo(String value) {
|
||||
addCriterion("last_login_ip <>", value, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpGreaterThan(String value) {
|
||||
addCriterion("last_login_ip >", value, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("last_login_ip >=", value, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpLessThan(String value) {
|
||||
addCriterion("last_login_ip <", value, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpLessThanOrEqualTo(String value) {
|
||||
addCriterion("last_login_ip <=", value, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpLike(String value) {
|
||||
addCriterion("last_login_ip like", value, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpNotLike(String value) {
|
||||
addCriterion("last_login_ip not like", value, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpIn(List<String> values) {
|
||||
addCriterion("last_login_ip in", values, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpNotIn(List<String> values) {
|
||||
addCriterion("last_login_ip not in", values, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpBetween(String value1, String value2) {
|
||||
addCriterion("last_login_ip between", value1, value2, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andLastLoginIpNotBetween(String value1, String value2) {
|
||||
addCriterion("last_login_ip not between", value1, value2, "lastLoginIp");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria implements Serializable {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion implements Serializable {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
package com.zheng.ucenter.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
|
||||
public class UcenterUserLog implements Serializable {
|
||||
/**
|
||||
* 编号
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer userLogId;
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 操作IP地址
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private byte[] content;
|
||||
|
||||
/**
|
||||
* 操作环境
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private byte[] agent;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getUserLogId() {
|
||||
return userLogId;
|
||||
}
|
||||
|
||||
public void setUserLogId(Integer userLogId) {
|
||||
this.userLogId = userLogId;
|
||||
}
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public byte[] getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(byte[] content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public byte[] getAgent() {
|
||||
return agent;
|
||||
}
|
||||
|
||||
public void setAgent(byte[] agent) {
|
||||
this.agent = agent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", userLogId=").append(userLogId);
|
||||
sb.append(", userId=").append(userId);
|
||||
sb.append(", ip=").append(ip);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", content=").append(content);
|
||||
sb.append(", agent=").append(agent);
|
||||
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;
|
||||
}
|
||||
UcenterUserLog other = (UcenterUserLog) that;
|
||||
return (this.getUserLogId() == null ? other.getUserLogId() == null : this.getUserLogId().equals(other.getUserLogId()))
|
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
|
||||
&& (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||
&& (Arrays.equals(this.getContent(), other.getContent()))
|
||||
&& (Arrays.equals(this.getAgent(), other.getAgent()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getUserLogId() == null) ? 0 : getUserLogId().hashCode());
|
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
|
||||
result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
result = prime * result + (Arrays.hashCode(getContent()));
|
||||
result = prime * result + (Arrays.hashCode(getAgent()));
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,474 @@
|
|||
package com.zheng.ucenter.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class UcenterUserLogExample implements Serializable {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Integer offset;
|
||||
|
||||
public UcenterUserLogExample() {
|
||||
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;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Integer offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Integer getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria implements Serializable {
|
||||
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 andUserLogIdIsNull() {
|
||||
addCriterion("user_log_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLogIdIsNotNull() {
|
||||
addCriterion("user_log_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLogIdEqualTo(Integer value) {
|
||||
addCriterion("user_log_id =", value, "userLogId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLogIdNotEqualTo(Integer value) {
|
||||
addCriterion("user_log_id <>", value, "userLogId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLogIdGreaterThan(Integer value) {
|
||||
addCriterion("user_log_id >", value, "userLogId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLogIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_log_id >=", value, "userLogId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLogIdLessThan(Integer value) {
|
||||
addCriterion("user_log_id <", value, "userLogId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLogIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_log_id <=", value, "userLogId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLogIdIn(List<Integer> values) {
|
||||
addCriterion("user_log_id in", values, "userLogId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLogIdNotIn(List<Integer> values) {
|
||||
addCriterion("user_log_id not in", values, "userLogId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLogIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_log_id between", value1, value2, "userLogId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLogIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_log_id not between", value1, value2, "userLogId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIsNull() {
|
||||
addCriterion("user_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIsNotNull() {
|
||||
addCriterion("user_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdEqualTo(Integer value) {
|
||||
addCriterion("user_id =", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotEqualTo(Integer value) {
|
||||
addCriterion("user_id <>", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdGreaterThan(Integer value) {
|
||||
addCriterion("user_id >", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_id >=", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdLessThan(Integer value) {
|
||||
addCriterion("user_id <", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_id <=", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIn(List<Integer> values) {
|
||||
addCriterion("user_id in", values, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotIn(List<Integer> values) {
|
||||
addCriterion("user_id not in", values, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_id between", value1, value2, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_id not between", value1, value2, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpIsNull() {
|
||||
addCriterion("ip is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpIsNotNull() {
|
||||
addCriterion("ip is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpEqualTo(String value) {
|
||||
addCriterion("ip =", value, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpNotEqualTo(String value) {
|
||||
addCriterion("ip <>", value, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpGreaterThan(String value) {
|
||||
addCriterion("ip >", value, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("ip >=", value, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpLessThan(String value) {
|
||||
addCriterion("ip <", value, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpLessThanOrEqualTo(String value) {
|
||||
addCriterion("ip <=", value, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpLike(String value) {
|
||||
addCriterion("ip like", value, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpNotLike(String value) {
|
||||
addCriterion("ip not like", value, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpIn(List<String> values) {
|
||||
addCriterion("ip in", values, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpNotIn(List<String> values) {
|
||||
addCriterion("ip not in", values, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpBetween(String value1, String value2) {
|
||||
addCriterion("ip between", value1, value2, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIpNotBetween(String value1, String value2) {
|
||||
addCriterion("ip not between", value1, value2, "ip");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<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 static class Criteria extends GeneratedCriteria implements Serializable {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion implements Serializable {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
package com.zheng.ucenter.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
|
||||
public class UcenterUserOauth implements Serializable {
|
||||
/**
|
||||
* 编号
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer userOauthId;
|
||||
|
||||
/**
|
||||
* 帐号编号
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 认证方式编号
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer oauthId;
|
||||
|
||||
/**
|
||||
* 绑定状态(0:解绑,1:绑定)
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Byte status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 第三方ID
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private byte[] openId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getUserOauthId() {
|
||||
return userOauthId;
|
||||
}
|
||||
|
||||
public void setUserOauthId(Integer userOauthId) {
|
||||
this.userOauthId = userOauthId;
|
||||
}
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Integer getOauthId() {
|
||||
return oauthId;
|
||||
}
|
||||
|
||||
public void setOauthId(Integer oauthId) {
|
||||
this.oauthId = oauthId;
|
||||
}
|
||||
|
||||
public Byte getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Byte status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public byte[] getOpenId() {
|
||||
return openId;
|
||||
}
|
||||
|
||||
public void setOpenId(byte[] openId) {
|
||||
this.openId = openId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", userOauthId=").append(userOauthId);
|
||||
sb.append(", userId=").append(userId);
|
||||
sb.append(", oauthId=").append(oauthId);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", openId=").append(openId);
|
||||
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;
|
||||
}
|
||||
UcenterUserOauth other = (UcenterUserOauth) that;
|
||||
return (this.getUserOauthId() == null ? other.getUserOauthId() == null : this.getUserOauthId().equals(other.getUserOauthId()))
|
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
|
||||
&& (this.getOauthId() == null ? other.getOauthId() == null : this.getOauthId().equals(other.getOauthId()))
|
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||
&& (Arrays.equals(this.getOpenId(), other.getOpenId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getUserOauthId() == null) ? 0 : getUserOauthId().hashCode());
|
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
|
||||
result = prime * result + ((getOauthId() == null) ? 0 : getOauthId().hashCode());
|
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
result = prime * result + (Arrays.hashCode(getOpenId()));
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,524 @@
|
|||
package com.zheng.ucenter.dao.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class UcenterUserOauthExample implements Serializable {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Integer offset;
|
||||
|
||||
public UcenterUserOauthExample() {
|
||||
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;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Integer offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Integer getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria implements Serializable {
|
||||
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 andUserOauthIdIsNull() {
|
||||
addCriterion("user_oauth_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserOauthIdIsNotNull() {
|
||||
addCriterion("user_oauth_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserOauthIdEqualTo(Integer value) {
|
||||
addCriterion("user_oauth_id =", value, "userOauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserOauthIdNotEqualTo(Integer value) {
|
||||
addCriterion("user_oauth_id <>", value, "userOauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserOauthIdGreaterThan(Integer value) {
|
||||
addCriterion("user_oauth_id >", value, "userOauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserOauthIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_oauth_id >=", value, "userOauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserOauthIdLessThan(Integer value) {
|
||||
addCriterion("user_oauth_id <", value, "userOauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserOauthIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_oauth_id <=", value, "userOauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserOauthIdIn(List<Integer> values) {
|
||||
addCriterion("user_oauth_id in", values, "userOauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserOauthIdNotIn(List<Integer> values) {
|
||||
addCriterion("user_oauth_id not in", values, "userOauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserOauthIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_oauth_id between", value1, value2, "userOauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserOauthIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_oauth_id not between", value1, value2, "userOauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIsNull() {
|
||||
addCriterion("user_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIsNotNull() {
|
||||
addCriterion("user_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdEqualTo(Integer value) {
|
||||
addCriterion("user_id =", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotEqualTo(Integer value) {
|
||||
addCriterion("user_id <>", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdGreaterThan(Integer value) {
|
||||
addCriterion("user_id >", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_id >=", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdLessThan(Integer value) {
|
||||
addCriterion("user_id <", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("user_id <=", value, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdIn(List<Integer> values) {
|
||||
addCriterion("user_id in", values, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotIn(List<Integer> values) {
|
||||
addCriterion("user_id not in", values, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_id between", value1, value2, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("user_id not between", value1, value2, "userId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdIsNull() {
|
||||
addCriterion("oauth_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdIsNotNull() {
|
||||
addCriterion("oauth_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdEqualTo(Integer value) {
|
||||
addCriterion("oauth_id =", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdNotEqualTo(Integer value) {
|
||||
addCriterion("oauth_id <>", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdGreaterThan(Integer value) {
|
||||
addCriterion("oauth_id >", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("oauth_id >=", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdLessThan(Integer value) {
|
||||
addCriterion("oauth_id <", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("oauth_id <=", value, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdIn(List<Integer> values) {
|
||||
addCriterion("oauth_id in", values, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdNotIn(List<Integer> values) {
|
||||
addCriterion("oauth_id not in", values, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdBetween(Integer value1, Integer value2) {
|
||||
addCriterion("oauth_id between", value1, value2, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOauthIdNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("oauth_id not between", value1, value2, "oauthId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("status is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("status is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(Byte value) {
|
||||
addCriterion("status =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(Byte value) {
|
||||
addCriterion("status <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(Byte value) {
|
||||
addCriterion("status >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(Byte value) {
|
||||
addCriterion("status >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(Byte value) {
|
||||
addCriterion("status <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(Byte value) {
|
||||
addCriterion("status <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<Byte> values) {
|
||||
addCriterion("status in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<Byte> values) {
|
||||
addCriterion("status not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(Byte value1, Byte value2) {
|
||||
addCriterion("status between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(Byte value1, Byte value2) {
|
||||
addCriterion("status not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<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 static class Criteria extends GeneratedCriteria implements Serializable {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion implements Serializable {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
generator.jdbc.driver=com.mysql.jdbc.Driver
|
||||
generator.jdbc.url=jdbc\:mysql\://127.0.0.1\:3306/zheng?useUnicode\=true&characterEncoding\=utf-8&autoReconnect\=true
|
||||
generator.jdbc.username=root
|
||||
generator.jdbc.password=rWd3Hb+AzNg3IXF1b5vD+g==
|
|
@ -0,0 +1,45 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.zheng</groupId>
|
||||
<artifactId>zheng-ucenter</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>zheng-ucenter-rpc-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>zheng-ucenter-rpc-api</name>
|
||||
<url>http://www.zhangshuzheng.cn</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zheng</groupId>
|
||||
<artifactId>zheng-ucenter-dao</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>zheng-ucenter-rpc-api</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,13 @@
|
|||
package com.zheng.ucenter.rpc.api;
|
||||
|
||||
import com.zheng.common.base.BaseService;
|
||||
import com.zheng.ucenter.dao.model.UcenterOauth;
|
||||
import com.zheng.ucenter.dao.model.UcenterOauthExample;
|
||||
|
||||
/**
|
||||
* UcenterOauthService接口
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
public interface UcenterOauthService extends BaseService<UcenterOauth, UcenterOauthExample> {
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.zheng.ucenter.rpc.api;
|
||||
|
||||
import com.zheng.common.base.BaseServiceMock;
|
||||
import com.zheng.ucenter.dao.mapper.UcenterOauthMapper;
|
||||
import com.zheng.ucenter.dao.model.UcenterOauth;
|
||||
import com.zheng.ucenter.dao.model.UcenterOauthExample;
|
||||
|
||||
/**
|
||||
* 降级实现UcenterOauthService接口
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
public class UcenterOauthServiceMock extends BaseServiceMock<UcenterOauthMapper, UcenterOauth, UcenterOauthExample> implements UcenterOauthService {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.zheng.ucenter.rpc.api;
|
||||
|
||||
import com.zheng.common.base.BaseService;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserDetails;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserDetailsExample;
|
||||
|
||||
/**
|
||||
* UcenterUserDetailsService接口
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
public interface UcenterUserDetailsService extends BaseService<UcenterUserDetails, UcenterUserDetailsExample> {
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.zheng.ucenter.rpc.api;
|
||||
|
||||
import com.zheng.common.base.BaseServiceMock;
|
||||
import com.zheng.ucenter.dao.mapper.UcenterUserDetailsMapper;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserDetails;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserDetailsExample;
|
||||
|
||||
/**
|
||||
* 降级实现UcenterUserDetailsService接口
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
public class UcenterUserDetailsServiceMock extends BaseServiceMock<UcenterUserDetailsMapper, UcenterUserDetails, UcenterUserDetailsExample> implements UcenterUserDetailsService {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.zheng.ucenter.rpc.api;
|
||||
|
||||
import com.zheng.common.base.BaseService;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserLog;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserLogExample;
|
||||
|
||||
/**
|
||||
* UcenterUserLogService接口
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
public interface UcenterUserLogService extends BaseService<UcenterUserLog, UcenterUserLogExample> {
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.zheng.ucenter.rpc.api;
|
||||
|
||||
import com.zheng.common.base.BaseServiceMock;
|
||||
import com.zheng.ucenter.dao.mapper.UcenterUserLogMapper;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserLog;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserLogExample;
|
||||
|
||||
/**
|
||||
* 降级实现UcenterUserLogService接口
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
public class UcenterUserLogServiceMock extends BaseServiceMock<UcenterUserLogMapper, UcenterUserLog, UcenterUserLogExample> implements UcenterUserLogService {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.zheng.ucenter.rpc.api;
|
||||
|
||||
import com.zheng.common.base.BaseService;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserOauth;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserOauthExample;
|
||||
|
||||
/**
|
||||
* UcenterUserOauthService接口
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
public interface UcenterUserOauthService extends BaseService<UcenterUserOauth, UcenterUserOauthExample> {
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.zheng.ucenter.rpc.api;
|
||||
|
||||
import com.zheng.common.base.BaseServiceMock;
|
||||
import com.zheng.ucenter.dao.mapper.UcenterUserOauthMapper;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserOauth;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserOauthExample;
|
||||
|
||||
/**
|
||||
* 降级实现UcenterUserOauthService接口
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
public class UcenterUserOauthServiceMock extends BaseServiceMock<UcenterUserOauthMapper, UcenterUserOauth, UcenterUserOauthExample> implements UcenterUserOauthService {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.zheng.ucenter.rpc.api;
|
||||
|
||||
import com.zheng.common.base.BaseService;
|
||||
import com.zheng.ucenter.dao.model.UcenterUser;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserExample;
|
||||
|
||||
/**
|
||||
* UcenterUserService接口
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
public interface UcenterUserService extends BaseService<UcenterUser, UcenterUserExample> {
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.zheng.ucenter.rpc.api;
|
||||
|
||||
import com.zheng.common.base.BaseServiceMock;
|
||||
import com.zheng.ucenter.dao.mapper.UcenterUserMapper;
|
||||
import com.zheng.ucenter.dao.model.UcenterUser;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserExample;
|
||||
|
||||
/**
|
||||
* 降级实现UcenterUserService接口
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
public class UcenterUserServiceMock extends BaseServiceMock<UcenterUserMapper, UcenterUser, UcenterUserExample> implements UcenterUserService {
|
||||
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.zheng</groupId>
|
||||
<artifactId>zheng-ucenter</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>zheng-ucenter-rpc-service</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>zheng-ucenter-rpc-service</name>
|
||||
<url>http://www.zhangshuzheng.cn</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zheng</groupId>
|
||||
<artifactId>zheng-ucenter-rpc-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>dev</id>
|
||||
<properties>
|
||||
<env>dev</env>
|
||||
</properties>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>test</id>
|
||||
<properties>
|
||||
<env>test</env>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>prod</id>
|
||||
<properties>
|
||||
<env>prod</env>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<finalName>zheng-ucenter-rpc-service</finalName>
|
||||
<filters>
|
||||
<filter>src/main/resources/profiles/${env}.properties</filter>
|
||||
</filters>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.properties</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<descriptor>src/main/assembly/assembly.xml</descriptor>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-assembly</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-compiler-javac</artifactId>
|
||||
<version>1.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.10</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<testFailureIgnore>true</testFailureIgnore>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,20 @@
|
|||
<assembly>
|
||||
<id>assembly</id>
|
||||
<formats>
|
||||
<format>tar.gz</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>true</includeBaseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>src/main/assembly/bin</directory>
|
||||
<outputDirectory>bin</outputDirectory>
|
||||
<fileMode>0755</fileMode>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<outputDirectory>lib</outputDirectory>
|
||||
<scope>runtime</scope>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
</assembly>
|
|
@ -0,0 +1,94 @@
|
|||
#!/bin/bash
|
||||
cd `dirname $0`
|
||||
BIN_DIR=`pwd`
|
||||
cd ..
|
||||
DEPLOY_DIR=`pwd`
|
||||
CONF_DIR=$DEPLOY_DIR/conf
|
||||
|
||||
SERVER_NAME=`sed '/dubbo.application.name/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
|
||||
LOGS_FILE=`sed '/dubbo.log4j.file/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
|
||||
|
||||
if [ -z "$SERVER_NAME" ]; then
|
||||
SERVER_NAME=`hostname`
|
||||
fi
|
||||
|
||||
PIDS=`ps -f | grep java | grep "$CONF_DIR" |awk '{print $2}'`
|
||||
if [ -z "$PIDS" ]; then
|
||||
echo "ERROR: The $SERVER_NAME does not started!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOGS_DIR=""
|
||||
if [ -n "$LOGS_FILE" ]; then
|
||||
LOGS_DIR=`dirname $LOGS_FILE`
|
||||
else
|
||||
LOGS_DIR=$DEPLOY_DIR/logs
|
||||
fi
|
||||
if [ ! -d $LOGS_DIR ]; then
|
||||
mkdir $LOGS_DIR
|
||||
fi
|
||||
DUMP_DIR=$LOGS_DIR/dump
|
||||
if [ ! -d $DUMP_DIR ]; then
|
||||
mkdir $DUMP_DIR
|
||||
fi
|
||||
DUMP_DATE=`date +%Y%m%d%H%M%S`
|
||||
DATE_DIR=$DUMP_DIR/$DUMP_DATE
|
||||
if [ ! -d $DATE_DIR ]; then
|
||||
mkdir $DATE_DIR
|
||||
fi
|
||||
|
||||
echo -e "Dumping the $SERVER_NAME ...\c"
|
||||
for PID in $PIDS ; do
|
||||
jstack $PID > $DATE_DIR/jstack-$PID.dump 2>&1
|
||||
echo -e ".\c"
|
||||
jinfo $PID > $DATE_DIR/jinfo-$PID.dump 2>&1
|
||||
echo -e ".\c"
|
||||
jstat -gcutil $PID > $DATE_DIR/jstat-gcutil-$PID.dump 2>&1
|
||||
echo -e ".\c"
|
||||
jstat -gccapacity $PID > $DATE_DIR/jstat-gccapacity-$PID.dump 2>&1
|
||||
echo -e ".\c"
|
||||
jmap $PID > $DATE_DIR/jmap-$PID.dump 2>&1
|
||||
echo -e ".\c"
|
||||
jmap -heap $PID > $DATE_DIR/jmap-heap-$PID.dump 2>&1
|
||||
echo -e ".\c"
|
||||
jmap -histo $PID > $DATE_DIR/jmap-histo-$PID.dump 2>&1
|
||||
echo -e ".\c"
|
||||
if [ -r /usr/sbin/lsof ]; then
|
||||
/usr/sbin/lsof -p $PID > $DATE_DIR/lsof-$PID.dump
|
||||
echo -e ".\c"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -r /bin/netstat ]; then
|
||||
/bin/netstat -an > $DATE_DIR/netstat.dump 2>&1
|
||||
echo -e ".\c"
|
||||
fi
|
||||
if [ -r /usr/bin/iostat ]; then
|
||||
/usr/bin/iostat > $DATE_DIR/iostat.dump 2>&1
|
||||
echo -e ".\c"
|
||||
fi
|
||||
if [ -r /usr/bin/mpstat ]; then
|
||||
/usr/bin/mpstat > $DATE_DIR/mpstat.dump 2>&1
|
||||
echo -e ".\c"
|
||||
fi
|
||||
if [ -r /usr/bin/vmstat ]; then
|
||||
/usr/bin/vmstat > $DATE_DIR/vmstat.dump 2>&1
|
||||
echo -e ".\c"
|
||||
fi
|
||||
if [ -r /usr/bin/free ]; then
|
||||
/usr/bin/free -t > $DATE_DIR/free.dump 2>&1
|
||||
echo -e ".\c"
|
||||
fi
|
||||
if [ -r /usr/bin/sar ]; then
|
||||
/usr/bin/sar > $DATE_DIR/sar.dump 2>&1
|
||||
echo -e ".\c"
|
||||
fi
|
||||
if [ -r /usr/bin/uptime ]; then
|
||||
/usr/bin/uptime > $DATE_DIR/uptime.dump 2>&1
|
||||
echo -e ".\c"
|
||||
fi
|
||||
|
||||
echo "OK!"
|
||||
echo "DUMP: $DATE_DIR"
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
cd `dirname $0`
|
||||
./stop.sh
|
||||
./start.sh
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
cd `dirname $0`
|
||||
if [ "$1" = "start" ]; then
|
||||
./start.sh
|
||||
else
|
||||
if [ "$1" = "stop" ]; then
|
||||
./stop.sh
|
||||
else
|
||||
if [ "$1" = "debug" ]; then
|
||||
./start.sh debug
|
||||
else
|
||||
if [ "$1" = "restart" ]; then
|
||||
./restart.sh
|
||||
else
|
||||
if [ "$1" = "dump" ]; then
|
||||
./dump.sh
|
||||
else
|
||||
echo "ERROR: Please input argument: start or stop or debug or restart or dump"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,22 @@
|
|||
@echo off & setlocal enabledelayedexpansion
|
||||
|
||||
set LIB_JARS=""
|
||||
cd ..\lib
|
||||
for %%i in (*) do set LIB_JARS=!LIB_JARS!;..\lib\%%i
|
||||
cd ..\bin
|
||||
|
||||
if ""%1"" == ""debug"" goto debug
|
||||
if ""%1"" == ""jmx"" goto jmx
|
||||
|
||||
java -Xms64m -Xmx1024m -XX:MaxPermSize=64M -classpath ..\conf;%LIB_JARS% com.alibaba.dubbo.container.Main
|
||||
goto end
|
||||
|
||||
:debug
|
||||
java -Xms64m -Xmx1024m -XX:MaxPermSize=64M -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -classpath ..\conf;%LIB_JARS% com.alibaba.dubbo.container.Main
|
||||
goto end
|
||||
|
||||
:jmx
|
||||
java -Xms64m -Xmx1024m -XX:MaxPermSize=64M -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -classpath ..\conf;%LIB_JARS% com.alibaba.dubbo.container.Main
|
||||
|
||||
:end
|
||||
pause
|
|
@ -0,0 +1,89 @@
|
|||
#!/bin/bash
|
||||
cd `dirname $0`
|
||||
BIN_DIR=`pwd`
|
||||
cd ..
|
||||
DEPLOY_DIR=`pwd`
|
||||
CONF_DIR=$DEPLOY_DIR/conf
|
||||
|
||||
|
||||
SERVER_NAME=`sed '/dubbo.application.name/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
|
||||
SERVER_PROTOCOL=`sed '/dubbo.protocol.name/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
|
||||
SERVER_PORT=`sed '/dubbo.protocol.port/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
|
||||
LOGS_FILE=`sed '/dubbo.log4j.file/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
|
||||
|
||||
if [ -z "$SERVER_NAME" ]; then
|
||||
SERVER_NAME=`hostname`
|
||||
fi
|
||||
|
||||
PIDS=`ps -f | grep java | grep "$CONF_DIR" |awk '{print $2}'`
|
||||
if [ -n "$PIDS" ]; then
|
||||
echo "ERROR: The $SERVER_NAME already started!"
|
||||
echo "PID: $PIDS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$SERVER_PORT" ]; then
|
||||
SERVER_PORT_COUNT=`netstat -tln | grep $SERVER_PORT | wc -l`
|
||||
if [ $SERVER_PORT_COUNT -gt 0 ]; then
|
||||
echo "ERROR: The $SERVER_NAME port $SERVER_PORT already used!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
LOGS_DIR=""
|
||||
if [ -n "$LOGS_FILE" ]; then
|
||||
LOGS_DIR=`dirname $LOGS_FILE`
|
||||
else
|
||||
LOGS_DIR=$DEPLOY_DIR/logs
|
||||
fi
|
||||
if [ ! -d $LOGS_DIR ]; then
|
||||
mkdir $LOGS_DIR
|
||||
fi
|
||||
STDOUT_FILE=$LOGS_DIR/stdout.log
|
||||
|
||||
LIB_DIR=$DEPLOY_DIR/lib
|
||||
LIB_JARS=`ls $LIB_DIR|grep .jar|awk '{print "'$LIB_DIR'/"$0}'|tr "\n" ":"`
|
||||
|
||||
LOCK_ZOOKEEPER_FILE="$LOGS_DIR/`echo $PWD|awk -F/ '{print $NF}'`.properties"
|
||||
JAVA_OPTS=" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Ddubbo.registry.file=$LOCK_ZOOKEEPER_FILE"
|
||||
JAVA_DEBUG_OPTS=""
|
||||
if [ "$1" = "debug" ]; then
|
||||
JAVA_DEBUG_OPTS=" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n "
|
||||
fi
|
||||
JAVA_JMX_OPTS=""
|
||||
if [ "$1" = "jmx" ]; then
|
||||
JAVA_JMX_OPTS=" -Djava.rmi.server.hostname=172.21.32.38 -Dcom.sun.management.jmxremote.port=1088 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false "
|
||||
fi
|
||||
JAVA_MEM_OPTS=""
|
||||
BITS=`java -version 2>&1 | grep -i 64-bit`
|
||||
if [ -n "$BITS" ]; then
|
||||
JAVA_MEM_OPTS=" -server -Xmx2g -Xms2g -Xmn256m -XX:PermSize=128m -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 "
|
||||
else
|
||||
JAVA_MEM_OPTS=" -server -Xms1g -Xmx1g -XX:PermSize=128m -XX:SurvivorRatio=2 -XX:+UseParallelGC "
|
||||
fi
|
||||
|
||||
echo -e "Starting the $SERVER_NAME ...\c"
|
||||
nohup java $JAVA_OPTS $JAVA_MEM_OPTS $JAVA_DEBUG_OPTS $JAVA_JMX_OPTS -classpath $CONF_DIR:$LIB_JARS com.alibaba.dubbo.container.Main > $STDOUT_FILE 2>&1 &
|
||||
|
||||
COUNT=0
|
||||
while [ $COUNT -lt 1 ]; do
|
||||
echo -e ".\c"
|
||||
sleep 1
|
||||
if [ -n "$SERVER_PORT" ]; then
|
||||
if [ "$SERVER_PROTOCOL" == "dubbo" ]; then
|
||||
COUNT=`echo status | nc -i 1 172.21.32.38 $SERVER_PORT | grep -c OK`
|
||||
else
|
||||
COUNT=`netstat -an | grep $SERVER_PORT | wc -l`
|
||||
fi
|
||||
else
|
||||
COUNT=`ps -f | grep java | grep "$DEPLOY_DIR" | awk '{print $2}' | wc -l`
|
||||
fi
|
||||
if [ $COUNT -gt 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo "OK!"
|
||||
PIDS=`ps -f | grep java | grep "$DEPLOY_DIR" | awk '{print $2}'`
|
||||
echo "PID: $PIDS"
|
||||
echo "STDOUT: $STDOUT_FILE"
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
cd `dirname $0`
|
||||
BIN_DIR=`pwd`
|
||||
cd ..
|
||||
DEPLOY_DIR=`pwd`
|
||||
CONF_DIR=$DEPLOY_DIR/conf
|
||||
|
||||
SERVER_NAME=`sed '/dubbo.application.name/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
|
||||
|
||||
if [ -z "$SERVER_NAME" ]; then
|
||||
SERVER_NAME=`hostname`
|
||||
fi
|
||||
|
||||
PIDS=`ps -ef | grep java | grep "$CONF_DIR" |awk '{print $2}'`
|
||||
if [ -z "$PIDS" ]; then
|
||||
echo "ERROR: The $SERVER_NAME does not started!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" != "skip" ]; then
|
||||
$BIN_DIR/dump.sh
|
||||
fi
|
||||
|
||||
echo -e "Stopping the $SERVER_NAME ...\c"
|
||||
for PID in $PIDS ; do
|
||||
kill $PID > /dev/null 2>&1
|
||||
done
|
||||
|
||||
COUNT=0
|
||||
while [ $COUNT -lt 1 ]; do
|
||||
echo -e ".\c"
|
||||
sleep 1
|
||||
COUNT=1
|
||||
for PID in $PIDS ; do
|
||||
PID_EXIST=`ps -f -p $PID | grep java`
|
||||
if [ -n "$PID_EXIST" ]; then
|
||||
COUNT=0
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
echo "OK!"
|
||||
echo "PID: $PIDS"
|
|
@ -0,0 +1,173 @@
|
|||
<?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.zheng.ucenter.dao.mapper.UcenterOauthMapper">
|
||||
<resultMap id="BaseResultMap" type="com.zheng.ucenter.dao.model.UcenterOauth">
|
||||
<id column="oauth_id" jdbcType="INTEGER" property="oauthId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
</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">
|
||||
oauth_id, name
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.zheng.ucenter.dao.model.UcenterOauthExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ucenter_oauth
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ucenter_oauth
|
||||
where oauth_id = #{oauthId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from ucenter_oauth
|
||||
where oauth_id = #{oauthId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.zheng.ucenter.dao.model.UcenterOauthExample">
|
||||
delete from ucenter_oauth
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.zheng.ucenter.dao.model.UcenterOauth">
|
||||
insert into ucenter_oauth (oauth_id, name)
|
||||
values (#{oauthId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.zheng.ucenter.dao.model.UcenterOauth">
|
||||
insert into ucenter_oauth
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="oauthId != null">
|
||||
oauth_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="oauthId != null">
|
||||
#{oauthId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.zheng.ucenter.dao.model.UcenterOauthExample" resultType="java.lang.Long">
|
||||
select count(*) from ucenter_oauth
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ucenter_oauth
|
||||
<set>
|
||||
<if test="record.oauthId != null">
|
||||
oauth_id = #{record.oauthId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ucenter_oauth
|
||||
set oauth_id = #{record.oauthId,jdbcType=INTEGER},
|
||||
name = #{record.name,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.ucenter.dao.model.UcenterOauth">
|
||||
update ucenter_oauth
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where oauth_id = #{oauthId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.zheng.ucenter.dao.model.UcenterOauth">
|
||||
update ucenter_oauth
|
||||
set name = #{name,jdbcType=VARCHAR}
|
||||
where oauth_id = #{oauthId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
|
||||
</mapper>
|
|
@ -0,0 +1,237 @@
|
|||
<?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.zheng.ucenter.dao.mapper.UcenterUserDetailsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.zheng.ucenter.dao.model.UcenterUserDetails">
|
||||
<id column="user_id" jdbcType="INTEGER" property="userId" />
|
||||
<result column="signature" jdbcType="VARCHAR" property="signature" />
|
||||
<result column="real_name" jdbcType="VARCHAR" property="realName" />
|
||||
<result column="birthday" jdbcType="TIMESTAMP" property="birthday" />
|
||||
<result column="question" jdbcType="VARCHAR" property="question" />
|
||||
<result column="answer" jdbcType="VARCHAR" property="answer" />
|
||||
</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">
|
||||
user_id, signature, real_name, birthday, question, answer
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserDetailsExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ucenter_user_details
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ucenter_user_details
|
||||
where user_id = #{userId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from ucenter_user_details
|
||||
where user_id = #{userId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserDetailsExample">
|
||||
delete from ucenter_user_details
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.zheng.ucenter.dao.model.UcenterUserDetails">
|
||||
insert into ucenter_user_details (user_id, signature, real_name,
|
||||
birthday, question, answer
|
||||
)
|
||||
values (#{userId,jdbcType=INTEGER}, #{signature,jdbcType=VARCHAR}, #{realName,jdbcType=VARCHAR},
|
||||
#{birthday,jdbcType=TIMESTAMP}, #{question,jdbcType=VARCHAR}, #{answer,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.zheng.ucenter.dao.model.UcenterUserDetails">
|
||||
insert into ucenter_user_details
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="signature != null">
|
||||
signature,
|
||||
</if>
|
||||
<if test="realName != null">
|
||||
real_name,
|
||||
</if>
|
||||
<if test="birthday != null">
|
||||
birthday,
|
||||
</if>
|
||||
<if test="question != null">
|
||||
question,
|
||||
</if>
|
||||
<if test="answer != null">
|
||||
answer,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="signature != null">
|
||||
#{signature,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="realName != null">
|
||||
#{realName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="birthday != null">
|
||||
#{birthday,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="question != null">
|
||||
#{question,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="answer != null">
|
||||
#{answer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserDetailsExample" resultType="java.lang.Long">
|
||||
select count(*) from ucenter_user_details
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ucenter_user_details
|
||||
<set>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.signature != null">
|
||||
signature = #{record.signature,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.realName != null">
|
||||
real_name = #{record.realName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.birthday != null">
|
||||
birthday = #{record.birthday,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.question != null">
|
||||
question = #{record.question,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.answer != null">
|
||||
answer = #{record.answer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ucenter_user_details
|
||||
set user_id = #{record.userId,jdbcType=INTEGER},
|
||||
signature = #{record.signature,jdbcType=VARCHAR},
|
||||
real_name = #{record.realName,jdbcType=VARCHAR},
|
||||
birthday = #{record.birthday,jdbcType=TIMESTAMP},
|
||||
question = #{record.question,jdbcType=VARCHAR},
|
||||
answer = #{record.answer,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.ucenter.dao.model.UcenterUserDetails">
|
||||
update ucenter_user_details
|
||||
<set>
|
||||
<if test="signature != null">
|
||||
signature = #{signature,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="realName != null">
|
||||
real_name = #{realName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="birthday != null">
|
||||
birthday = #{birthday,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="question != null">
|
||||
question = #{question,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="answer != null">
|
||||
answer = #{answer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where user_id = #{userId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.zheng.ucenter.dao.model.UcenterUserDetails">
|
||||
update ucenter_user_details
|
||||
set signature = #{signature,jdbcType=VARCHAR},
|
||||
real_name = #{realName,jdbcType=VARCHAR},
|
||||
birthday = #{birthday,jdbcType=TIMESTAMP},
|
||||
question = #{question,jdbcType=VARCHAR},
|
||||
answer = #{answer,jdbcType=VARCHAR}
|
||||
where user_id = #{userId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
|
||||
</mapper>
|
|
@ -0,0 +1,277 @@
|
|||
<?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.zheng.ucenter.dao.mapper.UcenterUserLogMapper">
|
||||
<resultMap id="BaseResultMap" type="com.zheng.ucenter.dao.model.UcenterUserLog">
|
||||
<id column="user_log_id" jdbcType="INTEGER" property="userLogId" />
|
||||
<result column="user_id" jdbcType="INTEGER" property="userId" />
|
||||
<result column="ip" jdbcType="VARCHAR" property="ip" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zheng.ucenter.dao.model.UcenterUserLog">
|
||||
<result column="content" jdbcType="VARBINARY" property="content" />
|
||||
<result column="agent" jdbcType="VARBINARY" property="agent" />
|
||||
</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">
|
||||
user_log_id, user_id, ip, create_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
content, agent
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.zheng.ucenter.dao.model.UcenterUserLogExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from ucenter_user_log
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserLogExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ucenter_user_log
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from ucenter_user_log
|
||||
where user_log_id = #{userLogId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from ucenter_user_log
|
||||
where user_log_id = #{userLogId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserLogExample">
|
||||
delete from ucenter_user_log
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.zheng.ucenter.dao.model.UcenterUserLog">
|
||||
insert into ucenter_user_log (user_log_id, user_id, ip,
|
||||
create_time, content, agent
|
||||
)
|
||||
values (#{userLogId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{ip,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARBINARY}, #{agent,jdbcType=VARBINARY}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.zheng.ucenter.dao.model.UcenterUserLog">
|
||||
insert into ucenter_user_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userLogId != null">
|
||||
user_log_id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="ip != null">
|
||||
ip,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content,
|
||||
</if>
|
||||
<if test="agent != null">
|
||||
agent,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userLogId != null">
|
||||
#{userLogId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ip != null">
|
||||
#{ip,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
#{content,jdbcType=VARBINARY},
|
||||
</if>
|
||||
<if test="agent != null">
|
||||
#{agent,jdbcType=VARBINARY},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserLogExample" resultType="java.lang.Long">
|
||||
select count(*) from ucenter_user_log
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ucenter_user_log
|
||||
<set>
|
||||
<if test="record.userLogId != null">
|
||||
user_log_id = #{record.userLogId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.ip != null">
|
||||
ip = #{record.ip,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
content = #{record.content,jdbcType=VARBINARY},
|
||||
</if>
|
||||
<if test="record.agent != null">
|
||||
agent = #{record.agent,jdbcType=VARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update ucenter_user_log
|
||||
set user_log_id = #{record.userLogId,jdbcType=INTEGER},
|
||||
user_id = #{record.userId,jdbcType=INTEGER},
|
||||
ip = #{record.ip,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
content = #{record.content,jdbcType=VARBINARY},
|
||||
agent = #{record.agent,jdbcType=VARBINARY}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ucenter_user_log
|
||||
set user_log_id = #{record.userLogId,jdbcType=INTEGER},
|
||||
user_id = #{record.userId,jdbcType=INTEGER},
|
||||
ip = #{record.ip,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.ucenter.dao.model.UcenterUserLog">
|
||||
update ucenter_user_log
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ip != null">
|
||||
ip = #{ip,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=VARBINARY},
|
||||
</if>
|
||||
<if test="agent != null">
|
||||
agent = #{agent,jdbcType=VARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
where user_log_id = #{userLogId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zheng.ucenter.dao.model.UcenterUserLog">
|
||||
update ucenter_user_log
|
||||
set user_id = #{userId,jdbcType=INTEGER},
|
||||
ip = #{ip,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
content = #{content,jdbcType=VARBINARY},
|
||||
agent = #{agent,jdbcType=VARBINARY}
|
||||
where user_log_id = #{userLogId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.zheng.ucenter.dao.model.UcenterUserLog">
|
||||
update ucenter_user_log
|
||||
set user_id = #{userId,jdbcType=INTEGER},
|
||||
ip = #{ip,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where user_log_id = #{userLogId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
|
||||
</mapper>
|
|
@ -0,0 +1,300 @@
|
|||
<?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.zheng.ucenter.dao.mapper.UcenterUserMapper">
|
||||
<resultMap id="BaseResultMap" type="com.zheng.ucenter.dao.model.UcenterUser">
|
||||
<id column="user_id" jdbcType="INTEGER" property="userId" />
|
||||
<result column="password" jdbcType="VARCHAR" property="password" />
|
||||
<result column="salt" jdbcType="VARCHAR" property="salt" />
|
||||
<result column="nickname" jdbcType="VARCHAR" property="nickname" />
|
||||
<result column="sex" jdbcType="TINYINT" property="sex" />
|
||||
<result column="avatar" jdbcType="VARCHAR" property="avatar" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="create_ip" jdbcType="VARCHAR" property="createIp" />
|
||||
<result column="last_login_time" jdbcType="TIMESTAMP" property="lastLoginTime" />
|
||||
<result column="last_login_ip" jdbcType="VARCHAR" property="lastLoginIp" />
|
||||
</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">
|
||||
user_id, password, salt, nickname, sex, avatar, create_time, create_ip, last_login_time,
|
||||
last_login_ip
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ucenter_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ucenter_user
|
||||
where user_id = #{userId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from ucenter_user
|
||||
where user_id = #{userId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserExample">
|
||||
delete from ucenter_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.zheng.ucenter.dao.model.UcenterUser">
|
||||
insert into ucenter_user (user_id, password, salt,
|
||||
nickname, sex, avatar,
|
||||
create_time, create_ip, last_login_time,
|
||||
last_login_ip)
|
||||
values (#{userId,jdbcType=INTEGER}, #{password,jdbcType=VARCHAR}, #{salt,jdbcType=VARCHAR},
|
||||
#{nickname,jdbcType=VARCHAR}, #{sex,jdbcType=TINYINT}, #{avatar,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{createIp,jdbcType=VARCHAR}, #{lastLoginTime,jdbcType=TIMESTAMP},
|
||||
#{lastLoginIp,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.zheng.ucenter.dao.model.UcenterUser">
|
||||
insert into ucenter_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="password != null">
|
||||
password,
|
||||
</if>
|
||||
<if test="salt != null">
|
||||
salt,
|
||||
</if>
|
||||
<if test="nickname != null">
|
||||
nickname,
|
||||
</if>
|
||||
<if test="sex != null">
|
||||
sex,
|
||||
</if>
|
||||
<if test="avatar != null">
|
||||
avatar,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="createIp != null">
|
||||
create_ip,
|
||||
</if>
|
||||
<if test="lastLoginTime != null">
|
||||
last_login_time,
|
||||
</if>
|
||||
<if test="lastLoginIp != null">
|
||||
last_login_ip,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="password != null">
|
||||
#{password,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="salt != null">
|
||||
#{salt,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="nickname != null">
|
||||
#{nickname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sex != null">
|
||||
#{sex,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="avatar != null">
|
||||
#{avatar,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createIp != null">
|
||||
#{createIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastLoginTime != null">
|
||||
#{lastLoginTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="lastLoginIp != null">
|
||||
#{lastLoginIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserExample" resultType="java.lang.Long">
|
||||
select count(*) from ucenter_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ucenter_user
|
||||
<set>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.password != null">
|
||||
password = #{record.password,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.salt != null">
|
||||
salt = #{record.salt,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nickname != null">
|
||||
nickname = #{record.nickname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.sex != null">
|
||||
sex = #{record.sex,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="record.avatar != null">
|
||||
avatar = #{record.avatar,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.createIp != null">
|
||||
create_ip = #{record.createIp,jdbcType=VARCHAR},
|
||||
</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>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ucenter_user
|
||||
set user_id = #{record.userId,jdbcType=INTEGER},
|
||||
password = #{record.password,jdbcType=VARCHAR},
|
||||
salt = #{record.salt,jdbcType=VARCHAR},
|
||||
nickname = #{record.nickname,jdbcType=VARCHAR},
|
||||
sex = #{record.sex,jdbcType=TINYINT},
|
||||
avatar = #{record.avatar,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
create_ip = #{record.createIp,jdbcType=VARCHAR},
|
||||
last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
|
||||
last_login_ip = #{record.lastLoginIp,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.ucenter.dao.model.UcenterUser">
|
||||
update ucenter_user
|
||||
<set>
|
||||
<if test="password != null">
|
||||
password = #{password,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="salt != null">
|
||||
salt = #{salt,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="nickname != null">
|
||||
nickname = #{nickname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sex != null">
|
||||
sex = #{sex,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="avatar != null">
|
||||
avatar = #{avatar,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createIp != null">
|
||||
create_ip = #{createIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastLoginTime != null">
|
||||
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="lastLoginIp != null">
|
||||
last_login_ip = #{lastLoginIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where user_id = #{userId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.zheng.ucenter.dao.model.UcenterUser">
|
||||
update ucenter_user
|
||||
set password = #{password,jdbcType=VARCHAR},
|
||||
salt = #{salt,jdbcType=VARCHAR},
|
||||
nickname = #{nickname,jdbcType=VARCHAR},
|
||||
sex = #{sex,jdbcType=TINYINT},
|
||||
avatar = #{avatar,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
create_ip = #{createIp,jdbcType=VARCHAR},
|
||||
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
|
||||
last_login_ip = #{lastLoginIp,jdbcType=VARCHAR}
|
||||
where user_id = #{userId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
|
||||
</mapper>
|
|
@ -0,0 +1,279 @@
|
|||
<?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.zheng.ucenter.dao.mapper.UcenterUserOauthMapper">
|
||||
<resultMap id="BaseResultMap" type="com.zheng.ucenter.dao.model.UcenterUserOauth">
|
||||
<id column="user_oauth_id" jdbcType="INTEGER" property="userOauthId" />
|
||||
<result column="user_id" jdbcType="INTEGER" property="userId" />
|
||||
<result column="oauth_id" jdbcType="INTEGER" property="oauthId" />
|
||||
<result column="status" jdbcType="TINYINT" property="status" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zheng.ucenter.dao.model.UcenterUserOauth">
|
||||
<result column="open_id" jdbcType="VARBINARY" property="openId" />
|
||||
</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">
|
||||
user_oauth_id, user_id, oauth_id, status, create_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
open_id
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.zheng.ucenter.dao.model.UcenterUserOauthExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from ucenter_user_oauth
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserOauthExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ucenter_user_oauth
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from ucenter_user_oauth
|
||||
where user_oauth_id = #{userOauthId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from ucenter_user_oauth
|
||||
where user_oauth_id = #{userOauthId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserOauthExample">
|
||||
delete from ucenter_user_oauth
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.zheng.ucenter.dao.model.UcenterUserOauth">
|
||||
insert into ucenter_user_oauth (user_oauth_id, user_id, oauth_id,
|
||||
status, create_time, open_id
|
||||
)
|
||||
values (#{userOauthId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{oauthId,jdbcType=INTEGER},
|
||||
#{status,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, #{openId,jdbcType=VARBINARY}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.zheng.ucenter.dao.model.UcenterUserOauth">
|
||||
insert into ucenter_user_oauth
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userOauthId != null">
|
||||
user_oauth_id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="oauthId != null">
|
||||
oauth_id,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="openId != null">
|
||||
open_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userOauthId != null">
|
||||
#{userOauthId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="oauthId != null">
|
||||
#{oauthId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="openId != null">
|
||||
#{openId,jdbcType=VARBINARY},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.zheng.ucenter.dao.model.UcenterUserOauthExample" resultType="java.lang.Long">
|
||||
select count(*) from ucenter_user_oauth
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ucenter_user_oauth
|
||||
<set>
|
||||
<if test="record.userOauthId != null">
|
||||
user_oauth_id = #{record.userOauthId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.oauthId != null">
|
||||
oauth_id = #{record.oauthId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.openId != null">
|
||||
open_id = #{record.openId,jdbcType=VARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update ucenter_user_oauth
|
||||
set user_oauth_id = #{record.userOauthId,jdbcType=INTEGER},
|
||||
user_id = #{record.userId,jdbcType=INTEGER},
|
||||
oauth_id = #{record.oauthId,jdbcType=INTEGER},
|
||||
status = #{record.status,jdbcType=TINYINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
open_id = #{record.openId,jdbcType=VARBINARY}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ucenter_user_oauth
|
||||
set user_oauth_id = #{record.userOauthId,jdbcType=INTEGER},
|
||||
user_id = #{record.userId,jdbcType=INTEGER},
|
||||
oauth_id = #{record.oauthId,jdbcType=INTEGER},
|
||||
status = #{record.status,jdbcType=TINYINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.ucenter.dao.model.UcenterUserOauth">
|
||||
update ucenter_user_oauth
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="oauthId != null">
|
||||
oauth_id = #{oauthId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="openId != null">
|
||||
open_id = #{openId,jdbcType=VARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
where user_oauth_id = #{userOauthId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zheng.ucenter.dao.model.UcenterUserOauth">
|
||||
update ucenter_user_oauth
|
||||
set user_id = #{userId,jdbcType=INTEGER},
|
||||
oauth_id = #{oauthId,jdbcType=INTEGER},
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
open_id = #{openId,jdbcType=VARBINARY}
|
||||
where user_oauth_id = #{userOauthId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.zheng.ucenter.dao.model.UcenterUserOauth">
|
||||
update ucenter_user_oauth
|
||||
set user_id = #{userId,jdbcType=INTEGER},
|
||||
oauth_id = #{oauthId,jdbcType=INTEGER},
|
||||
status = #{status,jdbcType=TINYINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where user_oauth_id = #{userOauthId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
|
||||
</mapper>
|
|
@ -0,0 +1,29 @@
|
|||
package com.zheng.ucenter.rpc.service.impl;
|
||||
|
||||
import com.zheng.common.annotation.BaseService;
|
||||
import com.zheng.common.base.BaseServiceImpl;
|
||||
import com.zheng.ucenter.dao.mapper.UcenterOauthMapper;
|
||||
import com.zheng.ucenter.dao.model.UcenterOauth;
|
||||
import com.zheng.ucenter.dao.model.UcenterOauthExample;
|
||||
import com.zheng.ucenter.rpc.api.UcenterOauthService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* UcenterOauthService实现
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@BaseService
|
||||
public class UcenterOauthServiceImpl extends BaseServiceImpl<UcenterOauthMapper, UcenterOauth, UcenterOauthExample> implements UcenterOauthService {
|
||||
|
||||
private static Logger _log = LoggerFactory.getLogger(UcenterOauthServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
UcenterOauthMapper ucenterOauthMapper;
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.zheng.ucenter.rpc.service.impl;
|
||||
|
||||
import com.zheng.common.annotation.BaseService;
|
||||
import com.zheng.common.base.BaseServiceImpl;
|
||||
import com.zheng.ucenter.dao.mapper.UcenterUserDetailsMapper;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserDetails;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserDetailsExample;
|
||||
import com.zheng.ucenter.rpc.api.UcenterUserDetailsService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* UcenterUserDetailsService实现
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@BaseService
|
||||
public class UcenterUserDetailsServiceImpl extends BaseServiceImpl<UcenterUserDetailsMapper, UcenterUserDetails, UcenterUserDetailsExample> implements UcenterUserDetailsService {
|
||||
|
||||
private static Logger _log = LoggerFactory.getLogger(UcenterUserDetailsServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
UcenterUserDetailsMapper ucenterUserDetailsMapper;
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.zheng.ucenter.rpc.service.impl;
|
||||
|
||||
import com.zheng.common.annotation.BaseService;
|
||||
import com.zheng.common.base.BaseServiceImpl;
|
||||
import com.zheng.ucenter.dao.mapper.UcenterUserLogMapper;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserLog;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserLogExample;
|
||||
import com.zheng.ucenter.rpc.api.UcenterUserLogService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* UcenterUserLogService实现
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@BaseService
|
||||
public class UcenterUserLogServiceImpl extends BaseServiceImpl<UcenterUserLogMapper, UcenterUserLog, UcenterUserLogExample> implements UcenterUserLogService {
|
||||
|
||||
private static Logger _log = LoggerFactory.getLogger(UcenterUserLogServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
UcenterUserLogMapper ucenterUserLogMapper;
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.zheng.ucenter.rpc.service.impl;
|
||||
|
||||
import com.zheng.common.annotation.BaseService;
|
||||
import com.zheng.common.base.BaseServiceImpl;
|
||||
import com.zheng.ucenter.dao.mapper.UcenterUserOauthMapper;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserOauth;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserOauthExample;
|
||||
import com.zheng.ucenter.rpc.api.UcenterUserOauthService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* UcenterUserOauthService实现
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@BaseService
|
||||
public class UcenterUserOauthServiceImpl extends BaseServiceImpl<UcenterUserOauthMapper, UcenterUserOauth, UcenterUserOauthExample> implements UcenterUserOauthService {
|
||||
|
||||
private static Logger _log = LoggerFactory.getLogger(UcenterUserOauthServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
UcenterUserOauthMapper ucenterUserOauthMapper;
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.zheng.ucenter.rpc.service.impl;
|
||||
|
||||
import com.zheng.common.annotation.BaseService;
|
||||
import com.zheng.common.base.BaseServiceImpl;
|
||||
import com.zheng.ucenter.dao.mapper.UcenterUserMapper;
|
||||
import com.zheng.ucenter.dao.model.UcenterUser;
|
||||
import com.zheng.ucenter.dao.model.UcenterUserExample;
|
||||
import com.zheng.ucenter.rpc.api.UcenterUserService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* UcenterUserService实现
|
||||
* Created by shuzheng on 2017/4/27.
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
@BaseService
|
||||
public class UcenterUserServiceImpl extends BaseServiceImpl<UcenterUserMapper, UcenterUser, UcenterUserExample> implements UcenterUserService {
|
||||
|
||||
private static Logger _log = LoggerFactory.getLogger(UcenterUserServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
UcenterUserMapper ucenterUserMapper;
|
||||
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
app.name=${app.name}
|
||||
env=${profile.env}
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ehcache>
|
||||
<diskStore path="java.io.tmpdir/zheng-ucenter-rpc-service/ehcache"/>
|
||||
<defaultCache
|
||||
maxElementsInMemory="10000"
|
||||
eternal="false"
|
||||
timeToIdleSeconds="120"
|
||||
timeToLiveSeconds="120"
|
||||
maxElementsOnDisk="10000000"
|
||||
diskExpiryThreadIntervalSeconds="120"
|
||||
memoryStoreEvictionPolicy="LRU">
|
||||
<persistence strategy="localTempSwap"/>
|
||||
</defaultCache>
|
||||
<cache
|
||||
name="zheng-ucenter-rpc-service-ehcache"
|
||||
eternal="false"
|
||||
timeToIdleSeconds="120"
|
||||
timeToLiveSeconds="300"
|
||||
maxEntriesLocalHeap="10000"
|
||||
maxEntriesLocalDisk="10000000"
|
||||
diskExpiryThreadIntervalSeconds="120"
|
||||
memoryStoreEvictionPolicy="LRU">
|
||||
<persistence strategy="localTempSwap"/>
|
||||
</cache>
|
||||
</ehcache>
|
|
@ -0,0 +1,42 @@
|
|||
#off/fatal/error/warn/info/debug/all
|
||||
log4j.debug=false
|
||||
log4j.rootLogger=info,stdout,log,errorlog
|
||||
|
||||
# Console
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target = System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n
|
||||
|
||||
### Log ###
|
||||
log4j.appender.log = org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.log.File = ../logs/zheng-ucenter-rpc-service.log
|
||||
log4j.appender.log.Append = true
|
||||
log4j.appender.log.Threshold = DEBUG
|
||||
log4j.appender.log.DatePattern='.'yyyy-MM-dd
|
||||
log4j.appender.log.layout = org.apache.log4j.PatternLayout
|
||||
log4j.appender.log.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %p ] [ %C{1}.java :%L(%M)] %m%n
|
||||
|
||||
### Error ###
|
||||
log4j.appender.errorlog = org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.errorlog.File = ../logs/zheng-ucenter-rpc-service.error.log
|
||||
log4j.appender.errorlog.Append = true
|
||||
log4j.appender.errorlog.Threshold = ERROR
|
||||
log4j.appender.errorlog.DatePattern='.'yyyy-MM-dd
|
||||
log4j.appender.errorlog.layout = org.apache.log4j.PatternLayout
|
||||
log4j.appender.errorlog.layout.ConversionPattern =%-d{yyyy-MM-dd HH:mm:ss} [ %p ] [ %C{1}.java :%L(%M)] %m%n
|
||||
|
||||
#Spring logging configuration
|
||||
log4j.category.org.springframework = warn
|
||||
|
||||
#Druid logging configuration
|
||||
log4j.logger.druid.sql=warn,stdout,log,errorlog
|
||||
log4j.logger.druid.sql.DataSource=warn,stdout,log,errorlog
|
||||
log4j.logger.druid.sql.Connection=warn,stdout,log,errorlog
|
||||
log4j.logger.druid.sql.Statement=warn,stdout,log,errorlog
|
||||
log4j.logger.druid.sql.ResultSet=warn,stdout,log,errorlog
|
||||
|
||||
# MyBatis logging configuration
|
||||
log4j.logger.com.zheng.ucenter.dao.mapper=debug
|
||||
#log4j.logger.com.zheng.ucenter.dao.mapper.UserMapper=debug
|
||||
#log4j.logger.com.zheng.ucenter.dao.mapper.UserMapper.selectUser=debug
|
|
@ -0,0 +1,2 @@
|
|||
app.name=zheng-ucenter-rpc-service
|
||||
profile.env=dev
|
|
@ -0,0 +1,2 @@
|
|||
app.name=zheng-ucenter-rpc-service
|
||||
profile.env=pre
|
|
@ -0,0 +1,2 @@
|
|||
app.name=zheng-ucenter-rpc-service
|
||||
profile.env=prod
|
|
@ -0,0 +1,2 @@
|
|||
app.name=zheng-ucenter-rpc-service
|
||||
profile.env=test
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://code.alibabatech.com/schema/dubbo
|
||||
http://code.alibabatech.com/schema/dubbo/dubbo.xsd ">
|
||||
|
||||
<dubbo:application name="zheng-ucenter-rpc-service"/>
|
||||
|
||||
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
|
||||
|
||||
<dubbo:protocol name="dubbo" port="20884"/>
|
||||
|
||||
</beans>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:cache="http://www.springframework.org/schema/cache"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/cache
|
||||
http://www.springframework.org/schema/cache/spring-cache.xsd">
|
||||
|
||||
<!-- 支持缓存注解 -->
|
||||
<cache:annotation-driven cache-manager="cacheManager" />
|
||||
|
||||
<!-- 默认是cacheManager -->
|
||||
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager">
|
||||
<property name="cacheManager" ref="cacheManagerFactory"/>
|
||||
</bean>
|
||||
|
||||
<!-- cache管理器配置 -->
|
||||
<bean id="cacheManagerFactory" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
|
||||
<property name="configLocation" value="classpath:ehcache.xml"/>
|
||||
<property name="shared" value="true" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<!-- 引入jdbc配置文件 -->
|
||||
<!--<context:property-placeholder location="classpath:jdbc.properties" />-->
|
||||
<!-- 配置进行解密 -->
|
||||
<bean id="propertyConfigurer" class="com.zheng.common.plugin.EncryptPropertyPlaceholderConfigurer">
|
||||
<property name="locations">
|
||||
<list>
|
||||
<value>classpath:jdbc.properties</value>
|
||||
<value>classpath:redis.properties</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- 主库数据源 -->
|
||||
<bean id="masterDataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init"
|
||||
destroy-method="close">
|
||||
<!-- 基本属性 url、user、password -->
|
||||
<property name="driverClassName" value="${master.jdbc.driver}"/>
|
||||
<property name="url" value="${master.jdbc.url}"/>
|
||||
<property name="username" value="${master.jdbc.username}"/>
|
||||
<property name="password" value="${master.jdbc.password}"/>
|
||||
<!-- 配置初始化大小、最小、最大 -->
|
||||
<property name="initialSize" value="1"/>
|
||||
<property name="minIdle" value="1"/>
|
||||
<property name="maxActive" value="20"/>
|
||||
<!-- 配置获取连接等待超时的时间 -->
|
||||
<property name="maxWait" value="60000"/>
|
||||
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
|
||||
<property name="timeBetweenEvictionRunsMillis" value="60000"/>
|
||||
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
|
||||
<property name="minEvictableIdleTimeMillis" value="300000"/>
|
||||
<!-- 校验语句 -->
|
||||
<property name="validationQuery" value="SELECT 1"/>
|
||||
<property name="testWhileIdle" value="true"/>
|
||||
<property name="testOnBorrow" value="false"/>
|
||||
<property name="testOnReturn" value="false"/>
|
||||
<!-- 配置监控统计拦截的filters -->
|
||||
<property name="filters" value="stat"/>
|
||||
</bean>
|
||||
|
||||
<!-- 从库数据源 -->
|
||||
<bean id="slaveDataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
|
||||
<!-- 基本属性 url、user、password -->
|
||||
<property name="driverClassName" value="${slave.jdbc.driver}"/>
|
||||
<property name="url" value="${slave.jdbc.url}"/>
|
||||
<property name="username" value="${slave.jdbc.username}"/>
|
||||
<property name="password" value="${slave.jdbc.password}"/>
|
||||
<!-- 配置初始化大小、最小、最大 -->
|
||||
<property name="initialSize" value="1"/>
|
||||
<property name="minIdle" value="1"/>
|
||||
<property name="maxActive" value="20"/>
|
||||
<!-- 配置获取连接等待超时的时间 -->
|
||||
<property name="maxWait" value="60000"/>
|
||||
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
|
||||
<property name="timeBetweenEvictionRunsMillis" value="60000"/>
|
||||
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
|
||||
<property name="minEvictableIdleTimeMillis" value="300000"/>
|
||||
<!-- 校验语句 -->
|
||||
<property name="validationQuery" value="SELECT 1"/>
|
||||
<property name="testWhileIdle" value="true"/>
|
||||
<property name="testOnBorrow" value="false"/>
|
||||
<property name="testOnReturn" value="false"/>
|
||||
<!-- 配置监控统计拦截的filters -->
|
||||
<property name="filters" value="stat"/>
|
||||
</bean>
|
||||
|
||||
<!-- 动态数据源 -->
|
||||
<bean id="dataSource" class="com.zheng.common.db.DynamicDataSource">
|
||||
<property name="targetDataSources">
|
||||
<map key-type="java.lang.String">
|
||||
<!-- 可配置多个数据源 -->
|
||||
<entry value-ref="masterDataSource" key="masterDataSource"></entry>
|
||||
<entry value-ref="slaveDataSource" key="slaveDataSource"></entry>
|
||||
</map>
|
||||
</property>
|
||||
<property name="defaultTargetDataSource" ref="masterDataSource"></property>
|
||||
</bean>
|
||||
|
||||
<!-- 为Mybatis创建SqlSessionFactory,同时指定数据源 -->
|
||||
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
<property name="configLocation" value="classpath:mybatis-config.xml"/>
|
||||
<property name="mapperLocations" value="classpath*:com/zheng/ucenter/dao/mapper/*Mapper.xml"/>
|
||||
</bean>
|
||||
<!-- Mapper接口所在包名,Spring会自动查找其下的Mapper -->
|
||||
<bean id="mapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
||||
<property name="basePackage" value="**.mapper"/>
|
||||
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
|
||||
</bean>
|
||||
|
||||
<!-- 事务管理器 -->
|
||||
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
</bean>
|
||||
|
||||
<!-- 启动注解事务 -->
|
||||
<tx:annotation-driven transaction-manager="transactionManager"/>
|
||||
|
||||
</beans>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<!-- Spring容器初始化完成监听器 -->
|
||||
<bean class="com.zheng.common.listener.ApplicationContextListener"></bean>
|
||||
|
||||
</beans>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<!-- ApplicationContext -->
|
||||
<bean id="springContextUtil" class="com.zheng.common.util.SpringContextUtil"></bean>
|
||||
|
||||
</beans>
|
|
@ -1,10 +0,0 @@
|
|||
package com.zheng.ucenter.service;
|
||||
|
||||
/**
|
||||
* Hello world!
|
||||
*/
|
||||
public class App {
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
package com.zheng.ucenter.service;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
|
@ -8,16 +8,16 @@
|
|||
<version>1.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>zheng-ucenter-home</artifactId>
|
||||
<artifactId>zheng-ucenter-web</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>zheng-ucenter-home Maven Webapp</name>
|
||||
<name>zheng-ucenter-web Maven Webapp</name>
|
||||
<url>http://www.zhangshuzheng.cn</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zheng</groupId>
|
||||
<artifactId>zheng-ucenter-service</artifactId>
|
||||
<artifactId>zheng-ucenter-rpc-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
@ -65,7 +65,7 @@
|
|||
</profiles>
|
||||
|
||||
<build>
|
||||
<finalName>zheng-ucenter-home</finalName>
|
||||
<finalName>zheng-ucenter-web</finalName>
|
||||
<filters>
|
||||
<filter>src/main/resources/profiles/${env}.properties</filter>
|
||||
</filters>
|
||||
|
@ -84,7 +84,7 @@
|
|||
<configuration>
|
||||
<scanIntervalSeconds>3</scanIntervalSeconds>
|
||||
<webApp>
|
||||
<contextPath>/zheng-ucenter-home</contextPath>
|
||||
<contextPath>/zheng-ucenter-web</contextPath>
|
||||
</webApp>
|
||||
<httpConnector>
|
||||
<port>4441</port>
|
Loading…
Reference in New Issue