1.添加多个企业查询功能-用户移动端企业比对
This commit is contained in:
@@ -13,6 +13,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.dromara.easyes.core.biz.EsPageInfo;
|
import org.dromara.easyes.core.biz.EsPageInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -195,4 +196,16 @@ public class AppJobController extends BaseController
|
|||||||
jobService.publishJob(job);
|
jobService.publishJob(job);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/jobCompare")
|
||||||
|
@ApiOperation("获取")
|
||||||
|
public AjaxResult jobCompare(@ApiParam("岗位ID数组") @RequestParam("jobIds") Long[] jobIds) {
|
||||||
|
if (ArrayUtils.isEmpty(jobIds)) {
|
||||||
|
return AjaxResult.error("请传递岗位ID参数(jobIds),多个ID用&分隔");
|
||||||
|
}
|
||||||
|
if (jobIds.length > 5) {
|
||||||
|
return AjaxResult.error("最多支持对比5个岗位,请减少参数数量");
|
||||||
|
}
|
||||||
|
return success(esJobSearchService.selectByIds(jobIds));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -67,4 +67,6 @@ public interface IESJobSearchService
|
|||||||
void updateJob(Long jobId);
|
void updateJob(Long jobId);
|
||||||
|
|
||||||
void deleteJob(Long jobId);
|
void deleteJob(Long jobId);
|
||||||
|
|
||||||
|
List<ESJobDocument> selectByIds(Long[] jobIds);
|
||||||
}
|
}
|
||||||
|
@@ -553,4 +553,10 @@ public class ESJobSearchImpl implements IESJobSearchService
|
|||||||
esJobDocumentMapper.delete(lambdaEsQueryWrapper);
|
esJobDocumentMapper.delete(lambdaEsQueryWrapper);
|
||||||
esJobDocumentMapper.insert(esJobDocument);
|
esJobDocumentMapper.insert(esJobDocument);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ESJobDocument> selectByIds(Long[] jobIds) {
|
||||||
|
LambdaEsQueryWrapper<ESJobDocument> wrapper = new LambdaEsQueryWrapper<>();
|
||||||
|
wrapper.in(ESJobDocument::getJobId,jobIds);
|
||||||
|
return esJobDocumentMapper.selectList(wrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user