package com.hzs.sale.product.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzs.common.domain.sale.ext.BdProductExtendExt;
import com.hzs.common.domain.sale.product.BdProductExtend;
import com.hzs.sale.product.mapper.BdProductExtendMapper;
import com.hzs.sale.product.service.IBdProductExtendService;
import org.springframework.stereotype.Service;

/**
 * 商品拓展表 服务实现类
 */
@Service
public class BdProductExtendServiceImpl extends ServiceImpl<BdProductExtendMapper, BdProductExtend> implements IBdProductExtendService {

    @Override
    public BdProductExtend getProductExtend(Integer productId) {
        return baseMapper.selectByProductId(productId);
    }

    @Override
    public Integer selectByMoveUpSort(Integer productId) {
        return baseMapper.selectByMoveUpSort(productId);
    }

    @Override
    public void updateMoveUpBySort(Integer sort) {
        baseMapper.updateMoveUpBySort(sort);
    }

    @Override
    public Integer selectByMoveDownSort(Integer productId) {
        return baseMapper.selectByMoveDownSort(productId);
    }

    @Override
    public void updateMoveDownBySort(Integer sort) {
        baseMapper.updateMoveDownBySort(sort);
    }

    @Override
    public Integer getMaxProductSort() {
        return baseMapper.getMaxProductSort();
    }

    @Override
    public BdProductExtendExt queryExtendAndProduct(Integer pkProduct) {
        return baseMapper.queryExtendAndProduct(pkProduct);
    }

}
