From 3ad3482f43bc67b189af83b64dda490f29006002 Mon Sep 17 00:00:00 2001 From: lianghuanjie Date: Mon, 6 Jan 2025 20:39:27 +0800 Subject: [PATCH] =?UTF-8?q?moddify:=20=E9=82=80=E8=AF=B7=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E9=9C=80=E7=BB=91=E5=AE=9Atwitter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 2 +- internal/model/nh_promote_bind_model.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 69a2aba..ec61b12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ services: - saas-server: + nova-task: image: harbor.phantom-u3d002.com/nova/nova-task:latest container_name: nova-task privileged: true diff --git a/internal/model/nh_promote_bind_model.go b/internal/model/nh_promote_bind_model.go index 7031a93..0818619 100755 --- a/internal/model/nh_promote_bind_model.go +++ b/internal/model/nh_promote_bind_model.go @@ -90,7 +90,7 @@ func (m *customNhPromoteBindModel) UserInviteCount(ctx context.Context, uid uint if ok { return v.(int64), nil } - query := fmt.Sprintf("select count(*) as `count` from %s where `share_uid` = ?", m.table) + query := fmt.Sprintf("SELECT COUNT(*) as count FROM %s pb JOIN `nh_twitter` tw ON pb.invited_uid = tw.uid WHERE pb.share_uid = ?", m.table) var count int64 err := m.conn.QueryRowCtx(ctx, &count, query, uid) if err != nil && !errors.Is(err, sqlx.ErrNotFound) {