- shouldSkipMobile4SendStoreStatusInfo

This commit is contained in:
gazebo
2019-06-27 09:45:00 +08:00
parent 3161ed215f
commit f1bbced113

View File

@@ -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)