| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.order.entity.Orderdetail; |
| | | import com.mes.order.entity.Orders; |
| | | import com.mes.order.entity.*; |
| | | import com.mes.order.entity.dto.OrderDTO; |
| | | import com.mes.order.mapper.OrderdetailMapper; |
| | | import com.mes.order.mapper.OrdersMapper; |
| | | import com.mes.order.service.OrdersService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | |
| | | */ |
| | | @Service |
| | | @DS("sd") |
| | | @Slf4j |
| | | public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> implements OrdersService { |
| | | @Autowired |
| | | private OrderdetailMapper orderdetailMapper; |
| | | @Resource |
| | | private OrderdetailMapper orderdetailMapper; |
| | | |
| | | @Override |
| | | public List<Orders> selectOrders() { |
| | | //获取所有未完成的订单 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<OrderDTO> selectOrderPercent(){ |
| | | public List<OrderDTO> selectOrderPercent() { |
| | | return baseMapper.selectOrderPercent(); |
| | | } |
| | | |
| | | @Override |
| | | public HollowOrderDTO queryOrderByFlowCardId(String flowCardId) { |
| | | return baseMapper.queryOrderByFlowCardId(flowCardId); |
| | | } |
| | | |
| | | @Override |
| | | public List<HollowGlassDetailsDTO> queryFlowCardIdMaxLayerGlassInfo(String flowCardId, int totalLayer) { |
| | | return baseMapper.queryFlowCardIdMaxLayerGlassInfo(flowCardId, totalLayer); |
| | | } |
| | | |
| | | @Override |
| | | public List<HollowGlassDetailsDTO> queryFlowCardIdLayerGlassInfo(String flowCardId, int totalLayer, int layer) { |
| | | return baseMapper.queryFlowCardIdLayerGlassInfo(flowCardId, totalLayer, layer); |
| | | } |
| | | |
| | | @Override |
| | | @Cacheable(value = "orderDetails", key = "#flowCardId",unless = "#result == null") |
| | | public OrderDetailsDTO queryProductNameByFlowCardId(String flowCardId) { |
| | | log.info("查询数据库一次:{}", flowCardId); |
| | | return baseMapper.queryProductNameByFlowCardId(flowCardId); |
| | | } |
| | | } |