0
点赞
收藏
分享

微信扫一扫

mybatis UpdateByExampleMapper UpdateByExampleSelectiveMapper

 

/**
* 通用Mapper接口,Example查询
*
* @param <T> 不能为空
* @author liuzh
*/
public interface UpdateByExampleSelectiveMapper<T> {

/**不是null的属性值
*
* @param record
* @param example
* @return
*/
@UpdateProvider(type = ExampleProvider.class, method = "dynamicSQL")
int updateByExampleSelective(@Param("record") T record, @Param("example") Object example);

}

 

 

 

/**
* 通用Mapper接口,Example查询
*
* @param <T> 不能为空
* @author liuzh
*/
public interface UpdateByExampleMapper<T> {

/**全部属性,null值会被更新@param record
* @param example
* @return
*/
@UpdateProvider(type = ExampleProvider.class, method = "dynamicSQL")
int updateByExample(@Param("record") T record, @Param("example") Object example);

}

 



举报

相关推荐

0 条评论