Merge remote-tracking branch 'origin/test-training2' into test-training2

This commit is contained in:
joylink_zhangsai 2022-12-06 10:18:49 +08:00
commit 50d028d92a
6 changed files with 45 additions and 133 deletions

View File

@ -62,7 +62,6 @@ CREATE TABLE `rts_paper_user` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷id', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷id',
`user_id` bigint NOT NULL COMMENT '用户id', `user_id` bigint NOT NULL COMMENT '用户id',
`pc_id` bigint NOT NULL COMMENT '生成用户试卷的paper_compostion的id', `pc_id` bigint NOT NULL COMMENT '生成用户试卷的paper_compostion的id',
`org_id` bigint NULL DEFAULT NULL COMMENT '组织id',
`score` int NULL DEFAULT NULL COMMENT '用户最终得分', `score` int NULL DEFAULT NULL COMMENT '用户最终得分',
`start_time` datetime NULL DEFAULT NULL COMMENT '用户开始做题时间', `start_time` datetime NULL DEFAULT NULL COMMENT '用户开始做题时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '用户结束做题时间', `end_time` datetime NULL DEFAULT NULL COMMENT '用户结束做题时间',

View File

@ -2,6 +2,7 @@ package club.joylink.rtss.entity.paper;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data; import lombok.Data;
/** /**
@ -25,11 +26,6 @@ public class PaperUser implements Serializable {
*/ */
private Long pcId; private Long pcId;
/**
* 组织id
*/
private Long orgId;
/** /**
* 用户最终得分 * 用户最终得分
*/ */
@ -56,4 +52,4 @@ public class PaperUser implements Serializable {
private LocalDateTime createTime; private LocalDateTime createTime;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -1,7 +1,7 @@
package club.joylink.rtss.entity.paper; package club.joylink.rtss.entity.paper;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
public class PaperUserExample { public class PaperUserExample {
@ -305,66 +305,6 @@ public class PaperUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andOrgIdIsNull() {
addCriterion("org_id is null");
return (Criteria) this;
}
public Criteria andOrgIdIsNotNull() {
addCriterion("org_id is not null");
return (Criteria) this;
}
public Criteria andOrgIdEqualTo(Long value) {
addCriterion("org_id =", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotEqualTo(Long value) {
addCriterion("org_id <>", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdGreaterThan(Long value) {
addCriterion("org_id >", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdGreaterThanOrEqualTo(Long value) {
addCriterion("org_id >=", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdLessThan(Long value) {
addCriterion("org_id <", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdLessThanOrEqualTo(Long value) {
addCriterion("org_id <=", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdIn(List<Long> values) {
addCriterion("org_id in", values, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotIn(List<Long> values) {
addCriterion("org_id not in", values, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdBetween(Long value1, Long value2) {
addCriterion("org_id between", value1, value2, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotBetween(Long value1, Long value2) {
addCriterion("org_id not between", value1, value2, "orgId");
return (Criteria) this;
}
public Criteria andScoreIsNull() { public Criteria andScoreIsNull() {
addCriterion("score is null"); addCriterion("score is null");
return (Criteria) this; return (Criteria) this;
@ -435,52 +375,52 @@ public class PaperUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeEqualTo(LocalDateTime value) { public Criteria andStartTimeEqualTo(Date value) {
addCriterion("start_time =", value, "startTime"); addCriterion("start_time =", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeNotEqualTo(LocalDateTime value) { public Criteria andStartTimeNotEqualTo(Date value) {
addCriterion("start_time <>", value, "startTime"); addCriterion("start_time <>", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeGreaterThan(LocalDateTime value) { public Criteria andStartTimeGreaterThan(Date value) {
addCriterion("start_time >", value, "startTime"); addCriterion("start_time >", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeGreaterThanOrEqualTo(LocalDateTime value) { public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
addCriterion("start_time >=", value, "startTime"); addCriterion("start_time >=", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeLessThan(LocalDateTime value) { public Criteria andStartTimeLessThan(Date value) {
addCriterion("start_time <", value, "startTime"); addCriterion("start_time <", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeLessThanOrEqualTo(LocalDateTime value) { public Criteria andStartTimeLessThanOrEqualTo(Date value) {
addCriterion("start_time <=", value, "startTime"); addCriterion("start_time <=", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeIn(List<LocalDateTime> values) { public Criteria andStartTimeIn(List<Date> values) {
addCriterion("start_time in", values, "startTime"); addCriterion("start_time in", values, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeNotIn(List<LocalDateTime> values) { public Criteria andStartTimeNotIn(List<Date> values) {
addCriterion("start_time not in", values, "startTime"); addCriterion("start_time not in", values, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andStartTimeBetween(Date value1, Date value2) {
addCriterion("start_time between", value1, value2, "startTime"); addCriterion("start_time between", value1, value2, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andStartTimeNotBetween(Date value1, Date value2) {
addCriterion("start_time not between", value1, value2, "startTime"); addCriterion("start_time not between", value1, value2, "startTime");
return (Criteria) this; return (Criteria) this;
} }
@ -495,52 +435,52 @@ public class PaperUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeEqualTo(LocalDateTime value) { public Criteria andEndTimeEqualTo(Date value) {
addCriterion("end_time =", value, "endTime"); addCriterion("end_time =", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeNotEqualTo(LocalDateTime value) { public Criteria andEndTimeNotEqualTo(Date value) {
addCriterion("end_time <>", value, "endTime"); addCriterion("end_time <>", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeGreaterThan(LocalDateTime value) { public Criteria andEndTimeGreaterThan(Date value) {
addCriterion("end_time >", value, "endTime"); addCriterion("end_time >", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeGreaterThanOrEqualTo(LocalDateTime value) { public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
addCriterion("end_time >=", value, "endTime"); addCriterion("end_time >=", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeLessThan(LocalDateTime value) { public Criteria andEndTimeLessThan(Date value) {
addCriterion("end_time <", value, "endTime"); addCriterion("end_time <", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeLessThanOrEqualTo(LocalDateTime value) { public Criteria andEndTimeLessThanOrEqualTo(Date value) {
addCriterion("end_time <=", value, "endTime"); addCriterion("end_time <=", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeIn(List<LocalDateTime> values) { public Criteria andEndTimeIn(List<Date> values) {
addCriterion("end_time in", values, "endTime"); addCriterion("end_time in", values, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeNotIn(List<LocalDateTime> values) { public Criteria andEndTimeNotIn(List<Date> values) {
addCriterion("end_time not in", values, "endTime"); addCriterion("end_time not in", values, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andEndTimeBetween(Date value1, Date value2) {
addCriterion("end_time between", value1, value2, "endTime"); addCriterion("end_time between", value1, value2, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andEndTimeNotBetween(Date value1, Date value2) {
addCriterion("end_time not between", value1, value2, "endTime"); addCriterion("end_time not between", value1, value2, "endTime");
return (Criteria) this; return (Criteria) this;
} }
@ -625,52 +565,52 @@ public class PaperUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeEqualTo(LocalDateTime value) { public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime"); addCriterion("create_time =", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime"); addCriterion("create_time <>", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeGreaterThan(LocalDateTime value) { public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime"); addCriterion("create_time >", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime"); addCriterion("create_time >=", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeLessThan(LocalDateTime value) { public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime"); addCriterion("create_time <", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime"); addCriterion("create_time <=", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeIn(List<LocalDateTime> values) { public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime"); addCriterion("create_time in", values, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) { public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime"); addCriterion("create_time not in", values, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime"); addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime"); addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this; return (Criteria) this;
} }

View File

@ -81,7 +81,7 @@ public class PaperUserCreateService {
PaperUser paper = new PaperUser(); PaperUser paper = new PaperUser();
paper.setUserId(user.getId()); paper.setUserId(user.getId());
paper.setPcId(pcId); paper.setPcId(pcId);
paper.setOrgId(orgId); // paper.setOrgId(orgId);
paper.setCreateTime(LocalDateTime.now()); paper.setCreateTime(LocalDateTime.now());
paper.setStartTime(LocalDateTime.now()); paper.setStartTime(LocalDateTime.now());
paperUserDAO.insertSelective(paper); paperUserDAO.insertSelective(paper);

View File

@ -12,7 +12,7 @@ public class PaperUserConvertor {
to.setId(from.getId()); to.setId(from.getId());
to.setUserId(from.getUserId()); to.setUserId(from.getUserId());
to.setPcId(from.getPcId()); to.setPcId(from.getPcId());
to.setOrgId(from.getOrgId()); // to.setOrgId(from.getOrgId());
to.setScore(from.getScore()); to.setScore(from.getScore());
to.setStartTime(from.getStartTime()); to.setStartTime(from.getStartTime());
to.setEndTime(from.getEndTime()); to.setEndTime(from.getEndTime());

View File

@ -5,7 +5,6 @@
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" /> <result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="pc_id" jdbcType="BIGINT" property="pcId" /> <result column="pc_id" jdbcType="BIGINT" property="pcId" />
<result column="org_id" jdbcType="BIGINT" property="orgId" />
<result column="score" jdbcType="INTEGER" property="score" /> <result column="score" jdbcType="INTEGER" property="score" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" /> <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" /> <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
@ -71,7 +70,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, user_id, pc_id, org_id, score, start_time, end_time, cause, create_time id, user_id, pc_id, score, start_time, end_time, cause, create_time
</sql> </sql>
<select id="selectByExample" parameterType="club.joylink.rtss.entity.paper.PaperUserExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="club.joylink.rtss.entity.paper.PaperUserExample" resultMap="BaseResultMap">
select select
@ -111,31 +110,23 @@
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="club.joylink.rtss.entity.paper.PaperUser"> <insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.paper.PaperUser" useGeneratedKeys="true">
insert into rts_paper_user (id, user_id, pc_id, insert into rts_paper_user (user_id, pc_id, score,
org_id, score, start_time, start_time, end_time, cause,
end_time, cause, create_time create_time)
) values (#{userId,jdbcType=BIGINT}, #{pcId,jdbcType=BIGINT}, #{score,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{pcId,jdbcType=BIGINT}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{cause,jdbcType=VARCHAR},
#{orgId,jdbcType=BIGINT}, #{score,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
#{endTime,jdbcType=TIMESTAMP}, #{cause,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert> </insert>
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.paper.PaperUser"> <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.paper.PaperUser" useGeneratedKeys="true">
insert into rts_paper_user insert into rts_paper_user
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null"> <if test="userId != null">
user_id, user_id,
</if> </if>
<if test="pcId != null"> <if test="pcId != null">
pc_id, pc_id,
</if> </if>
<if test="orgId != null">
org_id,
</if>
<if test="score != null"> <if test="score != null">
score, score,
</if> </if>
@ -153,18 +144,12 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="userId != null"> <if test="userId != null">
#{userId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
</if> </if>
<if test="pcId != null"> <if test="pcId != null">
#{pcId,jdbcType=BIGINT}, #{pcId,jdbcType=BIGINT},
</if> </if>
<if test="orgId != null">
#{orgId,jdbcType=BIGINT},
</if>
<if test="score != null"> <if test="score != null">
#{score,jdbcType=INTEGER}, #{score,jdbcType=INTEGER},
</if> </if>
@ -200,9 +185,6 @@
<if test="record.pcId != null"> <if test="record.pcId != null">
pc_id = #{record.pcId,jdbcType=BIGINT}, pc_id = #{record.pcId,jdbcType=BIGINT},
</if> </if>
<if test="record.orgId != null">
org_id = #{record.orgId,jdbcType=BIGINT},
</if>
<if test="record.score != null"> <if test="record.score != null">
score = #{record.score,jdbcType=INTEGER}, score = #{record.score,jdbcType=INTEGER},
</if> </if>
@ -228,7 +210,6 @@
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT}, user_id = #{record.userId,jdbcType=BIGINT},
pc_id = #{record.pcId,jdbcType=BIGINT}, pc_id = #{record.pcId,jdbcType=BIGINT},
org_id = #{record.orgId,jdbcType=BIGINT},
score = #{record.score,jdbcType=INTEGER}, score = #{record.score,jdbcType=INTEGER},
start_time = #{record.startTime,jdbcType=TIMESTAMP}, start_time = #{record.startTime,jdbcType=TIMESTAMP},
end_time = #{record.endTime,jdbcType=TIMESTAMP}, end_time = #{record.endTime,jdbcType=TIMESTAMP},
@ -247,9 +228,6 @@
<if test="pcId != null"> <if test="pcId != null">
pc_id = #{pcId,jdbcType=BIGINT}, pc_id = #{pcId,jdbcType=BIGINT},
</if> </if>
<if test="orgId != null">
org_id = #{orgId,jdbcType=BIGINT},
</if>
<if test="score != null"> <if test="score != null">
score = #{score,jdbcType=INTEGER}, score = #{score,jdbcType=INTEGER},
</if> </if>
@ -272,7 +250,6 @@
update rts_paper_user update rts_paper_user
set user_id = #{userId,jdbcType=BIGINT}, set user_id = #{userId,jdbcType=BIGINT},
pc_id = #{pcId,jdbcType=BIGINT}, pc_id = #{pcId,jdbcType=BIGINT},
org_id = #{orgId,jdbcType=BIGINT},
score = #{score,jdbcType=INTEGER}, score = #{score,jdbcType=INTEGER},
start_time = #{startTime,jdbcType=TIMESTAMP}, start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP}, end_time = #{endTime,jdbcType=TIMESTAMP},
@ -280,4 +257,4 @@
create_time = #{createTime,jdbcType=TIMESTAMP} create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>