package com.shzg.project.unique.service.impl;

import java.util.List;
import com.shzg.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.shzg.project.unique.mapper.WornUniqueCodeEventMapper;
import com.shzg.project.unique.domain.WornUniqueCodeEvent;
import com.shzg.project.unique.service.IWornUniqueCodeEventService;

/**
 * 唯一码事件记录Service业务层处理
 * 
 * @author shzg
 * @date 2026-03-17
 */
@Service
public class WornUniqueCodeEventServiceImpl implements IWornUniqueCodeEventService 
{
    @Autowired
    private WornUniqueCodeEventMapper wornUniqueCodeEventMapper;

    /**
     * 查询唯一码事件记录
     * 
     * @param id 唯一码事件记录主键
     * @return 唯一码事件记录
     */
    @Override
    public WornUniqueCodeEvent selectWornUniqueCodeEventById(Long id)
    {
        return wornUniqueCodeEventMapper.selectWornUniqueCodeEventById(id);
    }

    /**
     * 查询唯一码事件记录列表
     * 
     * @param wornUniqueCodeEvent 唯一码事件记录
     * @return 唯一码事件记录
     */
    @Override
    public List<WornUniqueCodeEvent> selectWornUniqueCodeEventList(WornUniqueCodeEvent wornUniqueCodeEvent)
    {
        return wornUniqueCodeEventMapper.selectWornUniqueCodeEventList(wornUniqueCodeEvent);
    }

    /**
     * 新增唯一码事件记录
     * 
     * @param wornUniqueCodeEvent 唯一码事件记录
     * @return 结果
     */
    @Override
    public int insertWornUniqueCodeEvent(WornUniqueCodeEvent wornUniqueCodeEvent)
    {
        wornUniqueCodeEvent.setCreateTime(DateUtils.getNowDate());
        return wornUniqueCodeEventMapper.insertWornUniqueCodeEvent(wornUniqueCodeEvent);
    }

    /**
     * 修改唯一码事件记录
     * 
     * @param wornUniqueCodeEvent 唯一码事件记录
     * @return 结果
     */
    @Override
    public int updateWornUniqueCodeEvent(WornUniqueCodeEvent wornUniqueCodeEvent)
    {
        wornUniqueCodeEvent.setUpdateTime(DateUtils.getNowDate());
        return wornUniqueCodeEventMapper.updateWornUniqueCodeEvent(wornUniqueCodeEvent);
    }

    /**
     * 批量删除唯一码事件记录
     * 
     * @param ids 需要删除的唯一码事件记录主键
     * @return 结果
     */
    @Override
    public int deleteWornUniqueCodeEventByIds(Long[] ids)
    {
        return wornUniqueCodeEventMapper.deleteWornUniqueCodeEventByIds(ids);
    }

    /**
     * 删除唯一码事件记录信息
     * 
     * @param id 唯一码事件记录主键
     * @return 结果
     */
    @Override
    public int deleteWornUniqueCodeEventById(Long id)
    {
        return wornUniqueCodeEventMapper.deleteWornUniqueCodeEventById(id);
    }
}
