- 屏蔽StoreRange越界异步,打印调试信息
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||||
"git.rosy.net.cn/jx-callback/business/model"
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"git.rosy.net.cn/jx-callback/globals/refutil"
|
"git.rosy.net.cn/jx-callback/globals/refutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -475,6 +476,13 @@ func ScoreStoreRange(storeInfo *cms.StoreExt) {
|
|||||||
finalScore = ItemTotalScore - int(math.Round(diff*ratio))
|
finalScore = ItemTotalScore - int(math.Round(diff*ratio))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if finalScore < 0 {
|
||||||
|
globals.SugarLogger.Infof("ScoreStoreRange abnormal finalScore:%d, storeInfo:%s", finalScore, utils.Format4Output(storeInfo, true))
|
||||||
|
finalScore = 0
|
||||||
|
} else if finalScore > ItemTotalScore {
|
||||||
|
globals.SugarLogger.Infof("ScoreStoreRange abnormal finalScore:%d, storeInfo:%s", finalScore, utils.Format4Output(storeInfo, true))
|
||||||
|
finalScore = ItemTotalScore
|
||||||
|
}
|
||||||
storeScoreDataWrapper.SetData(storeID, model.FieldStoreRange, finalScore)
|
storeScoreDataWrapper.SetData(storeID, model.FieldStoreRange, finalScore)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user