| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <?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="cn.com.goldenwater.dcproj.dao.MeetScheInfoDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.MeetScheInfo" id="meetScheInfoResultMap">
- <result property="id" column="ID"/>
- <result property="meetId" column="MEET_ID"/>
- <result property="title" column="TITLE"/>
- <result property="content" column="CONTENT"/>
- <result property="location" column="LOCATION"/>
- <result property="stTm" column="ST_TM"/>
- <result property="enTm" column="EN_TM"/>
- <result property="gdX" column="GD_X"/>
- <result property="gdY" column="GD_Y"/>
- <result property="type" column="TYPE"/>
- <result property="compere" column="COMPERE"/>
- <result property="keySpeaker" column="KEY_SPEAKER"/>
- <result property="intm" column="INTM"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- MEET_ID,
- TITLE,
- CONTENT,
- LOCATION,
- ST_TM,
- EN_TM,
- GD_X,
- GD_Y,
- TYPE,
- COMPERE,
- KEY_SPEAKER,
- INTM
- </sql>
- <sql id="entity_properties">
- #{id},
- #{meetId},
- #{title},
- #{content},
- #{location},
- #{stTm},
- #{enTm},
- #{gdX},
- #{gdY},
- #{type},
- #{compere},
- #{keySpeaker},
- #{intm}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="meetId != null and meetId != ''">and MEET_ID = #{meetId}</if>
- <if test="title != null and title != ''">and TITLE = #{title}</if>
- <if test="content != null and content != ''">and CONTENT = #{content}</if>
- <if test="location != null and location != ''">and LOCATION = #{location}</if>
- <if test="stTm != null">and ST_TM = #{stTm}</if>
- <if test="enTm != null">and EN_TM = #{enTm}</if>
- <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
- <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
- <if test="type != null and type != ''">and TYPE = #{type}</if>
- <if test="compere != null and compere != ''">and COMPERE = #{compere}</if>
- <if test="keySpeaker != null and keySpeaker != ''">and KEY_SPEAKER = #{keySpeaker}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- </trim>
- </sql>
- <select id="get" resultMap="meetScheInfoResultMap" parameterType="String" >
- select <include refid="table_columns" /> from MEET_SCHE_INFO where ID = #{id}
- </select>
- <select id="getBy" resultMap="meetScheInfoResultMap">
- select <include refid="table_columns" /> from MEET_SCHE_INFO <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="meetScheInfoResultMap">
- select <include refid="table_columns" /> from MEET_SCHE_INFO
- </select>
- <select id="findList" resultMap="meetScheInfoResultMap">
- select <include refid="table_columns" /> from MEET_SCHE_INFO <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from MEET_SCHE_INFO <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.MeetScheInfo">
- insert into MEET_SCHE_INFO( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from MEET_SCHE_INFO where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.MeetScheInfo">
- delete from MEET_SCHE_INFO <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update MEET_SCHE_INFO set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.MeetScheInfo">
- update MEET_SCHE_INFO
- <trim prefix="set" suffixOverrides=",">
- <if test="meetId != null and meetId != ''">MEET_ID = #{meetId},</if>
- <if test="title != null and title != ''">TITLE = #{title},</if>
- <if test="content != null and content != ''">CONTENT = #{content},</if>
- <if test="location != null and location != ''">LOCATION = #{location},</if>
- <if test="stTm != null">ST_TM = #{stTm},</if>
- <if test="enTm != null">EN_TM = #{enTm},</if>
- <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
- <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
- <if test="type != null and type != ''">TYPE = #{type},</if>
- <if test="compere != null and compere != ''">COMPERE = #{compere},</if>
- <if test="keySpeaker != null and keySpeaker != ''">KEY_SPEAKER = #{keySpeaker},</if>
- <if test="intm != null">INTM = #{intm},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.MeetScheInfo">
- update MEET_SCHE_INFO
- <trim prefix="set" suffixOverrides=",">
- <if test="meetId != null and meetId != ''">MEET_ID = #{meetId},</if>
- <if test="title != null and title != ''">TITLE = #{title},</if>
- <if test="content != null and content != ''">CONTENT = #{content},</if>
- <if test="location != null and location != ''">LOCATION = #{location},</if>
- <if test="stTm != null">ST_TM = #{stTm},</if>
- <if test="enTm != null">EN_TM = #{enTm},</if>
- <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
- <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
- <if test="type != null and type != ''">TYPE = #{type},</if>
- <if test="compere != null and compere != ''">COMPERE = #{compere},</if>
- <if test="keySpeaker != null and keySpeaker != ''">KEY_SPEAKER = #{keySpeaker},</if>
- <if test="intm != null">INTM = #{intm},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- <select id="getScheInfoList" parameterType="cn.com.goldenwater.dcproj.param.MeetScheInfoParam" resultMap="meetScheInfoResultMap">
- SELECT T.ID,
- T.MEET_ID,
- T.TITLE,
- T.CONTENT,
- T.LOCATION,
- T.ST_TM,
- T.EN_TM,
- T.GD_X,
- T.GD_Y,
- T.TYPE,
- T.COMPERE,
- T.KEY_SPEAKER,
- T.INTM FROM MEET_SCHE_INFO T
- WHERE T.MEET_ID = #{meetId}
- <if test="type != null and type != ''">
- AND T.type = #{type}
- </if>
- ORDER BY T.ST_TM
- </select>
- </mapper>
|