show mark as not suit for city reason in not suit record table

This commit is contained in:
geekgeekrun
2025-05-25 22:45:13 +08:00
parent 03df5f8d5a
commit aee6340c6a
6 changed files with 70 additions and 15 deletions

View File

@@ -108,12 +108,14 @@ export default class SqlitePlugin {
async ({
jobNotMatchStrategy,
jobNotActiveStrategy,
expectCityNotMatchStrategy,
blockJobNotSuit,
blockBossNotActive,
}) => {
if (
jobNotMatchStrategy === MarkAsNotSuitOp.MARK_AS_NOT_SUIT_ON_LOCAL ||
jobNotActiveStrategy === MarkAsNotSuitOp.MARK_AS_NOT_SUIT_ON_LOCAL
jobNotActiveStrategy === MarkAsNotSuitOp.MARK_AS_NOT_SUIT_ON_LOCAL ||
expectCityNotMatchStrategy === MarkAsNotSuitOp.MARK_AS_NOT_SUIT_ON_LOCAL
) {
const ds = await this.initPromise;
const last7DayMarkRecords = (await getNotSuitMarkRecordsInLastSomeDays(ds, 7) ?? []);
@@ -142,6 +144,16 @@ export default class SqlitePlugin {
id => blockJobNotSuit.add(id)
)
}
if (expectCityNotMatchStrategy === MarkAsNotSuitOp.MARK_AS_NOT_SUIT_ON_LOCAL) {
last7DayMarkRecords
.filter(it => it.markReason === MarkAsNotSuitReason.JOB_CITY_NOT_SUIT)
.map(
it => it.encryptJobId
)
.forEach(
id => blockJobNotSuit.add(id)
)
}
}
}
);