1.添加pc岗位收藏
2.添加pc岗位申请
This commit is contained in:
@@ -72,4 +72,11 @@ public interface IJobCollectionService
|
||||
List<Job> collectionJob();
|
||||
|
||||
CompetitivenessResponse competitiveness(Long jobId);
|
||||
|
||||
/**
|
||||
* pc端岗位收藏
|
||||
* @param collection
|
||||
* @return
|
||||
*/
|
||||
int pcJobCollection(JobCollection collection);
|
||||
}
|
||||
|
||||
@@ -154,6 +154,20 @@ public class JobCollectionServiceImpl extends ServiceImpl<JobCollectionMapper,Jo
|
||||
return jobs;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int pcJobCollection(JobCollection collection) {
|
||||
List<JobCollection> jobCollections = jobCollectionMapper.selectList(Wrappers.<JobCollection>lambdaQuery().eq(JobCollection::getJobId, collection.getJobId()).eq(JobCollection::getUserId, collection.getUserId()));
|
||||
if(jobCollections.size()>0){
|
||||
jobCollectionMapper.deleteBatchIds(jobCollections.stream().map(JobCollection::getId).collect(Collectors.toList()));
|
||||
}
|
||||
JobCollection jobCollection = new JobCollection();
|
||||
jobCollection.setJobId(collection.getJobId());
|
||||
jobCollection.setUserId(collection.getUserId());
|
||||
jobCollectionMapper.insert(jobCollection);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompetitivenessResponse competitiveness(Long jobId) {
|
||||
// 查询岗位信息
|
||||
|
||||
Reference in New Issue
Block a user