mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-05-25 10:10:13 +08:00
show mark as not suit for city reason in not suit record table
This commit is contained in:
@@ -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)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user