package com.diagbot.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.diagbot.entity.ProductService;
import com.diagbot.entity.wrapper.ProductServiceWrapper;
import com.diagbot.mapper.ProductServiceMapper;
import com.diagbot.service.ProductServiceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务端维护表 服务实现类
 * </p>
 *
 * @author zhaops
 * @since 2018-09-17
 */
@Service
public class ProductServiceServiceImpl extends ServiceImpl<ProductServiceMapper, ProductService> implements ProductServiceService {
    public ProductService findByProductIdAndServiceId(Map<String, Object> map) {
        return baseMapper.findByProductIdAndServiceId(map);
    }

    public List<ProductService> findByProductId(Long productId) {
        return baseMapper.findByProductId(productId);
    }

    public IPage<ProductServiceWrapper> selectProductServiceByUserIdPage(Page<ProductServiceWrapper> page, ProductServiceWrapper productService) {
        return baseMapper.selectProductServiceByUserIdPage(page, productService);
    }

    public Integer delById(Long id) {
        return baseMapper.delById(id);
    }
}