mybaits返回List

如下:

<select id="GetNormalOrderIdListByOrderList" resultType="java.lang.String" parameterType="java.util.Map">
    select t.order_id from order_unusual_header t
    where t.isbarcode_error=0 and t.isaddress_error=0 and t.tenant_id=${tenantId}
    <if test="orderList != null and orderList.size > 0">
        and t.order_id in
        <foreach collection="orderList" open="(" separator="," close=")" item="order">
            #{order,jdbcType=VARCHAR}
        foreach>
    if>
select>
返回类型设置为String,即可:
resultType="java.lang.String"


你可能感兴趣的:(----mybatis)