<?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.boco.nbd.wios.manage.mapper.extdb.WarehouseLevenMapper" > <resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven" > <id column="id" property="id" jdbcType="INTEGER" /> <result column="appkey" property="appkey" jdbcType="VARCHAR" /> <result column="name" property="name" jdbcType="VARCHAR" /> <result column="parent_id" property="parentId" jdbcType="INTEGER" /> <result column="seq" property="seq" jdbcType="INTEGER" /> <result column="path_code" property="pathCode" jdbcType="VARCHAR" /> <result column="path_name" property="pathName" jdbcType="VARCHAR" /> <result column="status" property="status" jdbcType="INTEGER" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" /> <result column="create_account" property="createAccount" jdbcType="VARCHAR" /> <result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" /> <result column="modify_account" property="modifyAccount" jdbcType="VARCHAR" /> <result column="msg" property="msg" jdbcType="VARCHAR" /> </resultMap> <sql id="Example_Where_Clause" > <where > <foreach collection="oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause" > <where > <foreach collection="example.oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List" > id, appkey, name, parent_id, seq, path_code, path_name, status, create_time, create_account, modify_time, modify_account, msg </sql> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLevenCriteria" > select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from t_warehouse_leven <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null" > order by ${orderByClause} </if> </select> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > select <include refid="Base_Column_List" /> from t_warehouse_leven where id = #{id,jdbcType=INTEGER} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > delete from t_warehouse_leven where id = #{id,jdbcType=INTEGER} </delete> <delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLevenCriteria" > delete from t_warehouse_leven <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven" > insert into t_warehouse_leven (id, appkey, name, parent_id, seq, path_code, path_name, status, create_time, create_account, modify_time, modify_account, msg) values (#{id,jdbcType=INTEGER}, #{appkey,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{seq,jdbcType=INTEGER}, #{pathCode,jdbcType=VARCHAR}, #{pathName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR}, #{msg,jdbcType=VARCHAR}) </insert> <insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven" > insert into t_warehouse_leven <trim prefix="(" suffix=")" suffixOverrides="," > <if test="id != null" > id, </if> <if test="appkey != null" > appkey, </if> <if test="name != null" > name, </if> <if test="parentId != null" > parent_id, </if> <if test="seq != null" > seq, </if> <if test="pathCode != null" > path_code, </if> <if test="pathName != null" > path_name, </if> <if test="status != null" > status, </if> <if test="createTime != null" > create_time, </if> <if test="createAccount != null" > create_account, </if> <if test="modifyTime != null" > modify_time, </if> <if test="modifyAccount != null" > modify_account, </if> <if test="msg != null" > msg, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="id != null" > #{id,jdbcType=INTEGER}, </if> <if test="appkey != null" > #{appkey,jdbcType=VARCHAR}, </if> <if test="name != null" > #{name,jdbcType=VARCHAR}, </if> <if test="parentId != null" > #{parentId,jdbcType=INTEGER}, </if> <if test="seq != null" > #{seq,jdbcType=INTEGER}, </if> <if test="pathCode != null" > #{pathCode,jdbcType=VARCHAR}, </if> <if test="pathName != null" > #{pathName,jdbcType=VARCHAR}, </if> <if test="status != null" > #{status,jdbcType=INTEGER}, </if> <if test="createTime != null" > #{createTime,jdbcType=TIMESTAMP}, </if> <if test="createAccount != null" > #{createAccount,jdbcType=VARCHAR}, </if> <if test="modifyTime != null" > #{modifyTime,jdbcType=TIMESTAMP}, </if> <if test="modifyAccount != null" > #{modifyAccount,jdbcType=VARCHAR}, </if> <if test="msg != null" > #{msg,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLevenCriteria" resultType="java.lang.Integer" > select count(*) from t_warehouse_leven <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map" > update t_warehouse_leven <set > <if test="record.id != null" > id = #{record.id,jdbcType=INTEGER}, </if> <if test="record.appkey != null" > appkey = #{record.appkey,jdbcType=VARCHAR}, </if> <if test="record.name != null" > name = #{record.name,jdbcType=VARCHAR}, </if> <if test="record.parentId != null" > parent_id = #{record.parentId,jdbcType=INTEGER}, </if> <if test="record.seq != null" > seq = #{record.seq,jdbcType=INTEGER}, </if> <if test="record.pathCode != null" > path_code = #{record.pathCode,jdbcType=VARCHAR}, </if> <if test="record.pathName != null" > path_name = #{record.pathName,jdbcType=VARCHAR}, </if> <if test="record.status != null" > status = #{record.status,jdbcType=INTEGER}, </if> <if test="record.createTime != null" > create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.createAccount != null" > create_account = #{record.createAccount,jdbcType=VARCHAR}, </if> <if test="record.modifyTime != null" > modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}, </if> <if test="record.modifyAccount != null" > modify_account = #{record.modifyAccount,jdbcType=VARCHAR}, </if> <if test="record.msg != null" > msg = #{record.msg,jdbcType=VARCHAR}, </if> </set> <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map" > update t_warehouse_leven set id = #{record.id,jdbcType=INTEGER}, appkey = #{record.appkey,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR}, parent_id = #{record.parentId,jdbcType=INTEGER}, seq = #{record.seq,jdbcType=INTEGER}, path_code = #{record.pathCode,jdbcType=VARCHAR}, path_name = #{record.pathName,jdbcType=VARCHAR}, status = #{record.status,jdbcType=INTEGER}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_account = #{record.createAccount,jdbcType=VARCHAR}, modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}, modify_account = #{record.modifyAccount,jdbcType=VARCHAR}, msg = #{record.msg,jdbcType=VARCHAR} <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven" > update t_warehouse_leven <set > <if test="appkey != null" > appkey = #{appkey,jdbcType=VARCHAR}, </if> <if test="name != null" > name = #{name,jdbcType=VARCHAR}, </if> <if test="parentId != null" > parent_id = #{parentId,jdbcType=INTEGER}, </if> <if test="seq != null" > seq = #{seq,jdbcType=INTEGER}, </if> <if test="pathCode != null" > path_code = #{pathCode,jdbcType=VARCHAR}, </if> <if test="pathName != null" > path_name = #{pathName,jdbcType=VARCHAR}, </if> <if test="status != null" > status = #{status,jdbcType=INTEGER}, </if> <if test="createTime != null" > create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="createAccount != null" > create_account = #{createAccount,jdbcType=VARCHAR}, </if> <if test="modifyTime != null" > modify_time = #{modifyTime,jdbcType=TIMESTAMP}, </if> <if test="modifyAccount != null" > modify_account = #{modifyAccount,jdbcType=VARCHAR}, </if> <if test="msg != null" > msg = #{msg,jdbcType=VARCHAR}, </if> </set> where id = #{id,jdbcType=INTEGER} </update> <update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven" > update t_warehouse_leven set appkey = #{appkey,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR}, parent_id = #{parentId,jdbcType=INTEGER}, seq = #{seq,jdbcType=INTEGER}, path_code = #{pathCode,jdbcType=VARCHAR}, path_name = #{pathName,jdbcType=VARCHAR}, status = #{status,jdbcType=INTEGER}, create_time = #{createTime,jdbcType=TIMESTAMP}, create_account = #{createAccount,jdbcType=VARCHAR}, modify_time = #{modifyTime,jdbcType=TIMESTAMP}, modify_account = #{modifyAccount,jdbcType=VARCHAR}, msg = #{msg,jdbcType=VARCHAR} where id = #{id,jdbcType=INTEGER} </update> </mapper>