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
55fd61e7
Commit
55fd61e7
authored
Sep 06, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
del 参数
parent
565d3d2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
Broker.php
application/index/controller/Broker.php
+3
-3
GHousesToAgents.php
application/model/GHousesToAgents.php
+22
-3
No files found.
application/index/controller/Broker.php
View file @
55fd61e7
...
@@ -180,12 +180,12 @@ class Broker extends Basic
...
@@ -180,12 +180,12 @@ class Broker extends Basic
$data
[
'data'
]
=
''
;
$data
[
'data'
]
=
''
;
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
if
(
$this
->
params
[
'id'
]
&&
$this
->
params
[
'houses_id'
])
{
if
(
$this
->
params
[
'id'
]
&&
$this
->
params
[
'houses_id'
]
&&
$this
->
params
[
'type'
]
)
{
$hg
=
new
GHousesToAgents
();
$hg
=
new
GHousesToAgents
();
$hg
->
del
(
$this
->
params
[
'id'
],
$this
->
params
[
'houses_id'
]);
$hg
->
del
(
$this
->
params
[
'id'
],
$this
->
params
[
'houses_id'
]
,
$this
->
params
[
'type'
]
);
}
else
{
}
else
{
$data
[
'status'
]
=
101
;
$data
[
'status'
]
=
101
;
$data
[
'msg'
]
=
'
id or houses_id is null
'
;
$data
[
'msg'
]
=
'
参数错误
'
;
}
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
...
...
application/model/GHousesToAgents.php
View file @
55fd61e7
...
@@ -178,12 +178,16 @@ class GHousesToAgents extends BaseModel
...
@@ -178,12 +178,16 @@ class GHousesToAgents extends BaseModel
*
*
* @param $id
* @param $id
* @param $houses_id
* @param $houses_id
* @return bool|false|int
* @param $type
* @return GHousesToAgents|bool
*/
*/
public
function
del
(
$id
,
$houses_id
)
public
function
del
(
$id
,
$houses_id
,
$type
)
{
{
if
(
$id
)
{
if
(
$id
)
{
$res
=
$this
->
save
([
'is_del'
=>
1
],
[
'agents_id'
=>
$id
,
'houses_id'
=>
$houses_id
]);
$where
[
'agents_id'
]
=
$id
;
$where
[
'houses_id'
]
=
$houses_id
;
$where
[
'type'
]
=
$type
;
$res
=
$this
->
where
(
$where
)
->
update
([
'is_del'
=>
1
]);
}
else
{
}
else
{
$res
=
false
;
$res
=
false
;
}
}
...
@@ -409,4 +413,19 @@ class GHousesToAgents extends BaseModel
...
@@ -409,4 +413,19 @@ class GHousesToAgents extends BaseModel
->
where
(
'a.agents_id'
,
$agent_id
)
->
where
(
'a.agents_id'
,
$agent_id
)
->
count
();
->
count
();
}
}
/**
* @param $field
* @param $type
* @param $houses_id
* @param int $is_del
* @return array
*/
public
function
getAgentHouseOne
(
$field
,
$type
,
$houses_id
,
$is_del
=
0
)
{
$where
[
'is_del'
]
=
$is_del
;
$where
[
'type'
]
=
$type
;
$where
[
'houses_id'
]
=
$houses_id
;
return
$this
->
where
(
$where
)
->
column
(
$field
);
}
}
}
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