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"
|
2014-09-02 15:45:44 +08:00
|
|
|
"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
|
|
|
}
|