1
This commit is contained in:
@@ -49,7 +49,6 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
|
||||
endDateStr := startTime.Format("20060102")
|
||||
startDateStr := time.Now().Add(-RefreshCommentTime).Format("20060102")
|
||||
storeIDs, _ := dao.GetOrderStoreIDs(dao.GetDB(), fromTime, toTime, model.VendorIDMTWM)
|
||||
storeIDs = append(storeIDs, 804697)
|
||||
task := tasksch.NewParallelTask("mtwm RefreshComment", nil, jxcontext.AdminCtx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
storeID := batchItemList[0].(int)
|
||||
@@ -60,7 +59,6 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
|
||||
}
|
||||
// 查询门店差评
|
||||
commentList, _ := getAPI(storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID).CommentQuery(storeDetail.VendorStoreID, startDateStr, endDateStr, 0, 0, mtwmapi.CommentReplyStatusNotReplied)
|
||||
globals.SugarLogger.Debugf("--------------commentList := %d", len(commentList))
|
||||
var orderCommentList []*model.OrderComment
|
||||
if len(commentList) == model.NO || commentList == nil {
|
||||
return nil, nil
|
||||
@@ -119,13 +117,17 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
|
||||
orderCommentList = append(orderCommentList, orderComment)
|
||||
}
|
||||
}
|
||||
globals.SugarLogger.Debugf("----------orderCommentList := %s", utils.Format4Output(orderCommentList, false))
|
||||
return orderCommentList, nil
|
||||
}, storeIDs)
|
||||
|
||||
task.Run()
|
||||
resultList, err2 := task.GetResult(0)
|
||||
if err = err2; err != nil {
|
||||
globals.SugarLogger.Debugf("-------------err := %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
var orderCommentList []*model.OrderComment
|
||||
for _, result := range resultList {
|
||||
orderComment := result.(*model.OrderComment)
|
||||
|
||||
Reference in New Issue
Block a user