1 Star 1 Fork 0

chenjh / tk.mybatis mapper扩展功能

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

#tk.mybatis mapper扩展功能

Quick Start

http://localhost:8080/index.html

基于tk.mybatis mapper

见: https://gitee.com/free/Mapper

目标

  • 支持对常用功能的统计,查询,以简化查询功能。
  • 增加一些新特性。

功能特性

  • 支持selectIds select id from table_name where condition
  • 支持selectMaxId select max(id) from table_name where condition
  • 支持selectCountExist select exists(select 1 from table_name where condition limit 1)
  • 支持selectCountExistByExample select exists(select 1 from table_name where condition limit 1)
  • 支持selectCountAndMinMaxTimeByExample select count(*) count,min(create_time),max(create_time) from table_name where
  • 支持sharding-jdbc注解,见mapper-sharding模块
    • 支持按id取模分表
    • 支持按时间分表(按日/月或年),表名格式支持日期格化yyyy-MM-dd HH配置

使用

  • 配置见:MybatisConfiguration.java,MybatisLoadInit.java
  • 使用见DflRoleBiz.java

演示示例

见: IDflRoleBizMapperExtTest.java

MIT License Copyright (c) 2022 chenjh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

tk.mybatis mapper扩展功能,增加selectCount,selectExist,selectMaxId, selectMaxCreateTime等功能,并支持sharding-jdbc 注解模式 展开 收起
JavaScript 等 6 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/asgards/mapper-ext.git
git@gitee.com:asgards/mapper-ext.git
asgards
mapper-ext
tk.mybatis mapper扩展功能
master

搜索帮助