doris支持mysql的协议,在使用mybaits连接doris数据库时,为了考虑方法的兼容性,数据库表的字段是动态拼接的,在其他数据库中没问题
但是再doris会出错,那么如何去掉字段中自动增加的’单引号呢?
mapper.xml传输接收参数时,#号改成$符号就可以实现!
代码实例中
<foreach item="value" collection="filters" index="">
and #{value.attributeKey}
....
</foreach>
改成:
<foreach item="value" collection="filters" index="">
and ${value.attributeKey}
....
</foreach>