227 lines
8.4 KiB
XML
227 lines
8.4 KiB
XML
<?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.adc.da.slrs.wgdCensusLeo.dao.WgdWbtjDao">
|
|
<!-- 基础信息-->
|
|
<sql id="BaseInfo">
|
|
id,host,meeting,time,place,contributions,occurs,expenses,user,leadership,participants,information,recording,Issues
|
|
</sql>
|
|
<!-- 查询条件-->
|
|
<sql id="Conditions">
|
|
<where>
|
|
<if test="id != null and id != ''">
|
|
and id = #{id}
|
|
</if>
|
|
<if test="host != null and host != ''">
|
|
and host like concat('%',#{host},'%')
|
|
</if>
|
|
<if test="meeting != null and meeting != ''">
|
|
and meeting like concat('%',#{meeting},'%')
|
|
</if>
|
|
<if test="time != null and time != ''">
|
|
and time like concat('%',#{time},'%')
|
|
</if>
|
|
<if test="place != null and place != ''">
|
|
and place = #{place}
|
|
</if>
|
|
<if test="contributions != null and contributions != ''">
|
|
and contributions = #{contributions}
|
|
</if>
|
|
<if test="occurs != null and occurs != ''">
|
|
and occurs = #{occurs}
|
|
</if>
|
|
<if test="expenses != null and expenses != ''">
|
|
and expenses = #{expenses}
|
|
</if>
|
|
<if test="user != null and user != ''">
|
|
and user = #{user}
|
|
</if>
|
|
<if test="leadership != null and leadership != ''">
|
|
and leadership = #{leadership}
|
|
</if>
|
|
<if test="participants != null and participants != ''">
|
|
and participants = #{participants}
|
|
</if>
|
|
<if test="information != null and information != ''">
|
|
and information = #{information}
|
|
</if>
|
|
<if test="recording != null and recording != ''">
|
|
and recording = #{recording}
|
|
</if>
|
|
<if test="Issues != null and Issues != ''">
|
|
and Issues = #{Issues}
|
|
</if>
|
|
</where>
|
|
</sql>
|
|
<select id="getTotal" resultType="java.lang.Integer">
|
|
select count(*) from wgd_wbtj
|
|
</select>
|
|
<select id="getQueryTotal" parameterType="com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj" resultType="java.lang.Integer">
|
|
select count(*) from wgd_wbtj
|
|
<include refid="Conditions"></include>
|
|
</select>
|
|
<!-- 查询所有-->
|
|
<select id="selectAll" resultType="com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj">
|
|
select <include refid="BaseInfo"></include> from wgd_wbtj
|
|
</select>
|
|
<!-- 多条件查询-->
|
|
<select id="queryAll" parameterType="com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj" resultType="com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj">
|
|
select <include refid="BaseInfo"></include> from wgd_wbtj
|
|
<include refid="Conditions"></include>
|
|
</select>
|
|
<!-- 查询详情-->
|
|
<select id="selectOne" parameterType="java.lang.String" resultType="com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj">
|
|
select <include refid="BaseInfo"></include> from wgd_wbtj
|
|
where id = #{id}
|
|
</select>
|
|
<!-- 修改-->
|
|
<update id="updateOne" parameterType="com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj">
|
|
update wgd_wbtj
|
|
<set>
|
|
<if test="host != null and host != ''">
|
|
host = #{host},
|
|
</if>
|
|
<if test="meeting != null and meeting != ''">
|
|
meeting = #{meeting},
|
|
</if>
|
|
<if test="time != null ">
|
|
time = #{time},
|
|
</if>
|
|
<if test="place != null and place != ''">
|
|
place = #{place},
|
|
</if>
|
|
<if test="contributions != null and contributions != ''">
|
|
contributions = #{contributions},
|
|
</if>
|
|
<if test="occurs != null and occurs != ''">
|
|
occurs = #{occurs},
|
|
</if>
|
|
<if test="expenses != null and expenses != ''">
|
|
expenses = #{expenses},
|
|
</if>
|
|
<if test="user != null and user != ''">
|
|
user = #{user},
|
|
</if>
|
|
<if test="leadership != null and leadership != ''">
|
|
leadership = #{leadership},
|
|
</if>
|
|
<if test="participants != null and participants != ''">
|
|
participants = #{participants},
|
|
</if>
|
|
<if test="information != null and information != ''">
|
|
information = #{information},
|
|
</if>
|
|
<if test="recording != null and recording != ''">
|
|
recording = #{recording},
|
|
</if>
|
|
<if test="Issues != null and Issues != ''">
|
|
Issues = #{Issues},
|
|
</if>
|
|
</set>
|
|
where id = #{id}
|
|
</update>
|
|
<!-- 插入一条数据-->
|
|
<insert id="insertOne" parameterType="com.adc.da.slrs.wgdCensusLeo.entity.WgdWbtj">
|
|
insert into wgd_wbtj
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null and id != ''">
|
|
id,
|
|
</if>
|
|
<if test="host != null and host != ''">
|
|
host,
|
|
</if>
|
|
<if test="meeting != null and meeting != ''">
|
|
meeting,
|
|
</if>
|
|
<if test="time != null and time != ''">
|
|
time,
|
|
</if>
|
|
<if test="place != null and place != ''">
|
|
place,
|
|
</if>
|
|
<if test="contributions != null and contributions != ''">
|
|
contributions,
|
|
</if>
|
|
<if test="occurs != null and occurs != ''">
|
|
occurs,
|
|
</if>
|
|
<if test="expenses != null and expenses != ''">
|
|
expenses,
|
|
</if>
|
|
<if test="user != null and user != ''">
|
|
user,
|
|
</if>
|
|
<if test="leadership != null and leadership != ''">
|
|
leadership,
|
|
</if>
|
|
<if test="participants != null and participants != ''">
|
|
participants,
|
|
</if>
|
|
<if test="information != null and information != ''">
|
|
information,
|
|
</if>
|
|
<if test="recording != null and recording != ''">
|
|
recording,
|
|
</if>
|
|
<if test="Issues != null and Issues != ''">
|
|
Issues,
|
|
</if>
|
|
</trim>
|
|
values
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null and id != ''">
|
|
#{id},
|
|
</if>
|
|
<if test="host != null and host != ''">
|
|
#{host},
|
|
</if>
|
|
<if test="meeting != null and meeting != ''">
|
|
#{meeting},
|
|
</if>
|
|
<if test="time != null and time != ''">
|
|
#{time},
|
|
</if>
|
|
<if test="place != null and place != ''">
|
|
#{place},
|
|
</if>
|
|
<if test="contributions != null and contributions != ''">
|
|
#{contributions},
|
|
</if>
|
|
<if test="occurs != null and occurs != ''">
|
|
#{occurs},
|
|
</if>
|
|
<if test="expenses != null and expenses != ''">
|
|
#{expenses},
|
|
</if>
|
|
<if test="user != null and user != ''">
|
|
#{user},
|
|
</if>
|
|
<if test="leadership != null and leadership != ''">
|
|
#{leadership},
|
|
</if>
|
|
<if test="participants != null and participants != ''">
|
|
#{participants},
|
|
</if>
|
|
<if test="information != null and information != ''">
|
|
#{information},
|
|
</if>
|
|
<if test="recording != null and recording != ''">
|
|
#{recording},
|
|
</if>
|
|
<if test="Issues != null and Issues != ''">
|
|
#{Issues},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<!-- 删除-->
|
|
<delete id="deleteOne" parameterType="java.lang.String">
|
|
delete from wgd_wbtj where id = #{id}
|
|
</delete>
|
|
<!-- 批量删除-->
|
|
<delete id="deleteBatch" parameterType="java.lang.String">
|
|
delete from wgd_wbtj where id in
|
|
<foreach collection="array" item="id" open="(" close=")" separator=",">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|