package com.fastbee.rechargecard.service.impl;

import java.util.List;
import com.fastbee.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.rechargecard.mapper.NgUrbanMuRightsMapper;
import com.fastbee.rechargecard.domain.NgUrbanMuRights;
import com.fastbee.rechargecard.service.INgUrbanMuRightsService;

/**
 * 城镇亩均确权Service业务层处理
 * 
 * @author kerwincui
 * @date 2024-12-19
 */
@Service
public class NgUrbanMuRightsServiceImpl implements INgUrbanMuRightsService 
{
    @Autowired
    private NgUrbanMuRightsMapper ngUrbanMuRightsMapper;

    /**
     * 查询城镇亩均确权
     * 
     * @param muRightsId 城镇亩均确权主键
     * @return 城镇亩均确权
     */
    @Override
    public NgUrbanMuRights selectNgUrbanMuRightsByMuRightsId(Long muRightsId)
    {
        return ngUrbanMuRightsMapper.selectNgUrbanMuRightsByMuRightsId(muRightsId);
    }

    /**
     * 查询城镇亩均确权列表
     * 
     * @param ngUrbanMuRights 城镇亩均确权
     * @return 城镇亩均确权
     */
    @Override
    public List<NgUrbanMuRights> selectNgUrbanMuRightsList(NgUrbanMuRights ngUrbanMuRights)
    {
        return ngUrbanMuRightsMapper.selectNgUrbanMuRightsList(ngUrbanMuRights);
    }

    /**
     * 新增城镇亩均确权
     * 
     * @param ngUrbanMuRights 城镇亩均确权
     * @return 结果
     */
    @Override
    public int insertNgUrbanMuRights(NgUrbanMuRights ngUrbanMuRights)
    {
        ngUrbanMuRights.setCreateTime(DateUtils.getNowDate());
        return ngUrbanMuRightsMapper.insertNgUrbanMuRights(ngUrbanMuRights);
    }

    /**
     * 修改城镇亩均确权
     * 
     * @param ngUrbanMuRights 城镇亩均确权
     * @return 结果
     */
    @Override
    public int updateNgUrbanMuRights(NgUrbanMuRights ngUrbanMuRights)
    {
        ngUrbanMuRights.setUpdateTime(DateUtils.getNowDate());
        return ngUrbanMuRightsMapper.updateNgUrbanMuRights(ngUrbanMuRights);
    }

    /**
     * 批量删除城镇亩均确权
     * 
     * @param muRightsIds 需要删除的城镇亩均确权主键
     * @return 结果
     */
    @Override
    public int deleteNgUrbanMuRightsByMuRightsIds(Long[] muRightsIds)
    {
        return ngUrbanMuRightsMapper.deleteNgUrbanMuRightsByMuRightsIds(muRightsIds);
    }

    /**
     * 删除城镇亩均确权信息
     * 
     * @param muRightsId 城镇亩均确权主键
     * @return 结果
     */
    @Override
    public int deleteNgUrbanMuRightsByMuRightsId(Long muRightsId)
    {
        return ngUrbanMuRightsMapper.deleteNgUrbanMuRightsByMuRightsId(muRightsId);
    }
}
