Browse Source

解决实体类没有设置主键会删除表里面所有数据

zhangweixin 4 years ago
parent
commit
fc97f69bdf
27 changed files with 374 additions and 380 deletions
  1. 5 2
      gradle.properties
  2. 1 3
      persagy-service-base/build.gradle
  3. 75 78
      persagy-service-base/src/main/kotlin/com/persagy/service/json/SJsonHttpMessageConverter.kt
  4. 95 95
      persagy-service-base/src/main/kotlin/com/persagy/sso/controllers/SSsoUserController.kt
  5. 75 75
      persagy-service-base/src/main/kotlin/com/persagy/sso/models/entities/SSsoUser.kt
  6. 2 4
      persagy-service-models/build.gradle
  7. 4 4
      persagy-service-models/src/main/kotlin/com/persagy/service/models/SBaseEntity.kt
  8. 9 8
      persagy-service-models/src/main/kotlin/com/persagy/service/models/SCascadeQuery.kt
  9. 5 4
      persagy-service-models/src/main/kotlin/com/persagy/service/models/SCascadeUpdate.kt
  10. 4 3
      persagy-service-models/src/main/kotlin/com/persagy/service/models/SJoinQuery.kt
  11. 4 4
      persagy-service-models/src/main/kotlin/com/persagy/service/models/requests/SCountRequest.kt
  12. 5 6
      persagy-service-models/src/main/kotlin/com/persagy/service/models/requests/SCreateRequest.kt
  13. 3 4
      persagy-service-models/src/main/kotlin/com/persagy/service/models/requests/SDeleteRequest.kt
  14. 11 11
      persagy-service-models/src/main/kotlin/com/persagy/service/models/requests/SQueryRequest.kt
  15. 5 6
      persagy-service-models/src/main/kotlin/com/persagy/service/models/requests/SUpdateRequest.kt
  16. 5 5
      persagy-service-models/src/main/kotlin/com/persagy/service/models/responses/SBaseResponse.kt
  17. 3 4
      persagy-service-models/src/main/kotlin/com/persagy/service/models/responses/SCountResponse.kt
  18. 3 4
      persagy-service-models/src/main/kotlin/com/persagy/service/models/responses/SCreateResponse.kt
  19. 2 2
      persagy-service-models/src/main/kotlin/com/persagy/service/models/responses/SDeleteResponse.kt
  20. 6 7
      persagy-service-models/src/main/kotlin/com/persagy/service/models/responses/SQueryResponse.kt
  21. 6 6
      persagy-service-mysql/src/main/kotlin/com/persagy/service/mysql/controllers/SDatabaseDocController.kt
  22. 10 11
      persagy-service-mysql/src/main/kotlin/com/persagy/service/mysql/models/SColumn.kt
  23. 7 7
      persagy-service-mysql/src/main/kotlin/com/persagy/service/mysql/models/STable.kt
  24. 9 8
      persagy-service-postgresql/src/main/kotlin/com/persagy/service/postgresql/controllers/SDatabaseDocController.kt
  25. 10 11
      persagy-service-postgresql/src/main/kotlin/com/persagy/service/postgresql/models/SColumn.kt
  26. 6 7
      persagy-service-postgresql/src/main/kotlin/com/persagy/service/postgresql/models/STable.kt
  27. 4 1
      settings.gradle

+ 5 - 2
gradle.properties

@@ -25,8 +25,8 @@
 #
 
 PERSAGY_URL = http://www.persagy.com
-PERSAGY_KOTLIN_VERSION = 1.4.112
-PERSAGY_SERVICE_VERSION = 1.4.153
+PERSAGY_KOTLIN_VERSION = 1.4.115
+PERSAGY_SERVICE_VERSION = 1.4.154
 
 MAVEN_REPO_PUBLIC_URL = http://dev.dp.sagacloud.cn:8082/repository/maven-public/
 MAVEN_REPO_RELEASE_URL = http://dev.dp.sagacloud.cn:8082/repository/maven-releases/
@@ -77,3 +77,6 @@ ZXING_VERSION = 3.2.1
 SPRING_CLOUD_DEPENDENCIES = Finchley.RELEASE
 
 GRADLE_SSH_VERSION = 2.9.0
+
+# https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui
+SPRING_DOC_VERSION = 1.4.8

+ 1 - 3
persagy-service-base/build.gradle

