郑永安
2023-06-19 2fcd97552d16718cc7997629fd637a73a5a4483f
src/main/java/com/gk/firework/Mapper/mybatis/SelfCheckReportMapper.xml
对比新文件
@@ -0,0 +1,147 @@
<?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.gk.firework.Mapper.SelfCheckReportMapper">
    <resultMap id="SelfCheckReportMappper" type="com.gk.firework.Domain.SelfCheckReport">
        <id column="id" property="id" jdbcType="BIGINT"/>
        <result column="eid" property="eid" jdbcType="BIGINT"/>
        <result column="yhlevel" property="yhlevel" jdbcType="TINYINT"/>
        <result column="status" property="status" jdbcType="TINYINT"/>
        <result column="price" property="price" jdbcType="DECIMAL"/>
        <result column="checktime" property="checktime" jdbcType="TIMESTAMP"/>
        <result column="endtime" property="endtime" jdbcType="TIMESTAMP"/>
        <result column="ename" property="ename" jdbcType="VARCHAR"/>
        <result column="chargeperson" property="chargeperson" jdbcType="VARCHAR"/>
        <result column="yhdesc" property="yhdesc" jdbcType="VARCHAR"/>
        <result column="solution" property="solution" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="all_columns">
        id,eid,status,yhlevel,price,checktime,endtime,ename,chargeperson,yhdesc,solution
    </sql>
    <select id="selectByReportId" resultMap="SelfCheckReportMappper" parameterType="java.lang.Long">
        select
        <include refid="all_columns"/>
        from selfcheckreport
        where id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectReportListByCondition" resultMap="SelfCheckReportMappper">
        select
        <include refid="all_columns"/>
        from selfcheckreport
        where 1=1
        <if test="eid > 0 ">
            and eid = #{eid,jdbcType=BIGINT}
        </if>
        <if test="status > 0">
            and status = #{status,jdbcType=TINYINT}
        </if>
        <if test="yhlevel > 0">
            and yhlevel = #{yhlevel,jdbcType=TINYINT}
        </if>
    </select>
    <select id="selectReportListByAllCondition" resultMap="SelfCheckReportMappper">
        select
        <include refid="all_columns"/>
        from selfcheckreport
        <where>
            1=1
            <if test="eidList != null and eidList.size() > 0 ">
                and eid in
                <foreach collection="eidList" item="eeid" index="index" open="(" close=")" separator=",">
                    #{eeid}
                </foreach>
            </if>
            <if test="status > 0">
                and status = #{status}
            </if>
            <if test="yhlevel > 0">
                and yhlevel = #{yhlevel}
            </if>
            <if test="startTime != null">
                and checktime >= #{startTime}
            </if>
            <if test="endTime != null">
                and checktime &lt;= #{endTime}
            </if>
        </where>
    </select>
    <select id="selectReportListWithEnterpriseIdList" resultMap="SelfCheckReportMappper">
        select
        <include refid="all_columns"/>
        from selfcheckreport
        <where>
            1=1
            <if test="eidList != null and eidList.size() > 0 ">
                and eid in
                <foreach collection="eidList" item="eeid" index="index" open="(" close=")" separator=",">
                    #{eeid}
                </foreach>
            </if>
            <if test="status > 0">
                and status = #{status}
            </if>
            <if test="yhlevel > 0">
                and yhlevel = #{yhlevel}
            </if>
            <if test="startTime != null">
                and checktime >= #{startTime}
            </if>
            <if test="endTime != null">
                and checktime &lt;= #{endTime}
            </if>
        </where>
    </select>
    <select id="selectReportListWithoutEnterpriseIdList" resultMap="SelfCheckReportMappper">
        select
        <include refid="all_columns"/>
        from selfcheckreport
        <where>
            1=1
            <if test="status > 0">
                and status = #{status}
            </if>
            <if test="yhlevel > 0">
                and yhlevel = #{yhlevel}
            </if>
            <if test="startTime != null">
                and checktime >= #{startTime}
            </if>
            <if test="endTime != null">
                and checktime &lt;= #{endTime}
            </if>
        </where>
    </select>
    <update id="updateReport" parameterType="com.gk.firework.Domain.SelfCheckReport">
        update selfcheckreport
        <set>
            <if test="yhlevel > 0">
                yhlevel = #{yhlevel,jdbcType=TINYINT},
            </if>
            <if test="status > 0">
                status = #{status,jdbcType=TINYINT},
            </if>
            <if test="price != null">
                price = #{price,jdbcType=DECIMAL},
            </if>
            <if test="endtime != null">
                endtime = #{endtime,jdbcType=TIMESTAMP},
            </if>
            <if test="chargeperson != null">
                chargeperson = #{chargeperson,jdbcType=VARCHAR},
            </if>
            <if test="yhdesc != null">
                yhdesc = #{yhdesc,jdbcType=VARCHAR},
            </if>
            <if test="solution != null">
                solution = #{solution,jdbcType=VARCHAR},
            </if>
        </set>
        WHERE id = #{id,jdbcType=BIGINT}
    </update>
</mapper>