123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360 |
- <?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.mvc.dao.TAffiliatedunitMapper">
- <resultMap id="BaseResultMap" type="com.mvc.entity.TAffiliatedunit">
- <id column="ID" jdbcType="INTEGER" property="id" />
- <result column="UNIT_CODE" jdbcType="VARCHAR" property="unitCode" />
- <result column="UNIT_NAME" jdbcType="VARCHAR" property="unitName" />
- <result column="UNIT_TYPE" jdbcType="VARCHAR" property="unitType" />
- <result column="UNIT_AREA" jdbcType="VARCHAR" property="unitArea" />
- <result column="LEADER_NAME" jdbcType="VARCHAR" property="leaderName" />
- <result column="LEADER_TELE" jdbcType="VARCHAR" property="leaderTele" />
- <result column="USE_FLAG" jdbcType="CHAR" property="useFlag" />
- <result column="MEMO" jdbcType="VARCHAR" property="memo" />
- <result column="CREATE_MAN" jdbcType="VARCHAR" property="createMan" />
- <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
- <result column="CREATE_UNIT_CODE" jdbcType="VARCHAR" property="createUnitCode" />
- <result column="CREATE_UNIT_FALG" jdbcType="CHAR" property="createUnitFalg" />
- <result column="UNIT_NAME_PY" jdbcType="VARCHAR" property="unitNamePy" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <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 close=")" collection="criterion.value" item="listItem" open="(" 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="(" prefixOverrides="and" suffix=")">
- <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 close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List">
- ID, UNIT_CODE, UNIT_NAME, UNIT_TYPE, UNIT_AREA, LEADER_NAME, LEADER_TELE, USE_FLAG,
- MEMO, CREATE_MAN, CREATE_TIME, CREATE_UNIT_CODE, CREATE_UNIT_FALG, UNIT_NAME_PY
- </sql>
- <select id="selectByExample" parameterType="com.mvc.entity.TAffiliatedunitExample" resultMap="BaseResultMap">
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from t_affiliatedunit
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from t_affiliatedunit
- where ID = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from t_affiliatedunit
- where ID = #{id,jdbcType=INTEGER}
- </delete>
- <delete id="deleteByExample" parameterType="com.mvc.entity.TAffiliatedunitExample">
- delete from t_affiliatedunit
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.mvc.entity.TAffiliatedunit">
- insert into t_affiliatedunit (ID, UNIT_CODE, UNIT_NAME,
- UNIT_TYPE, UNIT_AREA, LEADER_NAME,
- LEADER_TELE, USE_FLAG, MEMO,
- CREATE_MAN, CREATE_TIME, CREATE_UNIT_CODE,
- CREATE_UNIT_FALG, UNIT_NAME_PY)
- values (#{id,jdbcType=INTEGER}, #{unitCode,jdbcType=VARCHAR}, #{unitName,jdbcType=VARCHAR},
- #{unitType,jdbcType=VARCHAR}, #{unitArea,jdbcType=VARCHAR}, #{leaderName,jdbcType=VARCHAR},
- #{leaderTele,jdbcType=VARCHAR}, #{useFlag,jdbcType=CHAR}, #{memo,jdbcType=VARCHAR},
- #{createMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createUnitCode,jdbcType=VARCHAR},
- #{createUnitFalg,jdbcType=CHAR}, #{unitNamePy,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.mvc.entity.TAffiliatedunit">
- insert into t_affiliatedunit
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- ID,
- </if>
- <if test="unitCode != null">
- UNIT_CODE,
- </if>
- <if test="unitName != null">
- UNIT_NAME,
- </if>
- <if test="unitType != null">
- UNIT_TYPE,
- </if>
- <if test="unitArea != null">
- UNIT_AREA,
- </if>
- <if test="leaderName != null">
- LEADER_NAME,
- </if>
- <if test="leaderTele != null">
- LEADER_TELE,
- </if>
- <if test="useFlag != null">
- USE_FLAG,
- </if>
- <if test="memo != null">
- MEMO,
- </if>
- <if test="createMan != null">
- CREATE_MAN,
- </if>
- <if test="createTime != null">
- CREATE_TIME,
- </if>
- <if test="createUnitCode != null">
- CREATE_UNIT_CODE,
- </if>
- <if test="createUnitFalg != null">
- CREATE_UNIT_FALG,
- </if>
- <if test="unitNamePy != null">
- UNIT_NAME_PY,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=INTEGER},
- </if>
- <if test="unitCode != null">
- #{unitCode,jdbcType=VARCHAR},
- </if>
- <if test="unitName != null">
- #{unitName,jdbcType=VARCHAR},
- </if>
- <if test="unitType != null">
- #{unitType,jdbcType=VARCHAR},
- </if>
- <if test="unitArea != null">
- #{unitArea,jdbcType=VARCHAR},
- </if>
- <if test="leaderName != null">
- #{leaderName,jdbcType=VARCHAR},
- </if>
- <if test="leaderTele != null">
- #{leaderTele,jdbcType=VARCHAR},
- </if>
- <if test="useFlag != null">
- #{useFlag,jdbcType=CHAR},
- </if>
- <if test="memo != null">
- #{memo,jdbcType=VARCHAR},
- </if>
- <if test="createMan != null">
- #{createMan,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createUnitCode != null">
- #{createUnitCode,jdbcType=VARCHAR},
- </if>
- <if test="createUnitFalg != null">
- #{createUnitFalg,jdbcType=CHAR},
- </if>
- <if test="unitNamePy != null">
- #{unitNamePy,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.mvc.entity.TAffiliatedunitExample" resultType="java.lang.Long">
- select count(*) from t_affiliatedunit
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- update t_affiliatedunit
- <set>
- <if test="record.id != null">
- ID = #{record.id,jdbcType=INTEGER},
- </if>
- <if test="record.unitCode != null">
- UNIT_CODE = #{record.unitCode,jdbcType=VARCHAR},
- </if>
- <if test="record.unitName != null">
- UNIT_NAME = #{record.unitName,jdbcType=VARCHAR},
- </if>
- <if test="record.unitType != null">
- UNIT_TYPE = #{record.unitType,jdbcType=VARCHAR},
- </if>
- <if test="record.unitArea != null">
- UNIT_AREA = #{record.unitArea,jdbcType=VARCHAR},
- </if>
- <if test="record.leaderName != null">
- LEADER_NAME = #{record.leaderName,jdbcType=VARCHAR},
- </if>
- <if test="record.leaderTele != null">
- LEADER_TELE = #{record.leaderTele,jdbcType=VARCHAR},
- </if>
- <if test="record.useFlag != null">
- USE_FLAG = #{record.useFlag,jdbcType=CHAR},
- </if>
- <if test="record.memo != null">
- MEMO = #{record.memo,jdbcType=VARCHAR},
- </if>
- <if test="record.createMan != null">
- CREATE_MAN = #{record.createMan,jdbcType=VARCHAR},
- </if>
- <if test="record.createTime != null">
- CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.createUnitCode != null">
- CREATE_UNIT_CODE = #{record.createUnitCode,jdbcType=VARCHAR},
- </if>
- <if test="record.createUnitFalg != null">
- CREATE_UNIT_FALG = #{record.createUnitFalg,jdbcType=CHAR},
- </if>
- <if test="record.unitNamePy != null">
- UNIT_NAME_PY = #{record.unitNamePy,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- update t_affiliatedunit
- set ID = #{record.id,jdbcType=INTEGER},
- UNIT_CODE = #{record.unitCode,jdbcType=VARCHAR},
- UNIT_NAME = #{record.unitName,jdbcType=VARCHAR},
- UNIT_TYPE = #{record.unitType,jdbcType=VARCHAR},
- UNIT_AREA = #{record.unitArea,jdbcType=VARCHAR},
- LEADER_NAME = #{record.leaderName,jdbcType=VARCHAR},
- LEADER_TELE = #{record.leaderTele,jdbcType=VARCHAR},
- USE_FLAG = #{record.useFlag,jdbcType=CHAR},
- MEMO = #{record.memo,jdbcType=VARCHAR},
- CREATE_MAN = #{record.createMan,jdbcType=VARCHAR},
- CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
- CREATE_UNIT_CODE = #{record.createUnitCode,jdbcType=VARCHAR},
- CREATE_UNIT_FALG = #{record.createUnitFalg,jdbcType=CHAR},
- UNIT_NAME_PY = #{record.unitNamePy,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.mvc.entity.TAffiliatedunit">
- update t_affiliatedunit
- <set>
- <if test="unitCode != null">
- UNIT_CODE = #{unitCode,jdbcType=VARCHAR},
- </if>
- <if test="unitName != null">
- UNIT_NAME = #{unitName,jdbcType=VARCHAR},
- </if>
- <if test="unitType != null">
- UNIT_TYPE = #{unitType,jdbcType=VARCHAR},
- </if>
- <if test="unitArea != null">
- UNIT_AREA = #{unitArea,jdbcType=VARCHAR},
- </if>
- <if test="leaderName != null">
- LEADER_NAME = #{leaderName,jdbcType=VARCHAR},
- </if>
- <if test="leaderTele != null">
- LEADER_TELE = #{leaderTele,jdbcType=VARCHAR},
- </if>
- <if test="useFlag != null">
- USE_FLAG = #{useFlag,jdbcType=CHAR},
- </if>
- <if test="memo != null">
- MEMO = #{memo,jdbcType=VARCHAR},
- </if>
- <if test="createMan != null">
- CREATE_MAN = #{createMan,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createUnitCode != null">
- CREATE_UNIT_CODE = #{createUnitCode,jdbcType=VARCHAR},
- </if>
- <if test="createUnitFalg != null">
- CREATE_UNIT_FALG = #{createUnitFalg,jdbcType=CHAR},
- </if>
- <if test="unitNamePy != null">
- UNIT_NAME_PY = #{unitNamePy,jdbcType=VARCHAR},
- </if>
- </set>
- where ID = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.mvc.entity.TAffiliatedunit">
- update t_affiliatedunit
- set UNIT_CODE = #{unitCode,jdbcType=VARCHAR},
- UNIT_NAME = #{unitName,jdbcType=VARCHAR},
- UNIT_TYPE = #{unitType,jdbcType=VARCHAR},
- UNIT_AREA = #{unitArea,jdbcType=VARCHAR},
- LEADER_NAME = #{leaderName,jdbcType=VARCHAR},
- LEADER_TELE = #{leaderTele,jdbcType=VARCHAR},
- USE_FLAG = #{useFlag,jdbcType=CHAR},
- MEMO = #{memo,jdbcType=VARCHAR},
- CREATE_MAN = #{createMan,jdbcType=VARCHAR},
- CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
- CREATE_UNIT_CODE = #{createUnitCode,jdbcType=VARCHAR},
- CREATE_UNIT_FALG = #{createUnitFalg,jdbcType=CHAR},
- UNIT_NAME_PY = #{unitNamePy,jdbcType=VARCHAR}
- where ID = #{id,jdbcType=INTEGER}
- </update>
- <select id="findTAffiliatedunitByCreateUnitCode" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from t_affiliatedunit
- where CREATE_UNIT_CODE = #{createUnitCode,jdbcType=VARCHAR} or CREATE_UNIT_CODE is null or CREATE_UNIT_CODE='1'
- </select>
- </mapper>
|