Ai
1 Star 0 Fork 0

/example

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
example.html 2.31 KB
一键复制 编辑 原始数据 按行查看 历史
zxj 提交于 2023-11-05 00:28 +08:00 . edit doc
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "https://raw.githubusercontent.com/rbatis/rbatis/master/rbatis-codegen/mybatis-3-mapper.dtd">
<mapper>
<sql id="a">` and id != '' `</sql>
<insert id="insert">
`insert into activity`
<foreach collection="arg" index="key" item="item" open="(" close=")" separator=",">
<if test="key == 'id'">
<continue/>
</if>
${key}
</foreach>
` values `
<foreach collection="arg" index="key" item="item" open="(" close=")" separator=",">
<if test="key == 'id'">
<continue/>
</if>
${item}
</foreach>
</insert>
<select id="select_by_condition">
`select * from activity`
<where>
<include refid="a"></include>
<include refid="file://../example/example.html?refid=a"></include>
<if test="name != ''">
` and name like #{name}`
</if>
<if test="dt >= '2009-12-12 00:00:00'">
` and create_time < #{dt}`
</if>
<choose>
<when test="true">
` and id != '-1'`
</when>
<otherwise>and id != -2</otherwise>
</choose>
` and `
<trim prefixOverrides=" and">
` and name != '' `
</trim>
</where>
</select>
<select id="select_page_data">
`select `
<if test="do_count == true">
`count(1)`
</if>
<if test="do_count == false">
`*`
</if>
` from activity`
<where>
<if test="name != ''">
` and name like #{name}`
</if>
<if test="dt >= '2009-12-12 00:00:00'">
` and create_time < #{dt}`
</if>
<choose>
<when test="true">
` and id != '-1'`
</when>
<otherwise>and id != -2</otherwise>
</choose>
` and `
<trim prefixOverrides=" and">
` and name != '' `
</trim>
<if test="do_count == false">
` limit ${page_no},${page_size}`
</if>
</where>
</select>
</mapper>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Rust
1
https://gitee.com/pgleo/example.git
git@gitee.com:pgleo/example.git
pgleo
example
example
main

搜索帮助