{"id":16557989,"url":"https://github.com/typ0520/mybatis-cli","last_synced_at":"2025-07-14T08:09:59.839Z","repository":{"id":56884954,"uuid":"41860724","full_name":"typ0520/mybatis-cli","owner":"typ0520","description":"mybatis-cli","archived":false,"fork":false,"pushed_at":"2015-09-06T07:17:21.000Z","size":208,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-24T19:32:23.915Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/typ0520.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-03T13:19:00.000Z","updated_at":"2018-05-15T07:12:41.000Z","dependencies_parsed_at":"2022-08-20T23:10:57.846Z","dependency_job_id":null,"html_url":"https://github.com/typ0520/mybatis-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typ0520%2Fmybatis-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typ0520%2Fmybatis-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typ0520%2Fmybatis-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typ0520%2Fmybatis-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typ0520","download_url":"https://codeload.github.com/typ0520/mybatis-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219858827,"owners_count":16556040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T20:09:15.622Z","updated_at":"2024-10-11T20:09:16.905Z","avatar_url":"https://github.com/typ0520.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mybatis::Cli\n\n根据命令行参数生成mybatis对一张表增删改查的相关文件(po类、mapper类、mapper的xml)\n例如: test项目 目录结构如下\n```ruby\n.\n├── pom.xml\n└── src\n    └── main\n        ├── java\n        └── resources\n```\n\nt_user表的增删改查\n\n```ruby\nmybatis g -p com.test.dao.po -n user -m com.test.dao --list user_id username create_time update_time\n```\n\n执行后\n```ruby\n.\n├── pom.xml\n└── src\n    └── main\n        ├── java\n        │   └── com\n        │       └── test\n        │           └── dao\n        │               ├── mapper\n        │               │   └── UserMapper.java\n        │               └── po\n        │                   └── User.java\n        └── resources\n            └── com\n                └── test\n                    └── dao\n                        └── mapper\n                            └── UserMapper.xml\n```\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'mybatis-cli'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install mybatis-cli\n\n## Usage\n```ruby\nmybatis g -p com.test.dao.po -n user -m com.test.dao --list user_id username create_time update_time\n```\n\n```ruby\n  -n, --name=NAME                        # po class name\n  -p, [--package=PACKAGE]                # po class package name\n  -m, [--mapper-package=MAPPER_PACKAGE]  # mapper class package name\n  -t, [--tablename=TABLENAME]            # table name\n  -l, --list=one two three               # table columns\n  -h, [--help], [--no-help]              # Show this help message and quit\n\n```\nOptions:\n\n## Contributing\n\n1. Fork it ( https://github.com/typ0520/mybatis-cli/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyp0520%2Fmybatis-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyp0520%2Fmybatis-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyp0520%2Fmybatis-cli/lists"}