Merge branch 'mark' of e.coding.net:rosydev/jx-callback into mark
This commit is contained in:
@@ -1292,7 +1292,8 @@ 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) {
|
||||
func GetJdUpcCodeByName(ctx *jxcontext.Context, name string, offset, pageSize int) (pagedInfo *model.PagedInfo, err error) {
|
||||
pageNo := (offset/pageSize) +1
|
||||
jdSkus, totalCount, err := api.JdAPI.GetJdUpcCodeByName(name, pageNo, pageSize)
|
||||
pagedInfo = &model.PagedInfo{
|
||||
Data: jdSkus,
|
||||
|
||||
@@ -380,14 +380,14 @@ func (c *SkuController) GetStoreSkuSalesInfo() {
|
||||
// @Description 根据名字查询京东商品UPC信息
|
||||
// @Param token header string true "认证token"
|
||||
// @Param name formData string true "商品名"
|
||||
// @Param pageNo formData int true "页码"
|
||||
// @Param offset formData int true "起始序号,只能传入pageSize的整数倍数,比如pageSize为20,offset传入0,20,40..代表第一页,第二页.."
|
||||
// @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)
|
||||
retVal, err = cms.GetJdUpcCodeByName(params.Ctx, params.Name, params.Offset, params.PageSize)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user