!!!门店相关的API全部添加vendorOrgCode依赖

This commit is contained in:
gazebo
2019-12-06 17:20:55 +08:00
parent 7fb09f99d1
commit 039f87c8dc
27 changed files with 167 additions and 164 deletions

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
})