|
@@ -83,6 +83,9 @@ public class ProviderSearchController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private WIBrowseRecordService wiBrowseRecordService;
|
|
private WIBrowseRecordService wiBrowseRecordService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private ISearchDealerService iSearchDealerService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 车主/服务商 主界面
|
|
* 车主/服务商 主界面
|
|
* 展示首页信息
|
|
* 展示首页信息
|
|
@@ -293,6 +296,7 @@ public class ProviderSearchController extends BaseController {
|
|
Long StoreId = Long.valueOf(id);
|
|
Long StoreId = Long.valueOf(id);
|
|
ProviderDetailVo pVo = new ProviderDetailVo();
|
|
ProviderDetailVo pVo = new ProviderDetailVo();
|
|
|
|
|
|
|
|
+/*
|
|
String token_urlss = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx4d4838ebec29b8c4&secret=4fd6ca38a1261f96cbc0314c5675b95d";
|
|
String token_urlss = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx4d4838ebec29b8c4&secret=4fd6ca38a1261f96cbc0314c5675b95d";
|
|
JSONObject access_tokenss = CommonUtil.httpsRequestToJsonObject(token_urlss, "GET", null);
|
|
JSONObject access_tokenss = CommonUtil.httpsRequestToJsonObject(token_urlss, "GET", null);
|
|
System.err.println(access_tokenss);
|
|
System.err.println(access_tokenss);
|
|
@@ -300,6 +304,7 @@ public class ProviderSearchController extends BaseController {
|
|
System.out.println(access_token1);
|
|
System.out.println(access_token1);
|
|
|
|
|
|
String path = CommonUtil.getminiqrQr(access_token1.toString(), "a=" + StoreId, "picture/qrCode");
|
|
String path = CommonUtil.getminiqrQr(access_token1.toString(), "a=" + StoreId, "picture/qrCode");
|
|
|
|
+*/
|
|
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -363,7 +368,20 @@ public class ProviderSearchController extends BaseController {
|
|
pVo.setBusinessTime("今日营业时间:" + provider.getBusinessStime() + "-" + provider.getBusinessEtime());
|
|
pVo.setBusinessTime("今日营业时间:" + provider.getBusinessStime() + "-" + provider.getBusinessEtime());
|
|
pVo.setIntroduce(provider.getBusinessIntroduce()); //业务介绍
|
|
pVo.setIntroduce(provider.getBusinessIntroduce()); //业务介绍
|
|
// pVo.setMainBusiness(provider.getMianBusiness()); //主营业务
|
|
// pVo.setMainBusiness(provider.getMianBusiness()); //主营业务
|
|
- pVo.setMainBusiness(providerSearchService.mainBussinessParent(provider.getMianBusiness())); //显示父级主营业务
|
|
|
|
|
|
+ if("1".equals(roleType)){
|
|
|
|
+ pVo.setMainBusiness(providerSearchService.mainBussinessParent(provider.getMianBusiness())); //显示父级主营业务
|
|
|
|
+ }
|
|
|
|
+ if("2".equals(roleType)){
|
|
|
|
+
|
|
|
|
+ if (Objects.equals("1", provider.getParamType()) || Objects.equals("2", provider.getParamType()) || Objects.equals("3", provider.getParamType())) {
|
|
|
|
+ List<SearchDealer> list = iSearchDealerService.listLevelGroupName(provider.getId(), "4");
|
|
|
|
+ pVo.setMainBusiness(listChangeString(list));
|
|
|
|
+ }
|
|
|
|
+ if (Objects.equals("4", provider.getParamType()) || Objects.equals("5", provider.getParamType())) {
|
|
|
|
+ List<SearchDealer> list = iSearchDealerService.listLevelGroupName(provider.getId(), "3");
|
|
|
|
+ pVo.setMainBusiness(listChangeString(list));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
pVo.setName(provider.getName()); //店铺名称
|
|
pVo.setName(provider.getName()); //店铺名称
|
|
pVo.setStatus(provider.getStatus()); //是否认证 0否1是
|
|
pVo.setStatus(provider.getStatus()); //是否认证 0否1是
|
|
pVo.setPv(provider.getPv() + ""); //浏览量
|
|
pVo.setPv(provider.getPv() + ""); //浏览量
|
|
@@ -449,7 +467,7 @@ public class ProviderSearchController extends BaseController {
|
|
//前他分店数量
|
|
//前他分店数量
|
|
//品牌库
|
|
//品牌库
|
|
BrandSearchVo brandSearchVo = new BrandSearchVo();
|
|
BrandSearchVo brandSearchVo = new BrandSearchVo();
|
|
- if (provider.getBrandId() != null) {
|
|
|
|
|
|
+ if (provider.getBrandId() != null && 0 != provider.getBrandId()) {
|
|
Brand brand = brandService.selectByPrimaryKey(Integer.valueOf(provider.getBrandId()));
|
|
Brand brand = brandService.selectByPrimaryKey(Integer.valueOf(provider.getBrandId()));
|
|
BrandSearchVo.InnerShowBrand innerShowBrand = brandSearchVo.new InnerShowBrand();
|
|
BrandSearchVo.InnerShowBrand innerShowBrand = brandSearchVo.new InnerShowBrand();
|
|
innerShowBrand.setId(brand.getId() == null ? "" : brand.getId() + "");
|
|
innerShowBrand.setId(brand.getId() == null ? "" : brand.getId() + "");
|
|
@@ -1252,4 +1270,23 @@ public class ProviderSearchController extends BaseController {
|
|
return activityVo;
|
|
return activityVo;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 集合转字符串 用逗号隔开
|
|
|
|
+ *
|
|
|
|
+ * @param list
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ private String listChangeString(List<SearchDealer> list) {
|
|
|
|
+ if (CollectionUtils.isEmpty(list)) return "";
|
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
|
+ for (int i = 0; i < list.size(); i++) {
|
|
|
|
+ if (i < list.size() - 1) {
|
|
|
|
+ sb.append(list.get(i).getName()).append(",");
|
|
|
|
+ } else {
|
|
|
|
+ sb.append(list.get(i).getName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return sb.toString();
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|