<?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.gysl.mapper.MxMapper">
    <update id="updateYs">
        update gysl_mx
        set type = #{newType},
            name = #{newName}
        where type = #{oldType} and name = #{oldName}
    </update>
    <delete id="deleteYs">
        delete from gysl_mx
        where type = #{req.lx} and name = #{req.name}
    </delete>
    <select id="selectAll" resultType="com.ruoyi.gysl.entity.Mx">
        select * from gysl_mx
        <where>
            <if test="req.name != null and req.name != '' ">
                AND name like concat('%',#{req.name},'%')
            </if>
            <if test="req.jtzb != null  and req.jtzb != ''">
                AND jtzb like concat('%',#{req.jtzb},'%')
            </if>
        </where>
    </select>
</mapper>

