- add TmpGetJxBadComments
This commit is contained in:
@@ -202,7 +202,7 @@ func (c *StoreController) TmpGetJxBadCommentsNo() {
|
||||
}
|
||||
|
||||
// @Title 得到门店差评总数
|
||||
// @Description 得到门店差评总数
|
||||
// @Description 得到门店差评总数(使用TmpGetJxBadComments替代)
|
||||
// @Param token header string true "认证token"
|
||||
// @Param jxStoreId query int true "门店ID"
|
||||
// @Param type query int true "评论类型,0:差评,1:所有"
|
||||
@@ -217,7 +217,34 @@ func (c *StoreController) TmpGetJxBadCommentsByStoreId() {
|
||||
c.callTmpGetJxBadCommentsByStoreId(func(params *tStoreTmpGetJxBadCommentsByStoreIdParams) (retVal interface{}, errCode string, err error) {
|
||||
timeList, err2 := jxutils.BatchStr2Time(params.FromTime, params.ToTime)
|
||||
if err = err2; err == nil {
|
||||
retVal, err = cms.TmpGetJxBadCommentsByStoreId(params.Ctx, params.JxStoreId, params.Page, params.Size, params.Type, timeList[0], timeList[1])
|
||||
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])
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 得到门店差评总数
|
||||
// @Description 得到门店差评总数
|
||||
// @Param token header string true "认证token"
|
||||
// @Param type query int true "评论类型,0:差评,1:所有"
|
||||
// @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 "创建结束时间"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /TmpGetJxBadComments [get]
|
||||
func (c *StoreController) TmpGetJxBadComments() {
|
||||
c.callTmpGetJxBadComments(func(params *tStoreTmpGetJxBadCommentsParams) (retVal interface{}, errCode string, err error) {
|
||||
var storeIDs []int
|
||||
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])
|
||||
}
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user