Authored by min.ling

列表分页

1 package com.yoho.order.model; 1 package com.yoho.order.model;
2 2
  3 +import com.yoho.ufo.service.model.PageRequestBO;
3 import lombok.Data; 4 import lombok.Data;
4 import lombok.ToString; 5 import lombok.ToString;
5 import lombok.experimental.Builder; 6 import lombok.experimental.Builder;
@@ -11,7 +12,7 @@ import lombok.experimental.Builder; @@ -11,7 +12,7 @@ import lombok.experimental.Builder;
11 @Data 12 @Data
12 @ToString 13 @ToString
13 @Builder 14 @Builder
14 -public class SellerReqBO { 15 +public class SellerReqBO extends PageRequestBO {
15 16
16 private Integer uid; 17 private Integer uid;
17 18
@@ -45,6 +45,8 @@ @@ -45,6 +45,8 @@
45 on z.uid = s.uid 45 on z.uid = s.uid
46 where z.valid_status = 1 46 where z.valid_status = 1
47 <include refid="Query_Condition_Sql" /> 47 <include refid="Query_Condition_Sql" />
  48 + order by z.id desc
  49 + limit #{sellerReqBO.start},#{sellerReqBO.size}
48 </select> 50 </select>
49 51
50 <sql id="Query_Condition_Sql" > 52 <sql id="Query_Condition_Sql" >
@@ -89,6 +89,9 @@ public class TradeBillsServiceImpl implements ITradeBillsService { @@ -89,6 +89,9 @@ public class TradeBillsServiceImpl implements ITradeBillsService {
89 .mobile(req.getMobile()) 89 .mobile(req.getMobile())
90 .uid(req.getUid()) 90 .uid(req.getUid())
91 .validStatus(req.getValidStatus()).build(); 91 .validStatus(req.getValidStatus()).build();
  92 + sellerReqBO.setPage(req.getPage());
  93 + sellerReqBO.setStart(req.getStart());
  94 + sellerReqBO.setSize(req.getSize());
92 int total = zhimaCertMapper.selectCountByCondition(sellerReqBO); 95 int total = zhimaCertMapper.selectCountByCondition(sellerReqBO);
93 if(total == 0) { 96 if(total == 0) {
94 LOGGER.warn("queryStoredSeller with total is 0, req is {}",req); 97 LOGGER.warn("queryStoredSeller with total is 0, req is {}",req);