增加社区列表接口,任务相关接口修改
This commit is contained in:
@@ -21,6 +21,7 @@ const (
|
||||
TASKTYPE_BIND_DISCORD = 7
|
||||
TASKTYPE_JOIN_TELEGRAM = 8
|
||||
TASKTYPE_DAILY_PAY = 9
|
||||
TASKTYPE_INVITE_USER = 10
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -38,7 +39,7 @@ type (
|
||||
)
|
||||
|
||||
func (m *customNhTaskModel) FindTasksByCommunity(ctx context.Context, communityId uint) ([]*NhTask, error) {
|
||||
query := fmt.Sprintf("select %s from %s where community_id = 0 or community_id = ?", nhTaskRows, m.table)
|
||||
query := fmt.Sprintf("select %s from %s where `status` = 1 and community_id = ? order by `sort`", nhTaskRows, m.table)
|
||||
var tasks []*NhTask
|
||||
err := m.conn.QueryRowsCtx(ctx, &tasks, query, communityId)
|
||||
if err != nil && !errors.Is(err, sqlx.ErrNotFound) {
|
||||
|
||||
Reference in New Issue
Block a user