Accept Merge Request #96: (yonghui -> mark)
Merge Request: 平台门店名,刷新订单状态,商品名前缀,获取平台门店商品价 Created By: @苏尹岚 Accepted By: @苏尹岚 URL: https://rosydev.coding.net/p/jx-callback/d/jx-callback/git/merge/96
This commit is contained in:
@@ -191,6 +191,9 @@ func (c *SkuController) UpdateSkuName() {
|
||||
// dummySkuName := &model.SkuName{}
|
||||
payload := make(map[string]interface{})
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.Payload), &payload); err == nil {
|
||||
delete(payload, "exPrefix")
|
||||
delete(payload, "exPrefixBegin")
|
||||
delete(payload, "exPrefixEnd")
|
||||
retVal, err = cms.UpdateSkuName(params.Ctx, params.NameID, payload)
|
||||
}
|
||||
return retVal, "", err
|
||||
@@ -390,3 +393,25 @@ func (c *SkuController) GetJdUpcCodeByName() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 批量设置商品额外前缀
|
||||
// @Description 批量设置商品额外前缀
|
||||
// @Param token header string true "认证token"
|
||||
// @Param nameIDs formData string true "商品nameIDs"
|
||||
// @Param exPrefix formData string true "商品额外前缀"
|
||||
// @Param fromDate formData string true "生效开始时间,格式 2006-01-01 "
|
||||
// @Param toDate formData string true "生效结束时间,格式 2006-01-01 "
|
||||
// @Param isAsync formData bool false "是否异步"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UpdateSkuNamesExPrefix [put]
|
||||
func (c *SkuController) UpdateSkuNamesExPrefix() {
|
||||
c.callUpdateSkuNamesExPrefix(func(params *tSkuUpdateSkuNamesExPrefixParams) (retVal interface{}, errCode string, err error) {
|
||||
var skuIDList []int
|
||||
if err = jxutils.Strings2Objs(params.NameIDs, &skuIDList); err == nil {
|
||||
retVal, err = cms.UpdateSkuNamesExPrefix(params.Ctx, skuIDList, params.ExPrefix, params.FromDate, params.ToDate, params.IsAsync, params.IsContinueWhenError)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -537,3 +537,23 @@ func (c *StoreSkuController) GetStoreCategories() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 获取各平台所有门店某商品的价格
|
||||
// @Description 获取各平台所有门店某商品的价格
|
||||
// @Param token header string false "认证token"
|
||||
// @Param skuID formData int true "商品ID"
|
||||
// @Param vendorIDs formData string true "厂商ID列表"
|
||||
// @Param isAsync formData bool true "是否异步,缺省是同步"
|
||||
// @Param isContinueWhenError formData bool true "单个同步失败是否继续,缺省false"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetVendorStoreSkuPrice [post]
|
||||
func (c *StoreSkuController) GetVendorStoreSkuPrice() {
|
||||
var vendorIDList []int
|
||||
c.callGetVendorStoreSkuPrice(func(params *tStoreSkuGetVendorStoreSkuPriceParams) (retVal interface{}, errCode string, err error) {
|
||||
if jxutils.Strings2Objs(params.VendorIDs, &vendorIDList); err == nil {
|
||||
retVal, err = cms.GetVendorStoreSkuPrice(params.Ctx, vendorIDList, params.SkuID, params.IsAsync, params.IsContinueWhenError)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user