添加工作经历-添加查询条件

This commit is contained in:
sh
2025-10-16 19:39:06 +08:00
parent ac2d427a71
commit da48a9c33a
2 changed files with 7 additions and 1 deletions

View File

@@ -36,6 +36,9 @@ public class AppUserWorkExperiencesController extends BaseController {
@ApiOperation("工作经历列表信息")
@GetMapping("/list")
public TableDataInfo list(UserWorkExperiences userWorkExperiences){
if(userWorkExperiences.getUserId()==null){
userWorkExperiences.setUserId(SiteSecurityUtils.getUserId());
}
startPage();
List<UserWorkExperiences> list=userWorkExperiencesService.getWorkExperiencesList(userWorkExperiences);
return getDataTable(list);
@@ -57,7 +60,9 @@ public class AppUserWorkExperiencesController extends BaseController {
@ApiOperation("新增工作经历")
@PostMapping("/add")
public AjaxResult add(@RequestBody UserWorkExperiences userWorkExperiences){
userWorkExperiences.setUserId(SiteSecurityUtils.getUserId());
if(userWorkExperiences.getUserId()==null){
userWorkExperiences.setUserId(SiteSecurityUtils.getUserId());
}
return toAjax(userWorkExperiencesService.insertWorkExperiences(userWorkExperiences));
}

View File

@@ -31,6 +31,7 @@
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="position != null and position != ''"> and position = #{position}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
</where>
</select>