Java教程

There is no getter for property named 'pro' in 'class java.lang.String'

本文主要是介绍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>
这篇关于There is no getter for property named 'pro' in 'class java.lang.String'的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!