Authored by liangyi.chen@yoho.cn

增加按审核时间排序

... ... @@ -178,6 +178,7 @@ public class GrassArticleCommentServiceImpl implements IGrassArticleCommentServi
grassArticleComment.setContent(req.getContent());
grassArticleComment.setDestId(req.getDestId());
grassArticleComment.setColumnType(ArticleCommentAddReq.COLUMNTYPE_ARTICLE);
grassArticleComment.setSource(1);
//查询内容articleType
GrassArticle grassArticle = grassArticleDao.selectByPrimaryKey(req.getDestId());
if(grassArticle != null){
... ...
... ... @@ -455,6 +455,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
Long endTimeInt = null;
Integer authorUid = req.getAuthorUid();//uid
String recommendSort = StringUtils.isEmpty(req.getRecommendSort()) || "0".equals(req.getRecommendSort()) ? null : req.getRecommendSort();
String auditSort = StringUtils.isEmpty(req.getAuditSort()) || "0".equals(req.getAuditSort()) ? null : req.getAuditSort();
PageResponseVO rsp = new PageResponseVO();
rsp.setList(Lists.newArrayList());
rsp.setTotal(0);
... ... @@ -495,13 +496,13 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
int size = req.getSize();
logger.info("start getArticleList: grassArticleDao.getArticleCount ");
int total = grassArticleDao.selectArticleCount(articleId, source, authStatus, authorUids, isRecommend, isTop, startTimeInt, endTimeInt,
recommendSort, isExclude, userType, sort, currentTime,req.getMarkFlag(),req.getMarkFindgoods());
recommendSort, auditSort,isExclude, userType, sort, currentTime,req.getMarkFlag(),req.getMarkFindgoods());
logger.info("end getArticleList: grassArticleDao.getArticleCount, total is {}", total);
int offset = (page - 1) * size;
logger.info("start getArticleList: grassArticleDao.selectArticleList , offset is {}, limit is {}", offset, size);
List<GrassArticle> articleList = grassArticleDao.selectArticleList(articleId, source, authStatus, authorUids, isRecommend, isTop, startTimeInt, endTimeInt,
offset, size, recommendSort, isExclude, userType, sort, currentTime,req.getMarkFlag(),req.getMarkFindgoods());
offset, size, recommendSort,auditSort, isExclude, userType, sort, currentTime,req.getMarkFlag(),req.getMarkFindgoods());
logger.info("end getArticleList: grassArticleDao.selectArticleList , offset is {}, limit is {}", offset, size);
rsp.setList(buildArticleDetail(articleList, false));
... ...
... ... @@ -70,6 +70,8 @@
</input>
<input class="easyui-combobox" id="recommendSort">
</input>
<input class="easyui-combobox" id="auditSort">
</input>
<input class="easyui-combobox" id="authStatus">
</input>
<input class="easyui-combobox" id="sortParam">
... ... @@ -174,6 +176,15 @@
data:[{text:"选择推荐顺序",value:"0"},{text:"推荐降序",value:"desc"},{text:"推荐升序",value:"asc"}]
});
//审核顺序
$("#auditSort").combobox({
valueField : "value",
textField : "text",
required:false,
prompt: "请选择审核顺序",
data:[{text:"选择审核顺序",value:"0"},{text:"审核降序",value:"desc"},{text:"审核升序",value:"asc"}]
});
//是否屏蔽
$("#authStatus").combobox({
valueField : "value",
... ... @@ -265,6 +276,7 @@
source: $("#source").combobox("getValue"),
userType: $("#userType").combobox("getValue"),
recommendSort:$("#recommendSort").combobox("getValue"),
auditSort:$("#auditSort").combobox("getValue"),
isRecommend: $("#isRecommend").combobox("getValue"),
isTop: $("#isTop").combobox("getValue"),
startTimeStr:startTime,
... ... @@ -288,6 +300,7 @@
source: $("#source").textbox("getValue"),
userType: $("#userType").textbox("getValue"),
recommendSort:$("#recommendSort").combobox("getValue"),
auditSort:$("#auditSort").combobox("getValue"),
authStatus: $("#authStatus").combobox("getValue")
},
url: serverContextPath + "/grassArticle/articleList",
... ...