This commit is contained in:
邹宗楠
2024-08-20 18:32:05 +08:00
parent 141b487f8a
commit 54d09400df

View File

@@ -759,12 +759,15 @@ func (c *PurchaseHandler) ListOrders(ctx *jxcontext.Context, vendorOrgCode strin
if time.Now().Day()-queryDate.Day() > 90 {
return nil, fmt.Errorf("只能查询九十天的数据")
}
if time.Now().Day()-queryDate.Day() > 7 {
if time.Now().Day()-queryDate.Day() > 5 {
endData = queryDate.AddDate(0, 0, 4)
} else {
endData = time.Now()
}
globals.SugarLogger.Debugf("======queryDate := %s", utils.Format4Output(queryDate, false))
globals.SugarLogger.Debugf("======endData := %s", utils.Format4Output(endData, false))
var vendorStoreIDs []string
if vendorStoreID == "" {
vendorStoreIDs, err = c.GetAllStoresVendorID(ctx, vendorOrgCode)