mirror of
https://github.com/mindskip/xzs-mysql.git
synced 2026-08-28 19:12:15 +08:00
update
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
delete from t_exam_paper_answer
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.ExamPaperAnswer" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.ExamPaperAnswer" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_exam_paper_answer (id, exam_paper_id, paper_name,
|
||||
paper_type, subject_id, system_score,
|
||||
user_score, paper_score, question_correct,
|
||||
@@ -47,7 +47,7 @@
|
||||
#{createUser,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{taskExamId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.ExamPaperAnswer" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.ExamPaperAnswer" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_exam_paper_answer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM t_exam_paper
|
||||
<where>
|
||||
and deleted='f'
|
||||
and deleted=1
|
||||
<if test="id != null ">
|
||||
and id= #{id}
|
||||
</if>
|
||||
@@ -256,7 +256,7 @@
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM t_exam_paper
|
||||
<where>
|
||||
and deleted='f'
|
||||
and deleted=1
|
||||
and task_exam_id is null
|
||||
and grade_level= #{level}
|
||||
and paper_type=#{paperType}
|
||||
@@ -268,7 +268,7 @@
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM t_exam_paper
|
||||
<where>
|
||||
and deleted='f'
|
||||
and deleted=1
|
||||
<if test="subjectId != null ">
|
||||
and subject_id=#{subjectId}
|
||||
</if>
|
||||
@@ -284,7 +284,7 @@
|
||||
SELECT id,name,limit_start_time,limit_end_time
|
||||
FROM t_exam_paper
|
||||
<where>
|
||||
and deleted='f'
|
||||
and deleted=1
|
||||
and paper_type= #{examPaperType}
|
||||
and grade_level=#{gradeLevel}
|
||||
<if test="examPaperType == 3 ">
|
||||
@@ -298,14 +298,14 @@
|
||||
|
||||
|
||||
<select id="selectAllCount" resultType="java.lang.Integer">
|
||||
SELECT count(*) from t_exam_paper where deleted='f'
|
||||
SELECT count(*) from t_exam_paper where deleted=1
|
||||
</select>
|
||||
|
||||
<select id="selectCountByDate" resultType="com.alvis.exam.domain.other.KeyValue">
|
||||
SELECT create_time as name,COUNT(create_time) as value from
|
||||
(
|
||||
SELECT to_char(create_time,'YYYY-mm-dd') as create_time from t_exam_paper
|
||||
WHERE deleted='f' and create_time between #{startTime} and #{endTime}
|
||||
WHERE deleted=1 and create_time between #{startTime} and #{endTime}
|
||||
) a
|
||||
GROUP BY create_time
|
||||
</select>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
delete from t_exam_paper_question_customer_answer
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.ExamPaperQuestionCustomerAnswer" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.ExamPaperQuestionCustomerAnswer" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_exam_paper_question_customer_answer (id, question_id, exam_paper_id,
|
||||
exam_paper_answer_id, question_type, subject_id,
|
||||
customer_score, question_score, question_text_content_id,
|
||||
@@ -47,7 +47,7 @@
|
||||
#{createUser,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{itemOrder,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.ExamPaperQuestionCustomerAnswer" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.ExamPaperQuestionCustomerAnswer" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_exam_paper_question_customer_answer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
delete from t_message
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.Message" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.Message" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_message (id, title, content,
|
||||
create_time, send_user_id, send_user_name,
|
||||
send_real_name, receive_user_count, read_count
|
||||
@@ -36,7 +36,7 @@
|
||||
#{sendRealName,jdbcType=VARCHAR}, #{receiveUserCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.Message" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.Message" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_message
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
delete from t_message_user
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.MessageUser" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.MessageUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_message_user (id, message_id, receive_user_id,
|
||||
receive_user_name, receive_real_name, readed,
|
||||
create_time, read_time)
|
||||
@@ -33,7 +33,7 @@
|
||||
#{receiveUserName,jdbcType=VARCHAR}, #{receiveRealName,jdbcType=VARCHAR}, #{readed,jdbcType=BIT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{readTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.MessageUser" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.MessageUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_message_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -88,7 +88,7 @@
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.alvis.exam.domain.MessageUser">
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.alvis.exam.domain.MessageUser" >
|
||||
update t_message_user
|
||||
<set>
|
||||
<if test="messageId != null">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
delete from t_question
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.Question" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.Question" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_question (id, question_type, subject_id,
|
||||
score, grade_level, difficult,
|
||||
correct, info_text_content_id, create_user,
|
||||
@@ -41,7 +41,7 @@
|
||||
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.Question" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.Question" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_question
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -183,7 +183,7 @@
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM t_question
|
||||
<where>
|
||||
and deleted='f'
|
||||
and deleted=1
|
||||
<if test="id != null ">
|
||||
and id= #{id}
|
||||
</if>
|
||||
@@ -213,14 +213,14 @@
|
||||
|
||||
|
||||
<select id="selectAllCount" resultType="java.lang.Integer">
|
||||
SELECT count(*) from t_question where deleted='f'
|
||||
SELECT count(*) from t_question where deleted=1
|
||||
</select>
|
||||
|
||||
<select id="selectCountByDate" resultType="com.alvis.exam.domain.other.KeyValue">
|
||||
SELECT create_time as name,COUNT(create_time) as value from
|
||||
(
|
||||
SELECT to_char(create_time,'YYYY-mm-dd') as create_time from t_question
|
||||
WHERE deleted='f' and create_time between #{startTime} and #{endTime}
|
||||
WHERE deleted=1 and create_time between #{startTime} and #{endTime}
|
||||
) a
|
||||
GROUP BY create_time
|
||||
</select>
|
||||
|
||||
@@ -1,82 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.alvis.exam.repository.SubjectMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.alvis.exam.domain.Subject" >
|
||||
<id column="id" property="id" jdbcType="INTEGER" />
|
||||
<result column="name" property="name" jdbcType="VARCHAR" />
|
||||
<result column="level" property="level" jdbcType="INTEGER" />
|
||||
<result column="level_name" property="levelName" jdbcType="VARCHAR" />
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.alvis.exam.repository.SubjectMapper">
|
||||
<resultMap id="BaseResultMap" type="com.alvis.exam.domain.Subject">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="level" jdbcType="INTEGER" property="level" />
|
||||
<result column="level_name" jdbcType="VARCHAR" property="levelName" />
|
||||
<result column="item_order" jdbcType="INTEGER" property="itemOrder" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, name, level, level_name
|
||||
<sql id="Base_Column_List">
|
||||
id, name, level, level_name, item_order
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from t_subject
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from t_subject
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.Subject" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.Subject" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_subject (id, name, level,
|
||||
level_name)
|
||||
level_name, item_order)
|
||||
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER},
|
||||
#{levelName,jdbcType=VARCHAR})
|
||||
#{levelName,jdbcType=VARCHAR}, #{itemOrder,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.Subject" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.Subject" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_subject
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null" >
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="level != null" >
|
||||
<if test="level != null">
|
||||
level,
|
||||
</if>
|
||||
<if test="levelName != null" >
|
||||
<if test="levelName != null">
|
||||
level_name,
|
||||
</if>
|
||||
<if test="itemOrder != null">
|
||||
item_order,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="name != null" >
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="level != null" >
|
||||
<if test="level != null">
|
||||
#{level,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="levelName != null" >
|
||||
<if test="levelName != null">
|
||||
#{levelName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="itemOrder != null">
|
||||
#{itemOrder,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.alvis.exam.domain.Subject" >
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.alvis.exam.domain.Subject">
|
||||
update t_subject
|
||||
<set >
|
||||
<if test="name != null" >
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="level != null" >
|
||||
<if test="level != null">
|
||||
level = #{level,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="levelName != null" >
|
||||
<if test="levelName != null">
|
||||
level_name = #{levelName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="itemOrder != null">
|
||||
item_order = #{itemOrder,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.alvis.exam.domain.Subject" >
|
||||
<update id="updateByPrimaryKey" parameterType="com.alvis.exam.domain.Subject">
|
||||
update t_subject
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
level = #{level,jdbcType=INTEGER},
|
||||
level_name = #{levelName,jdbcType=VARCHAR}
|
||||
level_name = #{levelName,jdbcType=VARCHAR},
|
||||
item_order = #{itemOrder,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
delete from t_task_exam_customer_answer
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.TaskExamCustomerAnswer" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.TaskExamCustomerAnswer" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_task_exam_customer_answer (id, task_exam_id, create_user,
|
||||
create_time, text_content_id)
|
||||
values (#{id,jdbcType=INTEGER}, #{taskExamId,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{textContentId,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.TaskExamCustomerAnswer" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.TaskExamCustomerAnswer" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_task_exam_customer_answer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
delete from t_task_exam
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.TaskExam" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.TaskExam" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_task_exam (id, title, grade_level,
|
||||
frame_text_content_id, create_user, create_time,
|
||||
deleted, create_user_name)
|
||||
@@ -33,7 +33,7 @@
|
||||
#{frameTextContentId,jdbcType=INTEGER}, #{createUser,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{deleted,jdbcType=BIT}, #{createUserName,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.TaskExam" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.TaskExam" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_task_exam
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -139,7 +139,7 @@
|
||||
<include refid="Base_Column_List" />
|
||||
from t_task_exam
|
||||
<where>
|
||||
and deleted='f'
|
||||
and deleted=1
|
||||
<if test="gradeLevel != null">
|
||||
and grade_level = #{gradeLevel}
|
||||
</if>
|
||||
@@ -151,7 +151,7 @@
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from t_task_exam
|
||||
where deleted='f'
|
||||
where deleted=1
|
||||
and grade_level = #{gradeLevel,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
delete from t_user
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.User" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insert" parameterType="com.alvis.exam.domain.User" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_user (id, user_uuid, user_name,
|
||||
password, real_name, age,
|
||||
sex, birth_day, user_level,
|
||||
@@ -43,7 +43,7 @@
|
||||
image_path, create_time, modify_time,
|
||||
last_active_time, deleted, wx_open_id
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{userUuid}::uuid, #{userName,jdbcType=VARCHAR},
|
||||
values (#{id,jdbcType=INTEGER}, #{userUuid,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR},
|
||||
#{password,jdbcType=VARCHAR}, #{realName,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER},
|
||||
#{sex,jdbcType=INTEGER}, #{birthDay,jdbcType=TIMESTAMP}, #{userLevel,jdbcType=INTEGER},
|
||||
#{phone,jdbcType=VARCHAR}, #{role,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
|
||||
@@ -51,7 +51,7 @@
|
||||
#{lastActiveTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}, #{wxOpenId,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.User" useGeneratedKeys="true" keyProperty="id" >
|
||||
<insert id="insertSelective" parameterType="com.alvis.exam.domain.User" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into t_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -114,7 +114,7 @@
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userUuid != null">
|
||||
#{userUuid}::uuid,
|
||||
#{userUuid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userName != null">
|
||||
#{userName,jdbcType=VARCHAR},
|
||||
@@ -170,7 +170,7 @@
|
||||
update t_user
|
||||
<set>
|
||||
<if test="userUuid != null">
|
||||
user_uuid = #{userUuid}::uuid,
|
||||
user_uuid = #{userUuid,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userName != null">
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
@@ -225,7 +225,7 @@
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.alvis.exam.domain.User">
|
||||
update t_user
|
||||
set user_uuid = #{userUuid}::uuid,
|
||||
set user_uuid = #{userUuid,jdbcType=VARCHAR},
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
password = #{password,jdbcType=VARCHAR},
|
||||
real_name = #{realName,jdbcType=VARCHAR},
|
||||
@@ -250,7 +250,7 @@
|
||||
<select id="getAllUser" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from t_user where deleted='f'
|
||||
from t_user where deleted=1
|
||||
</select>
|
||||
|
||||
<select id="getUserById" resultMap="BaseResultMap">
|
||||
@@ -264,21 +264,21 @@
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from t_user
|
||||
where deleted='f' and user_name=#{value} limit 1
|
||||
where deleted=1 and user_name=#{value} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getUserByUserNamePwd" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from t_user
|
||||
where deleted='f' and user_name=#{username} and password=#{pwd} limit 1
|
||||
where deleted=1 and user_name=#{username} and password=#{pwd} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getUserByUuid" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from t_user
|
||||
where deleted='f' and user_uuid=#{value}::uuid
|
||||
where deleted=1 and user_uuid=#{value,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM t_user
|
||||
<where>
|
||||
and deleted='f'
|
||||
and deleted=1
|
||||
<if test="name != null and name != ''">
|
||||
and real_name like concat('%',#{name},'%')
|
||||
</if>
|
||||
@@ -303,7 +303,7 @@
|
||||
<select id="userPageCount" resultType="java.lang.Integer">
|
||||
select count(*) from t_user
|
||||
<where>
|
||||
and deleted='f'
|
||||
and deleted=1
|
||||
<if test="name != null and name != ''">
|
||||
and real_name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
@@ -316,7 +316,7 @@
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM t_user
|
||||
<where>
|
||||
and deleted='f'
|
||||
and deleted=1
|
||||
<if test="userName != null and userName != ''">
|
||||
and user_name like concat('%',#{userName},'%')
|
||||
</if>
|
||||
@@ -333,7 +333,7 @@
|
||||
insert into t_user
|
||||
(user_uuid,user_name,password,real_name,age, last_active_time)
|
||||
values
|
||||
(#{userUuid}::uuid,#{userName},#{password},#{realName},#{age},#{lastActiveTime})
|
||||
(#{userUuid,jdbcType=VARCHAR},#{userName},#{password},#{realName},#{age},#{lastActiveTime})
|
||||
</insert>
|
||||
|
||||
<insert id="insertUsers" parameterType="java.util.List"
|
||||
@@ -343,7 +343,7 @@
|
||||
values
|
||||
<foreach collection="list" item="item" index="index"
|
||||
separator=",">
|
||||
(#{item.userUuid}::uuid,#{item.userName},#{item.password},#{item.realName},#{item.age},
|
||||
(#{item.userUuid},#{item.userName},#{item.password},#{item.realName},#{item.age},
|
||||
#{item.lastActiveTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
@@ -378,14 +378,14 @@
|
||||
</delete>
|
||||
|
||||
<select id="selectAllCount" resultType="java.lang.Integer">
|
||||
SELECT count(*) from t_user where deleted='f'
|
||||
SELECT count(*) from t_user where deleted=1
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectByUserName" resultType="com.alvis.exam.domain.other.KeyValue">
|
||||
SELECT id as value,user_name as name
|
||||
from t_user
|
||||
where deleted='f' and user_name like concat('%',#{value},'%')
|
||||
where deleted=1 and user_name like concat('%',#{value},'%')
|
||||
limit 5
|
||||
</select>
|
||||
|
||||
@@ -406,7 +406,7 @@
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from t_user
|
||||
where deleted='f' and wx_open_id = #{wxOpenId}
|
||||
where deleted=1 and wx_open_id = #{wxOpenId}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
insert into t_user_token (id, token, user_id,
|
||||
wx_open_id, create_time, end_time,
|
||||
user_name)
|
||||
values (#{id,jdbcType=INTEGER}, #{token}::uuid, #{userId,jdbcType=INTEGER},
|
||||
values (#{id,jdbcType=INTEGER}, #{token,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER},
|
||||
#{wxOpenId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
||||
#{userName,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
@@ -61,7 +61,7 @@
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="token != null">
|
||||
#{token}::uuid,
|
||||
#{token,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=INTEGER},
|
||||
@@ -84,7 +84,7 @@
|
||||
update t_user_token
|
||||
<set>
|
||||
<if test="token != null">
|
||||
token = #{token}::uuid,
|
||||
token = #{token,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=INTEGER},
|
||||
@@ -106,7 +106,7 @@
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.alvis.exam.domain.UserToken">
|
||||
update t_user_token
|
||||
set token = #{token}::uuid,
|
||||
set token = #{token,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=INTEGER},
|
||||
wx_open_id = #{wxOpenId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
@@ -123,7 +123,7 @@
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from t_user_token
|
||||
where token = #{token}::uuid
|
||||
where token = #{token,jdbcType=VARCHAR}
|
||||
order by id desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user