Commit 3d25855f by jianan

/customerTrackVideo/queryTrackList分页

parent 3c4fdeb8
package com.yd.api.customer.service.impl; package com.yd.api.customer.service.impl;
import java.io.ByteArrayInputStream; import com.github.pagehelper.PageHelper;
import java.io.IOException; import com.github.pagehelper.PageInfo;
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.yd.api.customer.service.CustomerTrackVideoService; import com.yd.api.customer.service.CustomerTrackVideoService;
import com.yd.api.customer.vo.trackvideo.AddCustomerTrackVideoRequestVO; import com.yd.api.customer.vo.trackvideo.AddCustomerTrackVideoRequestVO;
import com.yd.api.customer.vo.trackvideo.QueryDetailsByIdResponseVO; import com.yd.api.customer.vo.trackvideo.QueryDetailsByIdResponseVO;
...@@ -26,6 +16,17 @@ import com.yd.util.CommonUtil; ...@@ -26,6 +16,17 @@ import com.yd.util.CommonUtil;
import com.yd.util.HttpUtil; import com.yd.util.HttpUtil;
import com.yd.util.SpringContextUtil; import com.yd.util.SpringContextUtil;
import com.yd.util.config.ZHBErrorConfig; 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") @Service("CustomerTrackVideoService")
public class CustomerTrackVideoServiceImpl implements CustomerTrackVideoService { public class CustomerTrackVideoServiceImpl implements CustomerTrackVideoService {
...@@ -99,8 +100,18 @@ public class CustomerTrackVideoServiceImpl implements CustomerTrackVideoService ...@@ -99,8 +100,18 @@ public class CustomerTrackVideoServiceImpl implements CustomerTrackVideoService
public QueryTrackListResponseVO queryTrackList(QueryTrackListRequestVO requestVO) { public QueryTrackListResponseVO queryTrackList(QueryTrackListRequestVO requestVO) {
QueryTrackListResponseVO resp = new QueryTrackListResponseVO(); QueryTrackListResponseVO resp = new QueryTrackListResponseVO();
try { try {
List<AgAclCustomerBehaviorTrackVideo> list = customerBehaviorTrackVideoMapper.selectByRecord(requestVO); PageInfo<AgAclCustomerBehaviorTrackVideo> page = requestVO.getPage();
resp.setList(list);
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"))); resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
package com.yd.api.customer.vo.trackvideo; package com.yd.api.customer.vo.trackvideo;
import com.github.pagehelper.PageInfo;
import com.yd.dal.entity.customer.trackvideo.AgAclCustomerBehaviorTrackVideo;
import lombok.Data; import lombok.Data;
@Data @Data
...@@ -59,4 +61,6 @@ public class QueryTrackListRequestVO { ...@@ -59,4 +61,6 @@ public class QueryTrackListRequestVO {
* 录屏url * 录屏url
*/ */
private String url; private String url;
private PageInfo<AgAclCustomerBehaviorTrackVideo> page;
} }
package com.yd.api.customer.vo.trackvideo; package com.yd.api.customer.vo.trackvideo;
import com.github.pagehelper.PageInfo;
import com.yd.api.result.CommonResult; import com.yd.api.result.CommonResult;
import com.yd.dal.entity.customer.trackvideo.AgAclCustomerBehaviorTrackVideo; import com.yd.dal.entity.customer.trackvideo.AgAclCustomerBehaviorTrackVideo;
import lombok.Data; import lombok.Data;
...@@ -10,4 +11,5 @@ import java.util.List; ...@@ -10,4 +11,5 @@ import java.util.List;
public class QueryTrackListResponseVO { public class QueryTrackListResponseVO {
private CommonResult commonResult; private CommonResult commonResult;
private List<AgAclCustomerBehaviorTrackVideo> list; 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