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.AppUserAddressMapper;
import com.yiqi.app.domain.AppUserAddress;
import com.yiqi.app.service.IAppUserAddressService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 客户地址Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-04
 */
@Service
public class AppUserAddressServiceImpl extends ServiceImpl<AppUserAddressMapper,AppUserAddress> implements IAppUserAddressService {

    /**
     * 查询客户地址
     *
     * @param id 客户地址主键
     * @return 客户地址
     */
    @Override
    public AppUserAddress selectAppUserAddressById(Long id) {
        return baseMapper.selectAppUserAddressById(id);
    }

    /**
     * 查询客户地址列表
     *
     * @param appUserAddress 客户地址
     * @return 客户地址
     */
    @Override
    public List<AppUserAddress> selectAppUserAddressList(AppUserAddress appUserAddress) {
        return baseMapper.selectAppUserAddressList(appUserAddress);
    }

    /**
     * 新增客户地址
     *
     * @param appUserAddress 客户地址
     * @return 结果
     */
    @Override
    public int insertAppUserAddress(AppUserAddress appUserAddress) {
        appUserAddress.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertAppUserAddress(appUserAddress);
    }

    /**
     * 修改客户地址
     *
     * @param appUserAddress 客户地址
     * @return 结果
     */
    @Override
    public int updateAppUserAddress(AppUserAddress appUserAddress) {
        return baseMapper.updateAppUserAddress(appUserAddress);
    }

    /**
     * 批量删除客户地址
     *
     * @param ids 需要删除的客户地址主键
     * @return 结果
     */
    @Override
    public int deleteAppUserAddressByIds(Long[] ids) {
        return baseMapper.deleteAppUserAddressByIds(ids);
    }

    /**
     * 删除客户地址信息
     *
     * @param id 客户地址主键
     * @return 结果
     */
    @Override
    public int deleteAppUserAddressById(Long id) {
        return baseMapper.deleteAppUserAddressById(id);
    }



}
