Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iwl-live
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anthony.Suerte
iwl-live
Commits
c5795e66
Commit
c5795e66
authored
Jan 24, 2022
by
Antonio.Suerte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BI API Enhancement
parent
117ddd06
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
94 additions
and
28 deletions
+94
-28
ParamHolder.php
bi/modules/ParamHolder.php
+6
-0
TransactionManager.php
bi/modules/TransactionManager.php
+5
-0
MoneyOutTransactions.php
bi/modules/open/MoneyOutTransactions.php
+11
-1
OverallTransactions.php
bi/modules/open/OverallTransactions.php
+14
-3
UserList.php
bi/modules/open/UserList.php
+14
-6
ProcessingHistory.php
bi/modules/traits/ProcessingHistory.php
+14
-3
ValidationExpression.php
bi/modules/traits/ValidationExpression.php
+5
-0
Withdrawal.php
bi/modules/traits/Withdrawal.php
+12
-1
sql.xml
system/lib/sql.xml
+4
-4
model.php
system/logic/transaction/model.php
+8
-9
logic.php
system/logic/withdraw/logic.php
+1
-1
No files found.
bi/modules/ParamHolder.php
View file @
c5795e66
...
...
@@ -434,6 +434,12 @@ class ParamHolder{
*/
public
$dateOfAccountSuspensionTo
;
/**
*
* @var int
*/
public
$orderByAlgorithm
;
/**
*
* @var object
...
...
bi/modules/TransactionManager.php
View file @
c5795e66
...
...
@@ -56,6 +56,11 @@ class TransactionManager extends RequestUtil {
$this
->
paramHolder
->
userAccount
=
$this
->
requestParam
(
"userAccount"
,
true
);
$this
->
paramHolder
->
view
=
$this
->
requestParam
(
"view"
,
true
);
$this
->
paramHolder
->
currency
=
$this
->
requestParam
(
"currency"
,
true
);
$this
->
paramHolder
->
orderByAlgorithm
=
$this
->
requestParam
(
"orderByAlgo"
);
if
(
empty
(
$this
->
paramHolder
->
orderByAlgorithm
))
$this
->
paramHolder
->
orderByAlgorithm
=
1
;
}
private
function
userListParams
(){
...
...
bi/modules/open/MoneyOutTransactions.php
View file @
c5795e66
...
...
@@ -39,7 +39,17 @@ class MoneyOutTransactions extends OpenAPIAbstraction{
}
private
function
list
(){
$list
=
$this
->
accessSelect
(
'LIST_WITHDRAW_REVISED'
,
[
$this
->
getWhere
()]);
switch
(
$this
->
holder
->
orderByAlgorithm
){
case
1
:
$this
->
holder
->
orderByAlgorithm
=
"ASC"
;
break
;
case
2
:
$this
->
holder
->
orderByAlgorithm
=
"DESC"
;
break
;
}
$list
=
$this
->
accessSelect
(
'LIST_WITHDRAW_REVISED'
,
[
$this
->
getWhere
(),
"withdraw.create_time
{
$this
->
holder
->
orderByAlgorithm
}
"
]);
$rowCount
=
count
(
$list
);
$totalPage
=
$this
->
getTotalPageCommon
(
VAR_DEFAULT_PAGE_COUNT
,
$rowCount
);
...
...
bi/modules/open/OverallTransactions.php
View file @
c5795e66
...
...
@@ -173,10 +173,21 @@ class OverallTransactions extends OpenAPIAbstraction{
$page
=
' LIMIT '
.
$start
.
DELIMIT_COMMA
.
VAL_INT_50
;
}
if
(
count
(
$rtn
)
>
NO_COUNT
)
return
array
(
DELIMIT_AND
.
implode
(
DELIMIT_AND
,
$rtn
),
$page
);
switch
(
$this
->
holder
->
orderByAlgorithm
){
case
1
:
$this
->
holder
->
orderByAlgorithm
=
"ASC"
;
break
;
case
2
:
$this
->
holder
->
orderByAlgorithm
=
"DESC"
;
break
;
}
$delimitedArrayByAnd
=
(
count
(
$rtn
)
>
NO_COUNT
)
?
DELIMIT_AND
.
implode
(
DELIMIT_AND
,
$rtn
)
:
NO_STRING
;
return
array
(
NO_STRING
,
$page
);
return
array
(
$delimitedArrayByAnd
,
"transaction_time
{
$this
->
holder
->
orderByAlgorithm
}
"
,
$page
);
}
/**
...
...
bi/modules/open/UserList.php
View file @
c5795e66
...
...
@@ -44,6 +44,8 @@ class UserList extends OpenAPIAbstraction{
"last_name"
=>
$this
->
getColumnData
(
$user
,
COLUMN_LAST_NAME
),
"account_type"
=>
$this
->
getColumnData
(
$user
,
COLUMN_ACCOUNT_TYPE
)
?
"Corporate"
:
"Individual"
,
"account_cat"
=>
$this
->
getColumnData
(
$user
,
COLUMN_TEST_ACCOUNT_FLG
)
==
0
?
"Live"
:
"Test"
,
"create_time"
=>
$this
->
getColumnData
(
$user
,
COLUMN_CREATE_TIME
),
"suspension_time"
=>
$this
->
getColumnData
(
$user
,
COLUMN_SUSPENSION_TIME
),
"balances"
=>
$this
->
generateBalances
(
$user
[
COLUMN_USER_ACCOUNT
])
];
}
...
...
@@ -240,13 +242,19 @@ class UserList extends OpenAPIAbstraction{
$start
=
(
$this
->
holder
->
page
-
VAL_INT_1
)
*
VAR_DEFAULT_PAGE_COUNT
;
$page
=
' LIMIT '
.
$start
.
DELIMIT_COMMA
.
VAL_INT_50
;
switch
(
$this
->
holder
->
orderByAlgorithm
){
case
1
:
$this
->
holder
->
orderByAlgorithm
=
"ASC"
;
break
;
case
2
:
$this
->
holder
->
orderByAlgorithm
=
"DESC"
;
break
;
}
$rtn
[]
=
$where
;
$rtn
[]
=
$having
;
if
(
$this
->
holder
->
page
!=
-
1
){
$rtn
[]
=
$page
;
}
else
$rtn
[]
=
NO_STRING
;
$rtn
[]
=
"create_time
{
$this
->
holder
->
orderByAlgorithm
}
"
;
$rtn
[]
=
$this
->
holder
->
page
!=
-
1
?
$page
:
NO_STRING
;
return
$rtn
;
}
...
...
bi/modules/traits/ProcessingHistory.php
View file @
c5795e66
...
...
@@ -179,10 +179,21 @@ trait ProcessingHistory{
$page
=
' LIMIT '
.
$start
.
DELIMIT_COMMA
.
VAL_INT_50
;
}
if
(
count
(
$rtn
)
>
NO_COUNT
)
return
array
(
DELIMIT_AND
.
implode
(
DELIMIT_AND
,
$rtn
),
$page
);
switch
(
$holder
->
orderByAlgorithm
){
case
1
:
$holder
->
orderByAlgorithm
=
"ASC"
;
break
;
case
2
:
$holder
->
orderByAlgorithm
=
"DESC"
;
break
;
}
$delimitedArrayByAnd
=
(
count
(
$rtn
)
>
NO_COUNT
)
?
DELIMIT_AND
.
implode
(
DELIMIT_AND
,
$rtn
)
:
NO_STRING
;
return
array
(
NO_STRING
,
$page
);
return
array
(
$delimitedArrayByAnd
,
"transaction_time
{
$holder
->
orderByAlgorithm
}
"
,
$page
);
}
/**
...
...
bi/modules/traits/ValidationExpression.php
View file @
c5795e66
...
...
@@ -53,6 +53,11 @@ trait ValidationExpression {
&&
count
(
$sys
->
getAccountCommon
(
$holder
->
userAccount
))
===
0
,
"message"
=>
"[User Balance Result]: Account No. doesn't exist [
{
$holder
->
userAccount
}
]"
,
"code"
=>
8
],
[
"notvalid"
=>
$holder
->
orderByAlgorithm
!=
1
&&
$holder
->
orderByAlgorithm
!=
2
,
"message"
=>
"Invalid Sorting Order [
{
$holder
->
orderByAlgorithm
}
] (1 and 2 are the only allowed option)"
,
"code"
=>
9
]
];
}
...
...
bi/modules/traits/Withdrawal.php
View file @
c5795e66
...
...
@@ -27,7 +27,18 @@ trait Withdrawal{
$sys
=
$holder
->
getSource
();
if
(
$sys
instanceof
System
){
$list
=
$sys
->
accessSelect
(
'LIST_WITHDRAW_REVISED'
,
[
$this
->
getWhereWithdrawal
(
$holder
)]);
switch
(
$holder
->
orderByAlgorithm
){
case
1
:
$holder
->
orderByAlgorithm
=
"ASC"
;
break
;
case
2
:
$holder
->
orderByAlgorithm
=
"DESC"
;
break
;
}
$list
=
$sys
->
accessSelect
(
'LIST_WITHDRAW_REVISED'
,
[
$this
->
getWhereWithdrawal
(
$holder
),
"withdraw.create_time
{
$holder
->
orderByAlgorithm
}
"
]);
$rowCount
=
count
(
$list
);
$totalPage
=
$sys
->
getTotalPageCommon
(
VAR_DEFAULT_PAGE_COUNT
,
$rowCount
);
...
...
system/lib/sql.xml
View file @
c5795e66
...
...
@@ -607,8 +607,8 @@
u_id != ''
__ELEMENT02__
ORDER BY
create_time DESC
__ELEMENT03__
__ELEMENT04__
</LIST_ACCOUNTS_REVISED_BI>
<!--
...
...
@@ -1958,7 +1958,7 @@
AND users.admin_flg = 0
AND users.status IN (2, 3, 4, 5, 6, 7)
ORDER BY
withdraw.create_time DESC
__ELEMENT02__
</LIST_WITHDRAW_REVISED>
<!--
...
...
@@ -3489,8 +3489,8 @@
1
__ELEMENT01__
ORDER BY
transaction_time DESC
__ELEMENT02__
__ELEMENT03__
</LIST_TRANSACTION>
<LIST_DELETED_TRANSACTION>
...
...
system/logic/transaction/model.php
View file @
c5795e66
...
...
@@ -275,20 +275,19 @@ class TransactionModelClass extends ModelClassEx {
// ページ数
$start
=
(
$this
->
getTargetPage
()
-
VAL_INT_1
)
*
VAR_DEFAULT_PAGE_COUNT
;
$end
=
$this
->
getTargetPage
()
*
VAR_DEFAULT_PAGE_COUNT
;
$page
=
' LIMIT '
.
$start
.
DELIMIT_COMMA
.
VAL_INT_50
;
if
(
$this
->
getType
()
==
TYPE_EXPORT
)
{
if
(
$this
->
getType
()
==
TYPE_EXPORT
)
$page
=
''
;
}
// 検索条件の結合
if
(
count
(
$rtn
)
>
NO_COUNT
)
{
return
array
(
DELIMIT_AND
.
implode
(
DELIMIT_AND
,
$rtn
),
$page
);
}
else
{
return
array
(
NO_STRING
,
$page
);
}
$delimitedArrayByAnd
=
(
count
(
$rtn
)
>
NO_COUNT
)
?
DELIMIT_AND
.
implode
(
DELIMIT_AND
,
$rtn
)
:
NO_STRING
;
return
array
(
$delimitedArrayByAnd
,
"transaction_time DESC"
,
$page
);
}
/*-------------------------------------------------------------------------
...
...
system/logic/withdraw/logic.php
View file @
c5795e66
...
...
@@ -84,7 +84,7 @@ class LogicWithdraw extends WithdrawModelClass {
-------------------------------------------------------------------------*/
function
lists
()
{
//remove _REVISED if want to use the old query - mark
$this
->
setResult
(
$this
->
accessSelect
(
'LIST_WITHDRAW_REVISED'
,
array
(
$this
->
getWhere
_new
()
)));
$this
->
setResult
(
$this
->
accessSelect
(
'LIST_WITHDRAW_REVISED'
,
array
(
$this
->
getWhere
(),
"withdraw.create_time DESC"
)));
$this
->
setTotal
(
$this
->
accessSelect
(
'LIST_WITHDRAW_TOTAL'
,
array
(
$this
->
getWhere
())));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment