From f1bbced1137050b258bf85af3822a654b991f5d9 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 27 Jun 2019 09:45:00 +0800 Subject: [PATCH] - shouldSkipMobile4SendStoreStatusInfo --- business/jxstore/cms/store.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 4b6af93bd..64f75a7ad 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1275,7 +1275,7 @@ func SendAlarmVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, p } var mobileList []string for mobile := range userMap { - if mobile != "" { + if mobile != "" && !shouldSkipMobile4SendStoreStatusInfo(mobile) { mobileList = append(mobileList, mobile) } } @@ -1335,6 +1335,10 @@ func SendAlarmVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, p return err } +func shouldSkipMobile4SendStoreStatusInfo(mobile string) bool { + return userProvider.GetUser(mobile, auth2.AuthTypeMobile) == nil +} + func sendStoreStatusInfo2Mobile(mobile, title, excelURL string) { if user := userProvider.GetUser(mobile, auth2.AuthTypeMobile); user != nil { globals.SugarLogger.Debugf("sendStoreStatusInfo2Mobile %s:%s", mobile, excelURL)