This commit is contained in:
苏尹岚
2021-02-05 15:32:18 +08:00
parent 45c879a7ac
commit 921c50ac4d
2 changed files with 28 additions and 18 deletions

View File

@@ -3916,20 +3916,22 @@ func CreateVendorStore(ctx *jxcontext.Context, storeID, vendorID int, payload ma
if err != nil {
return err
}
//AddStoreVendorMap 太复杂了并不满足,还是手动加吧
storeMap := &model.StoreMap{
VendorStoreID: vendorStoreID,
StoreID: storeID,
VendorID: vendorID,
VendorOrgCode: payload["vendorOrgCode"].(string),
Status: 0, //平台还未审核等
DeliveryType: model.StoreDeliveryTypeByStore,
PricePercentage: payload["pricePercentage"].(int16),
AutoPickup: 1,
IsSync: 1,
PricePercentagePack: payload["pricePercentagePack"].(string),
if vendorStoreID != "" {
//AddStoreVendorMap 太复杂了并不满足,还是手动加吧
storeMap := &model.StoreMap{
VendorStoreID: vendorStoreID,
StoreID: storeID,
VendorID: vendorID,
VendorOrgCode: payload["vendorOrgCode"].(string),
Status: 0, //平台还未审核等
DeliveryType: model.StoreDeliveryTypeByStore,
PricePercentage: int16(utils.MustInterface2Int64(payload["pricePercentage"])),
AutoPickup: 1,
IsSync: 1,
PricePercentagePack: payload["pricePercentagePack"].(string),
}
dao.WrapAddIDCULDEntity(storeMap, ctx.GetUserName())
err = dao.CreateEntity(db, storeMap)
}
dao.WrapAddIDCULDEntity(storeMap, ctx.GetUserName())
err = dao.CreateEntity(db, storeMap)
return err
}

View File

@@ -55,8 +55,12 @@ var (
"category2": 183,
},
map[string]interface{}{
"category1": 274,
"category2": 190,
"category1": 277,
"category2": 181,
},
map[string]interface{}{
"category1": 277,
"category2": 182,
},
},
BusinessFormID: 1917869373,
@@ -78,8 +82,12 @@ var (
"category2": 183,
},
map[string]interface{}{
"category1": 274,
"category2": 190,
"category1": 277,
"category2": 181,
},
map[string]interface{}{
"category1": 277,
"category2": 182,
},
},
BusinessFormID: 1917869373,