@@ -64,9 +64,7 @@ dependencies {
 
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // RESTful API 文档生成工具
-    // https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui
-    compile group: 'io.springfox', name: 'springfox-swagger-ui', version: SWAGGER_VERSION
-    compile group: 'io.springfox', name: 'springfox-swagger2', version: SWAGGER_VERSION
+
 
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // 二维码与条形码

+ 75 - 78
persagy-service-base/src/main/kotlin/com/persagy/service/json/SJsonHttpMessageConverter.kt

@@ -1,78 +1,75 @@
-/*
- * *********************************************************************************************************************
- *
- *          !!
- *        .F88X
- *        X8888Y
- *      .}888888N;
- *        i888888N;        .:!              .I$WI:
- *          R888888I      .'N88~            i8}+8Y&8"l8i$8>8W~'>W8}8]KW+8IIN"8&
- *          .R888888I    .;N8888~          .X8'  "8I.!,/8"  !%NY8`"8I8~~8>,88I
- *            +888888N;  .8888888Y                                  "&&8Y.}8,
- *            ./888888N;  .R888888Y        .'}~    .>}'.`+>  i}!    "i'  +/'  .'i~  !11,.:">,  .~]!  .i}i
- *              ~888888%:  .I888888l      .]88~`1/iY88Ii+1'.R$8$8]"888888888>  Y8$  W8E  X8E  W8888'188Il}Y88$*
- *              18888888    E8888881    .]W%8$`R8X'&8%++N8i,8N%N8+l8%`  .}8N:.R$RE%N88N%N$K$R  188,FE$8%~Y88I
- *            .E888888I  .i8888888'      .:$8I;88+`E8R:/8N,.>881.`$8E/1/]N8X.Y8N`"KF&&FK!'88*."88K./$88%RN888+~
- *            8888888I  .,N888888~        ~88i"8W,!N8*.I88.}888%F,i$88"F88"  888:E8X.>88!i88>`888*.}Fl1]*}1YKi'
- *          i888888N'      I888Y          ]88;/EX*IFKFK88X  K8R  .l8W  88Y  ~88}'88E&%8W.X8N``]88!.$8K  .:W8I
- *        .i888888N;        I8Y          .&8$  .X88!  i881.:%888>I88  ;88]  +88+.';;;;:.Y88X  18N.,88l  .+88/
- *      .:R888888I
- *      .&888888I                                          Copyright (c) 2016-2020.  博锐尚格科技股份有限公司
- *        ~8888'
- *        .!88~                                                                     All rights reserved.
- *
- * *********************************************************************************************************************
- */
-
-package com.persagy.service.json
-
-import com.alibaba.fastjson.JSON
-import com.alibaba.fastjson.PropertyNamingStrategy
-import com.alibaba.fastjson.serializer.NameFilter
-import com.alibaba.fastjson.serializer.SerializeConfig
-import com.alibaba.fastjson.serializer.SerializerFeature
-import com.alibaba.fastjson.support.config.FastJsonConfig
-import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter
-import com.persagy.base.utils.SJsonUtil
-import org.springframework.http.MediaType
-import springfox.documentation.swagger.web.SwaggerResource
-import springfox.documentation.swagger.web.UiConfiguration
-
-/**
- *
- */
-open class SJsonHttpMessageConverter : FastJsonHttpMessageConverter() {
-
-    /**
-     * 属性名命名规则
-     */
-    var propertyNamingStrategy : PropertyNamingStrategy
-        get() = SJsonUtil.serializeConfig.propertyNamingStrategy
-        set(value) {
-            SJsonUtil.serializeConfig.propertyNamingStrategy = value
-        } // Set propertyNamingStrategy
-
-    init {
-        val fastJsonConfig = FastJsonConfig()
-        fastJsonConfig.dateFormat = JSON.DEFFAULT_DATE_FORMAT
-        fastJsonConfig.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect)
-        this.fastJsonConfig = fastJsonConfig;
-
-        val nameFilter = NameFilter({ obj, name, value -> name })
-        //val nameFilter = { `object`, name, value -> name }
-        SJsonUtil.serializeConfig.addFilter(UiConfiguration::class.java, nameFilter)
-        SJsonUtil.serializeConfig.addFilter(SwaggerResource::class.java, nameFilter)
-//        serializeConfig.addFilter(MetricsEndpoint.MetricResponse::class.java, nameFilter)
-//        serializeConfig.addFilter(EnvironmentEndpoint.EnvironmentDescriptor::class.java, nameFilter)
-        fastJsonConfig.serializeConfig = SJsonUtil.serializeConfig
-
-        val fastMediaTypes = ArrayList<MediaType>()
-        fastMediaTypes.add(MediaType.APPLICATION_JSON)
-        fastMediaTypes.add(MediaType.APPLICATION_FORM_URLENCODED)
-        fastMediaTypes.add(MediaType.APPLICATION_OCTET_STREAM)
-        fastMediaTypes.add(MediaType.TEXT_HTML)
-        fastMediaTypes.add(MediaType("application", "vnd.spring-boot.actuator.v2+json"))
-        this.supportedMediaTypes = fastMediaTypes;
-    } // Init
-
-} // Class SJsonHttpMessageConverter
+///*
+// * *********************************************************************************************************************
+// *
+// *          !!
+// *        .F88X
+// *        X8888Y
+// *      .}888888N;
+// *        i888888N;        .:!              .I$WI:
+// *          R888888I      .'N88~            i8}+8Y&8"l8i$8>8W~'>W8}8]KW+8IIN"8&
+// *          .R888888I    .;N8888~          .X8'  "8I.!,/8"  !%NY8`"8I8~~8>,88I
+// *            +888888N;  .8888888Y                                  "&&8Y.}8,
+// *            ./888888N;  .R888888Y        .'}~    .>}'.`+>  i}!    "i'  +/'  .'i~  !11,.:">,  .~]!  .i}i
+// *              ~888888%:  .I888888l      .]88~`1/iY88Ii+1'.R$8$8]"888888888>  Y8$  W8E  X8E  W8888'188Il}Y88$*
+// *              18888888    E8888881    .]W%8$`R8X'&8%++N8i,8N%N8+l8%`  .}8N:.R$RE%N88N%N$K$R  188,FE$8%~Y88I
+// *            .E888888I  .i8888888'      .:$8I;88+`E8R:/8N,.>881.`$8E/1/]N8X.Y8N`"KF&&FK!'88*."88K./$88%RN888+~
+// *            8888888I  .,N888888~        ~88i"8W,!N8*.I88.}888%F,i$88"F88"  888:E8X.>88!i88>`888*.}Fl1]*}1YKi'
+// *          i888888N'      I888Y          ]88;/EX*IFKFK88X  K8R  .l8W  88Y  ~88}'88E&%8W.X8N``]88!.$8K  .:W8I
+// *        .i888888N;        I8Y          .&8$  .X88!  i881.:%888>I88  ;88]  +88+.';;;;:.Y88X  18N.,88l  .+88/
+// *      .:R888888I
+// *      .&888888I                                          Copyright (c) 2016-2020.  博锐尚格科技股份有限公司
+// *        ~8888'
+// *        .!88~                                                                     All rights reserved.
+// *
+// * *********************************************************************************************************************
+// */
+//
+//package com.persagy.service.json
+//
+//import com.alibaba.fastjson.JSON
+//import com.alibaba.fastjson.PropertyNamingStrategy
+//import com.alibaba.fastjson.serializer.NameFilter
+//import com.alibaba.fastjson.serializer.SerializerFeature
+//import com.alibaba.fastjson.support.config.FastJsonConfig
+//import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter
+//import com.persagy.base.utils.SJsonUtil
+//import org.springframework.http.MediaType
+//
+///**
+// *
+// */
+//open class SJsonHttpMessageConverter : FastJsonHttpMessageConverter() {
+//
+//    /**
+//     * 属性名命名规则
+//     */
+//    var propertyNamingStrategy : PropertyNamingStrategy
+//        get() = SJsonUtil.serializeConfig.propertyNamingStrategy
+//        set(value) {
+//            SJsonUtil.serializeConfig.propertyNamingStrategy = value
+//        } // Set propertyNamingStrategy
+//
+//    init {
+//        val fastJsonConfig = FastJsonConfig()
+//        fastJsonConfig.dateFormat = JSON.DEFFAULT_DATE_FORMAT
+//        fastJsonConfig.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect)
+//        this.fastJsonConfig = fastJsonConfig;
+//
+//        val nameFilter = NameFilter({ obj, name, value -> name })
+//        //val nameFilter = { `object`, name, value -> name }
+//        SJsonUtil.serializeConfig.addFilter(UiConfiguration::class.java, nameFilter)
+//        SJsonUtil.serializeConfig.addFilter(SwaggerResource::class.java, nameFilter)
+////        serializeConfig.addFilter(MetricsEndpoint.MetricResponse::class.java, nameFilter)
+////        serializeConfig.addFilter(EnvironmentEndpoint.EnvironmentDescriptor::class.java, nameFilter)
+//        fastJsonConfig.serializeConfig = SJsonUtil.serializeConfig
+//
+//        val fastMediaTypes = ArrayList<MediaType>()
+//        fastMediaTypes.add(MediaType.APPLICATION_JSON)
+//        fastMediaTypes.add(MediaType.APPLICATION_FORM_URLENCODED)
+//        fastMediaTypes.add(MediaType.APPLICATION_OCTET_STREAM)
+//        fastMediaTypes.add(MediaType.TEXT_HTML)
+//        fastMediaTypes.add(MediaType("application", "vnd.spring-boot.actuator.v2+json"))
+//        this.supportedMediaTypes = fastMediaTypes;
+//    } // Init
+//
+//} // Class SJsonHttpMessageConverter

+ 95 - 95
persagy-service-base/src/main/kotlin/com/persagy/sso/controllers/SSsoUserController.kt

