Commit 7c793873 by fudahua

企业门店初始化

parent a86e3f6f
......@@ -99,6 +99,14 @@ public interface WxEnterpriseRelatedApiService {
public List<String> listStoreIdByEnterpriseId(String wxEnterpriseId, String enterpriseId);
/**
* 查询绑定得门店id
*
* @param wxEnterpriseId
* @return
*/
public List<StoreOrGroupInfoDTO> listStoreRelationByEnterpriseId(String wxEnterpriseId, String enterpriseId, String search);
/**
* 初始化历史门店数据
*
* @return
......
......@@ -473,6 +473,25 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
}
@Override
public List<StoreOrGroupInfoDTO> listStoreRelationByEnterpriseId(String wxEnterpriseId, String enterpriseId, String search) {
BasePageInfo basePageInfo = new BasePageInfo();
basePageInfo.setPageSizeZero(true);
basePageInfo.setPageSize(0);
Page<TabStoreRelation> relationPage = storeRangeService.pageStoreRelation(enterpriseId, wxEnterpriseId, search, basePageInfo);
List<TabStoreRelation> storeRelations = relationPage.getResult();
if (CollectionUtils.isEmpty(storeRelations)) {
return new ArrayList<>();
}
return storeRelations.stream().map(tab -> {
StoreOrGroupInfoDTO groupInfoDTO = new StoreOrGroupInfoDTO();
groupInfoDTO.setRelationId(tab.getStoreId());
groupInfoDTO.setRelationName(tab.getStoreName());
groupInfoDTO.setRelationType(2);
return groupInfoDTO;
}).collect(Collectors.toList());
}
@Override
public boolean initHistoryEnterprise(String wxEnterpriseId) {
List<TabHaobanWxEnterpriseRelated> needDealEnts = new ArrayList<>();
if (StringUtils.isBlank(wxEnterpriseId)) {
......
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