添加给浪潮提供的根据用户userid查询简历
This commit is contained in:
@@ -230,7 +230,7 @@ public class ChatClient {
|
||||
array = new JSONArray();
|
||||
}
|
||||
JSONObject contentObject = new JSONObject();
|
||||
contentObject.put("content","你是一个岗位招聘专家,请根据用户的问题生成用户下一步想要提出的问题。需要以用户的口吻进行生成。结合上下文中用户提出的问题以及助手回复的答案,需要猜测用户更进一步的需求,例如期望的薪资,期望的工作地点,掌握的技能。生成的问题举例:有没有薪资在9000以上的工作?我的学历是本科。我希望找国企。注意不仅限于这些,还要根据上下文。其次所有的问题应该限定在青岛。并且只生成3到4个。");
|
||||
contentObject.put("content","你是一个岗位招聘专家,请根据用户的问题生成用户下一步想要提出的问题。需要以用户的口吻进行生成。结合上下文中用户提出的问题以及助手回复的答案,需要猜测用户更进一步的需求,例如期望的薪资,期望的工作地点,掌握的技能。生成的问题举例:有没有薪资在9000以上的工作?我的学历是本科。我希望找国企。注意不仅限于这些,还要根据上下文。其次所有的问题应该限定在喀什。并且只生成3到4个。");
|
||||
contentObject.put("role","system");
|
||||
array.add(contentObject);
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.ruoyi.cms.service.IAppReviewJobService;
|
||||
import com.ruoyi.cms.util.DateValidateUtil;
|
||||
import com.ruoyi.cms.util.RoleUtils;
|
||||
import com.ruoyi.cms.util.StringUtil;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.annotation.BussinessLog;
|
||||
import com.ruoyi.common.core.domain.entity.AppUserShow;
|
||||
import com.ruoyi.common.core.domain.model.RegisterBody;
|
||||
@@ -273,4 +274,27 @@ public class CmsAppUserController extends BaseController
|
||||
}
|
||||
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("查询简历失败,请稍后重试");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,10 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
}
|
||||
//查询企业信息
|
||||
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);
|
||||
if(company!=null){
|
||||
CompanyContact contact=new CompanyContact();
|
||||
@@ -75,15 +78,21 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
company.setCompanyContactList(companyContactList);
|
||||
}
|
||||
}else if("1".equals(appUser.getIsCompanyUser())){
|
||||
//工作经历
|
||||
UserWorkExperiences workExperiences=new UserWorkExperiences();
|
||||
workExperiences.setUserId(appUser.getUserId());
|
||||
List<UserWorkExperiences> experiences =userWorkExperiencesMapper.getWorkExperiencesList(workExperiences);
|
||||
appUser.setExperiencesList(experiences);
|
||||
|
||||
//技能
|
||||
AppSkill skill=new AppSkill();
|
||||
skill.setUserId(appUser.getUserId());
|
||||
List<AppSkill> skillList=appSkillMapper.getList(skill);
|
||||
appUser.setAppSkillsList(skillList);
|
||||
//附件信息
|
||||
File file=new File();
|
||||
file.setBussinessid(userId);
|
||||
List<File> files=fileMapper.selectFileList(file);
|
||||
appUser.setFileList(files);
|
||||
}
|
||||
return appUser;
|
||||
}
|
||||
@@ -110,6 +119,15 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -258,7 +276,13 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
}
|
||||
//一体机密码
|
||||
if(StringUtils.isNotEmpty(appUser.getYtjPassword())){
|
||||
try {
|
||||
appUser.setYtjPassword(SiteSecurityUtils.encryptPassword(appUser.getYtjPassword()));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("密码加密出错", e);
|
||||
}
|
||||
}else{
|
||||
appUser.setYtjPassword(null);
|
||||
}
|
||||
appUserMapper.updateById(appUser);
|
||||
return appUser;
|
||||
@@ -485,7 +509,11 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper,AppUser> imple
|
||||
|
||||
@Override
|
||||
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
|
||||
|
||||
@@ -213,4 +213,20 @@ public class StringUtil {
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user