IMProductConfigureMapper.xml
1.6 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
41
42
43
44
45
<?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.web.dao.IMWebProductConfigureDao">
<select id="listProductConfigure" resultMap="resultProductConfigureBean" parameterType="String">
SELECT * from im_product_configure WHERE supplier_id = #{id}
</select>
<select id="totalProductConfigure" resultType="int" parameterType="String">
SELECT count(*) from im_product_configure WHERE supplier_id = #{id}
</select>
<insert id="addProductConfigure" parameterType="IMProductConfigureBean">
insert into im_product_configure (configure_id,configure_type,integral,money,freight,is_enable,supplier_id,supplier_name)
value(
#{configureId},
#{configureType},
#{integral},
#{money},
#{freight},
#{isEnable},
#{supplierId},
#{isEnable}
)
</insert>
<update id="updateProductConfigure" parameterType="IMProductConfigureBean">
update im_product_configure set
integral = #{integral},
money = #{money},
freight = #{freight},
is_enable = #{isEnable}
where configure_id = #{configureId} and configure_type = #{configureType}
</update>
<resultMap type="IMProductConfigureBean" id="resultProductConfigureBean">
<result column="configure_id" property="configureId" />
<result column="configure_type" property="configureType" />
<result column="integral" property="integral" />
<result column="money" property="money" />
<result column="freight" property="freight" />
<result column="is_enable" property="isEnable" />
</resultMap>
</mapper>