| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <?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.AttMeetingInfoDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttMeetingInfo" id="attMeetingInfoResultMap">
- <result property="id" column="ID"/>
- <result property="title" column="TITLE"/>
- <result property="content" column="CONTENT"/>
- <result property="tm" column="TM"/>
- <result property="address" column="ADDRESS"/>
- <result property="note" column="NOTE"/>
- <result property="fileUrls" column="FILE_URLS"/>
- <result property="intm" column="INTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- TITLE,
- CONTENT,
- TM,
- ADDRESS,
- NOTE,
- FILE_URLS,
- INTM,DATA_STAT
- </sql>
- <sql id="entity_properties">
- #{id},
- #{title},
- #{content},
- #{tm},
- #{address},
- #{note},
- #{fileUrls},
- #{intm},#{dataStat}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="title != null and title != ''">and TITLE = #{title}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="content != null and content != ''">and CONTENT = #{content}</if>
- <if test="tm != null and tm != ''">and TM = #{tm}</if>
- <if test="address != null and address != ''">and ADDRESS = #{address}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="fileUrls != null and fileUrls != ''">and FILE_URLS = #{fileUrls}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attMeetingInfoResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from ATT_MEETING_INFO where ID = #{id}
- </select>
- <select id="getBy" resultMap="attMeetingInfoResultMap">
- select
- <include refid="table_columns"/>
- from ATT_MEETING_INFO
- <include refid="page_where"/>
- </select>
- <select id="findNearInfo" resultMap="attMeetingInfoResultMap">
- select
- <include refid="table_columns"/>
- from ATT_MEETING_INFO o where o.intm = (
- select max(intm) from ATT_MEETING_INFO o where o.Data_stat=1
- )
- </select>
- <select id="findAll" resultMap="attMeetingInfoResultMap">
- select
- <include refid="table_columns"/>
- from ATT_MEETING_INFO
- </select>
- <select id="findList" resultMap="attMeetingInfoResultMap">
- select
- <include refid="table_columns"/>
- from ATT_MEETING_INFO
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from ATT_MEETING_INFO
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttMeetingInfo">
- insert into ATT_MEETING_INFO(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ATT_MEETING_INFO where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttMeetingInfo">
- delete from ATT_MEETING_INFO
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_MEETING_INFO set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttMeetingInfo">
- update ATT_MEETING_INFO
- <trim prefix="set" suffixOverrides=",">
- <if test="title != null and title != ''">TITLE = #{title},</if>
- <if test="content != null and content != ''">CONTENT = #{content},</if>
- <if test="tm != null and tm != ''">TM = #{tm},</if>
- <if test="address != null and address != ''">ADDRESS = #{address},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="fileUrls != null and fileUrls != ''">FILE_URLS = #{fileUrls},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="intm != null">INTM = #{intm},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttMeetingInfo">
- update ATT_MEETING_INFO
- <trim prefix="set" suffixOverrides=",">
- <if test="title != null and title != ''">TITLE = #{title},</if>
- <if test="content != null and content != ''">CONTENT = #{content},</if>
- <if test="tm != null and tm != ''">TM = #{tm},</if>
- <if test="address != null and address != ''">ADDRESS = #{address},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="fileUrls != null and fileUrls != ''">FILE_URLS = #{fileUrls},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|