¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.lf.server.extend; |
| | | |
| | | import com.baomidou.mybatisplus.core.injector.AbstractMethod; |
| | | import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector; |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * èªå®ä¹æ¹æ³SQL注å
¥å¨ |
| | | * @author WWW |
| | | */ |
| | | public class CustomizedSqlInjector extends DefaultSqlInjector { |
| | | /** |
| | | * 妿åªéå¢å æ¹æ³ï¼ä¿çmybatis plusèªå¸¦æ¹æ³ï¼ |
| | | * å¯ä»¥å
è·åsuper.getMethodList()ï¼åæ·»å add |
| | | */ |
| | | @Override |
| | | public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) { |
| | | List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo); |
| | | methodList.add(new InsertBatchMethod()); |
| | | methodList.add(new UpdateBatchMethod()); |
| | | |
| | | return methodList; |
| | | } |
| | | } |