Commit 84313b29 authored by Anthony.Suerte's avatar Anthony.Suerte

User Transaction Query Replacement

parent b18dcacc
......@@ -4655,418 +4655,354 @@ WHERE
</LIST_USER_TRANSACTION_ADMIN_COUNT>
<SELECT_USER_TRANSACTION_ADMIN_COUNT>
SELECT
(remitter + receiver + deposit + withdrawal + benef_exchange
+ debit_exchange + from_request + to_request + with1 + with2 + with3 ) AS 'overall_total'
FROM (
SELECT
(SELECT COUNT(*) FROM (SELECT /* 通常入金 */
create_time AS transaction_time
, deposit_date AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(deposit_date, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '1' AS transaction_type
, '' AS withdraw_account_number
, user_account AS deposit_account_number
, '' AS withdraw_amount
, '' AS withdraw_fee
, amount AS deposit_amount
, fee AS deposit_fee
, '' AS rate
, currency AS deposit_currency
, '' AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, message AS message
, method AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_deposit
WHERE
user_account = '__ELEMENT01__'
AND NOW() + INTERVAL 17 HOUR > deposit_date
AND currency = '__ELEMENT02__') deposit_sub
LEFT OUTER JOIN
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account)
WHERE 1 __ELEMENT03__
) deposit,
(SELECT COUNT(*) FROM (SELECT /* 通常出金 */
create_time AS transaction_time
, process_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(process_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '2' AS transaction_type
, '' AS withdraw_account_number
, '' AS deposit_account_number
, debit_amount AS withdraw_amount
, fee AS withdraw_fee
, '' AS deposit_amount
, '' AS deposit_fee
, '' AS rate
, '' AS deposit_currency
, debit_currency AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, TYPE AS TYPE
, STATUS AS STATUS
, receipt_message AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
SELECT COUNT(*) as 'overall_total' FROM (
SELECT /* 通常入金 */
create_time AS transaction_time
, deposit_date AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(deposit_date, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '1' AS transaction_type
, '' AS withdraw_account_number
, user_account AS deposit_account_number
, '' AS withdraw_amount
, '' AS withdraw_fee
, amount AS deposit_amount
, fee AS deposit_fee
, '' AS rate
, currency AS deposit_currency
, '' AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, message AS message
, method AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_deposit
WHERE
user_account = '__ELEMENT01__'
AND NOW() + INTERVAL 17 HOUR > deposit_date
AND currency = '__ELEMENT02__'
UNION
SELECT /* 両替(入金) */
create_time AS transaction_time
, create_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(create_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '3' AS transaction_type
, '' AS withdraw_account_number
, user_account AS deposit_account_number
, 0 AS withdraw_amount
, '' AS withdraw_fee
, amount AS deposit_amount
, 0 AS deposit_fee
, '' AS rate
, currency AS deposit_currency
, '' AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, '' AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_exchange
WHERE
user_account = '__ELEMENT01__'
AND currency = '__ELEMENT02__'
UNION
SELECT /* 通常出金 */
create_time AS transaction_time
, process_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(process_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '2' AS transaction_type
, '' AS withdraw_account_number
, '' AS deposit_account_number
, debit_amount AS withdraw_amount
, fee AS withdraw_fee
, '' AS deposit_amount
, '' AS deposit_fee
, '' AS rate
, '' AS deposit_currency
, debit_currency AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, TYPE AS TYPE
, STATUS AS STATUS
, receipt_message AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_withdraw
WHERE
user_account = '__ELEMENT01__'
AND STATUS &lt;= '3'
AND debit_currency = '__ELEMENT02__'
AND (TYPE = '0'
OR TYPE = '3'
OR TYPE = '1')
UNION
SELECT /* 両替(出金) */
create_time AS transaction_time
, create_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(create_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '4' AS transaction_type
, user_account AS withdraw_account_number
, 0 AS deposit_account_number
, debit_amount AS withdraw_amount
, 0 AS withdraw_fee
, 0 AS deposit_amount
, '' AS deposit_fee
, '' AS rate
, '' AS deposit_currency
, debit_currency AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, '' AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_exchange
WHERE
user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__'
UNION
SELECT /* 口座振替(出金) */
create_time AS transaction_time
, create_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(create_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '5' AS transaction_type
, from_account AS withdraw_account_number
, to_account AS deposit_account_number
, debit_amount AS withdraw_amount
, from_fee AS withdraw_fee
, '' AS deposit_amount
, '' AS deposit_fee
, '' AS rate
, '' AS deposit_currency
, debit_currency AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, message AS message
, '' AS method
, msecond AS msecond
, process_status AS process_status
FROM
t_transfer
WHERE
user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__'
UNION
SELECT /* 口座振替(入金) */
create_time AS transaction_time
, create_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(create_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '6' AS transaction_type
, from_account AS withdraw_account_number
, to_account AS deposit_account_number
, '' AS withdraw_amount
, '' AS withdraw_fee
, transfer_amount AS deposit_amount
, to_fee AS deposit_fee
, '' AS rate
, transfer_currency AS deposit_currency
, '' AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, message AS message
, '' AS method
, msecond AS msecond
, process_status AS process_status
FROM
t_transfer
WHERE
to_account = '__ELEMENT01__'
AND transfer_currency = '__ELEMENT02__'
UNION
SELECT /* 引き落し(出金) */
update_time AS transaction_time
, update_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(update_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '7' AS transaction_type
, from_account AS withdraw_account_number
, to_account AS deposit_account_number
, debit_amount AS withdraw_amount
, from_fee AS withdraw_fee
, '' AS deposit_amount
, '' AS deposit_fee
, '' AS rate
, '' AS deposit_currency
, debit_currency AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, message AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_request
WHERE
from_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__'
AND STATUS = 1
UNION
SELECT /* 引き落し(入金) */
update_time AS transaction_time
, update_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(update_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '8' AS transaction_type
, from_account AS withdraw_account_number
, to_account AS deposit_account_number
, '' AS withdraw_amount
, '' AS withdraw_fee
, amount AS deposit_amount
, to_fee AS deposit_fee
, '' AS rate
, currency AS deposit_currency
, '' AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, message AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_request
WHERE
to_account = '__ELEMENT01__'
AND currency = '__ELEMENT02__'
AND STATUS = 1
UNION
SELECT /* 出金(組戻し) */
create_time AS transaction_time
, process_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(process_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '9' AS transaction_type
, '' AS withdraw_account_number
, user_account AS deposit_account_number
, debit_amount AS withdraw_amount
, '' AS withdraw_fee
, debit_amount AS deposit_amount
, (fee + fee_refund) AS deposit_fee
, '' AS rate
, debit_currency AS deposit_currency
, '' AS withdraw_currency
, 0 AS debit_currency
, 0 AS debit_amount
, 0 AS TYPE
, STATUS AS STATUS
, '' AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_withdraw
WHERE
user_account = '__ELEMENT01__'
AND STATUS &lt;= '3'
AND debit_currency = '__ELEMENT02__'
AND (TYPE = '0'
OR TYPE = '3'
OR TYPE = '1')) withdraw_sub
LEFT OUTER JOIN
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account)
WHERE 1 __ELEMENT03__
) withdrawal,
(SELECT COUNT(*) FROM (SELECT /* 両替(入金) */
create_time AS transaction_time
, create_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(create_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '3' AS transaction_type
, '' AS withdraw_account_number
, user_account AS deposit_account_number
, 0 AS withdraw_amount
, '' AS withdraw_fee
, amount AS deposit_amount
, 0 AS deposit_fee
, '' AS rate
, currency AS deposit_currency
, '' AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, '' AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_exchange
WHERE
user_account = '__ELEMENT01__'
AND currency = '__ELEMENT02__') exchange_sub
LEFT OUTER JOIN
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account)
WHERE 1 __ELEMENT03__
) benef_exchange,
(SELECT COUNT(*) FROM (SELECT /* 両替(出金) */
create_time AS transaction_time
, create_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(create_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '4' AS transaction_type
, user_account AS withdraw_account_number
, 0 AS deposit_account_number
, debit_amount AS withdraw_amount
, 0 AS withdraw_fee
, 0 AS deposit_amount
, '' AS deposit_fee
, '' AS rate
, '' AS deposit_currency
, debit_currency AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, '' AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_exchange
WHERE
user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__') exchange_sub
LEFT OUTER JOIN
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account)
WHERE 1 __ELEMENT03__
) debit_exchange,
(SELECT COUNT(*) FROM (SELECT /* 口座振替(出金) */
create_time AS transaction_time
, create_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(create_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '5' AS transaction_type
, from_account AS withdraw_account_number
, to_account AS deposit_account_number
, debit_amount AS withdraw_amount
, from_fee AS withdraw_fee
, '' AS deposit_amount
, '' AS deposit_fee
, '' AS rate
, '' AS deposit_currency
, debit_currency AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, message AS message
, '' AS method
, msecond AS msecond
, process_status AS process_status
FROM
t_transfer
WHERE
user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__') transfer_sub
LEFT OUTER JOIN
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account)
WHERE 1 __ELEMENT03__
) remitter,
(SELECT COUNT(*) FROM (SELECT /* 口座振替(入金) */
create_time AS transaction_time
, create_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(create_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '6' AS transaction_type
, from_account AS withdraw_account_number
, to_account AS deposit_account_number
, '' AS withdraw_amount
, '' AS withdraw_fee
, transfer_amount AS deposit_amount
, to_fee AS deposit_fee
, '' AS rate
, transfer_currency AS deposit_currency
, '' AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, message AS message
, '' AS method
, msecond AS msecond
, process_status AS process_status
FROM
t_transfer
WHERE
to_account = '__ELEMENT01__'
AND transfer_currency = '__ELEMENT02__') transfer_sub
LEFT OUTER JOIN
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account)
WHERE 1 __ELEMENT03__
) receiver,
(SELECT COUNT(*) FROM (SELECT /* 引き落し(出金) */
update_time AS transaction_time
, update_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(update_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '7' AS transaction_type
, from_account AS withdraw_account_number
, to_account AS deposit_account_number
, debit_amount AS withdraw_amount
, from_fee AS withdraw_fee
, '' AS deposit_amount
, '' AS deposit_fee
, '' AS rate
, '' AS deposit_currency
, debit_currency AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, message AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_request
WHERE
from_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__'
AND STATUS = 1) request_sub
LEFT OUTER JOIN
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account)
WHERE 1 __ELEMENT03__
) from_request,
(SELECT COUNT(*) FROM (SELECT /* 引き落し(入金) */
update_time AS transaction_time
, update_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(update_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '8' AS transaction_type
, from_account AS withdraw_account_number
, to_account AS deposit_account_number
, '' AS withdraw_amount
, '' AS withdraw_fee
, amount AS deposit_amount
, to_fee AS deposit_fee
, '' AS rate
, currency AS deposit_currency
, '' AS withdraw_currency
, '' AS transfer_currency
, '' AS transfer_amount
, 0 AS TYPE
, 0 AS STATUS
, message AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_request
WHERE
to_account = '__ELEMENT01__'
AND currency = '__ELEMENT02__'
AND STATUS = 1) request_sub
LEFT OUTER JOIN
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account)
WHERE 1 __ELEMENT03__
) to_request,
(SELECT COUNT(*) FROM (SELECT /* 出金(組戻し) */
create_time AS transaction_time
, process_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(process_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '9' AS transaction_type
, '' AS withdraw_account_number
, user_account AS deposit_account_number
, debit_amount AS withdraw_amount
, '' AS withdraw_fee
, debit_amount AS deposit_amount
, (fee + fee_refund) AS deposit_fee
, '' AS rate
, debit_currency AS deposit_currency
, '' AS withdraw_currency
, 0 AS debit_currency
, 0 AS debit_amount
, 0 AS TYPE
, STATUS AS STATUS
, '' AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_withdraw
WHERE
STATUS = '4'
AND user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__') withdraw_sub
LEFT OUTER JOIN
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account)
WHERE 1 __ELEMENT03__
) with1,
(SELECT COUNT(*) FROM (SELECT /* 出金(キャンセル) */
create_time AS transaction_time
, process_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(process_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '10' AS transaction_type
, '' AS withdraw_account_number
, user_account AS deposit_account_number
, debit_amount AS withdraw_amount
, '' AS withdraw_fee
, debit_amount AS deposit_amount
, fee AS deposit_fee
, '' AS rate
, debit_currency AS deposit_currency
, '' AS withdraw_currency
, 0 AS debit_currency
, 0 AS debit_amount
, 0 AS TYPE
, STATUS AS STATUS
, '' AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_withdraw
WHERE
STATUS = '6'
AND user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__') withdraw_sub
LEFT OUTER JOIN
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account)
WHERE 1 __ELEMENT03__
) with2,
(SELECT COUNT(*) FROM (SELECT /* 账户休止金 */
create_time AS transaction_time
, process_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(process_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '11' AS transaction_type
, '' AS withdraw_account_number
, '' AS deposit_account_number
, debit_amount AS withdraw_amount
, fee AS withdraw_fee
, debit_amount AS deposit_amount
, '' AS deposit_fee
, '' AS rate
, '' AS deposit_currency
, debit_currency AS withdraw_currency
, 0 AS debit_currency
, 0 AS debit_amount
, 0 AS TYPE
, STATUS AS STATUS
, moneyout_solution AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_withdraw
WHERE
STATUS = '2'
AND user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__'
AND TYPE = '11') withdraw_sub
LEFT OUTER JOIN
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account)
WHERE 1 __ELEMENT03__
) with3
) counts
WHERE
STATUS = '4'
AND user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__'
UNION
SELECT /* 出金(キャンセル) */
create_time AS transaction_time
, process_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(process_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '10' AS transaction_type
, '' AS withdraw_account_number
, user_account AS deposit_account_number
, debit_amount AS withdraw_amount
, '' AS withdraw_fee
, debit_amount AS deposit_amount
, fee AS deposit_fee
, '' AS rate
, debit_currency AS deposit_currency
, '' AS withdraw_currency
, 0 AS debit_currency
, 0 AS debit_amount
, 0 AS TYPE
, STATUS AS STATUS
, '' AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_withdraw
WHERE
STATUS = '6'
AND user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__'
UNION
SELECT /* 账户休止金 */
create_time AS transaction_time
, process_time AS process_time
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
, DATE_FORMAT(process_time, '%Y/%m/%d') AS process_time_string
, transaction_number AS transaction_number
, '11' AS transaction_type
, '' AS withdraw_account_number
, '' AS deposit_account_number
, debit_amount AS withdraw_amount
, fee AS withdraw_fee
, debit_amount AS deposit_amount
, '' AS deposit_fee
, '' AS rate
, '' AS deposit_currency
, debit_currency AS withdraw_currency
, 0 AS debit_currency
, 0 AS debit_amount
, 0 AS TYPE
, STATUS AS STATUS
, moneyout_solution AS message
, '' AS method
, msecond AS msecond
, 0 AS process_status
FROM
t_withdraw
WHERE
STATUS = '2'
AND user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__'
AND TYPE = '11'
) AS trans_in
LEFT OUTER JOIN v_users_all AS withdraw_user
ON (trans_in.withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN v_users_all AS deposit_user
ON (trans_in.deposit_account_number = deposit_user.user_account)
WHERE 1
__ELEMENT03__
</SELECT_USER_TRANSACTION_ADMIN_COUNT>
<LIST_USER_TRANSACTION_ADMIN_COUNT_REVISED>
......
......@@ -24,11 +24,11 @@ class LogicAccountTransactions extends ModelAccountTransactions {
"overall_total");
$this -> setTotal($rowCount);
$start = ($this -> getTargetPage() - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT;
$start = ($this -> getTargetPage() - VAL_INT_1) * $this -> getDefaultPageCount();
$this -> setStart($start);
$where[] = " LIMIT {$start}, ".VAR_DEFAULT_PAGE_COUNT;
$where[] = " LIMIT {$start}, {$this -> getDefaultPageCount()}";
$this -> setResult($this -> accessSelect('LIST_USER_TRANSACTION_ADMIN', $where));
}
......
......@@ -366,7 +366,7 @@ class ModelAccountTransactions extends ModelClassEx {
public function dispPager() {
echo $this -> getPagerCommon($this -> getTargetPage()
, $this -> getTotalPageCommon(VAR_DEFAULT_PAGE_COUNT, $this -> total)
, $this -> getTotalPageCommon($this -> getDefaultPageCount(), $this -> total)
, $this -> total
, NO_STRING
, false);
......@@ -376,6 +376,10 @@ class ModelAccountTransactions extends ModelClassEx {
$this -> rs = $rs;
}
public function getDefaultPageCount(){
return VAL_INT_20;
}
public function getCurrency(){
return $this -> currency;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment