rts_paper_user 表删除 org_id

This commit is contained in:
tiger_zhou 2022-12-06 09:49:35 +08:00
parent 9af0490766
commit 6d42373ba0
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',
`user_id` bigint NOT NULL COMMENT '用户id',
`pc_id` bigint NOT NULL COMMENT '生成用户试卷的paper_compostion的id',
`org_id` bigint NULL DEFAULT NULL COMMENT '组织id',
`score` int NULL DEFAULT NULL COMMENT '用户最终得分',
`start_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.time.LocalDateTime;
import java.util.Date;
import lombok.Data;
/**
@ -25,11 +26,6 @@ public class PaperUser implements Serializable {
*/
private Long pcId;
/**
* 组织id
*/
private Long orgId;
/**
* 用户最终得分
*/
@ -56,4 +52,4 @@ public class PaperUser implements Serializable {
private LocalDateTime createTime;
private static final long serialVersionUID = 1L;
}
}

View File

@ -1,7 +1,7 @@
package club.joylink.rtss.entity.paper;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class PaperUserExample {
@ -305,66 +305,6 @@ public class PaperUserExample {
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() {
addCriterion("score is null");
return (Criteria) this;
@ -435,52 +375,52 @@ public class PaperUserExample {
return (Criteria) this;
}
public Criteria andStartTimeEqualTo(LocalDateTime value) {
public Criteria andStartTimeEqualTo(Date value) {
addCriterion("start_time =", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotEqualTo(LocalDateTime value) {
public Criteria andStartTimeNotEqualTo(Date value) {
addCriterion("start_time <>", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThan(LocalDateTime value) {
public Criteria andStartTimeGreaterThan(Date value) {
addCriterion("start_time >", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThanOrEqualTo(LocalDateTime value) {
public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
addCriterion("start_time >=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThan(LocalDateTime value) {
public Criteria andStartTimeLessThan(Date value) {
addCriterion("start_time <", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThanOrEqualTo(LocalDateTime value) {
public Criteria andStartTimeLessThanOrEqualTo(Date value) {
addCriterion("start_time <=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeIn(List<LocalDateTime> values) {
public Criteria andStartTimeIn(List<Date> values) {
addCriterion("start_time in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotIn(List<LocalDateTime> values) {
public Criteria andStartTimeNotIn(List<Date> values) {
addCriterion("start_time not in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeBetween(LocalDateTime value1, LocalDateTime value2) {
public Criteria andStartTimeBetween(Date value1, Date value2) {
addCriterion("start_time between", value1, value2, "startTime");
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");
return (Criteria) this;
}
@ -495,52 +435,52 @@ public class PaperUserExample {
return (Criteria) this;
}
public Criteria andEndTimeEqualTo(LocalDateTime value) {
public Criteria andEndTimeEqualTo(Date value) {
addCriterion("end_time =", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotEqualTo(LocalDateTime value) {
public Criteria andEndTimeNotEqualTo(Date value) {
addCriterion("end_time <>", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThan(LocalDateTime value) {
public Criteria andEndTimeGreaterThan(Date value) {
addCriterion("end_time >", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThanOrEqualTo(LocalDateTime value) {
public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
addCriterion("end_time >=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThan(LocalDateTime value) {
public Criteria andEndTimeLessThan(Date value) {
addCriterion("end_time <", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThanOrEqualTo(LocalDateTime value) {
public Criteria andEndTimeLessThanOrEqualTo(Date value) {
addCriterion("end_time <=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeIn(List<LocalDateTime> values) {
public Criteria andEndTimeIn(List<Date> values) {
addCriterion("end_time in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotIn(List<LocalDateTime> values) {
public Criteria andEndTimeNotIn(List<Date> values) {
addCriterion("end_time not in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeBetween(LocalDateTime value1, LocalDateTime value2) {
public Criteria andEndTimeBetween(Date value1, Date value2) {
addCriterion("end_time between", value1, value2, "endTime");
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");
return (Criteria) this;
}
@ -625,52 +565,52 @@ public class PaperUserExample {
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(LocalDateTime value) {
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) {
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(LocalDateTime value) {
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(LocalDateTime value) {
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) {
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<LocalDateTime> values) {
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) {
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
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");
return (Criteria) this;
}

View File

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

View File

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

View File

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