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
572150f6
Commit
572150f6
authored
Jun 02, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除楼盘图片
parent
c9f2923a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
43 deletions
+88
-43
OfficeRoom.php
application/api_broker/controller/OfficeRoom.php
+1
-1
officeBuilding.php
application/api_broker/controller/officeBuilding.php
+45
-0
OfficeManage.php
application/index/controller/OfficeManage.php
+1
-1
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+18
-13
OfficeService.php
application/index/service/OfficeService.php
+18
-23
route.php
application/route.php
+5
-5
No files found.
application/api_broker/controller/OfficeRoom.php
View file @
572150f6
...
@@ -36,7 +36,7 @@ class OfficeRoom extends Basic
...
@@ -36,7 +36,7 @@ class OfficeRoom extends Basic
{
{
$msg
=
''
;
$msg
=
''
;
$code
=
200
;
$code
=
200
;
$result
=
$this
->
service
->
delHouseFile
(
$this
->
params
[
'id'
],
$this
->
params
[
'house_id'
],
2
);
$result
=
$this
->
service
->
delHouseFile
(
$this
->
params
[
'id'
],
$this
->
params
[
'house_id'
],
$this
->
params
[
'save_path'
]
);
if
(
$result
[
'status'
]
==
'fail'
)
{
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$code
=
101
;
$msg
=
'删除失败'
;
$msg
=
'删除失败'
;
...
...
application/api_broker/controller/officeBuilding.php
0 → 100644
View file @
572150f6
<?php
/**
* Created by PhpStorm.
* User: HuJun
* Date: 2019/5/30
* Time: 10:11
*/
namespace
app\api_broker\controller
;
use
app\api_broker\extend\Basic
;
use
app\index\service\OfficeService
;
class
OfficeBuilding
extends
Basic
{
private
$service
;
public
function
__construct
()
{
parent
::
__construct
();
$this
->
service
=
new
OfficeService
();
}
/**
* 删除图片
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
delHouseFile
()
{
$msg
=
''
;
$code
=
200
;
$result
=
$this
->
service
->
delHouseFile
(
$this
->
params
[
'id'
],
$this
->
params
[
'house_id'
],
$this
->
params
[
'save_path'
]);
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$msg
=
'删除失败'
;
}
return
$this
->
response
(
$code
,
$msg
);
}
}
\ No newline at end of file
application/index/controller/OfficeManage.php
View file @
572150f6
...
@@ -90,7 +90,7 @@ class OfficeManage extends Basic
...
@@ -90,7 +90,7 @@ class OfficeManage extends Basic
{
{
$msg
=
''
;
$msg
=
''
;
$code
=
200
;
$code
=
200
;
$result
=
$this
->
service
->
delHouseFile
(
$this
->
params
[
'id'
],
$this
->
params
[
'house_id'
],
$this
->
params
[
'
type
'
]);
$result
=
$this
->
service
->
delHouseFile
(
$this
->
params
[
'id'
],
$this
->
params
[
'house_id'
],
$this
->
params
[
'
save_path
'
]);
if
(
$result
[
'status'
]
==
'fail'
)
{
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$code
=
101
;
$msg
=
'删除失败'
;
$msg
=
'删除失败'
;
...
...
application/index/service/OfficeRoomService.php
View file @
572150f6
...
@@ -316,35 +316,40 @@ class OfficeRoomService
...
@@ -316,35 +316,40 @@ class OfficeRoomService
/**
/**
* 删除图片
* 删除图片
*
*
* @param $id
* @param
int
$id
* @param $house_id
* @param $house_id
* @param
$img_status
* @param
string $save_path
* @return mixed
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
* User HuJun
* Date 19-6-2 上午10:26
*/
*/
public
function
delHouseFile
(
$id
,
$house_id
,
$img_status
)
public
function
delHouseFile
(
$id
=
0
,
$house_id
,
$save_path
=
''
)
{
{
$data
[
'status'
]
=
'fail'
;
$data
[
'status'
]
=
'fail'
;
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
if
(
empty
(
$id
))
{
if
(
empty
(
$id
)
||
empty
(
$building_id
))
{
$where
[
'house_id'
]
=
$house_id
;
$data
[
'msg'
]
=
'参数错误'
;
$where
[
'img_name'
]
=
$save_path
;
return
$data
;
}
else
{
$where
[
'id'
]
=
$id
;
}
}
$where
[
'house_id'
]
=
$house_id
;
$where
[
'id'
]
=
$id
;
$where
[
'img_status'
]
=
$img_status
;
$id
=
$this
->
m_office_img
->
getFindData
(
'id'
,
$where
);
$id
=
$this
->
m_office_img
->
getFindData
(
'id'
,
$where
);
if
(
empty
(
$id
[
'id'
]))
{
if
(
empty
(
$id
[
'id'
]))
{
$data
[
'msg'
]
=
'没有该文件'
;
$data
[
'msg'
]
=
'没有该文件'
;
}
else
{
}
else
{
$this
->
m_office_img
->
editData
([
'img_status'
=>
1
],
$id
[
'id'
],
'id'
);
$result
=
$this
->
m_office_img
->
editData
([
'img_status'
=>
1
],
$id
[
'id'
],
'id'
);
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
'删除成功'
;
if
(
$result
)
{
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
'删除成功'
;
}
else
{
$data
[
'msg'
]
=
'删除失败'
;
}
}
}
return
$data
;
return
$data
;
...
...
application/index/service/OfficeService.php
View file @
572150f6
...
@@ -169,45 +169,40 @@ class OfficeService
...
@@ -169,45 +169,40 @@ class OfficeService
/**
/**
* 删除图片
* 删除图片
*
*
* @param $id
* @param
int
$id
* @param $house_id
* @param $house_id
* @param
$img_status
* @param
string $save_path
* @return mixed
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
* User HuJun
* Date 19-6-2 上午10:26
*/
*/
public
function
delHouseFile
(
$id
,
$house_id
,
$img_status
)
public
function
delHouseFile
(
$id
=
0
,
$house_id
,
$save_path
=
''
)
{
{
$data
[
'status'
]
=
'fail'
;
$data
[
'status'
]
=
'fail'
;
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
if
(
empty
(
$id
))
{
if
(
empty
(
$id
)
||
empty
(
$house_id
))
{
$where
[
'house_id'
]
=
$house_id
;
$data
[
'msg'
]
=
'参数错误'
;
$where
[
'img_name'
]
=
$save_path
;
return
$data
;
}
else
{
}
$where
[
'id'
]
=
$id
;
if
(
empty
(
$house_id
))
{
$data
[
'msg'
]
=
'参数错误'
;
return
$data
;
}
if
(
empty
(
$img_status
))
{
$data
[
'msg'
]
=
'参数错误'
;
return
$data
;
}
}
$where
[
'house_id'
]
=
$house_id
;
$where
[
'id'
]
=
$id
;
$where
[
'img_status'
]
=
$img_status
;
$id
=
$this
->
m_office_img
->
getFindData
(
'id'
,
$where
);
$id
=
$this
->
m_office_img
->
getFindData
(
'id'
,
$where
);
if
(
empty
(
$id
[
'id'
]))
{
if
(
empty
(
$id
[
'id'
]))
{
$data
[
'msg'
]
=
'没有该文件'
;
$data
[
'msg'
]
=
'没有该文件'
;
}
else
{
}
else
{
$this
->
m_office_img
->
editData
([
'img_status'
=>
1
],
$id
[
'id'
],
'id'
);
$result
=
$this
->
m_office_img
->
editData
([
'img_status'
=>
1
],
$id
[
'id'
],
'id'
);
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
'删除成功'
;
if
(
$result
)
{
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
'删除成功'
;
}
else
{
$data
[
'msg'
]
=
'删除失败'
;
}
}
}
return
$data
;
return
$data
;
...
...
application/route.php
View file @
572150f6
...
@@ -963,18 +963,18 @@ Route::group('office', [
...
@@ -963,18 +963,18 @@ Route::group('office', [
'getCommission'
=>
[
'api_broker/OfficeOrderLog/getCommission'
,
[
'method'
=>
'GET|POST'
]],
'getCommission'
=>
[
'api_broker/OfficeOrderLog/getCommission'
,
[
'method'
=>
'GET|POST'
]],
'isShowAdjustment'
=>
[
'api_broker/OfficeOrderLog/isShowAdjustment'
,
[
'method'
=>
'GET|POST'
]],
'isShowAdjustment'
=>
[
'api_broker/OfficeOrderLog/isShowAdjustment'
,
[
'method'
=>
'GET|POST'
]],
'addBargain'
=>
[
'api_broker/OfficeOrderLog/addBargain'
,
[
'method'
=>
'post'
]],
//新增成交报告佣金(分佣提成)
'addBargain'
=>
[
'api_broker/OfficeOrderLog/addBargain'
,
[
'method'
=>
'post'
]],
//新增成交报告佣金(分佣提成)
'houseEdit'
=>
[
'api_broker/OfficeRoom/edit'
,
[
'method'
=>
'POST|GET'
]],
//楼盘字典新增和编辑
'houseEdit'
=>
[
'api_broker/OfficeRoom/edit'
,
[
'method'
=>
'POST'
]],
//楼盘字典新增和编辑
'delHouseFile'
=>
[
'api_broker/OfficeRoom/delHouseFile'
,
[
'method'
=>
'POST'
]],
//删除楼盘图片
'delHouseFile'
=>
[
'api_broker/OfficeRoom/delHouseFile'
,
[
'method'
=>
'POST'
]],
//删除房源图片
'delBuildingFile'
=>
[
'api_broker/OfficeBuilding/delHouseFile'
,
[
'method'
=>
'POST'
]],
//删除楼盘图片
'getBuildingSearch'
=>
[
'api_broker/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
'getBuildingSearch'
=>
[
'api_broker/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
'getBuildingDetail'
=>
[
'api_broker/OfficeRoom/getBuildingDetail'
,
[
'method'
=>
'GET'
]],
//楼盘详情
'getBuildingDetail'
=>
[
'api_broker/OfficeRoom/getBuildingDetail'
,
[
'method'
=>
'GET'
]],
//楼盘详情
]);
]);
Route
::
group
(
'office_index'
,
[
Route
::
group
(
'office_index'
,
[
'houseAdd'
=>
[
'index/OfficeManage/add'
,
[
'method'
=>
'GET|POST'
]
],
//楼盘字典新增
'houseEdit'
=>
[
'index/OfficeManage/edit'
,
[
'method'
=>
'GET|POST'
]
],
//楼盘字典编辑
'delHouseFile'
=>
[
'index/OfficeManage/delHouseFile'
,
[
'method'
=>
'POST'
]
],
//删除楼盘图片
'houseDictionaryAdd'
=>
[
'index/OfficeManage/add'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典新增
'houseDictionaryAdd'
=>
[
'index/OfficeManage/add'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典新增
'houseDictionaryEdit'
=>
[
'index/OfficeManage/edit'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典编辑
'houseDictionaryEdit'
=>
[
'index/OfficeManage/edit'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典编辑
'delHouseFile'
=>
[
'index/OfficeManage/delHouseFile'
,
[
'method'
=>
'POST'
]],
//删除房源图片
'delBuildingFile'
=>
[
'index/OfficeBuilding/delBuildingFile'
,
[
'method'
=>
'POST'
]],
//删除楼盘图片
'getBuildingSearch'
=>
[
'index/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
'getBuildingSearch'
=>
[
'index/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
'getBuildingDetail'
=>
[
'index/OfficeRoom/getBuildingDetail'
,
[
'method'
=>
'GET'
]],
//楼盘详情
'getBuildingDetail'
=>
[
'index/OfficeRoom/getBuildingDetail'
,
[
'method'
=>
'GET'
]],
//楼盘详情
...
...
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