<?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.ruoyi.web.work.mapper.IntroductionMapper">

    <select id="selectList" resultType="com.ruoyi.web.work.domain.Introduction">
        select * from tb_introduction
        <where>
            <if test="title != null  and title != ''">and title like concat('%', #{title}, '%')</if>
            <if test="context != null  and context != ''">and context like concat('%', #{context}, '%')</if>
            <if test="status != null  and status != ''">and status = #{status}</if>
        </where>
    </select>

    <update id="updateStatus" parameterType="com.ruoyi.web.work.domain.Introduction">
        update tb_introduction
        <trim prefix="SET" suffixOverrides=",">
            <if test="status != null">status = #{status},</if>
        </trim>
        where id = #{id}
    </update>

</mapper>