This commit is contained in:
邹宗楠
2023-04-12 15:10:57 +08:00
parent 866b9ab96f
commit 9a193d6b92
4 changed files with 46 additions and 6 deletions

View File

@@ -11,6 +11,7 @@ import (
"git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store"
"git.rosy.net.cn/jx-callback/globals"
"github.com/astaxie/beego/server/web"
"strings"
"time"
)
@@ -742,6 +743,7 @@ func (c *SkuController) RefreshNoImgSku() {
// @Param categoryID query int false "商品名所属类别ID"
// @Param status query int false "查询起始状态0下架1正常, -1全部"
// @Param isBySku query bool false "是否将sku拆开缺省为false"
// @Param bestSeller query int false "是否为畅销品[0-不是/1-是]"
// @Param offset query int false "门店列表起始序号以0开始缺省为0"
// @Param pageSize query int false "门店列表页大小缺省为50-1表示全部"
// @Success 200 {object} controllers.CallResult
@@ -751,12 +753,28 @@ func (c *SkuController) GetSkuNamesNew() {
c.callGetSkuNamesNew(func(params *tSkuGetSkuNamesNewParams) (retVal interface{}, errCode string, err error) {
var skuIDs, skuNameIDs []int
if err = jxutils.Strings2Objs(params.SkuIDs, &skuIDs, params.NameIDs, &skuNameIDs); err == nil {
retVal, err = cms.GetSkuNamesNew(params.Ctx, params.Keyword, skuIDs, skuNameIDs, params.CategoryID, params.Status, params.IsBySku, params.Offset, params.PageSize)
retVal, err = cms.GetSkuNamesNew(params.Ctx, params.Keyword, skuIDs, skuNameIDs, params.CategoryID, params.Status, params.IsBySku, params.Offset, params.PageSize, params.BestSeller)
}
return retVal, "", err
})
}
// @Title 设置商品为热销/取消热销商品
// @Description 设置商品为热销/取消热销商品
// @Param token header string true "认证token"
// @Param skuNameId query string true "商品nameId,多个用逗号分割"
// @Param bestSeller query int true "是否为热销[0不是/1是]"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /SetSkuBestSeller [post]
func (c *SkuController) SetSkuBestSeller() {
c.callSetSkuBestSeller(func(params *tSkuSetSkuBestSellerParams) (retVal interface{}, errCode string, err error) {
nameIds := strings.Split(params.SkuNameId, ",")
err = cms.SetSkuNameSeller(utils.StringSlice2Int64(nameIds), params.BestSeller)
return nil, "", err
})
}
// @Title 根据分类id获取平台属性值
// @Description 根据分类id获取平台属性值
// @Param token header string true "认证token"