From c88e763c3a2c6a432189df33e567e71f30861e32 Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期二, 14 五月 2024 18:11:52 +0800 Subject: [PATCH] reactor:统计图数据格式 --- src/main/resources/mapper/UserMapper.xml | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml index 41040e0..67c6b80 100644 --- a/src/main/resources/mapper/UserMapper.xml +++ b/src/main/resources/mapper/UserMapper.xml @@ -23,7 +23,7 @@ </resultMap> <sql id="Base_Column_List"> id, user_uuid, user_name, password, real_name, age, sex, birth_day, user_level, phone, - role, status, image_path, create_time, modify_time, last_active_time, deleted, wx_open_id, dept_admin, `condition`, condition_detail + role, status, image_path, create_time, modify_time, last_active_time, deleted, wx_open_id, `condition`, condition_detail </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> select @@ -268,7 +268,7 @@ select <include refid="Base_Column_List"/> from t_user - where id=#{value} and status = 1 and deleted = 0 + where id=#{value} and status = 1 and deleted = 0 and (`condition` = 0 or `condition` is null) </select> <select id="getUserByUserName" resultMap="BaseResultMap"> @@ -494,4 +494,18 @@ tu.id desc </select> + <select id="getUserByExam" resultType="com.mindskip.xzs.domain.User"> + <![CDATA[ + SELECT + DISTINCT d.* + FROM t_exam_paper a + left join t_exam_paper_user b on a.id = b.exam_paper_id and b.deleted = 0 + left join t_exam_paper_answer c on a.id = c.exam_paper_id and c.create_user = b.user_id + left join t_user d on b.user_id = d.id + WHERE a.id = #{id} + and (c.id is null or (user_score / paper_score) < 0.6) + and b.user_id = #{createUser} + ]]> + </select> + </mapper> -- Gitblit v1.8.0