DriverHealthyMapper.xml 5.88 KB
<?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.mapper.driver.healthy.DriverHealthyMapper">
    <resultMap id="BaseResultMap" type="com.ruoyi.domain.driver.healthy.DriverHealthy">
        <id column="id" jdbcType="BIGINT" property="id"/>
        <result column="driver_id" property="driverId"/>
        <result column="systolic_Pressure" jdbcType="DECIMAL" property="systolicPressure"/>
        <result column="diastolic_Pressure" jdbcType="DECIMAL" property="diastolicPressure"/>
        <result column="Oxygen_Value" jdbcType="DECIMAL" property="oxygenValue"/>
        <result column="heart_Rate" jdbcType="DECIMAL" property="heartRate"/>
        <result column="create_by"  property="createBy"/>
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
        <result column="update_by"  property="updateBy"/>
        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
        <result column="del_flag" jdbcType="BIT" property="delFlag"/>
    </resultMap>

    <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
            parameterType="com.ruoyi.domain.driver.healthy.DriverHealthy">
        INSERT INTO driver_healthy <include refid="insertSelectiveColumn"></include>
        <include refid="insertSelectiveValue"></include>
    </insert>

    <sql id="columns">
        id
        ,  driver_id   ,  systolic_Pressure   ,  diastolic_Pressure   ,  Oxygen_Value   ,  heart_Rate   ,  create_by   ,  create_time   ,  update_by   ,  update_time   ,  del_flag
    </sql>

    <sql id="insert_columns">
        id
        ,  driver_id  ,  systolic_Pressure  ,  diastolic_Pressure  ,  Oxygen_Value  ,  heart_Rate  ,  create_by  ,  create_time  ,  update_by  ,  update_time  ,  del_flag
    </sql>

    <sql id="insert_values">
        #{id}
        ,
        #{driverId},
        #{systolicPressure},
        #{diastolicPressure},
        #{oxygenValue},
        #{heartRate},
        #{createBy},
        #{createTime},
        #{updateBy},
        #{updateTime},
        #{delFlag}
    </sql>

    <sql id="insertSelectiveColumn">
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="null!=id">id,</if>
            <if test="null!=driverId">driver_id,</if>
            <if test="null!=systolicPressure">systolic_Pressure,</if>
            <if test="null!=diastolicPressure">diastolic_Pressure,</if>
            <if test="null!=oxygenValue">Oxygen_Value,</if>
            <if test="null!=heartRate">heart_Rate,</if>
            <if test="null!=createBy">create_by,</if>
            <if test="null!=createTime">create_time,</if>
            <if test="null!=updateBy">update_by,</if>
            <if test="null!=updateTime">update_time,</if>
            <if test="null!=delFlag">del_flag,</if>
        </trim>
    </sql>

    <sql id="insertSelectiveValue">
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="null!=id">#{id,jdbcType=BIGINT},</if>
            <if test="null!=driverId">#{driverId,jdbcType=VARCHAR},</if>
            <if test="null!=systolicPressure">#{systolicPressure,jdbcType=DECIMAL},</if>
            <if test="null!=diastolicPressure">#{diastolicPressure,jdbcType=DECIMAL},</if>
            <if test="null!=oxygenValue">#{oxygenValue,jdbcType=DECIMAL},</if>
            <if test="null!=heartRate">#{heartRate,jdbcType=DECIMAL},</if>
            <if test="null!=createBy">#{createBy,jdbcType=VARCHAR},</if>
            <if test="null!=createTime">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=updateBy">#{updateBy,jdbcType=VARCHAR},</if>
            <if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=delFlag">#{delFlag,jdbcType=BIT},</if>
        </trim>
    </sql>

    <sql id="updateByPrimaryKeySelectiveSql">
        <set>
            <if test="null!=id">id = #{id,jdbcType=BIGINT},</if>
            <if test="null!=driverId">driver_id = #{driverId,jdbcType=VARCHAR},</if>
            <if test="null!=systolicPressure">systolic_Pressure = #{systolicPressure,jdbcType=DECIMAL},</if>
            <if test="null!=diastolicPressure">diastolic_Pressure = #{diastolicPressure,jdbcType=DECIMAL},</if>
            <if test="null!=oxygenValue">Oxygen_Value = #{oxygenValue,jdbcType=DECIMAL},</if>
            <if test="null!=heartRate">heart_Rate = #{heartRate,jdbcType=DECIMAL},</if>
            <if test="null!=createBy">create_by = #{createBy,jdbcType=VARCHAR},</if>
            <if test="null!=createTime">create_time = #{createTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=updateBy">update_by = #{updateBy,jdbcType=VARCHAR},</if>
            <if test="null!=updateTime">update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="null!=delFlag">del_flag = #{delFlag,jdbcType=BIT},</if>
        </set>
    </sql>

    <sql id="where">
        <if test="null!=id">AND id = #{id,jdbcType=BIGINT},</if>
        <if test="null!=driverId">AND driver_id = #{driverId,jdbcType=VARCHAR},</if>
        <if test="null!=systolicPressure">AND systolic_Pressure = #{systolicPressure,jdbcType=DECIMAL},</if>
        <if test="null!=diastolicPressure">AND diastolic_Pressure = #{diastolicPressure,jdbcType=DECIMAL},</if>
        <if test="null!=oxygenValue">AND Oxygen_Value = #{oxygenValue,jdbcType=DECIMAL},</if>
        <if test="null!=heartRate">AND heart_Rate = #{heartRate,jdbcType=DECIMAL},</if>
        <if test="null!=createBy">AND create_by = #{createBy,jdbcType=VARCHAR},</if>
        <if test="null!=createTime">AND create_time = #{createTime,jdbcType=TIMESTAMP},</if>
        <if test="null!=updateBy">AND update_by = #{updateBy,jdbcType=VARCHAR},</if>
        <if test="null!=updateTime">AND update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
        <if test="null!=delFlag">AND del_flag = #{delFlag,jdbcType=BIT},</if>
    </sql>
</mapper>