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
b619f3dc
Commit
b619f3dc
authored
Apr 04, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delSquare
parent
ec294cad
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
7 deletions
+44
-7
Square.php
application/api_broker/controller/Square.php
+17
-0
SquareService.php
application/api_broker/service/SquareService.php
+15
-4
Square.php
application/index/controller/Square.php
+1
-1
BCommentExt.php
application/model/BCommentExt.php
+8
-0
route.php
application/route.php
+3
-2
No files found.
application/api_broker/controller/Square.php
View file @
b619f3dc
...
...
@@ -152,6 +152,23 @@ class Square extends Basic
}
}
public
function
delSquare
()
{
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
'id'
])
or
!
isset
(
$params
[
'type'
]))
{
return
$this
->
response
(
"101"
,
"参数不全"
);
}
if
(
!
is_numeric
(
$params
[
'id'
]))
{
return
$this
->
response
(
"101"
,
"参数错误"
);
}
$result
=
$this
->
s_square
->
delSquare
(
$params
);
if
(
$result
){
return
$this
->
response
(
"200"
,
"成功"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"成功"
,
$result
);
}
}
...
...
application/api_broker/service/SquareService.php
View file @
b619f3dc
...
...
@@ -171,11 +171,22 @@ class SquareService
return
$res
;
}
public
function
delSquare
(
$
id
)
public
function
delSquare
(
$
params
)
{
$where_params
[
'id'
]
=
$id
;
$update_params
[
'status'
]
=
1
;
$res
=
$this
->
m_square
->
updateStatus
(
$where_params
,
$update_params
);
$where_params
[
'id'
]
=
$params
[
'id'
];
switch
(
$params
[
'type'
])
{
case
0
:
$update_params
[
'is_del'
]
=
1
;
$res
=
$this
->
m_coment
->
updateStatus
(
$where_params
,
$update_params
);
break
;
case
1
:
$update_params
[
'is_del'
]
=
1
;
$res
=
$this
->
m_coment_ext
->
updateStatus
(
$where_params
,
$update_params
);
break
;
default
:
$update_params
[
'status'
]
=
1
;
$res
=
$this
->
m_square
->
updateStatus
(
$where_params
,
$update_params
);
}
return
$res
;
}
...
...
application/index/controller/Square.php
View file @
b619f3dc
...
...
@@ -89,7 +89,7 @@ class Square extends Basic
if
(
!
is_numeric
(
$params
[
'id'
]))
{
return
$this
->
response
(
"101"
,
"参数错误"
);
}
$result
=
$this
->
s_square
->
delSquare
(
$params
[
'id'
]
);
$result
=
$this
->
s_square
->
delSquare
(
$params
);
if
(
$result
){
return
$this
->
response
(
"200"
,
"成功"
,
$result
);
...
...
application/model/BCommentExt.php
View file @
b619f3dc
...
...
@@ -46,5 +46,13 @@ class BCommentExt extends Model
return
$result
;
}
public
function
updateStatus
(
$where_params
,
$update_params
)
{
$result
=
$this
->
where
(
$where_params
)
->
update
(
$update_params
);
// dump($this->getLastSql());exit;
// big_log($this->getLastSql());
return
$result
;
}
}
application/route.php
View file @
b619f3dc
...
...
@@ -864,8 +864,9 @@ Route::group('broker', [
'getSquareCommentList'
=>
[
'api_broker/Square/getSquareCommentList'
,
[
'method'
=>
'GET|POST'
]
],
'getCommenInfo'
=>
[
'api_broker/Square/getCommenInfo'
,
[
'method'
=>
'GET|POST'
]
],
'getSquareCommentExtList'
=>
[
'api_broker/Square/getSquareCommentExtList'
,
[
'method'
=>
'GET|POST'
]
],
'editCommenSort'
=>
[
'api_broker/Square/editCommenSort'
,
[
'method'
=>
'GET|POST'
]
],
'getDistrictLable'
=>
[
'api_broker/Square/getDistrictLable'
,
[
'method'
=>
'GET|POST'
]
],
'editCommenSort'
=>
[
'api_broker/Square/editCommenSort'
,
[
'method'
=>
'GET|POST'
]
],
'getDistrictLable'
=>
[
'api_broker/Square/getDistrictLable'
,
[
'method'
=>
'GET|POST'
]
],
'delSquare'
=>
[
'api_broker/Square/delSquare'
,
[
'method'
=>
'GET|POST'
]
],
'getAgentDistrictId'
=>
[
'api_broker/Broker/getAgentDistrictId'
,
[
'method'
=>
'GET|POST'
]
],
...
...
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