package cn.pluss.platform.memberOrder.impl;

import cn.pluss.platform.entity.MemberOrder;
import cn.pluss.platform.mapper.MemberOrderMapper;
import cn.pluss.platform.memberOrder.MemberOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("memberOrderService")
public class MemberOrderServiceImpl extends ServiceImpl<MemberOrderMapper, MemberOrder> implements MemberOrderService {

    @Override
    public MemberOrder queryMemberOrder(MemberOrder memberOrder) {
        return baseMapper.queryMemberOrder(memberOrder);
    }

    @Override
    public List<MemberOrder> queryMemberOrderList(MemberOrder memberOrder) {
        return baseMapper.queryMemberOrderList(memberOrder);
    }

    @Override
    public void saveMemberOrder(MemberOrder memberOrder) {
        baseMapper.insert(memberOrder);
    }

    @Override
    public void updateMemberOrder(MemberOrder memberOrder) {
        baseMapper.updateById(memberOrder);
    }

    @Override
    public void deleteMemberOrder(MemberOrder memberOrder) {
        baseMapper.deleteMemberOrder(memberOrder);
    }

    @Override
    public List<MemberOrder> queryMemberOrderPage(Map map) {
        return baseMapper.queryMemberOrderPage(map);
    }

    @Override
    public Integer queryMemberOrderPageCount(Map map) {
        return baseMapper.queryMemberOrderPageCount(map);
    }

    @Override
    public Double queryMemberOrderTotalOrderFeeByTime(Map map) {
        Double sum = baseMapper.queryMemberOrderTotalOrderFeeByTime(map);
        return sum == null ? 0 : sum;
    }

    @Override
    public Integer queryMemberOrderPageCountByTime(Map map) {
        return baseMapper.queryMemberOrderPageCountByTime(map);
    }

    @Override
    public Map<String, Map<String, Object>> queryMemberOrderCountByTimeGroupData(Map map) {
        return baseMapper.queryMemberOrderCountByTimeGroupData(map);
    }

    @Override
    public List<MemberOrder> queryMemberOrderPageByTime(Map map) {
        return baseMapper.queryMemberOrderPageByTime(map);
    }

    @Override
    public Double sumMemberOrderMoney(Map<String, Object> map) {
        return baseMapper.sumMemberOrderMoney(map);
    }

}

