MaterialGroupMapper.xml 1.84 KB
<?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.materialGroup.mapper.MaterialGroupMapper">
    
    <resultMap type="com.huaheng.pc.config.materialGroup.domain.ERPMaterialGroup" id="erpMaterialGroupResult">
        <result property="id"    column="id"    />
        <result property="iid"    column="iid"    />
        <result property="createtime"    column="createtime"    />
        <result property="createuser"    column="createuser"    />
        <result property="groupguid"    column="groupguid"    />
        <result property="erpguidguid"    column="erpguidguid"    />
        <result property="erppareneguid"    column="erppareneguid"    />
        <result property="groupname"    column="groupname"    />
        <result property="groupcode"    column="groupcode"    />
        <result property="isdelete"    column="isdelete"    />
        <result property="parentguid"    column="parentguid"    />
    </resultMap>
	<sql id="selectERPMaterialGroupVo">
        select id, iid, createtime, createuser,groupguid,erpguidguid,erppareneguid,groupname,groupcode,isdelete,parentguid from material_group
    </sql>

    <insert id="insertBatch" parameterType="java.util.List">
        INSERT INTO material_group
        (iid, createtime, createuser,groupguid,erpguidguid,erppareneguid,groupname,groupcode,isdelete,parentguid) VALUES
        <foreach collection="list" item="item" separator=",">
            (
            #{item.iid},#{item.createtime},#{item.createuser},#{item.groupguid},#{item.erpguidguid},#{item.erppareneguid},#{item.groupname},#{item.groupcode},#{item.isdelete},#{item.parentguid}
            )
        </foreach>
    </insert>
    <update id="truncateTable">
        truncate table material_group
    </update>
</mapper>