package io.renren.modules.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.business.dao.BusinessWorkerOrgDao;
import io.renren.modules.business.entity.BusinessWorkerOrgEntity;
import io.renren.modules.business.service.BusinessWorkerOrgService;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("businessWorkerOrgService")
public class BusinessWorkerOrgServiceImpl extends ServiceImpl<BusinessWorkerOrgDao, BusinessWorkerOrgEntity> implements BusinessWorkerOrgService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<BusinessWorkerOrgEntity> page = this.page(
                new Query<BusinessWorkerOrgEntity>().getPage(params),
                new QueryWrapper<BusinessWorkerOrgEntity>()
        );

        return new PageUtils(page);
    }

    /**
     * 根据 位置id 和职位id 获取职位信息
     * @param params
     * @return
     */
    @Override
    public BusinessWorkerOrgEntity getOrgInfo(Map<String, Object> params) {
        return baseMapper.getOrgInfo(params);
    }

}