Parameter ‘courseId’ not found. Available parameters are [arg1, arg0, param1, para

Youmans_station2022-08-06 07:54:04

Parameter ‘courseId’ not found. Available parameters are [arg1, arg0, param1, para
mybatis error

Online said parameterized add @paran(xx)

No solution

 @Override original interception codepublic Boolean isBuyCourse(Long userId,Long courseId) {try {OrderInfo buy = baseMapper.isBuy(userId, courseId);return !StringUtils.isEmpty(buy);}catch (Exception e){e.printStackTrace();return false ;}}

最后在xml文件里面添加,解决

select o1.id
from order_detail o1
left join order_info o2 on o1.id = o1.id
where o1.user_id=#{param1} and o1.course_id=#{param2} and o2.order_status=1
group by o1.id


thank
Similar articles