package com.willalp.canteen.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.willalp.canteen.domain.HsCanteenDiningPlace;
import com.willalp.canteen.mapper.HsCanteenDiningPlaceMapper;
import com.willalp.canteen.service.IHsCanteenDiningPlaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 就餐地Service业务层处理
 *
 * @author songyu
 * @date 2022-01-07
 */
@Service
public class HsCanteenDiningPlaceServiceImpl extends ServiceImpl<HsCanteenDiningPlaceMapper, HsCanteenDiningPlace>  implements IHsCanteenDiningPlaceService
{
    @Autowired
    private HsCanteenDiningPlaceMapper hsCanteenDiningPlaceMapper;

    /**
     * 查询就餐地列表
     *
     * @param hsCanteenDiningPlace 就餐地
     * @return 就餐地
     */
    @Override
    public List<HsCanteenDiningPlace> selectHsCanteenDiningPlaceList(HsCanteenDiningPlace hsCanteenDiningPlace)
    {
        return hsCanteenDiningPlaceMapper.selectHsCanteenDiningPlaceList(hsCanteenDiningPlace);
    }

    /**
     * 修改就餐地
     *
     * @param hsCanteenDiningPlace 就餐地
     * @return 结果
     */
    @Override
    public int updateHsCanteenDiningPlace(HsCanteenDiningPlace hsCanteenDiningPlace)
    {
        return hsCanteenDiningPlaceMapper.updateHsCanteenDiningPlace(hsCanteenDiningPlace);
    }

    /**
     * 删除就餐地信息
     *
     * @param placeId 就餐地主键
     * @return 结果
     */
    @Override
    public int deleteHsCanteenDiningPlaceByPlaceId(Long placeId)
    {
        return hsCanteenDiningPlaceMapper.deleteHsCanteenDiningPlaceByPlaceId(placeId);
    }

    @Override
    public HsCanteenDiningPlace selectById(Long placeId) {
        return hsCanteenDiningPlaceMapper.selectById(placeId);
    }
}
