一、超管端设计优化 - 文档管理SOP体系建立,docs目录重组 - 统一用户管理:跨租户全局视角,合并用户管理+公众用户 - 活动监管全模块重构:全部活动(统计卡片+阶段筛选+SuperDetail详情页)、报名数据/作品数据/评审进度(两层合一扁平列表)、成果发布(去Tab+统计+隐藏写操作) - 菜单精简:移除评委管理/评审规则/通知管理 - Bug修复:租户编辑丢失隐藏菜单、pageSize限制、主色统一 二、UGC绘本创作社区P0 - 数据库:10张新表(user_works/user_work_pages/work_tags等) - 子女账号独立化:Child升级为独立User,家长切换+独立登录 - 用户作品库:CRUD+发布审核,8个API - AI创作流程:提交→生成→保存到作品库,4个API - 作品广场:首页改造为推荐流,标签+搜索+排序 - 内容审核(超管端):作品审核+作品管理+标签管理 - 活动联动:WorkSelector作品选择器 - 布局改造:底部5Tab(发现/创作/活动/作品库/我的) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
65 lines
1.8 KiB
JavaScript
65 lines
1.8 KiB
JavaScript
const { PrismaClient } = require('@prisma/client');
|
|
const prisma = new PrismaClient();
|
|
|
|
async function main() {
|
|
// 查找3D打印作品大赛
|
|
const contest = await prisma.contest.findFirst({
|
|
where: { contestName: { contains: '3D打印' } }
|
|
});
|
|
|
|
if (!contest) {
|
|
console.log('未找到3D打印作品大赛');
|
|
return;
|
|
}
|
|
|
|
console.log(`赛事: ${contest.contestName} (ID: ${contest.id})\n`);
|
|
|
|
// 查找该赛事的所有报名记录
|
|
const registrations = await prisma.contestRegistration.findMany({
|
|
where: { contestId: contest.id },
|
|
include: {
|
|
user: true,
|
|
contest: true
|
|
}
|
|
});
|
|
|
|
console.log(`报名记录数量: ${registrations.length}\n`);
|
|
|
|
if (registrations.length > 0) {
|
|
console.log('报名记录详情:');
|
|
registrations.forEach(r => {
|
|
console.log(` ID: ${r.id}, 用户: ${r.user?.username || 'N/A'}, 租户ID: ${r.tenantId}, 状态: ${r.status}`);
|
|
});
|
|
}
|
|
|
|
// 查找 xuesheng1 用户
|
|
const user = await prisma.user.findFirst({
|
|
where: { username: 'xuesheng1' }
|
|
});
|
|
|
|
if (user) {
|
|
console.log(`\nxuesheng1 用户信息:`);
|
|
console.log(` ID: ${user.id}, 租户ID: ${user.tenantId}`);
|
|
|
|
// 查找该用户的所有报名记录
|
|
const userRegistrations = await prisma.contestRegistration.findMany({
|
|
where: { userId: user.id },
|
|
include: { contest: true }
|
|
});
|
|
|
|
console.log(`\nxuesheng1 的所有报名记录 (${userRegistrations.length}):`);
|
|
userRegistrations.forEach(r => {
|
|
console.log(` 赛事: ${r.contest?.contestName}, 状态: ${r.status}, 租户ID: ${r.tenantId}`);
|
|
});
|
|
} else {
|
|
console.log('\n未找到 xuesheng1 用户');
|
|
}
|
|
}
|
|
|
|
main()
|
|
.then(() => prisma.$disconnect())
|
|
.catch(e => {
|
|
console.error(e);
|
|
prisma.$disconnect();
|
|
});
|