This commit is contained in:
邹宗楠
2023-07-18 10:13:42 +08:00
parent 01df953b93
commit fb63c0d831
2 changed files with 6 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ func (c *PurchaseHandler) StartRefreshComment() {
}
func (c *PurchaseHandler) refreshCommentOnce() {
globals.SugarLogger.Debugf("%s", utils.Format4Output(time.Now(), false))
c.RefreshComment(time.Now().Add(-RefreshCommentTime), time.Now())
utils.AfterFuncWithRecover(RefreshCommentTimeInterval, func() {
c.refreshCommentOnce()
@@ -55,6 +56,7 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
storeID := batchItemList[0].(int)
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDMTWM, "")
commentList, err2 := getAPI(storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID).CommentQuery(storeDetail.VendorStoreID, startDateStr, endDateStr, 0, 0, mtwmapi.CommentReplyStatusNotReplied)
globals.SugarLogger.Debugf("========commentList= :%s", utils.Format4Output(commentList, false))
var orderCommentList []*model.OrderComment
if err = err2; err != nil {
return nil, err