<?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.unis.lawEnforcementSupervision.modular.lesbasis.mapper.BizLesBasisMapper">

    <select id="getPage" parameterType="com.unis.lawEnforcementSupervision.modular.lesbasis.param.BizLesBasisPageParam"
            resultType="java.util.Map">
        SELECT
            a.id,
            DATE_FORMAT(a.create_time,'%Y-%m-%d %H:%i:%s') createTime,
            DATE_FORMAT(a.update_time,'%Y-%m-%d %H:%i:%s') updateTime,
            a.create_user createUser,
            a.update_user updateUser,
            a.basis_name basisName,
            a.publish_agency publishAgency,
            a.publish_date publishDate,
            a.regulation_type regulationType,
            a.remark,
            a.document,
            b.`name` fileName
        FROM
            biz_les_basis a
                INNER JOIN dev_file b ON CONVERT (a.document USING utf8mb4) COLLATE utf8mb4_0900_ai_ci = b.STORAGE_PATH
        WHERE
            b.DELETE_FLAG = 'NOT_DELETE'
            <if test="null != bizLesBasisPageParam.fileName">
               and b.`name` like concat("%",#{bizLesBasisPageParam.fileName},"%")
            </if>

    </select>
</mapper>