错误原因:注解使用错误@Insert
public interface OrderMapper {
@Insert("select *,o.id oid from orders o,user u where o.uid = u.id")
@Results({
@Result(column = "oid",property = "id"),
@Result(column = "ordertime",property = "ordertime"),
@Result(column = "total",property = "total"),
@Result(column = "uid",property = "user.id"),
@Result(column = "username",property = "user.username"),
@Result(column = "password",property = "user.password")
})
public List<Order> findAll();
}
改正注解:@Select