554325746@qq.com
2021-01-11 78177cc89c8340302bb0f3eb29504b1f62d8b00c
controllers/car.go
@@ -101,7 +101,6 @@
}
func nightPush(curTimes int){
   message := fmt.Sprintf("%s 请尽快驶出停车场", time.Now().Format("2006-01-02 15:04:05"))
   b, e, aliasArr,carOwnNames := service.NightPush("温馨提示", message)
   //记录推送日志
@@ -122,8 +121,17 @@
   if curTimes == 3 { //只给管理员推送一次这个消息
      //将具体的车主信息推送给管理员
      if carOwnNames != nil && len(carOwnNames) >0 {
         //获取车主姓名
         managerMsg := strings.Join(carOwnNames, ",")
            var filterdNames []string
            for _,con := range carOwnNames {
                if con != "无车牌" {
                    filterdNames = append(filterdNames, con)
                }
            }
            if len(filterdNames) == 0 {
                return
            }
         //获取车主姓名,无牌车的消息不给管理员推送
         managerMsg := strings.Join(filterdNames, ",")
         mb,me, managerArr := service.Push2Manager(fmt.Sprintf("%s 未驶离车辆", time.Now().Format("2006-01-02 15:04:05")), managerMsg, false)
         mLogE := models.Log{
            Id: uuid.NewV4().String(),
@@ -355,4 +363,4 @@
   }
   c.Data["json"] = resp
   c.ServeJSON()
}
}