PointsMapper.xml
2.45 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?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.huaheng.pc.config.points.mapper.PointsMapper">
<resultMap id="BaseResultMap" type="com.huaheng.pc.config.points.domain.Points">
<!--@mbg.generated-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
<result column="companyCode" jdbcType="VARCHAR" property="companyCode" />
<result column="goodsShelfNo" jdbcType="VARCHAR" property="goodsShelfNo" />
<result column="intX" jdbcType="VARCHAR" property="intX" />
<result column="intY" jdbcType="VARCHAR" property="intY" />
<result column="oIntX" jdbcType="VARCHAR" property="oIntX" />
<result column="oIntY" jdbcType="VARCHAR" property="oIntY" />
<result column="num" jdbcType="INTEGER" property="num" />
<result column="isEmpty" jdbcType="INTEGER" property="isEmpty" />
<result column="isEnable" jdbcType="INTEGER" property="isEnable" />
<result column="isLocked" jdbcType="INTEGER" property="isLocked" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
warehouseCode,companyCode,goodsShelfNo,intX,intY,oIntX,oIntY,num,isEmpty,isEnable,isLocked
</sql>
<update id="updatePoints">
UPDATE points
<set>
<if test="isLocked != null">
isLocked = #{isLocked, jdbcType=INTEGER},
</if>
<if test="intX != null">
intX = #{intX, jdbcType=VARCHAR},
</if>
<if test="intY != null">
intY = #{intY, jdbcType=VARCHAR},
</if>
<if test="oIntX != null">
oIntX = #{oIntX, jdbcType=VARCHAR},
</if>
<if test="oIntY != null">
oIntY = #{oIntY, jdbcType=VARCHAR},
</if>
<if test="num != null">
num = #{num, jdbcType=INTEGER},
</if>
</set>
where goodsShelfNo=#{goodsShelfNo} and warehouseCode=#{warehouseCode}
</update>
<update id="updateAll">
update points set isLocked = 0
</update>
<update id="updateIsEmpty">
update points set isEmpty = #{isEmpty}
WHERE goodsShelfNo IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</update>
</mapper>