NorthLan hace 7 años
padre
commit
4b232be7f9

+ 9 - 7
zen-orm/src/main/kotlin/com/gxzc/zen/Generator.kt

@@ -17,7 +17,7 @@ import java.io.File
  * @url https://noahlan.me
  */
 fun main(args: Array<String>) {
-    generate(true, "NorthLan", "sys", DataSourceConfig().also {
+    generate(true, "NorthLan", "bus", DataSourceConfig().also {
         it.dbType = DbType.MYSQL
         it.typeConvert = object : MySqlTypeConvert() {
             override fun processTypeConvert(fieldType: String?): DbColumnType {
@@ -25,12 +25,12 @@ fun main(args: Array<String>) {
             }
         }
         it.driverName = "com.mysql.jdbc.Driver"
-        it.username = "archives"
-        it.password = "archives"
-        it.url = "jdbc:mysql://192.168.1.124:3307/archives_sys?characterEncoding=utf8"
-//        it.url = "jdbc:mysql://127.0.0.1:3306/archives_mgr?characterEncoding=utf8"
-//        it.username = "root"
-//        it.password = "root"
+//        it.username = "archives"
+//        it.password = "archives"
+//        it.url = "jdbc:mysql://192.168.1.124:3307/archives_sys?characterEncoding=utf8"
+        it.url = "jdbc:mysql://127.0.0.1:3306/archives_mgr?characterEncoding=utf8"
+        it.username = "root"
+        it.password = "root"
     })
 }
 
@@ -113,6 +113,8 @@ fun generate(isKotlin: Boolean, author: String, pkgType: String, dataSourceConfi
     mpg.template = TemplateConfig().also {
         it.controller = null // 不生成controller
         it.xml = null
+        // it.service = null
+//        it.mapper = null
     }
 
     mpg.execute()

+ 2 - 0
zen-web/src/main/kotlin/com/gxzc/zen/controller/ExampleController.kt

@@ -2,6 +2,7 @@ package com.gxzc.zen.controller
 
 import com.baomidou.kisso.annotation.Action
 import com.baomidou.kisso.annotation.Login
+import com.baomidou.kisso.annotation.Permission
 import com.gxzc.zen.api.sys.service.ISysPermissionService
 import com.gxzc.zen.api.sys.service.ISysUserService
 import org.slf4j.LoggerFactory
@@ -38,6 +39,7 @@ class ExampleController {
 
     @GetMapping("testCache")
     @Login(action = Action.Skip)
+    @Permission("user:crud")
     fun testCache() {
         println(cacheManager.cacheNames)