8 changed files with 172 additions and 0 deletions
@ -0,0 +1,43 @@ |
|||||||
|
package com.logpm.report.reader; |
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||||
|
import com.logpm.report.mapper.ReportDeliverMapeer; |
||||||
|
import com.logpm.report.service.ExportReader; |
||||||
|
import com.logpm.report.service.IAsyncService; |
||||||
|
import io.prometheus.client.CollectorRegistry; |
||||||
|
import org.apache.poi.ss.formula.functions.T; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.stereotype.Component; |
||||||
|
|
||||||
|
import javax.annotation.Resource; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author zhaoqiaobo |
||||||
|
* @create 2024-03-08 9:50 |
||||||
|
*/ |
||||||
|
@Component |
||||||
|
public class DeliveryDetailV2Reader implements ExportReader { |
||||||
|
|
||||||
|
@Resource |
||||||
|
private ReportDeliverMapeer reportDeliverMapeer; |
||||||
|
@Autowired |
||||||
|
private CollectorRegistry collectorRegistry; |
||||||
|
@Autowired |
||||||
|
private IAsyncService asyncService; |
||||||
|
|
||||||
|
@Override |
||||||
|
public Long getCount(Wrapper query) { |
||||||
|
Page page = new Page(1, 1); |
||||||
|
Long detailsPageCount = reportDeliverMapeer.getDetailsV2PageCount(query); |
||||||
|
return detailsPageCount; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<T> findList(Page page, Wrapper query) { |
||||||
|
return asyncService.detailsPageV2(page, query, Convert.toInt(page.getCurrent()), Convert.toInt(page.getSize())); |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue