标签和标签和标签

SELECT * FROM t_dws_base_statistics
        <where>
            <choose>
                <when test="statisticsName != null and statisticsName != ''">
                    name = #{statisticsName}
                when>
                <otherwise>
                    name = 'SCJG-GLY-SCXFHJ-XFHFMYL'
                otherwise>
            choose>
            <choose>
                <when test="statisticsPeriod != null and statisticsPeriod != ''">
                    and year(date) = #{statisticsPeriod}
                when>
                <otherwise>
                    and year(date) = DATE_FORMAT(NOW(),"%Y")
                otherwise>
            choose>
        where>

标签和标签和标签

你可能感兴趣的:(标签和标签和标签)