Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Cong.Zhao
/
musician-api.hikoon.com
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
adbb42a7
...
adbb42a7adc149b22f3f263e3a56adc70f700625
authored
2021-09-17 19:38:06 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
分贝
1 parent
3c5a0849
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
app/Models/Legal/Stakeholder.php
app/Models/Legal/Stakeholder.php
View file @
adbb42a
...
...
@@ -32,23 +32,14 @@ class Stakeholder extends BaseModel
switch
(
intval
(
$identifier
->
type
))
{
case
1
:
//个人
$s_table
=
Stakeholder
::
table
();
$sbd_table
=
StakeholderBankDetail
::
table
();
$stakeholder
=
Stakeholder
::
query
()
->
where
([
'type'
=>
1
,
"
{
$sbd_table
}
.card_no"
=>
$identifier
->
identifier
])
->
join
(
$sbd_table
,
"
{
$s_table
}
.id"
,
'='
,
"
{
$sbd_table
}
.stakeholder_id"
)
->
pluck
(
"
{
$s_table
}
.id"
)
->
toArray
();
$stakeholder_ids
=
Stakeholder
::
query
()
->
where
([
'type'
=>
1
,
'card_no'
=>
$identifier
->
identifier
])
->
pluck
(
'id'
)
->
toArray
();
$stakeholder
=
array_merge
(
$stakeholder
,
$stakeholder_ids
);
$stakeholder
=
Stakeholder
::
query
()
->
join
(
'stakeholder_detail sd'
,
'stakeholders.id'
,
'='
,
'sd.stakeholder_id'
)
->
where
([
'stakeholders.card_no'
=>
$identifier
->
identifier
])
->
pluck
(
'id'
)
->
toArray
();
break
;
case
2
:
$stakeholder
=
Stakeholder
::
query
()
->
where
([
'type'
=>
2
,
'credit_code'
=>
$identifier
->
identifier
])
->
pluck
(
'id'
)
->
toArray
();
break
;
default
:
return
[];
break
;
}
return
array_unique
(
$stakeholder
);
...
...
Please
register
or
sign in
to post a comment