非常感谢。但是不明白您的意思,具体的文件如下,有两个,一个是 mapper.xml 另一个是 接口文件
1、XML文件 /mapper/xml/EmGiveHouseCurLevelMapper.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jeeplus.modules.em.mapper.EmGiveHouseCurLevelMapper">
<sql id="emGiveHouseCurLevelColumns">
a.id AS "id",
a.house_id AS "houseId",
a.level_id AS "levelId",
a.give_kwh AS "giveKwh",
a.give_kwh_have AS "giveKwhHave",
a.year AS "year",
a.create_by AS "createBy.id",
a.create_date AS "createDate",
a.update_by AS "updateBy.id",
a.update_date AS "updateDate"
</sql>
</mapper>
2、接口文件 /mapper/EmGiveHouseCurLevelMapper.java
package com.jeeplus.modules.em.mapper;
@MyBatisMapper
public interface EmGiveHouseCurLevelMapper extends BaseMapper<EmGiveHouseCurLevel> {
public EmGiveHouseCurLevel getGiveInfo(EmGiveHouseCurLevel entity);
public int updateWhenSell(EmGiveHouseCurLevel entity);
public List<EmGiveHouseCurLevel> findByLevelId(EmGiveHouseCurLevel entity);
}
为什么还要有 2 中的接口文件