package com.huijy.management.service.impl;

import java.util.List;
import com.huijy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.huijy.management.mapper.MemberLocationMapper;
import com.huijy.management.domain.MemberLocation;
import com.huijy.management.service.IMemberLocationService;

/**
 * 会员坐标记录Service业务层处理
 *
 * @author luobo
 * @date 2021-09-12
 */
@Service
public class MemberLocationServiceImpl implements IMemberLocationService
{
    @Autowired
    private MemberLocationMapper memberLocationMapper;

    /**
     * 查询会员坐标记录
     *
     * @param memberLocationId 会员坐标记录主键
     * @return 会员坐标记录
     */
    @Override
    public MemberLocation selectMemberLocationByMemberLocationId(Long memberLocationId)
    {
        return memberLocationMapper.selectMemberLocationByMemberLocationId(memberLocationId);
    }

    /**
     * 查询会员坐标记录列表
     *
     * @param memberLocation 会员坐标记录
     * @return 会员坐标记录
     */
    @Override
    public List<MemberLocation> selectMemberLocationList(MemberLocation memberLocation)
    {
        return memberLocationMapper.selectMemberLocationList(memberLocation);
    }

    /**
     * 新增会员坐标记录
     *
     * @param memberLocation 会员坐标记录
     * @return 结果
     */
    @Override
    public int insertMemberLocation(MemberLocation memberLocation)
    {
        memberLocation.setCreateTime(DateUtils.getNowDate());
        return memberLocationMapper.insertMemberLocation(memberLocation);
    }

    /**
     * 修改会员坐标记录
     *
     * @param memberLocation 会员坐标记录
     * @return 结果
     */
    @Override
    public int updateMemberLocation(MemberLocation memberLocation)
    {
        return memberLocationMapper.updateMemberLocation(memberLocation);
    }

    /**
     * 批量删除会员坐标记录
     *
     * @param memberLocationIds 需要删除的会员坐标记录主键
     * @return 结果
     */
    @Override
    public int deleteMemberLocationByMemberLocationIds(Long[] memberLocationIds)
    {
        return memberLocationMapper.deleteMemberLocationByMemberLocationIds(memberLocationIds);
    }

    /**
     * 删除会员坐标记录信息
     *
     * @param memberLocationId 会员坐标记录主键
     * @return 结果
     */
    @Override
    public int deleteMemberLocationByMemberLocationId(Long memberLocationId)
    {
        return memberLocationMapper.deleteMemberLocationByMemberLocationId(memberLocationId);
    }
}
