新增接口: BaseRepository

This commit is contained in:
jiangdingxuan
2024-01-08 10:26:14 +08:00
parent cddb02d8cd
commit 0c6fbae438
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package net.rzdata.demo.trait;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public abstract class BaseRepository<T, M extends BaseMapper<T>> {
private final transient M mapper;
public BaseRepository(M mapper) {
this.mapper = mapper;
}
public M get() {
return this.mapper;
}
}