1
This commit is contained in:
@@ -3,6 +3,7 @@ package permission
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals/api2"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -373,6 +374,10 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
roleList, _ := api2.RoleMan.GetUserRoleList(userID)
|
||||||
|
for _, v := range roleList {
|
||||||
|
resultMap[v.StoreID] = v.StoreID
|
||||||
|
}
|
||||||
|
|
||||||
return resultMap, err
|
return resultMap, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,14 +44,12 @@ func formalizeTagList(mtwmTagList string) (outTagList string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error) {
|
func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error) {
|
||||||
globals.SugarLogger.Debugf("--------------------------------------------------------------")
|
|
||||||
startTime := time.Now().Add(-24 * time.Hour)
|
startTime := time.Now().Add(-24 * time.Hour)
|
||||||
//endTime := time.Now().Add(-RefreshCommentTime)
|
//endTime := time.Now().Add(-RefreshCommentTime)
|
||||||
endDateStr := startTime.Format("20060102")
|
endDateStr := startTime.Format("20060102")
|
||||||
startDateStr := time.Now().Add(-RefreshCommentTime).Format("20060102")
|
startDateStr := time.Now().Add(-RefreshCommentTime).Format("20060102")
|
||||||
storeIDs, _ := dao.GetOrderStoreIDs(dao.GetDB(), fromTime, toTime, model.VendorIDMTWM)
|
storeIDs, _ := dao.GetOrderStoreIDs(dao.GetDB(), fromTime, toTime, model.VendorIDMTWM)
|
||||||
storeIDs = append(storeIDs, 804697)
|
storeIDs = append(storeIDs, 804697)
|
||||||
globals.SugarLogger.Debugf("------storeIDs := %s", utils.Format4Output(storeIDs, false))
|
|
||||||
task := tasksch.NewParallelTask("mtwm RefreshComment", nil, jxcontext.AdminCtx,
|
task := tasksch.NewParallelTask("mtwm RefreshComment", nil, jxcontext.AdminCtx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
storeID := batchItemList[0].(int)
|
storeID := batchItemList[0].(int)
|
||||||
@@ -61,11 +59,7 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
|
|||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
// 查询门店差评
|
// 查询门店差评
|
||||||
commentList, err := getAPI(storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID).CommentQuery(storeDetail.VendorStoreID, startDateStr, endDateStr, 0, 0, mtwmapi.CommentReplyStatusNotReplied)
|
commentList, _ := getAPI(storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID).CommentQuery(storeDetail.VendorStoreID, startDateStr, endDateStr, 0, 0, mtwmapi.CommentReplyStatusNotReplied)
|
||||||
globals.SugarLogger.Debugf("commentList lenght --------------- :=%d,%s,%s", storeID, storeDetail.VendorStoreID, utils.Format4Output(len(commentList), false))
|
|
||||||
if err != nil {
|
|
||||||
globals.SugarLogger.Debugf("=========err := %v", err)
|
|
||||||
}
|
|
||||||
var orderCommentList []*model.OrderComment
|
var orderCommentList []*model.OrderComment
|
||||||
if len(commentList) == model.NO || commentList == nil {
|
if len(commentList) == model.NO || commentList == nil {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
|
|||||||
Reference in New Issue
Block a user