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
d72dcca3
Commit
d72dcca3
authored
Aug 08, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除商铺对应的收藏商铺也要删除(改状态值)
parent
9b9bbfa2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
Houses.php
application/index/controller/Houses.php
+6
-0
ACollectHouse.php
application/model/ACollectHouse.php
+14
-0
No files found.
application/index/controller/Houses.php
View file @
d72dcca3
...
...
@@ -12,6 +12,7 @@ namespace app\index\controller;
use
app\api_broker\service\LookShopService
;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\ACollectHouse
;
use
app\model\GHouses
;
use
app\model\GHousesImgs
;
use
app\model\GHousesToAgents
;
...
...
@@ -298,6 +299,11 @@ class Houses extends Basic
if
(
$this
->
params
[
'id'
])
{
$this
->
house
->
isUpdate
(
true
)
->
save
([
'status'
=>
3
],
[
'id'
=>
$this
->
params
[
'id'
]
]);
//删除商铺对应的收藏商铺也要删除(改状态值)delCollectHouse
$collect_house
=
new
ACollectHouse
();
$collect_house
->
delCollectHouse
(
$this
->
params
[
'id'
]);
$data
[
'msg'
]
=
'successfully deleted'
;
}
else
{
$data
[
'status'
]
=
101
;
...
...
application/model/ACollectHouse.php
View file @
d72dcca3
...
...
@@ -67,4 +67,18 @@ class ACollectHouse extends Model
return
$result
;
}
/**
* 更新数据
* 朱伟 2018-08-08
*/
public
function
delCollectHouse
(
$id
)
{
$result
=
Db
::
table
(
$this
->
table
)
->
where
(
'house_id'
,
$id
)
->
update
([
'status'
=>
3
]);
//dump($this->getLastSql());
return
$result
;
}
}
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