瀏覽代碼

Merge remote-tracking branch 'origin/master'

sunyangyang 2 年之前
父節點
當前提交
a521844980
共有 52 個文件被更改,包括 737 次插入9032 次删除
  1. 0 71
      README.md
  2. 二進制
      doc/若依环境使用手册.docx
  3. 9 9
      pom.xml
  4. 5 5
      sooka-admin/pom.xml
  5. 2 11
      sooka-admin/src/main/java/com/sooka/SookaApplication.java
  6. 16 6
      sooka-admin/src/main/java/com/sooka/web/controller/schooldistrict/BtpPolicestationVillageController.java
  7. 13 3
      sooka-admin/src/main/java/com/sooka/web/controller/schooldistrict/BtpSchoolController.java
  8. 36 32
      sooka-admin/src/main/java/com/sooka/web/controller/schooldistrict/BtpSchoolPvController.java
  9. 44 0
      sooka-admin/src/main/java/com/sooka/web/controller/schooldistrict/QueryStatisticsController.java
  10. 6 15
      sooka-admin/src/main/java/com/sooka/web/controller/system/SysIndexController.java
  11. 3 2
      sooka-admin/src/main/resources/application.yml
  12. 1 1
      sooka-admin/src/main/resources/templates/index.html
  13. 3 5
      sooka-admin/src/main/resources/templates/main.html
  14. 2 2
      sooka-admin/src/main/resources/templates/monitor/operlog/operlog.html
  15. 22 23
      sooka-admin/src/main/resources/templates/schooldistrict/index/add.html
  16. 21 29
      sooka-admin/src/main/resources/templates/schooldistrict/index/index.html
  17. 26 22
      sooka-admin/src/main/resources/templates/schooldistrict/index/edit.html
  18. 1 2
      sooka-admin/src/main/resources/templates/schooldistrict/policestationvillage/add.html
  19. 2 3
      sooka-admin/src/main/resources/templates/schooldistrict/policestationvillage/edit.html
  20. 36 30
      sooka-admin/src/main/resources/templates/schooldistrict/policestationvillage/policestationvillage.html
  21. 80 0
      sooka-admin/src/main/resources/templates/schooldistrict/querystatistics.html
  22. 1 1
      sooka-admin/src/main/resources/templates/schooldistrict/school/school.html
  23. 3 3
      sooka-admin/src/main/resources/templates/system/notice/edit.html
  24. 15 12
      sooka-admin/src/main/resources/templates/system/notice/notice.html
  25. 0 62
      sooka-business/src/main/java/com/sooka/business/schooldistrict/mapper/BtpSchoolPvMapper.java
  26. 0 62
      sooka-business/src/main/java/com/sooka/business/schooldistrict/service/IBtpSchoolPvService.java
  27. 0 97
      sooka-business/src/main/java/com/sooka/business/schooldistrict/service/impl/BtpSchoolPvServiceImpl.java
  28. 1 1
      sooka-framework/src/main/java/com/sooka/framework/config/ShiroConfig.java
  29. 2 2
      sooka-business/pom.xml
  30. 1 1
      sooka-business/src/main/java/com/sooka/business/schooldistrict/domain/BtpPolicestationVillage.java
  31. 1 1
      sooka-business/src/main/java/com/sooka/business/schooldistrict/domain/BtpSchool.java
  32. 30 32
      sooka-business/src/main/java/com/sooka/business/schooldistrict/domain/BtpSchoolPv.java
  33. 15 21
      sooka-business/src/main/java/com/sooka/business/schooldistrict/mapper/BtpPolicestationVillageMapper.java
  34. 7 15
      sooka-business/src/main/java/com/sooka/business/schooldistrict/mapper/BtpSchoolMapper.java
  35. 59 0
      sooka-schooldistrict/src/main/java/com/sooka/schooldistrict/mapper/BtpSchoolPvMapper.java
  36. 13 19
      sooka-business/src/main/java/com/sooka/business/schooldistrict/service/IBtpPolicestationVillageService.java
  37. 50 0
      sooka-schooldistrict/src/main/java/com/sooka/schooldistrict/service/IBtpSchoolPvService.java
  38. 7 15
      sooka-business/src/main/java/com/sooka/business/schooldistrict/service/IBtpSchoolService.java
  39. 18 20
      sooka-business/src/main/java/com/sooka/business/schooldistrict/service/impl/BtpPolicestationVillageServiceImpl.java
  40. 87 0
      sooka-schooldistrict/src/main/java/com/sooka/schooldistrict/service/impl/BtpSchoolPvServiceImpl.java
  41. 8 15
      sooka-business/src/main/java/com/sooka/business/schooldistrict/service/impl/BtpSchoolServiceImpl.java
  42. 20 10
      sooka-business/src/main/resources/mapper/schooldistrict/BtpPolicestationVillageMapper.xml
  43. 1 5
      sooka-business/src/main/resources/mapper/schooldistrict/BtpSchoolMapper.xml
  44. 30 17
      sooka-business/src/main/resources/mapper/schooldistrict/BtpSchoolPvMapper.xml
  45. 7 0
      sooka-system/src/main/java/com/sooka/system/mapper/SysOperLogMapper.java
  46. 7 0
      sooka-system/src/main/java/com/sooka/system/service/ISysOperLogService.java
  47. 1 1
      sooka-system/src/main/java/com/sooka/system/service/impl/SysNoticeServiceImpl.java
  48. 9 0
      sooka-system/src/main/java/com/sooka/system/service/impl/SysOperLogServiceImpl.java
  49. 16 0
      sooka-system/src/main/resources/mapper/system/SysOperLogMapper.xml
  50. 0 2890
      sql/ruoyi.html
  51. 0 4851
      sql/ruoyi.pdm
  52. 0 608
      sql/ry_20230216.sql

File diff suppressed because it is too large
+ 0 - 71
README.md


二進制
doc/若依环境使用手册.docx


+ 9 - 9
pom.xml

@@ -157,18 +157,18 @@
             </dependency>
 
             <!-- 定时任务-->
-            <dependency>
+            <!--<dependency>
                 <groupId>com.sooka</groupId>
                 <artifactId>sooka-quartz</artifactId>
                 <version>${sooka.version}</version>
-            </dependency>
+            </dependency>-->
 
             <!-- 代码生成-->
-            <dependency>
+            <!--<dependency>
                 <groupId>com.sooka</groupId>
                 <artifactId>sooka-generator</artifactId>
                 <version>${sooka.version}</version>
-            </dependency>
+            </dependency>-->
 
             <!-- 核心模块-->
             <dependency>
@@ -184,10 +184,10 @@
                 <version>${sooka.version}</version>
             </dependency>
 
-            <!-- 业务模块-->
+            <!-- 学区管理-->
             <dependency>
                 <groupId>com.sooka</groupId>
-                <artifactId>sooka-business</artifactId>
+                <artifactId>sooka-schooldistrict</artifactId>
                 <version>${sooka.version}</version>
             </dependency>
 
@@ -205,9 +205,9 @@
         <module>sooka-admin</module>
         <module>sooka-framework</module>
         <module>sooka-system</module>
-        <module>sooka-business</module>
-        <module>sooka-quartz</module>
-        <module>sooka-generator</module>
+        <module>sooka-schooldistrict</module>
+        <!--<module>sooka-quartz</module>-->
+        <!--<module>sooka-generator</module>-->
         <module>sooka-common</module>
     </modules>
     <packaging>pom</packaging>

+ 5 - 5
sooka-admin/pom.xml

@@ -56,20 +56,20 @@
         </dependency>
 
         <!-- 定时任务-->
-        <dependency>
+        <!--<dependency>
             <groupId>com.sooka</groupId>
             <artifactId>sooka-quartz</artifactId>
-        </dependency>
+        </dependency>-->
 
         <!-- 代码生成-->
-        <dependency>
+        <!--<dependency>
             <groupId>com.sooka</groupId>
             <artifactId>sooka-generator</artifactId>
-        </dependency>
+        </dependency>-->
 
         <dependency>
             <groupId>com.sooka</groupId>
-            <artifactId>sooka-business</artifactId>
+            <artifactId>sooka-schooldistrict</artifactId>
         </dependency>
 
     </dependencies>

+ 2 - 11
sooka-admin/src/main/java/com/sooka/SookaApplication.java

@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 
 /**
  * 启动程序
- * 
+ *
  * @author sooka
  */
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@@ -16,15 +16,6 @@ public class SookaApplication
     {
         // System.setProperty("spring.devtools.restart.enabled", "false");
         SpringApplication.run(SookaApplication.class, args);
-        System.out.println("(♥◠‿◠)ノ゙  首佳启动成功   ლ(´ڡ`ლ)゙  \n" +
-                " .-------.       ____     __        \n" +
-                " |  _ _   \\      \\   \\   /  /    \n" +
-                " | ( ' )  |       \\  _. /  '       \n" +
-                " |(_ o _) /        _( )_ .'         \n" +
-                " | (_,_).' __  ___(_ o _)'          \n" +
-                " |  |\\ \\  |  ||   |(_,_)'         \n" +
-                " |  | \\ `'   /|   `-'  /           \n" +
-                " |  |  \\    /  \\      /           \n" +
-                " ''-'   `'-'    `-..-'              ");
+        System.out.println("(♥◠‿◠)ノ゙  学区查询系统启动成功   ლ(´ڡ`ლ)゙");
     }
 }

+ 16 - 6
sooka-admin/src/main/java/com/sooka/web/controller/schooldistrict/BtpPolicestationVillageController.java

@@ -1,13 +1,13 @@
 package com.sooka.web.controller.schooldistrict;
 
-import com.sooka.business.schooldistrict.domain.BtpPolicestationVillage;
-import com.sooka.business.schooldistrict.service.IBtpPolicestationVillageService;
 import com.sooka.common.annotation.Log;
 import com.sooka.common.core.controller.BaseController;
 import com.sooka.common.core.domain.AjaxResult;
 import com.sooka.common.core.page.TableDataInfo;
 import com.sooka.common.enums.BusinessType;
 import com.sooka.common.utils.poi.ExcelUtil;
+import com.sooka.schooldistrict.domain.BtpPolicestationVillage;
+import com.sooka.schooldistrict.service.IBtpPolicestationVillageService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -38,8 +38,14 @@ public class BtpPolicestationVillageController extends BaseController {
         mmap.put("parentId", parentId);
         if (0 == parentId) {
             mmap.put("pageMark", "派出所");
+            BtpPolicestationVillage temp = new BtpPolicestationVillage();
+            temp.setPvId(0L);
+            mmap.put("policestations", Arrays.asList(temp));
         } else {
             mmap.put("pageMark", "委(村)");
+            BtpPolicestationVillage temp = new BtpPolicestationVillage();
+            temp.setParentId(0L);
+            mmap.put("policestations", btpPolicestationVillageService.selectBtpPolicestationVillageList(temp));
         }
         return prefix + "/policestationvillage";
     }
