Factual causes

Recently in ORM On the ibatis, It feels complicated , No, jpa Come straight , But the project must be used and there is no way , Recently, there was a problem in the development process Invalid bound
statement (not found)
It means , Yours xml Mapping and your mapper The method is inconsistent , This kind of inconsistency, uncle summed up a few points , If you have this kind of problem, you can check it by following several steps .

Possible causes

* xml Input parameter type mismatch , You can change it to parameterType="map" try
* xml Return parameter type problem ,resultType=" Your type ", Don't write as resultMap=" Your type "
* Returned DTO Does not match the returned result set name , In this case, you need to compare the properties of the type , To do for sql Set alias
* yml It's right in the document ibatis Configuration problem
As shown in the following code : @Getter @Setter public class BusinessCustomerDTO { private Long id;
private String customerName; private String contactPerson; private Integer
freeDays; private String city; private String province; private String source;
private LocalDateTime enterDays; private String leadingPerson; }
Corresponding mapper code :
<select id="getBusinessCustomers" parameterType="java.util.Map"
resultType="cn.pilipa.customer.management.dto.BusinessCustomerDTO"> select
a.id, a.customer_name as customerName, a.city_code as city, a.province_code as
province, a.customer_source as source, b.enter_storage_time as enterDays,
b.current_salesperson as leadingPerson, c.contact_person as contactPerson from
customer_base_info a inner join customer_business_info b on a.id=b.customer_id
left join customer_contact_person c on c.customer_id=a.id where
c.is_main_contact=1 </select>