package com.yc.ship.module.product.service.pricefloor;

import com.yc.ship.module.product.dal.dataobject.pricefloor.PriceFloorDO;
import com.yc.ship.module.product.dal.mysql.pricefloor.PriceFloorMapper;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;
import java.util.List;

/**
 * 楼层加价设置 Service 实现类
 *
 * @author 管理员
 */
@Service
@Validated
public class PriceFloorServiceImpl implements PriceFloorService {

    @Resource
    private PriceFloorMapper priceFloorMapper;

    @Override
    public void deletePriceFloor(Long id) {
        // 删除
        priceFloorMapper.deleteById(id);
    }


    @Override
    public PriceFloorDO getPriceFloor(Long id) {
        return priceFloorMapper.selectById(id);
    }

    @Override
    public List<PriceFloorDO> getListByObjectId(Long objectId) {
        return priceFloorMapper.selectListByObjectId(objectId);
    }


}