diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index f2976225a..997fb8839 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -6,6 +6,8 @@ import ( "sync" "time" + "git.rosy.net.cn/jx-callback/globals/api" + push "git.rosy.net.cn/jx-callback/business/jxutils/unipush" "github.com/astaxie/beego" @@ -1620,7 +1622,9 @@ func OrderProfitWarning(order *model.GoodsOrder) { } userIDs = append(userIDs, user2.UserID) for _, v := range userIDs { - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, v, "警告!此订单利润低于0", noticeMsg) + if api.DingDingAPI.GetToken() != "" { + ddmsg.SendUserMessage(dingdingapi.MsgTyeText, v, "警告!此订单利润低于0", noticeMsg) + } } } }