Commit 1d0848f8 by zhiwj

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-store into developer

parents f53a31ab d5f9e565
......@@ -54,4 +54,21 @@ public interface StoreWidgetApiService {
ServiceResponse<Page<StoreDTO>> listStoreByStoreWidgetId(Integer enterpriseId, Integer storeWidgetId, int pageNum, int pageSize);
ServiceResponse<List<Integer>> listStoreIdByStoreWidgetId(Integer enterpriseId, Integer storeWidgetId);
/** @Description: 判断门店是否在门店控件里
* @author taogs
* @Date 11:03 2020/3/27
* @Param
* @return result true表示存在
*/
ServiceResponse exist(Integer enterpriseId, Integer storeWidgetId, Integer storeId);
/** @Description: 判断门店是否在门店控件里
* @author taogs
* @Date 11:03 2020/3/27
* @Param
* @return result true表示存在
*/
ServiceResponse exist(String enterpriseId, Integer storeWidgetId, Integer storeId);
}
......@@ -94,6 +94,32 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
return ServiceResponse.success(list);
}
@Override
public ServiceResponse exist(Integer enterpriseId, Integer storeWidgetId, Integer storeId) {
StoreWidgetDTO storeWidgetDTO = this.storeWidgetService.getStoreWidget(storeWidgetId);
if(storeWidgetDTO != null){
String authSearchParam = storeWidgetDTO.getAuthSearchParam();
String searchParam = storeWidgetDTO.getSearchParam();
StoreSearchDTO dto = new StoreSearchDTO();
dto.setEnterpriseId(enterpriseId);
if(StringUtils.isNotBlank(authSearchParam) && !"{}".equals(authSearchParam)){
dto.setAuthSearchJson(authSearchParam);
}
dto.setSearchJson(searchParam);
dto.setStoreIds(storeId+"");
ServiceResponse<Long> response = this.storeApiService.queryStoreCountFromES(dto);
if(response.isSuccess() && response.getResult() > 0){
return ServiceResponse.success(true);
}
}
return ServiceResponse.success(false);
}
@Override
public ServiceResponse exist(String enterpriseId, Integer storeWidgetId, Integer storeId) {
return this.exist(Integer.valueOf(enterpriseId), storeWidgetId, storeId);
}
private void getStoreId(Integer enterpriseId, Integer storeWidgetId, int pageNum, List<Integer> list){
ServiceResponse<Page<StoreDTO>> response = this.listStoreByStoreWidgetId(enterpriseId, storeWidgetId, pageNum, 10000);
if(response.isSuccess() && response.getResult() != null){
......
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