Files
leanote/app/service/SuggestionService.go

22 lines
454 B
Go
Raw Normal View History

2014-05-07 13:06:24 +08:00
package service
import (
"github.com/leanote/leanote/app/db"
2015-11-13 17:58:41 +08:00
"github.com/leanote/leanote/app/info"
// . "github.com/leanote/leanote/app/lea"
"gopkg.in/mgo.v2/bson"
2015-11-13 17:58:41 +08:00
// "time"
// "sort"
2014-05-07 13:06:24 +08:00
)
type SuggestionService struct {
}
// 得到某博客具体信息
func (this *SuggestionService) AddSuggestion(suggestion info.Suggestion) bool {
if suggestion.Id == "" {
suggestion.Id = bson.NewObjectId()
}
return db.Insert(db.Suggestions, suggestion)
2015-11-13 17:58:41 +08:00
}