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

User Transaction Query Replacement

parent b18dcacc
...@@ -4655,418 +4655,354 @@ WHERE ...@@ -4655,418 +4655,354 @@ WHERE
</LIST_USER_TRANSACTION_ADMIN_COUNT> </LIST_USER_TRANSACTION_ADMIN_COUNT>
<SELECT_USER_TRANSACTION_ADMIN_COUNT> <SELECT_USER_TRANSACTION_ADMIN_COUNT>
SELECT SELECT COUNT(*) as 'overall_total' FROM (
(remitter + receiver + deposit + withdrawal + benef_exchange SELECT /* 通常入金 */
+ debit_exchange + from_request + to_request + with1 + with2 + with3 ) AS 'overall_total' create_time AS transaction_time
FROM ( , deposit_date AS process_time
SELECT , DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
(SELECT COUNT(*) FROM (SELECT /* 通常入金 */ , DATE_FORMAT(deposit_date, '%Y/%m/%d') AS process_time_string
create_time AS transaction_time , transaction_number AS transaction_number
, deposit_date AS process_time , '1' AS transaction_type
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string , '' AS withdraw_account_number
, DATE_FORMAT(deposit_date, '%Y/%m/%d') AS process_time_string , user_account AS deposit_account_number
, transaction_number AS transaction_number , '' AS withdraw_amount
, '1' AS transaction_type , '' AS withdraw_fee
, '' AS withdraw_account_number , amount AS deposit_amount
, user_account AS deposit_account_number , fee AS deposit_fee
, '' AS withdraw_amount , '' AS rate
, '' AS withdraw_fee , currency AS deposit_currency
, amount AS deposit_amount , '' AS withdraw_currency
, fee AS deposit_fee , '' AS transfer_currency
, '' AS rate , '' AS transfer_amount
, currency AS deposit_currency , 0 AS TYPE
, '' AS withdraw_currency , 0 AS STATUS
, '' AS transfer_currency , message AS message
, '' AS transfer_amount , method AS method
, 0 AS TYPE , msecond AS msecond
, 0 AS STATUS , 0 AS process_status
, message AS message FROM
, method AS method t_deposit
, msecond AS msecond WHERE
, 0 AS process_status user_account = '__ELEMENT01__'
FROM AND NOW() + INTERVAL 17 HOUR > deposit_date
t_deposit AND currency = '__ELEMENT02__'
WHERE UNION
user_account = '__ELEMENT01__' SELECT /* 両替(入金) */
AND NOW() + INTERVAL 17 HOUR > deposit_date create_time AS transaction_time
AND currency = '__ELEMENT02__') deposit_sub , create_time AS process_time
LEFT OUTER JOIN , DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account) , DATE_FORMAT(create_time, '%Y/%m/%d') AS process_time_string
LEFT OUTER JOIN , transaction_number AS transaction_number
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account) , '3' AS transaction_type
WHERE 1 __ELEMENT03__ , '' AS withdraw_account_number
) deposit, , user_account AS deposit_account_number
, 0 AS withdraw_amount
(SELECT COUNT(*) FROM (SELECT /* 通常出金 */ , '' AS withdraw_fee
create_time AS transaction_time , amount AS deposit_amount
, process_time AS process_time , 0 AS deposit_fee
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string , '' AS rate
, DATE_FORMAT(process_time, '%Y/%m/%d') AS process_time_string , currency AS deposit_currency
, transaction_number AS transaction_number , '' AS withdraw_currency
, '2' AS transaction_type , '' AS transfer_currency
, '' AS withdraw_account_number , '' AS transfer_amount
, '' AS deposit_account_number , 0 AS TYPE
, debit_amount AS withdraw_amount , 0 AS STATUS
, fee AS withdraw_fee , '' AS message
, '' AS deposit_amount , '' AS method
, '' AS deposit_fee , msecond AS msecond
, '' AS rate , 0 AS process_status
, '' AS deposit_currency FROM
, debit_currency AS withdraw_currency t_exchange
, '' AS transfer_currency WHERE
, '' AS transfer_amount user_account = '__ELEMENT01__'
, TYPE AS TYPE AND currency = '__ELEMENT02__'
, STATUS AS STATUS UNION
, receipt_message AS message SELECT /* 通常出金 */
, '' AS method create_time AS transaction_time
, msecond AS msecond , process_time AS process_time
, 0 AS process_status , DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
FROM , 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 t_withdraw
WHERE WHERE
user_account = '__ELEMENT01__' STATUS = '4'
AND STATUS &lt;= '3' AND user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__' AND debit_currency = '__ELEMENT02__'
AND (TYPE = '0' UNION
OR TYPE = '3' SELECT /* 出金(キャンセル) */
OR TYPE = '1')) withdraw_sub create_time AS transaction_time
LEFT OUTER JOIN , process_time AS process_time
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account) , DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
LEFT OUTER JOIN , DATE_FORMAT(process_time, '%Y/%m/%d') AS process_time_string
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account) , transaction_number AS transaction_number
WHERE 1 __ELEMENT03__ , '10' AS transaction_type
) withdrawal, , '' AS withdraw_account_number
, user_account AS deposit_account_number
(SELECT COUNT(*) FROM (SELECT /* 両替(入金) */ , debit_amount AS withdraw_amount
create_time AS transaction_time , '' AS withdraw_fee
, create_time AS process_time , debit_amount AS deposit_amount
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string , fee AS deposit_fee
, DATE_FORMAT(create_time, '%Y/%m/%d') AS process_time_string , '' AS rate
, transaction_number AS transaction_number , debit_currency AS deposit_currency
, '3' AS transaction_type , '' AS withdraw_currency
, '' AS withdraw_account_number , 0 AS debit_currency
, user_account AS deposit_account_number , 0 AS debit_amount
, 0 AS withdraw_amount , 0 AS TYPE
, '' AS withdraw_fee , STATUS AS STATUS
, amount AS deposit_amount , '' AS message
, 0 AS deposit_fee , '' AS method
, '' AS rate , msecond AS msecond
, currency AS deposit_currency , 0 AS process_status
, '' AS withdraw_currency FROM
, '' AS transfer_currency t_withdraw
, '' AS transfer_amount WHERE
, 0 AS TYPE STATUS = '6'
, 0 AS STATUS AND user_account = '__ELEMENT01__'
, '' AS message AND debit_currency = '__ELEMENT02__'
, '' AS method UNION
, msecond AS msecond SELECT /* 账户休止金 */
, 0 AS process_status create_time AS transaction_time
FROM , process_time AS process_time
t_exchange , DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string
WHERE , DATE_FORMAT(process_time, '%Y/%m/%d') AS process_time_string
user_account = '__ELEMENT01__' , transaction_number AS transaction_number
AND currency = '__ELEMENT02__') exchange_sub , '11' AS transaction_type
LEFT OUTER JOIN , '' AS withdraw_account_number
v_users_all AS withdraw_user ON(withdraw_account_number = withdraw_user.user_account) , '' AS deposit_account_number
LEFT OUTER JOIN , debit_amount AS withdraw_amount
v_users_all AS deposit_user ON(deposit_account_number = deposit_user.user_account) , fee AS withdraw_fee
WHERE 1 __ELEMENT03__ , debit_amount AS deposit_amount
) benef_exchange, , '' AS deposit_fee
, '' AS rate
(SELECT COUNT(*) FROM (SELECT /* 両替(出金) */ , '' AS deposit_currency
create_time AS transaction_time , debit_currency AS withdraw_currency
, create_time AS process_time , 0 AS debit_currency
, DATE_FORMAT(create_time, '%Y/%m/%d') AS transaction_time_string , 0 AS debit_amount
, DATE_FORMAT(create_time, '%Y/%m/%d') AS process_time_string , 0 AS TYPE
, transaction_number AS transaction_number , STATUS AS STATUS
, '4' AS transaction_type , moneyout_solution AS message
, user_account AS withdraw_account_number , '' AS method
, 0 AS deposit_account_number , msecond AS msecond
, debit_amount AS withdraw_amount , 0 AS process_status
, 0 AS withdraw_fee FROM
, 0 AS deposit_amount t_withdraw
, '' AS deposit_fee WHERE
, '' AS rate STATUS = '2'
, '' AS deposit_currency AND user_account = '__ELEMENT01__'
, debit_currency AS withdraw_currency AND debit_currency = '__ELEMENT02__'
, '' AS transfer_currency AND TYPE = '11'
, '' AS transfer_amount ) AS trans_in
, 0 AS TYPE LEFT OUTER JOIN v_users_all AS withdraw_user
, 0 AS STATUS ON (trans_in.withdraw_account_number = withdraw_user.user_account)
, '' AS message LEFT OUTER JOIN v_users_all AS deposit_user
, '' AS method ON (trans_in.deposit_account_number = deposit_user.user_account)
, msecond AS msecond WHERE 1
, 0 AS process_status __ELEMENT03__
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
</SELECT_USER_TRANSACTION_ADMIN_COUNT> </SELECT_USER_TRANSACTION_ADMIN_COUNT>
<LIST_USER_TRANSACTION_ADMIN_COUNT_REVISED> <LIST_USER_TRANSACTION_ADMIN_COUNT_REVISED>
......
...@@ -24,11 +24,11 @@ class LogicAccountTransactions extends ModelAccountTransactions { ...@@ -24,11 +24,11 @@ class LogicAccountTransactions extends ModelAccountTransactions {
"overall_total"); "overall_total");
$this -> setTotal($rowCount); $this -> setTotal($rowCount);
$start = ($this -> getTargetPage() - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT; $start = ($this -> getTargetPage() - VAL_INT_1) * $this -> getDefaultPageCount();
$this -> setStart($start); $this -> setStart($start);
$where[] = " LIMIT {$start}, ".VAR_DEFAULT_PAGE_COUNT; $where[] = " LIMIT {$start}, {$this -> getDefaultPageCount()}";
$this -> setResult($this -> accessSelect('LIST_USER_TRANSACTION_ADMIN', $where)); $this -> setResult($this -> accessSelect('LIST_USER_TRANSACTION_ADMIN', $where));
} }
......
...@@ -366,7 +366,7 @@ class ModelAccountTransactions extends ModelClassEx { ...@@ -366,7 +366,7 @@ class ModelAccountTransactions extends ModelClassEx {
public function dispPager() { public function dispPager() {
echo $this -> getPagerCommon($this -> getTargetPage() echo $this -> getPagerCommon($this -> getTargetPage()
, $this -> getTotalPageCommon(VAR_DEFAULT_PAGE_COUNT, $this -> total) , $this -> getTotalPageCommon($this -> getDefaultPageCount(), $this -> total)
, $this -> total , $this -> total
, NO_STRING , NO_STRING
, false); , false);
...@@ -376,6 +376,10 @@ class ModelAccountTransactions extends ModelClassEx { ...@@ -376,6 +376,10 @@ class ModelAccountTransactions extends ModelClassEx {
$this -> rs = $rs; $this -> rs = $rs;
} }
public function getDefaultPageCount(){
return VAL_INT_20;
}
public function getCurrency(){ public function getCurrency(){
return $this -> currency; 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