You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
982 B
39 lines
982 B
package com.base;
|
|
|
|
import tk.mybatis.mapper.common.Mapper;
|
|
import org.apache.ibatis.annotations.InsertProvider;
|
|
import org.apache.ibatis.annotations.Options;
|
|
import tk.mybatis.mapper.provider.SqlServerProvider;
|
|
|
|
|
|
/**
|
|
* Mapper 基本类接口
|
|
* @param <T>
|
|
*/
|
|
public interface MapperBase<T> extends Mapper<T>
|
|
{
|
|
|
|
/**
|
|
* 插入数据库,`null`值也会插入,不会使用列的默认值
|
|
*
|
|
* @param record
|
|
* @return
|
|
*/
|
|
@Options(useGeneratedKeys = true, keyProperty = "id")
|
|
@InsertProvider(type = SqlServerProvider.class, method = "dynamicSQL")
|
|
@Override
|
|
int insert(T record);
|
|
|
|
/**
|
|
* 插入数据库,`null`值也会插入,不会使用列的默认值
|
|
*
|
|
* @param record
|
|
* @return
|
|
*/
|
|
@Options(useGeneratedKeys = true, keyProperty = "id")
|
|
@InsertProvider(type = SqlServerProvider.class, method = "dynamicSQL")
|
|
@Override
|
|
int insertSelective(T record);
|
|
|
|
}
|