|
|
@@ -1,9 +1,9 @@
|
|
|
<?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">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ktg.iscs.mapper.IsHardwareTypeMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="IsHardwareType" id="IsHardwareTypeResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="hardwareTypeCode" column="hardware_type_code" />
|
|
|
@@ -17,28 +17,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
+ <result property="level" column="level" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectIsHardwareTypeVo">
|
|
|
- select id, hardware_type_code, hardware_type_name, parent_type_id, ancestors, enable_flag, remark, del_flag, create_by, create_time, update_by, update_time from is_hardware_type
|
|
|
+ select id, hardware_type_code, hardware_type_name, parent_type_id, ancestors, enable_flag, remark, del_flag, create_by, create_time, update_by, update_time, level from is_hardware_type
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectIsHardwareTypeList" parameterType="IsHardwareType" resultMap="IsHardwareTypeResult">
|
|
|
<include refid="selectIsHardwareTypeVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="hardwareTypeCode != null and hardwareTypeCode != ''"> and hardware_type_code = #{hardwareTypeCode}</if>
|
|
|
<if test="hardwareTypeName != null and hardwareTypeName != ''"> and hardware_type_name like concat('%', #{hardwareTypeName}, '%')</if>
|
|
|
<if test="parentTypeId != null "> and parent_type_id = #{parentTypeId}</if>
|
|
|
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
|
|
|
<if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
|
|
|
+ <if test="level != null and level != ''"> and level = #{level}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectIsHardwareTypeById" parameterType="Long" resultMap="IsHardwareTypeResult">
|
|
|
<include refid="selectIsHardwareTypeVo"/>
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertIsHardwareType" parameterType="IsHardwareType" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into is_hardware_type
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -53,7 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
- </trim>
|
|
|
+ <if test="level != null">level,</if>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="hardwareTypeCode != null and hardwareTypeCode != ''">#{hardwareTypeCode},</if>
|
|
|
<if test="hardwareTypeName != null and hardwareTypeName != ''">#{hardwareTypeName},</if>
|
|
|
@@ -66,7 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
- </trim>
|
|
|
+ <if test="level != null">#{level},</if>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateIsHardwareType" parameterType="IsHardwareType">
|
|
|
@@ -83,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="level != null">level = #{level},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
@@ -92,9 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteIsHardwareTypeByIds" parameterType="String">
|
|
|
- delete from is_hardware_type where id in
|
|
|
+ delete from is_hardware_type where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-</mapper>
|
|
|
+</mapper>
|