Selaa lähdekoodia

1.汽车品牌筛选,未上传图片列表。
2.服务类别查询子类

2510966293@qq.com 5 vuotta sitten
vanhempi
commit
6592192bae

+ 20 - 0
src/main/java/com/yc/education/controller/BaseController.java

@@ -10,6 +10,7 @@ import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 
 import javax.servlet.http.HttpServletRequest;
+import java.io.File;
 import java.util.Random;
 import java.util.UUID;
 
@@ -138,4 +139,23 @@ public class BaseController {
         return sms;
     }
 
+    /**
+    * @Description: 判断图片是否存在
+    * @Author: BlueSky
+    * @CreateTime: 2019/10/17 11:29
+    */
+    public static boolean getImgExist(String name,HttpServletRequest request){
+        try {
+            String path = request.getSession().getServletContext().getRealPath("/")+"/upload/car/";
+            File file = new File(path+name+".png");
+            if (file.exists()) {
+                return true;
+            }else {
+                return false;
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+            return false;
+        }
+    }
 }

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

@@ -428,7 +428,7 @@ public class ServiceCategoryController {
                 ServiceCategoryVo.ContainItem containItem = vo.new ContainItem();
                 containItem.setId(serviceCategory.getId() + "");
                 containItem.setTitle(serviceCategory.getName());
-                List<ServiceCategory> serviceCategories1 = serviceCategoryMapper.listServiceCategoryByPid(serviceCategory.getId());
+                List<ServiceCategory> serviceCategories1 = iServiceCategoryService.listServiceCategoryByPid(serviceCategory.getId());
                 List<Object> list = new ArrayList<>();
                 for (ServiceCategory category : serviceCategories1) {
                     list.add(category);

+ 43 - 6
src/main/java/com/yc/education/controller/admin/CarCommerialAdminController.java

@@ -1,6 +1,7 @@
 package com.yc.education.controller.admin;
 
 import com.github.pagehelper.PageInfo;
+import com.yc.education.controller.BaseController;
 import com.yc.education.model.CarCommercial;
 import com.yc.education.model.CarSedan;
 import com.yc.education.service.ICarCommerialService;
@@ -28,9 +29,7 @@ import java.io.InputStream;
 import java.math.BigDecimal;
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * @Author: BlueSky
@@ -39,7 +38,7 @@ import java.util.List;
  */
 @Controller
 @RequestMapping("admin")
-public class CarCommerialAdminController {
+public class CarCommerialAdminController extends BaseController {
     @Autowired
     ICarCommerialService iCarCommerialService;
 
@@ -154,18 +153,56 @@ public class CarCommerialAdminController {
      */
     @RequestMapping("carCommercialLogList.html")
     public ModelAndView carCommercialLogList(
+            @RequestParam(required = false, defaultValue = "") String initials,
             @RequestParam(required = false, defaultValue = "1") int pageNum,
             @RequestParam(required = false, defaultValue = "10") int pageSize) {
         ModelAndView result = new ModelAndView();
 
-        List<CarCommercial> carCommercialList  =  iCarCommerialService.listCarCommercialByBrand("","",pageNum,pageSize);
-        result.addObject("pageInfo", new PageInfo<CarCommercial>(carCommercialList));
+
+        List<CarCommercial> carCommercialListResult  =  iCarCommerialService.listCarCommercialByBrand(null,initials,pageNum,pageSize);
+        // 计算品牌首字母
+        List<CarCommercial> carCommercialList  =  iCarCommerialService.listCarCommercialByBrand(null,null,1,300);
+        List<String> letterList = new ArrayList<>();
+        Set<String> set = new HashSet<>();
+        if (carCommercialList != null && carCommercialList.size()>0){
+            String letter ;
+            for (CarCommercial car : carCommercialList) {
+                letter = PinYin2Abbreviation.cn2py(car.getBrand().substring(0, 1)).toUpperCase();
+                if(set.add(letter)){
+                    letterList.add(letter);
+                }
+            }
+        }
+        Collections.sort(letterList);
+        result.addObject("letterList", letterList);
+        result.addObject("initials", initials);
+        result.addObject("pageInfo", new PageInfo<CarCommercial>(carCommercialListResult));
         result.addObject("pageNum", pageNum);
         result.addObject("pageSize", pageSize);
 
         return result;
     }
 
+    /**
+     * @Description: 查询未上传logo的品牌
+     * @Author: BlueSky
+     * @CreateTime: 2019/10/17 11:36
+     */
+    @RequestMapping("carCommercialNotLogList.html")
+    public ModelAndView carSedanNotLogList(HttpServletRequest request) {
+        ModelAndView result = new ModelAndView();
+        List<CarCommercial> carCommercialList  =  iCarCommerialService.listCarCommercialByBrand(null,null,1,1000);
+        List<CarCommercial> list = new ArrayList<>();
+        for (CarCommercial car : carCommercialList) {
+            if(!getImgExist(car.getBrand(),request)){
+                list.add(car);
+            }
+        }
+        result.addObject("pageInfo", new PageInfo<CarCommercial>(list));
+
+        return result;
+    }
+
     // 进入导入数据 页面
     @RequestMapping("carCommercialExcel.html")
     public ModelAndView carCommercialExcel() {

+ 43 - 6
src/main/java/com/yc/education/controller/admin/CarSedanAdminController.java

@@ -1,6 +1,8 @@
 package com.yc.education.controller.admin;
 
+import com.alipay.api.domain.Car;
 import com.github.pagehelper.PageInfo;
+import com.yc.education.controller.BaseController;
 import com.yc.education.model.CarSedan;
 import com.yc.education.service.ICarSedanService;
 import com.yc.education.util.AjaxMessage;
@@ -26,9 +28,7 @@ import java.io.InputStream;
 import java.math.BigDecimal;
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * @Author: BlueSky
@@ -37,7 +37,7 @@ import java.util.List;
  */
 @Controller
 @RequestMapping("admin")
-public class CarSedanAdminController {
+public class CarSedanAdminController extends BaseController {
     @Autowired
     ICarSedanService iCarSedanService;
 
@@ -153,18 +153,55 @@ public class CarSedanAdminController {
      */
     @RequestMapping("carSedanLogList.html")
     public ModelAndView carSedanLogList(
+            @RequestParam(required = false, defaultValue = "") String initials,
             @RequestParam(required = false, defaultValue = "1") int pageNum,
             @RequestParam(required = false, defaultValue = "10") int pageSize) {
         ModelAndView result = new ModelAndView();
 
-        List<CarSedan> carSedanList  =  iCarSedanService.listCarSedanByBrand("","",pageNum,pageSize);
-        result.addObject("pageInfo", new PageInfo<CarSedan>(carSedanList));
+        List<CarSedan> carSedanListResult  =  iCarSedanService.listCarSedanByBrand(null,initials,pageNum,pageSize);
+        // 计算品牌首字母
+        List<CarSedan> carSedanList  =  iCarSedanService.listCarSedanByBrand(null,null,1,300);
+        List<String> letterList = new ArrayList<>();
+        Set<String> set = new HashSet<>();
+        if (carSedanList != null && carSedanList.size()>0){
+            String letter ;
+            for (CarSedan car : carSedanList) {
+                letter = PinYin2Abbreviation.cn2py(car.getBrand().substring(0, 1)).toUpperCase();
+                if(set.add(letter)){
+                    letterList.add(letter);
+                }
+            }
+        }
+        Collections.sort(letterList);
+        result.addObject("letterList", letterList);
+        result.addObject("initials", initials);
+        result.addObject("pageInfo", new PageInfo<CarSedan>(carSedanListResult));
         result.addObject("pageNum", pageNum);
         result.addObject("pageSize", pageSize);
 
         return result;
     }
 
+    /**
+    * @Description: 查询未上传logo的品牌
+    * @Author: BlueSky
+    * @CreateTime: 2019/10/17 11:36
+    */
+    @RequestMapping("carSedanNotLogList.html")
+    public ModelAndView carSedanNotLogList(HttpServletRequest request) {
+        ModelAndView result = new ModelAndView();
+        List<CarSedan> carSedanList  =  iCarSedanService.listCarSedanByBrand(null,null,1,300);
+        List<CarSedan> list = new ArrayList<>();
+        for (CarSedan car : carSedanList) {
+            if(!getImgExist(car.getBrand(),request)){
+                list.add(car);
+            }
+        }
+        result.addObject("pageInfo", new PageInfo<CarSedan>(list));
+
+        return result;
+    }
+
 
     /**
      * @Description: 轿车车系列表(欧系、日系)

+ 46 - 0
src/main/java/com/yc/education/controller/admin/ServiceCategoryAdminController.java

@@ -326,6 +326,52 @@ public class ServiceCategoryAdminController {
         return new ModelAndView();
     }
 
+    /**
+    * @Description: 查询子类服务
+    * @Author: BlueSky
+    * @CreateTime: 2019/10/17 9:40
+    */
+    @RequestMapping("serviceCategoryPidList.html")
+    public ModelAndView serviceCategoryPidList(
+            @RequestParam(required = false,defaultValue = "") Integer pid,
+            @RequestParam(required = false,defaultValue = "") String  title,
+            @RequestParam(required = false, defaultValue = "1") int page,
+            @RequestParam(required = false, defaultValue = "10") int rows) {
+
+        ModelAndView result = new ModelAndView();
+
+        // 结果信息
+        List<ServiceCategory> listAllSecondService  =  iServiceCategoryService.listServiceCategoryByPid(pid,title,page,rows);
+
+        List<ServiceCategory> listServiceTwo  =  iServiceCategoryService.listAllSecondService(null,null,null,1,Integer.MAX_VALUE);//查询二、三级分类
+
+
+        for (ServiceCategory one : listAllSecondService) {
+            // 下面是否还有分类
+            List<ServiceCategory> list = iServiceCategoryService.listServiceCategoryByPid(one.getId());
+            if(list != null && list.size()>0){
+                one.setHaveList(true);
+            }else {
+                one.setHaveList(false);
+            }
+            // 二、三级分类
+            for (ServiceCategory two : listServiceTwo) {
+                if(one.getpId().toString().equals(two.getId().toString())){
+                    one.setTypeStr(two.getName());
+                    break;
+                }
+            }
+        }
+
+        result.addObject("pageInfo", new PageInfo<ServiceCategory>(listAllSecondService));
+        result.addObject("title", title);
+        result.addObject("pid", pid);
+        result.addObject("page", page);
+        result.addObject("rows", rows);
+
+        return result;
+    }
+
     //=================   适用poi导入表格数据   ===========================
 
 

+ 7 - 7
src/main/java/com/yc/education/mapper/ServiceCategoryMapper.java

@@ -12,6 +12,13 @@ import java.util.List;
  */
 public interface ServiceCategoryMapper extends MyMapper<ServiceCategory> {
 
+    /**
+    * @Description: 根据pid查询子类
+    * @Author: BlueSky
+    * @CreateTime: 2019/10/17 10:11
+    */
+    List<ServiceCategory> listServiceCategoryByPid(@Param("pid") Integer pid,@Param("title") String title);
+
     /**
      * 后台管理 查询一级服务
      * wzq  2019/9/6
@@ -77,13 +84,6 @@ public interface ServiceCategoryMapper extends MyMapper<ServiceCategory> {
      */
     int deleteByRepeat(@Param("list") List<String> list);
 
-    /**
-     * 根据pid查询
-     *
-     * @param pid 父id
-     * @return
-     */
-    List<ServiceCategory> listServiceCategoryByPid(Integer pid);
 
     /**
      * 根据 类型名称查询 单条信息

+ 7 - 0
src/main/java/com/yc/education/service/IServiceCategoryService.java

@@ -97,6 +97,13 @@ public interface IServiceCategoryService extends IService<ServiceCategory>{  //
 
     List<ServiceCategory> listServiceCategoryByPid(Integer id);
 
+    /**
+     * @Description: 根据pid查询子类
+     * @Author: BlueSky
+     * @CreateTime: 2019/10/17 10:11
+     */
+    List<ServiceCategory> listServiceCategoryByPid(Integer pid,String title,Integer page,Integer rows);
+
     /**
      * 保证服务名称唯一性
      * @param name

+ 12 - 1
src/main/java/com/yc/education/service/impl/ServiceCategoryServiceImpl.java

@@ -181,7 +181,18 @@ public class ServiceCategoryServiceImpl extends BaseService<ServiceCategory> imp
 
     @Override
     public List<ServiceCategory> listServiceCategoryByPid(Integer id) {
-        return serviceCategoryMapper.listServiceCategoryByPid(id);
+        return serviceCategoryMapper.listServiceCategoryByPid(id,null);
+    }
+
+    @Override
+    public List<ServiceCategory> listServiceCategoryByPid(Integer pid, String title, Integer page, Integer rows) {
+        try {
+            PageHelper.startPage(page,rows);
+            return serviceCategoryMapper.listServiceCategoryByPid(pid,title);
+        }catch (Exception e){
+            e.printStackTrace();
+            return null;
+        }
     }
 
     /**

+ 6 - 0
src/main/java/com/yc/education/util/AppConst.java

@@ -5,6 +5,12 @@ import java.io.IOException;
 
 public class AppConst {
 
+    /**
+    * @Description: 项目网址
+    * @Author: BlueSky
+    * @CreateTime: 2019/10/17 11:31
+    */
+    public static final String Website = "http://fujinyc.shjieguan.com/";
     /**
      * 请求成功代码
      */

+ 14 - 5
src/main/resources/mapper/WServiceCategorymapper.xml

@@ -18,6 +18,20 @@
         <result column="create_date" property="createDate" jdbcType="TIMESTAMP"/>
         <result column="modified_date" property="modifiedDate" jdbcType="TIMESTAMP"/>
     </resultMap>
+
+    <!-- 根据pid查询子类 -->
+    <select id="listServiceCategoryByPid" resultMap="ServiceTypeResultMap">
+        select * from service_category
+        <where>
+            <if test="pid != null and '' != pid">
+                and p_id=#{pid}
+            </if>
+            <if test="title != null and '' != title">
+                and `name` like concat ('%',#{title},'%')
+            </if>
+        </where>
+    </select>
+
     <!-- 添加集合数据 -->
     <insert id="addByList" useGeneratedKeys="true" parameterType="java.util.List">
         insert into
@@ -91,11 +105,6 @@
         order by p_sort desc
     </select>
 
-    <!-- 根据pid查询 -->
-    <select id="listServiceCategoryByPid" resultMap="ServiceTypeResultMap">
-        select * from service_category where p_id = #{pid}
-    </select>
-
     <select id="getServiceCategoryByName" resultMap="ServiceTypeResultMap">
         select * from service_category
         <where>

+ 16 - 7
src/main/webapp/WEB-INF/jsp/admin/carCommercialLogList.jsp

@@ -37,18 +37,27 @@
         <span class="r">共有数据:<strong>${pageInfo.total }</strong> 条</span>
     </div>
 
+    <div class="mt-20" style="font-size: large;">
+        品牌字母快速查找:
+        <c:forEach items="${letterList}" var="letter">
+            <a href="carCommercialLogList.html?initials=${letter}"  <c:if test="${letter==initials}">style="color:white;background-color:orange;padding: 5px 10px;font-size: large;text-decoration: none"</c:if>  style="font-size: large;padding: 5px 10px;text-decoration: none">${letter}</a>
+        </c:forEach>
+        <a href="carCommercialNotLogList.html"><button class="btn btn-success" type="button" style="float: right"><i class="Hui-iconfont">&#xe684;</i> 待上传Logo列表</button></a>
+    </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="30">序号</th>
                 <th width="120">品牌</th>
                 <th width="120">图标</th>
             </tr>
             </thead>
             <tbody>
-            <c:forEach items="${pageInfo.list }" var="item">
+            <c:forEach items="${pageInfo.list }" var="item"  varStatus="status">
                 <tr class="text-c">
+                    <td >${status.index+1}</td>
                     <td >${item.brand}</td>
                     <td><img src="/nvrnetwork/upload/car/${item.brand}.png" style="width: 50px;height: 50px"></td>
                 </tr>
@@ -61,26 +70,26 @@
         <section>
             <div class="bd points-goods-list">
                 <ul class="pages">
-                    <li><a href="carCommercialLogList.html?pageNum=1&pageSize=${pageSize}">首页</a></li>
+                    <li><a href="carCommercialLogList.html?initials=${initials}&pageNum=1&pageSize=${pageSize}">首页</a></li>
                     <li class="prev"><a
-                            href="carCommercialLogList.html?pageNum=${pageInfo.prePage}&pageSize=${pageSize}">上一页</a>
+                            href="carCommercialLogList.html?initials=${initials}&pageNum=${pageInfo.prePage}&pageSize=${pageSize}">上一页</a>
                     </li>
                     <c:forEach items="${pageInfo.navigatepageNums}" var="nav">
                         <c:if test="${nav == pageInfo.pageNum}">
-                            <li><a href="carCommercialLogList.html?pageNum=${nav}&pageSize=${pageSize}"
+                            <li><a href="carCommercialLogList.html?initials=${initials}&pageNum=${nav}&pageSize=${pageSize}"
                                    class="active">${nav}</a></li>
                         </c:if>
                         <c:if test="${nav != pageInfo.pageNum}">
                             <li>
-                                <a href="carCommercialLogList.html?pageNum=${nav}&pageSize=${pageSize}">${nav}</a>
+                                <a href="carCommercialLogList.html?initials=${initials}&pageNum=${nav}&pageSize=${pageSize}">${nav}</a>
                             </li>
                         </c:if>
                     </c:forEach>
                     <li class="next"><a
-                            href="carCommercialLogList.html?pageNum=${pageInfo.nextPage}&pageSize=${pageSize}">下一页</a>
+                            href="carCommercialLogList.html?initials=${initials}&pageNum=${pageInfo.nextPage}&pageSize=${pageSize}">下一页</a>
                     </li>
                     <li>
-                        <a href="carCommercialLogList.html?pageNum=${pageInfo.pages }&pageSize=${pageSize}">末页</a>
+                        <a href="carCommercialLogList.html?initials=${initials}&pageNum=${pageInfo.pages }&pageSize=${pageSize}">末页</a>
                     </li>
                 </ul>
             </div>

+ 69 - 0
src/main/webapp/WEB-INF/jsp/admin/carCommercialNotLogList.jsp

@@ -0,0 +1,69 @@
+<%@ 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="mt-20">
+    <a href="javascript:history.back(-1)"><button class="btn btn-success" type="button" style="float: right;margin-right: 20px;"><i class="Hui-iconfont">&#xe66b;</i> 返回</button></a>
+</div>
+<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="30">序号</th>
+                <th width="120">品牌</th>
+                <th width="120">图标</th>
+            </tr>
+            </thead>
+            <tbody>
+            <c:forEach items="${pageInfo.list }" var="item"  varStatus="status">
+                <tr class="text-c">
+                    <td >${status.index+1}</td>
+                    <td >${item.brand}</td>
+                    <td><img src="/nvrnetwork/upload/car/${item.brand}.png" style="width: 50px;height: 50px"></td>
+                </tr>
+            </c:forEach>
+            </tbody>
+        </table>
+    </div>
+</div>
+</div>
+<script type="text/javascript">
+
+
+</script>
+</body>
+</html>

+ 16 - 8
src/main/webapp/WEB-INF/jsp/admin/carSedanLogList.jsp

@@ -36,19 +36,27 @@
     <div class="cl pd-5 bg-1 bk-gray mt-20">
         <span class="r">共有数据:<strong>${pageInfo.total }</strong> 条</span>
     </div>
-
+    <div class="mt-20" style="font-size: large;">
+        品牌字母快速查找:
+        <c:forEach items="${letterList}" var="letter">
+            <a href="carSedanLogList.html?initials=${letter}"  <c:if test="${letter==initials}">style="color:white;background-color:orange;padding: 5px 10px;font-size: large;text-decoration: none"</c:if>  style="font-size: large;padding: 5px 10px;text-decoration: none">${letter}</a>
+        </c:forEach>
+        <a href="carSedanNotLogList.html"><button class="btn btn-success" type="button" style="float: right"><i class="Hui-iconfont">&#xe684;</i> 待上传Logo列表</button></a>
+    </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="30">序号</th>
                 <th width="120">品牌</th>
                 <th width="120">图标</th>
             </tr>
             </thead>
             <tbody>
-            <c:forEach items="${pageInfo.list }" var="item">
+            <c:forEach items="${pageInfo.list }" var="item"  varStatus="status">
                 <tr class="text-c">
+                    <td >${status.index+1}</td>
                     <td >${item.brand}</td>
                     <td><img src="/nvrnetwork/upload/car/${item.brand}.png" style="width: 50px;height: 50px"></td>
                 </tr>
@@ -61,26 +69,26 @@
         <section>
             <div class="bd points-goods-list">
                 <ul class="pages">
-                    <li><a href="carSedanLogList.html?pageNum=1&pageSize=${pageSize}">首页</a></li>
+                    <li><a href="carSedanLogList.html?initials=${initials}&pageNum=1&pageSize=${pageSize}">首页</a></li>
                     <li class="prev"><a
-                            href="carSedanLogList.html?pageNum=${pageInfo.prePage}&pageSize=${pageSize}">上一页</a>
+                            href="carSedanLogList.html?initials=${initials}&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}"
+                            <li><a href="carSedanLogList.html?initials=${initials}&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>
+                                <a href="carSedanLogList.html?initials=${initials}&pageNum=${nav}&pageSize=${pageSize}">${nav}</a>
                             </li>
                         </c:if>
                     </c:forEach>
                     <li class="next"><a
-                            href="carSedanLogList.html?pageNum=${pageInfo.nextPage}&pageSize=${pageSize}">下一页</a>
+                            href="carSedanLogList.html?initials=${initials}&pageNum=${pageInfo.nextPage}&pageSize=${pageSize}">下一页</a>
                     </li>
                     <li>
-                        <a href="carSedanLogList.html?pageNum=${pageInfo.pages }&pageSize=${pageSize}">末页</a>
+                        <a href="carSedanLogList.html?initials=${initials}&pageNum=${pageInfo.pages }&pageSize=${pageSize}">末页</a>
                     </li>
                 </ul>
             </div>

+ 69 - 0
src/main/webapp/WEB-INF/jsp/admin/carSedanNotLogList.jsp

@@ -0,0 +1,69 @@
+<%@ 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="mt-20">
+    <a href="javascript:history.back(-1)"><button class="btn btn-success" type="button" style="float: right;margin-right: 20px;"><i class="Hui-iconfont">&#xe66b;</i> 返回</button></a>
+</div>
+<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="30">序号</th>
+                <th width="120">品牌</th>
+                <th width="120">图标</th>
+            </tr>
+            </thead>
+            <tbody>
+            <c:forEach items="${pageInfo.list }" var="item"  varStatus="status">
+                <tr class="text-c">
+                    <td >${status.index+1}</td>
+                    <td >${item.brand}</td>
+                    <td><img src="/nvrnetwork/upload/car/${item.brand}.png" style="width: 50px;height: 50px"></td>
+                </tr>
+            </c:forEach>
+            </tbody>
+        </table>
+    </div>
+</div>
+</div>
+<script type="text/javascript">
+
+
+</script>
+</body>
+</html>

+ 3 - 30
src/main/webapp/WEB-INF/jsp/admin/carSedanSeriesList.jsp

@@ -42,13 +42,15 @@
         <table class="table table-border table-bordered table-bg table-hover table-sort">
             <thead>
             <tr class="text-c">
+                <th width="30">序号</th>
                 <th width="120">车系</th>
                 <th width="120">图标</th>
             </tr>
             </thead>
             <tbody>
-            <c:forEach items="${pageInfo.list }" var="item">
+            <c:forEach items="${pageInfo.list }" var="item"  varStatus="status">
                 <tr class="text-c">
+                    <td >${status.index+1}</td>
                     <td >${item.country}</td>
                     <td><img src="/nvrnetwork/upload/car/${item.country}.png" style="width: 50px;height: 50px"></td>
                 </tr>
@@ -57,35 +59,6 @@
         </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">

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

@@ -112,7 +112,7 @@
                     <td><fmt:formatDate value="${item.createDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
                     <td>${item.pSort}</td>
                     <td class="f-14 td-manage">
-                        <c:if test="${item.haveList}"><a href="serviceCategoryPidList.html?id=${item.id}"><i class="Hui-iconfont">&#xe667;</i></a></c:if>
+                        <c:if test="${item.haveList}"><a href="serviceCategoryPidList.html?pid=${item.id}"><i class="Hui-iconfont">&#xe667;</i></a></c:if>
                         <a style="text-decoration:none" class="ml-5" href="serviceCategoryUpdate.html?id=${item.id }" title="查看"><i
                                 class="Hui-iconfont">&#xe6df;</i></a>
                         <a href="javascript:del(${item.id })"><i class="Hui-iconfont">&#xe6e2;</i></a>

+ 204 - 0
src/main/webapp/WEB-INF/jsp/admin/serviceCategoryPidList.jsp

@@ -0,0 +1,204 @@
+<%@ 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">
+    <form action="serviceCategoryPidList.html" method="post"   enctype="multipart/form-data">
+        <div class="text-c">
+            <input type="text" name="title" id="title" value="${title}" placeholder=" 服务名称" style="width:250px" class="input-text">
+            <button class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+            <a href="javascript:history.back(-1)"><button class="btn btn-success" type="button" style="float: right"><i class="Hui-iconfont">&#xe66b;</i> 返回</button></a>
+        </div>
+    </form>
+    <div class="cl pd-5 bg-1 bk-gray mt-20">
+			<span class="l">
+                <a class="btn btn-danger radius"  href="javascript:;"  id="delete"    ><i class="Hui-iconfont">&#xe6e2;</i>批量删除</a>
+				<%--<a class="btn btn-primary radius" href="serviceCategoryAdd.html"><i--%>
+                        <%--class="Hui-iconfont">&#xe600;</i> 添加服务</a>--%>
+			</span>
+        <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="80" ><input  id="checked_all"   type="checkbox"  >全选</th>
+                <th width="80">ID</th>
+                <th width="120">服务图标</th>
+                <th width="120">图标地址</th>
+                <th width="120">服务类型</th>
+                <th width="120">服务名称</th>
+                <th width="120">首页显示</th>
+                <th width="120">创建时间</th>
+                <th width="120">排序</th>
+                <th width="120">操作</th>
+            </tr>
+            </thead>
+            <tbody>
+            <c:forEach items="${pageInfo.list }" var="item">
+                <tr class="text-c">
+                    <th><input   name="ck_pro"    value="${item.id }"   type="checkbox"  ></th>
+                    <td>${item.id}</td>
+                    <td><img src="${item.img}" style="width: 50px;height: 50px"></td>
+                    <td class="text-l">${item.img}</td>
+                    <td class="text-l">${item.typeStr}</td>
+                    <td class="text-l">
+                        <c:if test="${item.pId == 0}">
+                            ${item.name}
+                        </c:if>
+                        <c:if test="${item.pId != 0}">
+                            <a href="secondService.html?id="+${item.id} >${item.name}</a>
+                        </c:if>
+                    </td>
+                    <td class="text-l">
+                            ${item.isShow == '0' ? '否' : '是'}
+                    </td>
+                    <td><fmt:formatDate value="${item.createDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
+                    <td>${item.pSort}</td>
+                    <td class="f-14 td-manage">
+                        <c:if test="${item.haveList}"><a href="serviceCategoryPidList.html?pid=${item.id}"><i class="Hui-iconfont">&#xe667;</i></a></c:if>
+                        <a style="text-decoration:none" class="ml-5" href="serviceCategoryUpdate.html?id=${item.id }" title="查看"><i
+                                class="Hui-iconfont">&#xe6df;</i></a>
+                        <a href="javascript:del(${item.id })"><i class="Hui-iconfont">&#xe6e2;</i></a>
+                    </td>
+                </tr>
+            </c:forEach>
+            </tbody>
+        </table>
+    </div>
+
+    <div id="PageNum">
+        <section>
+            <div class="bd points-goods-list">
+                <ul class="pages">
+                    <li><a href="serviceCategoryPidList.html?pid=${pid}&title=${title}&page=1&rows=${pageInfo.pageSize}">首页</a></li>
+                    <li class="prev"><a
+                            href="serviceCategoryPidList.html?pid=${pid}&title=${title}&page=${pageInfo.prePage}&rows=${pageInfo.pageSize}">上一页</a>
+                    </li>
+                    <c:forEach items="${pageInfo.navigatepageNums}" var="nav">
+                        <c:if test="${nav == pageInfo.pageNum}">
+                            <li><a href="serviceCategoryPidList.html?pid=${pid}&title=${title}&page=${nav}&rows=${pageInfo.pageSize}"
+                                   class="active">${nav}</a></li>
+                        </c:if>
+                        <c:if test="${nav != pageInfo.pageNum}">
+                            <li>
+                                <a href="serviceCategoryPidList.html?pid=${pid}&title=${title}&page=${nav}&rows=${pageInfo.pageSize}">${nav}</a>
+                            </li>
+                        </c:if>
+                    </c:forEach>
+                    <li class="next"><a
+                            href="serviceCategoryPidList.html?pid=${pid}&title=${title}&page=${pageInfo.nextPage}&rows=${pageInfo.pageSize}">下一页</a>
+                    </li>
+                    <li>
+                        <a href="serviceCategoryPidList.html?pid=${pid}&title=${title}&page=${pageInfo.pages }&rows=${pageInfo.pageSize}">末页</a>
+                    </li>
+                </ul>
+            </div>
+        </section>
+    </div>
+</div>
+</div>
+<script type="text/javascript">
+    //全选与反选
+    $("#sltall").click(function () {
+        if ($(this).prop("checked")) {
+            $("[name='id']").prop("checked", true);//全选
+        } else {
+            $("[name='id']").prop("checked", false);//取消全选
+        }
+    });
+
+
+    function downs() {
+        var chkvalue = "";//定义一个数组
+        $("input[name='id']:checked").each(function () {
+            chkvalue += $(this).val() + ",";
+        });
+        window.location.href = "signexcels.html?chkvalue=" + chkvalue;
+    };
+
+    function del(id) {
+        layer.confirm('确认要删除吗?', function (index) {
+            $.post("serviceCategoryDel.html", {id: id}, function (data) {
+                if (data.is) {
+                    layer.alert(data.msg, {skin: 'layui-layer-molv', closeBtn: 0, anim: 4}, function () {
+                        window.location = window.location;
+                    });
+                } else {
+                    layer.msg(data.msg, {icon: 2, time: 1000});
+                }
+            }, "json");
+        });
+    }
+
+    $("#delete").click(function(){
+        //判断是否至少选择一项
+        var checkedNum =$("input[name='ck_pro']:checked").length;
+        if(checkedNum==0){
+            layer.msg("请至少选择一个!",{icon:2,time:1000});
+            return;
+        }
+        layer.confirm('确认要删除所选项吗?',function(index){
+            var checkList= new Array();
+            $("input[name='ck_pro']:checked").each(function(){
+                checkList.push($(this).val());
+            });
+            $.ajax({
+                type:"POST",
+                url:"serviceCategoryDel.html",
+                data:{
+                    "id":checkList.toString()
+                },
+                dataType:"json",
+                success:function(ajax){
+                    if(ajax.is){
+                        layer.alert(ajax.msg, {skin: 'layui-layer-molv', closeBtn: 0, anim: 4}, function () {
+                            window.location = window.location;
+                        });
+                        $(":checkbox").prop("checked", false);
+                    }else{
+                        layer.msg(ajax.msg,{icon:2,time:1000});
+                    }
+                }
+            })
+        })
+    });
+    $("#checked_all").click(function(){
+        $("input[name='ck_pro']").prop("checked",this.checked);
+
+    })
+</script>
+</body>
+</html>