package com.hw.ems.base.service.impl;

import java.util.List;

import com.hw.common.core.utils.DateUtils;
import com.hw.ems.base.domain.BasePublicUserRecord;
import com.hw.ems.base.mapper.BasePublicUserRecordMapper;
import com.hw.ems.base.service.IBasePublicUserRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 公摊用户数据记录Service业务层处理
 *
 * @author YinQ
 * @date 2023-06-25
 */
@Service
public class BasePublicUserRecordServiceImpl implements IBasePublicUserRecordService
{
    @Autowired
    private BasePublicUserRecordMapper basePublicUserRecordMapper;

    /**
     * 查询公摊用户数据记录
     *
     * @param objid 公摊用户数据记录主键
     * @return 公摊用户数据记录
     */
    @Override
    //@DS("#header.poolName")
    public BasePublicUserRecord selectBasePublicUserRecordByObjid(Long objid)
    {
        return basePublicUserRecordMapper.selectBasePublicUserRecordByObjid(objid);
    }

    /**
     * 查询公摊用户数据记录列表
     *
     * @param basePublicUserRecord 公摊用户数据记录
     * @return 公摊用户数据记录
     */
    @Override
    //@DS("#header.poolName")
    public List<BasePublicUserRecord> selectBasePublicUserRecordList(BasePublicUserRecord basePublicUserRecord)
    {
        return basePublicUserRecordMapper.selectBasePublicUserRecordList(basePublicUserRecord);
    }

    /**
     * 新增公摊用户数据记录
     *
     * @param basePublicUserRecord 公摊用户数据记录
     * @return 结果
     */
    @Override
    //@DS("#header.poolName")
    public int insertBasePublicUserRecord(BasePublicUserRecord basePublicUserRecord)
    {
        return basePublicUserRecordMapper.insertBasePublicUserRecord(basePublicUserRecord);
    }

    /**
     * 修改公摊用户数据记录
     *
     * @param basePublicUserRecord 公摊用户数据记录
     * @return 结果
     */
    @Override
    //@DS("#header.poolName")
    public int updateBasePublicUserRecord(BasePublicUserRecord basePublicUserRecord)
    {
        basePublicUserRecord.setUpdateTime(DateUtils.getNowDate());
        return basePublicUserRecordMapper.updateBasePublicUserRecord(basePublicUserRecord);
    }

    /**
     * 批量删除公摊用户数据记录
     *
     * @param objids 需要删除的公摊用户数据记录主键
     * @return 结果
     */
    @Override
    //@DS("#header.poolName")
    public int deleteBasePublicUserRecordByObjids(Long[] objids)
    {
        return basePublicUserRecordMapper.deleteBasePublicUserRecordByObjids(objids);
    }

    /**
     * 删除公摊用户数据记录信息
     *
     * @param objid 公摊用户数据记录主键
     * @return 结果
     */
    @Override
    //@DS("#header.poolName")
    public int deleteBasePublicUserRecordByObjid(Long objid)
    {
        return basePublicUserRecordMapper.deleteBasePublicUserRecordByObjid(objid);
    }
}
