From 16f445bd6009e78fe6e2903116c2f8bfe639529a Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 16 Aug 2023 13:57:18 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/store.go | 29 +++++++++++++---------- business/partner/delivery/sfps/waybill.go | 6 ++++- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 075d740b8..895e91bfd 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -132,19 +132,19 @@ type VendorStoreExcel struct { //门店信息 type StoreInfo struct { - StoreID int `json:"storeID"` //门店ID - StoreName string `json:"storeName"` //门店名字 - OpenTime1 int16 `json:"openTime1"` // 930就表示9点半,用两个的原因是为了支持中午休息,1与2的时间段不能交叉,为0表示没有 - CloseTime1 int16 `json:"closeTime1"` // 营业时间 1 - OpenTime2 int16 `json:"openTime2"` // 营业时间2 - CloseTime2 int16 `json:"closeTime2"` - Status int `json:"status"` //门店是否营业 - Distance int `json:"distance"` //店铺与定位 直线距离 - Address string `json:"address"` //门店地址 - BrandID int `orm:"column(brand_id)" json:"brandID"` //品牌ID - BrandName string `json:"brandName"` //品牌名字 - BrandLogo string `json:"brandLogo"` //品牌logo - //WeeklyScore int `json:"weeklyScore"` //店铺每周评分 + StoreID int `json:"storeID"` //门店ID + StoreName string `json:"storeName"` //门店名字 + OpenTime1 int16 `json:"openTime1"` // 930就表示9点半,用两个的原因是为了支持中午休息,1与2的时间段不能交叉,为0表示没有 + CloseTime1 int16 `json:"closeTime1"` // 营业时间 1 + OpenTime2 int16 `json:"openTime2"` // 营业时间2 + CloseTime2 int16 `json:"closeTime2"` + Status int `json:"status"` //门店是否营业 + Distance int `json:"distance"` //店铺与定位 直线距离 + Address string `json:"address"` //门店地址 + BrandID int `orm:"column(brand_id)" json:"brandID"` //品牌ID + BrandName string `json:"brandName"` //品牌名字 + BrandLogo string `json:"brandLogo"` //品牌logo + StoreWeeklyScore int `json:"storeWeeklyScore"` //店铺每周评分 } //门店减免策略 @@ -5925,6 +5925,9 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis if err != nil { return nil, "获取门店品牌信息失败", err } + //获取门店每周评分 + //storeScore, err := misc.GetWeeklyStoreScore(v.ID, 0) + storeInfo := StoreInfo{ StoreID: v.ID, StoreName: v.Name, diff --git a/business/partner/delivery/sfps/waybill.go b/business/partner/delivery/sfps/waybill.go index 78cf28e38..177a500c8 100644 --- a/business/partner/delivery/sfps/waybill.go +++ b/business/partner/delivery/sfps/waybill.go @@ -208,14 +208,18 @@ func (d DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int, deductionFee, err := api.SfPsAPI.PreCancelOrder(bill.VendorWaybillID) if deductionFee == 0 || err != nil { money = 0 + } else { + money = utils.Float64TwoInt64(deductionFee) } - money = utils.Float64TwoInt64(deductionFee) + globals.SugarLogger.Debugf("CancelWaybill money=%d", money) if err = api.SfPsAPI.CancelOrder(bill.VendorWaybillID); err != nil { return err } bill.Status = model.WaybillStatusCanceled bill.Remark = cancelReason bill.DesiredFee = money //取消成功才赋值违约金 + globals.SugarLogger.Debugf("CancelWaybill bill=%s", utils.Format4Output(bill, false)) + partner.CurOrderManager.OnWaybillStatusChanged(bill) return nil }