@@ -1,95 +1,95 @@
-/*
- * *********************************************************************************************************************
- *
- *          !!
- *        .F88X
- *        X8888Y
- *      .}888888N;
- *        i888888N;        .:!              .I$WI:
- *          R888888I      .'N88~            i8}+8Y&8"l8i$8>8W~'>W8}8]KW+8IIN"8&
- *          .R888888I    .;N8888~          .X8'  "8I.!,/8"  !%NY8`"8I8~~8>,88I
- *            +888888N;  .8888888Y                                  "&&8Y.}8,
- *            ./888888N;  .R888888Y        .'}~    .>}'.`+>  i}!    "i'  +/'  .'i~  !11,.:">,  .~]!  .i}i
- *              ~888888%:  .I888888l      .]88~`1/iY88Ii+1'.R$8$8]"888888888>  Y8$  W8E  X8E  W8888'188Il}Y88$*
- *              18888888    E8888881    .]W%8$`R8X'&8%++N8i,8N%N8+l8%`  .}8N:.R$RE%N88N%N$K$R  188,FE$8%~Y88I
- *            .E888888I  .i8888888'      .:$8I;88+`E8R:/8N,.>881.`$8E/1/]N8X.Y8N`"KF&&FK!'88*."88K./$88%RN888+~
- *            8888888I  .,N888888~        ~88i"8W,!N8*.I88.}888%F,i$88"F88"  888:E8X.>88!i88>`888*.}Fl1]*}1YKi'
- *          i888888N'      I888Y          ]88;/EX*IFKFK88X  K8R  .l8W  88Y  ~88}'88E&%8W.X8N``]88!.$8K  .:W8I
- *        .i888888N;        I8Y          .&8$  .X88!  i881.:%888>I88  ;88]  +88+.';;;;:.Y88X  18N.,88l  .+88/
- *      .:R888888I
- *      .&888888I                                          Copyright (c) 2016-2020.  博锐尚格科技股份有限公司
- *        ~8888'
- *        .!88~                                                                     All rights reserved.
- *
- * *********************************************************************************************************************
- */
-
-package com.persagy.sso.controllers
-
-import com.persagy.base.extensions.toJson
-import com.persagy.service.SObjectService
-import com.persagy.service.models.requests.SCreateRequest
-import com.persagy.service.models.requests.SQueryRequest
-import com.persagy.service.models.requests.SUpdateRequest
-import com.persagy.service.models.responses.SBaseResponse
-import com.persagy.service.models.responses.SCreateResponse
-import com.persagy.service.models.responses.SQueryResponse
-import com.persagy.sso.models.entities.SSsoUser
-import io.swagger.annotations.ApiOperation
-import org.slf4j.LoggerFactory
-import org.springframework.web.bind.annotation.PostMapping
-import org.springframework.web.bind.annotation.RequestBody
-
-/**
- * 单点登录用户接口
- *
- * @author 庞利祥 <sybotan@126.com>
- */
-open class SSsoUserController<USER: SSsoUser> {
-    companion object {
-        // 日志
-        private val logger = LoggerFactory.getLogger(SSsoUserController::class.java)
-    } // Companion object
-
-    protected lateinit var userService: SObjectService<USER> // = SDataService(SMybatisDao(SSsoUser::class.java))
-
-    /**
-     * 创建用户
-     */
-    @ApiOperation(value = "创建单点登录用户", notes = "")
-    @PostMapping(value = ["/create"])
-    fun create(@RequestBody request: SCreateRequest<USER>): SCreateResponse<USER> {
-        logger.debug("user =${request.toJson()}")
-        return userService.createList(request)
-    } // Fun create()
-
-    /**
-     * 更新用户
-     */
-    @ApiOperation(value = "更新单点登录用户", notes = "")
-    @PostMapping(value = ["/update"])
-    fun updateList(@RequestBody request: SUpdateRequest<USER>): SBaseResponse {
-        return userService.updateList(request)
-    } // Fun update()
-
-    /**
-     * 删除用户
-     */
-    @ApiOperation(value = "删除单点登录用户", notes = "")
-    @PostMapping(value = ["/delete"])
-    fun delete(@RequestBody entityList: ArrayList<USER>): SBaseResponse {
-        return userService.deleteByKeysList(entityList)
-    } // Fun delete()
-
-    /**
-     * 查询单点登录用户
-     *
-     * @param   request     查询单点登录用户
-     * @return  查询结果应答信息
-     */
-    @ApiOperation(value="查询单点登录用户", notes="")
-    @PostMapping(value = ["/query"])
-    fun queryPage(@RequestBody request: SQueryRequest): SQueryResponse<USER> {
-        return userService.pageQuery(request)
-    } // Fun queryPage()
-} // Class SSsoUserController
+///*
+// * *********************************************************************************************************************
+// *
+// *          !!
+// *        .F88X
+// *        X8888Y
+// *      .}888888N;
+// *        i888888N;        .:!              .I$WI:
+// *          R888888I      .'N88~            i8}+8Y&8"l8i$8>8W~'>W8}8]KW+8IIN"8&
+// *          .R888888I    .;N8888~          .X8'  "8I.!,/8"  !%NY8`"8I8~~8>,88I
+// *            +888888N;  .8888888Y                                  "&&8Y.}8,
+// *            ./888888N;  .R888888Y        .'}~    .>}'.`+>  i}!    "i'  +/'  .'i~  !11,.:">,  .~]!  .i}i
+// *              ~888888%:  .I888888l      .]88~`1/iY88Ii+1'.R$8$8]"888888888>  Y8$  W8E  X8E  W8888'188Il}Y88$*
+// *              18888888    E8888881    .]W%8$`R8X'&8%++N8i,8N%N8+l8%`  .}8N:.R$RE%N88N%N$K$R  188,FE$8%~Y88I
+// *            .E888888I  .i8888888'      .:$8I;88+`E8R:/8N,.>881.`$8E/1/]N8X.Y8N`"KF&&FK!'88*."88K./$88%RN888+~
+// *            8888888I  .,N888888~        ~88i"8W,!N8*.I88.}888%F,i$88"F88"  888:E8X.>88!i88>`888*.}Fl1]*}1YKi'
+// *          i888888N'      I888Y          ]88;/EX*IFKFK88X  K8R  .l8W  88Y  ~88}'88E&%8W.X8N``]88!.$8K  .:W8I
+// *        .i888888N;        I8Y          .&8$  .X88!  i881.:%888>I88  ;88]  +88+.';;;;:.Y88X  18N.,88l  .+88/
+// *      .:R888888I
+// *      .&888888I                                          Copyright (c) 2016-2020.  博锐尚格科技股份有限公司
+// *        ~8888'
+// *        .!88~                                                                     All rights reserved.
+// *
+// * *********************************************************************************************************************
+// */
+//
+//package com.persagy.sso.controllers
+//
+//import com.persagy.base.extensions.toJson
+//import com.persagy.service.SObjectService
+//import com.persagy.service.models.requests.SCreateRequest
+//import com.persagy.service.models.requests.SQueryRequest
+//import com.persagy.service.models.requests.SUpdateRequest
+//import com.persagy.service.models.responses.SBaseResponse
+//import com.persagy.service.models.responses.SCreateResponse
+//import com.persagy.service.models.responses.SQueryResponse
+//import com.persagy.sso.models.entities.SSsoUser
+//
+//import org.slf4j.LoggerFactory
+//import org.springframework.web.bind.annotation.PostMapping
+//import org.springframework.web.bind.annotation.RequestBody
+//
+///**
+// * 单点登录用户接口
+// *
+// * @author 庞利祥 <sybotan@126.com>
+// */
+//open class SSsoUserController<USER: SSsoUser> {
+//    companion object {
+//        // 日志
+//        private val logger = LoggerFactory.getLogger(SSsoUserController::class.java)
+//    } // Companion object
+//
+//    protected lateinit var userService: SObjectService<USER> // = SDataService(SMybatisDao(SSsoUser::class.java))
+//
+//    /**
+//     * 创建用户
+//     */
+//    @ApiOperation(value = "创建单点登录用户", notes = "")
+//    @PostMapping(value = ["/create"])
+//    fun create(@RequestBody request: SCreateRequest<USER>): SCreateResponse<USER> {
+//        logger.debug("user =${request.toJson()}")
+//        return userService.createList(request)
+//    } // Fun create()
+//
+//    /**
+//     * 更新用户
+//     */
+//    @ApiOperation(value = "更新单点登录用户", notes = "")
+//    @PostMapping(value = ["/update"])
+//    fun updateList(@RequestBody request: SUpdateRequest<USER>): SBaseResponse {
+//        return userService.updateList(request)
+//    } // Fun update()
+//
+//    /**
+//     * 删除用户
+//     */
+//    @ApiOperation(value = "删除单点登录用户", notes = "")
+//    @PostMapping(value = ["/delete"])
+//    fun delete(@RequestBody entityList: ArrayList<USER>): SBaseResponse {
+//        return userService.deleteByKeysList(entityList)
+//    } // Fun delete()
+//
+//    /**
+//     * 查询单点登录用户
+//     *
+//     * @param   request     查询单点登录用户
+//     * @return  查询结果应答信息
+//     */
+//    @ApiOperation(value="查询单点登录用户", notes="")
+//    @PostMapping(value = ["/query"])
+//    fun queryPage(@RequestBody request: SQueryRequest): SQueryResponse<USER> {
+//        return userService.pageQuery(request)
+//    } // Fun queryPage()
+//} // Class SSsoUserController

