Commit ac7110df by jianan

/customerTrackVideo/queryTrackList分页

parent 5fcf9f68
package com.yd.api.customer.service.impl;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yd.api.customer.service.CustomerTrackVideoService;
import com.yd.api.customer.vo.trackvideo.AddCustomerTrackVideoRequestVO;
import com.yd.api.customer.vo.trackvideo.QueryDetailsByIdResponseVO;
......@@ -26,6 +16,17 @@ import com.yd.util.CommonUtil;
import com.yd.util.HttpUtil;
import com.yd.util.SpringContextUtil;
import com.yd.util.config.ZHBErrorConfig;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service("CustomerTrackVideoService")
public class CustomerTrackVideoServiceImpl implements CustomerTrackVideoService {
......@@ -99,8 +100,18 @@ public class CustomerTrackVideoServiceImpl implements CustomerTrackVideoService
public QueryTrackListResponseVO queryTrackList(QueryTrackListRequestVO requestVO) {
QueryTrackListResponseVO resp = new QueryTrackListResponseVO();
try {
List<AgAclCustomerBehaviorTrackVideo> list = customerBehaviorTrackVideoMapper.selectByRecord(requestVO);
resp.setList(list);
PageInfo<AgAclCustomerBehaviorTrackVideo> page = requestVO.getPage();
PageHelper.startPage(page.getPageNum(), page.getPageSize(), null);
List<AgAclCustomerBehaviorTrackVideo> dataList = customerBehaviorTrackVideoMapper.selectByRecord(requestVO);
PageInfo<AgAclCustomerBehaviorTrackVideo> pageInfo = new PageInfo<>(dataList);
resp.setList(pageInfo.getList());
pageInfo.setList(null);
resp.setPage(pageInfo);
resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
} catch (Exception e) {
e.printStackTrace();
......
package com.yd.api.customer.vo.trackvideo;
import com.github.pagehelper.PageInfo;
import com.yd.dal.entity.customer.trackvideo.AgAclCustomerBehaviorTrackVideo;
import lombok.Data;
@Data
......@@ -59,4 +61,6 @@ public class QueryTrackListRequestVO {
* 录屏url
*/
private String url;
private PageInfo<AgAclCustomerBehaviorTrackVideo> page;
}
package com.yd.api.customer.vo.trackvideo;
import com.github.pagehelper.PageInfo;
import com.yd.api.result.CommonResult;
import com.yd.dal.entity.customer.trackvideo.AgAclCustomerBehaviorTrackVideo;
import lombok.Data;
......@@ -10,4 +11,5 @@ import java.util.List;
public class QueryTrackListResponseVO {
private CommonResult commonResult;
private List<AgAclCustomerBehaviorTrackVideo> list;
private PageInfo<AgAclCustomerBehaviorTrackVideo> page;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment