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

View File

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