mybatis List<Map> 格式传值对sql进行操作问题

SELECT"Cid","LineId","LineName","StationId","StationName","Position","Remark","Create... SELECT
"Cid","LineId","LineName","StationId","StationName","Position","Remark",
"CreateTime","Creater","UpdateTime","Updater","TestFlag","Invalid"
FROM
"t"
WHERE "TestFlag" = 1
<if test="LineList != null">
<foreach collection="LineList" item="lineInfo">
and "LineId" = #{lineInfo.lineId,jdbcType=VARCHAR} and "StationId" = #{lineInfo.stationId,jdbcType=VARCHAR}
</foreach>
</if>
ORDER BY "UpdateTime" DESC

lineId和stationId为空,lineInfo里面有值
展开
 我来答
匿名用户
2015-06-30
展开全部
mybatis只管取值,根本就不会关心你的map里都有什么类型的数据。报错可能的情况是key对应的值与数据库的类型不匹配
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式