mybatis sqlmap中property遇到的问题

<select id="selectRoleList" resultClass="role" parameterClass="roleVO" >
		select * from t_role where 1=1
		<isNotEmpty prepend="and" property="roleId">
			id=#roleId#
		</isNotEmpty> 
		<isNotEmpty prepend="and" property="orgId">
			orgId=#orgId#
		</isNotEmpty> 
	</select>

以上里面有parameterClass是自定义的一个类其中有属性roleId、orgId等

<select id="selectProductkey" parameterClass="java.lang.String" resultClass="com.arcsoft.web.adminconsolews.model.caas.ProductKeyManage">
		SELECT pkid,productkey,productSecret,`status`,softwareId,appMajorInformation,
		appMajorInformation,oemInformation,generateTime,deadlineTime,iosP12Pwd,
		iosP12IsSdbx,p12ExpirationTime,androidApiKey,moduleIdForPurchase,realModuleId
		 from oauth_product_key where 1=1 
		 <isNotEmpty prepend="and">
			productkey=#productKey#
		</isNotEmpty>
	</select>
	

而这个里面parameterClass是String,没有什么属性,故而isNotEmpty中没有property属性,也应该加property属性,否则会报错。

你可能感兴趣的:(mybatis sqlmap中property遇到的问题)