|
|
@@ -10,12 +10,20 @@ import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import com.uas.platform.b2b.dao.CustSaleStatMonthDao;
|
|
|
+import com.uas.platform.b2b.dao.CustSaleStatYearDao;
|
|
|
import com.uas.platform.b2b.dao.SaleStatDayDao;
|
|
|
import com.uas.platform.b2b.dao.SaleStatMonthDao;
|
|
|
import com.uas.platform.b2b.dao.SaleStatYearDao;
|
|
|
+import com.uas.platform.b2b.dao.SellerSaleStatMonthDao;
|
|
|
+import com.uas.platform.b2b.dao.SellerSaleStatYearDao;
|
|
|
+import com.uas.platform.b2b.model.CustSaleStatMonth;
|
|
|
+import com.uas.platform.b2b.model.CustSaleStatYear;
|
|
|
import com.uas.platform.b2b.model.SaleStatDay;
|
|
|
import com.uas.platform.b2b.model.SaleStatMonth;
|
|
|
import com.uas.platform.b2b.model.SaleStatYear;
|
|
|
+import com.uas.platform.b2b.model.SellerSaleStatMonth;
|
|
|
+import com.uas.platform.b2b.model.SellerSaleStatYear;
|
|
|
import com.uas.platform.b2b.service.SaleStatService;
|
|
|
import com.uas.platform.core.model.PageInfo;
|
|
|
|
|
|
@@ -31,6 +39,18 @@ public class SaleStatServiceImpl implements SaleStatService {
|
|
|
@Autowired
|
|
|
private SaleStatYearDao saleStatYearDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CustSaleStatMonthDao custSaleStatMonthDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private CustSaleStatYearDao custSaleStatYearDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SellerSaleStatMonthDao sellerSaleStatMonthDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SellerSaleStatYearDao sellerSaleStatYearDao;
|
|
|
+
|
|
|
@Override
|
|
|
public Page<SaleStatDay> findDayByPageInfo(final PageInfo pageInfo) {
|
|
|
return saleStatDayDao.findAll(new Specification<SaleStatDay>() {
|
|
|
@@ -64,4 +84,48 @@ public class SaleStatServiceImpl implements SaleStatService {
|
|
|
}, pageInfo);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Page<CustSaleStatMonth> findCustMonthByPageInfo(final PageInfo pageInfo) {
|
|
|
+ return custSaleStatMonthDao.findAll(new Specification<CustSaleStatMonth>() {
|
|
|
+
|
|
|
+ public Predicate toPredicate(Root<CustSaleStatMonth> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
|
|
|
+ query.where(pageInfo.getPredicates(root, query, builder));
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }, pageInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<CustSaleStatYear> findCustYearByPageInfo(final PageInfo pageInfo) {
|
|
|
+ return custSaleStatYearDao.findAll(new Specification<CustSaleStatYear>() {
|
|
|
+
|
|
|
+ public Predicate toPredicate(Root<CustSaleStatYear> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
|
|
|
+ query.where(pageInfo.getPredicates(root, query, builder));
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }, pageInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<SellerSaleStatMonth> findSellerMonthByPageInfo(final PageInfo pageInfo) {
|
|
|
+ return sellerSaleStatMonthDao.findAll(new Specification<SellerSaleStatMonth>() {
|
|
|
+
|
|
|
+ public Predicate toPredicate(Root<SellerSaleStatMonth> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
|
|
|
+ query.where(pageInfo.getPredicates(root, query, builder));
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }, pageInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<SellerSaleStatYear> findSellerYearByPageInfo(final PageInfo pageInfo) {
|
|
|
+ return sellerSaleStatYearDao.findAll(new Specification<SellerSaleStatYear>() {
|
|
|
+
|
|
|
+ public Predicate toPredicate(Root<SellerSaleStatYear> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
|
|
|
+ query.where(pageInfo.getPredicates(root, query, builder));
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }, pageInfo);
|
|
|
+ }
|
|
|
+
|
|
|
}
|