package com.cpxt.biz.service.impl;

import java.lang.invoke.LambdaConversionException;
import java.util.Arrays;
import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cpxt.biz.mapper.BizCustomerRouteShopMapper;
import com.cpxt.biz.domain.BizCustomerRouteShop;
import com.cpxt.biz.service.IBizCustomerRouteShopService;

/**
 * 路线店铺关联Service业务层处理
 *
 * @author YIN
 * @date 2024-12-16
 */
@Service
public class BizCustomerRouteShopServiceImpl implements IBizCustomerRouteShopService
{
    @Autowired
    private BizCustomerRouteShopMapper bizCustomerRouteShopMapper;

    /**
     * 查询路线店铺关联
     *
     * @param id 路线店铺关联主键
     * @return 路线店铺关联
     */
    @Override
    public BizCustomerRouteShop selectBizCustomerRouteShopById(Long id)
    {
        return bizCustomerRouteShopMapper.selectById(id);
    }

    /**
     * 查询路线店铺关联列表
     *
     * @param bizCustomerRouteShop 路线店铺关联
     * @return 路线店铺关联
     */
    @Override
    public List<BizCustomerRouteShop> selectBizCustomerRouteShopList(BizCustomerRouteShop bizCustomerRouteShop)
    {
        LambdaQueryWrapper<BizCustomerRouteShop> queryWrapper = new LambdaQueryWrapper<>();
        return bizCustomerRouteShopMapper.selectList(queryWrapper);
    }

    /**
     * 新增路线店铺关联
     *
     * @param bizCustomerRouteShop 路线店铺关联
     * @return 结果
     */
    @Override
    public int insertBizCustomerRouteShop(BizCustomerRouteShop bizCustomerRouteShop)
    {
        return bizCustomerRouteShopMapper.insert(bizCustomerRouteShop);
    }

    /**
     * 修改路线店铺关联
     *
     * @param bizCustomerRouteShop 路线店铺关联
     * @return 结果
     */
    @Override
    public int updateBizCustomerRouteShop(BizCustomerRouteShop bizCustomerRouteShop)
    {
        return bizCustomerRouteShopMapper.updateById(bizCustomerRouteShop);
    }

    /**
     * 批量删除路线店铺关联
     *
     * @param ids 需要删除的路线店铺关联主键
     * @return 结果
     */
    @Override
    public int deleteBizCustomerRouteShopByIds(Long[] ids)
    {
        return bizCustomerRouteShopMapper.deleteBatchIds(Arrays.asList(ids));
    }

    /**
     * 删除路线店铺关联信息
     *
     * @param id 路线店铺关联主键
     * @return 结果
     */
    @Override
    public int deleteBizCustomerRouteShopById(Long id)
    {
        return bizCustomerRouteShopMapper.deleteById(id);
    }
}
