add more log

This commit is contained in:
Jay 2018-09-27 21:56:32 +08:00
parent aaa463ac6e
commit c233fa0cfb
1 changed files with 3 additions and 0 deletions

View File

@ -304,10 +304,12 @@ func addYoutubeChannel(sub, txt string, s *lineobj.SourceObject) (res string) {
}
func lottery(sub, txt string, s *lineobj.SourceObject) (res string) {
fmt.Println("lottery input ", sub, txt)
if len(sub) == 0 {
return ""
}
data, err := model.GetRandomLotteryByType(sub)
fmt.Println("get data ::: ", data, err)
if err != nil || data == nil {
return
}
@ -323,5 +325,6 @@ func lottery(sub, txt string, s *lineobj.SourceObject) (res string) {
}
o := u + oriURL + "/" + data.Message + "?d=" + sub
t := u + thumbURL + "/" + data.Message + "?d=" + sub
fmt.Printf("$image$%s;%s\n", o, t)
return fmt.Sprintf("$image$%s;%s", o, t)
}