with a primitive return type

98次阅读
没有评论

mybaits异常:return null from a method with a primitive return type (int).

运行时异常:Mapper method ‘com.ruoyi.clinic.mapper.HisMedicalRecordMapper.selectHisMedicalRecordByAppointmentsId attempted to return null from a method with a primitive return type (int).

错误代码:

 //根据预约id查询电子病历

    @Select(“select id from his_medical_record where appointment_id = #{id}”)

    public int selectHisMedicalRecordByAppointmentsId(@Param(“id”) Long id);、

更改后无错代码

 //根据预约id查询电子病历

    @Select(“select id from his_medical_record where appointment_id = #{id}”)

    public Integer selectHisMedicalRecordByAppointmentsId(@Param(“id”) Long id);

正文完
 
评论(没有评论)