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
e1e47db7
Commit
e1e47db7
authored
Feb 19, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商学院评论列表
parent
2e54b526
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
News.php
application/index/controller/News.php
+3
-1
SNewsComment.php
application/model/SNewsComment.php
+10
-0
No files found.
application/index/controller/News.php
View file @
e1e47db7
...
@@ -279,7 +279,9 @@ class News extends Basic
...
@@ -279,7 +279,9 @@ class News extends Basic
$m_comment
=
new
SNewsComment
();
$m_comment
=
new
SNewsComment
();
$field
=
'a.id,a.comment_content,a.create_time,b.name,c.title'
;
$field
=
'a.id,a.comment_content,a.create_time,b.name,c.title'
;
$data
=
$m_comment
->
getCommentList
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$field
,
$where
);
$return
=
$m_comment
->
getCommentList
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$field
,
$where
);
$data
[
'list'
]
=
$return
;
$data
[
'total'
]
=
$m_comment
->
getCommentListTotal
(
$where
);
return
$this
->
response
(
200
,
""
,
$data
);
return
$this
->
response
(
200
,
""
,
$data
);
}
}
...
...
application/model/SNewsComment.php
View file @
e1e47db7
...
@@ -72,6 +72,16 @@ class SNewsComment extends BaseModel
...
@@ -72,6 +72,16 @@ class SNewsComment extends BaseModel
return
$data
;
return
$data
;
}
}
public
function
getCommentListTotal
(
$params
=
''
)
{
$data
=
$this
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agent_id = b.id'
,
'left'
)
->
join
(
's_news c'
,
'a.s_news_id = c.id'
,
'left'
)
->
where
(
$params
)
->
count
();
return
$data
;
}
/**
/**
* 更新数据
* 更新数据
*/
*/
...
...
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