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)

View File

@@ -204,6 +204,7 @@ func Init() {
"06:30:00",
"00:30:00",
"12:30:00",
"16:40:00",
})
// 每分钟轮询一次,推送骑手信息(假的订单)

View File

@@ -30,6 +30,7 @@ func OnOrderMsg(msgId string, msg interface{}) (response *tiktokShop.CallbackRes
orderId, shopId, _ := api.TiktokStore.GetCallbackOrderId(msgId, msg)
orderDetail, err := GetTiktokApi(utils.Int64ToStr(shopId), 0, "").GetTiktokOrderDetail(orderId)
if err != nil {
globals.SugarLogger.Debugf("GetTiktokApi msg := %s", utils.Format4Output(msg, false))
return tiktokShop.Err2CallbackResponse(err, "")
}
vendorStoreID := orderDetail.SkuOrderList[0].StoreInfo.StoreId