QueryFoodRecipes添加skuIDs参数
This commit is contained in:
@@ -75,6 +75,7 @@ func (c *FoodRecipeController) UpdateFoodRecipe() {
|
||||
// @Param token header string true "认证token"
|
||||
// @Param keyword query string false "关键字"
|
||||
// @Param authorID query string false "创建者ID"
|
||||
// @Param skuIDs query string false "skuID列表"
|
||||
// @Param offset query int false "菜谱列表起始序号(以0开始,缺省为0)"
|
||||
// @Param pageSize query int false "菜谱列表页大小(缺省为50,-1表示全部)"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
@@ -82,7 +83,10 @@ func (c *FoodRecipeController) UpdateFoodRecipe() {
|
||||
// @router /QueryFoodRecipes [get]
|
||||
func (c *FoodRecipeController) QueryFoodRecipes() {
|
||||
c.callQueryFoodRecipes(func(params *tFoodrecipeQueryFoodRecipesParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = userstore.QueryFoodRecipes(params.Ctx, params.Keyword, params.AuthorID, params.Offset, params.PageSize)
|
||||
var skuIDs []int
|
||||
if err = jxutils.Strings2Objs(params.SkuIDs, &skuIDs); err == nil {
|
||||
retVal, err = userstore.QueryFoodRecipes(params.Ctx, params.Keyword, params.AuthorID, skuIDs, params.Offset, params.PageSize)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user