{"id":5190,"date":"2021-04-11T11:12:50","date_gmt":"2021-04-11T03:12:50","guid":{"rendered":"https:\/\/www.xttblog.com\/?p=5190"},"modified":"2021-04-11T11:17:33","modified_gmt":"2021-04-11T03:17:33","slug":"mybatis-plus%e4%b8%ad%e7%ab%9f%e7%84%b6%e8%bf%98%e5%8f%af%e4%bb%a5%e8%bf%99%e6%a0%b7%e5%88%86%e8%a1%a8","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=5190","title":{"rendered":"Mybatis-Plus\u4e2d\u7adf\u7136\u8fd8\u53ef\u4ee5\u8fd9\u6837\u5206\u8868"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">mybatis-plus\u8fd8\u53ef\u4ee5\u8fd9\u6837\u5206\u8868<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e3a\u4ec0\u4e48\u8981\u5206\u8868<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Mysql\u662f\u5f53\u524d\u4e92\u8054\u7f51\u7cfb\u7edf\u4e2d\u4f7f\u7528\u975e\u5e38\u5e7f\u6cdb\u7684\u5173\u7cfb\u6570\u636e\u5e93\uff0c\u5177\u6709ACID\u7684\u7279\u6027\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u662fmysql\u7684\u5355\u8868\u6027\u80fd\u4f1a\u53d7\u5230\u8868\u4e2d\u6570\u636e\u91cf\u7684\u9650\u5236\uff0c\u4e3b\u8981\u539f\u56e0\u662fB+\u6811\u7d22\u5f15\u8fc7\u5927\u5bfc\u81f4\u67e5\u8be2\u65f6\u7d22\u5f15\u65e0\u6cd5\u5168\u90e8\u52a0\u8f7d\u5230\u5185\u5b58\u3002\u8bfb\u53d6\u78c1\u76d8\u7684\u6b21\u6570\u53d8\u591a\uff0c\u800c\u78c1\u76d8\u7684\u6bcf\u6b21\u8bfb\u53d6\u5bf9\u6027\u80fd\u90fd\u6709\u5f88\u5927\u7684\u5f71\u54cd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u65f6\u4e00\u4e2a\u7b80\u5355\u53ef\u884c\u7684\u65b9\u6848\u5c31\u662f\u5206\u8868(\u5f53\u7136\u571f\u8c6a\u4e5f\u53ef\u4ee5\u5806\u786c\u4ef6)\uff0c\u5c06\u4e00\u5f20\u6570\u636e\u91cf\u5e9e\u5927\u7684\u8868\u7684\u6570\u636e\uff0c\u62c6\u5206\u5230\u591a\u4e2a\u8868\u4e2d\uff0c\u8fd9\u540c\u65f6\u4e5f\u51cf\u5c11\u4e86B+\u6811\u7d22\u5f15\u7684\u5927\u5c0f\uff0c\u51cf\u5c11\u78c1\u76d8\u8bfb\u53d6\u6b21\u6570\uff0c\u63d0\u9ad8\u6027\u80fd\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e24\u79cd\u57fa\u7840\u5206\u8868\u903b\u8f91<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf4\u5b8c\u4e86\u4e3a\u4ec0\u4e48\u8981\u5206\u8868\uff0c\u4e0b\u9762\u804a\u804a\u4e1a\u52a1\u5f00\u53d1\u4e2d\u5e38\u89c1\u7684\u4e24\u79cd\u57fa\u7840\u7684\u5206\u8868\u903b\u8f91\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6309\u65e5\u671f\u5206\u8868<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u79cd\u65b9\u5f0f\u901a\u5e38\u4f1a\u5728\u8868\u540d\u7684\u6700\u540e\u52a0\u4e0a\u5e74\u6708\u65e5\uff0c\u4e3b\u8981\u9002\u7528\u4e8e\u6309\u65e5\u671f\u5212\u5206\u7684\u7edf\u8ba1\u6570\u636e\u6216\u64cd\u4f5c\u8bb0\u5f55\u3002\u5728\u7ebf\u5b9e\u65f6\u5c55\u793a\u7684\u53ea\u6709\u6700\u8fd1\u8868\u4e2d\u7684\u6570\u636e\uff0c\u5176\u4ed6\u6570\u636e\u7528\u4e8e\u79bb\u7ebf\u7edf\u8ba1\u7b49\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6309id\u53d6\u6a21\u5206\u8868<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u79cd\u65b9\u5f0f\u9700\u8981\u4e00\u4e2aid\u751f\u6210\u5668\uff0c\u4f8b\u5982snowflake id\u6216\u5206\u5e03\u5f0fid\u670d\u52a1\u3002\u5b83\u4fdd\u8bc1\u4e86\u76f8\u540cid\u7684\u6570\u636e\u90fd\u5728\u4e00\u5f20\u8868\u4e2d\uff0c\u4e3b\u8981\u9002\u7528\u4e8e\u4fdd\u5b58\u7528\u6237\u57fa\u7840\u4fe1\u606f\uff0c\u7cfb\u7edf\u4e2d\u7684\u8d44\u6e90\u4fe1\u606f\uff0c\u8d2d\u4e70\u8bb0\u5f55\u7b49\u3002\u5f53\u7136\u8fd9\u79cd\u5206\u8868\u65b9\u5f0f\u6269\u5c55\u6027\u8f83\u5dee\uff0c\u540e\u671f\u6570\u636e\u6301\u7eed\u589e\u591a\u540e\u9700\u8981\u6309id\u5927\u5c0f\u5206\u5e93\u518d\u5206\u8868\u5904\u7406\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u770b\u4e0b\u8fd9\u4e24\u79cd\u5206\u8868\u903b\u8f91\u5728mybatis-plus\u4e2d\u7684\u5b9e\u73b0\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Mybatis-plus\u4e2d\u7684\u5206\u8868\u5b9e\u73b0<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf4\u5230java\u7684\u5206\u8868\u4e2d\u95f4\u4ef6\uff0c\u53ef\u80fd\u6709\u4eba\u4f1a\u60f3\u5230sharding-jdbc\uff0c\u4f5c\u4e3a\u4f7f\u7528\u5f88\u5e7f\u6cdb\u7684\u4e00\u4e2a\u5206\u8868\u4e2d\u95f4\u4ef6\uff0c\u529f\u80fd\u4e5f\u6bd4\u8f83\u5b8c\u5584\uff0c\u4f46\u662f\u4f7f\u7528\u5b83\u9700\u8981\u5f15\u5165\u989d\u5916\u7684jar\u5305\u548c\u589e\u52a0\u5b66\u4e60\u6210\u672c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9e\u9645\u4e0amybatis-plus\u672c\u8eab\u5c31\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5206\u8868\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u914d\u7f6e\u4f7f\u7528\u90fd\u5f88\u7b80\u5355\uff0c\u9002\u5408\u5feb\u901f\u5f00\u53d1\u7cfb\u7edf\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/xmt1139057136\/xttblog\/2021\/gggg.png\" alt=\"\" \/><figcaption>mybatis-plus\u5206\u8868<\/figcaption><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u52a8\u6001\u8868\u540d\u5904\u7406\u5668<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ca1\u9519\uff0cmybatis-plus\u63d0\u4f9b\u4e86\u52a8\u6001\u8868\u540d\u5904\u7406\u5668\u63a5\u53e3TableNameHandler\uff0c\u53ea\u9700\u8981\u5728\u7cfb\u7edf\u4e2d\u5b9e\u73b0\u8be5\u63a5\u53e3\uff0c\u5e76\u4f5c\u4e3a\u63d2\u4ef6\u52a0\u8f7d\u5230mybatis-plus\u4e2d\u5c31\u53ef\u4ee5\u4f7f\u7528\uff0c\u4e0b\u9762\u6765\u770b\u4e0b\u8be6\u7ec6\u7684\u6b65\u9aa4\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>\u275d<\/strong><\/p><p>3.4\u7248\u672c\u4e4b\u524d\u7684\u52a8\u6001\u8868\u540d\u63a5\u53e3\u662fITableNameHandler\uff0c\u9700\u8981\u548c\u5206\u9875\u63d2\u4ef6\u914d\u5408\u4f7f\u7528\u3002\n<br>\n3.4\u7248\u672c\u65b0\u589e\u4e86TableNameHandler\uff0c\u5728\u65b9\u6cd5\u53c2\u6570\u4e0a\u53d6\u6d88\u4e86MetaObject\u3002\u8fd9\u91cc\u7528\u6700\u65b0\u7684\u7248\u672c\u4e3a\u4f8b\uff0c\u4f7f\u7528\u65b9\u5f0f\u5dee\u522b\u4e0d\u5927\u3002\u275e<\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">\u5047\u8bbe\u6211\u4eec\u7684\u7cfb\u7edf\u4e2d\u6709\u4e24\u79cd\u5206\u8868\u65b9\u5f0f\uff0c\u6309\u65e5\u671f\u5206\u8868\u548c\u6309id\u53d6\u6a21\u5206\u8868\u3002\u901a\u8fc7\u56db\u4e2a\u6b65\u9aa4\u6765\u770b\u4e0b\u5177\u4f53\u7684\u4f7f\u7528\u793a\u4f8b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u521b\u5efa\u65e5\u671f\u8868\u540d\u5904\u7406\u5668<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u6765\u770b\u4e0b\u65e5\u671f\u5904\u7406\u7684\u8868\u540d\u5904\u7406\u5668\uff0c\u5b9e\u73b0TableNameHandler\u63a5\u53e3\u540e\uff0c\u5728dynamicTableName\u65b9\u6cd5\u4e2d\u5b9e\u73b0\u52a8\u6001\u751f\u6210\u8868\u540d\u7684\u903b\u8f91\uff0c\u65b9\u6cd5\u7684\u8fd4\u56de\u503c\u5c31\u662f\u67e5\u8be2\u65f6\u8981\u4f7f\u7528\u7684\u8868\u540d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * \u6309\u5929\u5206\u8868\u89e3\u6790\n *\/\npublic class DaysTableNameParser implements TableNameHandler {\n\n    @Override\n    public String dynamicTableName(String sql, String tableName) {\n        String dateDay = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyyMMdd\"));\n        return tableName + \"_\" + dateDay;\n    }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u521b\u5efaid\u53d6\u6a21\u8868\u540d\u5904\u7406\u5668<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u518d\u6765\u770b\u4e0b\u6309id\u53d6\u6a21\u8868\u540d\u5904\u7406\u5668\u7684\u5b9e\u73b0\uff0c\u8fd9\u4e2a\u5904\u7406\u5668\u76f8\u5bf9\u65e5\u671f\u5904\u7406\u5c31\u8981\u590d\u6742\u4e00\u4e9b\uff0c\u4e3b\u8981\u539f\u56e0\u4e3a\u9700\u8981\u52a8\u6001\u4f20\u5165\u7528\u4e8e\u5206\u8868\u7684id\u503c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u4e4b\u524d\u7684\u7248\u672c\u4e2d\u53ef\u4ee5\u5728\u65b9\u6cd5\u4e2d\u901a\u8fc7\u89e3\u6790MetaObject\u4e2d\u5e26\u6709\u7684sql\u67e5\u8be2\u4fe1\u606f\uff0c\u83b7\u53d6\u5206\u8868\u4f7f\u7528\u7684\u503c\u3002\u4f46\u662f\u8fd9\u79cd\u65b9\u5f0f\u6bd4\u8f83\u590d\u6742\uff0c\u5bf9\u4e8e\u4e0d\u540c\u7684QueryMapper\u5206\u6790\u7684\u65b9\u5f0f\u4e0d\u540c\uff0c\u6bd4\u8f83\u5bb9\u6613\u51fa\u9519\u3002\u65b0\u7248\u672c\u4e2d\u7684\u65b9\u6cd5\u53d6\u6d88\u4e86MetaObject\u53c2\u6570\uff0c\u9700\u8981\u4f7f\u7528\u5176\u4ed6\u65b9\u5f0f\u4f20\u5165\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8868\u540d\u5904\u7406\u5668\u662f\u4f5c\u4e3amybatis-plus\u7684\u63d2\u4ef6\uff0c\u5728\u9879\u76ee\u542f\u52a8\u65f6\u5b9e\u4f8b\u5316\u7684\u3002\u8fd9\u610f\u5473\u7740\uff0c\u5728\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u53ea\u6709\u4e00\u4e2a\u5bf9\u8c61\uff0c\u591a\u7ebf\u7a0b\u5904\u7406\u8fc7\u7a0b\u4e2d\uff0c\u4e00\u4e2a\u7ebf\u7a0b\u5bf9\u53c2\u6570\u7684\u4fee\u6539\uff0c\u4f1a\u5f71\u54cd\u5230\u5176\u4ed6\u7ebf\u7a0b\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528ThreadLocal\u6765\u5b9a\u4e49\u53c2\u6570\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7531\u4e8e\u73b0\u5728\u7684\u6846\u67b6\u4e2d\u5927\u90e8\u5206\u4f1a\u4f7f\u7528\u7ebf\u7a0b\u6c60\uff0c\u4f8b\u5982springboot web\u9879\u76ee\u4e2d\u7684tomcat\u3002\u6240\u4ee5\u5728\u6bcf\u6b21\u4f7f\u7528\u540e\uff0c\u9700\u8981\u624b\u52a8\u6e05\u9664\u672c\u6b21\u6570\u636e\uff0c\u9632\u6b62\u7ebf\u7a0b\u590d\u7528\u65f6\u7684\u5f71\u54cd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5177\u4f53\u5b9e\u73b0\u5982\u4e0b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * \u6309id\u53d6\u6a21\u5206\u8868\u5904\u7406\u5668\n *\/\npublic class IdModTableNameParser implements TableNameHandler {\n    private Integer mod;\n\n    \/\/\u4f7f\u7528ThreadLocal\u9632\u6b62\u591a\u7ebf\u7a0b\u76f8\u4e92\u5f71\u54cd\n    private static ThreadLocal&lt;Integer&gt; id = new ThreadLocal&lt;Integer&gt;();\n\n    public static void setId(Integer idValue) {\n        id.set(idValue);\n    }\n\n    IdModTableNameParser(Integer modValue) {\n        mod = modValue;\n    }\n\n    @Override\n    public String dynamicTableName(String sql, String tableName) {\n        Integer idValue = id.get();\n        if (idValue == null) {\n            throw new RuntimeException(\"\u8bf7\u8bbe\u7f6eid\u503c\");\n        } else {\n            String suffix = String.valueOf(idValue % mod);\n            \/\/\u8fd9\u91cc\u6e05\u9664ThreadLocal\u7684\u503c\uff0c\u9632\u6b62\u7ebf\u7a0b\u590d\u7528\u51fa\u73b0\u95ee\u9898\n            id.set(null);\n            return tableName + \"_\" + suffix;\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u52a0\u8f7d\u8868\u540d\u5904\u7406\u5668<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8868\u540d\u5904\u7406\u5668\u5b9e\u9645\u662fmybatis-plus\u7684\u63d2\u4ef6\uff0c\u9700\u8981\u5728\u521d\u59cb\u5316\u65f6\u521b\u5efa\u5b9e\u4f8b\u5e76\u52a0\u8f7d\u3002\u56e0\u4e3a\u7cfb\u7edf\u4e2d\u5b58\u5728\u4e24\u79cd\u5206\u8868\u7c7b\u578b\uff0c\u5728\u521d\u59cb\u5316\u65f6\u53ef\u4ee5\u6307\u5b9a\u6bcf\u5f20\u8868\u4f7f\u7528\u7684\u8868\u540d\u5904\u7406\u5668\u3002\u5177\u4f53\u5b9e\u73b0\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Configuration\n@MapperScan(basePackages = \"com.yourcom.proname.repository.mapper.mainDb*\", sqlSessionFactoryRef = \"mainSqlSessionFactory\")\npublic class MainDb {\n    @Bean(name = \"mainDataSource\")\n    @ConfigurationProperties(prefix = \"dbconfig.maindb\")\n    public DataSource druidDataSource() {\n        return DruidDataSourceBuilder.create().build();\n    }\n\n    @Bean(name = \"mainTransactionManager\")\n    public DataSourceTransactionManager masterTransactionManager(@Qualifier(value = \"mainDataSource\") DataSource dataSource) {\n        return new DataSourceTransactionManager(dataSource);\n    }\n\n    @Bean(name = \"mainSqlSessionFactory\")\n    @ConfigurationPropertiesBinding()\n    public SqlSessionFactory sqlSessionFactory(@Qualifier(value = \"mainDataSource\") DataSource dataSource) throws Exception {\n        MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean();\n        factoryBean.setDataSource(dataSource);\n       \/\/\u52a0\u8f7d\u63d2\u4ef6\n        factoryBean.setPlugins(mybatisPlusInterceptor());\n        return factoryBean.getObject();\n    }\n\n    @Bean\n    public MybatisPlusInterceptor mybatisPlusInterceptor() {\n        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();\n        DynamicTableNameInnerInterceptor dynamicTableNameInnerInterceptor = new DynamicTableNameInnerInterceptor();\n        HashMap&lt;String, TableNameHandler&gt; map = new HashMap&lt;String, TableNameHandler&gt;();\n\n        \/\/\u8fd9\u91cc\u4e3a\u4e0d\u540c\u7684\u8868\u8bbe\u7f6e\u5bf9\u5e94\u8868\u540d\u5904\u7406\u5668\n        map.put(\"user_daily_record\", new DaysTableNameParser());\n        map.put(\"user_consume_flow\", new IdModTableNameParser(10));\n\n        dynamicTableNameInnerInterceptor.setTableNameHandlerMap(map);\n        interceptor.addInnerInterceptor(dynamicTableNameInnerInterceptor);\n        return interceptor;\n    }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5728controller\u4e2d\u4f7f\u7528<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u901a\u8fc7controller\u4e2d\u7684\u4e09\u4e2a\u63a5\u53e3\uff0c\u5c55\u793a\u4e0b\u4f7f\u7528\u65b9\u5f0f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@RestController\npublic class TableTestController {\n    @Resource\n    IUserDailyRecordService userDailyRecordService;\n\n    @Resource\n    IUserConsumeFlowService userConsumeFlowService;\n\n    @GetMapping(\"user\/record\/today\")\n    public CommonResVo&lt;UserDailyRecord&gt; getRecordToday(Integer userId) throws Exception {\n        \/\/\u8fd9\u91cc\u5728\u67e5\u8be2\u65f6\uff0c\u4f1a\u6839\u636e\u7cfb\u7edf\u5f53\u524d\u65f6\u95f4\uff0c\u81ea\u52a8\u751f\u6210\u5f53\u5929\u7684\u8868\u540d\n        UserDailyRecord userDailyRecord = userDailyRecordService.getOne(new LambdaQueryWrapper&lt;UserDailyRecord&gt;().eq(UserDailyRecord::getUserId, userId));\n        return CommonResVo.success(userDailyRecord);\n    }\n\n    @GetMapping(\"user\/consume\/flow\")\n    public CommonResVo&lt;List&lt;UserConsumeFlow&gt;&gt; getConsumeFlow(Integer userId) throws Exception {\n        \/\/\u8bbe\u7f6e\u7528\u4e8e\u5206\u8868\u7684id\u503c\n        IdModTableNameParser.setId(userId);\n        List&lt;UserConsumeFlow&gt; userConsumeFlowList = userConsumeFlowService.list(new LambdaQueryWrapper&lt;UserConsumeFlow&gt;().eq(UserConsumeFlow::getUserId, userId));\n        return CommonResVo.success(userConsumeFlowList);\n    }\n\n    \/**\n     * \u65b0\u589e\u6570\u636e\n     *\/\n    @PostMapping(\"user\/consume\/flow\")\n    public CommonResVo&lt;Boolean&gt; addConsumeFlow(@RequestBody UserConsumeFlow userConsumeFlow) throws Exception {\n        Integer userId = userConsumeFlow.getUserId();\n        \/\/\u8bbe\u7f6e\u7528\u4e8e\u5206\u8868\u7684id\u503c\n        IdModTableNameParser.setId(userId);\n        userConsumeFlowService.save(userConsumeFlow);\n        return CommonResVo.success(true);\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u7bc7\u5bf9mybatis-plus\u52a8\u6001\u8868\u540d\u5904\u7406\u5668\u7684\u4ecb\u7ecd\uff0c\u901a\u8fc7\u5b9e\u73b0TableNameHandler\u63a5\u53e3\uff0c\u53ef\u4ee5\u6309\u5b9e\u9645\u60c5\u51b5\u7075\u6d3b\u5b9a\u4e49\u8868\u540d\u7684\u751f\u6210\u89c4\u5219\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u6709\u5e2e\u52a9\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=5190\">Mybatis-Plus\u4e2d\u7adf\u7136\u8fd8\u53ef\u4ee5\u8fd9\u6837\u5206\u8868<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>mybatis-plus\u8fd8\u53ef\u4ee5\u8fd9\u6837\u5206\u8868 \u4e3a\u4ec0\u4e48\u8981\u5206\u8868 Mysql\u662f\u5f53\u524d\u4e92\u8054\u7f51\u7cfb\u7edf\u4e2d\u4f7f\u7528\u975e\u5e38\u5e7f\u6cdb\u7684\u5173\u7cfb\u6570\u636e\u5e93\uff0c\u5177 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1037,1653,83,1350,1522],"class_list":["post-5190","post","type-post","status-publish","format-standard","hentry","category-java","tag-mybatis","tag-mybatisplus","tag-mysql","tag-spring-mvc","tag-springboot"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5190"}],"version-history":[{"count":2,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5190\/revisions"}],"predecessor-version":[{"id":5192,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5190\/revisions\/5192"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}