1
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user