forked from wangziqi/gongxue-base
feat: configure daily check-in rewards
This commit is contained in:
@@ -78,6 +78,8 @@ const ids = {
|
||||
tenantPracticeBadge: '00000000-0000-0000-0000-000000000881',
|
||||
tenantVocabularyBadge: '00000000-0000-0000-0000-000000000882',
|
||||
tenantMockExamBadge: '00000000-0000-0000-0000-000000000883',
|
||||
dailyCheckInTask: '00000000-0000-0000-0000-000000000884',
|
||||
streakCheckInTask: '00000000-0000-0000-0000-000000000885',
|
||||
pointActivityTask: '00000000-0000-0000-0000-000000000877',
|
||||
pointSystemTask: '00000000-0000-0000-0000-000000000878',
|
||||
pointExchangeItem: '00000000-0000-0000-0000-000000000879',
|
||||
@@ -280,7 +282,7 @@ async function main() {
|
||||
tenantId,
|
||||
ids.user,
|
||||
ids.secondStudentUser,
|
||||
[ids.pointActivityTask, ids.pointSystemTask],
|
||||
[ids.pointActivityTask, ids.pointSystemTask, ids.dailyCheckInTask, ids.streakCheckInTask],
|
||||
],
|
||||
);
|
||||
|
||||
@@ -319,7 +321,7 @@ async function main() {
|
||||
or code::text like 'integration-%'
|
||||
)
|
||||
`,
|
||||
[tenantId, [ids.pointActivityTask, ids.pointSystemTask]],
|
||||
[tenantId, [ids.pointActivityTask, ids.pointSystemTask, ids.dailyCheckInTask, ids.streakCheckInTask]],
|
||||
);
|
||||
|
||||
await client.query(
|
||||
@@ -1000,7 +1002,7 @@ async function main() {
|
||||
set region_id = $3,
|
||||
avatar_preset = 'male',
|
||||
last_check_in_date = null,
|
||||
stats = stats - 'checkInStreak' - 'lastCheckInPoints',
|
||||
stats = stats - 'checkInStreak' - 'lastCheckInPoints' - 'lastCheckInRewardMode' - 'checkInRewardBreakdown',
|
||||
updated_at = now()
|
||||
where tenant_id = $1
|
||||
and user_id in ($2::uuid, $4::uuid)
|
||||
|
||||
Reference in New Issue
Block a user