revert: remove ChangeJobLibraryView1744467048874

This commit is contained in:
geekgeekrun
2025-04-13 13:24:10 +08:00
parent a8a1856527
commit b7f149032a
5 changed files with 3 additions and 39 deletions
@@ -5,18 +5,12 @@ const { ViewEntity, ViewColumn } = requireTypeorm();
job_info.*, job_info.*,
boss_info.name AS bossName, boss_info.name AS bossName,
boss_info.title AS bossTitle, boss_info.title AS bossTitle,
company_info.name AS companyName, company_info.name AS companyName
(
SELECT job_info_change_log.updateTime
FROM job_info_change_log
WHERE job_info_change_log.encryptJobId = job_info.encryptJobId
ORDER BY job_info_change_log.updateTime ASC
LIMIT 1
) AS latestLogDate
FROM FROM
job_info job_info
LEFT JOIN boss_info ON boss_info.encryptBossId = job_info.encryptBossId LEFT JOIN boss_info ON boss_info.encryptBossId = job_info.encryptBossId
LEFT JOIN company_info ON company_info.encryptCompanyId = job_info.encryptCompanyId`, LEFT JOIN company_info ON company_info.encryptCompanyId = job_info.encryptCompanyId
`,
}) })
export class VJobLibrary { export class VJobLibrary {
@ViewColumn() @ViewColumn()
@@ -60,7 +54,4 @@ export class VJobLibrary {
@ViewColumn() @ViewColumn()
companyName: string; companyName: string;
@ViewColumn()
latestLogDate: string;
} }
-2
View File
@@ -25,7 +25,6 @@ import { saveChatStartupRecord, saveJobInfoFromRecommendPage, saveMarkAsNotSuitR
import { UpdateChatStartupLogTable1729182577167 } from "./migrations/1729182577167-UpdateChatStartupLogTable"; import { UpdateChatStartupLogTable1729182577167 } from "./migrations/1729182577167-UpdateChatStartupLogTable";
import minimist from 'minimist' import minimist from 'minimist'
import { UpdateBossInfoTable1732032381304 } from "./migrations/1732032381304-UpdateBossInfoTable"; import { UpdateBossInfoTable1732032381304 } from "./migrations/1732032381304-UpdateBossInfoTable";
import { ChangeJobLibraryView1744467048874 } from "./migrations/1744467048874-ChangeJobLibraryView";
export function initDb(dbFilePath) { export function initDb(dbFilePath) {
const { DataSource } = requireTypeorm() const { DataSource } = requireTypeorm()
@@ -58,7 +57,6 @@ export function initDb(dbFilePath) {
migrations: [ migrations: [
UpdateChatStartupLogTable1729182577167, UpdateChatStartupLogTable1729182577167,
UpdateBossInfoTable1732032381304, UpdateBossInfoTable1732032381304,
ChangeJobLibraryView1744467048874
], ],
migrationsRun: true migrationsRun: true
}); });
@@ -1,17 +0,0 @@
import { MigrationInterface, QueryRunner } from "typeorm";
const viewNames = [
"v_boss_library",
"v_chat_startup_log",
"v_company_library",
"v_job_library",
"v_mark_as_not_suit_log",
];
export class ChangeJobLibraryView1744467048874 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
for (const viewName of viewNames) {
await queryRunner.query(`DROP VIEW IF EXISTS "${viewName}"`);
}
}
public async down(queryRunner: QueryRunner): Promise<void> {}
}
@@ -3,13 +3,6 @@
<el-form-item label="公司">{{ jobInfo.companyName }}</el-form-item> <el-form-item label="公司">{{ jobInfo.companyName }}</el-form-item>
<el-form-item label="职位名称">{{ jobInfo.jobName }}</el-form-item> <el-form-item label="职位名称">{{ jobInfo.jobName }}</el-form-item>
<el-form-item label="职位分类">{{ jobInfo.positionName }}</el-form-item> <el-form-item label="职位分类">{{ jobInfo.positionName }}</el-form-item>
<el-form-item v-if="scene === 'jobLibrary'" label="最近抓取时间">
{{
jobInfo.latestLogDate
? transformUtcDateToLocalDate(jobInfo.latestLogDate).format('YYYY-MM-DD HH:mm:ss')
: '无记录数据可能来自旧版本'
}}
</el-form-item>
<el-form-item v-if="scene !== 'jobLibrary'" label="开聊时间"> <el-form-item v-if="scene !== 'jobLibrary'" label="开聊时间">
{{ {{
jobInfo.date jobInfo.date
@@ -38,7 +38,6 @@
link link
type="primary" type="primary"
size="small" size="small"
:disabled="!row.latestLogDate"
@click="handleViewJobHistoryButtonClick(row)" @click="handleViewJobHistoryButtonClick(row)"
>变更记录</ElButton >变更记录</ElButton
> >