<?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.yd.csf.service.dao.VariableMapper">

    <select id="page" resultType="com.yd.csf.feign.response.variable.ApiVariablePageResponse">
        select * from variable v
        <where>
            <if test="request.nameCn != null and request.nameCn != ''">
                and v.name_cn like concat('%', #{request.nameCn}, '%')
            </if>
            <if test="request.type != null and request.type != ''">
                and v.type = #{request.type}
            </if>
            and v.is_deleted = 0
        </where>
    </select>
</mapper>
