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
cbe252a1
Commit
cbe252a1
authored
Apr 03, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
d48b93fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
22 deletions
+20
-22
Square.php
application/api_broker/controller/Square.php
+15
-0
SquareService.php
application/api_broker/service/SquareService.php
+4
-19
BComment.php
application/model/BComment.php
+1
-3
No files found.
application/api_broker/controller/Square.php
View file @
cbe252a1
...
@@ -108,6 +108,21 @@ class Square extends Basic
...
@@ -108,6 +108,21 @@ class Square extends Basic
}
}
public
function
getCommenInfo
(){
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
'id'
]))
{
return
$this
->
response
(
"101"
,
"参数不全"
);
}
$result
=
$this
->
s_square
->
getCommenInfo
(
$params
);
if
(
$result
){
return
$this
->
response
(
"200"
,
"成功"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"成功"
,
$result
);
}
}
...
...
application/api_broker/service/SquareService.php
View file @
cbe252a1
...
@@ -231,25 +231,10 @@ class SquareService
...
@@ -231,25 +231,10 @@ class SquareService
}
}
public
function
getCommenInfo
(
$params
){
public
function
getCommenInfo
(
$params
){
$field
=
'Comment.id,Comment.comment,Comment.create_time,Agent.name,Agent.img'
;
//
$field
=
'Square.id,'
;
//
$get_params
[
'Comment.id'
]
=
$params
[
'id'
];
$field
.=
'Square.title,'
;
//标题
$res
=
$this
->
m_coment
->
getCommenInfo
(
$field
,
$get_params
);
$field
.=
'Square.content,'
;
//标题
$res
[
'image_path'
]
=
'http://n.sinaimg.cn/ent/transform/20170921/FVGl-fymesmp0851702.jpg'
;
$field
.=
'Square.cover_img,'
;
//cover_img
$field
.=
'Agent.name,'
;
//发布人
$field
.=
'Square.site_id,'
;
//城市
$field
.=
'Square.district_lable_id,'
;
//部门
$field
.=
'Square.create_time'
;
//发布时间
$get_params
[
'Square.id'
]
=
$params
[
'id'
];
// $get_params['Square.status'] = 0;
$res
=
$this
->
m_square
->
getSquareInfo
(
$field
,
$get_params
);
// foreach ($res as $key => $val) {
//
// }
return
[
'data'
=>
$res
];
return
[
'data'
=>
$res
];
}
}
...
...
application/model/BComment.php
View file @
cbe252a1
...
@@ -55,9 +55,7 @@ class BComment extends Model
...
@@ -55,9 +55,7 @@ class BComment extends Model
$result
=
Db
::
table
(
$this
->
table
)
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
'Comment'
)
->
alias
(
'Comment'
)
->
join
(
'a_agents Agent'
,
'Agent.id = Square.agent_id'
,
'left'
)
->
join
(
'a_agents Agent'
,
'Agent.id = Comment.agent_id'
,
'left'
)
->
join
(
'a_site Site'
,
'Site.id = Square.site_id'
,
'left'
)
->
join
(
'a_district District'
,
'District.id = Square.district_id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
order
(
$order
)
->
order
(
$order
)
->
find
();
->
find
();
...
...
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