根据名字查询京东upc
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/baseapi/utils/errlist"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
@@ -1289,3 +1291,12 @@ func SortCategorySkus(ctx *jxcontext.Context, catID int, skuIDList []int) (err e
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func GetJdUpcCodeByName(ctx *jxcontext.Context, name string, pageNo, pageSize int) (pagedInfo *model.PagedInfo, err error) {
|
||||
jdSkus, totalCount, err := api.JdAPI.GetJdUpcCodeByName(name, pageNo, pageSize)
|
||||
pagedInfo = &model.PagedInfo{
|
||||
Data: jdSkus,
|
||||
TotalCount: totalCount,
|
||||
}
|
||||
return pagedInfo, err
|
||||
}
|
||||
|
||||
@@ -375,3 +375,19 @@ func (c *SkuController) GetStoreSkuSalesInfo() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 根据名字查询京东商品UPC信息
|
||||
// @Description 根据名字查询京东商品UPC信息
|
||||
// @Param token header string true "认证token"
|
||||
// @Param name formData string true "商品名"
|
||||
// @Param pageNo formData int true "页码"
|
||||
// @Param pageSize formData int true "分页大小"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetJdUpcCodeByName [post]
|
||||
func (c *SkuController) GetJdUpcCodeByName() {
|
||||
c.callGetJdUpcCodeByName(func(params *tSkuGetJdUpcCodeByNameParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = cms.GetJdUpcCodeByName(params.Ctx, params.Name, params.PageNo, params.PageSize)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -634,3 +634,4 @@ func (c *StoreController) SaveAndSendAlarmVendorSnapshot() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1170,6 +1170,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"],
|
||||
beego.ControllerComments{
|
||||
Method: "GetJdUpcCodeByName",
|
||||
Router: `/GetJdUpcCodeByName`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"],
|
||||
beego.ControllerComments{
|
||||
Method: "GetSensitiveWordList",
|
||||
|
||||
Reference in New Issue
Block a user