feat: 技术支持工单/企微权限/开发版本管理/消息推送等迭代

This commit is contained in:
2026-08-04 21:32:13 +08:00
parent c8ea5a3119
commit 9d96c73246
1341 changed files with 0 additions and 195605 deletions
@@ -1,27 +0,0 @@
import { ForbiddenException, Injectable } from '@nestjs/common';
import { PrismaService } from '../prisma/prisma.module';
import type { AuthUser } from '../guards/jwt-auth.guard';
@Injectable()
export class StoreMembershipService {
constructor(private readonly prisma: PrismaService) {}
async assertStoreMembership(accountId: bigint, storeId: bigint) {
const binding = await this.prisma.storeAccountStore.findUnique({
where: {
storeAccountId_storeId: { storeAccountId: accountId, storeId },
},
});
if (!binding) {
throw new ForbiddenException('无权访问该门店');
}
return binding;
}
requireShopStoreId(user: AuthUser): bigint {
if (!user.storeId) {
throw new ForbiddenException('请先选择门店');
}
return user.storeId;
}
}