Commit ebd1de8e by 陶光胜

Merge branch 'developer' into 'master'

Developer

See merge request !21
parents 32ded434 27a70a55
......@@ -78,4 +78,12 @@ public interface StoreWidgetApiService {
* @return result true表示存在
*/
ServiceResponse exist(String enterpriseId, Integer storeWidgetId, Integer storeId);
/** @Description: 判断门店是否在门店控件里
* @author taogs
* @Date 11:03 2020/3/27
* @Param
* @return result true表示存在
*/
ServiceResponse existByStoreInfoId(Integer enterpriseId, Integer storeWidgetId, Integer storeInfoId);
}
......@@ -3,6 +3,7 @@ package com.gic.store.service.outer.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Constant;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.*;
......@@ -785,6 +786,7 @@ public class StoreApiServiceImpl implements StoreApiService {
storeSearchDTO.setLatitude(wxSearchStoreSearchDTO.getLatitude());
storeSearchDTO.setCityId(wxSearchStoreSearchDTO.getCityId());
storeSearchDTO.setStoreResourceList(wxSearchStoreSearchDTO.getStoreWidgetIdList());
storeSearchDTO.setStatus(com.gic.enterprise.constants.Constants.NORMAL_STATUS);
ServiceResponse<Page<StoreDTO>> storePage = this.listStore(storeSearchDTO, wxSearchStoreSearchDTO.getPageNum(), wxSearchStoreSearchDTO.getPageSize());
logger.info("pageCoupApplyStore:{}", JSON.toJSONString(storePage, true));
return ServiceResponse.success(storePage.getResult());
......
......@@ -212,6 +212,26 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
return this.exist(Integer.valueOf(enterpriseId), storeWidgetId, storeId);
}
@Override
public ServiceResponse existByStoreInfoId(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);
}
private void getStoreId(Integer enterpriseId, Integer storeWidgetId, int pageNum, List<Integer> list){
ServiceResponse<Page<Integer>> response = this.listStoreIdByStoreWidgetId(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