| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324 |
- <?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.BisInspMeetRecodeDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspMeetRecode" id="bisInspMeetRecodeResultMap">
- <result property="meetingId" column="MEETING_ID"/>
- <result property="persName" column="PERS_NAME"/>
- <result property="orgNm" column="ORG_NM"/>
- <result property="controlPersId" column="CONTROL_PERS_ID"/>
- <result property="controlPersName" column="CONTROL_PERS_NAME"/>
- <result property="sms" column="SMS"/>
- <result property="id" column="ID"/>
- <result property="title" column="TITLE"/>
- <result property="startTime" column="START_TIME"/>
- <result property="endTime" column="END_TIME"/>
- <result property="participants" column="PARTICIPANTS"/>
- <result property="address" column="ADDRESS"/>
- <result property="details" column="DETAILS"/>
- <result property="autoinvite" column="AUTOINVITE"/>
- <result property="password" column="PASSWORD"/>
- <result property="controlPassword" column="CONTROL_PASSWORD"/>
- <result property="meetingroomtype" column="MEETINGROOMTYPE"/>
- <result property="conferencenumber" column="CONFERENCENUMBER"/>
- <result property="autorecord" column="AUTORECORD"/>
- <result property="mainimage" column="MAINIMAGE"/>
- <result property="enableofflinerecord" column="ENABLEOFFLINERECORD"/>
- <result property="enablesinglerecord" column="ENABLESINGLERECORD"/>
- <result property="persId" column="PERS_ID"/>
- <result property="orgId" column="ORG_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="flagValid" column="FLAG_VALID"/>
- </resultMap>
- <sql id="table_columns">
- MEETING_ID,
- PERS_NAME,
- ORG_NM,
- CONTROL_PERS_ID,
- CONTROL_PERS_NAME,
- SMS,
- ID,
- TITLE,
- START_TIME,
- END_TIME,
- PARTICIPANTS,
- ADDRESS,
- DETAILS,
- AUTOINVITE,
- PASSWORD,
- CONTROL_PASSWORD,
- MEETINGROOMTYPE,
- CONFERENCENUMBER,
- AUTORECORD,
- MAINIMAGE,
- ENABLEOFFLINERECORD,
- ENABLESINGLERECORD,
- PERS_ID,
- ORG_ID,
- INTM,
- UPTM,
- FLAG_VALID
- </sql>
- <sql id="entity_properties">
- #{meetingId},
- #{persName},
- #{orgNm},
- #{controlPersId},
- #{controlPersName},
- #{sms},
- #{id},
- #{title},
- #{startTime},
- #{endTime},
- #{participants},
- #{address},
- #{details},
- #{autoinvite},
- #{password},
- #{controlPassword},
- #{meetingroomtype},
- #{conferencenumber},
- #{autorecord},
- #{mainimage},
- #{enableofflinerecord},
- #{enablesinglerecord},
- #{persId},
- #{orgId},
- #{intm},
- #{uptm},
- #{flagValid}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="persName != null and persName != ''">and PERS_NAME = #{persName}</if>
- <if test="orgNm != null and orgNm != ''">and ORG_NM = #{orgNm}</if>
- <if test="controlPersId != null and controlPersId != ''">and CONTROL_PERS_ID = #{controlPersId}</if>
- <if test="controlPersName != null and controlPersName != ''">and CONTROL_PERS_NAME = #{controlPersName}</if>
- <if test="sms != null and sms != ''">and SMS = #{sms}</if>
- <if test="id != null and id != ''">and ID = #{id}</if>
- <if test="title != null and title != ''">and TITLE = #{title}</if>
- <if test="startTime != null">and START_TIME = #{startTime}</if>
- <if test="endTime != null">and END_TIME = #{endTime}</if>
- <if test="participants != null and participants != ''">and PARTICIPANTS = #{participants}</if>
- <if test="address != null and address != ''">and ADDRESS = #{address}</if>
- <if test="details != null and details != ''">and DETAILS = #{details}</if>
- <if test="autoinvite != null and autoinvite != ''">and AUTOINVITE = #{autoinvite}</if>
- <if test="password != null and password != ''">and PASSWORD = #{password}</if>
- <if test="controlPassword != null and controlPassword != ''">and CONTROL_PASSWORD = #{controlPassword}</if>
- <if test="meetingroomtype != null and meetingroomtype != ''">and MEETINGROOMTYPE = #{meetingroomtype}</if>
- <if test="conferencenumber != null and conferencenumber != ''">and CONFERENCENUMBER = #{conferencenumber}
- </if>
- <if test="autorecord != null and autorecord != ''">and AUTORECORD = #{autorecord}</if>
- <if test="mainimage != null and mainimage != ''">and MAINIMAGE = #{mainimage}</if>
- <if test="enableofflinerecord != null and enableofflinerecord != ''">and ENABLEOFFLINERECORD =
- #{enableofflinerecord}
- </if>
- <if test="enablesinglerecord != null and enablesinglerecord != ''">and ENABLESINGLERECORD =
- #{enablesinglerecord}
- </if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="flagValid != null and flagValid != ''">and FLAG_VALID = #{flagValid}</if>
- </trim>
- </sql>
- <select id="getBy" resultMap="bisInspMeetRecodeResultMap">
- select
- <include refid="table_columns"/>
- from bis_insp_meet_recode
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspMeetRecodeResultMap">
- select
- <include refid="table_columns"/>
- from bis_insp_meet_recode
- </select>
- <select id="findList" resultMap="bisInspMeetRecodeResultMap">
- select
- <include refid="table_columns"/>
- from bis_insp_meet_recode
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from bis_insp_meet_recode
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspMeetRecode">
- insert into bis_insp_meet_recode(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from bis_insp_meet_recode where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspMeetRecode">
- delete from bis_insp_meet_recode
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update bis_insp_meet_recode set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspMeetRecode">
- update bis_insp_meet_recode
- <trim prefix="set" suffixOverrides=",">
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
- <if test="orgNm != null and orgNm != ''">ORG_NM = #{orgNm},</if>
- <if test="controlPersId != null and controlPersId != ''">CONTROL_PERS_ID = #{controlPersId},</if>
- <if test="controlPersName != null and controlPersName != ''">CONTROL_PERS_NAME = #{controlPersName},</if>
- <if test="sms != null and sms != ''">SMS = #{sms},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="title != null and title != ''">TITLE = #{title},</if>
- <if test="startTime != null">START_TIME = #{startTime},</if>
- <if test="endTime != null">END_TIME = #{endTime},</if>
- <if test="participants != null and participants != ''">PARTICIPANTS = #{participants},</if>
- <if test="address != null and address != ''">ADDRESS = #{address},</if>
- <if test="details != null and details != ''">DETAILS = #{details},</if>
- <if test="autoinvite != null and autoinvite != ''">AUTOINVITE = #{autoinvite},</if>
- <if test="password != null and password != ''">PASSWORD = #{password},</if>
- <if test="controlPassword != null and controlPassword != ''">CONTROL_PASSWORD = #{controlPassword},</if>
- <if test="meetingroomtype != null and meetingroomtype != ''">MEETINGROOMTYPE = #{meetingroomtype},</if>
- <if test="conferencenumber != null and conferencenumber != ''">CONFERENCENUMBER = #{conferencenumber},</if>
- <if test="autorecord != null and autorecord != ''">AUTORECORD = #{autorecord},</if>
- <if test="mainimage != null and mainimage != ''">MAINIMAGE = #{mainimage},</if>
- <if test="enableofflinerecord != null and enableofflinerecord != ''">ENABLEOFFLINERECORD =
- #{enableofflinerecord},
- </if>
- <if test="enablesinglerecord != null and enablesinglerecord != ''">ENABLESINGLERECORD =
- #{enablesinglerecord},
- </if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="flagValid != null and flagValid != ''">FLAG_VALID = #{flagValid},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspMeetRecode">
- update bis_insp_meet_recode
- <trim prefix="set" suffixOverrides=",">
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
- <if test="orgNm != null and orgNm != ''">ORG_NM = #{orgNm},</if>
- <if test="controlPersId != null and controlPersId != ''">CONTROL_PERS_ID = #{controlPersId},</if>
- <if test="controlPersName != null and controlPersName != ''">CONTROL_PERS_NAME = #{controlPersName},</if>
- <if test="sms != null and sms != ''">SMS = #{sms},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="title != null and title != ''">TITLE = #{title},</if>
- <if test="startTime != null">START_TIME = #{startTime},</if>
- <if test="endTime != null">END_TIME = #{endTime},</if>
- <if test="participants != null and participants != ''">PARTICIPANTS = #{participants},</if>
- <if test="address != null and address != ''">ADDRESS = #{address},</if>
- <if test="details != null and details != ''">DETAILS = #{details},</if>
- <if test="autoinvite != null and autoinvite != ''">AUTOINVITE = #{autoinvite},</if>
- <if test="password != null and password != ''">PASSWORD = #{password},</if>
- <if test="controlPassword != null and controlPassword != ''">CONTROL_PASSWORD = #{controlPassword},</if>
- <if test="meetingroomtype != null and meetingroomtype != ''">MEETINGROOMTYPE = #{meetingroomtype},</if>
- <if test="conferencenumber != null and conferencenumber != ''">CONFERENCENUMBER = #{conferencenumber},</if>
- <if test="autorecord != null and autorecord != ''">AUTORECORD = #{autorecord},</if>
- <if test="mainimage != null and mainimage != ''">MAINIMAGE = #{mainimage},</if>
- <if test="enableofflinerecord != null and enableofflinerecord != ''">ENABLEOFFLINERECORD =
- #{enableofflinerecord},
- </if>
- <if test="enablesinglerecord != null and enablesinglerecord != ''">ENABLESINGLERECORD =
- #{enablesinglerecord},
- </if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="flagValid != null and flagValid != ''">FLAG_VALID = #{flagValid},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <select id="get" resultMap="recodeMap" parameterType="String">
- SELECT A.*,B.ID CUSTOMS_ID,B.PERS_ID CUSTOMS_PERS_ID,B.PERS_NAME
- CUSTOMS_PERS_NAME,B.JNTM,B.MEET_RECODE_ID,B.callnumber
- FROM BIS_INSP_MEET_RECODE A
- LEFT JOIN BIS_INSP_MEET_MNTS_CUSTOMS B
- ON A.ID=B.MEET_RECODE_ID
- WHERE A.ID =#{id}
- </select>
- <!-- 其他自定义SQL -->
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspMeetRecode" id="recodeMap">
- <id property="id" column="ID"/>
- <result property="meetingId" column="MEETING_ID"/>
- <result property="title" column="TITLE"/>
- <result property="startTime" column="START_TIME"/>
- <result property="endTime" column="END_TIME"/>
- <result property="participants" column="PARTICIPANTS"/>
- <result property="address" column="ADDRESS"/>
- <result property="details" column="DETAILS"/>
- <result property="autoinvite" column="AUTOINVITE"/>
- <result property="password" column="PASSWORD"/>
- <result property="controlPassword" column="CONTROL_PASSWORD"/>
- <result property="meetingroomtype" column="MEETINGROOMTYPE"/>
- <result property="conferencenumber" column="CONFERENCENUMBER"/>
- <result property="autorecord" column="AUTORECORD"/>
- <result property="mainimage" column="MAINIMAGE"/>
- <result property="enableofflinerecord" column="ENABLEOFFLINERECORD"/>
- <result property="enablesinglerecord" column="ENABLESINGLERECORD"/>
- <result property="persId" column="PERS_ID"/>
- <result property="persName" column="PERS_NAME"/>
- <result property="orgId" column="ORG_ID"/>
- <result property="orgNm" column="ORG_NM"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="controlPersId" column="CONTROL_PERS_ID"/>
- <result property="controlPersName" column="CONTROL_PERS_NAME"/>
- <result property="flagValid" column="FLAG_VALID"/>
- <result property="sms" column="SMS"/>
- <collection property="participantsList" ofType="cn.com.goldenwater.dcproj.model.BisInspMeetMntsCustoms">
- <result property="persName" column="CUSTOMS_PERS_NAME"/>
- <result property="id" column="CUSTOMS_ID"/>
- <result property="persId" column="CUSTOMS_PERS_ID"/>
- <result property="meetRecodeId" column="MEET_RECODE_ID"/>
- <result property="jntm" column="CUSTOMS_JNTM"/>
- <result property="callnumber" column="callnumber"/>
- </collection>
- </resultMap>
- <select id="getRecodeInfo" resultMap="recodeMap">
- SELECT A.*,B.ID CUSTOMS_ID,B.PERS_ID CUSTOMS_PERS_ID,B.PERS_NAME
- CUSTOMS_PERS_NAME,B.JNTM,B.MEET_RECODE_ID,B.callnumber
- FROM BIS_INSP_MEET_RECODE A
- LEFT JOIN BIS_INSP_MEET_MNTS_CUSTOMS B
- ON A.ID=B.MEET_RECODE_ID
- WHERE 1=1
- <if test="persId != null and persId != ''">and (
- A.ID IN (SELECT DISTINCT MEET_RECODE_ID FROM BIS_INSP_MEET_MNTS_CUSTOMS WHERE PERS_ID=#{persId})
- OR A.ID IN (SELECT DISTINCT ID FROM BIS_INSP_MEET_RECODE WHERE CONTROL_PERS_ID =#{persId})
- OR A.ID IN (SELECT DISTINCT ID FROM BIS_INSP_MEET_RECODE WHERE PERS_ID =#{persId})
- )
- </if>
- <if test="title != null and title != ''">and title like concat(#{title},'%')</if>
- <if test="conferencenumber != null and conferencenumber != ''">and a.conferencenumber =#{conferencenumber}</if>
- <if test="tm != null and tm != ''">
- and (start_time > STR_TO_DATE(#{tm},'%Y-%m-%d %H:%i:%s')
- or
- STR_TO_DATE(#{tm},'%Y-%m-%d %H:%i:%s')<END_TIME)
- </if>
- </select>
- </mapper>
|