zjxpcyc 6 years ago
parent
commit
f3cd4a06e9
3 changed files with 7 additions and 2 deletions
  1. 2
    2
      conf/test.conf
  2. BIN
      database/annual-lottery.db
  3. 5
    0
      models/detect.go

+ 2
- 2
conf/test.conf View File

1
-conf = 等奖
1
+conf = 等奖
2
 
2
 
3
 [三等奖]
3
 [三等奖]
4
-us = 荟房-姓名5,荟盛行-姓名55
4
+us = 银荔方(锦)-朱妍
5
 
5
 
6
 [特等奖]
6
 [特等奖]
7
 us = 荟房-彭迪
7
 us = 荟房-彭迪

BIN
database/annual-lottery.db View File


+ 5
- 0
models/detect.go View File

4
 	"annual-lottery2/models/model"
4
 	"annual-lottery2/models/model"
5
 	"annual-lottery2/utils"
5
 	"annual-lottery2/utils"
6
 	"strings"
6
 	"strings"
7
+
8
+	"github.com/astaxie/beego"
7
 )
9
 )
8
 
10
 
9
 // UserFilters 用户过滤
11
 // UserFilters 用户过滤
11
 	cf := "./conf/test.conf"
13
 	cf := "./conf/test.conf"
12
 	usrs := make([]model.TaUser, 0)
14
 	usrs := make([]model.TaUser, 0)
13
 	notIn := make([]string, 0)
15
 	notIn := make([]string, 0)
16
+	beego.Info("--------> 1")
14
 
17
 
15
 	if !utils.FileExists(cf) {
18
 	if !utils.FileExists(cf) {
16
 		return usrs, ""
19
 		return usrs, ""
17
 	}
20
 	}
18
 
21
 
22
+	beego.Info("--------> 2")
19
 	conf, err := utils.GetConfig(cf)
23
 	conf, err := utils.GetConfig(cf)
20
 	if err != nil {
24
 	if err != nil {
21
 		return usrs, ""
25
 		return usrs, ""
22
 	}
26
 	}
23
 
27
 
28
+	beego.Info("--------> 3")
24
 	pls := conf.String("conf")
29
 	pls := conf.String("conf")
25
 	if pls == "" {
30
 	if pls == "" {
26
 		return usrs, ""
31
 		return usrs, ""