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
4ccd9f20
Commit
4ccd9f20
authored
Jul 09, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9e6ef4fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
16 deletions
+17
-16
Broker.php
application/index/controller/Broker.php
+1
-1
ABindingDevice.php
application/model/ABindingDevice.php
+16
-15
No files found.
application/index/controller/Broker.php
View file @
4ccd9f20
...
@@ -424,7 +424,7 @@ class Broker extends Basic
...
@@ -424,7 +424,7 @@ class Broker extends Basic
$params
[
"agent_id"
]
=
$agent_id
;
$params
[
"agent_id"
]
=
$agent_id
;
$field
=
"id,agent_id,device_id,model,is_forbidden,is_pc,create_time,update_time"
;
$field
=
"id,agent_id,device_id,model,is_forbidden,is_pc,create_time,update_time"
;
$result
=
$aBD
->
getDeviceByAgentId
(
$params
,
$field
);
$result
=
$aBD
->
getDevice
New
ByAgentId
(
$params
,
$field
);
if
(
count
(
$result
)
>
0
)
{
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"success"
,
$result
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
else
{
}
else
{
...
...
application/model/ABindingDevice.php
View file @
4ccd9f20
...
@@ -71,12 +71,23 @@ class ABindingDevice extends BaseModel
...
@@ -71,12 +71,23 @@ class ABindingDevice extends BaseModel
if
(
isset
(
$params
[
"agent_id"
]))
{
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
}
if
(
isset
(
$params
[
"device_id"
]))
{
$where_
[
"device_id"
]
=
$params
[
"device_id"
];
}
if
(
isset
(
$params
[
"is_forbidden"
]))
{
$where_
[
"is_forbidden"
]
=
$params
[
"is_forbidden"
];
}
if
(
isset
(
$params
[
"is_pc"
]))
{
$where_
[
"is_pc"
]
=
$params
[
"is_pc"
];
}
if
(
isset
(
$params
[
"push_id"
]))
{
$where_
[
"push_id"
]
=
$params
[
"push_id"
];
}
try
{
try
{
$data
=
$this
$data
=
$this
->
field
(
$field
)
->
field
(
$field
)
->
where
(
$where_
)
->
where
(
$where_
)
->
order
(
"update_time desc"
)
->
order
(
"create_time desc"
)
->
limit
(
5
)
->
select
();
->
select
();
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$data
=
[];
$data
=
[];
...
@@ -85,7 +96,7 @@ class ABindingDevice extends BaseModel
...
@@ -85,7 +96,7 @@ class ABindingDevice extends BaseModel
}
}
/**
/**
* 根据经纪人id获取绑定过的设备id
* 根据经纪人id获取绑定过的设备id
pc
*
*
* @param array $params
* @param array $params
* @param string $field
* @param string $field
...
@@ -97,23 +108,13 @@ class ABindingDevice extends BaseModel
...
@@ -97,23 +108,13 @@ class ABindingDevice extends BaseModel
if
(
isset
(
$params
[
"agent_id"
]))
{
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
}
if
(
isset
(
$params
[
"device_id"
]))
{
$where_
[
"device_id"
]
=
$params
[
"device_id"
];
}
if
(
isset
(
$params
[
"is_forbidden"
]))
{
$where_
[
"is_forbidden"
]
=
$params
[
"is_forbidden"
];
}
if
(
isset
(
$params
[
"is_pc"
]))
{
$where_
[
"is_pc"
]
=
$params
[
"is_pc"
];
}
if
(
isset
(
$params
[
"push_id"
]))
{
$where_
[
"push_id"
]
=
$params
[
"push_id"
];
}
try
{
try
{
$data
=
$this
$data
=
$this
->
field
(
$field
)
->
field
(
$field
)
->
where
(
$where_
)
->
where
(
$where_
)
->
order
(
"update_time desc"
)
->
order
(
"update_time desc"
)
->
limit
(
5
)
->
select
();
->
select
();
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$data
=
[];
$data
=
[];
...
...
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