From b9da868736fb689ef60757d3ee1fd33376a543fa Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 15 Mar 2019 11:34:21 +0800 Subject: [PATCH] - TmpGetJxBadComments support only fetch fix order comment --- business/jxstore/cms/store.go | 13 +++++++++---- controllers/cms_store.go | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index d3c5e6439..4d2014baa 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -22,8 +22,9 @@ import ( ) const ( - GET_BAD_COMMENTS_TYPE = 0 //获取差评的标志 - GET_ALL_COMMENTS_TYPE = 1 //获取所有评论的标志 + GET_BAD_COMMENTS_TYPE = 0 //获取差评的标志 + GET_ALL_COMMENTS_TYPE = 1 //获取所有评论的标志 + GET_FIXED_COMMENTS_TYPE = 2 //获取已解决评论的标志 ) type StoreExt struct { @@ -634,9 +635,13 @@ func TmpGetJxBadCommentsByStoreId(ctx *jxcontext.Context, storeIDs []int, offset sql += " AND t1.jxstoreid IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")" sqlParams = append(sqlParams, storeIDs) } - if commentType == GET_BAD_COMMENTS_TYPE { + if commentType != GET_ALL_COMMENTS_TYPE { sql += " AND t1.status = ?" - sqlParams = append(sqlParams, commentType) + if commentType == GET_BAD_COMMENTS_TYPE { + sqlParams = append(sqlParams, 0) + } else { + sqlParams = append(sqlParams, 1) + } } if !utils.IsTimeZero(fromTime) { sql += " AND t1.createtime >= ?" diff --git a/controllers/cms_store.go b/controllers/cms_store.go index f6d7f589b..d76966770 100644 --- a/controllers/cms_store.go +++ b/controllers/cms_store.go @@ -228,7 +228,7 @@ func (c *StoreController) TmpGetJxBadCommentsByStoreId() { // @Title 得到门店差评总数 // @Description 得到门店差评总数 // @Param token header string true "认证token" -// @Param type query int true "评论类型,0:差评,1:所有" +// @Param type query int true "评论类型,0:差评,1:所有,2:已解决" // @Param storeIDs query string false "门店I列表" // @Param offset query int false "起始页,从1开始" // @Param pageSize query int false "页大小(-1表示无限大)"