From a74b5baaac1fa7109ebb087f43d71d150a359a82 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Mon, 16 Oct 2023 14:39:53 +0800 Subject: [PATCH] 1 --- business/partner/purchase/mtwm/act.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/business/partner/purchase/mtwm/act.go b/business/partner/purchase/mtwm/act.go index b1dc29e61..0204fb194 100644 --- a/business/partner/purchase/mtwm/act.go +++ b/business/partner/purchase/mtwm/act.go @@ -296,12 +296,13 @@ func GetActByAppPoiCode(vendorStoreID, vendorOrgCode string, sTime, eTime int64, //获取活动商品 for _, v := range actInfo { sku, err := a.FullDiscountFoodsList(vendorStoreID, v.ActInfo.ActIDs) - actID := utils.Str2Int(v.ActInfo.ActIDs) - if err != nil { - temp[actID] = nil + //actID := utils.Str2Int(v.ActInfo.ActIDs) + if err != nil || sku == nil { + temp = append(temp, actInfo) } if CheckActTime(sTime, eTime, v.ActInfo.StartTime, v.ActInfo.EndTime) { - temp[actID] = sku + temp = append(temp, sku) + //temp[actID] = sku } } resp[ActTypeDeduction] = temp @@ -338,8 +339,4 @@ func CheckActTime(startTime, endTime, sTime, eTime int64) bool { return false } return true - //if (startTime <= eTime && eTime <= endTime) || (startTime <= sTime && sTime <= endTime) { - // return true - //} - //return false }