+ 75 - 75
persagy-service-base/src/main/kotlin/com/persagy/sso/models/entities/SSsoUser.kt

@@ -1,75 +1,75 @@
-/*
- * *********************************************************************************************************************
- *
- *          !!
- *        .F88X
- *        X8888Y
- *      .}888888N;
- *        i888888N;        .:!              .I$WI:
- *          R888888I      .'N88~            i8}+8Y&8"l8i$8>8W~'>W8}8]KW+8IIN"8&
- *          .R888888I    .;N8888~          .X8'  "8I.!,/8"  !%NY8`"8I8~~8>,88I
- *            +888888N;  .8888888Y                                  "&&8Y.}8,
- *            ./888888N;  .R888888Y        .'}~    .>}'.`+>  i}!    "i'  +/'  .'i~  !11,.:">,  .~]!  .i}i
- *              ~888888%:  .I888888l      .]88~`1/iY88Ii+1'.R$8$8]"888888888>  Y8$  W8E  X8E  W8888'188Il}Y88$*
- *              18888888    E8888881    .]W%8$`R8X'&8%++N8i,8N%N8+l8%`  .}8N:.R$RE%N88N%N$K$R  188,FE$8%~Y88I
- *            .E888888I  .i8888888'      .:$8I;88+`E8R:/8N,.>881.`$8E/1/]N8X.Y8N`"KF&&FK!'88*."88K./$88%RN888+~
- *            8888888I  .,N888888~        ~88i"8W,!N8*.I88.}888%F,i$88"F88"  888:E8X.>88!i88>`888*.}Fl1]*}1YKi'
- *          i888888N'      I888Y          ]88;/EX*IFKFK88X  K8R  .l8W  88Y  ~88}'88E&%8W.X8N``]88!.$8K  .:W8I
- *        .i888888N;        I8Y          .&8$  .X88!  i881.:%888>I88  ;88]  +88+.';;;;:.Y88X  18N.,88l  .+88/
- *      .:R888888I
- *      .&888888I                                          Copyright (c) 2016-2020.  博锐尚格科技股份有限公司
- *        ~8888'
- *        .!88~                                                                     All rights reserved.
- *
- * *********************************************************************************************************************
- */
-
-package com.persagy.sso.models.entities
-
-import com.persagy.service.models.SBaseEntity
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
-import javax.persistence.Column
-import javax.persistence.Id
-import javax.persistence.Table
-
-/**
- * 单点登录用户实体类
- *
- * @author  庞利祥 <sybotan@126.com>
- */
-@ApiModel(description = "单点登录用户")
-@Table(name = "user")
-open class SSsoUser: SBaseEntity() {
-    /** 用户id */
-    @ApiModelProperty(value = "用户id")
-    @Id
-    @Column(name = "id", updatable = false)
-    var id: String? = null
-
-    /** 用户名 */
-    @ApiModelProperty(value = "用户名", required = true)
-    @Column(name = "user_name")
-    var userName: String? = null
-
-    /** 密码 */
-    @ApiModelProperty(value = "密码", required = true)
-    //@Column(name = "password", updatable = false)
-    var password: String? = null
-
-    /** 真实姓名 */
-    @ApiModelProperty(value = "真实姓名")
-    var realName: String? = null
-
-    /** 手机号码 */
-    @ApiModelProperty(value = "手机号码,全局唯一")
-    var phone: String? = null
-
-    /** 邮箱 */
-    @ApiModelProperty(value = "邮箱,全局唯一")
-    var mail: String? = null
-
-    /** 身份证号码 */
-    @ApiModelProperty(value = "身份证号码,全局唯一")
-    var certno: String? = null
-} // Class SSsoUser
+///*
+// * *********************************************************************************************************************
+// *
+// *          !!
+// *        .F88X
+// *        X8888Y
+// *      .}888888N;
+// *        i888888N;        .:!              .I$WI:
+// *          R888888I      .'N88~            i8}+8Y&8"l8i$8>8W~'>W8}8]KW+8IIN"8&
+// *          .R888888I    .;N8888~          .X8'  "8I.!,/8"  !%NY8`"8I8~~8>,88I
+// *            +888888N;  .8888888Y                                  "&&8Y.}8,
+// *            ./888888N;  .R888888Y        .'}~    .>}'.`+>  i}!    "i'  +/'  .'i~  !11,.:">,  .~]!  .i}i
+// *              ~888888%:  .I888888l      .]88~`1/iY88Ii+1'.R$8$8]"888888888>  Y8$  W8E  X8E  W8888'188Il}Y88$*
+// *              18888888    E8888881    .]W%8$`R8X'&8%++N8i,8N%N8+l8%`  .}8N:.R$RE%N88N%N$K$R  188,FE$8%~Y88I
+// *            .E888888I  .i8888888'      .:$8I;88+`E8R:/8N,.>881.`$8E/1/]N8X.Y8N`"KF&&FK!'88*."88K./$88%RN888+~
+// *            8888888I  .,N888888~        ~88i"8W,!N8*.I88.}888%F,i$88"F88"  888:E8X.>88!i88>`888*.}Fl1]*}1YKi'
+// *          i888888N'      I888Y          ]88;/EX*IFKFK88X  K8R  .l8W  88Y  ~88}'88E&%8W.X8N``]88!.$8K  .:W8I
+// *        .i888888N;        I8Y          .&8$  .X88!  i881.:%888>I88  ;88]  +88+.';;;;:.Y88X  18N.,88l  .+88/
+// *      .:R888888I
+// *      .&888888I                                          Copyright (c) 2016-2020.  博锐尚格科技股份有限公司
+// *        ~8888'
+// *        .!88~                                                                     All rights reserved.
+// *
+// * *********************************************************************************************************************
+// */
+//
+//package com.persagy.sso.models.entities
+//
+//import com.persagy.service.models.SBaseEntity
+//import io.swagger.annotations.Schema
+//import io.swagger.annotations.SchemaProperty
+//import javax.persistence.Column
+//import javax.persistence.Id
+//import javax.persistence.Table
+//
+///**
+// * 单点登录用户实体类
+// *
+// * @author  庞利祥 <sybotan@126.com>
+// */
+//@Schema(description = "单点登录用户")
+//@Table(name = "user")
+//open class SSsoUser: SBaseEntity() {
+//    /** 用户id */
+//    @Schema(description = "用户id")
+//    @Id
+//    @Column(name = "id", updatable = false)
+//    var id: String? = null
+//
+//    /** 用户名 */
+//    @Schema(description = "用户名", required = true)
+//    @Column(name = "user_name")
+//    var userName: String? = null
+//
+//    /** 密码 */
+//    @Schema(description = "密码", required = true)
+//    //@Column(name = "password", updatable = false)
+//    var password: String? = null
+//
+//    /** 真实姓名 */
+//    @Schema(description = "真实姓名")
+//    var realName: String? = null
+//
+//    /** 手机号码 */
+//    @Schema(description = "手机号码,全局唯一")
+//    var phone: String? = null
+//
+//    /** 邮箱 */
+//    @Schema(description = "邮箱,全局唯一")
+//    var mail: String? = null
+//
+//    /** 身份证号码 */
+//    @Schema(description = "身份证号码,全局唯一")
+//    var certno: String? = null
+//} // Class SSsoUser

