添加用户个人技能标签提取

This commit is contained in:
zk
2026-03-20 11:34:12 +08:00
parent dc2e241151
commit 971694d648
7 changed files with 466 additions and 6 deletions
+27 -1
View File
@@ -125,4 +125,30 @@ inclusion: manual
- 通过 MyBatis-Plus 的 `@TableField(typeHandler = JacksonTypeHandler.class)` 注解实现自动序列化/反序列化
- 含有 TypeHandler 字段的 PO`@TableName` 必须加 `autoResultMap = true`,如 `@TableName(value = "bg_xxx", autoResultMap = true)`
- JSON 数组存简单值用 `List<String>` 或 `List<Long>`,存复杂结构则抽象为独立的 VO 类(如 `DescriptionParagraph`),放在 `manager/pojo/vo/` 下
- Param 和 Dto 中对应字段直接使用相同的 Java 类型,Controller 层通过 `BeanUtils.copyProperties` 直接拷贝,不做手动 JSON 转换
- Param 和 Dto 中对应字段直接使用相同的 Java 类型,Controller 层通过 `BeanUtils.copyProperties` 直接拷贝,不做手动 JSON 转换
## 代码格式规范
### 紧凑风格
- 避免过度换行,保持代码紧凑易读
- Lambda 表达式和 Stream 操作尽量写在一行,除非超过 120 字符
- 方法参数列表较多时,可适当换行但保持紧凑,每行放多个参数
- 字符串拼接优先写在一行,除非过长影响可读性
### 示例
**推荐(紧凑风格):**
```java
// 查询语句一行
List<JobCategory> categories = jobCategoryMapper.selectList(new LambdaQueryWrapper<JobCategory>().eq(JobCategory::getLevel, 2));
// Stream 操作一行
List<Long> ids = categories.stream().map(JobCategory::getId).collect(Collectors.toList());
// 方法参数紧凑排列
private List<Long> identifyCategories(UserProfile profile, List<UserProfileEducation> educationList,
List<UserProfileWork> workList, List<UserProfileInternship> internshipList,
List<UserProfileProject> projectList, List<UserProfileCompetition> competitionList) {
// 字符串拼接一行
String userMessage = "【用户个人资料】\n" + profileJson + "\n\n【二级岗位分类列表】\n" + categoryText;