package com.jeeplus.test.jobPosion.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jeeplus.test.jobPosion.domain.JobPosition;
import com.jeeplus.test.jobPosion.domain.Position;
import com.jeeplus.test.jobPosion.mapper.JobPositionMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class JobPositionService extends ServiceImpl<JobPositionMapper, JobPosition> {

    @Autowired
    private JobPositionMapper jobPositionMapper;

    public IPage<JobPosition> findList(Page<JobPosition> page, QueryWrapper<JobPosition> queryWrapper){
        queryWrapper.eq("jp.del_flag","0");
        return jobPositionMapper.findList(page,queryWrapper);
    }

    public void updateUseFlagById(List<String> ids, String useFlag){
        jobPositionMapper.updateUseFlagById(ids,useFlag);
    }
}
