Commit 16a29a52 by zhiwj

判断storeInfoId在不在门店控件中

parent 27a70a55
......@@ -77,8 +77,17 @@ public interface StoreWidgetApiService {
* @Param
* @return result true表示存在
*/
ServiceResponse existStoreInfoId(Integer enterpriseId, Integer storeWidgetId, Integer storeInfoId);
/** @Description: 判断门店是否在门店控件里
* @author taogs
* @Date 11:03 2020/3/27
* @Param
* @return result true表示存在
*/
ServiceResponse exist(String enterpriseId, Integer storeWidgetId, Integer storeId);
/** @Description: 判断门店是否在门店控件里
* @author taogs
* @Date 11:03 2020/3/27
......
......@@ -208,6 +208,27 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
}
@Override
public ServiceResponse existStoreInfoId(Integer enterpriseId, Integer storeWidgetId, Integer storeInfoId) {
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.setStoreInfoIds(storeInfoId+"");
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);
}
......
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