IMRefundOrderImageMapper.xml
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?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.sibu.orderHelper.integral.dao.IMRefundOrderImageDao">
<resultMap id="BaseResultMap" type="com.sibu.orderHelper.integral.model.IMRefundOrderImage">
<id column="id" jdbcType="VARCHAR" property="id"/>
<result column="refund_id" jdbcType="VARCHAR" property="refundId"/>
<result column="url" jdbcType="VARCHAR" property="url"/>
<result column="sort" jdbcType="INTEGER" property="sort"/>
<result column="type" jdbcType="TINYINT" property="type"/>
</resultMap>
<sql id="Base_Column_List">
id, refund_id, url, sort, type
</sql>
<insert id="insert" parameterType="com.sibu.orderHelper.integral.model.IMRefundOrderImage">
INSERT INTO `im_refund_order_image`
(`id`,
`refund_id`,
`url`,
`sort`,
`type`)
VALUES
(#{id},
#{refundId},
#{url},
#{sort},
#{type});
</insert>
<select id="findByRefundIdAndType" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from im_refund_order_image where refund_id = #{refundId} and type = #{type}
</select>
<delete id="removeByRefundIdAndType">
delete from im_refund_order_image where refund_id = #{refundId} and type = #{type}
</delete>
</mapper>