Explorar o código

2019/12/30 18:01

jzdsh %!s(int64=4) %!d(string=hai) anos
pai
achega
007691d5f1

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

@@ -626,14 +626,14 @@ public class SupplierAdminController extends BaseController {
 
                 for (int i = 0; i < pMList.size(); i++) {
                     ServiceCategory serviceCategoryByName = iServiceCategoryService.getServiceCategoryByName(pMList.get(i), CommonCons.STORE_TYPE_TWO);
-
-                    String[] split = mainBusinessList.get(i).split(",");
-                    int j = 0;
-                    for (String s : split) {
-                        pmBusiness += serviceCategoryByName.getId() + s + ",";
+                    if (serviceCategoryByName != null) {
+                        String[] split = mainBusinessList.get(i).split(",");
+                        int j = 0;
+                        for (String s : split) {
+                            pmBusiness += serviceCategoryByName.getId() + s + ",";
+                        }
                     }
                 }
-
                 provider.setMianBusinesss(provider.getMianBusiness().replace(";", ","));
                 if (provider.getMianBusinesss().lastIndexOf(",") > 0) {
                     provider.setMianBusinesss(provider.getMianBusinesss().substring(0, provider.getMianBusinesss().lastIndexOf(",")));

+ 34 - 0
src/main/java/com/yc/education/test/SortTest.java

@@ -0,0 +1,34 @@
+package com.yc.education.test;
+
+import java.util.Arrays;
+
+/**
+ * @ClassName SortTest
+ * @Description TODO
+ * @Author QuZhangJing
+ * @Date 2019/12/30 15:36
+ * @Version 1.0
+ */
+public class SortTest {
+
+    public static void main(String [] args){
+
+
+        int[] arr = {4, 5, 6, 1, 2, 3, 7, 8, 9};
+
+        for (int i = 0; i < arr.length; i++) {
+            for (int j =0; j < arr.length - i-1; j++) {
+                if (arr[j] > arr[j+1]) {
+                    int temp;
+                    temp = arr[j];
+                    arr[j]=arr[j+1];
+                    arr[j+1]=temp;
+                }
+            }
+            System.out.print(arr[i]+",");
+           System.out.println(Arrays.toString(arr));
+        }
+        System.out.println(Arrays.toString(arr));
+
+    }
+}

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

@@ -60,7 +60,7 @@
     </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-danger radius"  href="javascript:;"  id="delete"    ><i class="Hui-iconfont">&#xe6e2;</i>批量删除</a>--%>
 				<a class="btn btn-primary radius" href="serviceCategoryAddProvider.html"><i
                         class="Hui-iconfont">&#xe600;</i> 添加服务</a>
                <i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i>

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

@@ -61,7 +61,7 @@
     </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-danger radius"  href="javascript:;"  id="delete"    ><i class="Hui-iconfont">&#xe6e2;</i>批量删除</a>--%>
 				<a class="btn btn-primary radius" href="serviceCategoryAddSupplier.html"><i
                         class="Hui-iconfont">&#xe600;</i> 添加服务</a>
                <i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i>