This commit is contained in:
邹宗楠
2023-09-21 16:36:25 +08:00
parent 479be671ca
commit a7f31f8789
3 changed files with 5 additions and 2 deletions

View File

@@ -2701,17 +2701,18 @@ func UpdateTiktokShopTotalMoney() {
// UpdateTaoSettleInfo 定时任务更新淘鲜达结算信息
func UpdateTaoSettleInfo() {
db := dao.GetDB()
globals.SugarLogger.Debugf("======================UpdateTaoSettleInfo")
storeMaps, err := dao.GetStoresMapList(db, []int{model.VendorIDTaoVegetable}, nil, nil, -9, -1, "", "", "")
if err != nil {
return
}
timeStart := time.Now().Add(-24 * 90 * time.Hour)
timeStart := time.Now().Add(-24 * 60 * time.Hour)
startTime := time.Date(timeStart.Year(), timeStart.Month(), timeStart.Day()-4, 0, 0, 0, 0, timeStart.Location())
timeEnd := time.Now()
endTiem := time.Date(timeEnd.Year(), timeEnd.Month(), timeEnd.Day()-1, 23, 59, 59, 0, timeStart.Location())
for _, v := range storeMaps {
globals.SugarLogger.Debugf("========storeID := %s", v.VendorStoreID)
settleInfo, err := tao.GetOrderTotalShopMoney(v.VendorOrgCode, v.VendorStoreID, startTime, endTiem)
if err != nil {
globals.SugarLogger.Errorf("获取淘鲜达结算信息异常 := %v", err)