536 Star 5.1K Fork 1.9K

ssssssss-team/magic-api

 / 详情

mybatis语法解析有误

已完成
创建于  
2021-10-26 21:39

版本: 1.6.1
create.sql

create table test_data
(
    id   bigint not null primary key auto_increment,
    name varchar(100) null
);
insert into test_data
values (1, '1');
insert into test_data
values (2, '2');

api脚本

var sql = """
select * from test_data
<where>
    <if test='id != null'>
        and id = #{id}
    </if>
</where>
"""
return db.select(sql)

目前会解析为

select * from test_data WHERE

期望:

select * from test_data

评论 (0)

Sor1e 创建了任务 4年前
小东 任务状态待办的 修改为已完成 4年前
展开全部操作日志

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
2230599 sor1e 1596639599
Java
1
https://gitee.com/ssssssss-team/magic-api.git
git@gitee.com:ssssssss-team/magic-api.git
ssssssss-team
magic-api
magic-api

搜索帮助