Then OrderMapper.xml
add the following paragraph.
<search id="searchOrdersByCriteria" resultMap="orderResultMap"
parameterType= "com.cl.shop.bean.CriteriaForm">
select * from clshop.cl_order where 1=1
<if test="custName != null and custName != '' ">
and cust_code = #{custCode}
</if>
<if test="status != null and status != '' ">
and status = #{status}
</if>
</search>
But when the project started to get up , would like to ask , is this approach does not support it ?
------ Solution ------------- -------------------------------
is possible , Myibatis is support for custom Bean , but not parameterType; instead parameterClass
------ For reference only ----------------------------------- ----
ah , multi- use map type parameter , can not be a complex type ...
------ For reference only --------------- ------------------------
That I parameterType = "com.cl.shop.bean.CriteriaForm" changed
parameterClass = "com.cl.shop.bean.CriteriaForm" ?
I try
------ For reference only ------------------------------- --------
can, send out .. Thank you .
没有评论:
发表评论