package com.hwrj.cloud.portal.service.impl;

import com.hwrj.cloud.portal.dao.PortalOrderDao;
import com.hwrj.cloud.portal.domain.OmsOrderDetail;
import com.hwrj.cloud.portal.service.OmsOrderService;
import com.hwrj.cloud.portal.service.UmsMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OmsOrderServiceImpl implements OmsOrderService {
    @Autowired
    private PortalOrderDao portalOrderDao;
    @Autowired
    private UmsMemberService umsMemberService;

    @Override
    public List<OmsOrderDetail> getOwnNoReciveOrder() {
        try {
            Long id = umsMemberService.getMemberId();
            if (id == null){
                return null;
            }
            List<OmsOrderDetail> orders = portalOrderDao.getOwnOrders(id);
            return orders;
        }catch (Exception e){
            return null;
        }
    }
}
