package com.huyi.service.contract.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huyi.service.contract.mapper.OwnContractMapper;
import com.huyi.service.contract.service.IOwnContractService;
import com.keao.tianhu.starter.mybatis.plus.entity.QueryRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 合同Service业务层处理
 * 
 * @author ch
 * @date 2021-08-17
 */
@Service
public class OwnContractServiceImpl implements IOwnContractService
{
    @Autowired
    private OwnContractMapper ownContractMapper;

    /**
     * 查询合同列表
     * @param map
     * @param request
     * @return
     */
    @Override
    public IPage<Map> selectContractList(Map map,QueryRequest request){
        Page page = new Page(request.getPageNum(),request.getPageSize());
        return ownContractMapper.selectContractList(page,map);
    }

    /**
     * 查询创建者名称
     * @param map
     * @return
     */
    @Override
    public Map selectUserName(Map map) {
        return ownContractMapper.selectUserName(map);
    }

}
