package com.staffing.custom.service.impl;

import java.util.List;
import com.staffing.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.staffing.custom.mapper.StTransferRecordMapper;
import com.staffing.custom.domain.StTransferRecord;
import com.staffing.custom.service.IStTransferRecordService;

/**
 * 微信转账记录Service业务层处理
 * 
 * @author staffing
 * @date 2024-09-06
 */
@Service
public class StTransferRecordServiceImpl implements IStTransferRecordService 
{
    @Autowired
    private StTransferRecordMapper stTransferRecordMapper;

    /**
     * 查询微信转账记录
     * 
     * @param id 微信转账记录主键
     * @return 微信转账记录
     */
    @Override
    public StTransferRecord selectStTransferRecordById(Long id)
    {
        return stTransferRecordMapper.selectStTransferRecordById(id);
    }

    /**
     * 查询微信转账记录列表
     * 
     * @param stTransferRecord 微信转账记录
     * @return 微信转账记录
     */
    @Override
    public List<StTransferRecord> selectStTransferRecordList(StTransferRecord stTransferRecord)
    {
        return stTransferRecordMapper.selectStTransferRecordList(stTransferRecord);
    }

    /**
     * 新增微信转账记录
     * 
     * @param stTransferRecord 微信转账记录
     * @return 结果
     */
    @Override
    public int insertStTransferRecord(StTransferRecord stTransferRecord)
    {
        stTransferRecord.setCreateTime(DateUtils.getNowDate());
        return stTransferRecordMapper.insertStTransferRecord(stTransferRecord);
    }

    /**
     * 修改微信转账记录
     * 
     * @param stTransferRecord 微信转账记录
     * @return 结果
     */
    @Override
    public int updateStTransferRecord(StTransferRecord stTransferRecord)
    {
        stTransferRecord.setUpdateTime(DateUtils.getNowDate());
        return stTransferRecordMapper.updateStTransferRecord(stTransferRecord);
    }

    /**
     * 批量删除微信转账记录
     * 
     * @param ids 需要删除的微信转账记录主键
     * @return 结果
     */
    @Override
    public int deleteStTransferRecordByIds(Long[] ids)
    {
        return stTransferRecordMapper.deleteStTransferRecordByIds(ids);
    }

    /**
     * 删除微信转账记录信息
     * 
     * @param id 微信转账记录主键
     * @return 结果
     */
    @Override
    public int deleteStTransferRecordById(Long id)
    {
        return stTransferRecordMapper.deleteStTransferRecordById(id);
    }
}
