| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <?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.inspur.mapper.PartyStudyRulesMapper">
- <resultMap type="com.inspur.domain.partystudy.PartyStudyRules" id="PartyStudyRulesResult">
- <result property="id" column="id" />
- <result property="title" column="title" />
- <result property="content" column="content" />
- <result property="describe" column="describe" />
- <result property="url" column="url" />
- <result property="thumb" column="thumb" />
- <result property="picsPath" column="pics_path" />
- <result property="audioPic" column="audio_pic" />
- <result property="fileName" column="file_name" />
- <result property="filePath" column="file_path" />
- <result property="audioPath" column="audio_path" />
- <result property="insertTime" column="insert_time" />
- <result property="delStatus" column="del_status" />
- <result property="isPush" column="is_push" />
- <result property="newsType" column="news_type" />
- <result property="newsContent" column="news_content" />
- <result property="joinid" column="joinid" />
- <result property="newsid" column="newsid" />
- <result property="sort" column="sort" />
- <result property="orgid" column="orgid" />
- <result property="userTableId" column="user_table_id" />
- </resultMap>
- <sql id="selectPartyStudyRulesVo">
- select id, title, content, `describe`, url, thumb, pics_path, audio_pic, audio_path, file_path,file_name,insert_time, del_status, is_push, news_type, news_content, joinid, newsid, sort, orgid, user_table_id from party_study_rules
- </sql>
- <select id="selectPartyStudyRulesList" parameterType="PartyStudyRules" resultMap="PartyStudyRulesResult">
- <include refid="selectPartyStudyRulesVo"/>
- <where>
- <if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="describe != null and describe != ''"> and `describe` = #{describe}</if>
- <if test="url != null and url != ''"> and url = #{url}</if>
- <if test="thumb != null and thumb != ''"> and thumb = #{thumb}</if>
- <if test="picsPath != null and picsPath != ''"> and pics_path = #{picsPath}</if>
- <if test="audioPic != null and audioPic != ''"> and audio_pic = #{audioPic}</if>
- <if test="audioPath != null and audioPath != ''"> and audio_path = #{audioPath}</if>
- <if test="insertTime != null "> and insert_time = #{insertTime}</if>
- <if test="delStatus != null and delStatus != ''"> and del_status = #{delStatus}</if>
- <if test="isPush != null and isPush != ''"> and is_push = #{isPush}</if>
- <if test="newsType != null and newsType != ''"> and news_type = #{newsType}</if>
- <if test="newsContent != null and newsContent != ''"> and news_content = #{newsContent}</if>
- <if test="joinid != null "> and joinid = #{joinid}</if>
- <if test="newsid != null "> and newsid = #{newsid}</if>
- <if test="sort != null and sort != ''"> and sort = #{sort}</if>
- <if test="orgid != null "> and orgid = #{orgid}</if>
- <if test="userTableId != null "> and user_table_id = #{userTableId}</if>
- </where>
- </select>
- <select id="selectPartyStudyRulesById" parameterType="Long" resultMap="PartyStudyRulesResult">
- <include refid="selectPartyStudyRulesVo"/>
- where id = #{id}
- </select>
- <insert id="insertPartyStudyRules" parameterType="PartyStudyRules">
- insert into party_study_rules
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="title != null">title,</if>
- <if test="content != null">content,</if>
- <if test="describe != null">`describe`,</if>
- <if test="url != null">url,</if>
- <if test="thumb != null">thumb,</if>
- <if test="picsPath != null">pics_path,</if>
- <if test="audioPic != null">audio_pic,</if>
- <if test="audioPath != null">audio_path,</if>
- <if test="insertTime != null">insert_time,</if>
- <if test="delStatus != null">del_status,</if>
- <if test="isPush != null">is_push,</if>
- <if test="newsType != null">news_type,</if>
- <if test="newsContent != null">news_content,</if>
- <if test="joinid != null">joinid,</if>
- <if test="newsid != null">newsid,</if>
- <if test="sort != null">sort,</if>
- <if test="orgid != null">orgid,</if>
- <if test="userTableId != null">user_table_id,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="title != null">#{title},</if>
- <if test="content != null">#{content},</if>
- <if test="describe != null">#{describe},</if>
- <if test="url != null">#{url},</if>
- <if test="thumb != null">#{thumb},</if>
- <if test="picsPath != null">#{picsPath},</if>
- <if test="audioPic != null">#{audioPic},</if>
- <if test="audioPath != null">#{audioPath},</if>
- <if test="insertTime != null">#{insertTime},</if>
- <if test="delStatus != null">#{delStatus},</if>
- <if test="isPush != null">#{isPush},</if>
- <if test="newsType != null">#{newsType},</if>
- <if test="newsContent != null">#{newsContent},</if>
- <if test="joinid != null">#{joinid},</if>
- <if test="newsid != null">#{newsid},</if>
- <if test="sort != null">#{sort},</if>
- <if test="orgid != null">#{orgid},</if>
- <if test="userTableId != null">#{userTableId},</if>
- </trim>
- </insert>
- <update id="updatePartyStudyRules" parameterType="PartyStudyRules">
- update party_study_rules
- <trim prefix="SET" suffixOverrides=",">
- <if test="title != null">title = #{title},</if>
- <if test="content != null">content = #{content},</if>
- <if test="describe != null">`describe` = #{describe},</if>
- <if test="url != null">url = #{url},</if>
- <if test="thumb != null">thumb = #{thumb},</if>
- <if test="picsPath != null">pics_path = #{picsPath},</if>
- <if test="audioPic != null">audio_pic = #{audioPic},</if>
- <if test="audioPath != null">audio_path = #{audioPath},</if>
- <if test="insertTime != null">insert_time = #{insertTime},</if>
- <if test="delStatus != null">del_status = #{delStatus},</if>
- <if test="isPush != null">is_push = #{isPush},</if>
- <if test="newsType != null">news_type = #{newsType},</if>
- <if test="newsContent != null">news_content = #{newsContent},</if>
- <if test="joinid != null">joinid = #{joinid},</if>
- <if test="newsid != null">newsid = #{newsid},</if>
- <if test="sort != null">sort = #{sort},</if>
- <if test="orgid != null">orgid = #{orgid},</if>
- <if test="userTableId != null">user_table_id = #{userTableId},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deletePartyStudyRulesById" parameterType="Long">
- delete from party_study_rules where id = #{id}
- </delete>
- <delete id="deletePartyStudyRulesByIds" parameterType="String">
- delete from party_study_rules where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|