88 lines
3.1 KiB
XML
88 lines
3.1 KiB
XML
|
<?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.zhwl.store.mapper.HuifuSotreMapper">
|
||
|
|
||
|
<resultMap type="HuifuSotre" id="HuifuSotreResult">
|
||
|
<result property="id" column="id"/>
|
||
|
<result property="storeId" column="storeId"/>
|
||
|
<result property="huifuId" column="huifuId"/>
|
||
|
<result property="percentage" column="percentage"/>
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectHuifuSotreVo">
|
||
|
select id, storeId, huifuId, percentage
|
||
|
from huifu_sotre
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectHuifuSotreList" parameterType="HuifuSotre" resultMap="HuifuSotreResult">
|
||
|
<include refid="selectHuifuSotreVo"/>
|
||
|
<where>
|
||
|
<if test="storeId != null ">
|
||
|
and storeId = #{storeId}
|
||
|
</if>
|
||
|
<if test="huifuId != null ">
|
||
|
and huifuId = #{huifuId}
|
||
|
</if>
|
||
|
<if test="percentage != null ">
|
||
|
and percentage = #{percentage}
|
||
|
</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectHuifuSotreById" parameterType="Long"
|
||
|
resultMap="HuifuSotreResult">
|
||
|
<include refid="selectHuifuSotreVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertHuifuSotre" parameterType="HuifuSotre" useGeneratedKeys="true"
|
||
|
keyProperty="id">
|
||
|
insert into huifu_sotre
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="storeId != null">storeId,
|
||
|
</if>
|
||
|
<if test="huifuId != null">huifuId,
|
||
|
</if>
|
||
|
<if test="percentage != null">percentage,
|
||
|
</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="storeId != null">#{storeId},
|
||
|
</if>
|
||
|
<if test="huifuId != null">#{huifuId},
|
||
|
</if>
|
||
|
<if test="percentage != null">#{percentage},
|
||
|
</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateHuifuSotre" parameterType="HuifuSotre">
|
||
|
update huifu_sotre
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="storeId != null">storeId =
|
||
|
#{storeId},
|
||
|
</if>
|
||
|
<if test="huifuId != null">huifuId =
|
||
|
#{huifuId},
|
||
|
</if>
|
||
|
<if test="percentage != null">percentage =
|
||
|
#{percentage},
|
||
|
</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteHuifuSotreById" parameterType="Long">
|
||
|
delete from huifu_sotre where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteHuifuSotreByIds" parameterType="String">
|
||
|
delete from huifu_sotre where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|