这是我的xml这里有错吗?

这是报错的异常
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'appId' not found. Available parameters are [arg1, arg0, param1, param2]

<insert id="insertAll" parameterType="com.pacypay.aliwc.common.domain.PAppApiDO">
        insert into P_APP_API(APP_ID,API_ID)values (#{appId},#{apiId});
    </insert>
<select id="getAppId" resultType="int">
        select * from P_APP_API where APP_ID = #{appId} and API_ID = #{apiId}
    </select>

图片说明
图片说明

下面就是mapper接口

    你的mapper中id为insertAll的sql片段需要的parameterType为一个实体类的类型,但是你在dao层中传入的参数是以两个参数的形式。所以它会提示无法找到传入的PAppApiDo实体类中的appId参数。        
    推荐dao层的参数改为传入PAppApiDo pAppApiDo参数,或者将mapper中的parameterType(传参时使用了@Param注解,在mapper不用加parameterType属性)去掉。

看下mapper接口

返回resulttype 是int 但是select* 会不会有问题


select * from P_APP_API where APP_ID = #{appId} and API_ID = #{apiId}


select*不能用int来接收,这个com.pacypay.aliwc.common.domain.PAppApiDO类变量名和数据库一样的话,可以改成resultType="com.pacypay.aliwc.common.domain.PAppApiDO" 不一样,要做映射

mapper接口方法的参数用@Param("参数名")修饰一下

报错的mapper.xml parameterType 值换为String