Because of the company's requirements, recently from. NET to Java, and then encountered a variety of wonderful problems in the process, special here with a note.
Scene: A method has two parameters, a list of the collection, an int type of parameters, initially I in the XML SQL parameters, whether defined as a list or int are error, in fact, I can understand carefully, the interface method defines two types of parameters, So the type of argument in your XML is wrong, whatever it is defined as.
Original wording:
======================== This example is an example of the original error notation ===========start
void Batchupdateurgetntstatusnew (list<string> li,int priority);
In XML:
<!--Modify the debit ticket priority--
<update id= "batchupdateurgetntstatusnew" parametertype= "Java.util.List" >
Update table name
<set>
Priority=#{priority,jdbctype=integer},
Modifiedon=now ()
</set>
where Delete_status=0 and loanee_type=0
and loanee_apply_id in
<foreach collection= "li" item= "item" index= "index" separator= ","
Open= "(" close= ")" >
#{item}
</foreach>
</update>
======================== This example is an example of the original error notation ===========end
Later asked the company's colleagues, colleagues told me that the situation in the XML does not define the parameter type, and then changed, run Debug OK.
Here's an example of the change.
Example: @Param ("Li") aliases a parameter, XML can use aliases directly
void Batchupdateurgetntstatusnew (@Param ("Li") list<string> Li, @Param ("priority") int priority);
XML: Medium Without declaring parameter type, parametertype= "Java.util.List"
<!--Modify the debit ticket priority--
<update id= "Batchupdateurgetntstatusnew" >
Update table name
<set>
Priority=#{priority,jdbctype=integer},
Modifiedon=now ()
</set>
where Delete_status=0 and loanee_type=0
and loanee_apply_id in
<foreach collection= "li" item= "item" index= "index" separator= ","
Open= "(" close= ")" >
#{item}
</foreach>
</update>
Multiple types of parameters in the Java MyBatis Framework are passed into the XML problem