OrderStatisticsServiceImpl.java 987 B

1234567891011121314151617181920212223242526272829303132
  1. package com.goafanti.order.service.impl;
  2. import com.alibaba.fastjson.JSON;
  3. import com.goafanti.common.dao.TOrderNewMapper;
  4. import com.goafanti.core.mybatis.BaseMybatisDao;
  5. import com.goafanti.order.bo.*;
  6. import com.goafanti.order.service.OrderStatisticsService;
  7. import groovy.util.logging.Log4j;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.stereotype.Service;
  10. import java.util.*;
  11. @Service
  12. @Log4j
  13. public class OrderStatisticsServiceImpl extends BaseMybatisDao<TOrderNewMapper> implements OrderStatisticsService {
  14. @Autowired
  15. private TOrderNewMapper tOrderNewMapper;
  16. @Override
  17. public List<OutOrderSalesSource> orderSalesSource(InputOrderSalesSource in) {
  18. if (in.getSort()==null)in.setSort(0);
  19. if(in.getEndDate()!=null)in.setEndDate(in.getEndDate()+" 23:59:59");
  20. if (in.getDeps()!=null){
  21. List<String> ls= JSON.parseArray(in.getDeps(),String.class);
  22. in.setListDep(ls);
  23. }
  24. return tOrderNewMapper.orderSalesSource(in);
  25. }
  26. }