IMStoreMapper.xml
1.8 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
46
47
<?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.IMStoreDao">
<resultMap id="BaseResultMap" type="com.sibu.orderHelper.integral.model.IMStoreBean">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="contact" jdbcType="VARCHAR" property="contact" />
<result column="contact_phone" jdbcType="VARCHAR" property="contactPhone" />
<result column="freight_remark" jdbcType="VARCHAR" property="freightRemark"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
<result column="head_img" jdbcType="VARCHAR" property="headImg"/>
</resultMap>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
id, contact, contact_phone,name,freight_remark,address,head_img
from im_supplier
where id = #{id}
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.sibu.orderHelper.integral.model.IMStoreBean">
update im_supplier
<set>
<if test="contact != null">
contact = #{contact,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
contact_phone = #{contactPhone,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="freightRemark != null">
freight_remark = #{freightRemark,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="headImg != null">
head_img = #{headImg,jdbcType=VARCHAR},
</if>
create_dt = NOW()
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>