|
|
@@ -17,6 +17,7 @@ import com.sqx.modules.app.service.UserMoneyService;
|
|
|
import com.sqx.modules.app.service.UserService;
|
|
|
import com.sqx.modules.common.entity.CommonInfo;
|
|
|
import com.sqx.modules.common.service.CommonInfoService;
|
|
|
+import com.sqx.modules.firstLogin.service.HrService;
|
|
|
import com.sqx.modules.myCollection.entity.MyCollection;
|
|
|
import com.sqx.modules.myCollection.service.MyCollectionService;
|
|
|
import com.sqx.modules.resumes.dao.PostPushDao;
|
|
|
@@ -68,6 +69,8 @@ public class PostPushServiceImpl extends ServiceImpl<PostPushDao, PostPush> impl
|
|
|
@Autowired
|
|
|
private RuleClassifyDao ruleClassifyDao;
|
|
|
private ReentrantReadWriteLock reentrantReadWriteLock = new ReentrantReadWriteLock();
|
|
|
+ @Autowired
|
|
|
+ private HrService hrService;
|
|
|
|
|
|
@Override
|
|
|
public Result savePostPush(PostPush postPush, Long userId) {
|
|
|
@@ -253,7 +256,7 @@ public class PostPushServiceImpl extends ServiceImpl<PostPushDao, PostPush> impl
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Result getPostPushList(Integer page, Integer limit, Double lng, Double lat, Long userId, PostPush postPush, Integer screen) {
|
|
|
+ public Result getPostPushList(Integer page, Integer limit, Double lng, Double lat, Long userId, PostPush postPush, Integer screen,Integer isDue) {
|
|
|
Page<PostPush> pages;
|
|
|
if (page != null && limit != null) {
|
|
|
pages = new Page<>(page, limit);
|
|
|
@@ -267,15 +270,13 @@ public class PostPushServiceImpl extends ServiceImpl<PostPushDao, PostPush> impl
|
|
|
String[] companyPeople = StringUtils.isNotBlank(postPush.getCompanyPeople()) ? postPush.getCompanyPeople().split(",") : null;
|
|
|
String[] salaryRange = StringUtils.isNotBlank(postPush.getSalaryRange()) ? postPush.getSalaryRange().split(",") : null;
|
|
|
|
|
|
-
|
|
|
- IPage<PostPush> selectPage = baseMapper.getPostPushList(pages, lng, lat, postPush, industry, education, experience, companyPeople, salaryRange, userId, screen);
|
|
|
+ IPage<PostPush> selectPage = baseMapper.getPostPushList(pages, lng, lat, postPush, industry, education, experience, companyPeople, salaryRange,screen,isDue);
|
|
|
List<PostPush> records = selectPage.getRecords();
|
|
|
for (PostPush record : records) {
|
|
|
Company company = companyService.selectCompanyByCompanyId(record.getCompanyId());
|
|
|
- if (company != null) {
|
|
|
- record.setCompany(companyService.selectCompanyByUserId(company.getUserId()));
|
|
|
- record.setUser(userService.selectUserById(company.getUserId()));
|
|
|
- }
|
|
|
+ record.setCompany(company);
|
|
|
+ record.setUser(userService.getById(record.getUserId()));
|
|
|
+ record.setHr(hrService.getByUserId(record.getUserId()));
|
|
|
}
|
|
|
return Result.success().put("data", selectPage);
|
|
|
}
|
|
|
@@ -366,7 +367,7 @@ public class PostPushServiceImpl extends ServiceImpl<PostPushDao, PostPush> impl
|
|
|
}
|
|
|
|
|
|
|
|
|
- @Override
|
|
|
+ /*@Override
|
|
|
public PostPush selectPostPushDetails(Long userId, Long postPushId, Double lng, Double lat) {
|
|
|
PostPush postPush = baseMapper.selectPostId(userId, postPushId, lng, lat);
|
|
|
if (postPush != null) {
|
|
|
@@ -390,6 +391,33 @@ public class PostPushServiceImpl extends ServiceImpl<PostPushDao, PostPush> impl
|
|
|
}
|
|
|
|
|
|
|
|
|
+ return postPush;
|
|
|
+ }*/
|
|
|
+ @Override
|
|
|
+ public PostPush selectPostPushDetails(Long userId, Long postPushId, Double lng, Double lat) {
|
|
|
+ PostPush postPush = baseMapper.selectById(postPushId);
|
|
|
+ if (postPush != null) {
|
|
|
+ Company company = companyService.selectCompanyByCompanyId(postPush.getCompanyId());
|
|
|
+ if (company != null) {
|
|
|
+ if (userId != null && !company.getUserId().equals(userId)) {
|
|
|
+ int count = userBrowseService.count(new QueryWrapper<UserBrowse>().eq("user_id", userId).eq("post_push_id", postPushId));
|
|
|
+ if (count == 0) {
|
|
|
+ UserBrowse userBrowse = new UserBrowse();
|
|
|
+ userBrowse.setUserId(userId);
|
|
|
+ userBrowse.setBrowseType(1);
|
|
|
+ userBrowse.setPostPushId(postPushId);
|
|
|
+ userBrowse.setPostPushCompanyId(company.getCompanyId());
|
|
|
+ userBrowse.setUpdateTime(LocalDateTime.now());
|
|
|
+ userBrowseService.save(userBrowse);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ postPush.setCompany(company);
|
|
|
+ postPush.setUser(userService.getById(postPush.getUserId()));
|
|
|
+ postPush.setHr(hrService.getByUserId(postPush.getUserId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
return postPush;
|
|
|
}
|
|
|
|