+ 2 - 4
persagy-service-models/build.gradle

@@ -51,10 +51,8 @@ dependencies {
     compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: SPRING_BOOT_VERSION
 
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-//    compile group: "javax.persistence", name: "persistence-api", version: PERSISTENCE_VERSION
-
-    // https://mvnrepository.com/artifact/io.swagger/swagger-annotations
-    compile group: 'io.swagger', name: 'swagger-annotations', version: '1.5.22'
+    // https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui
+    compile group: 'org.springdoc', name: 'springdoc-openapi-ui', version: SPRING_DOC_VERSION
 
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // Sybotan依赖

+ 4 - 4
persagy-service-models/src/main/kotlin/com/persagy/service/models/SBaseEntity.kt

@@ -26,7 +26,7 @@
 
 package com.persagy.service.models
 
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 import java.util.*
 import javax.persistence.Column
 import kotlin.collections.HashMap
@@ -38,16 +38,16 @@ import kotlin.collections.HashMap
  */
 open class SBaseEntity {
     /** 统计信息 */
-    @ApiModelProperty(value = "统计信息")
+    @Schema(description = "统计信息")
     var statistics: HashMap<String, Any?>? = null
 
     /** 最后更新日期 */
-    @ApiModelProperty(value = "最后更新日期", example = "2009-04-21 13:16:00")
+    @Schema(description = "最后更新日期", example = "2009-04-21 13:16:00")
     @Column(name = "last_update", updatable = false, insertable = false)
     var lastUpdate: Date? = null
 
     /** 创建时间 */
-    @ApiModelProperty(value = "创建时间", example = "2017-10-15 08:30:00")
+    @Schema(description = "创建时间", example = "2017-10-15 08:30:00")
     @Column(name = "create_time", updatable = false, insertable = false)
     var createTime: Date? = null
 } // Class SBaseEntity

+ 9 - 8
persagy-service-models/src/main/kotlin/com/persagy/service/models/SCascadeQuery.kt

@@ -27,7 +27,8 @@
 package com.persagy.service.models
 
 import com.persagy.database.SGroup
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
+
 
 /**
  * 级联查询对象
@@ -36,30 +37,30 @@ import io.swagger.annotations.ApiModelProperty
  */
 class SCascadeQuery {
     /** 级联对象属性名 */
-    @ApiModelProperty(value = "级联对象属性名", required = true)
+    @Schema(description = "级联对象属性名", required = true)
     var name: String? = null
 
     /** 查询条件 */
-    @ApiModelProperty(value = "查询条件")
+    @Schema(description = "查询条件")
     var filters: String? = null
 
     /** 排序条件 */
-    @ApiModelProperty(value = "排序条件", example = "name asc, createTime desc")
+    @Schema(description = "排序条件", example = "name asc, createTime desc")
     var orders: String? = null
 
     /** 字段影射,空为查询所有字段 */
-    @ApiModelProperty(value = "字段影射,空为更新所有字段")
+    @Schema(description = "字段影射,空为更新所有字段")
     var projection: ArrayList<String>? = null
 
     /** 去除重复记录 */
-    @ApiModelProperty(value = "去除重复记录")
+    @Schema(description = "去除重复记录")
     var distinct: Boolean? = null
 
     /** 级联对象列表 */
-    @ApiModelProperty(value = "级联对象列表")
+    @Schema(description = "级联对象列表")
     var cascade: ArrayList<SCascadeQuery>? = null
 
     /** 分组统计 */
-    @ApiModelProperty(value = "分组")
+    @Schema(description = "分组")
     var group: SGroup? = null
 } // Class SCascadeQuery

+ 5 - 4
persagy-service-models/src/main/kotlin/com/persagy/service/models/SCascadeUpdate.kt

@@ -27,7 +27,8 @@
 package com.persagy.service.models
 
 import com.persagy.service.models.enums.SCascadeUpdateMode
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
+
 
 /**
  * 级联更新对象
@@ -36,14 +37,14 @@ import io.swagger.annotations.ApiModelProperty
  */
 class SCascadeUpdate {
     /** 级联对象属性名 */
-    @ApiModelProperty(value = "级联对象属性名", required = true)
+    @Schema(description = "级联对象属性名", required = true)
     var name: String? = null
 
     /** 字段影射,空为查询所有字段 */
-    @ApiModelProperty(value = "字段影射,空为更新所有字段")
+    @Schema(description = "字段影射,空为更新所有字段")
     var projection: ArrayList<String>? = null
 
     /** 更新模式 */
-    @ApiModelProperty(value = "更新模式")
+    @Schema(description = "更新模式")
     var mode: SCascadeUpdateMode = SCascadeUpdateMode.Override
 } // Class SCascadeQuery

+ 4 - 3
persagy-service-models/src/main/kotlin/com/persagy/service/models/SJoinQuery.kt

@@ -26,7 +26,8 @@
 
 package com.persagy.service.models
 
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
+
 
 /**
  * Join查询对象
@@ -35,10 +36,10 @@ import io.swagger.annotations.ApiModelProperty
  */
 class SJoinQuery {
     /** 级联对象属性名 */
-    @ApiModelProperty(value = "Join对象属性名", required = true)
+    @Schema(description = "Join对象属性名", required = true)
     var name: String? = null
 
     /** 字段影射,空为查询所有字段 */
-    @ApiModelProperty(value = "字段影射,空为查询所有字段")
+    @Schema(description = "字段影射,空为查询所有字段")
     var projection = ArrayList<String>()
 } // Class SJoinQuery

+ 4 - 4
persagy-service-models/src/main/kotlin/com/persagy/service/models/requests/SCountRequest.kt

@@ -26,17 +26,17 @@
 
 package com.persagy.service.models.requests
 
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+
+import io.swagger.v3.oas.annotations.media.Schema
 
 /**
  * 统计请求对象基类
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "统计请求对象基类")
+@Schema(description = "统计请求对象基类")
 open class SCountRequest {
     /** 查询条件 */
-    @ApiModelProperty(value = "查询条件")
+    @Schema(description = "查询条件")
     var filters: String? = null
 } // Class SCountRequest

