示例

<!--查询规模-->
    <select id="selectScale" parameterType="java.lang.String" resultType="double">
        SELECT
            COALESCE ( SUM( scale ), 0 )
        FROM
            bq_fund_achievement
        WHERE
            sale_time  LIKE CONCAT(#{date},'%');
    </select>

    <!--范围查询规模-->
    <select id="selectRangeScale" parameterType="java.util.Map" resultType="double">
        SELECT
            COALESCE ( SUM( scale ), 0 )
        FROM
            bq_fund_achievement
        WHERE
            sale_time  BETWEEN #{startDate} AND #{endDate};
    </select>

分类: MyBatis

发表评论

电子邮件地址不会被公开。 必填项已用*标注