- TmpGetJxBadComments support only fetch fix order comment

This commit is contained in:
gazebo
2019-03-15 11:34:21 +08:00
parent 39f390cb1f
commit b9da868736
2 changed files with 10 additions and 5 deletions

View File

@@ -24,6 +24,7 @@ import (
const (
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 >= ?"

View File

@@ -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表示无限大"