Browse Source

添加时间差字段

master
zhangye 6 years ago
parent
commit
a1c430ff5e
  1. 11
      game/src/main/java/com/ccsens/game/bean/po/GameMemberJoin.java
  2. 60
      game/src/main/java/com/ccsens/game/bean/po/GameMemberJoinExample.java
  3. 11
      game/src/main/java/com/ccsens/game/bean/po/GameRecord.java
  4. 60
      game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java
  5. 31
      game/src/main/resources/mapper_raw/GameMemberJoinMapper.xml
  6. 31
      game/src/main/resources/mapper_raw/GameRecordMapper.xml
  7. 6
      game/src/main/resources/mbg.xml

11
game/src/main/java/com/ccsens/game/bean/po/GameMemberJoin.java

@ -14,6 +14,8 @@ public class GameMemberJoin implements Serializable {
private String score;
private Integer timeDifference;
private Long localStartTime;
private Long localEndTime;
@ -66,6 +68,14 @@ public class GameMemberJoin implements Serializable {
this.score = score == null ? null : score.trim();
}
public Integer getTimeDifference() {
return timeDifference;
}
public void setTimeDifference(Integer timeDifference) {
this.timeDifference = timeDifference;
}
public Long getLocalStartTime() {
return localStartTime;
}
@ -117,6 +127,7 @@ public class GameMemberJoin implements Serializable {
sb.append(", recordId=").append(recordId);
sb.append(", times=").append(times);
sb.append(", score=").append(score);
sb.append(", timeDifference=").append(timeDifference);
sb.append(", localStartTime=").append(localStartTime);
sb.append(", localEndTime=").append(localEndTime);
sb.append(", createdAt=").append(createdAt);

60
game/src/main/java/com/ccsens/game/bean/po/GameMemberJoinExample.java

@ -425,6 +425,66 @@ public class GameMemberJoinExample {
return (Criteria) this;
}
public Criteria andTimeDifferenceIsNull() {
addCriterion("time_difference is null");
return (Criteria) this;
}
public Criteria andTimeDifferenceIsNotNull() {
addCriterion("time_difference is not null");
return (Criteria) this;
}
public Criteria andTimeDifferenceEqualTo(Integer value) {
addCriterion("time_difference =", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceNotEqualTo(Integer value) {
addCriterion("time_difference <>", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceGreaterThan(Integer value) {
addCriterion("time_difference >", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceGreaterThanOrEqualTo(Integer value) {
addCriterion("time_difference >=", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceLessThan(Integer value) {
addCriterion("time_difference <", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceLessThanOrEqualTo(Integer value) {
addCriterion("time_difference <=", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceIn(List<Integer> values) {
addCriterion("time_difference in", values, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceNotIn(List<Integer> values) {
addCriterion("time_difference not in", values, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceBetween(Integer value1, Integer value2) {
addCriterion("time_difference between", value1, value2, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceNotBetween(Integer value1, Integer value2) {
addCriterion("time_difference not between", value1, value2, "timeDifference");
return (Criteria) this;
}
public Criteria andLocalStartTimeIsNull() {
addCriterion("local_start_time is null");
return (Criteria) this;

11
game/src/main/java/com/ccsens/game/bean/po/GameRecord.java

@ -12,6 +12,8 @@ public class GameRecord implements Serializable {
private String qrCodeUrl;
private Integer timeDifference;
private Long startTime;
private Long endTime;
@ -58,6 +60,14 @@ public class GameRecord implements Serializable {
this.qrCodeUrl = qrCodeUrl == null ? null : qrCodeUrl.trim();
}
public Integer getTimeDifference() {
return timeDifference;
}
public void setTimeDifference(Integer timeDifference) {
this.timeDifference = timeDifference;
}
public Long getStartTime() {
return startTime;
}
@ -116,6 +126,7 @@ public class GameRecord implements Serializable {
sb.append(", typeMemberId=").append(typeMemberId);
sb.append(", url=").append(url);
sb.append(", qrCodeUrl=").append(qrCodeUrl);
sb.append(", timeDifference=").append(timeDifference);
sb.append(", startTime=").append(startTime);
sb.append(", endTime=").append(endTime);
sb.append(", gameStatus=").append(gameStatus);

60
game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java

@ -365,6 +365,66 @@ public class GameRecordExample {
return (Criteria) this;
}
public Criteria andTimeDifferenceIsNull() {
addCriterion("time_difference is null");
return (Criteria) this;
}
public Criteria andTimeDifferenceIsNotNull() {
addCriterion("time_difference is not null");
return (Criteria) this;
}
public Criteria andTimeDifferenceEqualTo(Integer value) {
addCriterion("time_difference =", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceNotEqualTo(Integer value) {
addCriterion("time_difference <>", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceGreaterThan(Integer value) {
addCriterion("time_difference >", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceGreaterThanOrEqualTo(Integer value) {
addCriterion("time_difference >=", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceLessThan(Integer value) {
addCriterion("time_difference <", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceLessThanOrEqualTo(Integer value) {
addCriterion("time_difference <=", value, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceIn(List<Integer> values) {
addCriterion("time_difference in", values, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceNotIn(List<Integer> values) {
addCriterion("time_difference not in", values, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceBetween(Integer value1, Integer value2) {
addCriterion("time_difference between", value1, value2, "timeDifference");
return (Criteria) this;
}
public Criteria andTimeDifferenceNotBetween(Integer value1, Integer value2) {
addCriterion("time_difference not between", value1, value2, "timeDifference");
return (Criteria) this;
}
public Criteria andStartTimeIsNull() {
addCriterion("start_time is null");
return (Criteria) this;

31
game/src/main/resources/mapper_raw/GameMemberJoinMapper.xml

@ -7,6 +7,7 @@
<result column="record_id" jdbcType="BIGINT" property="recordId" />
<result column="times" jdbcType="VARCHAR" property="times" />
<result column="score" jdbcType="VARCHAR" property="score" />
<result column="time_difference" jdbcType="INTEGER" property="timeDifference" />
<result column="local_start_time" jdbcType="BIGINT" property="localStartTime" />
<result column="local_end_time" jdbcType="BIGINT" property="localEndTime" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
@ -72,8 +73,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, member_id, record_id, times, score, local_start_time, local_end_time, created_at,
updated_at, rec_status
id, member_id, record_id, times, score, time_difference, local_start_time, local_end_time,
created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.game.bean.po.GameMemberJoinExample" resultMap="BaseResultMap">
select
@ -107,13 +108,13 @@
</delete>
<insert id="insert" parameterType="com.ccsens.game.bean.po.GameMemberJoin">
insert into t_game_member_join (id, member_id, record_id,
times, score, local_start_time,
local_end_time, created_at, updated_at,
rec_status)
times, score, time_difference,
local_start_time, local_end_time, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{recordId,jdbcType=BIGINT},
#{times,jdbcType=VARCHAR}, #{score,jdbcType=VARCHAR}, #{localStartTime,jdbcType=BIGINT},
#{localEndTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
#{times,jdbcType=VARCHAR}, #{score,jdbcType=VARCHAR}, #{timeDifference,jdbcType=INTEGER},
#{localStartTime,jdbcType=BIGINT}, #{localEndTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.game.bean.po.GameMemberJoin">
insert into t_game_member_join
@ -133,6 +134,9 @@
<if test="score != null">
score,
</if>
<if test="timeDifference != null">
time_difference,
</if>
<if test="localStartTime != null">
local_start_time,
</if>
@ -165,6 +169,9 @@
<if test="score != null">
#{score,jdbcType=VARCHAR},
</if>
<if test="timeDifference != null">
#{timeDifference,jdbcType=INTEGER},
</if>
<if test="localStartTime != null">
#{localStartTime,jdbcType=BIGINT},
</if>
@ -206,6 +213,9 @@
<if test="record.score != null">
score = #{record.score,jdbcType=VARCHAR},
</if>
<if test="record.timeDifference != null">
time_difference = #{record.timeDifference,jdbcType=INTEGER},
</if>
<if test="record.localStartTime != null">
local_start_time = #{record.localStartTime,jdbcType=BIGINT},
</if>
@ -233,6 +243,7 @@
record_id = #{record.recordId,jdbcType=BIGINT},
times = #{record.times,jdbcType=VARCHAR},
score = #{record.score,jdbcType=VARCHAR},
time_difference = #{record.timeDifference,jdbcType=INTEGER},
local_start_time = #{record.localStartTime,jdbcType=BIGINT},
local_end_time = #{record.localEndTime,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
@ -257,6 +268,9 @@
<if test="score != null">
score = #{score,jdbcType=VARCHAR},
</if>
<if test="timeDifference != null">
time_difference = #{timeDifference,jdbcType=INTEGER},
</if>
<if test="localStartTime != null">
local_start_time = #{localStartTime,jdbcType=BIGINT},
</if>
@ -281,6 +295,7 @@
record_id = #{recordId,jdbcType=BIGINT},
times = #{times,jdbcType=VARCHAR},
score = #{score,jdbcType=VARCHAR},
time_difference = #{timeDifference,jdbcType=INTEGER},
local_start_time = #{localStartTime,jdbcType=BIGINT},
local_end_time = #{localEndTime,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},

31
game/src/main/resources/mapper_raw/GameRecordMapper.xml

@ -6,6 +6,7 @@
<result column="type_member_id" jdbcType="BIGINT" property="typeMemberId" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="QR_code_url" jdbcType="VARCHAR" property="qrCodeUrl" />
<result column="time_difference" jdbcType="INTEGER" property="timeDifference" />
<result column="start_time" jdbcType="BIGINT" property="startTime" />
<result column="end_time" jdbcType="BIGINT" property="endTime" />
<result column="game_status" jdbcType="TINYINT" property="gameStatus" />
@ -72,8 +73,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, type_member_id, url, QR_code_url, start_time, end_time, game_status, created_at,
updated_at, rec_status
id, type_member_id, url, QR_code_url, time_difference, start_time, end_time, game_status,
created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.game.bean.po.GameRecordExample" resultMap="BaseResultMap">
select
@ -107,13 +108,13 @@
</delete>
<insert id="insert" parameterType="com.ccsens.game.bean.po.GameRecord">
insert into t_game_record (id, type_member_id, url,
QR_code_url, start_time, end_time,
game_status, created_at, updated_at,
rec_status)
QR_code_url, time_difference, start_time,
end_time, game_status, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{typeMemberId,jdbcType=BIGINT}, #{url,jdbcType=VARCHAR},
#{qrCodeUrl,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT},
#{gameStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
#{qrCodeUrl,jdbcType=VARCHAR}, #{timeDifference,jdbcType=INTEGER}, #{startTime,jdbcType=BIGINT},
#{endTime,jdbcType=BIGINT}, #{gameStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.game.bean.po.GameRecord">
insert into t_game_record
@ -130,6 +131,9 @@
<if test="qrCodeUrl != null">
QR_code_url,
</if>
<if test="timeDifference != null">
time_difference,
</if>
<if test="startTime != null">
start_time,
</if>
@ -162,6 +166,9 @@
<if test="qrCodeUrl != null">
#{qrCodeUrl,jdbcType=VARCHAR},
</if>
<if test="timeDifference != null">
#{timeDifference,jdbcType=INTEGER},
</if>
<if test="startTime != null">
#{startTime,jdbcType=BIGINT},
</if>
@ -203,6 +210,9 @@
<if test="record.qrCodeUrl != null">
QR_code_url = #{record.qrCodeUrl,jdbcType=VARCHAR},
</if>
<if test="record.timeDifference != null">
time_difference = #{record.timeDifference,jdbcType=INTEGER},
</if>
<if test="record.startTime != null">
start_time = #{record.startTime,jdbcType=BIGINT},
</if>
@ -232,6 +242,7 @@
type_member_id = #{record.typeMemberId,jdbcType=BIGINT},
url = #{record.url,jdbcType=VARCHAR},
QR_code_url = #{record.qrCodeUrl,jdbcType=VARCHAR},
time_difference = #{record.timeDifference,jdbcType=INTEGER},
start_time = #{record.startTime,jdbcType=BIGINT},
end_time = #{record.endTime,jdbcType=BIGINT},
game_status = #{record.gameStatus,jdbcType=TINYINT},
@ -254,6 +265,9 @@
<if test="qrCodeUrl != null">
QR_code_url = #{qrCodeUrl,jdbcType=VARCHAR},
</if>
<if test="timeDifference != null">
time_difference = #{timeDifference,jdbcType=INTEGER},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=BIGINT},
</if>
@ -280,6 +294,7 @@
set type_member_id = #{typeMemberId,jdbcType=BIGINT},
url = #{url,jdbcType=VARCHAR},
QR_code_url = #{qrCodeUrl,jdbcType=VARCHAR},
time_difference = #{timeDifference,jdbcType=INTEGER},
start_time = #{startTime,jdbcType=BIGINT},
end_time = #{endTime,jdbcType=BIGINT},
game_status = #{gameStatus,jdbcType=TINYINT},

6
game/src/main/resources/mbg.xml

@ -55,11 +55,11 @@
<!-- enableSubPackages:是否让schema作为包的后缀 -->
<property name="enableSubPackages" value="false" />
</javaClientGenerator>
<table tableName="t_game_member" domainObjectName="GameMember"></table>
<!--<table tableName="t_game_member" domainObjectName="GameMember"></table>-->
<!--<table tableName="t_game_type" domainObjectName="GameType"></table>-->
<!--<table tableName="t_game_type_member" domainObjectName="GameTypeMember"></table>-->
<!--<table tableName="t_game_record" domainObjectName="GameRecord"></table>-->
<!--<table tableName="t_game_member_join" domainObjectName="GameMemberJoin"></table>-->
<table tableName="t_game_record" domainObjectName="GameRecord"></table>
<table tableName="t_game_member_join" domainObjectName="GameMemberJoin"></table>
<!--<table tableName="t_game_score_log" domainObjectName="GameScoreLog"></table>-->
<!--<table tableName="t_game_activity_rule" domainObjectName="GameActivityRule"></table>-->
<!--<table tableName="t_game_activity_prize" domainObjectName="GameActivityPrize"></table>-->

Loading…
Cancel
Save