添加给浪潮提供的根据用户userid查询简历

This commit is contained in:
sh
2026-01-11 18:41:15 +08:00
parent 90681d1198
commit ed11350ed4
4 changed files with 73 additions and 5 deletions

View File

@@ -230,7 +230,7 @@ public class ChatClient {
array = new JSONArray(); array = new JSONArray();
} }
JSONObject contentObject = new JSONObject(); JSONObject contentObject = new JSONObject();
contentObject.put("content","你是一个岗位招聘专家请根据用户的问题生成用户下一步想要提出的问题。需要以用户的口吻进行生成。结合上下文中用户提出的问题以及助手回复的答案需要猜测用户更进一步的需求例如期望的薪资期望的工作地点掌握的技能。生成的问题举例有没有薪资在9000以上的工作我的学历是本科。我希望找国企。注意不仅限于这些还要根据上下文。其次所有的问题应该限定在青岛。并且只生成3到4个。"); contentObject.put("content","你是一个岗位招聘专家请根据用户的问题生成用户下一步想要提出的问题。需要以用户的口吻进行生成。结合上下文中用户提出的问题以及助手回复的答案需要猜测用户更进一步的需求例如期望的薪资期望的工作地点掌握的技能。生成的问题举例有没有薪资在9000以上的工作我的学历是本科。我希望找国企。注意不仅限于这些还要根据上下文。其次所有的问题应该限定在喀什。并且只生成3到4个。");
contentObject.put("role","system"); contentObject.put("role","system");
array.add(contentObject); array.add(contentObject);
JSONObject jsonBody = new JSONObject(); JSONObject jsonBody = new JSONObject();

View File

@@ -11,6 +11,7 @@ import com.ruoyi.cms.service.IAppReviewJobService;
import com.ruoyi.cms.util.DateValidateUtil; import com.ruoyi.cms.util.DateValidateUtil;
import com.ruoyi.cms.util.RoleUtils; import com.ruoyi.cms.util.RoleUtils;
import com.ruoyi.cms.util.StringUtil; import com.ruoyi.cms.util.StringUtil;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.BussinessLog; import com.ruoyi.common.annotation.BussinessLog;
import com.ruoyi.common.core.domain.entity.AppUserShow; import com.ruoyi.common.core.domain.entity.AppUserShow;
import com.ruoyi.common.core.domain.model.RegisterBody; import com.ruoyi.common.core.domain.model.RegisterBody;
@@ -273,4 +274,27 @@ public class CmsAppUserController extends BaseController
} }
return toAjax(appReviewJobService.insertAppReviewJob(appReviewJob)); return toAjax(appReviewJobService.insertAppReviewJob(appReviewJob));
} }
/**
* 浪潮需要根据用户id查询简历
* @return
*/
@ApiOperation("查看简历")
@GetMapping("/userInfoResume/{userId}")
@Anonymous
public AjaxResult getUserInfoResume(@PathVariable("userId") Long userId)
{
if(userId==null){
return error("用户id为空!");
}
try {
AppUser result=appUserService.selectAppUserByUserId(userId);
if (result == null) {
return error("暂无该用户的简历信息");
}
return success(result);
} catch (Exception e) {
return error("查询简历失败,请稍后重试");
}
}
} }

View File

