完善任务接口逻辑以及Eran事件上报接入

This commit is contained in:
lianghuanjie
2024-12-13 16:15:20 +08:00
parent 9f4fb0a9d0
commit f9084a0eb3
20 changed files with 408 additions and 84 deletions

View File

@@ -38,7 +38,7 @@ type (
)
func (m *customNhTaskModel) FindTasksByCommunity(ctx context.Context, communityId uint) ([]*NhTask, error) {
query := fmt.Sprintf("select %s from %s where community_id = ?", nhTaskRows, m.table)
query := fmt.Sprintf("select %s from %s where community_id = 0 or community_id = ?", nhTaskRows, m.table)
var tasks []*NhTask
err := m.conn.QueryRowsCtx(ctx, &tasks, query, communityId)
if err != nil && !errors.Is(err, sqlx.ErrNotFound) {