常用方法
public class User implements Serializable {
private Integer id;
private String username;
private String address;
private String sex;
private Date birthday;
}
public class Account implements Serializable {
private Integer id;
private Integer uid;
private Double money;
}
public class AccountUser extends Account {
private String username;
private String address;
}
<mapper namespace="com.dao.IAccountDao">
<!-- 配置查询所有操作-->
<select id="findAll" resultType="accountuser">
select a.*,u.username,u.address from account a,user u where a.uid =u.id;
</select>
</mapper>