123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <?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.kgraph.web.mapper.AirSystemInfoMapper">
-
- <resultMap type="AirSystemInfo" id="AirSystemInfoResult">
- <result property="id" column="id" />
- <result property="modelComponentId" column="model_component_id" />
- <result property="modelNumber" column="model_number" />
- <result property="airModelId" column="air_model_id" />
- <result property="airNumber" column="air_number" />
- <result property="serial" column="serial" />
- <result property="productionDate" column="production_date" />
- <result property="manufacturerInfo" column="manufacturer_info" />
- <result property="version" column="version" />
- <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="selectAirSystemInfoVo">
- select id, model_component_id, model_number, air_model_id, air_number, serial, production_date, manufacturer_info, version, create_by, create_time, update_by, update_time from t_air_system_info
- </sql>
- <select id="selectAirSystemInfoList" parameterType="AirSystemInfo" resultMap="AirSystemInfoResult">
- <include refid="selectAirSystemInfoVo"/>
- <where>
- <if test="modelComponentId != null "> and model_component_id = #{modelComponentId}</if>
- <if test="modelNumber != null and modelNumber != ''"> and model_number = #{modelNumber}</if>
- <if test="airModelId != null "> and air_model_id = #{airModelId}</if>
- <if test="airNumber != null and airNumber != ''"> and air_number = #{airNumber}</if>
- <if test="serial != null and serial != ''"> and serial = #{serial}</if>
- <if test="productionDate != null "> and production_date = #{productionDate}</if>
- <if test="manufacturerInfo != null and manufacturerInfo != ''"> and manufacturer_info = #{manufacturerInfo}</if>
- <if test="version != null and version != ''"> and version = #{version}</if>
- </where>
- </select>
-
- <select id="selectAirSystemInfoById" parameterType="Long" resultMap="AirSystemInfoResult">
- <include refid="selectAirSystemInfoVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertAirSystemInfo" parameterType="AirSystemInfo" useGeneratedKeys="true" keyProperty="id">
- insert into t_air_system_info
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="modelComponentId != null">model_component_id,</if>
- <if test="modelNumber != null">model_number,</if>
- <if test="airModelId != null">air_model_id,</if>
- <if test="airNumber != null">air_number,</if>
- <if test="serial != null">serial,</if>
- <if test="productionDate != null">production_date,</if>
- <if test="manufacturerInfo != null">manufacturer_info,</if>
- <if test="version != null">version,</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="modelComponentId != null">#{modelComponentId},</if>
- <if test="modelNumber != null">#{modelNumber},</if>
- <if test="airModelId != null">#{airModelId},</if>
- <if test="airNumber != null">#{airNumber},</if>
- <if test="serial != null">#{serial},</if>
- <if test="productionDate != null">#{productionDate},</if>
- <if test="manufacturerInfo != null">#{manufacturerInfo},</if>
- <if test="version != null">#{version},</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="updateAirSystemInfo" parameterType="AirSystemInfo">
- update t_air_system_info
- <trim prefix="SET" suffixOverrides=",">
- <if test="modelComponentId != null">model_component_id = #{modelComponentId},</if>
- <if test="modelNumber != null">model_number = #{modelNumber},</if>
- <if test="airModelId != null">air_model_id = #{airModelId},</if>
- <if test="airNumber != null">air_number = #{airNumber},</if>
- <if test="serial != null">serial = #{serial},</if>
- <if test="productionDate != null">production_date = #{productionDate},</if>
- <if test="manufacturerInfo != null">manufacturer_info = #{manufacturerInfo},</if>
- <if test="version != null">version = #{version},</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="deleteAirSystemInfoById" parameterType="Long">
- delete from t_air_system_info where id = #{id}
- </delete>
- <delete id="deleteAirSystemInfoByIds" parameterType="String">
- delete from t_air_system_info where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|