<?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.gxwebsoft.common.system.mapper.TenantSubscriptionOrderMapper">

  <!-- 分页查询订单 -->
  <select id="selectPageByTenant" resultType="com.gxwebsoft.common.system.entity.TenantSubscriptionOrder">
    SELECT *
    FROM sys_tenant_subscription_order
    WHERE tenant_id = #{tenantId}
    ORDER BY create_time DESC
  </select>

  <!-- 根据订单号查询 -->
  <select id="selectByOrderNo" resultType="com.gxwebsoft.common.system.entity.TenantSubscriptionOrder">
    SELECT *
    FROM sys_tenant_subscription_order
    WHERE order_no = #{orderNo}
    LIMIT 1
  </select>

</mapper>