@@ -145,15 +151,19 @@ public class BtpPolicestationVillageController extends BaseController {
     @PostMapping("/remove")
     @ResponseBody
     public AjaxResult remove(String ids) {
-        return toAjax(btpPolicestationVillageService.deleteBtpPolicestationVillageByPvIds(ids));
+        int result = btpPolicestationVillageService.getSubResources(ids);
+        if (result == 0) {
+            return toAjax(btpPolicestationVillageService.deleteBtpPolicestationVillageByPvIds(ids));
+        }
+        return AjaxResult.error("请先删除下级资源");
     }
 
     /**
      * 查询派出所、委(村)列表
      */
-    @GetMapping("/getAllByParentId")
+    @GetMapping("/getPolicestationVillagesByParentId")
     @ResponseBody
-    public List<BtpPolicestationVillage> list(Long parentId) {
-        return btpPolicestationVillageService.getAllByParentId(parentId);
+    public List<BtpPolicestationVillage> getPolicestationVillagesByParentId(Long parentId) {
+        return btpPolicestationVillageService.getPolicestationVillagesByParentId(parentId);
     }
 }

+ 13 - 3
sooka-admin/src/main/java/com/sooka/web/controller/schooldistrict/BtpSchoolController.java

@@ -1,13 +1,16 @@
 package com.sooka.web.controller.schooldistrict;
 
-import com.sooka.business.schooldistrict.domain.BtpSchool;
-import com.sooka.business.schooldistrict.service.IBtpSchoolService;
 import com.sooka.common.annotation.Log;
 import com.sooka.common.core.controller.BaseController;
 import com.sooka.common.core.domain.AjaxResult;
 import com.sooka.common.core.page.TableDataInfo;
 import com.sooka.common.enums.BusinessType;
+import com.sooka.common.utils.StringUtils;
 import com.sooka.common.utils.poi.ExcelUtil;
+import com.sooka.schooldistrict.domain.BtpSchool;
+import com.sooka.schooldistrict.domain.BtpSchoolPv;
+import com.sooka.schooldistrict.service.IBtpSchoolPvService;
+import com.sooka.schooldistrict.service.IBtpSchoolService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -31,6 +34,9 @@ public class BtpSchoolController extends BaseController {
     @Autowired
     private IBtpSchoolService btpSchoolService;
 
+    @Autowired
+    private IBtpSchoolPvService btpSchoolPvService;
+
     @RequiresPermissions("schooldistrict:school:view")
     @GetMapping()
     public String school() {
@@ -111,6 +117,10 @@ public class BtpSchoolController extends BaseController {
     @PostMapping("/remove")
     @ResponseBody
     public AjaxResult remove(String ids) {
-        return toAjax(btpSchoolService.deleteBtpSchoolBySchoolIds(ids));
+        List<BtpSchoolPv> schoolPvs = btpSchoolPvService.getBtpSchoolPvsInSchoolIds(ids);
+        if (StringUtils.isEmpty(schoolPvs)) {
+            return toAjax(btpSchoolService.deleteBtpSchoolBySchoolIds(ids));
+        }
+        return AjaxResult.error("请先删除下级资源");
     }
 }

+ 36 - 32
sooka-admin/src/main/java/com/sooka/web/controller/schooldistrict/BtpSchoolPvController.java

@@ -1,17 +1,17 @@
 package com.sooka.web.controller.schooldistrict;
 
-import com.sooka.business.schooldistrict.domain.BtpPolicestationVillage;
-import com.sooka.business.schooldistrict.domain.BtpSchool;
-import com.sooka.business.schooldistrict.domain.BtpSchoolPv;
-import com.sooka.business.schooldistrict.service.IBtpPolicestationVillageService;
-import com.sooka.business.schooldistrict.service.IBtpSchoolPvService;
-import com.sooka.business.schooldistrict.service.IBtpSchoolService;
 import com.sooka.common.annotation.Log;
 import com.sooka.common.core.controller.BaseController;
 import com.sooka.common.core.domain.AjaxResult;
 import com.sooka.common.core.page.TableDataInfo;
 import com.sooka.common.enums.BusinessType;
 import com.sooka.common.utils.poi.ExcelUtil;
+import com.sooka.schooldistrict.domain.BtpPolicestationVillage;
+import com.sooka.schooldistrict.domain.BtpSchool;
+import com.sooka.schooldistrict.domain.BtpSchoolPv;
+import com.sooka.schooldistrict.service.IBtpPolicestationVillageService;
+import com.sooka.schooldistrict.service.IBtpSchoolPvService;
+import com.sooka.schooldistrict.service.IBtpSchoolService;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -22,16 +22,16 @@ import java.util.Arrays;
 import java.util.List;
 
 /**
- * 学区查询Controller
+ * 学区配置Controller
  *
  * @author lyq
  * @date 2023-02-20
  */
 @Controller
-@RequestMapping("/schooldistrict/index")
+@RequestMapping("/schooldistrict/config")
 public class BtpSchoolPvController extends BaseController {
 
-    private String prefix = "schooldistrict/index";
+    private String prefix = "schooldistrict/config";
 
     @Autowired
     private IBtpSchoolPvService btpSchoolPvService;
@@ -42,16 +42,16 @@ public class BtpSchoolPvController extends BaseController {
     @Autowired
     private IBtpSchoolService btpSchoolService;
 
-    @RequiresPermissions("schooldistrict:index:view")
+    @RequiresPermissions("schooldistrict:config:view")
     @GetMapping()
-    public String index() {
-        return prefix + "/index";
+    public String config() {
+        return prefix + "/config";
     }
 
     /**
      * 查询学区列表
      */
-    @RequiresPermissions("schooldistrict:index:list")
+    @RequiresPermissions("schooldistrict:config:list")
     @PostMapping("/list")
     @ResponseBody
     public TableDataInfo list(BtpSchoolPv btpSchoolPv) {
@@ -63,14 +63,14 @@ public class BtpSchoolPvController extends BaseController {
     /**
      * 导出学区列表
      */
-    @RequiresPermissions("schooldistrict:index:export")
-    @Log(title = "学区查询", businessType = BusinessType.EXPORT)
+    @RequiresPermissions("schooldistrict:config:export")
+    @Log(title = "学区配置", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     @ResponseBody
     public AjaxResult export(BtpSchoolPv btpSchoolPv) {
         List<BtpSchoolPv> list = btpSchoolPvService.selectBtpSchoolPvList(btpSchoolPv);
         ExcelUtil<BtpSchoolPv> util = new ExcelUtil<>(BtpSchoolPv.class);
-        return util.exportExcel(list, "学区数据");
+        return util.exportExcel(list, "学区配置数据");
     }
 
     /**
@@ -78,7 +78,7 @@ public class BtpSchoolPvController extends BaseController {
      */
     @GetMapping("/add")
     public String add(ModelMap mmap) {
-        mmap.put("policestations", btpPolicestationVillageService.getAllByParentId(0L));
+        mmap.put("policestations", btpPolicestationVillageService.getPolicestationVillagesByParentId(0L));
         mmap.put("villages", Arrays.asList(new BtpPolicestationVillage()));
         mmap.put("schools", btpSchoolService.selectBtpSchoolList(new BtpSchool()));
         return prefix + "/add";
@@ -87,8 +87,8 @@ public class BtpSchoolPvController extends BaseController {
     /**
      * 新增保存学区
      */
-    @RequiresPermissions("schooldistrict:index:add")
-    @Log(title = "学区查询", businessType = BusinessType.INSERT)
+    @RequiresPermissions("schooldistrict:config:add")
+    @Log(title = "学区配置", businessType = BusinessType.INSERT)
     @PostMapping("/add")
     @ResponseBody
     public AjaxResult addSave(BtpSchoolPv btpSchoolPv) {
@@ -98,13 +98,13 @@ public class BtpSchoolPvController extends BaseController {
     /**
      * 修改学区
      */
-    @RequiresPermissions("schooldistrict:index:edit")
-    @GetMapping("/edit/{vIds}")
-    public String edit(@PathVariable("vIds") String vIds, ModelMap mmap) {
-        BtpSchoolPv btpSchoolPv = btpSchoolPvService.selectBtpSchoolPvInVIds(vIds);
+    @RequiresPermissions("schooldistrict:config:edit")
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") String id, ModelMap mmap) {
+        BtpSchoolPv btpSchoolPv = btpSchoolPvService.selectBtpSchoolPvBySchoolIdAndVId(id);
         mmap.put("btpSchoolPv", btpSchoolPv);
-        mmap.put("policestations", btpPolicestationVillageService.getAllByParentId(0L));
-        mmap.put("villages", btpPolicestationVillageService.getAllByParentId(btpSchoolPv.getpId()));
+        mmap.put("policestations", btpPolicestationVillageService.getPolicestationVillagesByParentId(0L));
+        mmap.put("villages", btpPolicestationVillageService.getPolicestationVillagesByParentId(btpSchoolPv.getpId()));
         mmap.put("schools", btpSchoolService.selectBtpSchoolList(new BtpSchool()));
         return prefix + "/edit";
     }
@@ -112,22 +112,26 @@ public class BtpSchoolPvController extends BaseController {
     /**
      * 修改保存学区
      */
-    @RequiresPermissions("schooldistrict:index:edit")
-    @Log(title = "学区查询", businessType = BusinessType.UPDATE)
+    @RequiresPermissions("schooldistrict:config:edit")
+    @Log(title = "学区配置", businessType = BusinessType.UPDATE)
     @PostMapping("/edit")
     @ResponseBody
-    public AjaxResult editSave(BtpSchoolPv btpSchoolPv) {
-        return toAjax(btpSchoolPvService.updateBtpSchoolPv(btpSchoolPv));
+    public AjaxResult editSave(String removeId, BtpSchoolPv btpSchoolPv) {
+        int result = btpSchoolPvService.deleteBtpSchoolPvBySchoolIdAndVIds(removeId);
+        if (result > 0) {
+            return toAjax(btpSchoolPvService.insertBtpSchoolPv(btpSchoolPv));
+        }
+        return AjaxResult.error();
     }
 
     /**
      * 删除学区
      */
-    @RequiresPermissions("schooldistrict:index:remove")
-    @Log(title = "学区查询", businessType = BusinessType.DELETE)
+    @RequiresPermissions("schooldistrict:config:remove")
+    @Log(title = "学区配置", businessType = BusinessType.DELETE)
     @PostMapping("/remove")
     @ResponseBody
     public AjaxResult remove(String ids) {
-        return toAjax(btpSchoolPvService.deleteBtpSchoolPvByVIds(ids));
+        return toAjax(btpSchoolPvService.deleteBtpSchoolPvBySchoolIdAndVIds(ids));
     }
 }

+ 44 - 0
sooka-admin/src/main/java/com/sooka/web/controller/schooldistrict/QueryStatisticsController.java

@@ -0,0 +1,44 @@
+package com.sooka.web.controller.schooldistrict;
+
+import com.sooka.common.core.controller.BaseController;
+import com.sooka.common.core.page.TableDataInfo;
+import com.sooka.system.domain.SysOperLog;
+import com.sooka.system.service.ISysOperLogService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 查询统计Controller
+ *
+ * @author lyq
+ * @date 2023-02-23
+ */
+@Controller
+@RequestMapping("/schooldistrict/querystatistics")
+public class QueryStatisticsController extends BaseController {
+
+    @Autowired
+    private ISysOperLogService operLogService;
+
+    @RequiresPermissions("schooldistrict:querystatistics:view")
+    @GetMapping()
+    public String policestationvillage() {
+        return "schooldistrict/querystatistics";
+    }
+
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysOperLog sysOperLog) {
+        startPage();
+        List<Map<String, Object>> resultList = operLogService.queryStatistics(sysOperLog);
+        return getDataTable(resultList);
+    }
+}

+ 6 - 15
sooka-admin/src/main/java/com/sooka/web/controller/system/SysIndexController.java

@@ -6,23 +6,15 @@ import java.util.List;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
 
-import com.sooka.business.schooldistrict.domain.BtpPolicestationVillage;
-import com.sooka.business.schooldistrict.domain.BtpSchoolPv;
-import com.sooka.business.schooldistrict.service.IBtpPolicestationVillageService;
-import com.sooka.business.schooldistrict.service.IBtpSchoolPvService;
+import com.sooka.schooldistrict.domain.BtpPolicestationVillage;
+import com.sooka.schooldistrict.domain.BtpSchoolPv;
+import com.sooka.schooldistrict.service.IBtpPolicestationVillageService;
+import com.sooka.schooldistrict.service.IBtpSchoolPvService;
 import com.sooka.common.annotation.Log;
-import com.sooka.common.constant.Constants;
 import com.sooka.common.enums.BusinessType;
-import com.sooka.common.exception.user.CaptchaException;
 import com.sooka.common.utils.*;
-import com.sooka.framework.manager.AsyncManager;
-import com.sooka.framework.manager.factory.AsyncFactory;
 import com.sooka.system.domain.SysNotice;
 import com.sooka.system.service.ISysNoticeService;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.UsernamePasswordToken;
-import org.apache.shiro.subject.Subject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
@@ -159,7 +151,7 @@ public class SysIndexController extends BaseController
             mmap.put("flag", true);
             mmap.put("title", noticeService.selectNoticeById(1L));
             mmap.put("notice", noticeService.selectNoticeById(2L));
-            mmap.put("policestations", btpPolicestationVillageService.getAllByParentId(0L));
+            mmap.put("policestations", btpPolicestationVillageService.getPolicestationVillagesByParentId(0L));
             mmap.put("villages", Arrays.asList(new BtpPolicestationVillage()));
         } else {
             mmap.put("flag", false);
@@ -182,8 +174,7 @@ public class SysIndexController extends BaseController
         {
             return AjaxResult.error(MessageUtils.message("user.jcaptcha.error"));
         }
-        List<BtpSchoolPv> list = btpSchoolPvService.selectBtpSchoolPvList(btpSchoolPv);
-        return AjaxResult.success(list);
+        return AjaxResult.success(btpSchoolPvService.getSchoolName(btpSchoolPv));
     }
 
     // content-main class

+ 3 - 2
sooka-admin/src/main/resources/application.yml

@@ -12,11 +12,12 @@ sooka:
   profile: C:/sooka/uploadPath
   # 获取ip地址开关
   addressEnabled: false
+  # admin_password: sookaadmin123
 
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为80
-  port: 8081
+  port: 80
   servlet:
     # 应用的访问路径
     context-path: /
@@ -100,7 +101,7 @@ shiro:
     # 验证码开关
     captchaEnabled: true
     # 验证码类型 math 数组计算 char 字符
-    captchaType: math
+    captchaType: char
   cookie:
     # 设置Cookie的域名 默认空,即当前访问的域名
     domain: 

+ 1 - 1
sooka-admin/src/main/resources/templates/index.html

@@ -26,7 +26,7 @@
         </div>
         <a th:href="@{/index}">
             <li class="logo hidden-xs">
-                <span class="logo-lg">sooka</span>
+                <span class="logo-lg">后台管理系统</span>
             </li>
          </a>
         <div class="sidebar-collapse">

+ 3 - 5
sooka-admin/src/main/resources/templates/main.html

@@ -155,11 +155,9 @@
 					if (r.data.length == 0) {
 						name += "暂无学区 ";
 					} else {
-						$.each(r.data, function (i, item) {
-							name += item.schoolName + ",";
-						})
+						name += r.data.join(",");
 					}
-					$("#schoolId").empty().append(name.substring(0, name.length-1));
+					$("#schoolId").empty().append(name);
 				} else {
 					$('.imgcode').click();
 					$(".code").val("");
@@ -183,7 +181,7 @@
 				allowClear: false
 			}).on('select2:select', function (e) {
 				//处理自己的业务
-				$.get("/schooldistrict/policestationvillage/getAllByParentId?parentId=" + this.value, function(result) {
+				$.get("/schooldistrict/policestationvillage/getPolicestationVillagesByParentId?parentId=" + this.value, function(result) {
 					$('#vId').empty().select2({
 						data: getData(result),
 						placeholder: "请选择委(村)",

+ 2 - 2
sooka-admin/src/main/resources/templates/monitor/operlog/operlog.html

@@ -44,12 +44,12 @@
 			</div>
 			
 			<div class="btn-group-sm" id="toolbar" role="group">
-				<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:operlog:remove">
+				<!--<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:operlog:remove">
 		            <i class="fa fa-remove"></i> 删除
 		        </a>
 		        <a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:operlog:remove">
 	                <i class="fa fa-trash"></i> 清空
-	            </a>
+	            </a>-->
 	            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:operlog:export">
 		            <i class="fa fa-download"></i> 导出
 		        </a>

+ 22 - 23
sooka-admin/src/main/resources/templates/schooldistrict/index/add.html

@@ -1,33 +1,33 @@
 <!DOCTYPE html>
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
 <head>
-    <th:block th:include="include :: header('新增关系中间')" />
+    <th:block th:include="include :: header('新增学区配置')" />
     <th:block th:include="include :: select2-css" />
 </head>
 <body class="white-bg">
     <div class="wrapper wrapper-content animated fadeInRight ibox-content">
         <form class="form-horizontal m" id="form-pv-add">
             <div class="form-group">
-                <label class="col-sm-3 control-label is-required">派出所:</label>
+                <label class="col-sm-3 control-label is-required">学校:</label>
                 <div class="col-sm-8">
-                    <select id="pId" name="pId" class="form-control select2-multiple">
-                        <option th:each="policestation:${policestations}" th:value="${policestation.pvId}" th:text="${policestation.pvName}"></option>
+                    <select id="schoolId" name="schoolId" class="form-control select2-multiple">
+                        <option th:each="school:${schools}" th:value="${school.schoolId}" th:text="${school.schoolName}"></option>
                     </select>
                 </div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label is-required">委(村):</label>
+                <label class="col-sm-3 control-label is-required">派出所:</label>
                 <div class="col-sm-8">
-                    <select id="vId" class="form-control select2-multiple" multiple>
-                        <option th:each="village:${villages}" th:value="${village.pvId}" th:text="${village.pvName}" ></option>
+                    <select id="pId" name="pId" class="form-control select2-multiple">
+                        <option th:each="policestation:${policestations}" th:value="${policestation.pvId}" th:text="${policestation.pvName}"></option>
                     </select>
                 </div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label is-required">学校:</label>
+                <label class="col-sm-3 control-label is-required">委(村):</label>
                 <div class="col-sm-8">
-                    <select id="schoolId" name="schoolId" class="form-control select2-multiple">
-                        <option th:each="school:${schools}" th:value="${school.schoolId}" th:text="${school.schoolName}"></option>
+                    <select id="vId" name="vId" class="form-control select2-multiple" multiple>
+                        <option th:each="village:${villages}" th:value="${village.pvId}" th:text="${village.pvName}" ></option>
                     </select>
                 </div>
             </div>
@@ -36,7 +36,7 @@
     <th:block th:include="include :: footer" />
     <th:block th:include="include :: select2-js" />
     <script th:inline="javascript">
-        var prefix = ctx + "schooldistrict/index"
+        var prefix = ctx + "schooldistrict/config"
         $("#form-pv-add").validate({
             focusCleanup: true
         });
@@ -45,6 +45,10 @@
             if ($.validate.form()) {
                 var data = $("#form-pv-add").serializeArray();
                 var vIds = $.form.selectSelects("vId");
+                if (vIds == "") {
+                    $.modal.msg("请选择委(村)");
+                    return;
+                }
                 data.push({"name": "id", "value": vIds});
                 $.operate.save(prefix + "/add", data);
             }
@@ -60,25 +64,20 @@
 
         $(function() {
             $('#pId').select2({
-                placeholder: "请选择派出所",
-                allowClear: true
-            }).on('select2:select', function (e) {
-                //处理自己的业务
-                $.get("/schooldistrict/policestationvillage/getAllByParentId?parentId=" + this.value, function(result) {
+                placeholder: "请选择派出所"
+            }).on('change.select2', function (e) {
+                $.get("/schooldistrict/policestationvillage/getPolicestationVillagesByParentId?parentId=" + this.value, function(result) {
                     $('#vId').empty().select2({
                         data: getData(result),
-                        placeholder: "请选择委(村)",
-                        allowClear: true
+                        placeholder: "请选择委(村)"
                     });
                 });
-            });
+            }).trigger("change");
             $('#vId').select2({
-                placeholder: "请选择委(村)",
-                allowClear: true
+                placeholder: "请选择委(村)"
             });
             $('#schoolId').select2({
-                placeholder: "请选择学校",
-                allowClear: true
+                placeholder: "请选择学校"
             });
         })
     </script>

+ 21 - 29
sooka-admin/src/main/resources/templates/schooldistrict/index/index.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
 <head>
-    <th:block th:include="include :: header('关系中间列表')" />
+    <th:block th:include="include :: header('学区配置列表')" />
 </head>
 <body class="gray-bg">
      <div class="container-div">
@@ -32,16 +32,16 @@
             </div>
 
             <div class="btn-group-sm" id="toolbar" role="group">
-                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="schooldistrict:index:add">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="schooldistrict:config:add">
                     <i class="fa fa-plus"></i> 添加
                 </a>
-                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="schooldistrict:index:edit">
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="schooldistrict:config:edit">
                     <i class="fa fa-edit"></i> 修改
                 </a>
-                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="schooldistrict:index:remove">
+                <a class="btn btn-danger single disabled" onclick="$.operate.removeAll()" shiro:hasPermission="schooldistrict:config:remove">
                     <i class="fa fa-remove"></i> 删除
                 </a>
-                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="schooldistrict:index:export">
+                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="schooldistrict:config:export">
                     <i class="fa fa-download"></i> 导出
                 </a>
             </div>
@@ -52,10 +52,10 @@
     </div>
     <th:block th:include="include :: footer" />
     <script th:inline="javascript">
-        var editFlag = [[${@permission.hasPermi('schooldistrict:index:edit')}]];
-        var removeFlag = [[${@permission.hasPermi('schooldistrict:index:remove')}]];
+        var editFlag = [[${@permission.hasPermi('schooldistrict:config:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('schooldistrict:config:remove')}]];
         var types = [[${@dict.getType('school_type')}]];
-        var prefix = ctx + "schooldistrict/index";
+        var prefix = ctx + "schooldistrict/config";
 
         $(function() {
             var options = {
@@ -64,19 +64,26 @@
                 updateUrl: prefix + "/edit/{id}",
                 removeUrl: prefix + "/remove",
                 exportUrl: prefix + "/export",
-                modalName: "关系中间",
+                modalName: "学区配置",
+                singleSelect: true,
                 columns: [{
                     checkbox: true
                 },
                 {
                     field: 'id',
-                    title: '委(村)id',
+                    title: '委(村)主键',
                     visible: false
                 },
                 {
-                    field: 'pId',
-                    title: '派出所id',
-                    visible: false
+                    field: 'schoolType',
+                    title: '学校类型',
+                    formatter: function(value, row, index) {
+                        return $.table.selectDictLabel(types, value);
+                    }
+                },
+                {
+                    field: 'schoolName',
+                    title: '学校',
                 },
                 {
                     field: 'pName',
@@ -85,22 +92,7 @@
                 {
                     field: 'vName',
                     title: '委(村)',
-                },
-                {
-                    field: 'schoolId',
-                    title: '学校id',
-                    visible: false
-                },
-                {
-                    field: 'schoolName',
-                    title: '学校',
-                },
-                {
-                    field: 'schoolType',
-                    title: '学校类型',
-                    formatter: function(value, row, index) {
-                        return $.table.selectDictLabel(types, value);
-                    }
+                    width: '600px'
                 },
                 {
                     title: '操作',

+ 26 - 22
sooka-admin/src/main/resources/templates/schooldistrict/index/edit.html

@@ -1,34 +1,34 @@
 <!DOCTYPE html>
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
 <head>
-    <th:block th:include="include :: header('修改关系中间')" />
+    <th:block th:include="include :: header('修改学区配置')" />
     <th:block th:include="include :: select2-css" />
 </head>
 <body class="white-bg">
     <div class="wrapper wrapper-content animated fadeInRight ibox-content">
         <form class="form-horizontal m" id="form-pv-edit" th:object="${btpSchoolPv}">
             <div class="form-group">
-                <label class="col-sm-3 control-label is-required">派出所:</label>
+                <label class="col-sm-3 control-label is-required">学校:</label>
                 <div class="col-sm-8">
-                    <select id="pId" name="pId" th:field="*{pId}" class="form-control select2-multiple">
-                        <option th:each="policestation:${policestations}" th:value="${policestation.pvId}" th:text="${policestation.pvName}"></option>
+                    <select id="schoolId" name="schoolId" th:field="*{schoolId}" class="form-control select2-multiple">
+                        <option th:each="school:${schools}" th:value="${school.schoolId}" th:text="${school.schoolName}"></option>
                     </select>
                 </div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label is-required">委(村):</label>
+                <label class="col-sm-3 control-label is-required">派出所:</label>
                 <div class="col-sm-8">
-                    <select id="vId" class="form-control select2-multiple" multiple>
-                        <option th:each="village:${villages}" th:value="${village.pvId}" th:text="${village.pvName}"
-                                th:selected="${#arrays.contains(btpSchoolPv.id.split(','),village.pvId.toString())}"></option>
+                    <select id="pId" name="pId" th:field="*{pId}" class="form-control select2-multiple">
+                        <option th:each="policestation:${policestations}" th:value="${policestation.pvId}" th:text="${policestation.pvName}"></option>
                     </select>
                 </div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label is-required">学校:</label>
+                <label class="col-sm-3 control-label is-required">委(村):</label>
                 <div class="col-sm-8">
-                    <select id="schoolId" name="schoolId" th:field="*{schoolId}" class="form-control select2-multiple">
-                        <option th:each="school:${schools}" th:value="${school.schoolId}" th:text="${school.schoolName}"></option>
+                    <select id="vId" name="vId" class="form-control select2-multiple" multiple>
+                        <option th:each="village:${villages}" th:value="${village.pvId}" th:text="${village.pvName}"
+                                th:selected="${#arrays.contains(btpSchoolPv.id.split('_')[1].split(','),village.pvId.toString())}"></option>
                     </select>
                 </div>
             </div>
@@ -37,7 +37,7 @@
     <th:block th:include="include :: footer" />
     <th:block th:include="include :: select2-js" />
     <script th:inline="javascript">
-        var prefix = ctx + "schooldistrict/index";
+        var prefix = ctx + "schooldistrict/config", removeId = [[${btpSchoolPv.id}]];
         $("#form-pv-edit").validate({
             focusCleanup: true
         });
@@ -45,33 +45,37 @@
         function submitHandler() {
             if ($.validate.form()) {
                 var data = $("#form-pv-edit").serializeArray();
+                data.push({"name": "removeId", "value": removeId});
                 var vIds = $.form.selectSelects("vId");
                 data.push({"name": "id", "value": vIds});
                 $.operate.save(prefix + "/edit", data);
             }
         }
 
+        function getData(array) {
+            $.each(array, function (index, item) {
+                item.id = item.pvId;
+                item.text = item.pvName;
+            })
+            return array;
+        }
+
         $(function() {
             $('#pId').select2({
-                placeholder: "请选择派出所",
-                allowClear: true
+                placeholder: "请选择派出所"
             }).on('select2:select', function (e) {
-                //处理自己的业务
-                $.get("/schooldistrict/policestationvillage/getAllByParentId?parentId=" + this.value, function(result) {
+                $.get("/schooldistrict/policestationvillage/getPolicestationVillagesByParentId?parentId=" + this.value, function(result) {
                     $('#vId').empty().select2({
                         data: getData(result),
-                        placeholder: "请选择委(村)",
-                        allowClear: true
+                        placeholder: "请选择委(村)"
                     });
                 });
             });
             $('#vId').select2({
-                placeholder: "请选择委(村)",
-                allowClear: true
+                placeholder: "请选择委(村)"
             });
             $('#schoolId').select2({
-                placeholder: "请选择学校",
-                allowClear: true
+                placeholder: "请选择学校"
             });
         })
     </script>

+ 1 - 2
sooka-admin/src/main/resources/templates/schooldistrict/policestationvillage/add.html

@@ -39,8 +39,7 @@
 
     $(function() {
         $('#parentId').select2({
-            placeholder: "请选择所属派出所",
-            allowClear: true
+            placeholder: "请选择所属派出所"
         });
         if ("0" == [[${parentId}]]) {
             $("#parentId").select2("val", [0]);

+ 2 - 3
sooka-admin/src/main/resources/templates/schooldistrict/policestationvillage/edit.html

@@ -17,7 +17,7 @@
         <div class="form-group" th:style="'display:' + ${display}">
             <label class="col-sm-3 control-label is-required">所属派出所:</label>
             <div class="col-sm-8">
-                <select id="parentId" name="parentId" class="form-control select2-multiple" required>
+                <select id="parentId" name="parentId" th:field="*{parentId}" class="form-control select2-multiple" required>
                     <option th:each="policestation:${policestations}" th:value="${policestation.pvId}" th:text="${policestation.pvName}"></option>
                 </select>
             </div>
@@ -40,8 +40,7 @@
 
     $(function() {
         $('#parentId').select2({
-            placeholder: "请选择所属派出所",
-            allowClear: true
+            placeholder: "请选择所属派出所"
         });
     })
 </script>

+ 36 - 30
sooka-admin/src/main/resources/templates/schooldistrict/policestationvillage/policestationvillage.html

@@ -14,6 +14,13 @@
                             [[${pageMark}]]名称:
                             <input type="text" name="pvName"/>
                         </li>
+                        <li id="parentName" style="display: none">
+                            所属派出所:
+                            <select name="parentName">
+                                <option value="">所有</option>
+                                <option th:each="policestation:${policestations}" th:text="${policestation.pvName}" th:value="${policestation.pvId}"></option>
+                            </select>
+                        </li>
                         <li>
                             <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                             <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@@ -46,7 +53,10 @@
 <script th:inline="javascript">
     var editFlag = [[${@permission.hasPermi('schooldistrict:policestationvillage:edit')}]];
     var removeFlag = [[${@permission.hasPermi('schooldistrict:policestationvillage:remove')}]];
-    var prefix = ctx + "schooldistrict/policestationvillage", parentId = '[[${parentId}]]';
+    var prefix = ctx + "schooldistrict/policestationvillage", parentId = [[${parentId}]];
+    if (parentId != 0) {
+        $("#parentName").show();
+    }
 
     $(function() {
         var options = {
@@ -59,36 +69,32 @@
             columns: [{
                 checkbox: true
             },
-                {
-                    field: 'pvId',
-                    title: '派出所、委(村)id',
-                    visible: false
-                },
-                {
-                    field: 'pvName',
-                    title: [[${pageMark}]] + '名称'
-                },
-                {
-                    field: 'parentId',
-                    title: '上级id,0为派出所,其他为委(村)',
-                    visible: false
-                },
-                {
-                    field: 'parentName',
-                    title: '所属派出所',
-                    visible: 0 != parentId
-                },
-                {
-                    title: '操作',
-                    align: 'center',
-                    formatter: function(value, row, index) {
-                        var actions = [];
-                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.pvId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
-                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.pvId + '\')"><i class="fa fa-remove"></i>删除</a>');
-                        return actions.join('');
-                    }
-                }]
+            {
+                field: 'pvId',
+                title: [[${pageMark}]] + '主键',
+                visible: false
+            },
+            {
+                field: 'pvName',
+                title: [[${pageMark}]] + '名称'
+            }]
         };
+        if (0 != parentId) {
+            options.columns.push({
+                field: 'parentName',
+                title: '所属派出所'
+            });
+        }
+        options.columns.push({
+            title: '操作',
+            align: 'center',
+            formatter: function(value, row, index) {
+                var actions = [];
+                actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.pvId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.pvId + '\')"><i class="fa fa-remove"></i>删除</a>');
+                return actions.join('');
+            }
+        });
         $.table.init(options);
     });
 </script>

+ 80 - 0
sooka-admin/src/main/resources/templates/schooldistrict/querystatistics.html

@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+	<th:block th:include="include :: header('查询统计')" />
+	<th:block th:include="include :: bootstrap-select-css" />
+</head>
+<body class="gray-bg">
+	<div class="container-div">
+		<div class="row">
+			<div class="col-sm-12 search-collapse">
+				<form id="operlog-form">
+					<div class="select-list">
+						<ul>
+							<li class="select-time">
+								<label>查询时间: </label>
+								<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
+								<span>-</span>
+								<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
+							</li>
+							<li>
+								<label>区间:</label>
+								<select name="params[format]">
+									<option th:text="年" th:value="'%Y'"></option>
+									<option th:text="月" th:value="'%Y-%m'"></option>
+									<option th:text="日" th:value="'%Y-%m-%d'"></option>
+									<option th:text="时" th:value="'%Y-%m-%d %H'"></option>
+								</select>
+							</li>
+							<li>
+								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+							</li>
+						</ul>
+					</div>
+				</form>
+			</div>
+	        
+			<div class="col-sm-12 select-table table-striped">
+				<table id="bootstrap-table"></table>
+			</div>
+		</div>
+	</div>
+	
+	<th:block th:include="include :: footer" />
+	<th:block th:include="include :: bootstrap-select-js" />
+	<script th:inline="javascript">
+		var prefix = ctx + "schooldistrict/querystatistics";
+
+		$(function() {
+		    var options = {
+		        url: prefix + "/list",
+		        exportUrl: prefix + "/export",
+		        sortName: "time",
+		        sortOrder: "desc",
+		        modalName: "查询统计",
+		        escape: true,
+		        showPageGo: true,
+		        rememberSelected: true,
+		        columns: [{
+		        	field: 'state',
+		            checkbox: true
+		        },
+				{
+					field: 'ip',
+					title: '地址'
+				},
+		        {
+		            field: 'time',
+		            title: '时间'
+		        },
+		        {
+		            field: 'count',
+		            title: '查询次数'
+		        }]
+		    };
+		    $.table.init(options);
+		});
+	</script>
+</body>
+</html>

+ 1 - 1
sooka-admin/src/main/resources/templates/schooldistrict/school/school.html

@@ -69,7 +69,7 @@
                 },
                 {
                     field: 'schoolId',
-                    title: '学校id',
+                    title: '学校主键',
                     visible: false
                 },
                 {

+ 3 - 3
sooka-admin/src/main/resources/templates/system/notice/edit.html

@@ -52,9 +52,9 @@
     <th:block th:include="include :: summernote-js" />
     <script type="text/javascript">
         var prefix = ctx + "system/notice";
-        if ('[[${notice.noticeId}]]' == 10) {
-            $("#startTime").val('[[${notice.noticeContent}]]'.split(",")[0]);
-            $("#endTime").val('[[${notice.noticeContent}]]'.split(",")[1]);
+        if ([[${notice.noticeType}]] == 3) {
+            $("#startTime").val('[[${notice.noticeContent}]]'.split("")[0]);
+            $("#endTime").val('[[${notice.noticeContent}]]'.split("")[1]);
             $("#remark").hide(), $("#openTime").show();
         }
 

+ 15 - 12
sooka-admin/src/main/resources/templates/system/notice/notice.html

@@ -53,7 +53,7 @@
         var editFlag = [[${@permission.hasPermi('system:notice:edit')}]];
         var removeFlag = [[${@permission.hasPermi('system:notice:remove')}]];
         var types = [[${@dict.getType('sys_notice_type')}]];
-        var datas = [[${@dict.getType('sys_notice_status')}]];
+        // var datas = [[${@dict.getType('sys_notice_status')}]];
         var prefix = ctx + "system/notice";
 
         $(function() {
@@ -65,16 +65,14 @@
                 modalName: "公告",
 				showSearch: false,
                 columns: [{
-		            checkbox: true
-		        },
-				{
 					field : 'noticeId', 
-					title : '序号' 
+					title : '序号',
+					visible: false
 				},
-				{
+				/*{
 					field : 'noticeTitle', 
 					title : '公告标题' 
-				},
+				},*/
 				{
 		            field: 'noticeType',
 		            title: '公告类型',
@@ -84,20 +82,25 @@
 		            }
 		        },
 				{
+					field: 'noticeContent',
+					title: '公告内容',
+					width: '800px'
+				},
+			/*	{
 		            field: 'status',
 		            title: '状态',
 		            align: 'center',
 		            formatter: function(value, row, index) {
 		            	return $.table.selectDictLabel(datas, value);
 		            }
-		        },
+		        },*/
 				{
-					field : 'createBy', 
-					title : '创建者' 
+					field : 'updateBy',
+					title : '更新者'
 				},
 				{
-		            field: 'createTime',
-		            title: '创建时间',
+		            field: 'updateTime',
+		            title: '更新时间',
 		            sortable: true
 		        },
 		        {

+ 0 - 62
sooka-business/src/main/java/com/sooka/business/schooldistrict/mapper/BtpSchoolPvMapper.java

@@ -1,62 +0,0 @@
-package com.sooka.business.schooldistrict.mapper;
-
-import com.sooka.business.schooldistrict.domain.BtpSchoolPv;
-
-import java.util.List;
-
-/**
- * 学区查询Mapper接口
- *
- * @author lyq
- * @date 2023-02-20
- */
-public interface BtpSchoolPvMapper {
-
-    /**
-     * 查询学区
-     *
-     * @param vIds 学区主键
-     * @return 学区
-     */
-    public BtpSchoolPv selectBtpSchoolPvInVIds(String vIds);
-
-    /**
-     * 查询学区列表
-     *
-     * @param btpSchoolPv 学区
-     * @return 学区集合
-     */
-    public List<BtpSchoolPv> selectBtpSchoolPvList(BtpSchoolPv btpSchoolPv);
-
-    /**
-     * 新增学区
-     *
-     * @param btpSchoolPv 学区
-     * @return 结果
-     */
-    public int insertBtpSchoolPv(BtpSchoolPv btpSchoolPv);
-
-    /**
-     * 修改学区
-     *
-     * @param btpSchoolPv 学区
-     * @return 结果
-     */
-    public int updateBtpSchoolPv(BtpSchoolPv btpSchoolPv);
-
-    /**
-     * 删除学区
-     *
-     * @param pId 学区主键
-     * @return 结果
-     */
-    public int deleteBtpSchoolPvByPId(Long pId);
-
-    /**
-     * 批量删除学区
-     *
-     * @param pIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteBtpSchoolPvByVIds(String[] vIds);
-}

+ 0 - 62
sooka-business/src/main/java/com/sooka/business/schooldistrict/service/IBtpSchoolPvService.java

@@ -1,62 +0,0 @@
-package com.sooka.business.schooldistrict.service;
-
-import com.sooka.business.schooldistrict.domain.BtpSchoolPv;
-
-import java.util.List;
-
-/**
- * 关系中间Service接口
- *
- * @author lyq
- * @date 2023-02-20
- */
-public interface IBtpSchoolPvService {
-
-    /**
-     * 查询关系中间
-     *
-     * @param vIds 关系中间主键
-     * @return 关系中间
-     */
-    public BtpSchoolPv selectBtpSchoolPvInVIds(String vIds);
-
-    /**
-     * 查询关系中间列表
-     *
-     * @param btpSchoolPv 关系中间
-     * @return 关系中间集合
-     */
-    public List<BtpSchoolPv> selectBtpSchoolPvList(BtpSchoolPv btpSchoolPv);
-
-    /**
-     * 新增关系中间
-     *
-     * @param btpSchoolPv 关系中间
-     * @return 结果
-     */
-    public int insertBtpSchoolPv(BtpSchoolPv btpSchoolPv);
-
-    /**
-     * 修改学区
-     *
-     * @param btpSchoolPv 学区
-     * @return 结果
-     */
-    public int updateBtpSchoolPv(BtpSchoolPv btpSchoolPv);
-
-    /**
-     * 批量删除学区
-     *
-     * @param pIds 需要删除的学区主键集合
-     * @return 结果
-     */
-    public int deleteBtpSchoolPvByVIds(String vIds);
-
-    /**
-     * 删除学区信息
-     *
-     * @param pId 学区主键
-     * @return 结果
-     */
-    public int deleteBtpSchoolPvByPId(Long pId);
-}

+ 0 - 97
sooka-business/src/main/java/com/sooka/business/schooldistrict/service/impl/BtpSchoolPvServiceImpl.java

@@ -1,97 +0,0 @@
-package com.sooka.business.schooldistrict.service.impl;
-
-import com.sooka.business.schooldistrict.domain.BtpSchoolPv;
-import com.sooka.business.schooldistrict.mapper.BtpSchoolPvMapper;
-import com.sooka.business.schooldistrict.service.IBtpSchoolPvService;
-import com.sooka.common.core.text.Convert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-
-/**
- * 学区查询Service业务层处理
- *
- * @author lyq
- * @date 2023-02-20
- */
-@Service
-public class BtpSchoolPvServiceImpl implements IBtpSchoolPvService {
-
-    @Autowired
-    private BtpSchoolPvMapper btpSchoolPvMapper;
-
-    /**
-     * 查询学区
-     *
-     * @param vIds 学区主键
-     * @return 学区
-     */
-    @Override
-    public BtpSchoolPv selectBtpSchoolPvInVIds(String vIds) {
-        return btpSchoolPvMapper.selectBtpSchoolPvInVIds(vIds);
-    }
-
-    /**
-     * 查询学区列表
-     *
-     * @param btpSchoolPv 学区
-     * @return 学区
-     */
-    @Override
-    public List<BtpSchoolPv> selectBtpSchoolPvList(BtpSchoolPv btpSchoolPv) {
-        return btpSchoolPvMapper.selectBtpSchoolPvList(btpSchoolPv);
-    }
-
-    /**
-     * 新增学区
-     *
-     * @param btpSchoolPv 学区
-     * @return 结果
-     */
-    @Override
-    public int insertBtpSchoolPv(BtpSchoolPv btpSchoolPv) {
-        int result = 0;
-        for (String vId : btpSchoolPv.getId().split(",")) {
-            btpSchoolPv.setvId(Long.parseLong(vId));
-            result += btpSchoolPvMapper.insertBtpSchoolPv(btpSchoolPv);
-        }
-        return result;
-    }
-
-    /**
-     * 修改学区
-     *
-     * @param btpSchoolPv 学区
-     * @return 结果
-     */
-    @Transactional
-    @Override
-    public int updateBtpSchoolPv(BtpSchoolPv btpSchoolPv) {
-        this.deleteBtpSchoolPvByVIds(btpSchoolPv.getId());
-        return this.insertBtpSchoolPv(btpSchoolPv);
-    }
-
-    /**
-     * 批量删除学区
-     *
-     * @param pIds 需要删除的学区主键
-     * @return 结果
-     */
-    @Override
-    public int deleteBtpSchoolPvByVIds(String vIds) {
-        return btpSchoolPvMapper.deleteBtpSchoolPvByVIds(Convert.toStrArray(vIds));
-    }
-
-    /**
-     * 删除学区信息
-     *
-     * @param pId 学区主键
-     * @return 结果
-     */
-    @Override
-    public int deleteBtpSchoolPvByPId(Long pId) {
-        return btpSchoolPvMapper.deleteBtpSchoolPvByPId(pId);
-    }
-}

+ 1 - 1
sooka-framework/src/main/java/com/sooka/framework/config/ShiroConfig.java

@@ -294,7 +294,7 @@ public class ShiroConfig
         // 不需要拦截的访问
         filterChainDefinitionMap.put("/login", "anon,captchaValidate");
         filterChainDefinitionMap.put("/system/main", "anon,captchaValidate");
-        filterChainDefinitionMap.put("/schooldistrict/policestationvillage/getAllByParentId", "anon,captchaValidate");
+        filterChainDefinitionMap.put("/schooldistrict/policestationvillage/getPolicestationVillagesByParentId", "anon,captchaValidate");
         filterChainDefinitionMap.put("/system/select", "anon,captchaValidate");
         // 注册相关
         filterChainDefinitionMap.put("/register", "anon,captchaValidate");

+ 2 - 2
sooka-business/pom.xml

@@ -9,10 +9,10 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>sooka-business</artifactId>
+    <artifactId>sooka-schooldistrict</artifactId>
 
     <description>
-        business业务模块
+        schooldistrict学区管理
     </description>
 
     <dependencies>

+ 1 - 1
sooka-business/src/main/java/com/sooka/business/schooldistrict/domain/BtpPolicestationVillage.java

@@ -1,4 +1,4 @@
-package com.sooka.business.schooldistrict.domain;
+package com.sooka.schooldistrict.domain;
 
 import com.sooka.common.annotation.Excel;
 import com.sooka.common.core.domain.BaseEntity;

+ 1 - 1
sooka-business/src/main/java/com/sooka/business/schooldistrict/domain/BtpSchool.java

@@ -1,4 +1,4 @@
-package com.sooka.business.schooldistrict.domain;
+package com.sooka.schooldistrict.domain;
 
 import com.sooka.common.annotation.Excel;
 import com.sooka.common.core.domain.BaseEntity;

+ 30 - 32
sooka-business/src/main/java/com/sooka/business/schooldistrict/domain/BtpSchoolPv.java

@@ -1,4 +1,4 @@
-package com.sooka.business.schooldistrict.domain;
+package com.sooka.schooldistrict.domain;
 
 import com.sooka.common.annotation.Excel;
 import com.sooka.common.core.domain.BaseEntity;
@@ -6,7 +6,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
 /**
- * 关系中间对象 btp_school_pv
+ * 学区配置对象 btp_school_pv
  *
  * @author lyq
  * @date 2023-02-20
@@ -22,26 +22,27 @@ public class BtpSchoolPv extends BaseEntity {
      */
     private Long pId;
 
-    @Excel(name = "派出所")
-    private String pName;
-
     /**
      * 委(村)id
      */
     private Long vId;
 
-    @Excel(name = "委(村)")
-    private String vName;
-
     /**
      * 学校id
      */
     private Long schoolId;
 
+    @Excel(name = "学校类型", dictType = "school_type")
+    private String schoolType;
+
     @Excel(name = "学校")
     private String schoolName;
 
-    private String schoolType;
+    @Excel(name = "派出所")
+    private String pName;
+
+    @Excel(name = "委(村)")
+    private String vName;
 
     public String getId() {
         return id;
@@ -59,14 +60,6 @@ public class BtpSchoolPv extends BaseEntity {
         this.pId = pId;
     }
 
-    public String getpName() {
-        return pName;
-    }
-
-    public void setpName(String pName) {
-        this.pName = pName;
-    }
-
     public Long getvId() {
         return vId;
     }
@@ -75,14 +68,6 @@ public class BtpSchoolPv extends BaseEntity {
         this.vId = vId;
     }
 
-    public String getvName() {
-        return vName;
-    }
-
-    public void setvName(String vName) {
-        this.vName = vName;
-    }
-
     public Long getSchoolId() {
         return schoolId;
     }
@@ -91,6 +76,14 @@ public class BtpSchoolPv extends BaseEntity {
         this.schoolId = schoolId;
     }
 
+    public String getSchoolType() {
+        return schoolType;
+    }
+
+    public void setSchoolType(String schoolType) {
+        this.schoolType = schoolType;
+    }
+
     public String getSchoolName() {
         return schoolName;
     }
@@ -99,23 +92,28 @@ public class BtpSchoolPv extends BaseEntity {
         this.schoolName = schoolName;
     }
 
-    public String getSchoolType() {
-        return schoolType;
+    public String getvName() {
+        return vName;
     }
 
-    public void setSchoolType(String schoolType) {
-        this.schoolType = schoolType;
+    public void setvName(String vName) {
+        this.vName = vName;
+    }
+
+    public String getpName() {
+        return pName;
+    }
+
+    public void setpName(String pName) {
+        this.pName = pName;
     }
 
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                 .append("pId", getpId())
-                .append("pName", getpName())
                 .append("vId", getvId())
-                .append("vName", getvName())
                 .append("schoolId", getSchoolId())
-                .append("schoolName", getSchoolName())
                 .toString();
     }
 }

+ 15 - 21
sooka-business/src/main/java/com/sooka/business/schooldistrict/mapper/BtpPolicestationVillageMapper.java

@@ -1,6 +1,6 @@
-package com.sooka.business.schooldistrict.mapper;
+package com.sooka.schooldistrict.mapper;
 
-import com.sooka.business.schooldistrict.domain.BtpPolicestationVillage;
+import com.sooka.schooldistrict.domain.BtpPolicestationVillage;
 
 import java.util.List;
 
@@ -18,15 +18,7 @@ public interface BtpPolicestationVillageMapper {
      * @param pvId 派出所、委(村)主键
      * @return 派出所、委(村)
      */
-    public BtpPolicestationVillage selectBtpPolicestationVillageByPvId(Long pvId);
-
-    /**
-     * 查询派出所、委(村)
-     *
-     * @param parentId 派出所、委(村)父级id
-     * @return 派出所、委(村)
-     */
-    public List<BtpPolicestationVillage> getAllByParentId(Long parentId);
+    BtpPolicestationVillage selectBtpPolicestationVillageByPvId(Long pvId);
 
     /**
      * 查询派出所、委(村)列表
@@ -34,7 +26,7 @@ public interface BtpPolicestationVillageMapper {
      * @param btpPolicestationVillage 派出所、委(村)
      * @return 派出所、委(村)集合
      */
-    public List<BtpPolicestationVillage> selectBtpPolicestationVillageList(BtpPolicestationVillage btpPolicestationVillage);
+    List<BtpPolicestationVillage> selectBtpPolicestationVillageList(BtpPolicestationVillage btpPolicestationVillage);
 
     /**
      * 新增派出所、委(村)
@@ -42,7 +34,7 @@ public interface BtpPolicestationVillageMapper {
      * @param btpPolicestationVillage 派出所、委(村)
      * @return 结果
      */
-    public int insertBtpPolicestationVillage(BtpPolicestationVillage btpPolicestationVillage);
+    int insertBtpPolicestationVillage(BtpPolicestationVillage btpPolicestationVillage);
 
     /**
      * 修改派出所、委(村)
@@ -50,21 +42,23 @@ public interface BtpPolicestationVillageMapper {
      * @param btpPolicestationVillage 派出所、委(村)
      * @return 结果
      */
-    public int updateBtpPolicestationVillage(BtpPolicestationVillage btpPolicestationVillage);
+    int updateBtpPolicestationVillage(BtpPolicestationVillage btpPolicestationVillage);
 
     /**
-     * 删除派出所、委(村)
+     * 批量删除派出所、委(村)
      *
-     * @param pvId 派出所、委(村)主键
+     * @param pvIds 需要删除的数据主键集合
      * @return 结果
      */
-    public int deleteBtpPolicestationVillageByPvId(Long pvId);
+    int deleteBtpPolicestationVillageByPvIds(String[] pvIds);
+
+    int getSubResources(String[] ids);
 
     /**
-     * 批量删除派出所、委(村)
+     * 查询派出所、委(村)
      *
-     * @param pvIds 需要删除的数据主键集合
-     * @return 结果
+     * @param parentId 派出所、委(村)父级id
+     * @return 派出所、委(村)
      */
-    public int deleteBtpPolicestationVillageByPvIds(String[] pvIds);
+    List<BtpPolicestationVillage> getPolicestationVillagesByParentId(Long parentId);
 }

+ 7 - 15
sooka-business/src/main/java/com/sooka/business/schooldistrict/mapper/BtpSchoolMapper.java

@@ -1,6 +1,6 @@
-package com.sooka.business.schooldistrict.mapper;
+package com.sooka.schooldistrict.mapper;
 
-import com.sooka.business.schooldistrict.domain.BtpSchool;
+import com.sooka.schooldistrict.domain.BtpSchool;
 
 import java.util.List;
 
@@ -18,7 +18,7 @@ public interface BtpSchoolMapper {
      * @param schoolId 学校主键
      * @return 学校
      */
-    public BtpSchool selectBtpSchoolBySchoolId(Long schoolId);
+    BtpSchool selectBtpSchoolBySchoolId(Long schoolId);
 
     /**
      * 查询学校列表
@@ -26,7 +26,7 @@ public interface BtpSchoolMapper {
      * @param btpSchool 学校
      * @return 学校集合
      */
-    public List<BtpSchool> selectBtpSchoolList(BtpSchool btpSchool);
+    List<BtpSchool> selectBtpSchoolList(BtpSchool btpSchool);
 
     /**
      * 新增学校
@@ -34,7 +34,7 @@ public interface BtpSchoolMapper {
      * @param btpSchool 学校
      * @return 结果
      */
-    public int insertBtpSchool(BtpSchool btpSchool);
+    int insertBtpSchool(BtpSchool btpSchool);
 
     /**
      * 修改学校
@@ -42,15 +42,7 @@ public interface BtpSchoolMapper {
      * @param btpSchool 学校
      * @return 结果
      */
-    public int updateBtpSchool(BtpSchool btpSchool);
-
-    /**
-     * 删除学校
-     *
-     * @param schoolId 学校主键
-     * @return 结果
-     */
-    public int deleteBtpSchoolBySchoolId(Long schoolId);
+    int updateBtpSchool(BtpSchool btpSchool);
 
     /**
      * 批量删除学校
@@ -58,5 +50,5 @@ public interface BtpSchoolMapper {
      * @param schoolIds 需要删除的数据主键集合
      * @return 结果
      */
-    public int deleteBtpSchoolBySchoolIds(String[] schoolIds);
+    int deleteBtpSchoolBySchoolIds(String[] schoolIds);
 }

+ 59 - 0
sooka-schooldistrict/src/main/java/com/sooka/schooldistrict/mapper/BtpSchoolPvMapper.java

@@ -0,0 +1,59 @@
+package com.sooka.schooldistrict.mapper;
+
+import com.sooka.schooldistrict.domain.BtpSchoolPv;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 学区配置Mapper接口
+ *
+ * @author lyq
+ * @date 2023-02-20
+ */
+public interface BtpSchoolPvMapper {
+
+    /**
+     * 查询学区配置
+     *
+     * @param vIds 学区配置的委(村)主键
+     * @return 学区配置
+     */
+    BtpSchoolPv selectBtpSchoolPvBySchoolIdAndVId(@Param("schoolId") String schoolId, @Param("vIds") String[] vIds);
+
+    /**
+     * 查询学区配置列表
+     *
+     * @param btpSchoolPv 学区配置
+     * @return 学区配置集合
+     */
+    List<BtpSchoolPv> selectBtpSchoolPvList(BtpSchoolPv btpSchoolPv);
+
+    /**
+     * 新增学区配置
+     *
+     * @param btpSchoolPv 学区配置
+     * @return 结果
+     */
+    int insertBtpSchoolPv(BtpSchoolPv btpSchoolPv);
+
+    /**
+     * 修改学区配置
+     *
+     * @param btpSchoolPv 学区配置
+     * @return 结果
+     */
+    int updateBtpSchoolPv(BtpSchoolPv btpSchoolPv);
+
+    /**
+     * 批量删除学区配置
+     *
+     * @param vIds 需要删除的学区配置的委(村)主键集合
+     * @return 结果
+     */
+    int deleteBtpSchoolPvBySchoolIdAndVIds(@Param("schoolId") String schoolId, @Param("vIds") String[] vIds);
+
+    List<BtpSchoolPv> getBtpSchoolPvsInSchoolIds(String[] schoolIds);
+
+    List<String> getSchoolName(BtpSchoolPv btpSchoolPv);
+}

+ 13 - 19
sooka-business/src/main/java/com/sooka/business/schooldistrict/service/IBtpPolicestationVillageService.java

@@ -1,6 +1,6 @@
-package com.sooka.business.schooldistrict.service;
+package com.sooka.schooldistrict.service;
 
-import com.sooka.business.schooldistrict.domain.BtpPolicestationVillage;
+import com.sooka.schooldistrict.domain.BtpPolicestationVillage;
 
 import java.util.List;
 
@@ -18,15 +18,7 @@ public interface IBtpPolicestationVillageService {
      * @param pvId 派出所、委(村)主键
      * @return 派出所、委(村)
      */
-    public BtpPolicestationVillage selectBtpPolicestationVillageByPvId(Long pvId);
-
-    /**
-     * 查询派出所、委(村)
-     *
-     * @param parentId 派出所、委(村)父级id
-     * @return 派出所、委(村)
-     */
-    public List<BtpPolicestationVillage> getAllByParentId(Long parentId);
+    BtpPolicestationVillage selectBtpPolicestationVillageByPvId(Long pvId);
 
     /**
      * 查询派出所、委(村)列表
@@ -34,7 +26,7 @@ public interface IBtpPolicestationVillageService {
      * @param btpPolicestationVillage 派出所、委(村)
      * @return 派出所、委(村)集合
      */
-    public List<BtpPolicestationVillage> selectBtpPolicestationVillageList(BtpPolicestationVillage btpPolicestationVillage);
+    List<BtpPolicestationVillage> selectBtpPolicestationVillageList(BtpPolicestationVillage btpPolicestationVillage);
 
     /**
      * 新增派出所、委(村)
@@ -42,7 +34,7 @@ public interface IBtpPolicestationVillageService {
      * @param btpPolicestationVillage 派出所、委(村)
      * @return 结果
      */
-    public int insertBtpPolicestationVillage(BtpPolicestationVillage btpPolicestationVillage);
+    int insertBtpPolicestationVillage(BtpPolicestationVillage btpPolicestationVillage);
 
     /**
      * 修改派出所、委(村)
@@ -50,7 +42,7 @@ public interface IBtpPolicestationVillageService {
      * @param btpPolicestationVillage 派出所、委(村)
      * @return 结果
      */
-    public int updateBtpPolicestationVillage(BtpPolicestationVillage btpPolicestationVillage);
+    int updateBtpPolicestationVillage(BtpPolicestationVillage btpPolicestationVillage);
 
     /**
      * 批量删除派出所、委(村)
@@ -58,13 +50,15 @@ public interface IBtpPolicestationVillageService {
      * @param pvIds 需要删除的派出所、委(村)主键集合
      * @return 结果
      */
-    public int deleteBtpPolicestationVillageByPvIds(String pvIds);
+    int deleteBtpPolicestationVillageByPvIds(String pvIds);
+
+    int getSubResources(String ids);
 
     /**
-     * 删除派出所、委(村)信息
+     * 查询派出所、委(村)
      *
-     * @param pvId 派出所、委(村)主键
-     * @return 结果
+     * @param parentId 派出所、委(村)父级id
+     * @return 派出所、委(村)
      */
-    public int deleteBtpPolicestationVillageByPvId(Long pvId);
+    List<BtpPolicestationVillage> getPolicestationVillagesByParentId(Long parentId);
 }

+ 50 - 0
sooka-schooldistrict/src/main/java/com/sooka/schooldistrict/service/IBtpSchoolPvService.java

@@ -0,0 +1,50 @@
+package com.sooka.schooldistrict.service;
+
+import com.sooka.schooldistrict.domain.BtpSchoolPv;
+
+import java.util.List;
+
+/**
+ * 学区配置Service接口
+ *
+ * @author lyq
+ * @date 2023-02-20
+ */
+public interface IBtpSchoolPvService {
+
+    /**
+     * 查询学区配置
+     *
+     * @param vIds 学区配置的委(村)主键
+     * @return 学区配置
+     */
+    BtpSchoolPv selectBtpSchoolPvBySchoolIdAndVId(String id);
+
+    /**
+     * 查询学区配置列表
+     *
+     * @param btpSchoolPv 学区配置
+     * @return 学区配置集合
+     */
+    List<BtpSchoolPv> selectBtpSchoolPvList(BtpSchoolPv btpSchoolPv);
+
+    /**
+     * 新增学区配置
+     *
+     * @param btpSchoolPv 学区配置
+     * @return 结果
+     */
+    int insertBtpSchoolPv(BtpSchoolPv btpSchoolPv);
+
+    /**
+     * 批量删除学区
+     *
+     * @param vIds 需要删除的学区配置的委(村)主键集合
+     * @return 结果
+     */
+    int deleteBtpSchoolPvBySchoolIdAndVIds(String id);
+
+    List<BtpSchoolPv> getBtpSchoolPvsInSchoolIds(String schoolIds);
+
+    List<String> getSchoolName(BtpSchoolPv btpSchoolPv);
+}

+ 7 - 15
sooka-business/src/main/java/com/sooka/business/schooldistrict/service/IBtpSchoolService.java

@@ -1,6 +1,6 @@
-package com.sooka.business.schooldistrict.service;
+package com.sooka.schooldistrict.service;
 
-import com.sooka.business.schooldistrict.domain.BtpSchool;
+import com.sooka.schooldistrict.domain.BtpSchool;
 
 import java.util.List;
 
@@ -18,7 +18,7 @@ public interface IBtpSchoolService {
      * @param schoolId 学校主键
      * @return 学校
      */
-    public BtpSchool selectBtpSchoolBySchoolId(Long schoolId);
+    BtpSchool selectBtpSchoolBySchoolId(Long schoolId);
 
     /**
      * 查询学校列表
@@ -26,7 +26,7 @@ public interface IBtpSchoolService {
      * @param btpSchool 学校
      * @return 学校集合
      */
-    public List<BtpSchool> selectBtpSchoolList(BtpSchool btpSchool);
+    List<BtpSchool> selectBtpSchoolList(BtpSchool btpSchool);
 
     /**
      * 新增学校
@@ -34,7 +34,7 @@ public interface IBtpSchoolService {
      * @param btpSchool 学校
      * @return 结果
      */
-    public int insertBtpSchool(BtpSchool btpSchool);
+    int insertBtpSchool(BtpSchool btpSchool);
 
     /**
      * 修改学校
@@ -42,7 +42,7 @@ public interface IBtpSchoolService {
      * @param btpSchool 学校
      * @return 结果
      */
-    public int updateBtpSchool(BtpSchool btpSchool);
+    int updateBtpSchool(BtpSchool btpSchool);
 
     /**
      * 批量删除学校
@@ -50,13 +50,5 @@ public interface IBtpSchoolService {
      * @param schoolIds 需要删除的学校主键集合
      * @return 结果
      */
-    public int deleteBtpSchoolBySchoolIds(String schoolIds);
-
-    /**
-     * 删除学校信息
-     *
-     * @param schoolId 学校主键
-     * @return 结果
-     */
-    public int deleteBtpSchoolBySchoolId(Long schoolId);
+    int deleteBtpSchoolBySchoolIds(String schoolIds);
 }

+ 18 - 20
sooka-business/src/main/java/com/sooka/business/schooldistrict/service/impl/BtpPolicestationVillageServiceImpl.java

@@ -1,11 +1,12 @@
-package com.sooka.business.schooldistrict.service.impl;
+package com.sooka.schooldistrict.service.impl;
 
-import com.sooka.business.schooldistrict.domain.BtpPolicestationVillage;
-import com.sooka.business.schooldistrict.mapper.BtpPolicestationVillageMapper;
-import com.sooka.business.schooldistrict.service.IBtpPolicestationVillageService;
 import com.sooka.common.core.text.Convert;
+import com.sooka.schooldistrict.domain.BtpPolicestationVillage;
+import com.sooka.schooldistrict.mapper.BtpPolicestationVillageMapper;
+import com.sooka.schooldistrict.service.IBtpPolicestationVillageService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
 
@@ -33,17 +34,6 @@ public class BtpPolicestationVillageServiceImpl implements IBtpPolicestationVill
     }
 
     /**
-     * 查询派出所、委(村)
-     *
-     * @param parentId 派出所、委(村)父级id
-     * @return 派出所、委(村)
-     */
-    @Override
-    public List<BtpPolicestationVillage> getAllByParentId(Long parentId) {
-        return btpPolicestationVillageMapper.getAllByParentId(parentId);
-    }
-
-    /**
      * 查询派出所、委(村)列表
      *
      * @param btpPolicestationVillage 派出所、委(村)
@@ -60,6 +50,7 @@ public class BtpPolicestationVillageServiceImpl implements IBtpPolicestationVill
      * @param btpPolicestationVillage 派出所、委(村)
      * @return 结果
      */
+    @Transactional
     @Override
     public int insertBtpPolicestationVillage(BtpPolicestationVillage btpPolicestationVillage) {
         return btpPolicestationVillageMapper.insertBtpPolicestationVillage(btpPolicestationVillage);
@@ -71,6 +62,7 @@ public class BtpPolicestationVillageServiceImpl implements IBtpPolicestationVill
      * @param btpPolicestationVillage 派出所、委(村)
      * @return 结果
      */
+    @Transactional
     @Override
     public int updateBtpPolicestationVillage(BtpPolicestationVillage btpPolicestationVillage) {
         return btpPolicestationVillageMapper.updateBtpPolicestationVillage(btpPolicestationVillage);
@@ -82,19 +74,25 @@ public class BtpPolicestationVillageServiceImpl implements IBtpPolicestationVill
      * @param pvIds 需要删除的派出所、委(村)主键
      * @return 结果
      */
+    @Transactional
     @Override
     public int deleteBtpPolicestationVillageByPvIds(String pvIds) {
         return btpPolicestationVillageMapper.deleteBtpPolicestationVillageByPvIds(Convert.toStrArray(pvIds));
     }
 
+    @Override
+    public int getSubResources(String ids) {
+        return btpPolicestationVillageMapper.getSubResources(Convert.toStrArray(ids));
+    }
+
     /**
-     * 删除派出所、委(村)信息
+     * 查询派出所、委(村)
      *
-     * @param pvId 派出所、委(村)主键
-     * @return 结果
+     * @param parentId 派出所、委(村)父级id
+     * @return 派出所、委(村)
      */
     @Override
-    public int deleteBtpPolicestationVillageByPvId(Long pvId) {
-        return btpPolicestationVillageMapper.deleteBtpPolicestationVillageByPvId(pvId);
+    public List<BtpPolicestationVillage> getPolicestationVillagesByParentId(Long parentId) {
+        return btpPolicestationVillageMapper.getPolicestationVillagesByParentId(parentId);
     }
 }

+ 87 - 0
sooka-schooldistrict/src/main/java/com/sooka/schooldistrict/service/impl/BtpSchoolPvServiceImpl.java

@@ -0,0 +1,87 @@
+package com.sooka.schooldistrict.service.impl;
+
+import com.sooka.common.core.text.Convert;
+import com.sooka.schooldistrict.domain.BtpSchoolPv;
+import com.sooka.schooldistrict.mapper.BtpSchoolPvMapper;
+import com.sooka.schooldistrict.service.IBtpSchoolPvService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 学区配置Service业务层处理
+ *
+ * @author lyq
+ * @date 2023-02-20
+ */
+@Service
+public class BtpSchoolPvServiceImpl implements IBtpSchoolPvService {
+
+    @Autowired
+    private BtpSchoolPvMapper btpSchoolPvMapper;
+
+    /**
+     * 查询学区配置
+     *
+     * @param vIds 学区配置的委(村)主键
+     * @return 学区配置
+     */
+    @Override
+    public BtpSchoolPv selectBtpSchoolPvBySchoolIdAndVId(String id) {
+        String[] ids = Convert.toStrArray("_", id);
+        return btpSchoolPvMapper.selectBtpSchoolPvBySchoolIdAndVId(ids[0], Convert.toStrArray(ids[1]));
+    }
+
+    /**
+     * 查询学区配置列表
+     *
+     * @param btpSchoolPv 学区配置
+     * @return 学区配置集合
+     */
+    @Override
+    public List<BtpSchoolPv> selectBtpSchoolPvList(BtpSchoolPv btpSchoolPv) {
+        return btpSchoolPvMapper.selectBtpSchoolPvList(btpSchoolPv);
+    }
+
+    /**
+     * 新增学区配置
+     *
+     * @param btpSchoolPv 学区配置
+     * @return 结果
+     */
+    @Transactional
+    @Override
+    public int insertBtpSchoolPv(BtpSchoolPv btpSchoolPv) {
+        int result = 0;
+        for (String vId : Convert.toStrArray(btpSchoolPv.getId())) {
+            btpSchoolPv.setvId(Long.parseLong(vId));
+            result += btpSchoolPvMapper.insertBtpSchoolPv(btpSchoolPv);
+        }
+        return result;
+    }
+
+    /**
+     * 批量删除学区配置
+     *
+     * @param vIds 需要删除的学区配置的委(村)主键
+     * @return 结果
+     */
+    @Transactional
+    @Override
+    public int deleteBtpSchoolPvBySchoolIdAndVIds(String id) {
+        String[] ids = Convert.toStrArray("_", id);
+        return btpSchoolPvMapper.deleteBtpSchoolPvBySchoolIdAndVIds(ids[0], Convert.toStrArray(ids[1]));
+    }
+
+    @Override
+    public List<BtpSchoolPv> getBtpSchoolPvsInSchoolIds(String schoolIds) {
+        return btpSchoolPvMapper.getBtpSchoolPvsInSchoolIds(Convert.toStrArray(schoolIds));
+    }
+
+    @Override
+    public List<String> getSchoolName(BtpSchoolPv btpSchoolPv) {
+        return btpSchoolPvMapper.getSchoolName(btpSchoolPv);
+    }
+}

+ 8 - 15
sooka-business/src/main/java/com/sooka/business/schooldistrict/service/impl/BtpSchoolServiceImpl.java

@@ -1,11 +1,12 @@
-package com.sooka.business.schooldistrict.service.impl;
+package com.sooka.schooldistrict.service.impl;
 
-import com.sooka.business.schooldistrict.domain.BtpSchool;
-import com.sooka.business.schooldistrict.mapper.BtpSchoolMapper;
-import com.sooka.business.schooldistrict.service.IBtpSchoolService;
 import com.sooka.common.core.text.Convert;
+import com.sooka.schooldistrict.domain.BtpSchool;
+import com.sooka.schooldistrict.mapper.BtpSchoolMapper;
+import com.sooka.schooldistrict.service.IBtpSchoolService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
 
@@ -49,6 +50,7 @@ public class BtpSchoolServiceImpl implements IBtpSchoolService {
      * @param btpSchool 学校
      * @return 结果
      */
+    @Transactional
     @Override
     public int insertBtpSchool(BtpSchool btpSchool) {
         return btpSchoolMapper.insertBtpSchool(btpSchool);
@@ -60,6 +62,7 @@ public class BtpSchoolServiceImpl implements IBtpSchoolService {
      * @param btpSchool 学校
      * @return 结果
      */
+    @Transactional
     @Override
     public int updateBtpSchool(BtpSchool btpSchool) {
         return btpSchoolMapper.updateBtpSchool(btpSchool);
@@ -71,19 +74,9 @@ public class BtpSchoolServiceImpl implements IBtpSchoolService {
      * @param schoolIds 需要删除的学校主键
      * @return 结果
      */
+    @Transactional
     @Override
     public int deleteBtpSchoolBySchoolIds(String schoolIds) {
         return btpSchoolMapper.deleteBtpSchoolBySchoolIds(Convert.toStrArray(schoolIds));
     }
-
-    /**
-     * 删除学校信息
-     *
-     * @param schoolId 学校主键
-     * @return 结果
-     */
-    @Override
-    public int deleteBtpSchoolBySchoolId(Long schoolId) {
-        return btpSchoolMapper.deleteBtpSchoolBySchoolId(schoolId);
-    }
 }

+ 20 - 10
sooka-business/src/main/resources/mapper/schooldistrict/BtpPolicestationVillageMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.sooka.business.schooldistrict.mapper.BtpPolicestationVillageMapper">
+<mapper namespace="com.sooka.schooldistrict.mapper.BtpPolicestationVillageMapper">
     
     <resultMap type="BtpPolicestationVillage" id="BtpPolicestationVillageResult">
         <result property="pvId"    column="pv_id"    />
@@ -27,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </choose>
         <where>
             <if test="pvName != null  and pvName != ''"> and a.pv_name like concat('%', #{pvName}, '%')</if>
+            <if test="parentName != null  and parentName != ''"> and a.parent_id = #{parentName}</if>
             <choose>
                 <when test="parentId != null and parentId == 0">
                     and a.parent_id = 0
@@ -43,11 +44,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where pv_id = #{pvId}
     </select>
 
-    <select id="getAllByParentId" parameterType="BtpPolicestationVillage" resultMap="BtpPolicestationVillageResult">
-        <include refid="selectBtpPolicestationVillageVo"/>
-        where parent_id = #{parentId}
-    </select>
-
     <insert id="insertBtpPolicestationVillage" parameterType="BtpPolicestationVillage" useGeneratedKeys="true" keyProperty="pvId">
         insert into btp_policestation_village
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -69,10 +65,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where pv_id = #{pvId}
     </update>
 
-    <delete id="deleteBtpPolicestationVillageByPvId" parameterType="Long">
-        delete from btp_policestation_village where pv_id = #{pvId}
-    </delete>
-
     <delete id="deleteBtpPolicestationVillageByPvIds" parameterType="String">
         delete from btp_policestation_village where pv_id in 
         <foreach item="pvId" collection="array" open="(" separator="," close=")">
@@ -80,4 +72,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </delete>
 
+    <select id="getSubResources" resultType="Integer">
+        select count(*) from btp_policestation_village a
+        left join btp_school_pv b on b.v_id = a.pv_id
+        where a.parent_id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+        or b.v_id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </select>
+
+    <select id="getPolicestationVillagesByParentId" parameterType="Long" resultMap="BtpPolicestationVillageResult">
+        <include refid="selectBtpPolicestationVillageVo"/>
+        where parent_id = #{parentId}
+    </select>
+
 </mapper>

+ 1 - 5
sooka-business/src/main/resources/mapper/schooldistrict/BtpSchoolMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.sooka.business.schooldistrict.mapper.BtpSchoolMapper">
+<mapper namespace="com.sooka.schooldistrict.mapper.BtpSchoolMapper">
     
     <resultMap type="BtpSchool" id="BtpSchoolResult">
         <result property="schoolId"    column="school_id"    />
@@ -48,10 +48,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where school_id = #{schoolId}
     </update>
 
-    <delete id="deleteBtpSchoolBySchoolId" parameterType="Long">
-        delete from btp_school where school_id = #{schoolId}
-    </delete>
-
     <delete id="deleteBtpSchoolBySchoolIds" parameterType="String">
         delete from btp_school where school_id in 
         <foreach item="schoolId" collection="array" open="(" separator="," close=")">

+ 30 - 17
sooka-business/src/main/resources/mapper/schooldistrict/BtpSchoolPvMapper.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.sooka.business.schooldistrict.mapper.BtpSchoolPvMapper">
+<mapper namespace="com.sooka.schooldistrict.mapper.BtpSchoolPvMapper">
 
     <resultMap type="BtpSchoolPv" id="BtpSchoolPvResult">
         <result property="id"    column="id"    />
@@ -20,16 +20,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectBtpSchoolPvList" parameterType="BtpSchoolPv" resultMap="BtpSchoolPvResult">
-        select group_concat(a.v_id) id, a.p_id, b.pv_name p_name, group_concat(c.pv_name) v_name, a.school_id, d.school_name, d.school_type
+        select
+            concat( a.school_id, '_', group_concat( a.v_id ) ) id,
+            a.p_id, b.pv_name p_name,
+            group_concat( c.pv_name ) v_name,
+            a.school_id, d.school_name, d.school_type
         from btp_school_pv a
         left join btp_policestation_village b on b.pv_id = a.p_id
         left join btp_policestation_village c on c.pv_id = a.v_id
         left join btp_school d on d.school_id = a.school_id
         <where>
-            <if test="pId != null "> and a.p_id = #{pId}</if>
-            <if test="vId != null "> and a.v_id = #{vId}</if>
-            <if test="schoolType != null "> and d.school_type = #{schoolType}</if>
-
             <if test="pName != null "> and b.pv_name like concat('%', #{pName}, '%')</if>
             <if test="vName != null "> and c.pv_name like concat('%', #{vName}, '%')</if>
             <if test="schoolName != null "> and d.school_name like concat('%', #{schoolName}, '%')</if>
@@ -37,10 +37,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         group by a.p_id, a.school_id
     </select>
 
-    <select id="selectBtpSchoolPvInVIds" parameterType="Long" resultMap="BtpSchoolPvResult">
-        select group_concat(v_id) id, p_id, school_id from btp_school_pv
-        where v_id in
-        <foreach item="item" index="index" collection="vIds.split(',')"  open="(" separator="," close=")">
+    <select id="selectBtpSchoolPvBySchoolIdAndVId" parameterType="Long" resultMap="BtpSchoolPvResult">
+        select concat( school_id, '_', group_concat( v_id ) ) id, p_id, school_id from btp_school_pv
+        where school_id = #{schoolId} and v_id in
+        <foreach item="item" index="index" collection="vIds" open="(" separator="," close=")">
             #{item}
         </foreach>
     </select>
@@ -68,15 +68,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where p_id = #{pId}
     </update>
 
-    <delete id="deleteBtpSchoolPvByPId" parameterType="Long">
-        delete from btp_school_pv where p_id = #{pId}
-    </delete>
-
-    <delete id="deleteBtpSchoolPvByVIds" parameterType="String">
-        delete from btp_school_pv where v_id in
-        <foreach item="vId" collection="array" open="(" separator="," close=")">
+    <delete id="deleteBtpSchoolPvBySchoolIdAndVIds" parameterType="String">
+        delete from btp_school_pv where school_id = #{schoolId} and v_id in
+        <foreach item="vId" collection="vIds" open="(" separator="," close=")">
             #{vId}
         </foreach>
     </delete>
 
+    <select id="getBtpSchoolPvsInSchoolIds" parameterType="String" resultMap="BtpSchoolPvResult">
+        <include refid="selectBtpSchoolPvVo"/>
+        where school_id in
+        <foreach item="schoolId" collection="array" open="(" separator="," close=")">
+            #{schoolId}
+        </foreach>
+    </select>
+
+    <select id="getSchoolName" parameterType="BtpSchoolPv" resultType="String">
+        select school_name from schooldistrict_view
+        <where>
+            <if test="schoolType != null "> and school_type = #{schoolType}</if>
+            <if test="pId != null "> and p_id = #{pId}</if>
+            <if test="vId != null "> and v_id = #{vId}</if>
+        </where>
+    </select>
+
 </mapper>

+ 7 - 0
sooka-system/src/main/java/com/sooka/system/mapper/SysOperLogMapper.java

@@ -1,6 +1,8 @@
 package com.sooka.system.mapper;
 
 import java.util.List;
+import java.util.Map;
+
 import com.sooka.system.domain.SysOperLog;
 
 /**
@@ -45,4 +47,9 @@ public interface SysOperLogMapper
      * 清空操作日志
      */
     public void cleanOperLog();
+
+    /**
+     * 查询统计
+     */
+    public List<Map<String,Object>> queryStatistics(SysOperLog sysOperLog);
 }

+ 7 - 0
sooka-system/src/main/java/com/sooka/system/service/ISysOperLogService.java

@@ -1,6 +1,8 @@
 package com.sooka.system.service;
 
 import java.util.List;
+import java.util.Map;
+
 import com.sooka.system.domain.SysOperLog;
 
 /**
@@ -45,4 +47,9 @@ public interface ISysOperLogService
      * 清空操作日志
      */
     public void cleanOperLog();
+
+    /**
+     * 查询统计
+     */
+    public List<Map<String,Object>> queryStatistics(SysOperLog sysOperLog);
 }

+ 1 - 1
sooka-system/src/main/java/com/sooka/system/service/impl/SysNoticeServiceImpl.java

@@ -71,7 +71,7 @@ public class SysNoticeServiceImpl implements ISysNoticeService
         String beginTime = MapUtils.getString(notice.getParams(),"beginTime");
         String endTime = MapUtils.getString(notice.getParams(),"endTime");
         if (StringUtils.isNotBlank(beginTime) && StringUtils.isNotBlank(endTime)) {
-            notice.setNoticeContent(beginTime + "," + endTime);
+            notice.setNoticeContent(beginTime + "" + endTime);
         }
         return noticeMapper.updateNotice(notice);
     }

+ 9 - 0
sooka-system/src/main/java/com/sooka/system/service/impl/SysOperLogServiceImpl.java

@@ -1,6 +1,7 @@
 package com.sooka.system.service.impl;
 
 import java.util.List;
+import java.util.Map;
 
 import com.sooka.system.domain.SysOperLog;
 import com.sooka.system.mapper.SysOperLogMapper;
@@ -75,4 +76,12 @@ public class SysOperLogServiceImpl implements ISysOperLogService
     {
         operLogMapper.cleanOperLog();
     }
+
+    /**
+     * 查询统计
+     */
+    @Override
+    public List<Map<String,Object>> queryStatistics(SysOperLog sysOperLog) {
+        return operLogMapper.queryStatistics(sysOperLog);
+    }
 }

+ 16 - 0
sooka-system/src/main/resources/mapper/system/SysOperLogMapper.xml

@@ -80,4 +80,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         truncate table sys_oper_log
     </update>
 
+	<select id="queryStatistics" resultType="map">
+		select
+		date_format( oper_time, #{params.format} ) time,
+		count(*) count,
+		oper_ip ip
+		from sys_oper_log
+		where business_type = 10
+		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+			and date_format(oper_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+		</if>
+		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+			and date_format(oper_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+		</if>
+		group by DATE_FORMAT( oper_time, #{params.format} ),oper_ip
+		order by time desc
+	</select>
 </mapper> 

File diff suppressed because it is too large
+ 0 - 2890
sql/ruoyi.html


File diff suppressed because it is too large
+ 0 - 4851
sql/ruoyi.pdm


+ 0 - 608
sql/ry_20230216.sql

@@ -1,714 +0,0 @@
-drop table if exists sys_dept;
-create table sys_dept (
-  dept_id           bigint(20)      not null auto_increment    comment '部门id',
-  parent_id         bigint(20)      default 0                  comment '父部门id',
-  ancestors         varchar(50)     default ''                 comment '祖级列表',
-  dept_name         varchar(30)     default ''                 comment '部门名称',
-  order_num         int(4)          default 0                  comment '显示顺序',
-  leader            varchar(20)     default null               comment '负责人',
-  phone             varchar(11)     default null               comment '联系电话',
-  email             varchar(50)     default null               comment '邮箱',
-  status            char(1)         default '0'                comment '部门状态(0正常 1停用)',
-  del_flag          char(1)         default '0'                comment '删除标志(0代表存在 2代表删除)',
-  create_by         varchar(64)     default ''                 comment '创建者',
-  create_time 	    datetime                                   comment '创建时间',
-  update_by         varchar(64)     default ''                 comment '更新者',
-  update_time       datetime                                   comment '更新时间',
-  primary key (dept_id)
-) engine=innodb auto_increment=200 comment = '部门表';
-
-insert into sys_dept values(100,  0,   '0',          '首佳科技',   0, '首佳', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
-insert into sys_dept values(101,  100, '0,100',      '深圳总公司', 1, '首佳', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
-insert into sys_dept values(102,  100, '0,100',      '长沙分公司', 2, '首佳', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
-insert into sys_dept values(103,  101, '0,100,101',  '研发部门',   1, '首佳', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
-insert into sys_dept values(104,  101, '0,100,101',  '市场部门',   2, '首佳', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
-insert into sys_dept values(105,  101, '0,100,101',  '测试部门',   3, '首佳', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
-insert into sys_dept values(106,  101, '0,100,101',  '财务部门',   4, '首佳', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
-insert into sys_dept values(107,  101, '0,100,101',  '运维部门',   5, '首佳', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
-insert into sys_dept values(108,  102, '0,100,102',  '市场部门',   1, '首佳', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
-insert into sys_dept values(109,  102, '0,100,102',  '财务部门',   2, '首佳', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
-
-
-drop table if exists sys_user;
-create table sys_user (
-  user_id           bigint(20)      not null auto_increment    comment '用户ID',
-  dept_id           bigint(20)      default null               comment '部门ID',
-  login_name        varchar(30)     not null                   comment '登录账号',
-  user_name         varchar(30)     default ''                 comment '用户昵称',
-  user_type         varchar(2)      default '00'               comment '用户类型(00系统用户 01注册用户)',
-  email             varchar(50)     default ''                 comment '用户邮箱',
-  phonenumber       varchar(11)     default ''                 comment '手机号码',
-  sex               char(1)         default '0'                comment '用户性别(0男 1女 2未知)',
-  avatar            varchar(100)    default ''                 comment '头像路径',
-  password          varchar(50)     default ''                 comment '密码',
-  salt              varchar(20)     default ''                 comment '盐加密',
-  status            char(1)         default '0'                comment '帐号状态(0正常 1停用)',
-  del_flag          char(1)         default '0'                comment '删除标志(0代表存在 2代表删除)',
-  login_ip          varchar(128)    default ''                 comment '最后登录IP',
-  login_date        datetime                                   comment '最后登录时间',
-  pwd_update_date   datetime                                   comment '密码最后更新时间',
-  create_by         varchar(64)     default ''                 comment '创建者',
-  create_time       datetime                                   comment '创建时间',
-  update_by         varchar(64)     default ''                 comment '更新者',
-  update_time       datetime                                   comment '更新时间',
-  remark            varchar(500)    default null               comment '备注',
-  primary key (user_id)
-) engine=innodb auto_increment=100 comment = '用户信息表';
-
-insert into sys_user values(1,  103, 'admin', '首佳', '00', 'ry@163.com', '15888888888', '1', '', '29c67a30398638269fe600f73a054934', '111111', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '管理员');
-insert into sys_user values(2,  105, 'ry',    '首佳', '00', 'ry@qq.com',  '15666666666', '1', '', '8e6d98b90472783cc73c17047ddccf36', '222222', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '测试员');
-
-
-drop table if exists sys_post;
-create table sys_post
-(
-  post_id       bigint(20)      not null auto_increment    comment '岗位ID',
-  post_code     varchar(64)     not null                   comment '岗位编码',
-  post_name     varchar(50)     not null                   comment '岗位名称',
-  post_sort     int(4)          not null                   comment '显示顺序',
-  status        char(1)         not null                   comment '状态(0正常 1停用)',
-  create_by     varchar(64)     default ''                 comment '创建者',
-  create_time   datetime                                   comment '创建时间',
-  update_by     varchar(64)     default ''			       comment '更新者',
-  update_time   datetime                                   comment '更新时间',
-  remark        varchar(500)    default null               comment '备注',
-  primary key (post_id)
-) engine=innodb comment = '岗位信息表';
-
-insert into sys_post values(1, 'ceo',  '董事长',    1, '0', 'admin', sysdate(), '', null, '');
-insert into sys_post values(2, 'se',   '项目经理',  2, '0', 'admin', sysdate(), '', null, '');
-insert into sys_post values(3, 'hr',   '人力资源',  3, '0', 'admin', sysdate(), '', null, '');
-insert into sys_post values(4, 'user', '普通员工',  4, '0', 'admin', sysdate(), '', null, '');
-
-
-drop table if exists sys_role;
-create table sys_role (
-  role_id           bigint(20)      not null auto_increment    comment '角色ID',
-  role_name         varchar(30)     not null                   comment '角色名称',
-  role_key          varchar(100)    not null                   comment '角色权限字符串',
-  role_sort         int(4)          not null                   comment '显示顺序',
-  data_scope        char(1)         default '1'                comment '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)',
-  status            char(1)         not null                   comment '角色状态(0正常 1停用)',
-  del_flag          char(1)         default '0'                comment '删除标志(0代表存在 2代表删除)',
-  create_by         varchar(64)     default ''                 comment '创建者',
-  create_time       datetime                                   comment '创建时间',
-  update_by         varchar(64)     default ''                 comment '更新者',
-  update_time       datetime                                   comment '更新时间',
-  remark            varchar(500)    default null               comment '备注',
-  primary key (role_id)
-) engine=innodb auto_increment=100 comment = '角色信息表';
-
-insert into sys_role values('1', '超级管理员', 'admin',  1, 1, '0', '0', 'admin', sysdate(), '', null, '超级管理员');
-insert into sys_role values('2', '普通角色',   'common', 2, 2, '0', '0', 'admin', sysdate(), '', null, '普通角色');
-
-
-drop table if exists sys_menu;
-create table sys_menu (
-  menu_id           bigint(20)      not null auto_increment    comment '菜单ID',
-  menu_name         varchar(50)     not null                   comment '菜单名称',
-  parent_id         bigint(20)      default 0                  comment '父菜单ID',
-  order_num         int(4)          default 0                  comment '显示顺序',
-  url               varchar(200)    default '#'                comment '请求地址',
-  target            varchar(20)     default ''                 comment '打开方式(menuItem页签 menuBlank新窗口)',
-  menu_type         char(1)         default ''                 comment '菜单类型(M目录 C菜单 F按钮)',
-  visible           char(1)         default 0                  comment '菜单状态(0显示 1隐藏)',
-  is_refresh        char(1)         default 1                  comment '是否刷新(0刷新 1不刷新)',
-  perms             varchar(100)    default null               comment '权限标识',
-  icon              varchar(100)    default '#'                comment '菜单图标',
-  create_by         varchar(64)     default ''                 comment '创建者',
-  create_time       datetime                                   comment '创建时间',
-  update_by         varchar(64)     default ''                 comment '更新者',
-  update_time       datetime                                   comment '更新时间',
-  remark            varchar(500)    default ''                 comment '备注',
-  primary key (menu_id)
-) engine=innodb auto_increment=2000 comment = '菜单权限表';
-
-insert into sys_menu values('1', '系统管理', '0', '1', '#',                '',          'M', '0', '1', '', 'fa fa-gear',           'admin', sysdate(), '', null, '系统管理目录');
-insert into sys_menu values('2', '系统监控', '0', '2', '#',                '',          'M', '0', '1', '', 'fa fa-video-camera',   'admin', sysdate(), '', null, '系统监控目录');
-insert into sys_menu values('3', '系统工具', '0', '3', '#',                '',          'M', '0', '1', '', 'fa fa-bars',           'admin', sysdate(), '', null, '系统工具目录');
-insert into sys_menu values('4', '首佳官网', '0', '4', 'http://sooka.vip', 'menuBlank', 'C', '0', '1', '', 'fa fa-location-arrow', 'admin', sysdate(), '', null, '首佳官网地址');
-insert into sys_menu values('100',  '用户管理', '1', '1', '/system/user',          '', 'C', '0', '1', 'system:user:view',         'fa fa-user-o',          'admin', sysdate(), '', null, '用户管理菜单');
-insert into sys_menu values('101',  '角色管理', '1', '2', '/system/role',          '', 'C', '0', '1', 'system:role:view',         'fa fa-user-secret',     'admin', sysdate(), '', null, '角色管理菜单');
-insert into sys_menu values('102',  '菜单管理', '1', '3', '/system/menu',          '', 'C', '0', '1', 'system:menu:view',         'fa fa-th-list',         'admin', sysdate(), '', null, '菜单管理菜单');
-insert into sys_menu values('103',  '部门管理', '1', '4', '/system/dept',          '', 'C', '0', '1', 'system:dept:view',         'fa fa-outdent',         'admin', sysdate(), '', null, '部门管理菜单');
-insert into sys_menu values('104',  '岗位管理', '1', '5', '/system/post',          '', 'C', '0', '1', 'system:post:view',         'fa fa-address-card-o',  'admin', sysdate(), '', null, '岗位管理菜单');
-insert into sys_menu values('105',  '字典管理', '1', '6', '/system/dict',          '', 'C', '0', '1', 'system:dict:view',         'fa fa-bookmark-o',      'admin', sysdate(), '', null, '字典管理菜单');
-insert into sys_menu values('106',  '参数设置', '1', '7', '/system/config',        '', 'C', '0', '1', 'system:config:view',       'fa fa-sun-o',           'admin', sysdate(), '', null, '参数设置菜单');
-insert into sys_menu values('107',  '通知公告', '1', '8', '/system/notice',        '', 'C', '0', '1', 'system:notice:view',       'fa fa-bullhorn',        'admin', sysdate(), '', null, '通知公告菜单');
-insert into sys_menu values('108',  '日志管理', '1', '9', '#',                     '', 'M', '0', '1', '',                         'fa fa-pencil-square-o', 'admin', sysdate(), '', null, '日志管理菜单');
-insert into sys_menu values('109',  '在线用户', '2', '1', '/monitor/online',       '', 'C', '0', '1', 'monitor:online:view',      'fa fa-user-circle',     'admin', sysdate(), '', null, '在线用户菜单');
-insert into sys_menu values('110',  '定时任务', '2', '2', '/monitor/job',          '', 'C', '0', '1', 'monitor:job:view',         'fa fa-tasks',           'admin', sysdate(), '', null, '定时任务菜单');
-insert into sys_menu values('111',  '数据监控', '2', '3', '/monitor/data',         '', 'C', '0', '1', 'monitor:data:view',        'fa fa-bug',             'admin', sysdate(), '', null, '数据监控菜单');
-insert into sys_menu values('112',  '服务监控', '2', '4', '/monitor/server',       '', 'C', '0', '1', 'monitor:server:view',      'fa fa-server',          'admin', sysdate(), '', null, '服务监控菜单');
-insert into sys_menu values('113',  '缓存监控', '2', '5', '/monitor/cache',        '', 'C', '0', '1', 'monitor:cache:view',       'fa fa-cube',            'admin', sysdate(), '', null, '缓存监控菜单');
-insert into sys_menu values('114',  '表单构建', '3', '1', '/tool/build',           '', 'C', '0', '1', 'tool:build:view',          'fa fa-wpforms',         'admin', sysdate(), '', null, '表单构建菜单');
-insert into sys_menu values('115',  '代码生成', '3', '2', '/tool/gen',             '', 'C', '0', '1', 'tool:gen:view',            'fa fa-code',            'admin', sysdate(), '', null, '代码生成菜单');
-insert into sys_menu values('116',  '系统接口', '3', '3', '/tool/swagger',         '', 'C', '0', '1', 'tool:swagger:view',        'fa fa-gg',              'admin', sysdate(), '', null, '系统接口菜单');
-insert into sys_menu values('500',  '操作日志', '108', '1', '/monitor/operlog',    '', 'C', '0', '1', 'monitor:operlog:view',     'fa fa-address-book',    'admin', sysdate(), '', null, '操作日志菜单');
-insert into sys_menu values('501',  '登录日志', '108', '2', '/monitor/logininfor', '', 'C', '0', '1', 'monitor:logininfor:view',  'fa fa-file-image-o',    'admin', sysdate(), '', null, '登录日志菜单');
-insert into sys_menu values('1000', '用户查询', '100', '1',  '#', '',  'F', '0', '1', 'system:user:list',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1001', '用户新增', '100', '2',  '#', '',  'F', '0', '1', 'system:user:add',         '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1002', '用户修改', '100', '3',  '#', '',  'F', '0', '1', 'system:user:edit',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1003', '用户删除', '100', '4',  '#', '',  'F', '0', '1', 'system:user:remove',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1004', '用户导出', '100', '5',  '#', '',  'F', '0', '1', 'system:user:export',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1005', '用户导入', '100', '6',  '#', '',  'F', '0', '1', 'system:user:import',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1006', '重置密码', '100', '7',  '#', '',  'F', '0', '1', 'system:user:resetPwd',    '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1007', '角色查询', '101', '1',  '#', '',  'F', '0', '1', 'system:role:list',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1008', '角色新增', '101', '2',  '#', '',  'F', '0', '1', 'system:role:add',         '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1009', '角色修改', '101', '3',  '#', '',  'F', '0', '1', 'system:role:edit',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1010', '角色删除', '101', '4',  '#', '',  'F', '0', '1', 'system:role:remove',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1011', '角色导出', '101', '5',  '#', '',  'F', '0', '1', 'system:role:export',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1012', '菜单查询', '102', '1',  '#', '',  'F', '0', '1', 'system:menu:list',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1013', '菜单新增', '102', '2',  '#', '',  'F', '0', '1', 'system:menu:add',         '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1014', '菜单修改', '102', '3',  '#', '',  'F', '0', '1', 'system:menu:edit',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1015', '菜单删除', '102', '4',  '#', '',  'F', '0', '1', 'system:menu:remove',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1016', '部门查询', '103', '1',  '#', '',  'F', '0', '1', 'system:dept:list',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1017', '部门新增', '103', '2',  '#', '',  'F', '0', '1', 'system:dept:add',         '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1018', '部门修改', '103', '3',  '#', '',  'F', '0', '1', 'system:dept:edit',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1019', '部门删除', '103', '4',  '#', '',  'F', '0', '1', 'system:dept:remove',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1020', '岗位查询', '104', '1',  '#', '',  'F', '0', '1', 'system:post:list',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1021', '岗位新增', '104', '2',  '#', '',  'F', '0', '1', 'system:post:add',         '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1022', '岗位修改', '104', '3',  '#', '',  'F', '0', '1', 'system:post:edit',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1023', '岗位删除', '104', '4',  '#', '',  'F', '0', '1', 'system:post:remove',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1024', '岗位导出', '104', '5',  '#', '',  'F', '0', '1', 'system:post:export',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1025', '字典查询', '105', '1',  '#', '',  'F', '0', '1', 'system:dict:list',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1026', '字典新增', '105', '2',  '#', '',  'F', '0', '1', 'system:dict:add',         '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1027', '字典修改', '105', '3',  '#', '',  'F', '0', '1', 'system:dict:edit',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1028', '字典删除', '105', '4',  '#', '',  'F', '0', '1', 'system:dict:remove',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1029', '字典导出', '105', '5',  '#', '',  'F', '0', '1', 'system:dict:export',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1030', '参数查询', '106', '1',  '#', '',  'F', '0', '1', 'system:config:list',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1031', '参数新增', '106', '2',  '#', '',  'F', '0', '1', 'system:config:add',       '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1032', '参数修改', '106', '3',  '#', '',  'F', '0', '1', 'system:config:edit',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1033', '参数删除', '106', '4',  '#', '',  'F', '0', '1', 'system:config:remove',    '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1034', '参数导出', '106', '5',  '#', '',  'F', '0', '1', 'system:config:export',    '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1035', '公告查询', '107', '1',  '#', '',  'F', '0', '1', 'system:notice:list',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1036', '公告新增', '107', '2',  '#', '',  'F', '0', '1', 'system:notice:add',       '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1037', '公告修改', '107', '3',  '#', '',  'F', '0', '1', 'system:notice:edit',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1038', '公告删除', '107', '4',  '#', '',  'F', '0', '1', 'system:notice:remove',    '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1039', '操作查询', '500', '1',  '#', '',  'F', '0', '1', 'monitor:operlog:list',    '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1040', '操作删除', '500', '2',  '#', '',  'F', '0', '1', 'monitor:operlog:remove',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1041', '详细信息', '500', '3',  '#', '',  'F', '0', '1', 'monitor:operlog:detail',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1042', '日志导出', '500', '4',  '#', '',  'F', '0', '1', 'monitor:operlog:export',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1043', '登录查询', '501', '1',  '#', '',  'F', '0', '1', 'monitor:logininfor:list',         '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1044', '登录删除', '501', '2',  '#', '',  'F', '0', '1', 'monitor:logininfor:remove',       '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1045', '日志导出', '501', '3',  '#', '',  'F', '0', '1', 'monitor:logininfor:export',       '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1046', '账户解锁', '501', '4',  '#', '',  'F', '0', '1', 'monitor:logininfor:unlock',       '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1047', '在线查询', '109', '1',  '#', '',  'F', '0', '1', 'monitor:online:list',             '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1048', '批量强退', '109', '2',  '#', '',  'F', '0', '1', 'monitor:online:batchForceLogout', '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1049', '单条强退', '109', '3',  '#', '',  'F', '0', '1', 'monitor:online:forceLogout',      '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1050', '任务查询', '110', '1',  '#', '',  'F', '0', '1', 'monitor:job:list',                '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1051', '任务新增', '110', '2',  '#', '',  'F', '0', '1', 'monitor:job:add',                 '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1052', '任务修改', '110', '3',  '#', '',  'F', '0', '1', 'monitor:job:edit',                '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1053', '任务删除', '110', '4',  '#', '',  'F', '0', '1', 'monitor:job:remove',              '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1054', '状态修改', '110', '5',  '#', '',  'F', '0', '1', 'monitor:job:changeStatus',        '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1055', '任务详细', '110', '6',  '#', '',  'F', '0', '1', 'monitor:job:detail',              '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1056', '任务导出', '110', '7',  '#', '',  'F', '0', '1', 'monitor:job:export',              '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1057', '生成查询', '115', '1',  '#', '',  'F', '0', '1', 'tool:gen:list',     '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1058', '生成修改', '115', '2',  '#', '',  'F', '0', '1', 'tool:gen:edit',     '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1059', '生成删除', '115', '3',  '#', '',  'F', '0', '1', 'tool:gen:remove',   '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1060', '预览代码', '115', '4',  '#', '',  'F', '0', '1', 'tool:gen:preview',  '#', 'admin', sysdate(), '', null, '');
-insert into sys_menu values('1061', '生成代码', '115', '5',  '#', '',  'F', '0', '1', 'tool:gen:code',     '#', 'admin', sysdate(), '', null, '');
-
-
-drop table if exists sys_user_role;
-create table sys_user_role (
-  user_id   bigint(20) not null comment '用户ID',
-  role_id   bigint(20) not null comment '角色ID',
-  primary key(user_id, role_id)
-) engine=innodb comment = '用户和角色关联表';
-
-insert into sys_user_role values ('1', '1');
-insert into sys_user_role values ('2', '2');
-
-
-drop table if exists sys_role_menu;
-create table sys_role_menu (
-  role_id   bigint(20) not null comment '角色ID',
-  menu_id   bigint(20) not null comment '菜单ID',
-  primary key(role_id, menu_id)
-) engine=innodb comment = '角色和菜单关联表';
-
-insert into sys_role_menu values ('2', '1');
-insert into sys_role_menu values ('2', '2');
-insert into sys_role_menu values ('2', '3');
-insert into sys_role_menu values ('2', '4');
-insert into sys_role_menu values ('2', '100');
-insert into sys_role_menu values ('2', '101');
-insert into sys_role_menu values ('2', '102');
-insert into sys_role_menu values ('2', '103');
-insert into sys_role_menu values ('2', '104');
-insert into sys_role_menu values ('2', '105');
-insert into sys_role_menu values ('2', '106');
-insert into sys_role_menu values ('2', '107');
-insert into sys_role_menu values ('2', '108');
-insert into sys_role_menu values ('2', '109');
-insert into sys_role_menu values ('2', '110');
-insert into sys_role_menu values ('2', '111');
-insert into sys_role_menu values ('2', '112');
-insert into sys_role_menu values ('2', '113');
-insert into sys_role_menu values ('2', '114');
-insert into sys_role_menu values ('2', '115');
-insert into sys_role_menu values ('2', '116');
-insert into sys_role_menu values ('2', '500');
-insert into sys_role_menu values ('2', '501');
-insert into sys_role_menu values ('2', '1000');
-insert into sys_role_menu values ('2', '1001');
-insert into sys_role_menu values ('2', '1002');
-insert into sys_role_menu values ('2', '1003');
-insert into sys_role_menu values ('2', '1004');
-insert into sys_role_menu values ('2', '1005');
-insert into sys_role_menu values ('2', '1006');
-insert into sys_role_menu values ('2', '1007');
-insert into sys_role_menu values ('2', '1008');
-insert into sys_role_menu values ('2', '1009');
-insert into sys_role_menu values ('2', '1010');
-insert into sys_role_menu values ('2', '1011');
-insert into sys_role_menu values ('2', '1012');
-insert into sys_role_menu values ('2', '1013');
-insert into sys_role_menu values ('2', '1014');
-insert into sys_role_menu values ('2', '1015');
-insert into sys_role_menu values ('2', '1016');
-insert into sys_role_menu values ('2', '1017');
-insert into sys_role_menu values ('2', '1018');
-insert into sys_role_menu values ('2', '1019');
-insert into sys_role_menu values ('2', '1020');
-insert into sys_role_menu values ('2', '1021');
-insert into sys_role_menu values ('2', '1022');
-insert into sys_role_menu values ('2', '1023');
-insert into sys_role_menu values ('2', '1024');
-insert into sys_role_menu values ('2', '1025');
-insert into sys_role_menu values ('2', '1026');
-insert into sys_role_menu values ('2', '1027');
-insert into sys_role_menu values ('2', '1028');
-insert into sys_role_menu values ('2', '1029');
-insert into sys_role_menu values ('2', '1030');
-insert into sys_role_menu values ('2', '1031');
-insert into sys_role_menu values ('2', '1032');
-insert into sys_role_menu values ('2', '1033');
-insert into sys_role_menu values ('2', '1034');
-insert into sys_role_menu values ('2', '1035');
-insert into sys_role_menu values ('2', '1036');
-insert into sys_role_menu values ('2', '1037');
-insert into sys_role_menu values ('2', '1038');
-insert into sys_role_menu values ('2', '1039');
-insert into sys_role_menu values ('2', '1040');
-insert into sys_role_menu values ('2', '1041');
-insert into sys_role_menu values ('2', '1042');
-insert into sys_role_menu values ('2', '1043');
-insert into sys_role_menu values ('2', '1044');
-insert into sys_role_menu values ('2', '1045');
-insert into sys_role_menu values ('2', '1046');
-insert into sys_role_menu values ('2', '1047');
-insert into sys_role_menu values ('2', '1048');
-insert into sys_role_menu values ('2', '1049');
-insert into sys_role_menu values ('2', '1050');
-insert into sys_role_menu values ('2', '1051');
-insert into sys_role_menu values ('2', '1052');
-insert into sys_role_menu values ('2', '1053');
-insert into sys_role_menu values ('2', '1054');
-insert into sys_role_menu values ('2', '1055');
-insert into sys_role_menu values ('2', '1056');
-insert into sys_role_menu values ('2', '1057');
-insert into sys_role_menu values ('2', '1058');
-insert into sys_role_menu values ('2', '1059');
-insert into sys_role_menu values ('2', '1060');
-insert into sys_role_menu values ('2', '1061');
-
-drop table if exists sys_role_dept;
-create table sys_role_dept (
-  role_id   bigint(20) not null comment '角色ID',
-  dept_id   bigint(20) not null comment '部门ID',
-  primary key(role_id, dept_id)
-) engine=innodb comment = '角色和部门关联表';
-
-insert into sys_role_dept values ('2', '100');
-insert into sys_role_dept values ('2', '101');
-insert into sys_role_dept values ('2', '105');
-
-drop table if exists sys_user_post;
-create table sys_user_post
-(
-  user_id   bigint(20) not null comment '用户ID',
-  post_id   bigint(20) not null comment '岗位ID',
-  primary key (user_id, post_id)
-) engine=innodb comment = '用户与岗位关联表';
-
-insert into sys_user_post values ('1', '1');
-insert into sys_user_post values ('2', '2');
-
-
-drop table if exists sys_oper_log;
-create table sys_oper_log (
-  oper_id           bigint(20)      not null auto_increment    comment '日志主键',
-  title             varchar(50)     default ''                 comment '模块标题',
-  business_type     int(2)          default 0                  comment '业务类型(0其它 1新增 2修改 3删除)',
-  method            varchar(100)    default ''                 comment '方法名称',
-  request_method    varchar(10)     default ''                 comment '请求方式',
-  operator_type     int(1)          default 0                  comment '操作类别(0其它 1后台用户 2手机端用户)',
-  oper_name         varchar(50)     default ''                 comment '操作人员',
-  dept_name         varchar(50)     default ''                 comment '部门名称',
-  oper_url          varchar(255)    default ''                 comment '请求URL',
-  oper_ip           varchar(128)    default ''                 comment '主机地址',
-  oper_location     varchar(255)    default ''                 comment '操作地点',
-  oper_param        varchar(2000)   default ''                 comment '请求参数',
-  json_result       varchar(2000)   default ''                 comment '返回参数',
-  status            int(1)          default 0                  comment '操作状态(0正常 1异常)',
-  error_msg         varchar(2000)   default ''                 comment '错误消息',
-  oper_time         datetime                                   comment '操作时间',
-  cost_time         bigint(20)      default 0                  comment '消耗时间',
-  primary key (oper_id)
-) engine=innodb auto_increment=100 comment = '操作日志记录';
-
-
-drop table if exists sys_dict_type;
-create table sys_dict_type
-(
-  dict_id          bigint(20)      not null auto_increment    comment '字典主键',
-  dict_name        varchar(100)    default ''                 comment '字典名称',
-  dict_type        varchar(100)    default ''                 comment '字典类型',
-  status           char(1)         default '0'                comment '状态(0正常 1停用)',
-  create_by        varchar(64)     default ''                 comment '创建者',
-  create_time      datetime                                   comment '创建时间',
-  update_by        varchar(64)     default ''                 comment '更新者',
-  update_time      datetime                                   comment '更新时间',
-  remark           varchar(500)    default null               comment '备注',
-  primary key (dict_id),
-  unique (dict_type)
-) engine=innodb auto_increment=100 comment = '字典类型表';
-
-insert into sys_dict_type values(1,  '用户性别', 'sys_user_sex',        '0', 'admin', sysdate(), '', null, '用户性别列表');
-insert into sys_dict_type values(2,  '菜单状态', 'sys_show_hide',       '0', 'admin', sysdate(), '', null, '菜单状态列表');
-insert into sys_dict_type values(3,  '系统开关', 'sys_normal_disable',  '0', 'admin', sysdate(), '', null, '系统开关列表');
-insert into sys_dict_type values(4,  '任务状态', 'sys_job_status',      '0', 'admin', sysdate(), '', null, '任务状态列表');
-insert into sys_dict_type values(5,  '任务分组', 'sys_job_group',       '0', 'admin', sysdate(), '', null, '任务分组列表');
-insert into sys_dict_type values(6,  '系统是否', 'sys_yes_no',          '0', 'admin', sysdate(), '', null, '系统是否列表');
-insert into sys_dict_type values(7,  '通知类型', 'sys_notice_type',     '0', 'admin', sysdate(), '', null, '通知类型列表');
-insert into sys_dict_type values(8,  '通知状态', 'sys_notice_status',   '0', 'admin', sysdate(), '', null, '通知状态列表');
-insert into sys_dict_type values(9,  '操作类型', 'sys_oper_type',       '0', 'admin', sysdate(), '', null, '操作类型列表');
-insert into sys_dict_type values(10, '系统状态', 'sys_common_status',   '0', 'admin', sysdate(), '', null, '登录状态列表');
-
-
-drop table if exists sys_dict_data;
-create table sys_dict_data
-(
-  dict_code        bigint(20)      not null auto_increment    comment '字典编码',
-  dict_sort        int(4)          default 0                  comment '字典排序',
-  dict_label       varchar(100)    default ''                 comment '字典标签',
-  dict_value       varchar(100)    default ''                 comment '字典键值',
-  dict_type        varchar(100)    default ''                 comment '字典类型',
-  css_class        varchar(100)    default null               comment '样式属性(其他样式扩展)',
-  list_class       varchar(100)    default null               comment '表格回显样式',
-  is_default       char(1)         default 'N'                comment '是否默认(Y是 N否)',
-  status           char(1)         default '0'                comment '状态(0正常 1停用)',
-  create_by        varchar(64)     default ''                 comment '创建者',
-  create_time      datetime                                   comment '创建时间',
-  update_by        varchar(64)     default ''                 comment '更新者',
-  update_time      datetime                                   comment '更新时间',
-  remark           varchar(500)    default null               comment '备注',
-  primary key (dict_code)
-) engine=innodb auto_increment=100 comment = '字典数据表';
-
-insert into sys_dict_data values(1,  1,  '男',       '0',       'sys_user_sex',        '',   '',        'Y', '0', 'admin', sysdate(), '', null, '性别男');
-insert into sys_dict_data values(2,  2,  '女',       '1',       'sys_user_sex',        '',   '',        'N', '0', 'admin', sysdate(), '', null, '性别女');
-insert into sys_dict_data values(3,  3,  '未知',     '2',       'sys_user_sex',        '',   '',        'N', '0', 'admin', sysdate(), '', null, '性别未知');
-insert into sys_dict_data values(4,  1,  '显示',     '0',       'sys_show_hide',       '',   'primary', 'Y', '0', 'admin', sysdate(), '', null, '显示菜单');
-insert into sys_dict_data values(5,  2,  '隐藏',     '1',       'sys_show_hide',       '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '隐藏菜单');
-insert into sys_dict_data values(6,  1,  '正常',     '0',       'sys_normal_disable',  '',   'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
-insert into sys_dict_data values(7,  2,  '停用',     '1',       'sys_normal_disable',  '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '停用状态');
-insert into sys_dict_data values(8,  1,  '正常',     '0',       'sys_job_status',      '',   'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
-insert into sys_dict_data values(9,  2,  '暂停',     '1',       'sys_job_status',      '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '停用状态');
-insert into sys_dict_data values(10, 1,  '默认',     'DEFAULT', 'sys_job_group',       '',   '',        'Y', '0', 'admin', sysdate(), '', null, '默认分组');
-insert into sys_dict_data values(11, 2,  '系统',     'SYSTEM',  'sys_job_group',       '',   '',        'N', '0', 'admin', sysdate(), '', null, '系统分组');
-insert into sys_dict_data values(12, 1,  '是',       'Y',       'sys_yes_no',          '',   'primary', 'Y', '0', 'admin', sysdate(), '', null, '系统默认是');
-insert into sys_dict_data values(13, 2,  '否',       'N',       'sys_yes_no',          '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '系统默认否');
-insert into sys_dict_data values(14, 1,  '通知',     '1',       'sys_notice_type',     '',   'warning', 'Y', '0', 'admin', sysdate(), '', null, '通知');
-insert into sys_dict_data values(15, 2,  '公告',     '2',       'sys_notice_type',     '',   'success', 'N', '0', 'admin', sysdate(), '', null, '公告');
-insert into sys_dict_data values(16, 1,  '正常',     '0',       'sys_notice_status',   '',   'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
-insert into sys_dict_data values(17, 2,  '关闭',     '1',       'sys_notice_status',   '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '关闭状态');
-insert into sys_dict_data values(18, 99, '其他',     '0',       'sys_oper_type',       '',   'info',    'N', '0', 'admin', sysdate(), '', null, '其他操作');
-insert into sys_dict_data values(19, 1,  '新增',     '1',       'sys_oper_type',       '',   'info',    'N', '0', 'admin', sysdate(), '', null, '新增操作');
-insert into sys_dict_data values(20, 2,  '修改',     '2',       'sys_oper_type',       '',   'info',    'N', '0', 'admin', sysdate(), '', null, '修改操作');
-insert into sys_dict_data values(21, 3,  '删除',     '3',       'sys_oper_type',       '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '删除操作');
-insert into sys_dict_data values(22, 4,  '授权',     '4',       'sys_oper_type',       '',   'primary', 'N', '0', 'admin', sysdate(), '', null, '授权操作');
-insert into sys_dict_data values(23, 5,  '导出',     '5',       'sys_oper_type',       '',   'warning', 'N', '0', 'admin', sysdate(), '', null, '导出操作');
-insert into sys_dict_data values(24, 6,  '导入',     '6',       'sys_oper_type',       '',   'warning', 'N', '0', 'admin', sysdate(), '', null, '导入操作');
-insert into sys_dict_data values(25, 7,  '强退',     '7',       'sys_oper_type',       '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '强退操作');
-insert into sys_dict_data values(26, 8,  '生成代码', '8',       'sys_oper_type',       '',   'warning', 'N', '0', 'admin', sysdate(), '', null, '生成操作');
-insert into sys_dict_data values(27, 9,  '清空数据', '9',       'sys_oper_type',       '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '清空操作');
-insert into sys_dict_data values(28, 1,  '成功',     '0',       'sys_common_status',   '',   'primary', 'N', '0', 'admin', sysdate(), '', null, '正常状态');
-insert into sys_dict_data values(29, 2,  '失败',     '1',       'sys_common_status',   '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '停用状态');
-
-
-drop table if exists sys_config;
-create table sys_config (
-  config_id         int(5)          not null auto_increment    comment '参数主键',
-  config_name       varchar(100)    default ''                 comment '参数名称',
-  config_key        varchar(100)    default ''                 comment '参数键名',
-  config_value      varchar(500)    default ''                 comment '参数键值',
-  config_type       char(1)         default 'N'                comment '系统内置(Y是 N否)',
-  create_by         varchar(64)     default ''                 comment '创建者',
-  create_time       datetime                                   comment '创建时间',
-  update_by         varchar(64)     default ''                 comment '更新者',
-  update_time       datetime                                   comment '更新时间',
-  remark            varchar(500)    default null               comment '备注',
-  primary key (config_id)
-) engine=innodb auto_increment=100 comment = '参数配置表';
-
-insert into sys_config values(1,  '主框架页-默认皮肤样式名称',     'sys.index.skinName',               'skin-blue',     'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow');
-insert into sys_config values(2,  '用户管理-账号初始密码',         'sys.user.initPassword',            '123456',        'Y', 'admin', sysdate(), '', null, '初始化密码 123456');
-insert into sys_config values(3,  '主框架页-侧边栏主题',           'sys.index.sideTheme',              'theme-dark',    'Y', 'admin', sysdate(), '', null, '深黑主题theme-dark,浅色主题theme-light,深蓝主题theme-blue');
-insert into sys_config values(4,  '账号自助-是否开启用户注册功能', 'sys.account.registerUser',         'false',         'Y', 'admin', sysdate(), '', null, '是否开启注册用户功能(true开启,false关闭)');
-insert into sys_config values(5,  '用户管理-密码字符范围',         'sys.account.chrtype',              '0',             'Y', 'admin', sysdate(), '', null, '默认任意字符范围,0任意(密码可以输入任意字符),1数字(密码只能为0-9数字),2英文字母(密码只能为a-z和A-Z字母),3字母和数字(密码必须包含字母,数字),4字母数字和特殊字符(目前支持的特殊字符包括:~!@#$%^&*()-=_+)');
-insert into sys_config values(6,  '用户管理-初始密码修改策略',     'sys.account.initPasswordModify',   '0',             'Y', 'admin', sysdate(), '', null, '0:初始密码修改策略关闭,没有任何提示,1:提醒用户,如果未修改初始密码,则在登录时就会提醒修改密码对话框');
-insert into sys_config values(7,  '用户管理-账号密码更新周期',     'sys.account.passwordValidateDays', '0',             'Y', 'admin', sysdate(), '', null, '密码更新周期(填写数字,数据初始化值为0不限制,若修改必须为大于0小于365的正整数),如果超过这个周期登录系统时,则在登录时就会提醒修改密码对话框');
-insert into sys_config values(8,  '主框架页-菜单导航显示风格',     'sys.index.menuStyle',              'default',       'Y', 'admin', sysdate(), '', null, '菜单导航显示风格(default为左侧导航菜单,topnav为顶部导航菜单)');
-insert into sys_config values(9,  '主框架页-是否开启页脚',         'sys.index.footer',                 'true',          'Y', 'admin', sysdate(), '', null, '是否开启底部页脚显示(true显示,false隐藏)');
-insert into sys_config values(10, '主框架页-是否开启页签',         'sys.index.tagsView',               'true',          'Y', 'admin', sysdate(), '', null, '是否开启菜单多页签显示(true显示,false隐藏)');
-
-
-drop table if exists sys_logininfor;
-create table sys_logininfor (
-  info_id        bigint(20)     not null auto_increment   comment '访问ID',
-  login_name     varchar(50)    default ''                comment '登录账号',
-  ipaddr         varchar(128)   default ''                comment '登录IP地址',
-  login_location varchar(255)   default ''                comment '登录地点',
-  browser        varchar(50)    default ''                comment '浏览器类型',
-  os             varchar(50)    default ''                comment '操作系统',
-  status         char(1)        default '0'               comment '登录状态(0成功 1失败)',
-  msg            varchar(255)   default ''                comment '提示消息',
-  login_time     datetime                                 comment '访问时间',
-  primary key (info_id)
-) engine=innodb auto_increment=100 comment = '系统访问记录';
-
-
-drop table if exists sys_user_online;
-create table sys_user_online (
-  sessionId         varchar(50)   default ''                comment '用户会话id',
-  login_name        varchar(50)   default ''                comment '登录账号',
-  dept_name         varchar(50)   default ''                comment '部门名称',
-  ipaddr            varchar(128)  default ''                comment '登录IP地址',
-  login_location    varchar(255)  default ''                comment '登录地点',
-  browser           varchar(50)   default ''                comment '浏览器类型',
-  os                varchar(50)   default ''                comment '操作系统',
-  status            varchar(10)   default ''                comment '在线状态on_line在线off_line离线',
-  start_timestamp   datetime                                comment 'session创建时间',
-  last_access_time  datetime                                comment 'session最后访问时间',
-  expire_time       int(5)        default 0                 comment '超时时间,单位为分钟',
-  primary key (sessionId)
-) engine=innodb comment = '在线用户记录';
-
-
-drop table if exists sys_job;
-create table sys_job (
-  job_id              bigint(20)    not null auto_increment    comment '任务ID',
-  job_name            varchar(64)   default ''                 comment '任务名称',
-  job_group           varchar(64)   default 'DEFAULT'          comment '任务组名',
-  invoke_target       varchar(500)  not null                   comment '调用目标字符串',
-  cron_expression     varchar(255)  default ''                 comment 'cron执行表达式',
-  misfire_policy      varchar(20)   default '3'                comment '计划执行错误策略(1立即执行 2执行一次 3放弃执行)',
-  concurrent          char(1)       default '1'                comment '是否并发执行(0允许 1禁止)',
-  status              char(1)       default '0'                comment '状态(0正常 1暂停)',
-  create_by           varchar(64)   default ''                 comment '创建者',
-  create_time         datetime                                 comment '创建时间',
-  update_by           varchar(64)   default ''                 comment '更新者',
-  update_time         datetime                                 comment '更新时间',
-  remark              varchar(500)  default ''                 comment '备注信息',
-  primary key (job_id, job_name, job_group)
-) engine=innodb auto_increment=100 comment = '定时任务调度表';
-
-insert into sys_job values(1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams',        '0/10 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
-insert into sys_job values(2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')',  '0/15 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
-insert into sys_job values(3, '系统默认(多参)', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)',  '0/20 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
-
-
-drop table if exists sys_job_log;
-create table sys_job_log (
-  job_log_id          bigint(20)     not null auto_increment    comment '任务日志ID',
-  job_name            varchar(64)    not null                   comment '任务名称',
-  job_group           varchar(64)    not null                   comment '任务组名',
-  invoke_target       varchar(500)   not null                   comment '调用目标字符串',
-  job_message         varchar(500)                              comment '日志信息',
-  status              char(1)        default '0'                comment '执行状态(0正常 1失败)',
-  exception_info      varchar(2000)  default ''                 comment '异常信息',
-  create_time         datetime                                  comment '创建时间',
-  primary key (job_log_id)
-) engine=innodb comment = '定时任务调度日志表';
-
-
-drop table if exists sys_notice;
-create table sys_notice (
-  notice_id         int(4)          not null auto_increment    comment '公告ID',
-  notice_title      varchar(50)     not null                   comment '公告标题',
-  notice_type       char(1)         not null                   comment '公告类型(1通知 2公告)',
-  notice_content    varchar(2000)   default null               comment '公告内容',
-  status            char(1)         default '0'                comment '公告状态(0正常 1关闭)',
-  create_by         varchar(64)     default ''                 comment '创建者',
-  create_time       datetime                                   comment '创建时间',
-  update_by         varchar(64)     default ''                 comment '更新者',
-  update_time       datetime                                   comment '更新时间',
-  remark            varchar(255)    default null               comment '备注',
-  primary key (notice_id)
-) engine=innodb auto_increment=10 comment = '通知公告表';
-
-insert into sys_notice values('1', '温馨提醒:2018-07-01 首佳新版本发布啦', '2', '新版本内容', '0', 'admin', sysdate(), '', null, '管理员');
-insert into sys_notice values('2', '维护通知:2018-07-01 首佳系统凌晨维护', '1', '维护内容',   '0', 'admin', sysdate(), '', null, '管理员');
-
-
-drop table if exists gen_table;
-create table gen_table (
-  table_id             bigint(20)      not null auto_increment    comment '编号',
-  table_name           varchar(200)    default ''                 comment '表名称',
-  table_comment        varchar(500)    default ''                 comment '表描述',
-  sub_table_name       varchar(64)     default null               comment '关联子表的表名',
-  sub_table_fk_name    varchar(64)     default null               comment '子表关联的外键名',
-  class_name           varchar(100)    default ''                 comment '实体类名称',
-  tpl_category         varchar(200)    default 'crud'             comment '使用的模板(crud单表操作 tree树表操作 sub主子表操作)',
-  package_name         varchar(100)                               comment '生成包路径',
-  module_name          varchar(30)                                comment '生成模块名',
-  business_name        varchar(30)                                comment '生成业务名',
-  function_name        varchar(50)                                comment '生成功能名',
-  function_author      varchar(50)                                comment '生成功能作者',
-  gen_type             char(1)         default '0'                comment '生成代码方式(0zip压缩包 1自定义路径)',
-  gen_path             varchar(200)    default '/'                comment '生成路径(不填默认项目路径)',
-  options              varchar(1000)                              comment '其它生成选项',
-  create_by            varchar(64)     default ''                 comment '创建者',
-  create_time 	       datetime                                   comment '创建时间',
-  update_by            varchar(64)     default ''                 comment '更新者',
-  update_time          datetime                                   comment '更新时间',
-  remark               varchar(500)    default null               comment '备注',
-  primary key (table_id)
-) engine=innodb auto_increment=1 comment = '代码生成业务表';
-
-
-drop table if exists gen_table_column;
-create table gen_table_column (
-  column_id         bigint(20)      not null auto_increment    comment '编号',
-  table_id          varchar(64)                                comment '归属表编号',
-  column_name       varchar(200)                               comment '列名称',
-  column_comment    varchar(500)                               comment '列描述',
-  column_type       varchar(100)                               comment '列类型',
-  java_type         varchar(500)                               comment 'JAVA类型',
-  java_field        varchar(200)                               comment 'JAVA字段名',
-  is_pk             char(1)                                    comment '是否主键(1是)',
-  is_increment      char(1)                                    comment '是否自增(1是)',
-  is_required       char(1)                                    comment '是否必填(1是)',
-  is_insert         char(1)                                    comment '是否为插入字段(1是)',
-  is_edit           char(1)                                    comment '是否编辑字段(1是)',
-  is_list           char(1)                                    comment '是否列表字段(1是)',
-  is_query          char(1)                                    comment '是否查询字段(1是)',
-  query_type        varchar(200)    default 'EQ'               comment '查询方式(等于、不等于、大于、小于、范围)',
-  html_type         varchar(200)                               comment '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)',
-  dict_type         varchar(200)    default ''                 comment '字典类型',
-  sort              int                                        comment '排序',
-  create_by         varchar(64)     default ''                 comment '创建者',
-  create_time 	    datetime                                   comment '创建时间',
-  update_by         varchar(64)     default ''                 comment '更新者',
-  update_time       datetime                                   comment '更新时间',
-  primary key (column_id)
-) engine=innodb auto_increment=1 comment = '代码生成业务表字段';