Browse Source

游戏记录添加字段

master
zy_Java 5 years ago
parent
commit
a84e1874c7
  1. 10
      game/src/main/java/com/ccsens/game/api/ScreenController.java
  2. 7
      game/src/main/java/com/ccsens/game/bean/dto/ScreenDto.java
  3. 44
      game/src/main/java/com/ccsens/game/bean/po/GameRecord.java
  4. 240
      game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java
  5. 76
      game/src/main/resources/mapper_raw/GameRecordMapper.xml
  6. 4
      game/src/main/resources/mbg.xml

10
game/src/main/java/com/ccsens/game/api/ScreenController.java

@ -78,5 +78,15 @@ public class ScreenController {
}
@Login
@ApiOperation(value = "自定义游戏时查询游戏配置信息excel", notes = "")
@ApiImplicitParams({
})
@RequestMapping(value = "/config", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<String> getConfig(@ApiParam @Validated @RequestBody QueryDto<ScreenDto.MemberRecord> params) throws Exception {
log.info("再玩一次:{}",params);
String url = screenService.getConfig(params);
return JsonResponse.newInstance().ok(url);
}
}

7
game/src/main/java/com/ccsens/game/bean/dto/ScreenDto.java

@ -57,5 +57,12 @@ public class ScreenDto {
private Byte startStatus;
}
@Data
@ApiModel("查看配置文件")
public static class GetConfig{
@ApiModelProperty("任务id")
private Long taskId;
}
}

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

