<?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.enterpriseCreditManagement.info.modular.ecmCreditAssess.mapper.EcmCreditAssessMapper">
    <select id="getEcmCreditAssessByData" resultType="java.util.Map">
        SELECT
        a.assess_result as "assessResult"
        FROM
        biz_ecm_credit_assess a
        WHERE
        #{creditScore} &gt;= a.credit_score -- 评分大于等于
        AND #{creditLevel} &lt;= a.credit_level --  使用小于等于 信用等级，1：一级；2：二级；3：三级
        and #{fulfilmentTimes} BETWEEN min_fulfilment_time and max_fulfilment_time -- 企业履约次数 在最小最大之间
        AND #{breachTimes}  BETWEEN min_breach_time AND max_breach_time -- 企业违约次数 在最小最大之间
        ORDER BY update_time desc
    </select>
</mapper>