+ 5 - 6
persagy-service-models/src/main/kotlin/com/persagy/service/models/requests/SCreateRequest.kt

@@ -27,8 +27,7 @@
 package com.persagy.service.models.requests
 
 import com.persagy.service.models.SCascadeUpdate
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 import javax.validation.Valid
 
 /**
@@ -36,18 +35,18 @@ import javax.validation.Valid
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "创建请求对象基类")
+@Schema(description = "创建请求对象基类")
 open class SCreateRequest<ENTITY: Any> {
     /** 如果对象在库中已存在,是否执行合并操作 */
-    @ApiModelProperty(value = "如果对象在库中已存在,是否执行合并操作")
+    @Schema(description = "如果对象在库中已存在,是否执行合并操作")
     var isMerge = false
 
     /** 更新内容 */
-    @ApiModelProperty(value = "更新内容", required = true)
+    @Schema(description = "更新内容", required = true)
     @Valid
     lateinit var content: ArrayList<ENTITY>
 
     /** 级联对象列表 */
-    @ApiModelProperty(value = "级联对象列表")
+    @Schema(description = "级联对象列表")
     var cascade: ArrayList<SCascadeUpdate>? = null
 } // Class SCreateRequest

+ 3 - 4
persagy-service-models/src/main/kotlin/com/persagy/service/models/requests/SDeleteRequest.kt

@@ -26,17 +26,16 @@
 
 package com.persagy.service.models.requests
 
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 
 /**
  * 删除请求对象基类
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "删除请求对象基类")
+@Schema(description = "删除请求对象基类")
 open class SDeleteRequest<KEY: Any> {
     /** 删除内容 */
-    @ApiModelProperty(value = "删除内容", required = true)
+    @Schema(description = "删除内容", required = true)
     lateinit var keyList: ArrayList<KEY>
 }  // Class SDeleteRequest

+ 11 - 11
persagy-service-models/src/main/kotlin/com/persagy/service/models/requests/SQueryRequest.kt

@@ -28,15 +28,15 @@ package com.persagy.service.models.requests
 
 import com.persagy.database.SGroup
 import com.persagy.service.models.SCascadeQuery
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
+
 
 /**
  * 查询请求对象基类
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "查询请求对象基类")
+@Schema(description = "查询请求对象基类")
 open class SQueryRequest {
     companion object {
         /** 设置接口一次可取得的最大记录数 */
@@ -44,7 +44,7 @@ open class SQueryRequest {
     } // Companion object
 
     /** 第几页 */
-    @ApiModelProperty(value = "第几页(从1开始)", example = "1")
+    @Schema(description = "第几页(从1开始)", example = "1")
     var pageNumber: Int = 1
         set(value) {            // 限定pageNumber不能小于1
             field = value
@@ -54,7 +54,7 @@ open class SQueryRequest {
         }
 
     /** 每页记录数 */
-    @ApiModelProperty(value = "每页记录数(0 < 记录数 < 1000)", example = "50")
+    @Schema(description = "每页记录数(0 < 记录数 < 1000)", example = "50")
     var pageSize: Int = 50
         set(value) {            // 限定pageSize不能小于1且不能大于maxRow
             field = value
@@ -69,26 +69,26 @@ open class SQueryRequest {
         }
 
     /** 查询条件 */
-    @ApiModelProperty(value = "查询条件")
+    @Schema(description = "查询条件")
     var filters: String? = null
 
     /** 排序条件 */
-    @ApiModelProperty(value = "排序条件", example = "name asc, createTime desc")
+    @Schema(description = "排序条件", example = "name asc, createTime desc")
     var orders: String? = null
 
     /** 去除重复记录 */
-    @ApiModelProperty(value = "去除重复记录")
+    @Schema(description = "去除重复记录")
     var distinct: Boolean? = null
 
     /** 字段影射,空为查询所有字段 */
-    @ApiModelProperty(value = "字段影射,空为查询所有字段")
+    @Schema(description = "字段影射,空为查询所有字段")
     var projection: ArrayList<String>? = null
 
     /** 级联对象列表 */
-    @ApiModelProperty(value = "级联对象列表")
+    @Schema(description = "级联对象列表")
     var cascade: ArrayList<SCascadeQuery>? = null
 
     /** 分组统计 */
-    @ApiModelProperty(value = "分组")
+    @Schema(description = "分组")
     var group: SGroup? = null
 } // Class SQueryRequest

+ 5 - 6
persagy-service-models/src/main/kotlin/com/persagy/service/models/requests/SUpdateRequest.kt

@@ -27,8 +27,7 @@
 package com.persagy.service.models.requests
 
 import com.persagy.service.models.SCascadeUpdate
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 import javax.validation.Valid
 
 /**
@@ -36,18 +35,18 @@ import javax.validation.Valid
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "更新请求对象基类")
+@Schema(description = "更新请求对象基类")
 open class SUpdateRequest<ENTITY: Any> {
     /** 级联对象列表 */
-    @ApiModelProperty(value = "级联对象列表")
+    @Schema(description = "级联对象列表")
     var cascade: ArrayList<SCascadeUpdate>? = null
 
     /** 更新内容 */
-    @ApiModelProperty(value = "更新内容", required = true)
+    @Schema(description = "更新内容", required = true)
     @Valid
     var content: ArrayList<ENTITY>? = null
 
     /** 字段影射,空为查询所有字段 */
-    @ApiModelProperty(value = "字段影射,空为更新所有字段")
+    @Schema(description = "字段影射,空为更新所有字段")
     var projection: ArrayList<String>? = null
 } // Class SUpdateRequest

+ 5 - 5
persagy-service-models/src/main/kotlin/com/persagy/service/models/responses/SBaseResponse.kt

@@ -27,21 +27,21 @@
 package com.persagy.service.models.responses
 
 import com.persagy.service.models.enums.SResponseType
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
+
 
 /**
  * 应答对象基类
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "应答对象基类")
+@Schema(description = "应答对象基类")
 open class SBaseResponse(result: SResponseType = SResponseType.failure, message: String = "") {
     /** 结果 */
-    @ApiModelProperty(value = "结果")
+    @Schema(description = "结果")
     var result: SResponseType = SResponseType.failure
     /** 消息 */
-    @ApiModelProperty(value = "消息")
+    @Schema(description = "消息")
     var message: String = ""
 
     /** 初始化 */

+ 3 - 4
persagy-service-models/src/main/kotlin/com/persagy/service/models/responses/SCountResponse.kt

@@ -27,18 +27,17 @@
 package com.persagy.service.models.responses
 
 import com.persagy.service.models.enums.SResponseType
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 
 /**
  * 统计请求应答对象基类
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "统计请求应答对象基类")
+@Schema(description = "统计请求应答对象基类")
 open class SCountResponse(
         /** 符合条件的记录数 */
