fix query
This commit is contained in:
parent
25892f83ae
commit
a7cb7cf8cf
@ -61,14 +61,14 @@ func (p *Instagram) UpdatePost(postID string) (err error) {
|
|||||||
|
|
||||||
// GetGroups -
|
// GetGroups -
|
||||||
func (p *Instagram) GetGroups() (err error) {
|
func (p *Instagram) GetGroups() (err error) {
|
||||||
query := `select g.*, rt.tmpl as tmpl from "public"."facebook_page" p
|
query := `select g.*, rt.tmpl as tmpl from "public"."instagram" p
|
||||||
left join "public"."line_fb_rt" rt
|
left join "public"."line_ig_rt" rt
|
||||||
on rt."facebook" = p.id
|
on rt."ig" = p.id
|
||||||
left join "public"."line_group" g
|
left join "public"."line_group" g
|
||||||
on g.id = rt."line"
|
on g.id = rt."line"
|
||||||
where
|
where
|
||||||
p.id = $1
|
p.id = $1
|
||||||
and rt.facebook is not null`
|
and rt.ig is not null`
|
||||||
err = x.Select(&p.Groups, query, p.ID)
|
err = x.Select(&p.Groups, query, p.ID)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -163,6 +163,7 @@ func UpdateInstagramPost(c *context.Context) {
|
|||||||
|
|
||||||
err = ig.GetGroups()
|
err = ig.GetGroups()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
fmt.Println("get group err :: ", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user