Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
hujun
tl_estate
Commits
a6726069
Commit
a6726069
authored
Aug 19, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的-工资卡
parent
814f1ecc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
2 deletions
+43
-2
MyCenterService.php
application/api_broker/service/MyCenterService.php
+28
-0
AAgentsBank.php
application/model/AAgentsBank.php
+15
-2
No files found.
application/api_broker/service/MyCenterService.php
View file @
a6726069
<?php
namespace
app\api_broker\service
;
use
app\model\AAgents
;
use
app\model\AAgentsBank
;
use
app\model\AuthGroup
;
use
app\model\AuthRule
;
...
...
@@ -135,8 +136,34 @@ class MyCenterService{
if
(
!
$is_ok
)
{
$result
[
'is_banding'
]
=
1
;
//是否有解绑绑定经纪人的权限
}
}
$bank_data
=
$this
->
getBank
(
$result
[
'id'
]);
$result
=
array_merge
(
$result
,
$bank_data
);
return
$result
;
}
public
function
getBank
(
$agent_id
)
{
$m_bank
=
new
AAgentsBank
();
$field
=
'account,bank,card_no,id_card,id_card_image_front,id_card_image_back'
;
$bank_data
=
$m_bank
->
getDataOne
(
$field
,
[
'agent_id'
=>
$agent_id
,
'is_del'
=>
0
]);
if
(
empty
(
$bank_data
))
{
$result
[
'account'
]
=
''
;
$result
[
'bank'
]
=
''
;
$result
[
'card_no'
]
=
''
;
$result
[
'id_card'
]
=
''
;
$result
[
'id_card_image_front'
]
=
''
;
$result
[
'id_card_image_back'
]
=
''
;
}
else
{
$result
[
'account'
]
=
$bank_data
[
'account'
];
$result
[
'bank'
]
=
$bank_data
[
'bank'
];
$result
[
'card_no'
]
=
$bank_data
[
'card_no'
];
$result
[
'id_card'
]
=
$bank_data
[
'id_card'
];
$result
[
'id_card_image_front'
]
=
$bank_data
[
'id_card_image_front'
];
$result
[
'id_card_image_back'
]
=
$bank_data
[
'id_card_image_back'
];
}
return
$result
;
}
}
\ No newline at end of file
application/model/AAgentsBank.php
View file @
a6726069
...
...
@@ -37,7 +37,7 @@ class AAgentsBank extends BaseModel
if
(
empty
(
$save_data
))
{
$result
=
0
;
}
else
{
$result
=
$this
->
insert
(
$data
);
$result
=
$this
->
db_
->
insert
(
$data
);
}
return
$result
;
...
...
@@ -60,7 +60,7 @@ class AAgentsBank extends BaseModel
if
(
empty
(
$save_data
))
{
$result
=
0
;
}
else
{
$result
=
$this
->
where
(
$where
)
->
update
(
$data
);
$result
=
$this
->
db_
->
where
(
$where
)
->
update
(
$data
);
}
return
$result
;
...
...
@@ -105,4 +105,16 @@ class AAgentsBank extends BaseModel
return
$save_data
;
}
/**
* @param $field
* @param $where
* @return array|false|\PDOStatement|string|\think\Model
*/
public
function
getDataOne
(
$field
,
$where
)
{
return
$this
->
db_
->
field
(
$field
)
->
where
(
$where
)
->
find
();
}
}
\ No newline at end of file
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