Browse Source

修复bug

wangfei 6 years ago
parent
commit
0914d8eebe
3 changed files with 4 additions and 1 deletions
  1. 1
    0
      models/sys.go
  2. 2
    0
      service/events/events.go
  3. 1
    1
      utils/log.go

+ 1
- 0
models/sys.go View File

@@ -283,5 +283,6 @@ func GetCaseByID(caseID string) (cs *model.SysCase, err error) {
283 283
 func GetAllOrgs() ([]model.SysOrg, error) {
284 284
 	var orgs []model.SysOrg
285 285
 	err := DBEngine.Where("status=?", STATUS_NORMAL).Asc("org_id").Find(&orgs)
286
+
286 287
 	return orgs, err
287 288
 }

+ 2
- 0
service/events/events.go View File

@@ -81,6 +81,8 @@ func getAllEvents(orgID, caseID string) (map[string][]string, error) {
81 81
 		}
82 82
 
83 83
 		for _, act := range acts {
84
+			utils.LogInfo(act)
85
+
84 86
 			// 加入 tpEvts 需要去重
85 87
 			if utils.StrSliceIndexOf(tpEvts, act.ActiveType) == -1 {
86 88
 				tpEvts = append(tpEvts, act.ActiveType)

+ 1
- 1
utils/log.go View File

@@ -90,7 +90,7 @@ func LogInfo(v ...interface{}) {
90 90
 		preMsg = fmt.Sprintf("file: %s    line=%d : ", file, line)
91 91
 	}
92 92
 
93
-	log.Error(preMsg, v...)
93
+	log.Info(preMsg, v...)
94 94
 }
95 95
 
96 96
 // GetDefaultLogger 获取默认 logger