SysUserWarehouseMapper.xml 1.13 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.system.user.mapper.SysUserWarehouseMapper">
  <resultMap id="BaseResultMap" type="com.huaheng.pc.system.user.domain.SysUserWarehouse">
    <!--@mbg.generated-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="userId" jdbcType="INTEGER" property="userId" />
    <result column="warehouseId" jdbcType="INTEGER" property="warehouseId" />
    <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
  </resultMap>

  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, userId, warehouseId, warehouseCode
  </sql>

  <insert id="batchUserWarehouse">
    insert into sys_user_warehouse(userId, warehouseCode) values
    <foreach item="item" index="index" collection="userWarehouseList" separator=",">
      (#{item.userId},#{item.warehouseCode})
    </foreach>
  </insert>

  <delete id="deleteUserWarehouseByUserId" parameterType="Integer">
		delete from sys_user_warehouse where userId=#{userId}
	</delete>


</mapper>