Files
leanote/app/service/SuggestionService.go
2014-05-07 13:06:24 +08:00

21 lines
451 B
Go

package service
import (
"github.com/leanote/leanote/app/info"
"github.com/leanote/leanote/app/db"
// . "github.com/leanote/leanote/app/lea"
"labix.org/v2/mgo/bson"
// "time"
// "sort"
)
type SuggestionService struct {
}
// 得到某博客具体信息
func (this *SuggestionService) AddSuggestion(suggestion info.Suggestion) bool {
if suggestion.Id == "" {
suggestion.Id = bson.NewObjectId()
}
return db.Insert(db.Suggestions, suggestion)
}