There is no getter for property named 'pro' in 'class java.lang.String'
作者:互联网
Sql语句错误示例:
<select id="getbusinessPermitTotal" resultType="integer">
SELECT IFNULL(SUM(ISNULL(ALLOW_RECORD_NUM,0)),0)
FROM FOODS_DWS.FACT_MANAGE_ALLOW_RECORD AS F1
<if test="pro!=null">
WHERE F1.REGION_KEY IN (SELECT REGION_KEY FROM FOODS_DWS.DIM_REGION WHERE PROVINCE_NAME= #{pro})
</if>
</select>
解决办法:
把pro换成_parameter 就可以了
<select id="getbusinessPermitTotal" resultType="integer">
SELECT IFNULL(SUM(ISNULL(ALLOW_RECORD_NUM,0)),0)
FROM FOODS_DWS.FACT_MANAGE_ALLOW_RECORD AS F1
<if test="_parameter!=null">
WHERE F1.REGION_KEY IN (SELECT REGION_KEY FROM FOODS_DWS.DIM_REGION WHERE PROVINCE_NAME= #{_parameter })
</if>
</select>
标签:lang,DWS,named,java,REGION,RECORD,FOODS,ALLOW,SELECT 来源: https://www.cnblogs.com/wei3/p/15512728.html