-        @ApiModelProperty(value = "符合条件的记录数")
+        @Schema(description = "符合条件的记录数")
         val count: Long = 0,
         result: SResponseType = SResponseType.success, message: String = ""
 ) : SBaseResponse(result, message)  // Class SCountResponse

+ 3 - 4
persagy-service-models/src/main/kotlin/com/persagy/service/models/responses/SCreateResponse.kt

@@ -27,20 +27,19 @@
 package com.persagy.service.models.responses
 
 import com.persagy.service.models.enums.SResponseType
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 
 /**
  * 创建对象请求应答对象基类
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "查询请求应答对象基类")
+@Schema(description = "查询请求应答对象基类")
 open class SCreateResponse<ENTITY: Any>(result: SResponseType = SResponseType.failure, message: String = "")
     : SBaseResponse(result, message) {
 
     /** 对象列表 */
-    @ApiModelProperty(value = "创建成功的对象列表")
+    @Schema(description = "创建成功的对象列表")
     var entityList: ArrayList<ENTITY>? = null
 
     /**

+ 2 - 2
persagy-service-models/src/main/kotlin/com/persagy/service/models/responses/SDeleteResponse.kt

@@ -27,14 +27,14 @@
 package com.persagy.service.models.responses
 
 import com.persagy.service.models.enums.SResponseType
-import io.swagger.annotations.ApiModel
+import io.swagger.v3.oas.annotations.media.Schema
 
 /**
  * 统计请求应答对象基类
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "删除请求应答对象基类")
+@Schema(description = "删除请求应答对象基类")
 open class SDeleteResponse(
         result: SResponseType = SResponseType.failure,
         message: String = ""

+ 6 - 7
persagy-service-models/src/main/kotlin/com/persagy/service/models/responses/SQueryResponse.kt

@@ -28,31 +28,30 @@ package com.persagy.service.models.responses
 
 import com.persagy.database.SPageQueryInfo
 import com.persagy.service.models.enums.SResponseType
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 
 /**
  * 查询请求应答对象基类
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "查询请求应答对象基类")
+@Schema(description = "查询请求应答对象基类")
 open class SQueryResponse<ENTITY: Any>(result: SResponseType = SResponseType.success, message: String = "")
     : SBaseResponse(result, message) {
     /** 符合条件的总记录数 */
-    @ApiModelProperty(value = "符合条件的总记录数")
+    @Schema(description = "符合条件的总记录数")
     var total: Long? = null
 
     /** 第几页 */
-    @ApiModelProperty(value = "第几页")
+    @Schema(description = "第几页")
     var pageNumber: Int? = null
 
     /** 每页记录数 */
-    @ApiModelProperty(value = "每页记录数")
+    @Schema(description = "每页记录数")
     var pageSize: Int? = null
 
     /** 查询到的数据列表 */
-    @ApiModelProperty(value = "查询到的数据列表")
+    @Schema(description = "查询到的数据列表")
     var content: List<ENTITY>? = null
 
     /**

+ 6 - 6
persagy-service-mysql/src/main/kotlin/com/persagy/service/mysql/controllers/SDatabaseDocController.kt

@@ -29,8 +29,8 @@ package com.persagy.service.mysql.controllers
 import com.persagy.service.SObjectService
 import com.persagy.service.mysql.models.SColumn
 import com.persagy.service.mysql.models.STable
-import io.swagger.annotations.Api
-import io.swagger.annotations.ApiOperation
+import io.swagger.v3.oas.annotations.Operation
+import io.swagger.v3.oas.annotations.tags.Tag
 import org.springframework.web.bind.annotation.*
 
 /**
@@ -38,7 +38,7 @@ import org.springframework.web.bind.annotation.*
  *
  * @author  庞利祥(sybotan@126.com)
  */
