aa
This commit is contained in:
@@ -434,9 +434,11 @@ func GetStoreManageState(ctx *jxcontext.Context, storeIDs []int, vendorID int, f
|
||||
storeIDs = storeIDs2
|
||||
}
|
||||
}
|
||||
fmt.Println("storeIDs1111111111111111111111111111111111", storeIDs)
|
||||
for _, v := range storeIDs {
|
||||
storeDetail, _ := dao.GetStoreDetail(db, v, vendorID, "")
|
||||
if storeDetail == nil || storeDetail.VendorStoreID == "" || storeDetail.VendorOrgCode == "" {
|
||||
continue
|
||||
}
|
||||
result := &GetStoreManageStateResult{
|
||||
StoreID: v,
|
||||
StoreName: storeDetail.Name,
|
||||
@@ -446,11 +448,12 @@ func GetStoreManageState(ctx *jxcontext.Context, storeIDs []int, vendorID int, f
|
||||
//覆盖范围
|
||||
if result.CoverArea == 0 {
|
||||
handler := partner.GetPurchasePlatformFromVendorID(vendorID)
|
||||
store, _ := handler.ReadStore(ctx, storeDetail.VendorOrgCode, storeDetail.VendorStoreID)
|
||||
if storeMaps, err := dao.GetStoresMapList(db, []int{vendorID}, []int{v}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", ""); len(storeMaps) > 0 && err == nil {
|
||||
storeMaps[0].CoverArea = CalculateCoverArea(strings.Split(store.DeliveryRange, ";"), vendorID)
|
||||
dao.UpdateEntity(db, storeMaps[0], "CoverArea")
|
||||
result.CoverArea = storeMaps[0].CoverArea
|
||||
if store, err := handler.ReadStore(ctx, storeDetail.VendorOrgCode, storeDetail.VendorStoreID); err == nil {
|
||||
if storeMaps, err := dao.GetStoresMapList(db, []int{vendorID}, []int{v}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", ""); len(storeMaps) > 0 && err == nil {
|
||||
storeMaps[0].CoverArea = CalculateCoverArea(strings.Split(store.DeliveryRange, ";"), vendorID)
|
||||
dao.UpdateEntity(db, storeMaps[0], "CoverArea")
|
||||
result.CoverArea = storeMaps[0].CoverArea
|
||||
}
|
||||
}
|
||||
}
|
||||
//营业时长
|
||||
|
||||
Reference in New Issue
Block a user