<?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.ard.system.mapper.data.ArdModelManagementMapper">
|
|
<resultMap type="ArdModelManagement" id="ArdModelManagementResult">
|
<result property="id" column="id" />
|
<result property="modelName" column="model_name" />
|
<result property="longitude" column="longitude" />
|
<result property="latitude" column="latitude" />
|
<result property="height" column="height" />
|
<result property="proportion" column="proportion" />
|
<result property="modelUrl" column="model_url" />
|
</resultMap>
|
|
<sql id="selectArdModelManagementVo">
|
select id,
|
model_name,
|
longitude,
|
latitude,
|
height,
|
proportion,
|
model_url
|
from ard_model_management
|
</sql>
|
|
<select id="selectArdModelManagementList" parameterType="ArdModelManagement" resultMap="ArdModelManagementResult">
|
<include refid="selectArdModelManagementVo"/>
|
<where>
|
<if test="modelName != null and modelName != ''"> and model_name like concat('%', #{modelName}, '%')</if>
|
<if test="longitude != null "> and longitude = #{longitude}</if>
|
<if test="latitude != null "> and latitude = #{latitude}</if>
|
<if test="height != null "> and height = #{height}</if>
|
<if test="proportion != null "> and proportion = #{proportion}</if>
|
<if test="modelUrl != null "> and model_url = #{modelUrl}</if>
|
</where>
|
</select>
|
|
<select id="selectArdModelManagementById" parameterType="String" resultMap="ArdModelManagementResult">
|
<include refid="selectArdModelManagementVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertArdModelManagement" parameterType="ArdModelManagement">
|
insert into ard_model_management
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="modelName != null">model_name,</if>
|
<if test="longitude != null">longitude,</if>
|
<if test="latitude != null">latitude,</if>
|
<if test="height != null">height,</if>
|
<if test="proportion != null">proportion,</if>
|
<if test="modelUrl != null">model_url,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="modelName != null">#{modelName},</if>
|
<if test="longitude != null">#{longitude},</if>
|
<if test="latitude != null">#{latitude},</if>
|
<if test="height != null">#{height},</if>
|
<if test="proportion != null">#{proportion},</if>
|
<if test="modelUrl != null">#{modelUrl},</if>
|
</trim>
|
</insert>
|
|
<update id="updateArdModelManagement" parameterType="ArdModelManagement">
|
update ard_model_management
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="modelName != null">model_name = #{modelName},</if>
|
<if test="longitude != null">longitude = #{longitude},</if>
|
<if test="latitude != null">latitude = #{latitude},</if>
|
<if test="height != null">height = #{height},</if>
|
<if test="proportion != null">proportion = #{proportion},</if>
|
<if test="modelUrl != null">model_url = #{modelUrl},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteArdModelManagementById" parameterType="String">
|
delete from ard_model_management where id = #{id}
|
</delete>
|
|
<delete id="deleteArdModelManagementByIds" parameterType="String">
|
delete from ard_model_management where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|