<?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.landtool.lanbase.modules.res.dao.ResStorageRelaTionMapper">
|
<resultMap id="BaseResultMap" type="com.landtool.lanbase.modules.res.entity.Res_Storage_Relation">
|
<result column="RESOURCEID" property="resourceid" jdbcType="INTEGER" />
|
<result column="FILENAME" property="filename" jdbcType="VARCHAR" />
|
<result column="ISGENERATION" property="isgeneration" jdbcType="INTEGER" />
|
<result column="ISSTORAGE" property="isstorage" jdbcType="INTEGER" />
|
</resultMap>
|
|
<select id="selectByResourceidAndFileName" resultMap="BaseResultMap">
|
select * from RES_STORAGE_RELATION where RESOURCEID=#{resourceid} and FILENAME=#{filename}
|
</select>
|
|
<insert id="insert" parameterType="com.landtool.lanbase.modules.res.entity.Res_Storage_Relation">
|
insert into RES_STORAGE_RELATION
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="resourceid != null and resourceid!=''">
|
RESOURCEID,
|
</if>
|
<if test="isstorage != null and isstorage!=''">
|
ISSTORAGE,
|
</if>
|
<if test="isgeneration != null and isgeneration!=''">
|
ISGENERATION,
|
</if>
|
<if test="filename != null and filename!=''">
|
FILENAME,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="resourceid != null and resourceid!=''">
|
#{resourceid,jdbcType=INTEGER},
|
</if>
|
<if test="isstorage != null and isstorage!=''">
|
#{isstorage,jdbcType=INTEGER},
|
</if>
|
<if test="isgeneration != null and isgeneration!=''">
|
#{isgeneration,jdbcType=INTEGER},
|
</if>
|
<if test="filename != null and filename!=''">
|
#{filename,jdbcType=VARCHAR},
|
</if>
|
</trim>
|
</insert>
|
|
<update id="update" parameterType="com.landtool.lanbase.modules.res.entity.Res_Storage_Relation">
|
UPDATE RES_STORAGE_RELATION
|
<set>
|
<if test="isgeneration != null and isgeneration!=''">
|
ISGENERATION = #{isgeneration,jdbcType=INTEGER},
|
</if>
|
<if test="isstorage != null and isstorage!=''">
|
ISSTORAGE = #{isstorage,jdbcType=INTEGER},
|
</if>
|
<if test="filename != null and filename!=''">
|
FILENAME = #{filename,jdbcType=VARCHAR},
|
</if>
|
</set>
|
WHERE RESOURCEID = #{resourceid,jdbcType=INTEGER}
|
</update>
|
|
</mapper>
|