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
9dd5bcac
Commit
9dd5bcac
authored
Aug 20, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
images
parent
f1b87ad7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
Broker.php
application/api_broker/controller/Broker.php
+1
-1
Broker.php
application/index/controller/Broker.php
+1
-1
BrokerService.php
application/index/service/BrokerService.php
+4
-3
AAgentsBank.php
application/model/AAgentsBank.php
+7
-2
No files found.
application/api_broker/controller/Broker.php
View file @
9dd5bcac
...
...
@@ -1211,7 +1211,7 @@ class Broker extends Basic
$msg
=
''
;
$code
=
200
;
$s_broker
=
new
\app\index\service\BrokerService
();
$result
=
$s_broker
->
editBank
(
$this
->
params
);
$result
=
$s_broker
->
editBank
(
$this
->
params
,
$this
->
params
[
'agent_id'
]
);
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$msg
=
$result
[
'msg'
];
...
...
application/index/controller/Broker.php
View file @
9dd5bcac
...
...
@@ -482,7 +482,7 @@ class Broker extends Basic
if
(
$data
[
'status'
]
==
'fail'
)
{
$result
[
'code'
]
=
101
;
}
else
{
$broker_service
->
editBank
(
$this
->
params
);
$broker_service
->
editBank
(
$this
->
params
,
$this
->
params
[
'id'
]
);
}
$result
[
'msg'
]
=
$data
[
'msg'
];
}
else
{
...
...
application/index/service/BrokerService.php
View file @
9dd5bcac
...
...
@@ -558,15 +558,16 @@ class BrokerService
* 工资卡
*
* @param $data
* @param $agent_id
* @return $this|int|string
*/
public
function
editBank
(
$data
)
public
function
editBank
(
$data
,
$agent_id
)
{
$result
[
'status'
]
=
'fail'
;
$validate
=
new
AAgentBankValidate
();
$m_bank
=
new
AAgentsBank
();
$bank_id
=
$m_bank
->
getFieldOneValue
(
'id'
,
[
'agent_id'
=>
$
data
[
'agent_id'
]
,
'is_del'
=>
0
]);
$bank_id
=
$m_bank
->
getFieldOneValue
(
'id'
,
[
'agent_id'
=>
$
agent_id
,
'is_del'
=>
0
]);
$data
[
'agent_id'
]
=
$agent_id
;
if
(
$bank_id
)
{
$check
=
$validate
->
scene
(
'edit'
)
->
check
(
$data
);
if
(
!
$check
)
{
...
...
application/model/AAgentsBank.php
View file @
9dd5bcac
...
...
@@ -37,7 +37,7 @@ class AAgentsBank extends BaseModel
if
(
empty
(
$save_data
))
{
$result
=
0
;
}
else
{
$result
=
$this
->
db_
->
insert
(
$data
);
$result
=
$this
->
db_
->
insert
(
$
save_
data
);
}
return
$result
;
...
...
@@ -60,7 +60,7 @@ class AAgentsBank extends BaseModel
if
(
empty
(
$save_data
))
{
$result
=
0
;
}
else
{
$result
=
$this
->
db_
->
where
(
$where
)
->
update
(
$data
);
$result
=
$this
->
db_
->
where
(
$where
)
->
update
(
$
save_
data
);
}
return
$result
;
...
...
@@ -73,6 +73,11 @@ class AAgentsBank extends BaseModel
public
function
buildData
(
$data
)
{
$save_data
=
[];
//收款人姓名
if
(
isset
(
$data
[
'agent_id'
]))
{
$save_data
[
'agent_id'
]
=
$data
[
'agent_id'
];
}
//收款人姓名
if
(
isset
(
$data
[
'account'
]))
{
$save_data
[
'account'
]
=
$data
[
'account'
];
...
...
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