123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?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.phm.manage.mapper.MaintenanceTestControlMapper">
-
- <resultMap type="MaintenanceTestControl" id="MaintenanceTestControlResult">
- <result property="id" column="id" />
- <result property="maintenanceControl" column="maintenance_control" />
- <result property="object" column="object" />
- <result property="name" column="name" />
- <result property="applicationDoc" column="application_doc" />
- <result property="faultData" column="fault_data" />
- <result property="version" column="version" />
- <result property="isDelete" column="is_delete" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- </resultMap>
- <sql id="selectMaintenanceTestControlVo">
- select id, maintenance_control, object, name, application_doc, fault_data, version, is_delete, create_by, create_time, update_by, update_time from phm_maintenance_test_control
- </sql>
- <select id="selectMaintenanceTestControlList" parameterType="MaintenanceTestControl" resultMap="MaintenanceTestControlResult">
- <include refid="selectMaintenanceTestControlVo"/>
- <where>
- <if test="maintenanceControl != null and maintenanceControl != ''"> and maintenance_control = #{maintenanceControl}</if>
- <if test="object != null and object != ''"> and object = #{object}</if>
- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
- <if test="applicationDoc != null and applicationDoc != ''"> and application_doc = #{applicationDoc}</if>
- <if test="faultData != null and faultData != ''"> and fault_data = #{faultData}</if>
- <if test="version != null and version != ''"> and version = #{version}</if>
- <if test="isDelete != null "> and is_delete = #{isDelete}</if>
- <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- </where>
- </select>
-
- <select id="selectMaintenanceTestControlById" parameterType="Long" resultMap="MaintenanceTestControlResult">
- <include refid="selectMaintenanceTestControlVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertMaintenanceTestControl" parameterType="MaintenanceTestControl">
- insert into phm_maintenance_test_control
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="maintenanceControl != null">maintenance_control,</if>
- <if test="object != null">object,</if>
- <if test="name != null">name,</if>
- <if test="applicationDoc != null">application_doc,</if>
- <if test="faultData != null">fault_data,</if>
- <if test="version != null">version,</if>
- <if test="isDelete != null">is_delete,</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>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="maintenanceControl != null">#{maintenanceControl},</if>
- <if test="object != null">#{object},</if>
- <if test="name != null">#{name},</if>
- <if test="applicationDoc != null">#{applicationDoc},</if>
- <if test="faultData != null">#{faultData},</if>
- <if test="version != null">#{version},</if>
- <if test="isDelete != null">#{isDelete},</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>
- </trim>
- </insert>
- <update id="updateMaintenanceTestControl" parameterType="MaintenanceTestControl">
- update phm_maintenance_test_control
- <trim prefix="SET" suffixOverrides=",">
- <if test="maintenanceControl != null">maintenance_control = #{maintenanceControl},</if>
- <if test="object != null">object = #{object},</if>
- <if test="name != null">name = #{name},</if>
- <if test="applicationDoc != null">application_doc = #{applicationDoc},</if>
- <if test="faultData != null">fault_data = #{faultData},</if>
- <if test="version != null">version = #{version},</if>
- <if test="isDelete != null">is_delete = #{isDelete},</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>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteMaintenanceTestControlById" parameterType="Long">
- delete from phm_maintenance_test_control where id = #{id}
- </delete>
- <delete id="deleteMaintenanceTestControlByIds" parameterType="String">
- delete from phm_maintenance_test_control where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|