移动端岗位发布-添加岗位联系人

This commit is contained in:
sh
2025-10-22 16:00:57 +08:00
parent d57ce9e3fc
commit f4730c60fb
3 changed files with 21 additions and 0 deletions

View File

@@ -15,4 +15,6 @@ import java.util.List;
public interface JobContactMapper extends BaseMapper<JobContact> { public interface JobContactMapper extends BaseMapper<JobContact> {
List<JobContact> getSelectList(JobContact jobContact); List<JobContact> getSelectList(JobContact jobContact);
int batchInsert(List<JobContact> list);
} }

View File

@@ -795,6 +795,12 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
// } // }
// job.setCompanyId(company.getCompanyId()); // job.setCompanyId(company.getCompanyId());
jobMapper.insert(job); jobMapper.insert(job);
if(job.getJobContactList()!=null){
job.getJobContactList().forEach(it->{
it.setJobId(job.getJobId());
});
jobContactMapper.batchInsert(job.getJobContactList());
}
iesJobSearchService.updateJob(job.getJobId()); iesJobSearchService.updateJob(job.getJobId());
} }
} }

View File

@@ -42,4 +42,17 @@
</where> </where>
</select> </select>
<insert id="batchInsert" parameterType="java.util.List">
INSERT INTO job_contact (
job_id, contact_person, contact_person_phone,position,
create_by, create_time, del_flag,remark
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.jobId}, #{item.contactPerson}, #{item.contactPersonPhone},#{item.position},
#{item.createBy}, #{item.createTime}, #{item.delFlag},#{item.remark}
)
</foreach>
</insert>
</mapper> </mapper>