动态传参
<select id="queryYearData" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM
balance_deposits_loans_amount
<where>
<if test="year != null and year != ''">
<bind name="year" value=" '%' + year + '%' "/>
and accdate like #{year}
</if>
</where>
</select>
固定传参
SELECT * FROM qg_user_score_state WHERE data_date LIKE "2021%";