Merge remote-tracking branch 'origin/mark' into yonghui

This commit is contained in:
苏尹岚
2019-12-06 17:22:54 +08:00
27 changed files with 167 additions and 164 deletions

View File

@@ -296,7 +296,7 @@ func (c *SkuController) DeleteSkuNamePlace() {
// @Param token header string true "认证token"
// @Param vendorSkuID query string true "sku ID"
// @Param vendorID query int true "门店所属的厂商ID"
// @Param vendorOrgCode query string true "厂商内组织代码"
// @Param vendorOrgCode query string false "厂商内组织代码"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetVendorSku [get]

View File

@@ -60,12 +60,13 @@ func (c *StoreController) GetStores() {
// @Param token header string true "认证token"
// @Param vendorStoreID query string true "门店ID"
// @Param vendorID query int true "门店所属的厂商ID"
// @Param vendorOrgCode query string false "厂商内组织代码"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetVendorStore [get]
func (c *StoreController) GetVendorStore() {
c.callGetVendorStore(func(params *tStoreGetVendorStoreParams) (retVal interface{}, errCode string, err error) {
retVal, err = cms.GetVendorStore(params.Ctx, params.VendorStoreID, params.VendorID)
retVal, err = cms.GetVendorStore(params.Ctx, params.VendorID, params.VendorOrgCode, params.VendorStoreID)
return retVal, "", err
})
}
@@ -176,6 +177,7 @@ func (c *StoreController) UpdateStoreVendorMap() {
// @Param token header string true "认证token"
// @Param storeID formData int true "门店IDpayload中的相应字段会被忽略"
// @Param vendorID formData int true "厂商IDpayload中的相应字段会被忽略"
// @Param vendorOrgCode formData string false "厂商内组织代码"
// @Param payload formData string true "json数据storeMap对象({'vendorStoreID':'11732425','autoPickup':1,'deliveryCompetition':1, 'pricePercentage':100})"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
@@ -184,7 +186,7 @@ func (c *StoreController) AddStoreVendorMap() {
c.callAddStoreVendorMap(func(params *tStoreAddStoreVendorMapParams) (retVal interface{}, errCode string, err error) {
storeMap := &model.StoreMap{}
if err = utils.UnmarshalUseNumber([]byte(params.Payload), storeMap); err == nil {
retVal, err = cms.AddStoreVendorMap(params.Ctx, nil, params.StoreID, params.VendorID, storeMap)
retVal, err = cms.AddStoreVendorMap(params.Ctx, nil, params.VendorID, params.VendorOrgCode, params.StoreID, storeMap)
}
return retVal, "", err
})

View File

@@ -87,16 +87,16 @@ func (c *SyncController) RefreshAllStoresID() {
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /RefreshAllSkusID [put]
func (c *SyncController) RefreshAllSkusID() {
// c.callRefreshAllSkusID(func(params *tSyncRefreshAllSkusIDParams) (retVal interface{}, errCode string, err error) {
// var vendorIDs, storeIDs []int
// if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs, params.VendorIDs, &vendorIDs); err != nil {
// return retVal, "", err
// }
// retVal, err = cms.CurVendorSync.RefreshAllSkusID(params.Ctx, params.IsAsync, vendorIDs, storeIDs)
// return retVal, "", err
// })
}
// func (c *SyncController) RefreshAllSkusID() {
// c.callRefreshAllSkusID(func(params *tSyncRefreshAllSkusIDParams) (retVal interface{}, errCode string, err error) {
// var vendorIDs, storeIDs []int
// if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs, params.VendorIDs, &vendorIDs); err != nil {
// return retVal, "", err
// }
// retVal, err = cms.CurVendorSync.RefreshAllSkusID(params.Ctx, params.IsAsync, vendorIDs, storeIDs)
// return retVal, "", err
// })
// }
// @Title 全新初始化商家商品信息
// @Description 全新初始化商家商品信息(!!!此操作会先清除平台上已有的商品及分类信息),此操作只适用于单门店模式平台