{"action":"opened","issue":{"url":"https://api.github.com/repos/abel533/Mapper/issues/370","repository_url":"https://api.github.com/repos/abel533/Mapper","labels_url":"https://api.github.com/repos/abel533/Mapper/issues/370/labels{/name}","comments_url":"https://api.github.com/repos/abel533/Mapper/issues/370/comments","events_url":"https://api.github.com/repos/abel533/Mapper/issues/370/events","html_url":"https://github.com/abel533/Mapper/issues/370","id":345073834,"node_id":"MDU6SXNzdWUzNDUwNzM4MzQ=","number":370,"title":"批量插入接口insertList中泛型可否修改为通配符？","user":{"login":"Yanweichen","id":15867356,"node_id":"MDQ6VXNlcjE1ODY3MzU2","avatar_url":"https://avatars0.githubusercontent.com/u/15867356?v=4","gravatar_id":"","url":"https://api.github.com/users/Yanweichen","html_url":"https://github.com/Yanweichen","followers_url":"https://api.github.com/users/Yanweichen/followers","following_url":"https://api.github.com/users/Yanweichen/following{/other_user}","gists_url":"https://api.github.com/users/Yanweichen/gists{/gist_id}","starred_url":"https://api.github.com/users/Yanweichen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yanweichen/subscriptions","organizations_url":"https://api.github.com/users/Yanweichen/orgs","repos_url":"https://api.github.com/users/Yanweichen/repos","events_url":"https://api.github.com/users/Yanweichen/events{/privacy}","received_events_url":"https://api.github.com/users/Yanweichen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-27T03:01:19Z","updated_at":"2018-07-27T03:01:19Z","closed_at":null,"author_association":"NONE","body":"``` java\r\n/**\r\n * 通用Mapper接口,特殊方法，批量插入，支持批量插入的数据库都可以使用，例如mysql,h2等\r\n *\r\n * @param <T> 不能为空\r\n * @author liuzh\r\n */\r\n@tk.mybatis.mapper.annotation.RegisterMapper\r\npublic interface InsertListMapper<T> {\r\n\r\n    /**\r\n     * 批量插入，支持批量插入的数据库可以使用，例如MySQL,H2等，另外该接口限制实体包含`id`属性并且必须为自增列\r\n     *\r\n     * @param recordList\r\n     * @return\r\n     */\r\n    @Options(useGeneratedKeys = true, keyProperty = \"id\")\r\n    @InsertProvider(type = SpecialProvider.class, method = \"dynamicSQL\")\r\n    int insertList(List<T> recordList);\r\n}\r\n```\r\n这个接口能否改为\r\n``` java\r\n int insertList(List<? extends T> recordList);\r\n```\r\n这样在批量插入子类时会比较方便"}}
{"actor":{"display_login":"Yanweichen"}}