- 门店状态报警时,添加写死的组成员报警
This commit is contained in:
@@ -103,6 +103,14 @@ var (
|
||||
"11:00:00",
|
||||
"15:00:00",
|
||||
}
|
||||
|
||||
mobileGroupMap = map[string]map[string]int{
|
||||
"18650801532": map[string]int{ // 陈磊
|
||||
"13540967462": 1, // 蒋龙丹
|
||||
"13708196093": 1, // 顾子杭
|
||||
"13980795039": 1, // 赵凌兰
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// todo 门店绑定信息可以考虑以数组形式返回,而不是现在这样
|
||||
@@ -1309,6 +1317,18 @@ func SaveStoresVendorSnapshot(db *dao.DaoDB, snapshotAt time.Time, curSnapshotLi
|
||||
return err
|
||||
}
|
||||
|
||||
func isVendorStoresStatusNotOk(storeMapList []*model.StoreMap) bool {
|
||||
statusMap := make(map[int]int)
|
||||
maxStatus := model.StoreStatusClosed
|
||||
for _, v := range storeMapList {
|
||||
statusMap[v.Status] = 1
|
||||
if v.Status > maxStatus {
|
||||
maxStatus = v.Status
|
||||
}
|
||||
}
|
||||
return len(statusMap) > 1 && maxStatus == model.StoreStatusOpened
|
||||
}
|
||||
|
||||
func SendAlarmVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, prevSnapshotList, curSnapshotList []*model.VendorStoreSnapshot) (err error) {
|
||||
if len(prevSnapshotList) == 0 {
|
||||
return nil
|
||||
@@ -1424,9 +1444,16 @@ func shouldSkipMobile4SendStoreStatusInfo(mobile string) bool {
|
||||
}
|
||||
|
||||
func sendStoreStatusInfo2Mobile(mobile, title, excelURL string) {
|
||||
if user := userProvider.GetUser(mobile, auth2.AuthTypeMobile); user != nil {
|
||||
globals.SugarLogger.Debugf("sendStoreStatusInfo2Mobile %s:%s", mobile, excelURL)
|
||||
msg.SendUserMessage(user.GetID(), title, fmt.Sprintf("详情见: \n%s", excelURL))
|
||||
mobileList := []string{mobile}
|
||||
for mobile := range mobileGroupMap[mobile] {
|
||||
mobileList = append(mobileList, mobile)
|
||||
}
|
||||
|
||||
for _, mobile := range mobileList {
|
||||
if user := userProvider.GetUser(mobile, auth2.AuthTypeMobile); user != nil {
|
||||
globals.SugarLogger.Debugf("sendStoreStatusInfo2Mobile %s:%s", mobile, excelURL)
|
||||
msg.SendUserMessage(user.GetID(), title, fmt.Sprintf("详情见: \n%s", excelURL))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user