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
d4ba55df
Commit
d4ba55df
authored
Jun 04, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
是否可编辑
parent
dfbdd3b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+18
-0
OfficeGRoomToAgent.php
application/model/OfficeGRoomToAgent.php
+8
-0
No files found.
application/index/service/OfficeRoomService.php
View file @
d4ba55df
...
@@ -641,10 +641,28 @@ class OfficeRoomService
...
@@ -641,10 +641,28 @@ class OfficeRoomService
$result
[
'building_image'
]
=
$this
->
getBuildingImage
(
$result
[
'building_id'
]);
$result
[
'building_image'
]
=
$this
->
getBuildingImage
(
$result
[
'building_id'
]);
//是否被收藏
//是否被收藏
$result
[
'is_collect'
]
=
$this
->
isCollect
(
$result
[
'id'
],
$agent_id
);
$result
[
'is_collect'
]
=
$this
->
isCollect
(
$result
[
'id'
],
$agent_id
);
//是否可编辑
$result
[
'is_can_edit'
]
=
$this
->
isCanEdit
(
$result
[
'id'
],
$agent_id
);
return
[
'status'
=>
200
,
'msg'
=>
'success'
,
'data'
=>
$result
];
return
[
'status'
=>
200
,
'msg'
=>
'success'
,
'data'
=>
$result
];
}
}
//是否可编辑
public
function
isCanEdit
(
$id
,
$agent_id
){
$params
[
'house_id'
]
=
$id
;
$params
[
'agent_id'
]
=
$agent_id
;
$params
[
'type'
]
=
2
;
$house
=
$this
->
agent_room
->
isCanEdit
(
'agent_id'
,
$params
);
if
(
$house
){
return
0
;
}
else
{
return
1
;
}
}
//是否被收藏
//是否被收藏
private
function
isCollect
(
$house_id
,
$agent_id
){
private
function
isCollect
(
$house_id
,
$agent_id
){
$m_collect_room
=
new
OfficeACollectHouse
();
$m_collect_room
=
new
OfficeACollectHouse
();
...
...
application/model/OfficeGRoomToAgent.php
View file @
d4ba55df
...
@@ -152,4 +152,12 @@ class OfficeGRoomToAgent extends BaseModel
...
@@ -152,4 +152,12 @@ class OfficeGRoomToAgent extends BaseModel
->
where
(
$params
)
->
where
(
$params
)
->
column
(
$field
);
->
column
(
$field
);
}
}
public
function
isCanEdit
(
$field
,
$params
=
[])
{
$params
[
'is_del'
]
=
0
;
return
$this
->
db_
->
field
(
$field
)
->
where
(
$params
)
->
select
();
}
}
}
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