<?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.gk.firework.Mapper.StandardEducationLegerMapper" >
|
<resultMap id="BaseResultMap" type="com.gk.firework.Domain.StandardEducationLeger" >
|
<!-- -->
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="enterprisename" property="enterprisename" jdbcType="VARCHAR" />
|
<result column="enterprisenumber" property="enterprisenumber" jdbcType="VARCHAR" />
|
<result column="starttime" property="starttime" jdbcType="TIMESTAMP" />
|
<result column="endtime" property="endtime" jdbcType="TIMESTAMP" />
|
<result column="location" property="location" jdbcType="VARCHAR" />
|
<result column="theme" property="theme" jdbcType="VARCHAR" />
|
<result column="teacher" property="teacher" jdbcType="VARCHAR" />
|
<result column="participant" property="participant" jdbcType="VARCHAR" />
|
<result column="content" property="content" jdbcType="VARCHAR" />
|
<result column="filename" property="filename" jdbcType="VARCHAR" />
|
<result column="url" property="url" jdbcType="VARCHAR" />
|
<result column="createtime" property="createtime" jdbcType="TIMESTAMP" />
|
<result column="createby" property="createby" jdbcType="BIGINT" />
|
<result column="createbyname" property="createbyname" jdbcType="VARCHAR" />
|
<result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
|
<result column="updateby" property="updateby" jdbcType="BIGINT" />
|
<result column="updatebyname" property="updatebyname" jdbcType="VARCHAR" />
|
<result column="validflag" property="validflag" jdbcType="BIT" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
<!-- -->
|
id, enterprisename, enterprisenumber, starttime, endtime, location, theme, teacher,
|
participant, content, filename, url, createtime, createby, createbyname, updatetime,
|
updateby, updatebyname, validflag
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
<!-- -->
|
select
|
<include refid="Base_Column_List" />
|
from standardeducationleger
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
<select id="selectPages" resultType="com.gk.firework.Domain.StandardEducationLeger">
|
|
select sel.*
|
from standardeducationleger as sel
|
left join enterprise as e on e.enterprisenumber = sel.enterprisenumber
|
where sel.validflag = 1
|
<choose>
|
<when test="params.enterprisenumber != null and params.enterprisenumber !=''">
|
and sel.enterprisenumber = #{params.enterprisenumber}
|
</when>
|
<otherwise>
|
<if test="params.enterprisename != null and params.enterprisename != ''">
|
and e.enterprisename like concat("%",#{params.enterprisename},"%")
|
</if>
|
<if test="params.safetysupervision != null and params.safetysupervision != ''">
|
and e.safetysupervision = #{params.safetysupervision}
|
</if>
|
<if test="params.province != null and params.province != ''">
|
and e.province = #{params.province}
|
</if>
|
<if test="params.city != null and params.city != ''">
|
and e.city = #{params.city}
|
</if>
|
<if test="params.district != null and params.district != ''">
|
and e.district = #{params.district}
|
</if>
|
<if test="params.street != null and params.street != ''">
|
and e.street = #{params.street}
|
</if>
|
<if test="params.committee != null and params.committee != ''">
|
and e.committee = #{params.committee}
|
</if>
|
</otherwise>
|
</choose>
|
<if test="params.filterProvince != null and params.filterProvince != ''">
|
and e.province = #{params.filterProvince}
|
</if>
|
<if test="params.filterCity != null and params.filterCity != ''">
|
and e.city = #{params.filterCity}
|
</if>
|
<if test="params.filterDistrict != null and params.filterDistrict != ''">
|
and e.district = #{params.filterDistrict}
|
</if>
|
<if test="params.filterStreet != null and params.filterStreet != ''">
|
and e.street = #{params.filterStreet}
|
</if>
|
<if test="params.filterCommittee != null and params.filterCommittee != ''">
|
and e.committee = #{params.filterCommittee}
|
</if>
|
order by sel.createtime
|
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
<!-- -->
|
delete from standardeducationleger
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.gk.firework.Domain.StandardEducationLeger" >
|
<!-- -->
|
insert into standardeducationleger (id, enterprisename, enterprisenumber,
|
starttime, endtime, location,
|
theme, teacher, participant,
|
content, filename, url,
|
createtime, createby, createbyname,
|
updatetime, updateby, updatebyname,
|
validflag)
|
values (#{id,jdbcType=BIGINT}, #{enterprisename,jdbcType=VARCHAR}, #{enterprisenumber,jdbcType=VARCHAR},
|
#{starttime,jdbcType=TIMESTAMP}, #{endtime,jdbcType=TIMESTAMP}, #{location,jdbcType=VARCHAR},
|
#{theme,jdbcType=VARCHAR}, #{teacher,jdbcType=VARCHAR}, #{participant,jdbcType=VARCHAR},
|
#{content,jdbcType=VARCHAR}, #{filename,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
|
#{createtime,jdbcType=TIMESTAMP}, #{createby,jdbcType=BIGINT}, #{createbyname,jdbcType=VARCHAR},
|
#{updatetime,jdbcType=TIMESTAMP}, #{updateby,jdbcType=BIGINT}, #{updatebyname,jdbcType=VARCHAR},
|
#{validflag,jdbcType=BIT})
|
</insert>
|
<insert id="insertSelective" parameterType="com.gk.firework.Domain.StandardEducationLeger" >
|
<!-- -->
|
insert into standardeducationleger
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
id,
|
</if>
|
<if test="enterprisename != null" >
|
enterprisename,
|
</if>
|
<if test="enterprisenumber != null" >
|
enterprisenumber,
|
</if>
|
<if test="starttime != null" >
|
starttime,
|
</if>
|
<if test="endtime != null" >
|
endtime,
|
</if>
|
<if test="location != null" >
|
location,
|
</if>
|
<if test="theme != null" >
|
theme,
|
</if>
|
<if test="teacher != null" >
|
teacher,
|
</if>
|
<if test="participant != null" >
|
participant,
|
</if>
|
<if test="content != null" >
|
content,
|
</if>
|
<if test="filename != null" >
|
filename,
|
</if>
|
<if test="url != null" >
|
url,
|
</if>
|
<if test="createtime != null" >
|
createtime,
|
</if>
|
<if test="createby != null" >
|
createby,
|
</if>
|
<if test="createbyname != null" >
|
createbyname,
|
</if>
|
<if test="updatetime != null" >
|
updatetime,
|
</if>
|
<if test="updateby != null" >
|
updateby,
|
</if>
|
<if test="updatebyname != null" >
|
updatebyname,
|
</if>
|
<if test="validflag != null" >
|
validflag,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
#{id,jdbcType=BIGINT},
|
</if>
|
<if test="enterprisename != null" >
|
#{enterprisename,jdbcType=VARCHAR},
|
</if>
|
<if test="enterprisenumber != null" >
|
#{enterprisenumber,jdbcType=VARCHAR},
|
</if>
|
<if test="starttime != null" >
|
#{starttime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="endtime != null" >
|
#{endtime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="location != null" >
|
#{location,jdbcType=VARCHAR},
|
</if>
|
<if test="theme != null" >
|
#{theme,jdbcType=VARCHAR},
|
</if>
|
<if test="teacher != null" >
|
#{teacher,jdbcType=VARCHAR},
|
</if>
|
<if test="participant != null" >
|
#{participant,jdbcType=VARCHAR},
|
</if>
|
<if test="content != null" >
|
#{content,jdbcType=VARCHAR},
|
</if>
|
<if test="filename != null" >
|
#{filename,jdbcType=VARCHAR},
|
</if>
|
<if test="url != null" >
|
#{url,jdbcType=VARCHAR},
|
</if>
|
<if test="createtime != null" >
|
#{createtime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createby != null" >
|
#{createby,jdbcType=BIGINT},
|
</if>
|
<if test="createbyname != null" >
|
#{createbyname,jdbcType=VARCHAR},
|
</if>
|
<if test="updatetime != null" >
|
#{updatetime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateby != null" >
|
#{updateby,jdbcType=BIGINT},
|
</if>
|
<if test="updatebyname != null" >
|
#{updatebyname,jdbcType=VARCHAR},
|
</if>
|
<if test="validflag != null" >
|
#{validflag,jdbcType=BIT},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.StandardEducationLeger" >
|
<!-- -->
|
update standardeducationleger
|
<set >
|
<if test="enterprisename != null" >
|
enterprisename = #{enterprisename,jdbcType=VARCHAR},
|
</if>
|
<if test="enterprisenumber != null" >
|
enterprisenumber = #{enterprisenumber,jdbcType=VARCHAR},
|
</if>
|
<if test="starttime != null" >
|
starttime = #{starttime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="endtime != null" >
|
endtime = #{endtime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="location != null" >
|
location = #{location,jdbcType=VARCHAR},
|
</if>
|
<if test="theme != null" >
|
theme = #{theme,jdbcType=VARCHAR},
|
</if>
|
<if test="teacher != null" >
|
teacher = #{teacher,jdbcType=VARCHAR},
|
</if>
|
<if test="participant != null" >
|
participant = #{participant,jdbcType=VARCHAR},
|
</if>
|
<if test="content != null" >
|
content = #{content,jdbcType=VARCHAR},
|
</if>
|
<if test="filename != null" >
|
filename = #{filename,jdbcType=VARCHAR},
|
</if>
|
<if test="url != null" >
|
url = #{url,jdbcType=VARCHAR},
|
</if>
|
<if test="createtime != null" >
|
createtime = #{createtime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createby != null" >
|
createby = #{createby,jdbcType=BIGINT},
|
</if>
|
<if test="createbyname != null" >
|
createbyname = #{createbyname,jdbcType=VARCHAR},
|
</if>
|
<if test="updatetime != null" >
|
updatetime = #{updatetime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateby != null" >
|
updateby = #{updateby,jdbcType=BIGINT},
|
</if>
|
<if test="updatebyname != null" >
|
updatebyname = #{updatebyname,jdbcType=VARCHAR},
|
</if>
|
<if test="validflag != null" >
|
validflag = #{validflag,jdbcType=BIT},
|
</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.StandardEducationLeger" >
|
<!-- -->
|
update standardeducationleger
|
set enterprisename = #{enterprisename,jdbcType=VARCHAR},
|
enterprisenumber = #{enterprisenumber,jdbcType=VARCHAR},
|
starttime = #{starttime,jdbcType=TIMESTAMP},
|
endtime = #{endtime,jdbcType=TIMESTAMP},
|
location = #{location,jdbcType=VARCHAR},
|
theme = #{theme,jdbcType=VARCHAR},
|
teacher = #{teacher,jdbcType=VARCHAR},
|
participant = #{participant,jdbcType=VARCHAR},
|
content = #{content,jdbcType=VARCHAR},
|
filename = #{filename,jdbcType=VARCHAR},
|
url = #{url,jdbcType=VARCHAR},
|
createtime = #{createtime,jdbcType=TIMESTAMP},
|
createby = #{createby,jdbcType=BIGINT},
|
createbyname = #{createbyname,jdbcType=VARCHAR},
|
updatetime = #{updatetime,jdbcType=TIMESTAMP},
|
updateby = #{updateby,jdbcType=BIGINT},
|
updatebyname = #{updatebyname,jdbcType=VARCHAR},
|
validflag = #{validflag,jdbcType=BIT}
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|