1. Error information:
API Documentation:
org.apache.ibatis.binding.BindingException: Parameter ‘area_ id’ not found. Available parameters are [areaId, param1]
org.apache.ibatis.binding.BindingException: Parameter ‘area_ id’ not found。 The available parameters are [areaid, Param1]
2. Error reporting reason:
The XML internal input parameter has no corresponding.
3. Solution:
area_id = #{areaId,jdbcType=VARCHAR}; Front area_ID is the same as the header in the database, and the simultaneous interpreting of the same areaId is the same as the @Param.
Mapper layer:
@Mapper public interface SalaryStandardConfigMapper extends BaseMapper<SalaryStandardConfig> { SalaryStandardConfig getConfigIdByAreaId(@Param("areaId") String areaId); Integer getConfigIdNums(@Param("areaId") String areaId); }
XML layer:
<select id="getConfigIdNums" resultType="java.lang.Integer" parameterType="java.lang.String"> SELECT COUNT(config_id), area_id FROM salary_standard_config WHERE area_id = #{areaId,jdbcType=VARCHAR}; </select>