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
f661ece5
Commit
f661ece5
authored
Apr 03, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开盘广场-评论详情-回复列表
parent
6ca5447c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
7 deletions
+42
-7
Square.php
application/api_broker/controller/Square.php
+14
-0
SquareService.php
application/api_broker/service/SquareService.php
+19
-0
BCommentExt.php
application/model/BCommentExt.php
+2
-1
route.php
application/route.php
+7
-6
No files found.
application/api_broker/controller/Square.php
View file @
f661ece5
...
...
@@ -124,6 +124,19 @@ class Square extends Basic
}
}
public
function
getSquareCommentExtList
()
{
$params
=
$this
->
params
;
$result
=
$this
->
s_square
->
getSquareCommentExtList
(
$params
);
if
(
$result
){
return
$this
->
response
(
"200"
,
"成功"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"成功"
,
$result
);
}
}
}
\ No newline at end of file
application/api_broker/service/SquareService.php
View file @
f661ece5
...
...
@@ -238,4 +238,22 @@ class SquareService
return
[
'data'
=>
$res
];
}
public
function
getSquareCommentExtList
(
$params
){
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$field
=
'CommentExt.id,CommentExt.comment,CommentExt.create_time,AgentA.img,AgentA.name as agent_id_a,AgentB.name as agent_id_b'
;
//
$get_params
[
'CommentExt.comment_id'
]
=
$params
[
'id'
];
$res
=
$this
->
m_coment_ext
->
getSquareCommentExtList
(
$pageNo
,
$pageSize
,
$field
,
$get_params
);
$res_total
=
$this
->
m_coment_ext
->
getSquareCommentExtListTotal
(
$field
,
$get_params
);
foreach
(
$res
as
$key
=>
$val
)
{
$res
[
$key
][
'image_path'
]
=
'http://n.sinaimg.cn/ent/transform/20170921/FVGl-fymesmp0851702.jpg'
;
}
return
[
'data'
=>
$res
,
'total'
=>
$res_total
];
}
}
\ No newline at end of file
application/model/BCommentExt.php
View file @
f661ece5
...
...
@@ -42,7 +42,8 @@ class BCommentExt extends Model
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
'CommentExt'
)
->
join
(
'a_agents Agent'
,
'Agent.id = Comment.agent_id'
,
'left'
)
->
join
(
'a_agents AgentA'
,
'AgentA.id = CommentExt.agent_id_a'
,
'left'
)
->
join
(
'a_agents AgentB'
,
'AgentB.id = CommentExt.agent_id_b'
,
'left'
)
->
where
(
$params
)
->
count
();
//dump($this->getLastSql());
...
...
application/route.php
View file @
f661ece5
...
...
@@ -855,12 +855,13 @@ Route::group('broker', [
'getStoreRandKingListByAgentId'
=>
[
'api_broker/RankingList/getStoreRandKingListByAgentId'
,
[
'method'
=>
'GET|POST'
]],
//开盘广场
'addSquare'
=>
[
'api_broker/Square/addSquare'
,
[
'method'
=>
'GET|POST'
]
],
'getSquareList'
=>
[
'api_broker/Square/getSquareList'
,
[
'method'
=>
'GET|POST'
]
],
'getSquareInfo'
=>
[
'api_broker/Square/getSquareInfo'
,
[
'method'
=>
'GET|POST'
]
],
'addComent'
=>
[
'api_broker/Square/addComent'
,
[
'method'
=>
'GET|POST'
]
],
'getSquareCommentList'
=>
[
'api_broker/Square/getSquareCommentList'
,
[
'method'
=>
'GET|POST'
]
],
'getCommenInfo'
=>
[
'api_broker/Square/getCommenInfo'
,
[
'method'
=>
'GET|POST'
]
],
'addSquare'
=>
[
'api_broker/Square/addSquare'
,
[
'method'
=>
'GET|POST'
]
],
'getSquareList'
=>
[
'api_broker/Square/getSquareList'
,
[
'method'
=>
'GET|POST'
]
],
'getSquareInfo'
=>
[
'api_broker/Square/getSquareInfo'
,
[
'method'
=>
'GET|POST'
]
],
'addComent'
=>
[
'api_broker/Square/addComent'
,
[
'method'
=>
'GET|POST'
]
],
'getSquareCommentList'
=>
[
'api_broker/Square/getSquareCommentList'
,
[
'method'
=>
'GET|POST'
]
],
'getCommenInfo'
=>
[
'api_broker/Square/getCommenInfo'
,
[
'method'
=>
'GET|POST'
]
],
'getSquareCommentExtList'
=>
[
'api_broker/Square/getSquareCommentExtList'
,
[
'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