int insertSelective(SrcTest record);
List selectByExample(SrcTestExample example);
SrcTest selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param(“record”) SrcTest record, @Param(“example”) SrcTestExample example);
int updateByExample(@Param(“record”) SrcTest record, @Param(“example”) SrcTestExample example);
int updateByPrimaryKeySelective(SrcTest record);
int updateByPrimaryKey(SrcTest record);
}
SrcTestMapperExt.java
package com.test.dao.mapper.srctest;
import com.test.dao.model.srctest.SrcTest;
import org.apache.ibatis.annotations.Param;
import javax.annotation.Resource;
import java.util.List;
/**
-
SrcTestMapperExt接口
-
Created by shirenchuang on 2018/6/30.
*/
@Resource
public interface SrcTestMapperExt extends SrcTestMapper {
List selectExtTest(@Param(“age”) int age);
}
SrcTestMapper.xml
<?xml version="1.0" encoding="UTF-8"?>
SrcTestMapperExt.xml
<?xml version="1.0" encoding="UTF-8"?>
select * from src_test where age>#{age}
注意:这里返回的resultMap=“BaseResultMap” 这个Map并没有再这个xml中定义,这样能使用吗?
上面是我生成的代码;并且能够正常使用;
那么SrcTestMapperExt.xml是如何继承SrcTestMapper.xml中的定义的呢?