1.修改保存生日报错问题
2.添加pc端获取消息列表
This commit is contained in:
@@ -76,4 +76,8 @@ public interface IAppNoticeService
|
||||
|
||||
void recommendJobCron();
|
||||
void fairCompanyCron();
|
||||
|
||||
List<Notice> selectListAppNotRead(Notice notice);
|
||||
|
||||
void readSysNotices(String ids,Long userId);
|
||||
}
|
||||
|
||||
@@ -198,5 +198,28 @@ public class AppNoticeServiceImpl implements IAppNoticeService
|
||||
List<Notice> sysNoticeList = noticeInfoMapper.selectList(Wrappers.<Notice>lambdaQuery().eq(Notice::getUserId, userId).isNotNull(Notice::getNoticeType).notIn(Notice::getNoticeType,"").orderByDesc(Notice::getCreateTime));
|
||||
return sysNoticeList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Notice> selectListAppNotRead(Notice notice) {
|
||||
List<Notice> sysNoticeList = noticeInfoMapper.selectList(Wrappers.<Notice>lambdaQuery().eq(Notice::getUserId, notice.getUserId()).eq(Notice::getRemark,"notice_bar").orderByDesc(Notice::getCreateTime));
|
||||
return sysNoticeList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSysNotices(String ids,Long userId) {
|
||||
List<Long> longs = StringUtil.convertStringToLongList(ids);
|
||||
List<Notice> notices = noticeInfoMapper.selectBatchIds(longs);
|
||||
notices.forEach(notice -> {
|
||||
notice.setIsRead(1);
|
||||
noticeInfoMapper.updateById(notice);
|
||||
});
|
||||
List<Notice> notices1 = noticeInfoMapper.selectList(Wrappers.<Notice>lambdaQuery().eq(Notice::getUserId, userId).eq(Notice::getRemark, "notice_bar").eq(Notice::getTitle, "系统通知").orderByDesc(Notice::getCreateTime).last("limit 1"));
|
||||
Notice notice = notices1.get(0);
|
||||
notice.setNotReadCount(notice.getNotReadCount() - longs.size());
|
||||
if(notice.getNotReadCount()==0){
|
||||
notice.setIsRead(1);
|
||||
}
|
||||
noticeInfoMapper.updateById(notice);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ESJobSearchImpl implements IESJobSearchService
|
||||
/**
|
||||
* 项目启动时,初始化索引及数据
|
||||
*/
|
||||
@PostConstruct
|
||||
// @PostConstruct
|
||||
public void init()
|
||||
{
|
||||
resetTextCache();
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.ruoyi.cms.mapper.JobApplyMapper;
|
||||
import com.ruoyi.cms.mapper.JobMapper;
|
||||
import com.ruoyi.cms.service.IBussinessDictTypeService;
|
||||
import com.ruoyi.common.core.domain.entity.AppUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SiteSecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -266,7 +267,7 @@ public class JobCollectionServiceImpl extends ServiceImpl<JobCollectionMapper,Jo
|
||||
}
|
||||
|
||||
// 5. 年龄估算(从生日计算)
|
||||
int userAge = getUserAge(user.getBirthDate());
|
||||
int userAge = getUserAge(DateUtils.toDate(user.getBirthDate()));
|
||||
// 假设最佳年龄区间为 22-35,越接近越匹配
|
||||
if (userAge >= 22 && userAge <= 35) {
|
||||
matchScore += 1;
|
||||
@@ -292,7 +293,7 @@ public class JobCollectionServiceImpl extends ServiceImpl<JobCollectionMapper,Jo
|
||||
// ================== 计算雷达图数据(取平均值)==================
|
||||
RadarChart radarChart = new RadarChart();
|
||||
|
||||
double avgAgeScore = userScores.stream().mapToInt(u -> getAgeScore(u.getUser().getBirthDate())).average().orElse(0);
|
||||
double avgAgeScore = userScores.stream().mapToInt(u -> getAgeScore(DateUtils.toDate(u.getUser().getBirthDate()))).average().orElse(0);
|
||||
double avgExperienceScore = userScores.stream().mapToInt(u -> getExperienceScore(u.getUser().getExperience(), job.getExperience(), experienceRank)).average().orElse(0);
|
||||
double avgEducationScore = userScores.stream().mapToInt(u -> getEducationScore(u.getUser().getEducation(), job.getEducation(), educationRank)).average().orElse(0);
|
||||
double avgSkillScore = userScores.stream().mapToInt(u -> getSkillScore(u.getUser(), job)).average().orElse(0);
|
||||
|
||||
Reference in New Issue
Block a user