mirror of
https://gitee.com/elegant_wings/xiongan-meeting.git
synced 2025-06-21 09:39:37 +08:00
81 lines
3.6 KiB
XML
81 lines
3.6 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.ics.admin.mapper.WisdomPanelMapper">
|
|
|
|
<resultMap type="com.ics.admin.domain.WisdomPanel" id="WisdomPanelResult">
|
|
<result property="id" column="id" />
|
|
<result property="panelName" column="panel_name" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="buttonId" column="button_id" />
|
|
<result property="wisdomRoom" column="wisdom_room" />
|
|
<result property="img" column="img" />
|
|
<result property="imgOpen" column="imgOpen" />
|
|
<result property="panelId" column="panel_id" />
|
|
</resultMap>
|
|
|
|
<sql id="selectWisdomPanelVo">
|
|
SELECT id, panel_name, create_time, button_id, wisdom_room, panel_id FROM tb_wisdom_panel
|
|
</sql>
|
|
|
|
<select id="selectWisdomPanelList" parameterType="WisdomPanel" resultMap="WisdomPanelResult">
|
|
<include refid="selectWisdomPanelVo"/>
|
|
<where>
|
|
<if test="panelName != null and panelName != ''"> AND panel_name LIKE CONCAT('%', #{panelName}, '%')</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectWisdomPanelById" parameterType="Long" resultMap="WisdomPanelResult">
|
|
<include refid="selectWisdomPanelVo"/>
|
|
WHERE id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertWisdomPanel" parameterType="WisdomPanel" useGeneratedKeys="true" keyProperty="id">
|
|
INSERT INTO tb_wisdom_panel
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="panelName != null and panelName != ''">panel_name,</if>
|
|
<if test="createTime != null ">create_time,</if>
|
|
<if test="buttonId != null ">button_id,</if>
|
|
<if test="wisdomRoom != null ">wisdom_room,</if>
|
|
<if test="img != null ">img,</if>
|
|
<if test="imgOpen != null ">img_open,</if>
|
|
<if test="panelId != null ">panel_id,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="panelName != null and panelName != ''">#{panelName},</if>
|
|
<if test="createTime != null ">#{createTime},</if>
|
|
<if test="buttonId != null ">#{buttonId},</if>
|
|
<if test="wisdomRoom != null ">#{wisdomRoom},</if>
|
|
<if test="img != null ">#{img},</if>
|
|
<if test="imgOpen != null ">#{imgOpen},</if>
|
|
<if test="panelId != null ">#{panelId},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateWisdomPanel" parameterType="WisdomPanel">
|
|
UPDATE tb_wisdom_panel
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="panelName != null and panelName != ''">panel_name = #{panelName},</if>
|
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
|
<if test="buttonId != null ">button_id = #{buttonId},</if>
|
|
<if test="wisdomRoom != null ">wisdom_room = #{wisdomRoom},</if>
|
|
<if test="img != null ">img = #{img},</if>
|
|
<if test="imgOpen != null ">img_open = #{imgOpen},</if>
|
|
<if test="panelId != null ">panel_id = #{panelId},</if>
|
|
</trim>
|
|
WHERE id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteWisdomPanelById" parameterType="Long">
|
|
DELETE FROM tb_wisdom_panel WHERE id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteWisdomPanelByIds" parameterType="String">
|
|
DELETE FROM tb_wisdom_panel where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper> |