123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <?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="dao.SysOrgMapper" >
- <resultMap id="BaseResultMap" type="model.SysOrg" >
- <id column="id" property="id" jdbcType="INTEGER" />
- <result column="org_code" property="orgCode" jdbcType="VARCHAR" />
- <result column="org_name" property="orgName" jdbcType="VARCHAR" />
- <result column="description" property="description" jdbcType="VARCHAR" />
- <result column="parent_id" property="parentId" jdbcType="INTEGER" />
- <result column="create_user" property="createUser" jdbcType="VARCHAR" />
- <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
- <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
- <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, org_code, org_name, description, parent_id, create_user, create_date, update_user,
- update_date
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from sys_org
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from sys_org
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="model.SysOrg" >
- insert into sys_org (id, org_code, org_name,
- description, parent_id, create_user,
- create_date, update_user, update_date
- )
- values (#{id,jdbcType=INTEGER}, #{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR},
- #{description,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{createUser,jdbcType=VARCHAR},
- #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=VARCHAR}, #{updateDate,jdbcType=TIMESTAMP}
- )
- </insert>
- <insert id="insertSelective" parameterType="model.SysOrg" >
- insert into sys_org
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="orgCode != null" >
- org_code,
- </if>
- <if test="orgName != null" >
- org_name,
- </if>
- <if test="description != null" >
- description,
- </if>
- <if test="parentId != null" >
- parent_id,
- </if>
- <if test="createUser != null" >
- create_user,
- </if>
- <if test="createDate != null" >
- create_date,
- </if>
- <if test="updateUser != null" >
- update_user,
- </if>
- <if test="updateDate != null" >
- update_date,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=INTEGER},
- </if>
- <if test="orgCode != null" >
- #{orgCode,jdbcType=VARCHAR},
- </if>
- <if test="orgName != null" >
- #{orgName,jdbcType=VARCHAR},
- </if>
- <if test="description != null" >
- #{description,jdbcType=VARCHAR},
- </if>
- <if test="parentId != null" >
- #{parentId,jdbcType=INTEGER},
- </if>
- <if test="createUser != null" >
- #{createUser,jdbcType=VARCHAR},
- </if>
- <if test="createDate != null" >
- #{createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUser != null" >
- #{updateUser,jdbcType=VARCHAR},
- </if>
- <if test="updateDate != null" >
- #{updateDate,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="model.SysOrg" >
- update sys_org
- <set >
- <if test="orgCode != null" >
- org_code = #{orgCode,jdbcType=VARCHAR},
- </if>
- <if test="orgName != null" >
- org_name = #{orgName,jdbcType=VARCHAR},
- </if>
- <if test="description != null" >
- description = #{description,jdbcType=VARCHAR},
- </if>
- <if test="parentId != null" >
- parent_id = #{parentId,jdbcType=INTEGER},
- </if>
- <if test="createUser != null" >
- create_user = #{createUser,jdbcType=VARCHAR},
- </if>
- <if test="createDate != null" >
- create_date = #{createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUser != null" >
- update_user = #{updateUser,jdbcType=VARCHAR},
- </if>
- <if test="updateDate != null" >
- update_date = #{updateDate,jdbcType=TIMESTAMP},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="model.SysOrg" >
- update sys_org
- set org_code = #{orgCode,jdbcType=VARCHAR},
- org_name = #{orgName,jdbcType=VARCHAR},
- description = #{description,jdbcType=VARCHAR},
- parent_id = #{parentId,jdbcType=INTEGER},
- create_user = #{createUser,jdbcType=VARCHAR},
- create_date = #{createDate,jdbcType=TIMESTAMP},
- update_user = #{updateUser,jdbcType=VARCHAR},
- update_date = #{updateDate,jdbcType=TIMESTAMP}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|