#
luxiaotao1123
2021-09-09 e1749547c76a5d8bae94e47d38d4d75b481610c1
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
<?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="zy.cloud.wms.manager.mapper.WrkLocSyncMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="zy.cloud.wms.manager.entity.WrkLocSync">
        <result column="matnr" property="matnr" />
        <result column="qty" property="qty" />
        <result column="state" property="state" />
        <result column="create_by" property="createBy" />
        <result column="create_time" property="createTime" />
        <result column="update_by" property="updateBy" />
        <result column="update_time" property="updateTime" />
    </resultMap>
 
    <select id="getSyncLocWrkCount" resultType="integer">
        select count(*) from asr_wrk_loc_sync;
    </select>
 
    <insert id="insertWrkLocSync">
        BEGIN
        <foreach collection="list" item="item" index="index">
            INSERT INTO asr_wrk_loc_sync (matnr, qty, state, create_time, create_by, update_time, update_by)
            VALUES (#{item.matnr,jdbcType=VARCHAR}, #{item.qty,jdbcType=DECIMAL}, 'N',
            #{item.createTime,jdbcType=TIMESTAMP},#{item.createBy,jdbcType=DECIMAL},
            #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=DECIMAL})
        </foreach>
        END;
    </insert>
 
    <delete id="clearWrkLocSync">
        DELETE FROM asr_wrk_loc_sync
    </delete>
</mapper>