xiaoyong931011
2020-07-14 d15555767aee94413eaf36f61cf482ae4a421c07
src/main/resources/mapper/modules/MemberMapper.xml
@@ -79,7 +79,7 @@
         FROM
            member
         WHERE
            account_type = '1'
            account_type = '2'
         AND account_status = '1'
      )
   </select>
@@ -97,7 +97,7 @@
         FROM
            member
         WHERE
            account_type = '1'
            account_type = '2'
         AND account_status = '1'
      )
   </select>
@@ -116,7 +116,7 @@
         FROM
            member
         WHERE
            account_type = '1'
            account_type = '2'
         AND account_status = '1'
      )
   </select>
@@ -134,28 +134,19 @@
         FROM
            member
         WHERE
            account_type = '1'
            account_type = '2'
         AND account_status = '1'
      )
   </select>
   <select id="selectReturnMoneyForBasicRealData" resultType="java.lang.String">
      SELECT
         IFNULL(SUM(s.amount),'0')
         IFNULL(SUM(s.amount), '0')
      FROM
         member_account_money_change s
      WHERE
         s.type = 3
      AND s.content LIKE '%佣金入账%'
      AND s.content LIKE '%佣金到账%'
      AND s. STATUS = '1'
      AND s.member_id NOT IN (
         SELECT
            id
         FROM
            member
         WHERE
            account_type = '1'
         AND account_status = '1'
      )
   </select>
   <select id="selectClosingpriceForBasicRealData" resultType="java.lang.String">
      SELECT
@@ -163,7 +154,7 @@
      FROM
         contract_order a
      WHERE
         a.closing_type IN (2, 3)
      a.closing_type = '0'
         and a.order_status = '1'
      AND a.member_id NOT IN (
         SELECT
@@ -171,7 +162,7 @@
         FROM
            member
         WHERE
            account_type = '1'
            account_type = '2'
         AND account_status = '1'
      )
   </select>
@@ -181,7 +172,7 @@
      FROM
         contract_order a
      WHERE
         a.closing_type IN (4, 5, 6, 7, 8, 9)
         a.closing_type IN (2,3,4, 5, 6, 7, 8, 9)
         and a.order_status = '1'
      AND a.member_id NOT IN (
         SELECT
@@ -189,35 +180,26 @@
         FROM
            member
         WHERE
            account_type = '1'
            account_type = '2'
         AND account_status = '1'
      )
   </select>
   <select id="selectRewardratioForBasicRealData" resultType="java.lang.String">
      SELECT
         IFNULL(SUM(a.reward_amount),'0')
         IFNULL(SUM(a.reward_amount), '0')
      FROM
         contract_order a
      WHERE
         a.closing_type IN (4, 5, 6, 7, 8, 9)
         and a.order_status = '1'
         a.closing_type IN (2,3,4, 5, 6, 7, 8, 9)
      AND a.order_status = '1'
      AND a.member_id NOT IN (
         SELECT
            id
         FROM
            member
         WHERE
            account_type = '1'
            account_type = '2'
         AND account_status = '1'
         AND a.member_id NOT IN (
            SELECT
               id
            FROM
               member
            WHERE
               account_type = '1'
            AND account_status = '1'
         )
      )
   </select>
   <select id="selectSFCCForBasicRealData" resultType="java.lang.String">
@@ -226,22 +208,20 @@
      FROM
         (
            SELECT
               a.id
               s.id
            FROM
               contract_order a
               contract_hold_order s
            WHERE
               a. closing_type IN (2, 3)
               AND a.member_id NOT IN (
               s.member_id IN (
                  SELECT
                     id
                  FROM
                     member
                  WHERE
                     account_type = '1'
                  AND account_status = '1'
               )
            GROUP BY
               a.member_id
               s.member_id
         ) b
   </select>
   <select id="selectBBZHForBasicRealData" resultType="java.lang.String">
@@ -258,7 +238,7 @@
         FROM
            member
         WHERE
            account_type = '1'
            account_type = '2'
         AND account_status = '1'
      )
   </select>
@@ -276,7 +256,7 @@
         FROM
            member
         WHERE
            account_type = '1'
            account_type = '2'
         AND account_status = '1'
      )
   </select>
@@ -292,7 +272,7 @@
            FROM
               member
            WHERE
               account_type = '1'
               account_type = '2'
            AND account_status = '1'
         )
   </select>
@@ -309,7 +289,7 @@
         FROM
            member
         WHERE
            account_type = '1'
            account_type = '2'
         AND account_status = '1'
      )
   </select>
@@ -325,7 +305,7 @@
            FROM
               member
            WHERE
               account_type = '1'
               account_type = '2'
            AND account_status = '1'
         )
   </select>
@@ -341,7 +321,7 @@
            FROM
               member
            WHERE
               account_type = '1'
               account_type = '2'
            AND account_status = '1'
         )
   </select>