Commit 746c5f8e by 徐高华

test

parent 95f0aa94
......@@ -1616,7 +1616,7 @@ public class WxStaffController extends WebBaseController {
// 区经门店列表
@RequestMapping("/list-clerk-store")
public RestResponse<Object> listClerkStore(String wxEnterpriseId , String enterpriseId,String clerkId,String searchParams , int pageSize , int currentPage) {
public RestResponse<Object> listClerkStore(String wxEnterpriseId , String enterpriseId,String clerkId,String searchParams , @RequestParam(defaultValue="20")int pageSize , @RequestParam(defaultValue="1")int currentPage) {
List<StoreListVO> voList = new ArrayList<>();
List<String> storeIdList = this.staffApiService.getHaoBanStoreIdsRolesByClerkId(clerkId, wxEnterpriseId) ;
int totalCount = 0 ;
......@@ -1624,7 +1624,7 @@ public class WxStaffController extends WebBaseController {
if(storeIdList.get(0).contains("-1")) {
String storeWidgetId = this.powerService.getStoreWidgetId(new Date(), clerkId);
logger.info("权限-所有门店storeWidgetId={}",storeWidgetId);
Page pageParam = new Page();
Page<Object> pageParam = new Page<Object>();
pageParam.setCurrentPage(currentPage);
pageParam.setPageSize(pageSize);
Page<StoreDTO> page = storeWidgetService.getStoreWidgetStore(storeWidgetId, null, enterpriseId, pageParam, clerkId,null);
......@@ -1635,15 +1635,17 @@ public class WxStaffController extends WebBaseController {
}else {
totalCount = storeIdList.size();
int start = pageSize * (currentPage-1) ;
int end = start +pageSize ;
if(end>totalCount) {
end = totalCount ;
}
List<String> subStoreIdList = storeIdList.subList(start, end) ;
if(CollectionUtils.isNotEmpty(subStoreIdList)) {
logger.info("分页当前页storeid数={}",subStoreIdList.size());
String[] arr = new String[subStoreIdList.size()] ;
storeDTOList = this.storeService.getStores(subStoreIdList.toArray(arr));
if(start<totalCount) {
int end = start +pageSize ;
if(end>totalCount) {
end = totalCount ;
}
List<String> subStoreIdList = storeIdList.subList(start, end) ;
if(CollectionUtils.isNotEmpty(subStoreIdList)) {
logger.info("分页当前页storeid数={}",subStoreIdList.size());
String[] arr = new String[subStoreIdList.size()] ;
storeDTOList = this.storeService.getStores(subStoreIdList.toArray(arr));
}
}
}
if(CollectionUtils.isNotEmpty(storeDTOList)) {
......
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