Commit 68da3340 by 徐高华

/

parent 57a20519
......@@ -1675,6 +1675,8 @@ public class WxStaffController extends WebBaseController {
}
@RequestMapping("/list-clerk-store-page")
public RestResponse<Object> listClerkStorePage(String wxEnterpriseId , String enterpriseId,String clerkId, @RequestParam(defaultValue="20")int pageSize , @RequestParam(defaultValue="1")int currentPage , String storeSearchParams) {
// 如果有权限控制,进行管辖门店过0滤
......@@ -1684,15 +1686,7 @@ public class WxStaffController extends WebBaseController {
}
Page page = this.page(wxEnterpriseId, enterpriseId, clerkId, 20, 1, storeSearchParams, authStoreIdList) ;
List<StoreDTO> storeList = (List<StoreDTO>) page.getResult();
List<StoreListVO> retList = new ArrayList<StoreListVO>();
StoreListVO vo = null;
for (StoreDTO dto : storeList) {
vo = new StoreListVO();
vo.setStoreId(dto.getStoreId());
vo.setStoreName(dto.getStoreName());
vo.setStoreCode(dto.getStoreCode());
retList.add(vo);
}
List<StoreListVO> retList = this.toList(storeList) ;
Page<StoreListVO> retPage = new Page<>();
retPage.setResult(retList);
retPage.setTotalCount(page.getTotalCount());
......@@ -1725,6 +1719,19 @@ public class WxStaffController extends WebBaseController {
return page ;
}
private List<StoreListVO> toList(List<StoreDTO> storeList){
List<StoreListVO> retList = new ArrayList<StoreListVO>();
StoreListVO vo = null;
for (StoreDTO dto : storeList) {
vo = new StoreListVO();
vo.setStoreId(dto.getStoreId());
vo.setStoreName(dto.getStoreName());
vo.setStoreCode(dto.getStoreCode());
retList.add(vo);
}
return retList ;
}
//区经门店查询
@RequestMapping("search-clerk-store")
public RestResponse<Object> listClerkStoreByParams(String wxEnterpriseId, String enterpriseId, String clerkId, String storeSearchParams) {
......@@ -1738,16 +1745,7 @@ public class WxStaffController extends WebBaseController {
}
Page page = this.page(wxEnterpriseId, enterpriseId, clerkId, 20, 1, storeSearchParams, authStoreIdList) ;
List<StoreDTO> storeList = (List<StoreDTO>) page.getResult();
List<StoreListVO> retList = new ArrayList<StoreListVO>();
StoreListVO vo = null;
for (StoreDTO dto : storeList) {
vo = new StoreListVO();
vo.setStoreId(dto.getStoreId());
vo.setStoreName(dto.getStoreName());
vo.setStoreCode(dto.getStoreCode());
retList.add(vo);
}
return RestResponse.successResult(retList);
return RestResponse.successResult(toList(storeList));
}
/**
......
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