package com.flossom.system.service.impl;

import java.util.List;

import com.flossom.common.core.domain.entity.WxUserInstrumentLog;
import com.flossom.common.core.mapper.WxUserInstrumentLogMapper;
import com.flossom.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flossom.system.service.IWxUserInstrumentLogService;

/**
 * 用户仪器绑定日志Service业务层处理
 *
 * @author flossom
 * @date 2024-01-10
 */
@Service
public class WxUserInstrumentLogServiceImpl implements IWxUserInstrumentLogService
{
    @Autowired
    private WxUserInstrumentLogMapper wxUserInstrumentLogMapper;

    /**
     * 查询用户仪器绑定日志
     *
     * @param id 用户仪器绑定日志主键
     * @return 用户仪器绑定日志
     */
    @Override
    public WxUserInstrumentLog selectWxUserInstrumentLogById(Long id)
    {
        return wxUserInstrumentLogMapper.selectWxUserInstrumentLogById(id);
    }

    /**
     * 查询用户仪器绑定日志列表
     *
     * @param wxUserInstrumentLog 用户仪器绑定日志
     * @return 用户仪器绑定日志
     */
    @Override
    public List<WxUserInstrumentLog> selectWxUserInstrumentLogList(WxUserInstrumentLog wxUserInstrumentLog)
    {
        return wxUserInstrumentLogMapper.selectWxUserInstrumentLogList(wxUserInstrumentLog);
    }

    /**
     * 新增用户仪器绑定日志
     *
     * @param wxUserInstrumentLog 用户仪器绑定日志
     * @return 结果
     */
    @Override
    public int insertWxUserInstrumentLog(WxUserInstrumentLog wxUserInstrumentLog)
    {
        wxUserInstrumentLog.setCreateTime(DateUtils.getNowDate());
        // 设置系列号图片
        return wxUserInstrumentLogMapper.insertWxUserInstrumentLog(wxUserInstrumentLog);
    }

    /**
     * 修改用户仪器绑定日志
     *
     * @param wxUserInstrumentLog 用户仪器绑定日志
     * @return 结果
     */
    @Override
    public int updateWxUserInstrumentLog(WxUserInstrumentLog wxUserInstrumentLog)
    {
        return wxUserInstrumentLogMapper.updateWxUserInstrumentLog(wxUserInstrumentLog);
    }

    /**
     * 批量删除用户仪器绑定日志
     *
     * @param ids 需要删除的用户仪器绑定日志主键
     * @return 结果
     */
    @Override
    public int deleteWxUserInstrumentLogByIds(Long[] ids)
    {
        return wxUserInstrumentLogMapper.deleteWxUserInstrumentLogByIds(ids);
    }

    /**
     * 删除用户仪器绑定日志信息
     *
     * @param id 用户仪器绑定日志主键
     * @return 结果
     */
    @Override
    public int deleteWxUserInstrumentLogById(Long id)
    {
        return wxUserInstrumentLogMapper.deleteWxUserInstrumentLogById(id);
    }
}