@@ -66,7 +66,10 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
} }
//查询企业信息 //查询企业信息
if("0".equals(appUser.getIsCompanyUser())){ if("0".equals(appUser.getIsCompanyUser())){
Company company=companyMapper.selectOne(Wrappers.<Company>lambdaQuery().eq(Company::getCode, appUser.getIdCard()).orderByDesc(Company::getUpdateTime).last("LIMIT 1")); Company company=companyMapper.selectOne(Wrappers.<Company>lambdaQuery()
//.eq(Company::getCode, appUser.getIdCard())
.apply("UPPER(id_card) = {0}", StringUtil.toUpperCaseIgnoreBlank(appUser.getIdCard()))
.orderByDesc(Company::getUpdateTime).last("LIMIT 1"));
appUser.setCompany(company); appUser.setCompany(company);
if(company!=null){ if(company!=null){
CompanyContact contact=new CompanyContact(); CompanyContact contact=new CompanyContact();
@@ -75,15 +78,21 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
company.setCompanyContactList(companyContactList); company.setCompanyContactList(companyContactList);
} }
}else if("1".equals(appUser.getIsCompanyUser())){ }else if("1".equals(appUser.getIsCompanyUser())){
//工作经历
UserWorkExperiences workExperiences=new UserWorkExperiences(); UserWorkExperiences workExperiences=new UserWorkExperiences();
workExperiences.setUserId(appUser.getUserId()); workExperiences.setUserId(appUser.getUserId());
List<UserWorkExperiences> experiences =userWorkExperiencesMapper.getWorkExperiencesList(workExperiences); List<UserWorkExperiences> experiences =userWorkExperiencesMapper.getWorkExperiencesList(workExperiences);
appUser.setExperiencesList(experiences); appUser.setExperiencesList(experiences);
//技能
AppSkill skill=new AppSkill(); AppSkill skill=new AppSkill();
skill.setUserId(appUser.getUserId()); skill.setUserId(appUser.getUserId());
List<AppSkill> skillList=appSkillMapper.getList(skill); List<AppSkill> skillList=appSkillMapper.getList(skill);
appUser.setAppSkillsList(skillList); appUser.setAppSkillsList(skillList);
//附件信息
File file=new File();
file.setBussinessid(userId);
List<File> files=fileMapper.selectFileList(file);
appUser.setFileList(files);
} }
return appUser; return appUser;
} }
@@ -110,6 +119,15 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int insertAppUser(AppUser appUser) public int insertAppUser(AppUser appUser)
{ {
if(StringUtils.isNotEmpty(appUser.getYtjPassword())){
try {
appUser.setYtjPassword(SiteSecurityUtils.encryptPassword(appUser.getYtjPassword()));
} catch (Exception e) {
throw new RuntimeException("密码加密出错", e);
}
}else{
appUser.setYtjPassword(null);
}
return appUserMapper.insert(appUser); return appUserMapper.insert(appUser);
} }
@@ -258,7 +276,13 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
} }
//一体机密码 //一体机密码
if(StringUtils.isNotEmpty(appUser.getYtjPassword())){ if(StringUtils.isNotEmpty(appUser.getYtjPassword())){
try {
appUser.setYtjPassword(SiteSecurityUtils.encryptPassword(appUser.getYtjPassword())); appUser.setYtjPassword(SiteSecurityUtils.encryptPassword(appUser.getYtjPassword()));
} catch (Exception e) {
throw new RuntimeException("密码加密出错", e);
}
}else{
appUser.setYtjPassword(null);
} }
appUserMapper.updateById(appUser); appUserMapper.updateById(appUser);
return appUser; return appUser;
@@ -485,7 +509,11 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
@Override @Override
public AppUser selectAppuserByIdcard(String idCard) { public AppUser selectAppuserByIdcard(String idCard) {
return appUserMapper.selectOne(Wrappers.<AppUser>lambdaQuery().eq(AppUser::getIdCard, idCard).eq(AppUser::getDelFlag,"0").orderByDesc(AppUser::getUpdateTime).last("LIMIT 1")); return appUserMapper.selectOne(Wrappers.<AppUser>lambdaQuery()
//.eq(AppUser::getIdCard, idCard)
.apply("UPPER(id_card) = {0}", idCard)
.eq(AppUser::getDelFlag,"0")
.orderByDesc(AppUser::getUpdateTime).last("LIMIT 1"));
} }
@Override @Override

View File

@@ -213,4 +213,20 @@ public class StringUtil {
return "***"; return "***";
} }
} }
/**
* 转大写
* @param str
* @return
*/
public static String toUpperCaseIgnoreBlank(String str) {
if (str == null) {
return null;
}
String trimmedStr = str.trim();
if (trimmedStr.isEmpty()) {
return str;
}
return str.toUpperCase();
}
} }