-@Api(tags= ["数据库设计接口"])
+@Tag(name = "数据库设计接口")
 @RestController
 @RequestMapping("/--database-doc--/")
 class SDatabaseDocController {
@@ -54,7 +54,7 @@ class SDatabaseDocController {
      * @param   schema      数据库
      * @return  字段列表
      */
-    @ApiOperation(value="查询表信息", notes="")
+    @Operation(summary="查询表信息",description = "")
     @RequestMapping(value = ["/table-list"], method = [RequestMethod.GET, RequestMethod.POST])
     fun tableList(schema: String): List<Any> {
         return tableService.select("schemaName" to schema).exec()
@@ -67,7 +67,7 @@ class SDatabaseDocController {
      * @param   table       表名
      * @return  字段列表
      */
-    @ApiOperation(value="查询字段信息", notes="")
+    @Operation(summary="查询字段信息", description="")
     @RequestMapping(value = ["/column-list"], method = [RequestMethod.GET, RequestMethod.POST])
     fun columnList(schema: String, table: String): ArrayList<SColumn> {
         val builder = columnService.select("schemaName" to schema, "tableName" to table)
@@ -86,7 +86,7 @@ class SDatabaseDocController {
     /**
      *  查询表、字段信息
      */
-    @ApiOperation(value="查询字段信息", notes="")
+    @Operation(summary="查询字段信息", description="")
     @RequestMapping(value = ["/table-info"], method = [RequestMethod.GET, RequestMethod.POST])
     fun tableInfo(schema: String, table: String): STable {
         val sTable = STable()

+ 10 - 11
persagy-service-mysql/src/main/kotlin/com/persagy/service/mysql/models/SColumn.kt

@@ -26,8 +26,7 @@
 
 package com.persagy.service.mysql.models
 
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
 import javax.persistence.Table
 
@@ -36,46 +35,46 @@ import javax.persistence.Table
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "数据库设计-表结构")
+@Schema(description = "数据库设计-表结构")
 @Table(name = "information_schema.columns")
 open class SColumn {
     /** 模式 */
-    @ApiModelProperty(value = "模式")
+    @Schema(description = "模式")
     @Column(name = "TABLE_SCHEMA")
     var schemaName: String? = null
 
     /** 表名 */
-    @ApiModelProperty(value = "表名")
+    @Schema(description = "表名")
     @Column(name = "TABLE_NAME")
     var tableName: String? = null
 
     /** 字段名 */
-    @ApiModelProperty(value = "字段名")
+    @Schema(description = "字段名")
     @Column(name = "COLUMN_NAME")
     var columnName: String? = null
 
     /** 类型 */
     @Column(name = "DATA_TYPE")
-    @ApiModelProperty(value = "类型")
+    @Schema(description = "类型")
     var columnType: String? = null
 
     /** 字符最大长度 */
-    @ApiModelProperty(value = "字符最大长度")
+    @Schema(description = "字符最大长度")
     @Column(name = "CHARACTER_MAXIMUM_LENGTH")
     var charMaxLength: Int? = null
 
     /** 可为空 */
-    @ApiModelProperty(value = "可为空")
+    @Schema(description = "可为空")
     @Column(name = "IS_NULLABLE")
     var nullable: String? = null
 
     /** 默认值 */
-    @ApiModelProperty(value = "默认值")
+    @Schema(description = "默认值")
     @Column(name = "COLUMN_DEFAULT")
     var default: String? = null
 
     /** 注释 */
-    @ApiModelProperty(value = "注释")
+    @Schema(description = "注释")
     @Column(name = "COLUMN_COMMENT")
     var description: String? = null
 

+ 7 - 7
persagy-service-mysql/src/main/kotlin/com/persagy/service/mysql/models/STable.kt

@@ -26,8 +26,8 @@
 
 package com.persagy.service.mysql.models
 
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+
+import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
 import javax.persistence.Table
 
@@ -36,25 +36,25 @@ import javax.persistence.Table
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "数据库设计-表结构")
+@Schema(description = "数据库设计-表结构")
 @Table(name = "information_schema.tables")
 open class STable {
     /** 模式 */
-    @ApiModelProperty(value = "模式")
+    @Schema(description = "模式")
     @Column(name = "TABLE_SCHEMA")
     var schemaName: String? = null
 
     /** 表名 */
-    @ApiModelProperty(value = "表名")
+    @Schema(description = "表名")
     @Column(name = "TABLE_NAME")
     var tableName: String? = null
 
     /** 注释 */
-    @ApiModelProperty(value = "注释")
+    @Schema(description = "注释")
     @Column(name = "TABLE_COMMENT")
     var description: String? = null
 
-    @ApiModelProperty(value = "字段列表")
+    @Schema(description = "字段列表")
     var columnList: ArrayList<SColumn>? = null
 
 } // Class STable

+ 9 - 8
persagy-service-postgresql/src/main/kotlin/com/persagy/service/postgresql/controllers/SDatabaseDocController.kt

@@ -29,18 +29,19 @@ package com.persagy.service.postgresql.controllers
 import com.persagy.service.SObjectService
 import com.persagy.service.postgresql.models.SColumn
 import com.persagy.service.postgresql.models.STable
-import io.swagger.annotations.Api
-import io.swagger.annotations.ApiOperation
+import io.swagger.v3.oas.annotations.Hidden
+import io.swagger.v3.oas.annotations.Operation
+import io.swagger.v3.oas.annotations.tags.Tag
 import org.springframework.web.bind.annotation.*
-import springfox.documentation.annotations.ApiIgnore
+
 
 /**
  * 数据库设计接口
  *
  * @author  庞利祥(sybotan@126.com)
  */
-@Api(tags= ["数据库设计接口"])
-@ApiIgnore
+@Tag(name= "数据库设计接口")
+@Hidden
 @RestController
 @RequestMapping("/--database-doc--/")
 class SDatabaseDocController {
@@ -56,7 +57,7 @@ class SDatabaseDocController {
      * @param   schema      模式
      * @return  字段列表
      */
-    @ApiOperation(value="查询表信息", notes="")
+    @Operation(summary="查询表信息", description="")
     @RequestMapping(value = ["/table-list"], method = [RequestMethod.GET, RequestMethod.POST])
     fun tableList(schema: String): List<Any> {
         return tableService.select("schemaName" to schema).exec()
@@ -69,7 +70,7 @@ class SDatabaseDocController {
      * @param   table       表名
      * @return  字段列表
      */
-    @ApiOperation(value="查询字段信息", notes="")
+    @Operation(summary="查询字段信息", description="")
     @RequestMapping(value = ["/column-list"], method = [RequestMethod.GET, RequestMethod.POST])
     fun columnList(schema: String, table: String): ArrayList<SColumn> {
         val builder = columnService.select("schemaName" to schema, "tableName" to table)
@@ -87,7 +88,7 @@ class SDatabaseDocController {
     /**
      * 查询表、字段信息
      */
-    @ApiOperation(value="查询表、字段信息", notes="")
+    @Operation(summary="查询表、字段信息", description="")
     @RequestMapping(value = ["/table-info"], method = [RequestMethod.GET, RequestMethod.POST])
     fun tableInfo(schema: String, table: String): STable{
         val sTable = STable()

+ 10 - 11
persagy-service-postgresql/src/main/kotlin/com/persagy/service/postgresql/models/SColumn.kt

@@ -26,8 +26,7 @@
 
 package com.persagy.service.postgresql.models
 
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
 import javax.persistence.Table
 
@@ -36,46 +35,46 @@ import javax.persistence.Table
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "数据库设计-表结构")
+@Schema(description = "数据库设计-表结构")
 @Table(name = "information_schema.columns")
 open class SColumn {
     /** 模式 */
-    @ApiModelProperty(value = "模式")
+    @Schema(description = "模式")
     @Column(name = "table_schema")
     var schemaName: String? = null
 
     /** 表名 */
-    @ApiModelProperty(value = "表名")
+    @Schema(description = "表名")
     @Column(name = "table_name")
     var tableName: String? = null
 
     /** 字段名 */
-    @ApiModelProperty(value = "字段名")
+    @Schema(description = "字段名")
     @Column(name = "column_name")
     var columnName: String? = null
 
     /** 类型 */
     @Column(name = "udt_name")
-    @ApiModelProperty(value = "类型")
+    @Schema(description = "类型")
     var columnType: String? = null
 
     /** 字符最大长度 */
-    @ApiModelProperty(value = "字符最大长度")
+    @Schema(description = "字符最大长度")
     @Column(name = "character_maximum_length")
     var charMaxLength: Int? = null
 
     /** 可为空 */
-    @ApiModelProperty(value = "可为空")
+    @Schema(description = "可为空")
     @Column(name = "is_nullable")
     var nullable: String? = null
 
     /** 默认值 */
-    @ApiModelProperty(value = "默认值")
+    @Schema(description = "默认值")
     @Column(name = "column_default")
     var default: String? = null
 
     /** 注释 */
-    @ApiModelProperty(value = "注释")
+    @Schema(description = "注释")
     @Column(name = "description")
     var description: String? = null
 

+ 6 - 7
persagy-service-postgresql/src/main/kotlin/com/persagy/service/postgresql/models/STable.kt

@@ -26,8 +26,7 @@
 
 package com.persagy.service.postgresql.models
 
-import io.swagger.annotations.ApiModel
-import io.swagger.annotations.ApiModelProperty
+import io.swagger.v3.oas.annotations.media.Schema
 import javax.persistence.Column
 import javax.persistence.Table
 
@@ -36,26 +35,26 @@ import javax.persistence.Table
  *
  * @author  庞利祥 <sybotan@126.com>
  */
-@ApiModel(description = "数据库设计-表结构")
+@Schema(description = "数据库设计-表结构")
 @Table(name = "information_schema.tables")
 open class STable {
     /** 模式 */
-    @ApiModelProperty(value = "模式")
+    @Schema(description = "模式")
     @Column(name = "table_schema")
     var schemaName: String? = null
 
     /** 表名 */
-    @ApiModelProperty(value = "表名")
+    @Schema(description = "表名")
     @Column(name = "table_name")
     var tableName: String? = null
 
     /** 注释 */
-    @ApiModelProperty(value = "注释")
+    @Schema(description = "注释")
     @Column(name = "description")
     var description: String? = null
 
     /** 注释 */
-    @ApiModelProperty(value = "注释")
+    @Schema(description = "注释")
     var columnList : ArrayList<SColumn>? = null
 
 } // Class STable

+ 4 - 1
settings.gradle

@@ -31,4 +31,7 @@ include 'persagy-service-base'
 include 'persagy-service-mybatis'
 include 'persagy-service-postgresql'
 include 'persagy-service-kafka'
-include 'persagy-service-mysql'
+include 'persagy-service-mysql'
+include 'persagy-service-rabbitmq'
+include 'persagy-service-mq'
+