|
@@ -0,0 +1,172 @@
|
|
|
+<?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.ruoyi.system.mapper.UserInfoOneMapper">
|
|
|
+
|
|
|
+ <resultMap type="UserInfoOne" id="UserInfoOneResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="name" column="name" />
|
|
|
+ <result property="gender" column="gender" />
|
|
|
+ <result property="age" column="age" />
|
|
|
+ <result property="idCard" column="id_card" />
|
|
|
+ <result property="phoneNum" column="phone_num" />
|
|
|
+ <result property="deptId" column="dept_id" />
|
|
|
+ <result property="collectPlace" column="collect_place" />
|
|
|
+ <result property="nucleicCollectTime" column="nucleic_collect_time" />
|
|
|
+ <result property="nucleicResultsTime" column="nucleic_results_time" />
|
|
|
+ <result property="nucleicResults" column="nucleic_results" />
|
|
|
+ <result property="jobStyle" column="job_style" />
|
|
|
+ <result property="focusCrowdStyle" column="focus_crowd_style" />
|
|
|
+ <result property="detectionFrequency" column="detection_frequency" />
|
|
|
+ <result property="detectionNumber" column="detection_number" />
|
|
|
+ <result property="detectionScope" column="detection_scope" />
|
|
|
+ <result property="detectionProgress" column="detection_progress" />
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
+ <result property="startTime" column="start_time" />
|
|
|
+ <result property="endTime" column="end_time" />
|
|
|
+ <result property="detectionResult" column="detection_result" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectUserInfoOneVo">
|
|
|
+ select id, name, gender, age, id_card, phone_num, dept_id, collect_place, nucleic_collect_time, nucleic_results_time, nucleic_results, job_style, focus_crowd_style, detection_frequency, detection_number, detection_scope, detection_progress, dept_name, start_time, end_time, detection_result, create_by, create_time, update_by, update_time, remark from user_info_one
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectUserInfoOneList" parameterType="UserInfoOne" resultMap="UserInfoOneResult">
|
|
|
+ <include refid="selectUserInfoOneVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="gender != null and gender != ''"> and gender = #{gender}</if>
|
|
|
+ <if test="age != null "> and age = #{age}</if>
|
|
|
+ <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
|
|
|
+ <if test="phoneNum != null and phoneNum != ''"> and phone_num = #{phoneNum}</if>
|
|
|
+ <if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
|
|
|
+ <if test="collectPlace != null and collectPlace != ''"> and collect_place = #{collectPlace}</if>
|
|
|
+ <if test="nucleicCollectTime != null and nucleicCollectTime != ''"> and nucleic_collect_time = #{nucleicCollectTime}</if>
|
|
|
+ <if test="nucleicResultsTime != null and nucleicResultsTime != ''"> and nucleic_results_time = #{nucleicResultsTime}</if>
|
|
|
+ <if test="nucleicResults != null and nucleicResults != ''"> and nucleic_results = #{nucleicResults}</if>
|
|
|
+ <if test="jobStyle != null and jobStyle != ''"> and job_style = #{jobStyle}</if>
|
|
|
+ <if test="focusCrowdStyle != null and focusCrowdStyle != ''"> and focus_crowd_style = #{focusCrowdStyle}</if>
|
|
|
+ <if test="detectionFrequency != null and detectionFrequency != ''"> and detection_frequency = #{detectionFrequency}</if>
|
|
|
+ <if test="detectionNumber != null and detectionNumber != ''"> and detection_number = #{detectionNumber}</if>
|
|
|
+ <if test="detectionScope != null and detectionScope != ''"> and detection_scope = #{detectionScope}</if>
|
|
|
+ <if test="detectionProgress != null and detectionProgress != ''"> and detection_progress = #{detectionProgress}</if>
|
|
|
+ <if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
|
|
+ <if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
|
|
|
+ <if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if>
|
|
|
+ <if test="detectionResult != null and detectionResult != ''"> and detection_result = #{detectionResult}</if>
|
|
|
+ </where>
|
|
|
+ order by create_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectUserInfoOneById" parameterType="Long" resultMap="UserInfoOneResult">
|
|
|
+ <include refid="selectUserInfoOneVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertUserInfoOne" parameterType="UserInfoOne" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into user_info_one
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="name != null">name,</if>
|
|
|
+ <if test="gender != null">gender,</if>
|
|
|
+ <if test="age != null">age,</if>
|
|
|
+ <if test="idCard != null">id_card,</if>
|
|
|
+ <if test="phoneNum != null">phone_num,</if>
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
+ <if test="collectPlace != null">collect_place,</if>
|
|
|
+ <if test="nucleicCollectTime != null">nucleic_collect_time,</if>
|
|
|
+ <if test="nucleicResultsTime != null">nucleic_results_time,</if>
|
|
|
+ <if test="nucleicResults != null">nucleic_results,</if>
|
|
|
+ <if test="jobStyle != null">job_style,</if>
|
|
|
+ <if test="focusCrowdStyle != null">focus_crowd_style,</if>
|
|
|
+ <if test="detectionFrequency != null">detection_frequency,</if>
|
|
|
+ <if test="detectionNumber != null">detection_number,</if>
|
|
|
+ <if test="detectionScope != null">detection_scope,</if>
|
|
|
+ <if test="detectionProgress != null">detection_progress,</if>
|
|
|
+ <if test="deptName != null">dept_name,</if>
|
|
|
+ <if test="startTime != null">start_time,</if>
|
|
|
+ <if test="endTime != null">end_time,</if>
|
|
|
+ <if test="detectionResult != null">detection_result,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="name != null">#{name},</if>
|
|
|
+ <if test="gender != null">#{gender},</if>
|
|
|
+ <if test="age != null">#{age},</if>
|
|
|
+ <if test="idCard != null">#{idCard},</if>
|
|
|
+ <if test="phoneNum != null">#{phoneNum},</if>
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
+ <if test="collectPlace != null">#{collectPlace},</if>
|
|
|
+ <if test="nucleicCollectTime != null">#{nucleicCollectTime},</if>
|
|
|
+ <if test="nucleicResultsTime != null">#{nucleicResultsTime},</if>
|
|
|
+ <if test="nucleicResults != null">#{nucleicResults},</if>
|
|
|
+ <if test="jobStyle != null">#{jobStyle},</if>
|
|
|
+ <if test="focusCrowdStyle != null">#{focusCrowdStyle},</if>
|
|
|
+ <if test="detectionFrequency != null">#{detectionFrequency},</if>
|
|
|
+ <if test="detectionNumber != null">#{detectionNumber},</if>
|
|
|
+ <if test="detectionScope != null">#{detectionScope},</if>
|
|
|
+ <if test="detectionProgress != null">#{detectionProgress},</if>
|
|
|
+ <if test="deptName != null">#{deptName},</if>
|
|
|
+ <if test="startTime != null">#{startTime},</if>
|
|
|
+ <if test="endTime != null">#{endTime},</if>
|
|
|
+ <if test="detectionResult != null">#{detectionResult},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateUserInfoOne" parameterType="UserInfoOne">
|
|
|
+ update user_info_one
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="name != null">name = #{name},</if>
|
|
|
+ <if test="gender != null">gender = #{gender},</if>
|
|
|
+ <if test="age != null">age = #{age},</if>
|
|
|
+ <if test="idCard != null">id_card = #{idCard},</if>
|
|
|
+ <if test="phoneNum != null">phone_num = #{phoneNum},</if>
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
+ <if test="collectPlace != null">collect_place = #{collectPlace},</if>
|
|
|
+ <if test="nucleicCollectTime != null">nucleic_collect_time = #{nucleicCollectTime},</if>
|
|
|
+ <if test="nucleicResultsTime != null">nucleic_results_time = #{nucleicResultsTime},</if>
|
|
|
+ <if test="nucleicResults != null">nucleic_results = #{nucleicResults},</if>
|
|
|
+ <if test="jobStyle != null">job_style = #{jobStyle},</if>
|
|
|
+ <if test="focusCrowdStyle != null">focus_crowd_style = #{focusCrowdStyle},</if>
|
|
|
+ <if test="detectionFrequency != null">detection_frequency = #{detectionFrequency},</if>
|
|
|
+ <if test="detectionNumber != null">detection_number = #{detectionNumber},</if>
|
|
|
+ <if test="detectionScope != null">detection_scope = #{detectionScope},</if>
|
|
|
+ <if test="detectionProgress != null">detection_progress = #{detectionProgress},</if>
|
|
|
+ <if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
+ <if test="startTime != null">start_time = #{startTime},</if>
|
|
|
+ <if test="endTime != null">end_time = #{endTime},</if>
|
|
|
+ <if test="detectionResult != null">detection_result = #{detectionResult},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteUserInfoOneById" parameterType="Long">
|
|
|
+ delete from user_info_one where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteUserInfoOneByIds" parameterType="String">
|
|
|
+ delete from user_info_one where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|