Commit cde6c09e by 陶光胜

init

parent e9e0d550
......@@ -55,25 +55,26 @@ public class StoreMessageHandler implements MessageHandler {
if(CollectionUtils.isNotEmpty(resourceResponse.getResult())){
for(UnionEnterpriseResourceDTO dto : resourceResponse.getResult()){
ServiceResponse<StoreWidgetDTO> storeWidget = this.storeWidgetApiService.getStoreWidget(dto.getResource().intValue());
if(storeWidget.isSuccess()){
StoreWidgetDTO storeWidgetDTO = storeWidget.getResult();
if(storeWidgetDTO != null){
if(AuthModeEnum.YES.getCode() == storeWidgetDTO.getAuthMode()){
StoreSearchDTO storeSearchDTO = new StoreSearchDTO();
storeSearchDTO.setStoreIds(String.valueOf(storeId));
storeSearchDTO.setSearchJson(storeWidgetDTO.getSearchParam());
storeSearchDTO.setEnterpriseId(enterpriseId);
ServiceResponse<Page<StoreDTO>> response = this.storeApiService.listStore(storeSearchDTO, 1, 1);
if(response.isSuccess()){
if(CollectionUtils.isNotEmpty(response.getResult().getResult())){
StoreDTO storeDTO = new StoreDTO();
storeDTO.setStoreInfoId(storeInfoId);
storeDTO.setEnterpriseId(enterpriseId);
storeDTO.setFromEnterpriseId(dto.getUnionEnterpriseId());
this.storeAuthorizationApiService.saveStore(storeDTO);
//this.storeIndexRefreshHandler.refreshStoreIndex(dto.getUnionEnterpriseId(), storeId);
}
}
if(!storeWidget.isSuccess()){
continue;
}
StoreWidgetDTO storeWidgetDTO = storeWidget.getResult();
if(storeWidgetDTO != null){
if(AuthModeEnum.YES.getCode() == storeWidgetDTO.getAuthMode()){
StoreSearchDTO storeSearchDTO = new StoreSearchDTO();
storeSearchDTO.setStoreIds(String.valueOf(storeId));
storeSearchDTO.setSearchJson(storeWidgetDTO.getSearchParam());
storeSearchDTO.setEnterpriseId(enterpriseId);
ServiceResponse<Page<StoreDTO>> response = this.storeApiService.listStore(storeSearchDTO, 1, 1);
if(!response.isSuccess()){
continue;
}
if(CollectionUtils.isNotEmpty(response.getResult().getResult())){
StoreDTO storeDTO = new StoreDTO();
storeDTO.setStoreInfoId(storeInfoId);
storeDTO.setEnterpriseId(enterpriseId);
storeDTO.setFromEnterpriseId(dto.getUnionEnterpriseId());
this.storeAuthorizationApiService.saveStore(storeDTO);
}
}
}
......
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