Browse Source

Merge remote-tracking branch 'origin/master'

wuzhiqiang 5 years ago
parent
commit
6a459b28e3

+ 0 - 19
src/main/java/com/yc/education/controller/DealerSearchController.java

@@ -1192,23 +1192,4 @@ public class DealerSearchController extends BaseController {
         return new ApiMessage<>(false, AppConst.FAIL_CODE, AppConst.FAIL_MSG);
     }
 
-
-    /**
-     * 集合转字符串 用逗号隔开
-     *
-     * @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();
-    }
 }

+ 39 - 2
src/main/java/com/yc/education/controller/ProviderSearchController.java

@@ -83,6 +83,9 @@ public class ProviderSearchController extends BaseController {
     @Autowired
     private WIBrowseRecordService wiBrowseRecordService;
 
+    @Autowired
+    private ISearchDealerService iSearchDealerService;
+
     /**
      * 车主/服务商 主界面
      * 展示首页信息
@@ -293,6 +296,7 @@ public class ProviderSearchController extends BaseController {
         Long StoreId = Long.valueOf(id);
         ProviderDetailVo pVo = new ProviderDetailVo();
 
+/*
         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);
         System.err.println(access_tokenss);
@@ -300,6 +304,7 @@ public class ProviderSearchController extends BaseController {
         System.out.println(access_token1);
 
         String path = CommonUtil.getminiqrQr(access_token1.toString(), "a=" + StoreId, "picture/qrCode");
+*/
 
 
         try {
@@ -363,7 +368,20 @@ public class ProviderSearchController extends BaseController {
             pVo.setBusinessTime("今日营业时间:" + provider.getBusinessStime() + "-" + provider.getBusinessEtime());
             pVo.setIntroduce(provider.getBusinessIntroduce());  //业务介绍
             // 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.setStatus(provider.getStatus());        //是否认证 0否1是
             pVo.setPv(provider.getPv() + "");    //浏览量
@@ -449,7 +467,7 @@ public class ProviderSearchController extends BaseController {
             //前他分店数量
             //品牌库
             BrandSearchVo brandSearchVo = new BrandSearchVo();
-            if (provider.getBrandId() != null) {
+            if (provider.getBrandId() != null && 0 != provider.getBrandId()) {
                 Brand brand = brandService.selectByPrimaryKey(Integer.valueOf(provider.getBrandId()));
                 BrandSearchVo.InnerShowBrand innerShowBrand = brandSearchVo.new InnerShowBrand();
                 innerShowBrand.setId(brand.getId() == null ? "" : brand.getId() + "");
@@ -1252,4 +1270,23 @@ public class ProviderSearchController extends BaseController {
         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();
+    }
+
 }

+ 1 - 1
src/main/java/com/yc/education/controller/ServiceCategoryController.java

@@ -69,7 +69,7 @@ public class ServiceCategoryController {
 
         try {
             //单向件两层 , 其他三层
-            if ("汽车用品".equals(name) || "汽保设备与工具".equals(name) || "单向件".equals(name)) {
+            if ("用品改装".equals(name) || "汽保设备与工具".equals(name) || "单向件".equals(name)) {
 
                 ThreeLayersVo tvo = new ThreeLayersVo();
                 tvo.setName(name);

+ 15 - 0
src/main/java/com/yc/education/controller/admin/CarSedanAdminController.java

@@ -165,6 +165,21 @@ public class CarSedanAdminController {
         return result;
     }
 
+
+    /**
+     * @Description: 轿车车系列表(欧系、日系)
+     * @Author: BlueSky
+     * @CreateTime: 2019/9/26 16:59
+     */
+    @RequestMapping("carSedanSeriesList.html")
+    public ModelAndView carSedanSeriesList() {
+        ModelAndView result = new ModelAndView();
+
+        List<CarSedan> carSedanList  =  iCarSedanService.listCarSedanByCountry();
+        result.addObject("pageInfo", new PageInfo<CarSedan>(carSedanList));
+        return result;
+    }
+
     /**
     * @Description: 汽车log导入页面
     * @Author: BlueSky

+ 19 - 0
src/main/java/com/yc/education/service/impl/ProviderServiceImpl.java

@@ -173,6 +173,16 @@ public class ProviderServiceImpl extends BaseService<Provider> implements IProvi
         String[] split = mainBusiness.split(",+");
         for (String s : split) {
             CarSedan carSedan = iCarSedanService.getCarSedan(null, s);
+
+            SearchDealer searchDealer0 = new SearchDealer();
+            searchDealer0.setServiceId(null);
+            searchDealer0.setStoreId(storeId);
+            searchDealer0.setLevel("4");
+            searchDealer0.setType("4");
+            searchDealer0.setName("汽车配件");
+            list.add(searchDealer0);
+
+
             SearchDealer searchDealer = new SearchDealer();
             searchDealer.setServiceId(null);
             searchDealer.setStoreId(storeId);
@@ -212,6 +222,14 @@ public class ProviderServiceImpl extends BaseService<Provider> implements IProvi
         for (String s : split) {
             CarCommercial carCommercial = iCarCommerialService.getCarCommercial(null, s);
 
+            SearchDealer searchDealer0 = new SearchDealer();
+            searchDealer0.setServiceId(null);
+            searchDealer0.setStoreId(storeId);
+            searchDealer0.setLevel("4");
+            searchDealer0.setType("5");
+            searchDealer0.setName("商用车");
+            list.add(searchDealer0);
+
             SearchDealer searchDealer = new SearchDealer();
             searchDealer.setServiceId(null);
             searchDealer.setStoreId(storeId);
@@ -234,6 +252,7 @@ public class ProviderServiceImpl extends BaseService<Provider> implements IProvi
             searchDealer2.setLevel("1");
             searchDealer2.setType("5");
             searchDealer2.setName(carCommercial.getEnginetype());
+
             list.add(searchDealer2);
 
             searchDealerMapper.insertList(list);

+ 96 - 0
src/main/webapp/WEB-INF/jsp/admin/carSedanSeriesList.jsp

@@ -0,0 +1,96 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>后台管理</title>
+
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/admin/index/h-ui/css/H-ui.min.css"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/admin/index/h-ui.admin/css/H-ui.admin.css"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/admin/index/Hui-iconfont/1.0.8/iconfont.css"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/admin/index/h-ui.admin/skin/default/skin.css" id="skin"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/admin/index/h-ui.admin/css/style.css"/>
+    <link href="${pageContext.request.contextPath}/static/admin/css/page.css" rel="stylesheet" type="text/css"/>
+    <script type="text/javascript"
+            src="${pageContext.request.contextPath}/static/admin/index/jquery/1.9.1/jquery.min.js"></script>
+    <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/index/layer/layer.js"></script>
+    <script type="text/javascript"
+            src="${pageContext.request.contextPath}/static/admin/index/h-ui/js/H-ui.min.js"></script>
+    <script type="text/javascript"
+            src="${pageContext.request.contextPath}/static/admin/index/h-ui.admin/js/H-ui.admin.js"></script>
+</head>
+<body>
+<nav class="breadcrumb">
+    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
+       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
+</nav>
+<div class="page-container">
+    <div class="cl pd-5 bg-1 bk-gray mt-20">
+        <span class="r">共有数据:<strong>${pageInfo.total }</strong> 条</span>
+    </div>
+
+
+    <div class="mt-20">
+        <table class="table table-border table-bordered table-bg table-hover table-sort">
+            <thead>
+            <tr class="text-c">
+                <th width="120">车系</th>
+                <th width="120">图标</th>
+            </tr>
+            </thead>
+            <tbody>
+            <c:forEach items="${pageInfo.list }" var="item">
+                <tr class="text-c">
+                    <td >${item.country}</td>
+                    <td><img src="/nvrnetwork/upload/car/${item.country}.jpg" style="width: 50px;height: 50px"></td>
+                </tr>
+            </c:forEach>
+            </tbody>
+        </table>
+    </div>
+
+    <%--<div id="PageNum">--%>
+        <%--<section>--%>
+            <%--<div class="bd points-goods-list">--%>
+                <%--<ul class="pages">--%>
+                    <%--<li><a href="carSedanLogList.html?pageNum=1&pageSize=${pageSize}">首页</a></li>--%>
+                    <%--<li class="prev"><a--%>
+                            <%--href="carSedanLogList.html?pageNum=${pageInfo.prePage}&pageSize=${pageSize}">上一页</a>--%>
+                    <%--</li>--%>
+                    <%--<c:forEach items="${pageInfo.navigatepageNums}" var="nav">--%>
+                        <%--<c:if test="${nav == pageInfo.pageNum}">--%>
+                            <%--<li><a href="carSedanLogList.html?pageNum=${nav}&pageSize=${pageSize}"--%>
+                                   <%--class="active">${nav}</a></li>--%>
+                        <%--</c:if>--%>
+                        <%--<c:if test="${nav != pageInfo.pageNum}">--%>
+                            <%--<li>--%>
+                                <%--<a href="carSedanLogList.html?pageNum=${nav}&pageSize=${pageSize}">${nav}</a>--%>
+                            <%--</li>--%>
+                        <%--</c:if>--%>
+                    <%--</c:forEach>--%>
+                    <%--<li class="next"><a--%>
+                            <%--href="carSedanLogList.html?pageNum=${pageInfo.nextPage}&pageSize=${pageSize}">下一页</a>--%>
+                    <%--</li>--%>
+                    <%--<li>--%>
+                        <%--<a href="carSedanLogList.html?pageNum=${pageInfo.pages }&pageSize=${pageSize}">末页</a>--%>
+                    <%--</li>--%>
+                <%--</ul>--%>
+            <%--</div>--%>
+        <%--</section>--%>
+    <%--</div>--%>
+</div>
+</div>
+<script type="text/javascript">
+
+
+</script>
+</body>
+</html>

+ 2 - 1
src/main/webapp/WEB-INF/jsp/admin/index.jsp

@@ -200,8 +200,9 @@
 						<li><a data-href="carSedanExcel.html" data-title="轿车导入" href="javascript:void(0)">轿车导入</a></li>
 						<li><a data-href="carCommercialList.html" data-title="商用车列表" href="javascript:void(0)">商用车列表</a></li>
 						<li><a data-href="carCommercialLogList.html" data-title="商用车品牌列表" href="javascript:void(0)">商用车品牌列表</a></li>
+						<li><a data-href="carSedanSeriesList.html" data-title="车系列表" href="javascript:void(0)">车系列表</a></li>
 						<li><a data-href="carCommercialExcel.html" data-title="商用车导入" href="javascript:void(0)">商用车导入</a></li>
-						<li><a data-href="carSedanImg.html" data-title="汽车品牌图片导入" href="javascript:void(0)">汽车品牌图片导入</a></li>
+						<li><a data-href="carSedanImg.html" data-title="图片导入" href="javascript:void(0)">图片导入</a></li>
 					</ul>
 				</dd>
 			</dl>