<?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.syzy.mapper.BBusiHollandStepsMapper">

  <resultMap type="BBusiHollandSteps" id="BBusiHollandStepsResult">
    <result property="id" column="id" />
    <result property="no" column="no" />
    <result property="title" column="title" />
    <result property="status" column="status" />
  </resultMap>

  <sql id="selectBBusiHollandStepsVo">
    select id, no, title, status from b_busi_holland_steps
  </sql>

  <select id="selectBBusiHollandStepsList" parameterType="BBusiHollandSteps" resultMap="BBusiHollandStepsResult">
    <include refid="selectBBusiHollandStepsVo" />
    <where>
      <if test="no != null "> and no = #{no}</if>
      <if test="title != null  and title != ''"> and title = #{title}</if>
      <if test="status != null "> and status = #{status}</if>
    </where>
    order by no
  </select>

  <select id="selectBBusiHollandStepsById" parameterType="Long" resultMap="BBusiHollandStepsResult">
    <include refid="selectBBusiHollandStepsVo" />
    where id = #{id}
  </select>

  <select id="selectBBusiHollandStepsByIdList" parameterType="java.util.Collection" resultMap="BBusiHollandStepsResult">
    <include refid="selectBBusiHollandStepsVo" />
    where id in 
    <foreach item="id" collection="idList" open="(" separator="," close=")">
      #{id}
    </foreach>
  </select>

  <insert id="insertBBusiHollandSteps" parameterType="BBusiHollandSteps" useGeneratedKeys="true" keyProperty="id">
    insert into b_busi_holland_steps
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="no != null">no,</if>
      <if test="title != null and title != ''">title,</if>
      <if test="status != null">status,</if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="no != null">#{no},</if>
      <if test="title != null and title != ''">#{title},</if>
      <if test="status != null">#{status},</if>
    </trim>
  </insert>

  <update id="updateBBusiHollandSteps" parameterType="BBusiHollandSteps">
    update b_busi_holland_steps
    <trim prefix="SET" suffixOverrides=",">
      <if test="no != null">no = #{no},</if>
      <if test="title != null and title != ''">title = #{title},</if>
      <if test="status != null">status = #{status},</if>
    </trim>
    where id = #{id}
  </update>

  <delete id="deleteBBusiHollandStepsById" parameterType="Long">
    delete from b_busi_holland_steps where id = #{id}
  </delete>

  <delete id="deleteBBusiHollandStepsByIds" parameterType="String">
    delete from b_busi_holland_steps where id in
    <foreach item="id" collection="array" open="(" separator="," close=")">
      #{id}
    </foreach>
  </delete>
</mapper>