package com.yiqi.app.service.impl;

import java.util.List;
import com.yiqi.common.utils.DateUtils;
import com.yiqi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yiqi.app.mapper.AppDeliveryRelationMapper;
import com.yiqi.app.domain.AppDeliveryRelation;
import com.yiqi.app.service.IAppDeliveryRelationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 派送员Service业务层处理
 *
 * @author ruoyi
 * @date 2023-11-07
 */
@Service
public class AppDeliveryRelationServiceImpl extends ServiceImpl<AppDeliveryRelationMapper,AppDeliveryRelation> implements IAppDeliveryRelationService {

    /**
     * 查询派送员
     *
     * @param id 派送员主键
     * @return 派送员
     */
    @Override
    public AppDeliveryRelation selectAppDeliveryRelationById(Long id) {
        return baseMapper.selectAppDeliveryRelationById(id);
    }

    /**
     * 查询派送员列表
     *
     * @param appDeliveryRelation 派送员
     * @return 派送员
     */
    @Override
    public List<AppDeliveryRelation> selectAppDeliveryRelationList(AppDeliveryRelation appDeliveryRelation) {
        return baseMapper.selectAppDeliveryRelationList(appDeliveryRelation);
    }

    /**
     * 新增派送员
     *
     * @param appDeliveryRelation 派送员
     * @return 结果
     */
    @Override
    public int insertAppDeliveryRelation(AppDeliveryRelation appDeliveryRelation) {
        appDeliveryRelation.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertAppDeliveryRelation(appDeliveryRelation);
    }

    /**
     * 修改派送员
     *
     * @param appDeliveryRelation 派送员
     * @return 结果
     */
    @Override
    public int updateAppDeliveryRelation(AppDeliveryRelation appDeliveryRelation) {
        appDeliveryRelation.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateAppDeliveryRelation(appDeliveryRelation);
    }

    /**
     * 批量删除派送员
     *
     * @param ids 需要删除的派送员主键
     * @return 结果
     */
    @Override
    public int deleteAppDeliveryRelationByIds(Long[] ids) {
        return baseMapper.deleteAppDeliveryRelationByIds(ids);
    }

    /**
     * 删除派送员信息
     *
     * @param id 派送员主键
     * @return 结果
     */
    @Override
    public int deleteAppDeliveryRelationById(Long id) {
        return baseMapper.deleteAppDeliveryRelationById(id);
    }



}
