SignReportDaySummaryMapper.xml 3.66 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.sign.in.summary.SignReportDaySummaryMapper">
    <resultMap id="BaseResultMap" type="com.ruoyi.domain.sign.in.summary.SignReportDaySummary">
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="dateStr" jdbcType="VARCHAR" property="datestr"/>
        <result column="alcohol_Num" jdbcType="INTEGER" property="alcoholNum"/>
        <result column="early_Signing" jdbcType="INTEGER" property="earlySigning"/>
        <result column="late_Signing" jdbcType="INTEGER" property="lateSigning"/>
        <result column="normal_Signing" jdbcType="INTEGER" property="normalSigning"/>
    </resultMap>

    <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
            parameterType="com.ruoyi.domain.sign.in.summary.SignReportDaySummary">
        INSERT INTO sign_report_day_summary
        <include refid="insertSelectiveColumn"></include>
        <include refid="insertSelectiveValue"></include>
    </insert>

    <sql id="columns">
        id , dateStr , alcohol_Num , early_Signing , late_Signing , normal_Signing
    </sql>

    <sql id="insert_columns">
        id , dateStr , alcohol_Num , early_Signing , late_Signing , normal_Signing
    </sql>

    <sql id="insert_values">
        #{id}, #{datestr}, #{alcoholNum}, #{earlySigning}, #{lateSigning}, #{normalSigning}
    </sql>

    <sql id="insertSelectiveColumn">
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="null!=id">id,</if>
            <if test="null!=datestr">dateStr,</if>
            <if test="null!=alcoholNum">alcohol_Num,</if>
            <if test="null!=earlySigning">early_Signing,</if>
            <if test="null!=lateSigning">late_Signing,</if>
            <if test="null!=normalSigning">normal_Signing,</if>
        </trim>
    </sql>

    <sql id="insertSelectiveValue">
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="null!=id">#{id,jdbcType=INTEGER},</if>
            <if test="null!=datestr">#{datestr,jdbcType=VARCHAR},</if>
            <if test="null!=alcoholNum">#{alcoholNum,jdbcType=INTEGER},</if>
            <if test="null!=earlySigning">#{earlySigning,jdbcType=INTEGER},</if>
            <if test="null!=lateSigning">#{lateSigning,jdbcType=INTEGER},</if>
            <if test="null!=normalSigning">#{normalSigning,jdbcType=INTEGER},</if>
        </trim>
    </sql>

    <sql id="updateByPrimaryKeySelectiveSql">
        <set>
            <if test="null!=id">id = #{id,jdbcType=INTEGER},</if>
            <if test="null!=datestr">dateStr = #{datestr,jdbcType=VARCHAR},</if>
            <if test="null!=alcoholNum">alcohol_Num = #{alcoholNum,jdbcType=INTEGER},</if>
            <if test="null!=earlySigning">early_Signing = #{earlySigning,jdbcType=INTEGER},</if>
            <if test="null!=lateSigning">late_Signing = #{lateSigning,jdbcType=INTEGER},</if>
            <if test="null!=normalSigning">normal_Signing = #{normalSigning,jdbcType=INTEGER},</if>
        </set>
    </sql>

    <sql id="where">
        <if test="null!=id">AND id = #{id,jdbcType=INTEGER},</if>
        <if test="null!=datestr">AND dateStr = #{datestr,jdbcType=VARCHAR},</if>
        <if test="null!=alcoholNum">AND alcohol_Num = #{alcoholNum,jdbcType=INTEGER},</if>
        <if test="null!=earlySigning">AND early_Signing = #{earlySigning,jdbcType=INTEGER},</if>
        <if test="null!=lateSigning">AND late_Signing = #{lateSigning,jdbcType=INTEGER},</if>
        <if test="null!=normalSigning">AND normal_Signing = #{normalSigning,jdbcType=INTEGER},</if>
    </sql>
</mapper>