其他分享
首页 > 其他分享> > 1<![CDATA[]]>和转义字符

1<![CDATA[]]>和转义字符

作者:互联网

    <sql id="toolCaseVo">
        a.id AS "id",
        a.tool_code AS "toolCode",
        a.dept_id AS "deptId",
        c.dept_name AS "deptName",
        a.material_id AS "materialId",
        a.material_id AS "material.id",
        b.code AS "material.code",
        b.name AS "material.name",
        b.invspec AS "material.invspec",
        b.unit AS "material.unit",
        b.factory AS "material.factory",
        b.invtype AS "material.invtype",
        b.picture AS "material.picture",
        a.rfid AS "rfid",
        a.last_check_time AS "lastCheckTime",
        a.next_check_time AS "nextCheckTime",
        a.check_cycle_days AS "checkCycleDays",

        a.del_flag AS "delFlag",
        a.create_by AS "createBy",
        a.create_time AS "createTime",
        a.update_by AS "updateBy",
        a.update_time AS "updateTime",
        a.remark AS "remark"
    </sql>

    <sql id="toolCaseJoins">
        LEFT JOIN sh_material b on b.id = a.material_id and b.del_flag = '0'
        LEFT JOIN sys_dept c on c.dept_id = a.dept_id and c.del_flag = '0'
    </sql>



    <select id="selectExpireToolCaseList" resultType="com.ruoyi.station.domain.ToolCase">
        SELECT
        <include refid="toolCaseVo"/>
        FROM sh_tool_case a
        <include refid="toolCaseJoins"/>
        <where>
            a.del_flag = '0'
            and a.next_check_time <![CDATA[ <= ]]> #{nextCheckTime}
        </where>
    </select>

参考1

mybatis 中的<![CDATA[ ]]>用法及说明

参考3

标签:material,flag,id,dept,转义字符,time,check
来源: https://www.cnblogs.com/Code-Rain/p/16469757.html