<result property="name" column="user_name"/>
<result property="email" column="user_email"/>


SELECT COUNT(*) FROM users

<result property="username" column="username"/>
<result property="email" column="email"/>
<association property="profile" javaType="UserProfile">
<id property="profileId" column="profile_id"/>
<result property="realName" column="real_name"/>
<result property="birthday" column="birthday"/>
<result property="address" column="address"/>
</association>
<setting name="aggressiveLazyLoading" value="false"/>
public class OrderVO {
private Long orderId;
private String orderNo;
private BigDecimal totalAmount;
private User user; // 下单用户
private Address address; // 收货地址
private List<OrderItem> items; // 订单项列表
private List<OrderLog> logs; // 订单日志
}
你可能想看: