Browse Source

修改本地连接的数据库

master
zy_Java 4 years ago
parent
commit
4dc84d4e40
  1. 11
      src/main/java/com/ccsens/datacentre/bean/po/IdcDomain.java
  2. 60
      src/main/java/com/ccsens/datacentre/bean/po/IdcDomainExample.java
  3. 2
      src/main/resources/druid-dev.yml
  4. 5
      src/main/resources/druid-test.yml
  5. 31
      src/main/resources/mapper_raw/IdcDomainMapper.xml

11
src/main/java/com/ccsens/datacentre/bean/po/IdcDomain.java

@ -20,6 +20,8 @@ public class IdcDomain implements Serializable {
private Byte publicDomain;
private Long lastRcvTime;
private Long operator;
private Date createdAt;
@ -94,6 +96,14 @@ public class IdcDomain implements Serializable {
this.publicDomain = publicDomain;
}
public Long getLastRcvTime() {
return lastRcvTime;
}
public void setLastRcvTime(Long lastRcvTime) {
this.lastRcvTime = lastRcvTime;
}
public Long getOperator() {
return operator;
}
@ -140,6 +150,7 @@ public class IdcDomain implements Serializable {
sb.append(", company=").append(company);
sb.append(", time=").append(time);
sb.append(", publicDomain=").append(publicDomain);
sb.append(", lastRcvTime=").append(lastRcvTime);
sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);

60
src/main/java/com/ccsens/datacentre/bean/po/IdcDomainExample.java

@ -635,6 +635,66 @@ public class IdcDomainExample {
return (Criteria) this;
}
public Criteria andLastRcvTimeIsNull() {
addCriterion("last_rcv_time is null");
return (Criteria) this;
}
public Criteria andLastRcvTimeIsNotNull() {
addCriterion("last_rcv_time is not null");
return (Criteria) this;
}
public Criteria andLastRcvTimeEqualTo(Long value) {
addCriterion("last_rcv_time =", value, "lastRcvTime");
return (Criteria) this;
}
public Criteria andLastRcvTimeNotEqualTo(Long value) {
addCriterion("last_rcv_time <>", value, "lastRcvTime");
return (Criteria) this;
}
public Criteria andLastRcvTimeGreaterThan(Long value) {
addCriterion("last_rcv_time >", value, "lastRcvTime");
return (Criteria) this;
}
public Criteria andLastRcvTimeGreaterThanOrEqualTo(Long value) {
addCriterion("last_rcv_time >=", value, "lastRcvTime");
return (Criteria) this;
}
public Criteria andLastRcvTimeLessThan(Long value) {
addCriterion("last_rcv_time <", value, "lastRcvTime");
return (Criteria) this;
}
public Criteria andLastRcvTimeLessThanOrEqualTo(Long value) {
addCriterion("last_rcv_time <=", value, "lastRcvTime");
return (Criteria) this;
}
public Criteria andLastRcvTimeIn(List<Long> values) {
addCriterion("last_rcv_time in", values, "lastRcvTime");
return (Criteria) this;
}
public Criteria andLastRcvTimeNotIn(List<Long> values) {
addCriterion("last_rcv_time not in", values, "lastRcvTime");
return (Criteria) this;
}
public Criteria andLastRcvTimeBetween(Long value1, Long value2) {
addCriterion("last_rcv_time between", value1, value2, "lastRcvTime");
return (Criteria) this;
}
public Criteria andLastRcvTimeNotBetween(Long value1, Long value2) {
addCriterion("last_rcv_time not between", value1, value2, "lastRcvTime");
return (Criteria) this;
}
public Criteria andOperatorIsNull() {
addCriterion("operator is null");
return (Criteria) this;

2
src/main/resources/druid-dev.yml

@ -28,7 +28,7 @@ spring:
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://49.233.89.188:3306/data_centre?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true
url: jdbc:mysql://101.201.226.163:3306/data_centre?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true
username: root
validationQuery: SELECT 1 FROM DUAL
# env: CCSENS_GAME

5
src/main/resources/druid-test.yml

@ -15,7 +15,8 @@ spring:
maxWait: 60000
minEvictableIdleTimeMillis: 300000
minIdle: 5
password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473
# password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473
password:
poolPreparedStatements: true
servletLogSlowSql: true
servletLoginPassword: 111111
@ -27,7 +28,7 @@ spring:
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://test.tall.wiki/data_centre?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true
url: jdbc:mysql://101.201.226.163:3306/data_centre?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true
username: root
validationQuery: SELECT 1 FROM DUAL
env: CCSENS_TALL

31
src/main/resources/mapper_raw/IdcDomainMapper.xml

@ -10,6 +10,7 @@
<result column="company" jdbcType="VARCHAR" property="company" />
<result column="time" jdbcType="BIGINT" property="time" />
<result column="public_domain" jdbcType="TINYINT" property="publicDomain" />
<result column="last_rcv_time" jdbcType="BIGINT" property="lastRcvTime" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
@ -74,8 +75,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, name, code, intro, domain_name, company, time, public_domain, operator, created_at,
updated_at, rec_status
id, name, code, intro, domain_name, company, time, public_domain, last_rcv_time,
operator, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.datacentre.bean.po.IdcDomainExample" resultMap="BaseResultMap">
select
@ -110,14 +111,14 @@
<insert id="insert" parameterType="com.ccsens.datacentre.bean.po.IdcDomain">
insert into t_idc_domain (id, name, code,
intro, domain_name, company,
time, public_domain, operator,
created_at, updated_at, rec_status
)
time, public_domain, last_rcv_time,
operator, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
#{intro,jdbcType=VARCHAR}, #{domainName,jdbcType=VARCHAR}, #{company,jdbcType=VARCHAR},
#{time,jdbcType=BIGINT}, #{publicDomain,jdbcType=TINYINT}, #{operator,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
#{time,jdbcType=BIGINT}, #{publicDomain,jdbcType=TINYINT}, #{lastRcvTime,jdbcType=BIGINT},
#{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.datacentre.bean.po.IdcDomain">
insert into t_idc_domain
@ -146,6 +147,9 @@
<if test="publicDomain != null">
public_domain,
</if>
<if test="lastRcvTime != null">
last_rcv_time,
</if>
<if test="operator != null">
operator,
</if>
@ -184,6 +188,9 @@
<if test="publicDomain != null">
#{publicDomain,jdbcType=TINYINT},
</if>
<if test="lastRcvTime != null">
#{lastRcvTime,jdbcType=BIGINT},
</if>
<if test="operator != null">
#{operator,jdbcType=BIGINT},
</if>
@ -231,6 +238,9 @@
<if test="record.publicDomain != null">
public_domain = #{record.publicDomain,jdbcType=TINYINT},
</if>
<if test="record.lastRcvTime != null">
last_rcv_time = #{record.lastRcvTime,jdbcType=BIGINT},
</if>
<if test="record.operator != null">
operator = #{record.operator,jdbcType=BIGINT},
</if>
@ -258,6 +268,7 @@
company = #{record.company,jdbcType=VARCHAR},
time = #{record.time,jdbcType=BIGINT},
public_domain = #{record.publicDomain,jdbcType=TINYINT},
last_rcv_time = #{record.lastRcvTime,jdbcType=BIGINT},
operator = #{record.operator,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
@ -290,6 +301,9 @@
<if test="publicDomain != null">
public_domain = #{publicDomain,jdbcType=TINYINT},
</if>
<if test="lastRcvTime != null">
last_rcv_time = #{lastRcvTime,jdbcType=BIGINT},
</if>
<if test="operator != null">
operator = #{operator,jdbcType=BIGINT},
</if>
@ -314,6 +328,7 @@
company = #{company,jdbcType=VARCHAR},
time = #{time,jdbcType=BIGINT},
public_domain = #{publicDomain,jdbcType=TINYINT},
last_rcv_time = #{lastRcvTime,jdbcType=BIGINT},
operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},

Loading…
Cancel
Save