moddify: 邀请任务需绑定twitter

This commit is contained in:
lianghuanjie
2025-01-06 20:39:27 +08:00
parent c540744176
commit 3ad3482f43
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
services: services:
saas-server: nova-task:
image: harbor.phantom-u3d002.com/nova/nova-task:latest image: harbor.phantom-u3d002.com/nova/nova-task:latest
container_name: nova-task container_name: nova-task
privileged: true privileged: true

View File

@@ -90,7 +90,7 @@ func (m *customNhPromoteBindModel) UserInviteCount(ctx context.Context, uid uint
if ok { if ok {
return v.(int64), nil 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 var count int64
err := m.conn.QueryRowCtx(ctx, &count, query, uid) err := m.conn.QueryRowCtx(ctx, &count, query, uid)
if err != nil && !errors.Is(err, sqlx.ErrNotFound) { if err != nil && !errors.Is(err, sqlx.ErrNotFound) {