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
8ca241d0
Commit
8ca241d0
authored
Aug 09, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冻结经纪人
parent
cc6dbdf0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
5 deletions
+41
-5
Agent.php
application/index/controller/Agent.php
+19
-5
ABindingDevice.php
application/model/ABindingDevice.php
+22
-0
No files found.
application/index/controller/Agent.php
View file @
8ca241d0
...
@@ -269,12 +269,26 @@ class Agent extends Basic
...
@@ -269,12 +269,26 @@ class Agent extends Basic
}
}
}
}
$table
=
new
AAgents
();
try
{
if
(
$table
->
saveStatus
(
'status'
,
$data
[
'status'
],
$ids
))
{
$m_agent
=
new
AAgents
();
return
$this
->
response
(
200
,
'成功'
,
$data
);
if
(
$m_agent
->
saveStatus
(
'status'
,
$data
[
'status'
],
$ids
))
{
}
else
{
if
(
$data
[
'status'
]
!=
0
)
{
return
$this
->
response
(
100
,
'失败'
,
$data
);
$is_forbidden
=
1
;
}
else
{
$is_forbidden
=
0
;
}
//同时修改设备绑定表
$m_agent_device
=
new
ABindingDevice
();
$m_agent_device
->
updateDate
([
'is_forbidden'
=>
$is_forbidden
],
[
'agent_id'
=>
$ids
]);
return
$this
->
response
(
200
,
'成功'
,
$data
);
}
else
{
return
$this
->
response
(
100
,
'失败'
,
$data
);
}
}
catch
(
\Exception
$e
)
{
return
$this
->
response
(
100
,
'修改失败'
.
$e
->
getMessage
(),
$data
);
}
}
}
}
/**
/**
...
...
application/model/ABindingDevice.php
View file @
8ca241d0
...
@@ -128,4 +128,26 @@ class ABindingDevice extends BaseModel
...
@@ -128,4 +128,26 @@ class ABindingDevice extends BaseModel
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$arr
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
return
$arr
;
return
$arr
;
}
}
/**
* 修改绑定的设备id
*
* @param array $params
* @param $where
* @return int
* @throws \Exception
*/
public
function
updateDate
(
array
$params
,
$where
)
:
int
{
$bandBin
=
$this
->
deviceBin
(
$params
);
Db
::
startTrans
();
try
{
$mun
=
$this
->
where
(
$where
)
->
update
(
$bandBin
);
Db
::
commit
();
return
$mun
;
}
catch
(
\Exception
$exception
)
{
Db
::
rollback
();
throw
$exception
;
}
}
}
}
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