package com.sqx.modules.post.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sqx.modules.post.dao.PostDao;
import com.sqx.modules.post.entity.PostEntity;
import com.sqx.modules.post.mapper.PostMapper;
import com.sqx.modules.post.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class PostServiceImpl extends ServiceImpl<PostDao, PostEntity> implements PostService {

 @Autowired
 private PostMapper postMapper;

    @Override
    public List<Object> getPostListOfUser() {

    return Collections.singletonList(postMapper.selectPostWithUserAndCompanyByPostId());
    }

    @Override
    public List<Object> getPostListOne(Integer postId) {
        return  postMapper.selectPostOne(postId);
    }

    @Override
    public List<Object> findPost(String address, Integer wage, Integer edu, Integer companyPeople, String key) {
        return  postMapper.findPost(address,wage,edu,companyPeople,key);
    }
}
