package com.yonge.cooleshow.biz.dal.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.yonge.cooleshow.biz.dal.entity.UserOrderDetail;
import com.yonge.cooleshow.biz.dal.vo.UserOrderDetailVo;
import com.yonge.cooleshow.biz.dal.dto.search.OrderDetailSearch;
import com.yonge.cooleshow.biz.dal.dao.UserOrderDetailDao;
import com.yonge.cooleshow.biz.dal.service.UserOrderDetailService;

import java.util.List;


@Service
public class UserOrderDetailServiceImpl extends ServiceImpl<UserOrderDetailDao, UserOrderDetail> implements UserOrderDetailService {

	@Override
    public UserOrderDetailVo detail(Long id) {
        UserOrderDetailVo detail = baseMapper.detail(id);
        return detail;
    }

    @Override
    public UserOrderDetailVo detail(String orderNo) {
        UserOrderDetailVo detail = baseMapper.detailByOrderNo(orderNo);
        return detail;
    }

    @Override
    public List<UserOrderDetailVo> getOrderDetilListByOrderNo(String orderNo) {
        return baseMapper.getOrderDetilListByOrderNo(orderNo);
    }

    @Override
    public IPage<UserOrderDetailVo> selectPage(IPage<UserOrderDetailVo> page, OrderDetailSearch query){
        return page.setRecords(baseMapper.selectPage(page, query));
    }

    @Override
    public List<UserOrderDetailVo> selectList(OrderDetailSearch query) {
        return baseMapper.selectList(query);
    }

}