package com.fs.fastGpt.service.impl;


import com.fs.common.utils.DateUtils;
import com.fs.fastGpt.domain.FastGptUser;
import com.fs.fastGpt.mapper.FastGptUserMapper;
import com.fs.fastGpt.service.IFastGptUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客户信息Service业务层处理
 * 
 * @author fs
 * @date 2024-09-30
 */
@Service
public class FastGptUserServiceImpl implements IFastGptUserService
{
    @Autowired
    private FastGptUserMapper fastGptUserMapper;

    /**
     * 查询客户信息
     * 
     * @param uid 客户信息主键
     * @return 客户信息
     */
    @Override
    public FastGptUser selectFastGptUserByUid(Long uid)
    {
        return fastGptUserMapper.selectFastGptUserByUid(uid);
    }

    /**
     * 查询客户信息列表
     * 
     * @param fastGptUser 客户信息
     * @return 客户信息
     */
    @Override
    public List<FastGptUser> selectFastGptUserList(FastGptUser fastGptUser)
    {
        return fastGptUserMapper.selectFastGptUserList(fastGptUser);
    }

    /**
     * 新增客户信息
     * 
     * @param fastGptUser 客户信息
     * @return 结果
     */
    @Override
    public int insertFastGptUser(FastGptUser fastGptUser)
    {
        fastGptUser.setCreateTime(DateUtils.getNowDate());
        return fastGptUserMapper.insertFastGptUser(fastGptUser);
    }

    /**
     * 修改客户信息
     * 
     * @param fastGptUser 客户信息
     * @return 结果
     */
    @Override
    public int updateFastGptUser(FastGptUser fastGptUser)
    {
        return fastGptUserMapper.updateFastGptUser(fastGptUser);
    }

    /**
     * 批量删除客户信息
     * 
     * @param uids 需要删除的客户信息主键
     * @return 结果
     */
    @Override
    public int deleteFastGptUserByUids(Long[] uids)
    {
        return fastGptUserMapper.deleteFastGptUserByUids(uids);
    }

    /**
     * 删除客户信息信息
     * 
     * @param uid 客户信息主键
     * @return 结果
     */
    @Override
    public int deleteFastGptUserByUid(Long uid)
    {
        return fastGptUserMapper.deleteFastGptUserByUid(uid);
    }
}
