12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?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.fidms.web.mapper.Model3dMapper">
-
- <resultMap type="Model3d" id="Model3dResult">
- <result property="id" column="id" />
- <result property="name" column="name" />
- <result property="aircraftType" column="aircraft_type"/>
- <result property="model3dFile" column="model_3d_file" />
- <result property="model3dFilePath" column="model_3d_file_path" />
- <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="selectModel3dVo">
- select id, name, aircraft_type,model_3d_file, model_3d_file_path, create_by, create_time, update_by, update_time from bz_model_3d_t
- </sql>
- <select id="selectModel3dList" parameterType="Model3d" resultMap="Model3dResult">
- <include refid="selectModel3dVo"/>
- <where>
- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
- <if test="aircraftType!= null and aircraftType!=''">and aircraft_type = #{aircraftType}</if>
- <if test="model3dFile != null and model3dFile != ''"> and model_3d_file = #{model3dFile}</if>
- <if test="model3dFilePath != null and model3dFilePath != ''"> and model_3d_file_path = #{model3dFilePath}</if>
- </where>
- </select>
-
- <select id="selectModel3dById" parameterType="Long" resultMap="Model3dResult">
- <include refid="selectModel3dVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertModel3d" parameterType="Model3d" useGeneratedKeys="true" keyProperty="id">
- insert into bz_model_3d_t
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="name != null and name != ''">name,</if>
- <if test="aircraftType != null and aircraftType!=''">aircraft_type,</if>
- <if test="model3dFile != null and model3dFile != ''">model_3d_file,</if>
- <if test="model3dFilePath != null and model3dFilePath != ''">model_3d_file_path,</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="name != null and name != ''">#{name},</if>
- <if test="aircraftType!=null and aircraftType!=''">#{aircraftType},</if>
- <if test="model3dFile != null and model3dFile != ''">#{model3dFile},</if>
- <if test="model3dFilePath != null and model3dFilePath != ''">#{model3dFilePath},</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="updateModel3d" parameterType="Model3d">
- update bz_model_3d_t
- <trim prefix="SET" suffixOverrides=",">
- <if test="name != null and name != ''">name = #{name},</if>
- <if test="aircraftType!=null and aircraftType!=''">aircraft_type=#{aircraftType},</if>
- <if test="model3dFile != null and model3dFile != ''">model_3d_file = #{model3dFile},</if>
- <if test="model3dFilePath != null and model3dFilePath != ''">model_3d_file_path = #{model3dFilePath},</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="deleteModel3dById" parameterType="Long">
- delete from bz_model_3d_t where id = #{id}
- </delete>
- <delete id="deleteModel3dByIds" parameterType="String">
- delete from bz_model_3d_t where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- <select id="getOption" resultType="Map">
- select id, name from bz_model_3d_t order by id desc
- </select>
- </mapper>
|