|
|
@@ -77,6 +77,7 @@ export class AdsService {
|
|
|
createAt: now,
|
|
|
updateAt: now,
|
|
|
},
|
|
|
+ include: { channel: true, adsModule: true },
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -111,6 +112,7 @@ export class AdsService {
|
|
|
return await this.mongoPrismaService.ads.update({
|
|
|
where: { id: dto.id },
|
|
|
data,
|
|
|
+ include: { channel: true, adsModule: true },
|
|
|
});
|
|
|
} catch (e) {
|
|
|
if (e instanceof PrismaClientKnownRequestError && e.code === 'P2025') {
|
|
|
@@ -123,6 +125,7 @@ export class AdsService {
|
|
|
async findOne(id: string) {
|
|
|
const row = await this.mongoPrismaService.ads.findUnique({
|
|
|
where: { id },
|
|
|
+ include: { channel: true, adsModule: true },
|
|
|
});
|
|
|
|
|
|
if (!row) {
|
|
|
@@ -162,6 +165,10 @@ export class AdsService {
|
|
|
orderBy: { updateAt: 'desc' },
|
|
|
skip: (page - 1) * size,
|
|
|
take: size,
|
|
|
+ include: {
|
|
|
+ channel: true,
|
|
|
+ adsModule: true,
|
|
|
+ },
|
|
|
}),
|
|
|
]);
|
|
|
|