TmpGetJxBadComments添加可选参数keyword

This commit is contained in:
gazebo
2019-11-11 17:33:19 +08:00
parent e763aac526
commit ef5e755544
2 changed files with 13 additions and 5 deletions

View File

@@ -237,7 +237,7 @@ func (c *StoreController) TmpGetJxBadCommentsByStoreId() {
if err = err2; err == nil {
pageSize := jxutils.FormalizePageSize(params.Size)
offset := (params.Page - 1) * pageSize
retVal, err = cms.TmpGetJxBadCommentsByStoreId(params.Ctx, []int{params.JxStoreId}, offset, pageSize, params.Type, timeList[0], timeList[1])
retVal, err = cms.TmpGetJxBadCommentsByStoreId(params.Ctx, "", []int{params.JxStoreId}, offset, pageSize, params.Type, timeList[0], timeList[1])
}
return retVal, "", err
})
@@ -247,11 +247,12 @@ func (c *StoreController) TmpGetJxBadCommentsByStoreId() {
// @Description 得到门店评价列表(多店)
// @Param token header string true "认证token"
// @Param type query int true "评论类型0差评1所有2已解决"
// @Param keyword query string false "关键字"
// @Param storeIDs query string false "门店I列表"
// @Param offset query int false "起始页从1开始"
// @Param pageSize query int false "页大小(-1表示无限大"
// @Param fromTime query string false "创建起始时间"
// @Param toTime query string false "创建结束时间"
// @Param offset query int false "起始页从1开始"
// @Param pageSize query int false "页大小(-1表示无限大"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /TmpGetJxBadComments [get]
@@ -261,7 +262,7 @@ func (c *StoreController) TmpGetJxBadComments() {
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs); err == nil {
timeList, err2 := jxutils.BatchStr2Time(params.FromTime, params.ToTime)
if err = err2; err == nil {
retVal, err = cms.TmpGetJxBadCommentsByStoreId(params.Ctx, storeIDs, params.Offset, params.PageSize, params.Type, timeList[0], timeList[1])
retVal, err = cms.TmpGetJxBadCommentsByStoreId(params.Ctx, params.Keyword, storeIDs, params.Offset, params.PageSize, params.Type, timeList[0], timeList[1])
}
}
return retVal, "", err