Merge remote-tracking branch 'origin/mark' into don
This commit is contained in:
@@ -260,12 +260,12 @@ func CaculateSkuPriceFromVendor(vendorPrice, percentage, catPercentage int) int
|
||||
return price
|
||||
}
|
||||
|
||||
func GetPricePercentage(l model.PricePercentagePack, unitPrice int, defPricePercentage int) (pricePercentage int) {
|
||||
func GetPricePercentage(l model.PricePercentagePack, price int, defPricePercentage int) (pricePercentage int) {
|
||||
pricePercentage = defPricePercentage
|
||||
if len(l) > 0 {
|
||||
var lastItem *model.PricePercentageItem
|
||||
for _, v := range l {
|
||||
if v.BeginPrice > unitPrice {
|
||||
if v.BeginPrice > price {
|
||||
break
|
||||
}
|
||||
lastItem = v
|
||||
|
||||
@@ -418,14 +418,14 @@ func (t *BaseTask) run(taskHandler func()) {
|
||||
if authInfo, err := t.ctx.GetV2AuthInfo(); err == nil { // 这里应该是不管登录类型,直接以可能的方式发消息
|
||||
var content string
|
||||
taskDesc := fmt.Sprintf("你的异步任务[%s],ID[%s],开始于:%s,结束于:%s,", t.Name, t.ID, utils.Time2Str(t.CreatedAt), utils.Time2Str(t.TerminatedAt))
|
||||
if t.mainErr == nil {
|
||||
content = fmt.Sprintf("%s执行%s", taskDesc, TaskStatusName[t.Status])
|
||||
content = fmt.Sprintf("%s执行%s", taskDesc, TaskStatusName[t.Status])
|
||||
if t.Error() == "" {
|
||||
noticeMsg := t.GetNoticeMsg()
|
||||
if noticeMsg != "" {
|
||||
content += ",通知消息:" + noticeMsg
|
||||
}
|
||||
} else {
|
||||
content = t.Error()
|
||||
content += ",\n" + t.Error()
|
||||
}
|
||||
msg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "异步任务完成", content)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user