1、CategoryMapper(一方) public interface CategoryMapper {@Select(" select * from category_ where id = #{id}")public Category get(int id);} 2、ProductMapper(多方) public interface ProductMapper {@Select(
1、ProductMapper public interface ProductMapper {@Select("select * from product_ where id = #{id}")public Product get(int id);} 2、OrderItemMapper 提供listByOrder方法,与Product建立多对一关系。 public interface