chore(config): 更新应用配置文件
- 移除 application.properties 中的 spring.profiles.active 配置 - 在 application.yml 中为 deepseek ai 服务添加 api-key 配置 - 保留 base-url 和 chat options 配置不变
This commit is contained in:
@@ -83,9 +83,9 @@ file:
|
||||
# 腾讯云COS配置
|
||||
cos:
|
||||
# 密钥ID
|
||||
secret-id:
|
||||
secret-id: AKID46zkMzjOJMH3iHuW0MEvV1QDtQsNm6KU
|
||||
# 密钥Key(生产环境请使用环境变量或配置中心)
|
||||
secret-key:
|
||||
secret-key: 63sZ8Yp3JTTI8qgikgT9mLxVBlDVcYN6
|
||||
# 地域
|
||||
region: ap-shanghai
|
||||
# 存储桶名称
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
"type-check": "vue-tsc --build",
|
||||
|
||||
33
BOSSFrontEnd/src/api/api/chatController.ts
Normal file
33
BOSSFrontEnd/src/api/api/chatController.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
// @ts-ignore
|
||||
/* eslint-disable */
|
||||
import request from '@/libs/request'
|
||||
|
||||
/** 此处后端没有提供注释 GET /chat/model */
|
||||
export async function model(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.modelParams,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<string>('/chat/model', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
})
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /chat/test */
|
||||
export async function completion(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.completionParams,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<string>('/chat/test', {
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
})
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import * as interviewController from './interviewController'
|
||||
import * as bossApplicationDecisionController from './bossApplicationDecisionController'
|
||||
import * as companyController from './companyController'
|
||||
import * as applicationController from './applicationController'
|
||||
import * as chatController from './chatController'
|
||||
import * as bossController from './bossController'
|
||||
export default {
|
||||
userController,
|
||||
@@ -18,5 +19,6 @@ export default {
|
||||
bossApplicationDecisionController,
|
||||
companyController,
|
||||
applicationController,
|
||||
chatController,
|
||||
bossController,
|
||||
}
|
||||
|
||||
@@ -14,6 +14,21 @@ export async function addResume(body: API.ResumeAddRequest, options?: { [key: st
|
||||
})
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /resume/ai/optimize */
|
||||
export async function aiOptimizeResume(
|
||||
body: API.ResumeAiOptimizeRequest,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.BaseResponseResumeAiOptimizeVO>('/resume/ai/optimize', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
})
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /resume/delete */
|
||||
export async function deleteResume(body: API.DeleteRequest, options?: { [key: string]: any }) {
|
||||
return request<API.BaseResponseBoolean>('/resume/delete', {
|
||||
@@ -26,6 +41,21 @@ export async function deleteResume(body: API.DeleteRequest, options?: { [key: st
|
||||
})
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 POST /resume/delete-file */
|
||||
export async function deleteFile(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.deleteFileParams,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.BaseResponseBoolean>('/resume/delete-file', {
|
||||
method: 'POST',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
})
|
||||
}
|
||||
|
||||
/** 此处后端没有提供注释 GET /resume/get/vo */
|
||||
export async function getResumeVoById(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
@@ -71,56 +101,21 @@ export async function updateResume(
|
||||
})
|
||||
}
|
||||
|
||||
/** 上传简历PDF文件到腾讯云COS POST /resume/upload */
|
||||
export async function uploadFile(body: {}, options?: { [key: string]: any }) {
|
||||
/** 此处后端没有提供注释 POST /resume/upload */
|
||||
export async function uploadFile(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.uploadFileParams,
|
||||
body: {},
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.BaseResponseString>('/resume/upload', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
})
|
||||
}
|
||||
|
||||
/** 删除COS中的简历附件文件 POST /resume/delete-file */
|
||||
export async function deleteResumeFile(
|
||||
params: { fileUrl: string; resumeId?: number },
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.BaseResponseBoolean>('/resume/delete-file', {
|
||||
method: 'POST',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
})
|
||||
}
|
||||
|
||||
/** AI优化简历请求 */
|
||||
export interface ResumeAiOptimizeRequest {
|
||||
resumeTitle?: string
|
||||
summary?: string
|
||||
content?: string
|
||||
}
|
||||
|
||||
/** AI优化简历响应 */
|
||||
export interface ResumeAiOptimizeVO {
|
||||
resumeTitle?: string
|
||||
summary?: string
|
||||
content?: string
|
||||
}
|
||||
|
||||
/** AI优化简历 POST /resume/ai/optimize */
|
||||
export async function aiOptimizeResume(
|
||||
body: ResumeAiOptimizeRequest,
|
||||
options?: { [key: string]: any }
|
||||
) {
|
||||
return request<API.BaseResponse<ResumeAiOptimizeVO>>('/resume/ai/optimize', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
})
|
||||
|
||||
39
BOSSFrontEnd/src/api/api/typings.d.ts
vendored
39
BOSSFrontEnd/src/api/api/typings.d.ts
vendored
@@ -174,6 +174,12 @@ declare namespace API {
|
||||
message?: string
|
||||
}
|
||||
|
||||
type BaseResponseResumeAiOptimizeVO = {
|
||||
code?: number
|
||||
data?: ResumeAiOptimizeVO
|
||||
message?: string
|
||||
}
|
||||
|
||||
type BaseResponseResumeVO = {
|
||||
code?: number
|
||||
data?: ResumeVO
|
||||
@@ -307,6 +313,15 @@ declare namespace API {
|
||||
updatedAt?: string
|
||||
}
|
||||
|
||||
type completionParams = {
|
||||
message: string
|
||||
}
|
||||
|
||||
type deleteFileParams = {
|
||||
fileUrl: string
|
||||
resumeId?: number
|
||||
}
|
||||
|
||||
type DeleteRequest = {
|
||||
id?: number
|
||||
}
|
||||
@@ -502,6 +517,8 @@ declare namespace API {
|
||||
userName?: string
|
||||
userAvatar?: string
|
||||
userProfile?: string
|
||||
phone?: string
|
||||
email?: string
|
||||
userRole?: string
|
||||
companyId?: number
|
||||
editTime?: string
|
||||
@@ -509,6 +526,10 @@ declare namespace API {
|
||||
updatedAt?: string
|
||||
}
|
||||
|
||||
type modelParams = {
|
||||
message: string
|
||||
}
|
||||
|
||||
type OrderItem = {
|
||||
column?: string
|
||||
asc?: boolean
|
||||
@@ -620,6 +641,18 @@ declare namespace API {
|
||||
attachmentUrl?: string
|
||||
}
|
||||
|
||||
type ResumeAiOptimizeRequest = {
|
||||
resumeTitle?: string
|
||||
summary?: string
|
||||
content?: string
|
||||
}
|
||||
|
||||
type ResumeAiOptimizeVO = {
|
||||
resumeTitle?: string
|
||||
summary?: string
|
||||
content?: string
|
||||
}
|
||||
|
||||
type ResumeQueryRequest = {
|
||||
current?: number
|
||||
pageSize?: number
|
||||
@@ -652,6 +685,10 @@ declare namespace API {
|
||||
createdAt?: string
|
||||
}
|
||||
|
||||
type uploadFileParams = {
|
||||
resumeId?: number
|
||||
}
|
||||
|
||||
type User = {
|
||||
id?: number
|
||||
userAccount?: string
|
||||
@@ -705,6 +742,8 @@ declare namespace API {
|
||||
id?: number
|
||||
userName?: string
|
||||
userAvatar?: string
|
||||
phone?: string
|
||||
email?: string
|
||||
userProfile?: string
|
||||
userRole?: string
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<script setup lang="ts">
|
||||
import { h, ref, computed } from 'vue';
|
||||
import { HomeOutlined, UserOutlined, TeamOutlined, FileTextOutlined, SolutionOutlined, SendOutlined, SearchOutlined, BankOutlined, PlusCircleOutlined, AuditOutlined, SettingOutlined, LeftOutlined } from '@ant-design/icons-vue';
|
||||
import { MenuProps } from 'ant-design-vue';
|
||||
import type { MenuProps } from 'ant-design-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { storeToRefs } from 'pinia';
|
||||
|
||||
@@ -31,7 +31,7 @@ request.interceptors.request.use((url, options) => {
|
||||
// 如果data是FormData,删除Content-Type,让浏览器自动设置multipart/form-data和boundary
|
||||
if (options.data instanceof FormData) {
|
||||
if (options.headers) {
|
||||
delete options.headers['Content-Type'];
|
||||
delete (options.headers as Record<string, any>)['Content-Type'];
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
||||
@@ -76,6 +76,7 @@ import { userLogin } from '@/api/api/userController';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import request from '@/libs/request'; // 导入request函数
|
||||
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
@@ -93,9 +94,12 @@ const handleSubmit = async (values: any) => {
|
||||
if (type.value === 'user') {
|
||||
res = await userLogin(values);
|
||||
} else if (type.value === 'admin') {
|
||||
res = await adminLogin({
|
||||
res = await request('/admin/login', {
|
||||
method: 'POST',
|
||||
data: {
|
||||
userAccount: values.usrAccount,
|
||||
userPassword: values.userPassword
|
||||
}
|
||||
});
|
||||
} else if (type.value === 'boss') {
|
||||
// 手动调用 Boss 登录接口,假设路径为 /boss/login
|
||||
|
||||
@@ -80,8 +80,8 @@ const onFinish = async () => {
|
||||
userName: formState.userAccount, // 昵称/姓名
|
||||
userProfile: formState.profile,
|
||||
userRole: userStore.loginUser.userRole,
|
||||
// phone: formState.phone, // 后端暂不支持
|
||||
// email: formState.email, // 后端暂不支持
|
||||
phone: formState.phone,
|
||||
email: formState.email,
|
||||
});
|
||||
|
||||
if (res && res.code === 0) {
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
import NavBar from '@/components/NavBar.vue';
|
||||
import { reactive, ref, onMounted, computed } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { addResume, updateResume, getResumeVoById, deleteResumeFile, aiOptimizeResume } from '@/api/api/resumeController';
|
||||
import { addResume, updateResume, getResumeVoById, aiOptimizeResume,deleteFile } from '@/api/api/resumeController';
|
||||
import { message, Upload } from 'ant-design-vue';
|
||||
import { UploadOutlined, FilePdfOutlined, RobotOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
@@ -250,7 +250,7 @@ const clearAttachment = async () => {
|
||||
if (isEdit.value && route.params.id) {
|
||||
params.resumeId = Number(route.params.id);
|
||||
}
|
||||
const res = await deleteResumeFile(params);
|
||||
const res = await deleteFile(params);
|
||||
if (res.code === 0) {
|
||||
message.success('文件删除成功');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user