PointPositionMapper.xml
2.18 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.huaheng.pc.config.pointPosition.mapper.PointPositionMapper">
<resultMap id="BaseResultMap" type="com.huaheng.pc.config.pointPosition.domain.PointPosition">
<!--@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="positionName" jdbcType="VARCHAR" property="positionName" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="enable" jdbcType="VARCHAR" property="enable" />
<result column="created" jdbcType="VARCHAR" property="created" />
<result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
<result column="locationCode" jdbcType="VARCHAR" property="locationCode" />
<result column="containerCode" jdbcType="VARCHAR" property="containerCode" />
<result column="updated" jdbcType="TIMESTAMP" property="updated" />
</resultMap>
<update id="updateStatus">
UPDATE point_position set `status`=#{status} WHERE warehouseCode=#{warehouseCode} AND `positionName`=#{positionName}
</update>
<update id="setContainerCode">
UPDATE point_position set `containerCode`=#{containerCode} WHERE warehouseCode=#{warehouseCode} AND `positionName`=#{positionName}
</update>
<insert id="addList" parameterType="com.huaheng.pc.config.pointPosition.domain.PointPosition" keyProperty="id" useGeneratedKeys="true" >
INSERT INTO point_position(
positionName,
warehouseCode,
status,
created,
updated,
enable
)values
<foreach collection="containers" item="item" index="index" separator=",">
(
#{item.positionName},
#{item.warehouseCode},
#{item.status},
#{item.created},
#{item.updated},
#{item.enable}
)
</foreach>
</insert>
</mapper>