ソースを参照

后台修改 2019/10/10

wuzhiqiang 5 年 前
コミット
98f96eb121

+ 4 - 0
src/main/java/com/yc/education/controller/admin/ActivityNewsController.java

@@ -134,6 +134,10 @@ public class ActivityNewsController {
         activityNews.setBrowsingvolume(0);
         activityNews.setReleasetime(new Date());
 
+        if (activityNews.getIstop() == null){
+            activityNews.setIstop(0);
+        }
+
         String[] imgStr = activityNews.getActivityimage().split(",");
 
         if (imgStr.length > 3) {  //最多上传三张图片,判断一下

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

@@ -131,7 +131,7 @@ public class OwnerServiceAdminController {
 
         int row = iOwnerService.save(ownerService);
 
-        return ViewUtil.returnview(row,"ownerServiceList.html?typeId="+ownerService.getTypeId(),"信息列表");
+        return ViewUtil.returnview(row,"ownerServiceList.html","信息列表");
     }
 
     /**

+ 16 - 5
src/main/java/com/yc/education/controller/admin/ServicerImportController.java

@@ -10,6 +10,7 @@ import com.yc.education.model.ServicerImport;
 import com.yc.education.service.IProviderService;
 import com.yc.education.service.IServicerImportService;
 import com.yc.education.util.AjaxMessage;
+import com.yc.education.util.MapUtils;
 import com.yc.education.util.ViewUtil;
 import org.apache.poi.hssf.usermodel.*;
 import org.apache.poi.ss.usermodel.Cell;
@@ -267,6 +268,7 @@ public class ServicerImportController {
                     provider.setCity(getValue(hssfRow.getCell(15)));
                     provider.setDistrict(getValue(hssfRow.getCell(16)));
                     provider.setStree(getValue(hssfRow.getCell(17)));
+                    provider.setAuthPhone(getValue(hssfRow.getCell(24)));
 
                     provider.setIsUse("1");
                     provider.setEnterDate(new Date());
@@ -297,7 +299,7 @@ public class ServicerImportController {
             //获得数据的总行数
             int totalRowNum = sheet.getLastRowNum();
             //获得所有数据
-            for(int i = 1 ; i < totalRowNum ; i++)
+            for(int i = 1 ; i <=totalRowNum ; i++)
             {
                 //获得第i行对象
                 Row row = sheet.getRow(i);
@@ -348,6 +350,7 @@ public class ServicerImportController {
                 provider.setCity(getValue(row.getCell(15)));
                 provider.setDistrict(getValue(row.getCell(16)));
                 provider.setStree(getValue(row.getCell(17)));
+                provider.setAuthPhone(getValue(row.getCell(24)));
 
                 provider.setIsUse("1");
                 provider.setEnterDate(new Date());
@@ -360,10 +363,14 @@ public class ServicerImportController {
                 provider.setModifiedDate(new Date());
                 provider.setRoleType("1");
                 provider.setIsUse("0");
-                provider.setLatitude("0");
-                provider.setLongitude("0");
                 provider.setIsLine("0");
                 provider.setAddress(provider.getProvince()+provider.getCity()+provider.getDistrict()+provider.getStree());
+
+               String str = MapUtils.getLongitudeLatitude(provider.getAddress());//根据地址获取经纬度字符串
+               String[] arr = str.split(",");//用逗号将字符串分开
+               provider.setLongitude(arr[0]);//赋值给经度
+               provider.setLatitude(arr[1]);//赋值给纬度
+
                 list1.add(provider);
 
 
@@ -380,8 +387,12 @@ public class ServicerImportController {
                 List<Provider> serviceList1 = list1.subList(i * 400, end);
 
                 if(serviceList != null && serviceList.size() > 0){
-                    iServicerImportService.addByList(serviceList);
-                    iProviderService.addProvider(serviceList1);
+
+                    int row = iServicerImportService.addByList(serviceList);
+                    if (row > 0 ){                                //如果服务商管理没有导入成功,则不能往商家信息中导入相关数据
+                        iProviderService.addProvider(serviceList1);
+                    }
+
 
                 }
             }

+ 3 - 1
src/main/java/com/yc/education/util/MapUtils.java

@@ -198,7 +198,9 @@ public class MapUtils {
     }
 
     public static void main(String[] args) {
-        getLongitudeLatitude("上海市上海市普陀区祁连山南路588弄1号");
+       getLongitudeLatitude("上海市上海市普陀区祁连山南路588弄1号");
+
+
     }
 
 

+ 3 - 3
src/main/resources/mapper/ProviderMapper.xml

@@ -110,7 +110,7 @@
                 and is_use =#{isUse}
             </if>
         </where>
-        order by id
+        order by status desc,enter_date desc
     </select>
     <!--查询所有供应商信息 分页-->
     <select id="listAllSupplierInfo" resultMap="BaseResultMap">
@@ -214,13 +214,13 @@
     </insert>
     <!-- 查询重复 -->
     <select id="queryRepeat" resultType="java.lang.String">
-  	select min(id) from provider group by `name`,company_name,address desc order by id desc
+  	select min(id) from provider group by `name`,company_name,address,auth_phone desc order by id desc
   </select>
     <!--删除集合数据-->
     <delete id="deleteRepeat" parameterType="java.util.List">
         delete from provider
         where id not in(
-        <foreach collection="repeatList1" item="item" index="index" separator=",">
+        <foreach collection="repeat" item="item" index="index" separator=",">
             #{item}
         </foreach>
         )

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

@@ -199,7 +199,7 @@
             <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>是否置顶:</label>
             <div class="formControls col-xs-8 col-sm-9">
                 <select name="istop"  id="zId" class="input-text">
-                    <option value=" ">是否置顶</option>
+                    <option value="">是否置顶</option>
                     <option value="0">否</option>
                     <option value="1">是</option>
                 </select>

+ 8 - 3
src/main/webapp/WEB-INF/jsp/admin/authenticationList.jsp

@@ -26,6 +26,8 @@
             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>
+    <link href="${pageContext.request.contextPath}/static/lib/lightbox2/2.8.1/css/lightbox.css" rel="stylesheet" type="text/css" >
+
 </head>
 <body>
 <nav class="breadcrumb">
@@ -109,13 +111,16 @@
                         </c:if>
                     </td>
                     <td class="text-l">
-                        <img src="${authentication.businessImg}" width="50" height="50"/>
+                        <div class="portfoliobox">
+
+                        <a href="${authentication.businessImg}" data-lightbox="gallery"><img src="${authentication.businessImg}" width="50" height="50"/></a>
+                        </div>
                     </td>
                     <td class="text-l">
-                        <img src="${authentication.idFrontImg}" width="50" height="50"/>
+                        <a href="${authentication.idFrontImg}" data-lightbox="gallery">  <img src="${authentication.idFrontImg}" width="50" height="50"/></a>
                     </td>
                     <td class="text-l">
-                        <img src="${authentication.idReverseImg}" width="50" height="50"/>
+                        <a href="${authentication.idReverseImg}" data-lightbox="gallery"> <img src="${authentication.idReverseImg}" width="50" height="50"/></a>
                     </td>
                     <td><fmt:formatDate value="${authentication.createDate}" pattern="yyyy-MM-dd"></fmt:formatDate></td>
 

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

@@ -82,7 +82,7 @@
                     <th><input   name="ck_pro"    value="${userInfo.id }"   type="checkbox"  ></th>
                     <td>${userInfo.id}</td>
                     <td class="text-l">
-                        <img src="${userInfo.photo}" width="50" height="50"/>
+                      <img src="${userInfo.photo}" width="50" height="50"/>
                     </td>
                     <td class="text-l">
                             <%--${service.isCollection == '0' ? '车主' : ${service.role == '1' ? '服务商' : '经销商'}}--%>

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

@@ -101,7 +101,7 @@
 						<li><a data-href="ownerServiceTypeList.html" data-title="类型列表" href="javascript:void(0)">类型列表</a></li>
 						<li><a data-href="ownerServiceList.html" data-title="信息列表" href="javascript:void(0)">信息列表</a></li>
 						<li><a data-href="carServiceCategoryExcel.html" data-title="车主服务导入" href="javascript:void(0)">车主服务导入</a></li>
-						<li><a data-href="serviceCategoryImg.html" data-title="图片导入" href="javascript:void(0)">图片导入</a></li>
+						<%--<li><a data-href="serviceCategoryImg.html" data-title="图片导入" href="javascript:void(0)">图片导入</a></li>--%>
 					</ul>
 				</dd>
 			</dl>

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

@@ -64,7 +64,7 @@
             <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="200">操作</th>
@@ -75,7 +75,7 @@
                 <tr class="text-c">
                     <th><input   name="ck_pro"    value="${item.id }"   type="checkbox"  ></th>
                     <td>${item.id}</td>
-                    <td><img src="${item.typeImage}" style="width: 50px;height: 50px"></td>
+                    <%--<td><img src="${item.typeImage}" style="width: 50px;height: 50px"></td>--%>
                     <td class="text-l">${item.typeName}</td>
                     <%--<td><fmt:formatDate value="${item.createDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>--%>
                     <td>${item.typeSort}</td>

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

@@ -93,7 +93,7 @@
                 <th width="60">店铺状态</th>
                 <th width="70">热门/推荐</th>
                 <%--<th width="70">店铺地址</th>--%>
-                <th width="70">店铺图片</th>
+                <th width="70">店铺logo</th>
                 <%--<th width="70">主营业务</th>--%>
                 <th width="70">业务介绍</th>
                 <th width="90">用户电话</th>

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

@@ -169,7 +169,7 @@
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>店铺log:</label>
+            <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>店铺logo:</label>
             <div class="formControls col-xs-8 col-sm-9">
                 <input type="file" class="input-text" id="caseimage" name="filename"  />
                 <%-- <label style="color:red" >建议尺寸:220px*220px</label>--%>

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

@@ -95,7 +95,7 @@
                 <th width="60">店铺状态</th>
                 <th width="70">热门/推荐</th>
                 <%--<th width="70">店铺地址</th>--%>
-                <th width="70">店铺图片</th>
+                <th width="70">店铺logo</th>
                 <th width="70">主营业务</th>
                 <%--<th width="70">业务介绍</th>--%>
                 <th width="90">用户电话</th>

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

@@ -224,7 +224,7 @@
         </div>--%>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>店铺log:</label>
+            <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>店铺logo:</label>
             <div class="formControls col-xs-8 col-sm-9">
                 <input type="file" class="input-text" id="caseimage" name="filename"  />
                 <%-- <label style="color:red" >建议尺寸:220px*220px</label>--%>

BIN
src/main/webapp/ajaxexcel/excel/服务商导入格式.xlsx