From f4427d841aec49e2edb2071ab672538c2f4ba03a Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Fri, 5 Apr 2024 17:57:26 +0800 Subject: [PATCH] fix typo of salary high and scale high in db --- packages/sqlite-plugin/src/entity/CompanyInfo.ts | 2 +- packages/sqlite-plugin/src/entity/JobInfo.ts | 2 +- packages/sqlite-plugin/src/entity/VChatStartupLog.ts | 2 +- packages/sqlite-plugin/src/index.ts | 4 ++-- packages/sqlite-plugin/src/utils/parser.ts | 6 +++--- .../ui/src/renderer/src/features/JobInfoSnapshot/index.vue | 2 +- .../src/renderer/src/page/Configuration/StartChatRecord.vue | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/sqlite-plugin/src/entity/CompanyInfo.ts b/packages/sqlite-plugin/src/entity/CompanyInfo.ts index b8d61fd..58ca313 100644 --- a/packages/sqlite-plugin/src/entity/CompanyInfo.ts +++ b/packages/sqlite-plugin/src/entity/CompanyInfo.ts @@ -20,7 +20,7 @@ export class CompanyInfo { @Column({ nullable: true }) - scaleHeight?: number; + scaleHigh?: number; @Column({ nullable: true diff --git a/packages/sqlite-plugin/src/entity/JobInfo.ts b/packages/sqlite-plugin/src/entity/JobInfo.ts index 48562de..9069387 100644 --- a/packages/sqlite-plugin/src/entity/JobInfo.ts +++ b/packages/sqlite-plugin/src/entity/JobInfo.ts @@ -20,7 +20,7 @@ export class JobInfo { @Column({ nullable: true }) - salaryHeight?: number; + salaryHigh?: number; @Column({ nullable: true diff --git a/packages/sqlite-plugin/src/entity/VChatStartupLog.ts b/packages/sqlite-plugin/src/entity/VChatStartupLog.ts index c2ef64a..2440554 100644 --- a/packages/sqlite-plugin/src/entity/VChatStartupLog.ts +++ b/packages/sqlite-plugin/src/entity/VChatStartupLog.ts @@ -30,7 +30,7 @@ export class VChatStartupLog { salaryLow: number | null; @ViewColumn() - salaryHeight: number | null; + salaryHigh: number | null; @ViewColumn() salaryMonth: number | null; diff --git a/packages/sqlite-plugin/src/index.ts b/packages/sqlite-plugin/src/index.ts index 4ce4b26..5181b61 100644 --- a/packages/sqlite-plugin/src/index.ts +++ b/packages/sqlite-plugin/src/index.ts @@ -100,7 +100,7 @@ export default class SqlitePlugin { company.stageName = brandComInfo.stageName; const companyScale = parseCompanyScale(brandComInfo.scaleName) company.scaleLow = companyScale[0] - company.scaleHeight = companyScale[1] + company.scaleHigh = companyScale[1] const companyInfoRepository = ds.getRepository(CompanyInfo); await companyInfoRepository.save(company); @@ -119,7 +119,7 @@ export default class SqlitePlugin { jobName: jobInfo.jobName, positionName: jobInfo.positionName, experienceName: jobInfo.experienceName, - salaryHeight: jobSalary.heigh, + salaryHigh: jobSalary.high, salaryLow: jobSalary.low, salaryMonth: jobSalary.month, }; diff --git a/packages/sqlite-plugin/src/utils/parser.ts b/packages/sqlite-plugin/src/utils/parser.ts index 16544bb..08f5b79 100644 --- a/packages/sqlite-plugin/src/utils/parser.ts +++ b/packages/sqlite-plugin/src/utils/parser.ts @@ -24,9 +24,9 @@ export const parseCompanyScale = (str: string): [number| null, number | null] => return [null, null] } -export const parseSalary = (str: string): { low: null | number, heigh: null | number, month: null | number } => { +export const parseSalary = (str: string): { low: null | number, high: null | number, month: null | number } => { const result = { - heigh: null, + high: null, low: null, month: null } @@ -44,7 +44,7 @@ export const parseSalary = (str: string): { low: null | number, heigh: null | nu result, { low: Number(arr[0]), - heigh: Number(arr[1]), + high: Number(arr[1]), } ) } diff --git a/packages/ui/src/renderer/src/features/JobInfoSnapshot/index.vue b/packages/ui/src/renderer/src/features/JobInfoSnapshot/index.vue index 4c81bf5..8b4d0f5 100644 --- a/packages/ui/src/renderer/src/features/JobInfoSnapshot/index.vue +++ b/packages/ui/src/renderer/src/features/JobInfoSnapshot/index.vue @@ -8,7 +8,7 @@ }} {{ jobInfo.experienceName }} {{ - `${jobInfo.salaryLow}-${jobInfo.salaryHeight}k` + + `${jobInfo.salaryLow}-${jobInfo.salaryHigh}k` + (jobInfo.salaryMonth ? `* ${jobInfo.salaryMonth}薪` : '') }} diff --git a/packages/ui/src/renderer/src/page/Configuration/StartChatRecord.vue b/packages/ui/src/renderer/src/page/Configuration/StartChatRecord.vue index af93b65..090dbf8 100644 --- a/packages/ui/src/renderer/src/page/Configuration/StartChatRecord.vue +++ b/packages/ui/src/renderer/src/page/Configuration/StartChatRecord.vue @@ -24,7 +24,7 @@ label="薪资" :formatter=" (row, _col, _val) => - `${row.salaryLow}-${row.salaryHeight}k` + + `${row.salaryLow}-${row.salaryHigh}k` + (row.salaryMonth ? `* ${row.salaryMonth}薪` : '') " />