Commit 6053fd45 by 涂亚平

start...

1 parent 4179081b
2023-02-21 17:40:33,790 [http-nio-34567-exec-6] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token
at [Source: (PushbackInputStream); line: 1, column: 78] (through reference chain: com.laowu.dto.job.JobDTO["positions"]->java.util.ArrayList[0])
2023-02-21 17:49:44,584 [http-nio-34567-exec-6] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token
at [Source: (PushbackInputStream); line: 1, column: 78] (through reference chain: com.laowu.dto.job.JobDTO["positions"]->java.util.ArrayList[0])
...@@ -30,7 +30,7 @@ public class JobDictController { ...@@ -30,7 +30,7 @@ public class JobDictController {
private JobDictService jobDictService; private JobDictService jobDictService;
@PostMapping("jobs") @PostMapping("jobs")
@ApiOperation("所有工作 pageSize pageNum jobType 0:一村一技,1:工学一体,2:对外劳务 recruitId cityId positions[] ") @ApiOperation("所有工作 pageSize pageNum jobType 0:一村一技,1:工学一体,2:对外劳务 recruitStatus recruitId cityId positions[] jobName ")
public ResponseVO jobs(@RequestBody JobDTO jobDTO){ public ResponseVO jobs(@RequestBody JobDTO jobDTO){
return ResponseData.generateCreatedResponse(0,jobDictService.jobs(jobDTO)); return ResponseData.generateCreatedResponse(0,jobDictService.jobs(jobDTO));
} }
......
...@@ -19,4 +19,8 @@ public class JobDTO { ...@@ -19,4 +19,8 @@ public class JobDTO {
private List<Long> positions; private List<Long> positions;
private String jobName;
private String recruitStatus;
} }
...@@ -24,7 +24,7 @@ public interface JobDictMapper extends BaseMapper<JobDictDO> { ...@@ -24,7 +24,7 @@ public interface JobDictMapper extends BaseMapper<JobDictDO> {
/** /**
* 查询工作 分页 * 查询工作 分页
*/ */
IPage<JobVO> jobs(IPage page, Long recruitId, Long cityId, List<Long> positions,Integer jobType); IPage<JobVO> jobs(IPage page, Long recruitId, Long cityId, List<Long> positions,Integer jobType,String jobName,String recruitStatus);
/** /**
* 查询 一个工作 * 查询 一个工作
......
...@@ -46,7 +46,7 @@ public class JobDictServiceImpl extends ServiceImpl<JobDictMapper, JobDictDO> im ...@@ -46,7 +46,7 @@ public class JobDictServiceImpl extends ServiceImpl<JobDictMapper, JobDictDO> im
public IPage<JobVO> jobs(JobDTO jobDTO) { public IPage<JobVO> jobs(JobDTO jobDTO) {
Page pager = new Page(jobDTO.getPageNum(), jobDTO.getPageSize()); Page pager = new Page(jobDTO.getPageNum(), jobDTO.getPageSize());
return this.baseMapper.jobs(pager, jobDTO.getRecruitId(), jobDTO.getCityId(), jobDTO.getPositions(), jobDTO.getJobType()); return this.baseMapper.jobs(pager, jobDTO.getRecruitId(), jobDTO.getCityId(), jobDTO.getPositions(), jobDTO.getJobType(), jobDTO.getJobName(),jobDTO.getRecruitStatus());
} }
public OneJobVO oneJob(JobDictDO jobDictDO) { public OneJobVO oneJob(JobDictDO jobDictDO) {
...@@ -99,7 +99,7 @@ public class JobDictServiceImpl extends ServiceImpl<JobDictMapper, JobDictDO> im ...@@ -99,7 +99,7 @@ public class JobDictServiceImpl extends ServiceImpl<JobDictMapper, JobDictDO> im
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public String batchAddJob(Integer jobType, MultipartFile multipartFile){ public String batchAddJob(Integer jobType, MultipartFile multipartFile) {
try { try {
ExcelUtil.readExcelWithoutTitle(null, BatchAddJobDTO.class, multipartFile).forEach(s -> { ExcelUtil.readExcelWithoutTitle(null, BatchAddJobDTO.class, multipartFile).forEach(s -> {
...@@ -116,7 +116,6 @@ public class JobDictServiceImpl extends ServiceImpl<JobDictMapper, JobDictDO> im ...@@ -116,7 +116,6 @@ public class JobDictServiceImpl extends ServiceImpl<JobDictMapper, JobDictDO> im
} }
public static void main(String[] args) { public static void main(String[] args) {
String abc = "AB100001"; String abc = "AB100001";
Integer a = Integer.parseInt(abc.substring(2)) + 1; Integer a = Integer.parseInt(abc.substring(2)) + 1;
......
...@@ -9,8 +9,14 @@ public class JobVO { ...@@ -9,8 +9,14 @@ public class JobVO {
private String jobName; private String jobName;
private Long companyId;
private String companyName; private String companyName;
private String companyLogo;
private String recruitStatus;
private String startSalary; private String startSalary;
private String endSalary; private String endSalary;
...@@ -19,6 +25,10 @@ public class JobVO { ...@@ -19,6 +25,10 @@ public class JobVO {
private String city; private String city;
private Long cityId;
private Long recruitId;
private String recruitType; private String recruitType;
private String parentType; private String parentType;
...@@ -27,4 +37,10 @@ public class JobVO { ...@@ -27,4 +37,10 @@ public class JobVO {
private String jobId; private String jobId;
private String jobDesc;
private String jobRequirement;
private Long positionId;
} }
...@@ -15,12 +15,20 @@ ...@@ -15,12 +15,20 @@
t.id, t.id,
t.job_id, t.job_id,
t.job_name, t.job_name,
t.company_name, t.company_id,
t7.company_name,
t7.company_logo,
t.recruit_status,
t.start_salary, t.start_salary,
t.end_salary, t.end_salary,
t4.province, t4.province,
t3.city, t3.city,
t.city_id,
t.recruit_id,
t.job_desc,
t.job_requirement,
t2.recruit_type, t2.recruit_type,
t5.id as position_id,
t6.position_type AS parentType, t6.position_type AS parentType,
t5.position_type AS sonType, t5.position_type AS sonType,
CONCAT( t6.position_code, t5.position_code, t.job_id ) AS jobId CONCAT( t6.position_code, t5.position_code, t.job_id ) AS jobId
...@@ -46,12 +54,18 @@ ...@@ -46,12 +54,18 @@
<if test="cityId != null and cityId != ''"> <if test="cityId != null and cityId != ''">
AND t.city_id = #{cityId} AND t.city_id = #{cityId}
</if> </if>
<if test="positions != null and positions != ''"> <if test="positions.size >0">
AND t.position_id IN AND t.position_id IN
<foreach collection="positions" item="id" index="index" open="(" close=")" separator=","> <foreach collection="positions" item="id" index="index" open="(" close=")" separator=",">
#{id} #{id}
</foreach> </foreach>
</if> </if>
<if test="jobName != null and jobName != ''">
AND ( t.`job_name` LIKE concat('%', #{jobName}, '%') or t.enterprise_name like concat('%', #{jobName}, '%'))
</if>
<if test="recruitStatus != null and recruitStatus != ''">
and t.recruit_status = #{recruitStatus}
</if>
</select> </select>
<select id="oneJob" parameterType="long" resultType="com.laowu.vo.job.OneJobVO"> <select id="oneJob" parameterType="long" resultType="com.laowu.vo.job.OneJobVO">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!