package com.flossom.system.service.impl;

import java.util.List;

import com.flossom.common.core.domain.entity.WxUserIntegralLog;
import com.flossom.common.core.mapper.WxUserIntegralLogMapper;
import com.flossom.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flossom.system.service.IWxUserIntegralLogService;

/**
 * 微信用户积分流水Service业务层处理
 *
 * @author flossom
 * @date 2023-12-14
 */
@Service
public class WxUserIntegralLogServiceImpl implements IWxUserIntegralLogService
{
    @Autowired
    private WxUserIntegralLogMapper wxUserIntegralLogMapper;

    /**
     * 查询微信用户积分流水
     *
     * @param id 微信用户积分流水主键
     * @return 微信用户积分流水
     */
    @Override
    public WxUserIntegralLog selectWxUserIntegralLogById(Long id)
    {
        return wxUserIntegralLogMapper.selectWxUserIntegralLogById(id);
    }

    /**
     * 查询微信用户积分流水列表
     *
     * @param wxUserIntegralLog 微信用户积分流水
     * @return 微信用户积分流水
     */
    @Override
    public List<WxUserIntegralLog> selectWxUserIntegralLogList(WxUserIntegralLog wxUserIntegralLog)
    {
        return wxUserIntegralLogMapper.selectWxUserIntegralLogList(wxUserIntegralLog);
    }

    /**
     * 新增微信用户积分流水
     *
     * @param wxUserIntegralLog 微信用户积分流水
     * @return 结果
     */
    @Override
    public int insertWxUserIntegralLog(WxUserIntegralLog wxUserIntegralLog)
    {
        wxUserIntegralLog.setCreateTime(DateUtils.getNowDate());
        return wxUserIntegralLogMapper.insertWxUserIntegralLog(wxUserIntegralLog);
    }

    /**
     * 修改微信用户积分流水
     *
     * @param wxUserIntegralLog 微信用户积分流水
     * @return 结果
     */
    @Override
    public int updateWxUserIntegralLog(WxUserIntegralLog wxUserIntegralLog)
    {
        return wxUserIntegralLogMapper.updateWxUserIntegralLog(wxUserIntegralLog);
    }

    /**
     * 批量删除微信用户积分流水
     *
     * @param ids 需要删除的微信用户积分流水主键
     * @return 结果
     */
    @Override
    public int deleteWxUserIntegralLogByIds(Long[] ids)
    {
        return wxUserIntegralLogMapper.deleteWxUserIntegralLogByIds(ids);
    }

    /**
     * 删除微信用户积分流水信息
     *
     * @param id 微信用户积分流水主键
     * @return 结果
     */
    @Override
    public int deleteWxUserIntegralLogById(Long id)
    {
        return wxUserIntegralLogMapper.deleteWxUserIntegralLogById(id);
    }
}