@ -28,6 +28,14 @@ public class GameRecord implements Serializable {
private Byte recStatus;
private Byte group;
private Integer duration;
private Integer memberLimit;
private Byte rankRule;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -126,6 +134,38 @@ public class GameRecord implements Serializable {
this.recStatus = recStatus;
}
public Byte getGroup() {
return group;
}
public void setGroup(Byte group) {
this.group = group;
}
public Integer getDuration() {
return duration;
}
public void setDuration(Integer duration) {
this.duration = duration;
}
public Integer getMemberLimit() {
return memberLimit;
}
public void setMemberLimit(Integer memberLimit) {
this.memberLimit = memberLimit;
}
public Byte getRankRule() {
return rankRule;
}
public void setRankRule(Byte rankRule) {
this.rankRule = rankRule;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -144,6 +184,10 @@ public class GameRecord implements Serializable {
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", group=").append(group);
sb.append(", duration=").append(duration);
sb.append(", memberLimit=").append(memberLimit);
sb.append(", rankRule=").append(rankRule);
sb.append("]");
return sb.toString();
}

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

@ -844,6 +844,246 @@ public class GameRecordExample {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andGroupIsNull() {
addCriterion("group is null");
return (Criteria) this;
}
public Criteria andGroupIsNotNull() {
addCriterion("group is not null");
return (Criteria) this;
}
public Criteria andGroupEqualTo(Byte value) {
addCriterion("group =", value, "group");
return (Criteria) this;
}
public Criteria andGroupNotEqualTo(Byte value) {
addCriterion("group <>", value, "group");
return (Criteria) this;
}
public Criteria andGroupGreaterThan(Byte value) {
addCriterion("group >", value, "group");
return (Criteria) this;
}
public Criteria andGroupGreaterThanOrEqualTo(Byte value) {
addCriterion("group >=", value, "group");
return (Criteria) this;
}
public Criteria andGroupLessThan(Byte value) {
addCriterion("group <", value, "group");
return (Criteria) this;
}
public Criteria andGroupLessThanOrEqualTo(Byte value) {
addCriterion("group <=", value, "group");
return (Criteria) this;
}
public Criteria andGroupIn(List<Byte> values) {
addCriterion("group in", values, "group");
return (Criteria) this;
}
public Criteria andGroupNotIn(List<Byte> values) {
addCriterion("group not in", values, "group");
return (Criteria) this;
}
public Criteria andGroupBetween(Byte value1, Byte value2) {
addCriterion("group between", value1, value2, "group");
return (Criteria) this;
}
public Criteria andGroupNotBetween(Byte value1, Byte value2) {
addCriterion("group not between", value1, value2, "group");
return (Criteria) this;
}
public Criteria andDurationIsNull() {
addCriterion("duration is null");
return (Criteria) this;
}
public Criteria andDurationIsNotNull() {
addCriterion("duration is not null");
return (Criteria) this;
}
public Criteria andDurationEqualTo(Integer value) {
addCriterion("duration =", value, "duration");
return (Criteria) this;
}
public Criteria andDurationNotEqualTo(Integer value) {
addCriterion("duration <>", value, "duration");
return (Criteria) this;
}
public Criteria andDurationGreaterThan(Integer value) {
addCriterion("duration >", value, "duration");
return (Criteria) this;
}
public Criteria andDurationGreaterThanOrEqualTo(Integer value) {
addCriterion("duration >=", value, "duration");
return (Criteria) this;
}
public Criteria andDurationLessThan(Integer value) {
addCriterion("duration <", value, "duration");
return (Criteria) this;
}
public Criteria andDurationLessThanOrEqualTo(Integer value) {
addCriterion("duration <=", value, "duration");
return (Criteria) this;
}
public Criteria andDurationIn(List<Integer> values) {
addCriterion("duration in", values, "duration");
return (Criteria) this;
}
public Criteria andDurationNotIn(List<Integer> values) {
addCriterion("duration not in", values, "duration");
return (Criteria) this;
}
public Criteria andDurationBetween(Integer value1, Integer value2) {
addCriterion("duration between", value1, value2, "duration");
return (Criteria) this;
}
public Criteria andDurationNotBetween(Integer value1, Integer value2) {
addCriterion("duration not between", value1, value2, "duration");
return (Criteria) this;
}
public Criteria andMemberLimitIsNull() {
addCriterion("member_limit is null");
return (Criteria) this;
}
public Criteria andMemberLimitIsNotNull() {
addCriterion("member_limit is not null");
return (Criteria) this;
}
public Criteria andMemberLimitEqualTo(Integer value) {
addCriterion("member_limit =", value, "memberLimit");
return (Criteria) this;
}
public Criteria andMemberLimitNotEqualTo(Integer value) {
addCriterion("member_limit <>", value, "memberLimit");
return (Criteria) this;
}
public Criteria andMemberLimitGreaterThan(Integer value) {
addCriterion("member_limit >", value, "memberLimit");
return (Criteria) this;
}
public Criteria andMemberLimitGreaterThanOrEqualTo(Integer value) {
addCriterion("member_limit >=", value, "memberLimit");
return (Criteria) this;
}
public Criteria andMemberLimitLessThan(Integer value) {
addCriterion("member_limit <", value, "memberLimit");
return (Criteria) this;
}
public Criteria andMemberLimitLessThanOrEqualTo(Integer value) {
addCriterion("member_limit <=", value, "memberLimit");
return (Criteria) this;
}
public Criteria andMemberLimitIn(List<Integer> values) {
addCriterion("member_limit in", values, "memberLimit");
return (Criteria) this;
}
public Criteria andMemberLimitNotIn(List<Integer> values) {
addCriterion("member_limit not in", values, "memberLimit");
return (Criteria) this;
}
public Criteria andMemberLimitBetween(Integer value1, Integer value2) {
addCriterion("member_limit between", value1, value2, "memberLimit");
return (Criteria) this;
}
public Criteria andMemberLimitNotBetween(Integer value1, Integer value2) {
addCriterion("member_limit not between", value1, value2, "memberLimit");
return (Criteria) this;
}
public Criteria andRankRuleIsNull() {
addCriterion("rank_rule is null");
return (Criteria) this;
}
public Criteria andRankRuleIsNotNull() {
addCriterion("rank_rule is not null");
return (Criteria) this;
}
public Criteria andRankRuleEqualTo(Byte value) {
addCriterion("rank_rule =", value, "rankRule");
return (Criteria) this;
}
public Criteria andRankRuleNotEqualTo(Byte value) {
addCriterion("rank_rule <>", value, "rankRule");
return (Criteria) this;
}
public Criteria andRankRuleGreaterThan(Byte value) {
addCriterion("rank_rule >", value, "rankRule");
return (Criteria) this;
}
public Criteria andRankRuleGreaterThanOrEqualTo(Byte value) {
addCriterion("rank_rule >=", value, "rankRule");
return (Criteria) this;
}
public Criteria andRankRuleLessThan(Byte value) {
addCriterion("rank_rule <", value, "rankRule");
return (Criteria) this;
}
public Criteria andRankRuleLessThanOrEqualTo(Byte value) {
addCriterion("rank_rule <=", value, "rankRule");
return (Criteria) this;
}
public Criteria andRankRuleIn(List<Byte> values) {
addCriterion("rank_rule in", values, "rankRule");
return (Criteria) this;
}
public Criteria andRankRuleNotIn(List<Byte> values) {
addCriterion("rank_rule not in", values, "rankRule");
return (Criteria) this;
}
public Criteria andRankRuleBetween(Byte value1, Byte value2) {
addCriterion("rank_rule between", value1, value2, "rankRule");
return (Criteria) this;
}
public Criteria andRankRuleNotBetween(Byte value1, Byte value2) {
addCriterion("rank_rule not between", value1, value2, "rankRule");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

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

@ -14,6 +14,10 @@
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
<result column="group" jdbcType="TINYINT" property="group" />
<result column="duration" jdbcType="INTEGER" property="duration" />
<result column="member_limit" jdbcType="INTEGER" property="memberLimit" />
<result column="rank_rule" jdbcType="TINYINT" property="rankRule" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -75,7 +79,7 @@
</sql>
<sql id="Base_Column_List">
id, user_pay_id, task_id, url, QR_code_url, time_difference, start_time, end_time,
game_status, created_at, updated_at, rec_status
game_status, created_at, updated_at, rec_status, group, duration, member_limit, rank_rule
</sql>
<select id="selectByExample" parameterType="com.ccsens.game.bean.po.GameRecordExample" resultMap="BaseResultMap">
select
@ -111,13 +115,15 @@
insert into t_game_record (id, user_pay_id, task_id,
url, QR_code_url, time_difference,
start_time, end_time, game_status,
created_at, updated_at, rec_status
)
created_at, updated_at, rec_status,
group, duration, member_limit,
rank_rule)
values (#{id,jdbcType=BIGINT}, #{userPayId,jdbcType=BIGINT}, #{taskId,jdbcType=BIGINT},
#{url,jdbcType=VARCHAR}, #{qrCodeUrl,jdbcType=VARCHAR}, #{timeDifference,jdbcType=INTEGER},
#{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{gameStatus,jdbcType=TINYINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT},
#{group,jdbcType=TINYINT}, #{duration,jdbcType=INTEGER}, #{memberLimit,jdbcType=INTEGER},
#{rankRule,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.game.bean.po.GameRecord">
insert into t_game_record
@ -158,6 +164,18 @@
<if test="recStatus != null">
rec_status,
</if>
<if test="group != null">
group,
</if>
<if test="duration != null">
duration,
</if>
<if test="memberLimit != null">
member_limit,
</if>
<if test="rankRule != null">
rank_rule,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -196,6 +214,18 @@
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
<if test="group != null">
#{group,jdbcType=TINYINT},
</if>
<if test="duration != null">
#{duration,jdbcType=INTEGER},
</if>
<if test="memberLimit != null">
#{memberLimit,jdbcType=INTEGER},
</if>
<if test="rankRule != null">
#{rankRule,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.game.bean.po.GameRecordExample" resultType="java.lang.Long">
@ -243,6 +273,18 @@
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
<if test="record.group != null">
group = #{record.group,jdbcType=TINYINT},
</if>
<if test="record.duration != null">
duration = #{record.duration,jdbcType=INTEGER},
</if>
<if test="record.memberLimit != null">
member_limit = #{record.memberLimit,jdbcType=INTEGER},
</if>
<if test="record.rankRule != null">
rank_rule = #{record.rankRule,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -261,7 +303,11 @@
game_status = #{record.gameStatus,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
rec_status = #{record.recStatus,jdbcType=TINYINT},
group = #{record.group,jdbcType=TINYINT},
duration = #{record.duration,jdbcType=INTEGER},
member_limit = #{record.memberLimit,jdbcType=INTEGER},
rank_rule = #{record.rankRule,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -302,6 +348,18 @@
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
<if test="group != null">
group = #{group,jdbcType=TINYINT},
</if>
<if test="duration != null">
duration = #{duration,jdbcType=INTEGER},
</if>
<if test="memberLimit != null">
member_limit = #{memberLimit,jdbcType=INTEGER},
</if>
<if test="rankRule != null">
rank_rule = #{rankRule,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -317,7 +375,11 @@
game_status = #{gameStatus,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
rec_status = #{recStatus,jdbcType=TINYINT},
group = #{group,jdbcType=TINYINT},
duration = #{duration,jdbcType=INTEGER},
member_limit = #{memberLimit,jdbcType=INTEGER},
rank_rule = #{rankRule,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

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

@ -57,14 +57,14 @@
</javaClientGenerator>
<!-- <table tableName="t_game_type" domainObjectName="GameType"></table>-->
<!--<table tableName="t_game_user_pay" domainObjectName="GameUserPay"></table>-->
<!-- <table tableName="t_game_record" domainObjectName="GameRecord"></table>-->
<table tableName="t_game_record" domainObjectName="GameRecord"></table>
<!-- <table tableName="t_game_user_join" domainObjectName="GameUserJoin"></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>-->
<!--<table tableName="t_game_prize_instructions" domainObjectName="GamePrizeInstructions"></table>-->
<!-- <table tableName="t_game_user_join_group" domainObjectName="GameUserJoinGroup"></table>-->
<table tableName="t_game_group" domainObjectName="GameGroup"></table>
<!-- <table tableName="t_game_group" domainObjectName="GameGroup"></table>-->
<!-- 有些表的字段需要指定java类型

Loading…
Cancel
Save