This commit is contained in:
Jay
2019-07-22 20:54:25 +08:00
parent 4f0b650ac2
commit c7032bde6f
4 changed files with 65 additions and 3 deletions
+3 -3
View File
@@ -35,10 +35,10 @@ func GetFacebookPageByID(id string) (page *FacebookPageModel, err error) {
db := models.GetConn()
query := `select id, lastpost, ctime, mtime from public.facebook_page where id = $1`
err = db.Get(page, query, id)
if err != nil {
if err != nil && err != sql.ErrNoRows {
return
}
return
return page, nil
}
// GetFacebookPageListByChannel -
@@ -64,7 +64,7 @@ func GetFacebookPageByChannelAndID(id, channel string) (page *FacebookPageModel,
page = &FacebookPageModel{}
query := `select id, lastpost, ctime, mtime from public.facebook_page where id = $1 and channel = $2`
err = db.Get(page, query, channel)
if err != nil {
if err != nil && err != sql.ErrNoRows {
return nil, err
}
return