swagger文档管理改为API接口文档管理
This commit is contained in:
@@ -2,7 +2,7 @@ package com.zyplayer.doc.manage.framework.config;
|
||||
|
||||
import com.zyplayer.doc.db.framework.configuration.EnableDocDb;
|
||||
import com.zyplayer.doc.dubbo.framework.config.EnableDocDubbo;
|
||||
import com.zyplayer.doc.swaggerplus.framework.config.EnableDocSwaggerPlus;
|
||||
import com.zyplayer.doc.api.framework.config.EnableDocApi;
|
||||
import com.zyplayer.doc.wiki.framework.config.EnableDocWiki;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ZyplayerDocConfig {
|
||||
public class enableDocDb {
|
||||
}
|
||||
|
||||
@EnableDocSwaggerPlus
|
||||
public class enableDocSwaggerPlus {
|
||||
@EnableDocApi
|
||||
public class enableDocApi {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,9 +38,9 @@ public class DocSystemController {
|
||||
}
|
||||
|
||||
@AuthMan
|
||||
@GetMapping("/doc-swagger-plus")
|
||||
@GetMapping("/doc-api")
|
||||
public ModelAndView swaggerPlus() {
|
||||
ModelAndView modelAndView = new ModelAndView("/doc-swagger-plus.html");
|
||||
ModelAndView modelAndView = new ModelAndView("/doc-api.html");
|
||||
modelAndView.setStatus(HttpStatus.OK);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@@ -5,23 +5,6 @@ server:
|
||||
servlet:
|
||||
context-path: /zyplayer-doc-manage
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: zyplayer-doc-manage
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 100MB
|
||||
max-request-size: 100MB
|
||||
datasource:
|
||||
continue-on-error: true
|
||||
ldap:
|
||||
enable: false
|
||||
urls: ['ldap://10.0.1.1:10389']
|
||||
base: dc=xx,dc=net
|
||||
username: cn=Manager,dc=xx,dc=net
|
||||
password: MKDSHYDNIS
|
||||
anonymousReadOnly: true
|
||||
|
||||
# 整个文档项目的配置
|
||||
zyplayer:
|
||||
doc:
|
||||
@@ -76,6 +59,23 @@ zyplayer:
|
||||
# service: "com.zyplayer.dubbo.service.UserService;\
|
||||
# com.zyplayer.dubbo.service.AnnotateService;"
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: zyplayer-doc-manage
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 100MB
|
||||
max-request-size: 100MB
|
||||
datasource:
|
||||
continue-on-error: true
|
||||
ldap:
|
||||
enable: false
|
||||
urls: ['ldap://10.0.1.1:10389']
|
||||
base: dc=xx,dc=net
|
||||
username: cn=Manager,dc=xx,dc=net
|
||||
password: MKDSHYDNIS
|
||||
anonymousReadOnly: true
|
||||
|
||||
# 下面的配置可以不用管了
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:/mapper/**/*Mapper.xml
|
||||
|
||||
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon-console.png><title>文档管理系统</title><link href=css/chunk-073e4e5b.e7241bfc.css rel=prefetch><link href=css/chunk-0741282a.cbb897f6.css rel=prefetch><link href=css/chunk-30126bdc.ee6e60f7.css rel=prefetch><link href=css/chunk-32cc5643.5a5b2ca1.css rel=prefetch><link href=css/chunk-35c34f90.938e4b31.css rel=prefetch><link href=css/chunk-4582ecc6.ee6e60f7.css rel=prefetch><link href=css/chunk-7349f4ef.b670b642.css rel=prefetch><link href=js/chunk-073e4e5b.c26a900f.js rel=prefetch><link href=js/chunk-0741282a.4a9caaa8.js rel=prefetch><link href=js/chunk-2d207ece.b459da59.js rel=prefetch><link href=js/chunk-30126bdc.c9a7c363.js rel=prefetch><link href=js/chunk-32cc5643.13e15f9b.js rel=prefetch><link href=js/chunk-35c34f90.e5d5fc88.js rel=prefetch><link href=js/chunk-4582ecc6.9dc9f4c1.js rel=prefetch><link href=js/chunk-7349f4ef.49a2e9a0.js rel=prefetch><link href=css/chunk-vendors.8924efc6.css rel=preload as=style><link href=css/index.ddfd3d93.css rel=preload as=style><link href=js/chunk-vendors.14026b60.js rel=preload as=script><link href=js/index.7893e63c.js rel=preload as=script><link href=css/chunk-vendors.8924efc6.css rel=stylesheet><link href=css/index.ddfd3d93.css rel=stylesheet></head><body><noscript><strong>We're sorry but zyplayer-console-ui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.14026b60.js></script><script src=js/index.7893e63c.js></script></body></html>
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=favicon-console.png><title>文档管理系统</title><link href=css/chunk-073e4e5b.e7241bfc.css rel=prefetch><link href=css/chunk-0741282a.cbb897f6.css rel=prefetch><link href=css/chunk-30126bdc.ee6e60f7.css rel=prefetch><link href=css/chunk-32cc5643.5a5b2ca1.css rel=prefetch><link href=css/chunk-35c34f90.938e4b31.css rel=prefetch><link href=css/chunk-4582ecc6.ee6e60f7.css rel=prefetch><link href=css/chunk-7349f4ef.b670b642.css rel=prefetch><link href=js/chunk-073e4e5b.c26a900f.js rel=prefetch><link href=js/chunk-0741282a.6bc51b43.js rel=prefetch><link href=js/chunk-2d207ece.b459da59.js rel=prefetch><link href=js/chunk-30126bdc.593dc4bc.js rel=prefetch><link href=js/chunk-32cc5643.68207d52.js rel=prefetch><link href=js/chunk-35c34f90.e5d5fc88.js rel=prefetch><link href=js/chunk-4582ecc6.0d05fa2c.js rel=prefetch><link href=js/chunk-7349f4ef.9db2fc61.js rel=prefetch><link href=css/chunk-vendors.8924efc6.css rel=preload as=style><link href=css/index.ddfd3d93.css rel=preload as=style><link href=js/chunk-vendors.14026b60.js rel=preload as=script><link href=js/index.b995ba0c.js rel=preload as=script><link href=css/chunk-vendors.8924efc6.css rel=stylesheet><link href=css/index.ddfd3d93.css rel=stylesheet></head><body><noscript><strong>We're sorry but zyplayer-console-ui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.14026b60.js></script><script src=js/index.b995ba0c.js></script></body></html>
|
||||
@@ -1 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0741282a"],{"40c0":function(e,t,n){},9231:function(e,t,n){"use strict";var a=n("40c0"),r=n.n(a);r.a},ac2a:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:"login-background linear-gradient-"+e.bgImgRandom},[n("div",{staticClass:"login-box"},[n("el-form",{ref:"loginParam",staticClass:"demo-ruleForm login-container",attrs:{model:e.loginParam,rules:e.loginRules,"label-position":"left","label-width":"0px"}},[n("h3",{staticClass:"title"},[e._v("文档管理-系统登录")]),n("el-form-item",{attrs:{prop:"username"}},[n("el-input",{attrs:{type:"text","auto-complete":"off",placeholder:"账号"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginSubmit(t)}},model:{value:e.loginParam.username,callback:function(t){e.$set(e.loginParam,"username",t)},expression:"loginParam.username"}})],1),n("el-form-item",{attrs:{prop:"password"}},[n("el-input",{attrs:{type:"password","auto-complete":"off",placeholder:"密码"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginSubmit(t)}},model:{value:e.loginParam.password,callback:function(t){e.$set(e.loginParam,"password",t)},expression:"loginParam.password"}})],1),n("el-form-item",{staticStyle:{width:"100%"}},[n("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary",loading:e.loginLoading},nativeOn:{click:function(t){return t.preventDefault(),e.loginSubmit(t)}}},[e._v("登录")])],1)],1)],1),e._m(0)])},r=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"power-by"},[e._v("Powered By "),n("a",{attrs:{target:"_blank",href:"https://gitee.com/zyplayer/zyplayer-doc"}},[e._v("zyplayer-doc")])])}],o=n("3099"),i={data:function(){return{loginLoading:!1,redirect:"",loginParam:{username:"",password:""},loginRules:{username:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]},bgImgRandom:Math.ceil(5*Math.random())}},mounted:function(){this.redirect=this.$route.query.redirect},methods:{loginSubmit:function(){var e=this;this.$refs.loginParam.validate((function(t){t&&(e.loginLoading=!0,o["a"].userLogin(e.loginParam).then((function(){e.$emit("loginSuccess"),e.loginLoading=!1,e.redirect?location.href=decodeURIComponent(e.redirect):e.$router.back()})).catch((function(t){console.log("登录失败",t),e.loginLoading=!1})))}))}}},l=i,s=(n("9231"),n("2877")),u=Object(s["a"])(l,a,r,!1,null,null,null);t["default"]=u.exports}}]);
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0741282a"],{"40c0":function(e,t,n){},9231:function(e,t,n){"use strict";var a=n("40c0"),r=n.n(a);r.a},ac2a:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:"login-background linear-gradient-"+e.bgImgRandom},[n("div",{staticClass:"login-box"},[n("el-form",{ref:"loginParam",staticClass:"demo-ruleForm login-container",attrs:{model:e.loginParam,rules:e.loginRules,"label-position":"left","label-width":"0px"}},[n("h3",{staticClass:"title"},[e._v("文档管理-系统登录")]),n("el-form-item",{attrs:{prop:"username"}},[n("el-input",{attrs:{type:"text","auto-complete":"off",placeholder:"账号"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginSubmit(t)}},model:{value:e.loginParam.username,callback:function(t){e.$set(e.loginParam,"username",t)},expression:"loginParam.username"}})],1),n("el-form-item",{attrs:{prop:"password"}},[n("el-input",{attrs:{type:"password","auto-complete":"off",placeholder:"密码"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginSubmit(t)}},model:{value:e.loginParam.password,callback:function(t){e.$set(e.loginParam,"password",t)},expression:"loginParam.password"}})],1),n("el-form-item",{staticStyle:{width:"100%"}},[n("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary",loading:e.loginLoading},nativeOn:{click:function(t){return t.preventDefault(),e.loginSubmit(t)}}},[e._v("登录")])],1)],1)],1),e._m(0)])},r=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"power-by"},[e._v("Powered By "),n("a",{attrs:{target:"_blank",href:"https://gitee.com/zyplayer/zyplayer-doc"}},[e._v("zyplayer-doc")])])}],o=n("3099"),i={data:function(){return{loginLoading:!1,redirect:"",loginParam:{username:"",password:""},loginRules:{username:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]},bgImgRandom:Math.ceil(5*Math.random())}},mounted:function(){this.redirect=this.$route.query.redirect},methods:{loginSubmit:function(){var e=this;this.$refs.loginParam.validate((function(t){t&&(e.loginLoading=!0,o["a"].userLogin(e.loginParam).then((function(){e.$emit("loginSuccess"),e.loginLoading=!1,e.redirect?location.href=decodeURIComponent(e.redirect):e.$router.back()})).catch((function(t){console.log("登录失败",t),e.loginLoading=!1})))}))}}},l=i,s=(n("9231"),n("2877")),u=Object(s["a"])(l,a,r,!1,null,null,null);t["default"]=u.exports}}]);
|
||||
@@ -1 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-30126bdc"],{"0b39":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticStyle:{"border-bottom":"1px solid #eee",padding:"10px","margin-bottom":"10px"}},[e._v("权限列表")]),a("div",{staticStyle:{padding:"10px"}},[a("el-table",{staticStyle:{width:"100%","margin-bottom":"5px"},attrs:{data:e.searchResultList,border:"","max-height":"500"}},[a("el-table-column",{attrs:{prop:"id",label:"编号",width:"60"}}),a("el-table-column",{attrs:{prop:"name",label:"权限名"}}),a("el-table-column",{attrs:{prop:"spaceExplain",label:"权限说明"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间"}})],1)],1),a("div",{staticClass:"page-info-box"},[a("el-pagination",{attrs:{"page-sizes":[20,50,100],"page-size":20,"current-page":e.searchParam.pageNum,layout:"prev, pager, next, jumper, sizes, total",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)])},i=[],r={data:function(){return{editUserDialogVisible:!1,totalCount:0,searchParam:{type:1,keyword:"",pageSize:20,pageNum:1},searchResultList:[{name:"张三"}],roleOptions:[{value:"管理员"}],editUserForm:{}}},mounted:function(){},methods:{handleSizeChange:function(e){this.searchParam.pageSize=e},handleCurrentChange:function(e){this.searchParam.pageNum=e},editUserInfo:function(){this.editUserDialogVisible=!0},resetPassword:function(){}}},l=r,s=(a("cc1a"),a("2877")),o=Object(s["a"])(l,n,i,!1,null,null,null);t["default"]=o.exports},"594a":function(e,t,a){},cc1a:function(e,t,a){"use strict";var n=a("594a"),i=a.n(n);i.a}}]);
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-30126bdc"],{"0b39":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticStyle:{"border-bottom":"1px solid #eee",padding:"10px","margin-bottom":"10px"}},[e._v("权限列表")]),a("div",{staticStyle:{padding:"10px"}},[a("el-table",{staticStyle:{width:"100%","margin-bottom":"5px"},attrs:{data:e.searchResultList,border:"","max-height":"500"}},[a("el-table-column",{attrs:{prop:"id",label:"编号",width:"60"}}),a("el-table-column",{attrs:{prop:"name",label:"权限名"}}),a("el-table-column",{attrs:{prop:"spaceExplain",label:"权限说明"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间"}})],1)],1),a("div",{staticClass:"page-info-box"},[a("el-pagination",{attrs:{"page-sizes":[20,50,100],"page-size":20,"current-page":e.searchParam.pageNum,layout:"prev, pager, next, jumper, sizes, total",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)])},i=[],r={data:function(){return{editUserDialogVisible:!1,totalCount:0,searchParam:{type:1,keyword:"",pageSize:20,pageNum:1},searchResultList:[{name:"张三"}],roleOptions:[{value:"管理员"}],editUserForm:{}}},mounted:function(){},methods:{handleSizeChange:function(e){this.searchParam.pageSize=e},handleCurrentChange:function(e){this.searchParam.pageNum=e},editUserInfo:function(){this.editUserDialogVisible=!0},resetPassword:function(){}}},l=r,s=(a("cc1a"),a("2877")),o=Object(s["a"])(l,n,i,!1,null,null,null);t["default"]=o.exports},"594a":function(e,t,a){},cc1a:function(e,t,a){"use strict";var n=a("594a"),i=a.n(n);i.a}}]);
|
||||
@@ -1 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-32cc5643"],{"408e":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"my-info-vue"},[a("el-breadcrumb",{staticStyle:{padding:"20px 10px"},attrs:{"separator-class":"el-icon-arrow-right"}},[a("el-breadcrumb-item",{attrs:{to:{path:"/"}}},[e._v("首页")]),a("el-breadcrumb-item",[e._v("我的信息")])],1),a("div",{staticStyle:{margin:"0 auto","max-width":"1000px"}},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e._v("我的信息")]),a("el-form",{staticClass:"search-form-box",attrs:{"label-width":"100px"}},[a("el-form-item",{attrs:{label:"账号:"}},[e._v(e._s(e.userInfo.userNo))]),a("el-form-item",{attrs:{label:"用户名:"}},[e._v(e._s(e.userInfo.userName))]),a("el-form-item",{attrs:{label:"手机号:"}},[e._v(e._s(e.userInfo.phone))]),a("el-form-item",{attrs:{label:"邮箱:"}},[e._v(e._s(e.userInfo.email))]),a("el-form-item",{attrs:{label:"状态:"}},[e._v(e._s(0==e.userInfo.delFlag?"正常":"停用"))]),a("el-form-item",{attrs:{label:"性别:"}},[e._v(e._s(0==e.userInfo.sex?"女":"男"))])],1)],1)],1)],1)},r=[],l=a("3099"),n={data:function(){return{userInfo:{}}},mounted:function(){this.getUserInfo()},methods:{getUserInfo:function(){var e=this;l["a"].getSelfUserInfo().then((function(t){e.userInfo=t.data}))}}},o=n,i=(a("dcfc"),a("2877")),c=Object(i["a"])(o,s,r,!1,null,null,null);t["default"]=c.exports},dcfc:function(e,t,a){"use strict";var s=a("ed55"),r=a.n(s);r.a},ed55:function(e,t,a){}}]);
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-32cc5643"],{"408e":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"my-info-vue"},[a("el-breadcrumb",{staticStyle:{padding:"20px 10px"},attrs:{"separator-class":"el-icon-arrow-right"}},[a("el-breadcrumb-item",{attrs:{to:{path:"/"}}},[e._v("首页")]),a("el-breadcrumb-item",[e._v("我的信息")])],1),a("div",{staticStyle:{margin:"0 auto","max-width":"1000px"}},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e._v("我的信息")]),a("el-form",{staticClass:"search-form-box",attrs:{"label-width":"100px"}},[a("el-form-item",{attrs:{label:"账号:"}},[e._v(e._s(e.userInfo.userNo))]),a("el-form-item",{attrs:{label:"用户名:"}},[e._v(e._s(e.userInfo.userName))]),a("el-form-item",{attrs:{label:"手机号:"}},[e._v(e._s(e.userInfo.phone))]),a("el-form-item",{attrs:{label:"邮箱:"}},[e._v(e._s(e.userInfo.email))]),a("el-form-item",{attrs:{label:"状态:"}},[e._v(e._s(0==e.userInfo.delFlag?"正常":"停用"))]),a("el-form-item",{attrs:{label:"性别:"}},[e._v(e._s(0==e.userInfo.sex?"女":"男"))])],1)],1)],1)],1)},r=[],l=a("3099"),n={data:function(){return{userInfo:{}}},mounted:function(){this.getUserInfo()},methods:{getUserInfo:function(){var e=this;l["a"].getSelfUserInfo().then((function(t){e.userInfo=t.data}))}}},o=n,i=(a("dcfc"),a("2877")),c=Object(i["a"])(o,s,r,!1,null,null,null);t["default"]=c.exports},dcfc:function(e,t,a){"use strict";var s=a("ed55"),r=a.n(s);r.a},ed55:function(e,t,a){}}]);
|
||||
@@ -1 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4582ecc6"],{"4a12":function(e,t,a){"use strict";var r=a("4de9"),l=a.n(r);l.a},"4de9":function(e,t,a){},"97ae":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticStyle:{"border-bottom":"1px solid #eee",padding:"10px","margin-bottom":"10px"}},[e._v("角色管理")]),a("el-form",{staticClass:"search-form-box",attrs:{inline:!0,model:e.searchParam}},[a("el-form-item",{attrs:{label:"搜索类型"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.searchParam.type,callback:function(t){e.$set(e.searchParam,"type",t)},expression:"searchParam.type"}},[a("el-option",{attrs:{label:"角色名",value:1}})],1)],1),a("el-form-item",{attrs:{label:"关键字"}},[a("el-input",{attrs:{placeholder:"输入关键字"},model:{value:e.searchParam.keyword,callback:function(t){e.$set(e.searchParam,"keyword",t)},expression:"searchParam.keyword"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){}}},[e._v("查询")])],1)],1),a("div",{staticStyle:{padding:"10px"}},[a("el-table",{staticStyle:{width:"100%","margin-bottom":"5px"},attrs:{data:e.searchResultList,border:"","max-height":"500"}},[a("el-table-column",{attrs:{prop:"id",label:"编号",width:"60"}}),a("el-table-column",{attrs:{prop:"name",label:"角色名"}}),a("el-table-column",{attrs:{prop:"spaceExplain",label:"CODE"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"small",plain:"",type:"primary"},on:{click:function(a){return e.editUserInfo(t.row)}}},[e._v("修改")]),a("el-button",{attrs:{size:"small",plain:"",type:"primary"},on:{click:function(a){return e.resetPassword(t.row)}}},[e._v("权限管理")]),a("el-button",{attrs:{size:"small",plain:"",type:"warning"},on:{click:function(a){return e.editUserInfo(t.row)}}},[e._v("删除")])]}}])})],1)],1),a("div",{staticClass:"page-info-box"},[a("el-pagination",{attrs:{"page-sizes":[20,50,100],"page-size":20,"current-page":e.searchParam.pageNum,layout:"prev, pager, next, jumper, sizes, total",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),a("el-dialog",{attrs:{title:"修改用户",visible:e.editUserDialogVisible,width:"600px"},on:{"update:visible":function(t){e.editUserDialogVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.editUserForm,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"账号"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"用户名"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"手机号"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"邮箱"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"性别"}},[a("el-radio-group",{model:{value:e.editUserForm.resource,callback:function(t){e.$set(e.editUserForm,"resource",t)},expression:"editUserForm.resource"}},[a("el-radio",{attrs:{label:"男"}}),a("el-radio",{attrs:{label:"女"}})],1)],1),a("el-form-item",{attrs:{label:"角色"}},[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:"请选择"},model:{value:e.editUserForm.xx,callback:function(t){e.$set(e.editUserForm,"xx",t)},expression:"editUserForm.xx"}},e._l(e.roleOptions,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){}}},[e._v("确定")]),a("el-button",[e._v("取消")])],1)],1)],1)],1)},l=[],i={data:function(){return{editUserDialogVisible:!1,totalCount:0,searchParam:{type:1,keyword:"",pageSize:20,pageNum:1},searchResultList:[{name:"张三"}],roleOptions:[{value:"管理员"}],editUserForm:{}}},mounted:function(){},methods:{handleSizeChange:function(e){this.searchParam.pageSize=e},handleCurrentChange:function(e){this.searchParam.pageNum=e},editUserInfo:function(){this.editUserDialogVisible=!0},resetPassword:function(){}}},o=i,s=(a("4a12"),a("2877")),n=Object(s["a"])(o,r,l,!1,null,null,null);t["default"]=n.exports}}]);
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4582ecc6"],{"4a12":function(e,t,a){"use strict";var r=a("4de9"),l=a.n(r);l.a},"4de9":function(e,t,a){},"97ae":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticStyle:{"border-bottom":"1px solid #eee",padding:"10px","margin-bottom":"10px"}},[e._v("角色管理")]),a("el-form",{staticClass:"search-form-box",attrs:{inline:!0,model:e.searchParam}},[a("el-form-item",{attrs:{label:"搜索类型"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.searchParam.type,callback:function(t){e.$set(e.searchParam,"type",t)},expression:"searchParam.type"}},[a("el-option",{attrs:{label:"角色名",value:1}})],1)],1),a("el-form-item",{attrs:{label:"关键字"}},[a("el-input",{attrs:{placeholder:"输入关键字"},model:{value:e.searchParam.keyword,callback:function(t){e.$set(e.searchParam,"keyword",t)},expression:"searchParam.keyword"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){}}},[e._v("查询")])],1)],1),a("div",{staticStyle:{padding:"10px"}},[a("el-table",{staticStyle:{width:"100%","margin-bottom":"5px"},attrs:{data:e.searchResultList,border:"","max-height":"500"}},[a("el-table-column",{attrs:{prop:"id",label:"编号",width:"60"}}),a("el-table-column",{attrs:{prop:"name",label:"角色名"}}),a("el-table-column",{attrs:{prop:"spaceExplain",label:"CODE"}}),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"small",plain:"",type:"primary"},on:{click:function(a){return e.editUserInfo(t.row)}}},[e._v("修改")]),a("el-button",{attrs:{size:"small",plain:"",type:"primary"},on:{click:function(a){return e.resetPassword(t.row)}}},[e._v("权限管理")]),a("el-button",{attrs:{size:"small",plain:"",type:"warning"},on:{click:function(a){return e.editUserInfo(t.row)}}},[e._v("删除")])]}}])})],1)],1),a("div",{staticClass:"page-info-box"},[a("el-pagination",{attrs:{"page-sizes":[20,50,100],"page-size":20,"current-page":e.searchParam.pageNum,layout:"prev, pager, next, jumper, sizes, total",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),a("el-dialog",{attrs:{title:"修改用户",visible:e.editUserDialogVisible,width:"600px"},on:{"update:visible":function(t){e.editUserDialogVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.editUserForm,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"账号"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"用户名"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"手机号"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"邮箱"}},[a("el-input",{model:{value:e.editUserForm.name,callback:function(t){e.$set(e.editUserForm,"name",t)},expression:"editUserForm.name"}})],1),a("el-form-item",{attrs:{label:"性别"}},[a("el-radio-group",{model:{value:e.editUserForm.resource,callback:function(t){e.$set(e.editUserForm,"resource",t)},expression:"editUserForm.resource"}},[a("el-radio",{attrs:{label:"男"}}),a("el-radio",{attrs:{label:"女"}})],1)],1),a("el-form-item",{attrs:{label:"角色"}},[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:"请选择"},model:{value:e.editUserForm.xx,callback:function(t){e.$set(e.editUserForm,"xx",t)},expression:"editUserForm.xx"}},e._l(e.roleOptions,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){}}},[e._v("确定")]),a("el-button",[e._v("取消")])],1)],1)],1)],1)},l=[],i={data:function(){return{editUserDialogVisible:!1,totalCount:0,searchParam:{type:1,keyword:"",pageSize:20,pageNum:1},searchResultList:[{name:"张三"}],roleOptions:[{value:"管理员"}],editUserForm:{}}},mounted:function(){},methods:{handleSizeChange:function(e){this.searchParam.pageSize=e},handleCurrentChange:function(e){this.searchParam.pageNum=e},editUserInfo:function(){this.editUserDialogVisible=!0},resetPassword:function(){}}},o=i,s=(a("4a12"),a("2877")),n=Object(s["a"])(o,r,l,!1,null,null,null);t["default"]=n.exports}}]);
|
||||
@@ -1 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7349f4ef"],{2629:function(t,i,A){"use strict";var a=A("d7846"),o=A.n(a);o.a},"3c4a":function(t,i){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAE2UlEQVR4nO3bW4hVVRzH8c+aM6VZPXRTC5qkHvIlSAhLujxGN3qooEizIrpoN7xkF0rLLmamFaSZWYlUVChkUARGUBFpkIiWBtlFu5iWRGWpM+ec1cOeqWnce8aZs8+Zxu0PNpyZ/3/vtfZ3/9dl7/VfQRfNvjRCwOAYBIghscUQdf77n9+BjrOidN//+HX2DbHrudUY7EF85IXmrtXLXVklDMVTGI5q3Wvxr0IMduNLfHL3deU1gh8Ev4nMWpw/kND1H+0R0IIPY9BCYyOg07UrMdgh2BRZJsSV2IjKo88dVMs9/0f1j7G+qySJxKEYg614LbLkzolt65SZvah2EE01X6ExCjguMkmwQtmdkSOm3dBm2g1tNV14oADorBF4CEsFp8C0G/sOYSACIGm6F+H1GFxYJdzRRwgDFUCHRmJx4Aol4Y6beg9hoAOA4YInRZcd+idTJ/QOwv4AAIZGHt95mHPoHYR6D4Ot2ISfu/GJGIxRGFRDWS2YjbH4el9PqheAiDVYiLfwq5RJV7uqOAHv4vgayz0Dd8UQb58ysXXX3AUH93hCvQAsx1RsDpEZL5cyHe+9pgy7dZok1qhxeA+vTpnYqicIuQMIrIpMCTFsmf5Kv3Qxh2Bq5AP82JNz3gDasCCwJetxTr+60vFzUKSZGCNDZDeRvuhUjA3MmTyx1bxuoiBvABuxEtKe/vTxFaJjBONwLg5vNw2SzPnzUgljY/CS5B0iU3nH6DpNtqcZZoyvCEl4zhLNxXk4s/04TW0jQJpOwSUw+ebWTKe8AfyhrHpfdts/G5fLN9yz1ITzJUNst06N1Ik4rIHljZHMLzLVaACNePKddWTktO7G1/1lKtydRkdKkzL6gSIAOCNwXJaxCACOlbwnpKoIAAZhWJaxCACaOz6dTbpl736gCABgpCapb2RFAdAiGpJmKAqAo2VMwIoCYDBSV1GKAiBTBwD0dwX6WwcA9HcF+lsHAPR3BfpbRQHwl2SVai8VBcA2/JFmKAqAzUr+SjP8n3OE8lO0UVl8Yv7eCyRFiIA2fJ5lLAKA3fgly1gEAJvxTZaxCAA+qiajQKqKAGBNk/QOkMaPApWeXXLV1sDq7hzqEgEPXpmZX70BO+pRZobe180IQP4AjlJK//pKkj2C+diTc7lp2oU3UJ6XEf7k3wRGiY7Ht10NDywtmT6+UsZswQaMlnyojJJEiYvlu3L8Cd7pySlvACfhgsCCmVdW98oSmbm0RPJi8lr70ZEk1YKz5AdgFxaKfuvJMe8m0BS5rdq+Jv/A2Eb3ef9oJd5Gt/lB1KcTPBnzY4in0y8QfsKjgd/3JRmhXsPgGLyKl2Pw5v3jKl/FoDV1x4hYjUno55E8UcXTlVJlValS6jFHkPrOA0bgHkzAd6S/jrYrryyx5VjQXG6Ojz+zb7tJ6j0RCjiy/ai3PpYA/3Vfb579Zyq8PkS3hmhTb0/cHwCsFV2v6lPozdNnYAOoSpKixwdWC8xZ2PtdZAMVwE4swlWB9TDn2b5toRto3wSrkinuE1gh2vNYjXsHBwqAVnwWWBKjZdgaQj4bJ/+vACJ+l2y1WY1lYlht2LatYftQjdg6u0cyrn6jcZuny5Kb/h5fYC224JcQtc56vj7PKuuq23Gtxub2xkCbqAwPv9iY4Pwbdbxk84RcOcgAAAAASUVORK5CYII="},b3d7:function(t,i,A){"use strict";A.r(i);var a=function(){var t=this,i=t.$createElement,a=t._self._c||i;return a("div",{staticStyle:{padding:"10px"}},[a("div",{staticStyle:{"max-width":"800px",margin:"20px auto"}},[a("div",{staticStyle:{"text-align":"center"}},[t._v('欢迎使用ヾ(๑╹◡╹)ノ" - 今天也要加油鸭')]),a("div",{staticStyle:{padding:"20px"}},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("所有产品")])]),a("div",{staticClass:"product-list"},[a("div",{staticClass:"item",on:{click:function(i){return t.jumpToDocPage("doc-swagger-plus")}}},[a("div",{staticClass:"logo-text text1"},[t._v("Swagger")]),a("div",[t._v("Swagger文档")])]),a("div",{staticClass:"item",on:{click:function(i){return t.jumpToDocPage("doc-db")}}},[a("div",{staticClass:"logo-text text2"},[t._v("DB")]),a("div",[t._v("数据库文档")])]),a("div",{staticClass:"item",on:{click:function(i){return t.jumpToDocPage("doc-wiki")}}},[a("div",{staticClass:"logo-text text3"},[t._v("WIKI")]),a("div",[t._v("WIKI文档")])]),a("div",{staticClass:"item",on:{click:function(i){return t.jumpToDocPage("doc-dubbo")}}},[a("div",{staticClass:"logo-img"},[a("img",{attrs:{src:A("3c4a")}})]),a("div",[t._v("Dubbo文档")])])])])],1)])])},o=[],s={data:function(){return{}},mounted:function(){},methods:{jumpToDocPage:function(t){window.open(t)}}},c=s,d=(A("2629"),A("2877")),e=Object(d["a"])(c,a,o,!1,null,null,null);i["default"]=e.exports},d7846:function(t,i,A){}}]);
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7349f4ef"],{2629:function(t,A,i){"use strict";var a=i("d7846"),o=i.n(a);o.a},"3c4a":function(t,A){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAE2UlEQVR4nO3bW4hVVRzH8c+aM6VZPXRTC5qkHvIlSAhLujxGN3qooEizIrpoN7xkF0rLLmamFaSZWYlUVChkUARGUBFpkIiWBtlFu5iWRGWpM+ec1cOeqWnce8aZs8+Zxu0PNpyZ/3/vtfZ3/9dl7/VfQRfNvjRCwOAYBIghscUQdf77n9+BjrOidN//+HX2DbHrudUY7EF85IXmrtXLXVklDMVTGI5q3Wvxr0IMduNLfHL3deU1gh8Ev4nMWpw/kND1H+0R0IIPY9BCYyOg07UrMdgh2BRZJsSV2IjKo88dVMs9/0f1j7G+qySJxKEYg614LbLkzolt65SZvah2EE01X6ExCjguMkmwQtmdkSOm3dBm2g1tNV14oADorBF4CEsFp8C0G/sOYSACIGm6F+H1GFxYJdzRRwgDFUCHRmJx4Aol4Y6beg9hoAOA4YInRZcd+idTJ/QOwv4AAIZGHt95mHPoHYR6D4Ot2ISfu/GJGIxRGFRDWS2YjbH4el9PqheAiDVYiLfwq5RJV7uqOAHv4vgayz0Dd8UQb58ysXXX3AUH93hCvQAsx1RsDpEZL5cyHe+9pgy7dZok1qhxeA+vTpnYqicIuQMIrIpMCTFsmf5Kv3Qxh2Bq5AP82JNz3gDasCCwJetxTr+60vFzUKSZGCNDZDeRvuhUjA3MmTyx1bxuoiBvABuxEtKe/vTxFaJjBONwLg5vNw2SzPnzUgljY/CS5B0iU3nH6DpNtqcZZoyvCEl4zhLNxXk4s/04TW0jQJpOwSUw+ebWTKe8AfyhrHpfdts/G5fLN9yz1ITzJUNst06N1Ik4rIHljZHMLzLVaACNePKddWTktO7G1/1lKtydRkdKkzL6gSIAOCNwXJaxCACOlbwnpKoIAAZhWJaxCACaOz6dTbpl736gCABgpCapb2RFAdAiGpJmKAqAo2VMwIoCYDBSV1GKAiBTBwD0dwX6WwcA9HcF+lsHAPR3BfpbRQHwl2SVai8VBcA2/JFmKAqAzUr+SjP8n3OE8lO0UVl8Yv7eCyRFiIA2fJ5lLAKA3fgly1gEAJvxTZaxCAA+qiajQKqKAGBNk/QOkMaPApWeXXLV1sDq7hzqEgEPXpmZX70BO+pRZobe180IQP4AjlJK//pKkj2C+diTc7lp2oU3UJ6XEf7k3wRGiY7Ht10NDywtmT6+UsZswQaMlnyojJJEiYvlu3L8Cd7pySlvACfhgsCCmVdW98oSmbm0RPJi8lr70ZEk1YKz5AdgFxaKfuvJMe8m0BS5rdq+Jv/A2Eb3ef9oJd5Gt/lB1KcTPBnzY4in0y8QfsKjgd/3JRmhXsPgGLyKl2Pw5v3jKl/FoDV1x4hYjUno55E8UcXTlVJlValS6jFHkPrOA0bgHkzAd6S/jrYrryyx5VjQXG6Ojz+zb7tJ6j0RCjiy/ai3PpYA/3Vfb579Zyq8PkS3hmhTb0/cHwCsFV2v6lPozdNnYAOoSpKixwdWC8xZ2PtdZAMVwE4swlWB9TDn2b5toRto3wSrkinuE1gh2vNYjXsHBwqAVnwWWBKjZdgaQj4bJ/+vACJ+l2y1WY1lYlht2LatYftQjdg6u0cyrn6jcZuny5Kb/h5fYC224JcQtc56vj7PKuuq23Gtxub2xkCbqAwPv9iY4Pwbdbxk84RcOcgAAAAASUVORK5CYII="},b3d7:function(t,A,i){"use strict";i.r(A);var a=function(){var t=this,A=t.$createElement,a=t._self._c||A;return a("div",{staticStyle:{padding:"10px"}},[a("div",{staticStyle:{"max-width":"800px",margin:"20px auto"}},[a("div",{staticStyle:{"text-align":"center"}},[t._v('欢迎使用ヾ(๑╹◡╹)ノ" - 今天也要加油鸭')]),a("div",{staticStyle:{padding:"20px"}},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("所有产品")])]),a("div",{staticClass:"product-list"},[a("div",{staticClass:"item",on:{click:function(A){return t.jumpToDocPage("doc-api")}}},[a("div",{staticClass:"logo-text text1"},[t._v("API")]),a("div",[t._v("API接口文档")])]),a("div",{staticClass:"item",on:{click:function(A){return t.jumpToDocPage("doc-db")}}},[a("div",{staticClass:"logo-text text2"},[t._v("DB")]),a("div",[t._v("数据库文档")])]),a("div",{staticClass:"item",on:{click:function(A){return t.jumpToDocPage("doc-wiki")}}},[a("div",{staticClass:"logo-text text3"},[t._v("WIKI")]),a("div",[t._v("WIKI文档")])]),a("div",{staticClass:"item",on:{click:function(A){return t.jumpToDocPage("doc-dubbo")}}},[a("div",{staticClass:"logo-img"},[a("img",{attrs:{src:i("3c4a")}})]),a("div",[t._v("Dubbo文档")])])])])],1)])])},o=[],c={data:function(){return{}},mounted:function(){},methods:{jumpToDocPage:function(t){window.open(t)}}},d=c,s=(i("2629"),i("2877")),l=Object(s["a"])(d,a,o,!1,null,null,null);A["default"]=l.exports},d7846:function(t,A,i){}}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -510,13 +510,13 @@ CREATE TABLE `db_table_relation` (
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='表关系';
|
||||
|
||||
DROP TABLE IF EXISTS `swagger_doc`;
|
||||
CREATE TABLE `swagger_doc` (
|
||||
DROP TABLE IF EXISTS `api_doc`;
|
||||
CREATE TABLE `api_doc` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增ID',
|
||||
`name` varchar(100) DEFAULT NULL COMMENT '文档名称',
|
||||
`doc_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '文档类型 1=url 2=swagger文档json',
|
||||
`doc_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '文档类型 1=swagger url 2=swagger json 3=openapi url 4=openapi json 5=自建API分组',
|
||||
`doc_url` varchar(250) DEFAULT NULL COMMENT '文档URL地址',
|
||||
`json_content` mediumtext DEFAULT NULL COMMENT 'swagger文档json内容',
|
||||
`json_content` mediumtext DEFAULT NULL COMMENT '文档json内容',
|
||||
`rewrite_domain` varchar(100) DEFAULT NULL COMMENT '重写的域名',
|
||||
`open_visit` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开放访问 0=否 1=是',
|
||||
`doc_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态 1=启用 2=禁用',
|
||||
@@ -525,11 +525,12 @@ CREATE TABLE `swagger_doc` (
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`yn` tinyint(4) DEFAULT NULL COMMENT '是否有效 0=无效 1=有效',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='swagger文档地址';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='api文档地址';
|
||||
|
||||
DROP TABLE IF EXISTS `swagger_request_param`;
|
||||
CREATE TABLE `swagger_request_param` (
|
||||
DROP TABLE IF EXISTS `api_request_param`;
|
||||
CREATE TABLE `api_request_param` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增ID',
|
||||
`doc_id` bigint(20) DEFAULT NULL COMMENT 'api_doc主键ID',
|
||||
`doc_url` varchar(250) DEFAULT NULL COMMENT '文档url',
|
||||
`form_data` text DEFAULT NULL COMMENT 'form参数',
|
||||
`body_data` text DEFAULT NULL COMMENT 'body参数',
|
||||
@@ -540,20 +541,21 @@ CREATE TABLE `swagger_request_param` (
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`yn` tinyint(4) DEFAULT NULL COMMENT '是否有效 0=无效 1=有效',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='swagger文档请求参数记录';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='文档请求参数记录';
|
||||
|
||||
DROP TABLE IF EXISTS `swagger_global_param`;
|
||||
CREATE TABLE `swagger_global_param` (
|
||||
DROP TABLE IF EXISTS `api_global_param`;
|
||||
CREATE TABLE `api_global_param` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增ID',
|
||||
`param_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '参数类型 1=form 2=header 3=cookie',
|
||||
`param_key` varchar(100) DEFAULT NULL COMMENT '参数名',
|
||||
`param_value` varchar(1024) DEFAULT NULL COMMENT '参数值',
|
||||
`param_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态 1=启用 2=禁用',
|
||||
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID',
|
||||
`create_user_name` varchar(20) DEFAULT NULL COMMENT '创建人名字',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`yn` tinyint(4) DEFAULT NULL COMMENT '是否有效 0=无效 1=有效',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='swagger文档全局参数记录';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='api文档全局参数记录';
|
||||
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
@@ -513,13 +513,13 @@ CREATE TABLE `db_table_relation` (
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='表关系';
|
||||
|
||||
DROP TABLE IF EXISTS `swagger_doc`;
|
||||
CREATE TABLE `swagger_doc` (
|
||||
DROP TABLE IF EXISTS `api_doc`;
|
||||
CREATE TABLE `api_doc` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增ID',
|
||||
`name` varchar(100) DEFAULT NULL COMMENT '文档名称',
|
||||
`doc_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '文档类型 1=url 2=swagger文档json',
|
||||
`doc_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '文档类型 1=swagger url 2=swagger json 3=openapi url 4=openapi json 5=自建API分组',
|
||||
`doc_url` varchar(250) DEFAULT NULL COMMENT '文档URL地址',
|
||||
`json_content` mediumtext DEFAULT NULL COMMENT 'swagger文档json内容',
|
||||
`json_content` mediumtext DEFAULT NULL COMMENT '文档json内容',
|
||||
`rewrite_domain` varchar(100) DEFAULT NULL COMMENT '重写的域名',
|
||||
`open_visit` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开放访问 0=否 1=是',
|
||||
`doc_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态 1=启用 2=禁用',
|
||||
@@ -528,11 +528,12 @@ CREATE TABLE `swagger_doc` (
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`yn` tinyint(4) DEFAULT NULL COMMENT '是否有效 0=无效 1=有效',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='swagger文档地址';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='api文档地址';
|
||||
|
||||
DROP TABLE IF EXISTS `swagger_request_param`;
|
||||
CREATE TABLE `swagger_request_param` (
|
||||
DROP TABLE IF EXISTS `api_request_param`;
|
||||
CREATE TABLE `api_request_param` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增ID',
|
||||
`doc_id` bigint(20) DEFAULT NULL COMMENT 'api_doc主键ID',
|
||||
`doc_url` varchar(250) DEFAULT NULL COMMENT '文档url',
|
||||
`form_data` text DEFAULT NULL COMMENT 'form参数',
|
||||
`body_data` text DEFAULT NULL COMMENT 'body参数',
|
||||
@@ -543,19 +544,20 @@ CREATE TABLE `swagger_request_param` (
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`yn` tinyint(4) DEFAULT NULL COMMENT '是否有效 0=无效 1=有效',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='swagger文档请求参数记录';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='文档请求参数记录';
|
||||
|
||||
DROP TABLE IF EXISTS `swagger_global_param`;
|
||||
CREATE TABLE `swagger_global_param` (
|
||||
DROP TABLE IF EXISTS `api_global_param`;
|
||||
CREATE TABLE `api_global_param` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增ID',
|
||||
`param_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '参数类型 1=form 2=header 3=cookie',
|
||||
`param_key` varchar(100) DEFAULT NULL COMMENT '参数名',
|
||||
`param_value` varchar(1024) DEFAULT NULL COMMENT '参数值',
|
||||
`param_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态 1=启用 2=禁用',
|
||||
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID',
|
||||
`create_user_name` varchar(20) DEFAULT NULL COMMENT '创建人名字',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`yn` tinyint(4) DEFAULT NULL COMMENT '是否有效 0=无效 1=有效',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='swagger文档全局参数记录';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='api文档全局参数记录';
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
@@ -9,12 +9,13 @@
|
||||
--
|
||||
-- ------------------------从1.0.9版本升级------------------------
|
||||
|
||||
CREATE TABLE `swagger_doc` (
|
||||
DROP TABLE IF EXISTS `api_doc`;
|
||||
CREATE TABLE `api_doc` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增ID',
|
||||
`name` varchar(100) DEFAULT NULL COMMENT '文档名称',
|
||||
`doc_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '文档类型 1=url 2=swagger文档json',
|
||||
`doc_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '文档类型 1=swagger url 2=swagger json 3=openapi url 4=openapi json 5=自建API分组',
|
||||
`doc_url` varchar(250) DEFAULT NULL COMMENT '文档URL地址',
|
||||
`json_content` mediumtext DEFAULT NULL COMMENT 'swagger文档json内容',
|
||||
`json_content` mediumtext DEFAULT NULL COMMENT '文档json内容',
|
||||
`rewrite_domain` varchar(100) DEFAULT NULL COMMENT '重写的域名',
|
||||
`open_visit` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开放访问 0=否 1=是',
|
||||
`doc_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态 1=启用 2=禁用',
|
||||
@@ -23,10 +24,12 @@ CREATE TABLE `swagger_doc` (
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`yn` tinyint(4) DEFAULT NULL COMMENT '是否有效 0=无效 1=有效',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='swagger文档地址';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='api文档地址';
|
||||
|
||||
CREATE TABLE `swagger_request_param` (
|
||||
DROP TABLE IF EXISTS `api_request_param`;
|
||||
CREATE TABLE `api_request_param` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增ID',
|
||||
`doc_id` bigint(20) DEFAULT NULL COMMENT 'api_doc主键ID',
|
||||
`doc_url` varchar(250) DEFAULT NULL COMMENT '文档url',
|
||||
`form_data` text DEFAULT NULL COMMENT 'form参数',
|
||||
`body_data` text DEFAULT NULL COMMENT 'body参数',
|
||||
@@ -37,19 +40,21 @@ CREATE TABLE `swagger_request_param` (
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`yn` tinyint(4) DEFAULT NULL COMMENT '是否有效 0=无效 1=有效',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='swagger文档请求参数记录';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='文档请求参数记录';
|
||||
|
||||
CREATE TABLE `swagger_global_param` (
|
||||
DROP TABLE IF EXISTS `api_global_param`;
|
||||
CREATE TABLE `api_global_param` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增ID',
|
||||
`param_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '参数类型 1=form 2=header 3=cookie',
|
||||
`param_key` varchar(100) DEFAULT NULL COMMENT '参数名',
|
||||
`param_value` varchar(1024) DEFAULT NULL COMMENT '参数值',
|
||||
`param_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态 1=启用 2=禁用',
|
||||
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID',
|
||||
`create_user_name` varchar(20) DEFAULT NULL COMMENT '创建人名字',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`yn` tinyint(4) DEFAULT NULL COMMENT '是否有效 0=无效 1=有效',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='swagger文档全局参数记录';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='api文档全局参数记录';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
package ${package.Controller};
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
<#if restControllerStyle>
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
<#else>
|
||||
import org.springframework.stereotype.Controller;
|
||||
</#if>
|
||||
<#if superControllerClassPackage??>
|
||||
import ${superControllerClassPackage};
|
||||
</#if>
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* ${table.comment!} 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
<#if restControllerStyle>
|
||||
@RestController
|
||||
<#else>
|
||||
@Controller
|
||||
</#if>
|
||||
@RequestMapping("<#if package.ModuleName??>/${package.ModuleName}</#if>/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>")
|
||||
<#if kotlin>
|
||||
class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}()</#if>
|
||||
<#else>
|
||||
<#if superControllerClass??>
|
||||
public class ${table.controllerName} extends ${superControllerClass} {
|
||||
<#else>
|
||||
public class ${table.controllerName} {
|
||||
</#if>
|
||||
|
||||
}
|
||||
</#if>
|
||||
@@ -1,41 +0,0 @@
|
||||
package ${package.Controller};
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
#if(${restControllerStyle})
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
#else
|
||||
import org.springframework.stereotype.Controller;
|
||||
#end
|
||||
#if(${superControllerClassPackage})
|
||||
import ${superControllerClassPackage};
|
||||
#end
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* $!{table.comment} 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
#if(${restControllerStyle})
|
||||
@RestController
|
||||
#else
|
||||
@Controller
|
||||
#end
|
||||
@RequestMapping("#if(${package.ModuleName})/${package.ModuleName}#end/#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end")
|
||||
#if(${kotlin})
|
||||
class ${table.controllerName}#if(${superControllerClass}) : ${superControllerClass}()#end
|
||||
|
||||
#else
|
||||
#if(${superControllerClass})
|
||||
public class ${table.controllerName} extends ${superControllerClass} {
|
||||
#else
|
||||
public class ${table.controllerName} {
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
#end
|
||||
@@ -1,150 +0,0 @@
|
||||
package ${package.Entity};
|
||||
|
||||
<#list table.importPackages as pkg>
|
||||
import ${pkg};
|
||||
</#list>
|
||||
<#if swagger2>
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
</#if>
|
||||
<#if entityLombokModel>
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
</#if>
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* ${table.comment!}
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
<#if entityLombokModel>
|
||||
@Data
|
||||
<#if superEntityClass??>
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
<#else>
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
</#if>
|
||||
@Accessors(chain = true)
|
||||
</#if>
|
||||
<#if table.convert>
|
||||
@TableName("${table.name}")
|
||||
</#if>
|
||||
<#if swagger2>
|
||||
@ApiModel(value="${entity}对象", description="${table.comment!}")
|
||||
</#if>
|
||||
<#if superEntityClass??>
|
||||
public class ${entity} extends ${superEntityClass}<#if activeRecord><${entity}></#if> {
|
||||
<#elseif activeRecord>
|
||||
public class ${entity} extends Model<${entity}> {
|
||||
<#else>
|
||||
public class ${entity} implements Serializable {
|
||||
</#if>
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
<#-- ---------- BEGIN 字段循环遍历 ---------->
|
||||
<#list table.fields as field>
|
||||
<#if field.keyFlag>
|
||||
<#assign keyPropertyName="${field.propertyName}"/>
|
||||
</#if>
|
||||
|
||||
<#if field.comment!?length gt 0>
|
||||
<#if swagger2>
|
||||
@ApiModelProperty(value = "${field.comment}")
|
||||
<#else>
|
||||
/**
|
||||
* ${field.comment}
|
||||
*/
|
||||
</#if>
|
||||
</#if>
|
||||
<#if field.keyFlag>
|
||||
<#-- 主键 -->
|
||||
<#if field.keyIdentityFlag>
|
||||
@TableId(value = "${field.name}", type = IdType.AUTO)
|
||||
<#elseif idType??>
|
||||
@TableId(value = "${field.name}", type = IdType.${idType})
|
||||
<#elseif field.convert>
|
||||
@TableId("${field.name}")
|
||||
</#if>
|
||||
<#-- 普通字段 -->
|
||||
<#elseif field.fill??>
|
||||
<#-- ----- 存在字段填充设置 ----->
|
||||
<#if field.convert>
|
||||
@TableField(value = "${field.name}", fill = FieldFill.${field.fill})
|
||||
<#else>
|
||||
@TableField(fill = FieldFill.${field.fill})
|
||||
</#if>
|
||||
<#elseif field.convert>
|
||||
@TableField("${field.name}")
|
||||
</#if>
|
||||
<#-- 乐观锁注解 -->
|
||||
<#if (versionFieldName!"") == field.name>
|
||||
@Version
|
||||
</#if>
|
||||
<#-- 逻辑删除注解 -->
|
||||
<#if (logicDeleteFieldName!"") == field.name>
|
||||
@TableLogic
|
||||
</#if>
|
||||
private ${field.propertyType} ${field.propertyName};
|
||||
</#list>
|
||||
<#------------ END 字段循环遍历 ---------->
|
||||
|
||||
<#if !entityLombokModel>
|
||||
<#list table.fields as field>
|
||||
<#if field.propertyType == "boolean">
|
||||
<#assign getprefix="is"/>
|
||||
<#else>
|
||||
<#assign getprefix="get"/>
|
||||
</#if>
|
||||
public ${field.propertyType} ${getprefix}${field.capitalName}() {
|
||||
return ${field.propertyName};
|
||||
}
|
||||
|
||||
<#if entityBuilderModel>
|
||||
public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
|
||||
<#else>
|
||||
public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
|
||||
</#if>
|
||||
this.${field.propertyName} = ${field.propertyName};
|
||||
<#if entityBuilderModel>
|
||||
return this;
|
||||
</#if>
|
||||
}
|
||||
</#list>
|
||||
</#if>
|
||||
|
||||
<#if entityColumnConstant>
|
||||
<#list table.fields as field>
|
||||
public static final String ${field.name?upper_case} = "${field.name}";
|
||||
|
||||
</#list>
|
||||
</#if>
|
||||
<#if activeRecord>
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
<#if keyPropertyName??>
|
||||
return this.${keyPropertyName};
|
||||
<#else>
|
||||
return null;
|
||||
</#if>
|
||||
}
|
||||
|
||||
</#if>
|
||||
<#if !entityLombokModel>
|
||||
@Override
|
||||
public String toString() {
|
||||
return "${entity}{" +
|
||||
<#list table.fields as field>
|
||||
<#if field_index==0>
|
||||
"${field.propertyName}=" + ${field.propertyName} +
|
||||
<#else>
|
||||
", ${field.propertyName}=" + ${field.propertyName} +
|
||||
</#if>
|
||||
</#list>
|
||||
"}";
|
||||
}
|
||||
</#if>
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
package ${package.Entity};
|
||||
|
||||
#foreach($pkg in ${table.importPackages})
|
||||
import ${pkg};
|
||||
#end
|
||||
#if(${swagger2})
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
#end
|
||||
#if(${entityLombokModel})
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
#end
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* $!{table.comment}
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
#if(${entityLombokModel})
|
||||
@Data
|
||||
#if(${superEntityClass})
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
#else
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
#end
|
||||
@Accessors(chain = true)
|
||||
#end
|
||||
#if(${table.convert})
|
||||
@TableName("${table.name}")
|
||||
#end
|
||||
#if(${swagger2})
|
||||
@ApiModel(value="${entity}对象", description="$!{table.comment}")
|
||||
#end
|
||||
#if(${superEntityClass})
|
||||
public class ${entity} extends ${superEntityClass}#if(${activeRecord})<${entity}>#end {
|
||||
#elseif(${activeRecord})
|
||||
public class ${entity} extends Model<${entity}> {
|
||||
#else
|
||||
public class ${entity} implements Serializable {
|
||||
#end
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
## ---------- BEGIN 字段循环遍历 ----------
|
||||
#foreach($field in ${table.fields})
|
||||
|
||||
#if(${field.keyFlag})
|
||||
#set($keyPropertyName=${field.propertyName})
|
||||
#end
|
||||
#if("$!field.comment" != "")
|
||||
#if(${swagger2})
|
||||
@ApiModelProperty(value = "${field.comment}")
|
||||
#else
|
||||
/**
|
||||
* ${field.comment}
|
||||
*/
|
||||
#end
|
||||
#end
|
||||
#if(${field.keyFlag})
|
||||
## 主键
|
||||
#if(${field.keyIdentityFlag})
|
||||
@TableId(value = "${field.name}", type = IdType.AUTO)
|
||||
#elseif(!$null.isNull(${idType}) && "$!idType" != "")
|
||||
@TableId(value = "${field.name}", type = IdType.${idType})
|
||||
#elseif(${field.convert})
|
||||
@TableId("${field.name}")
|
||||
#end
|
||||
## 普通字段
|
||||
#elseif(${field.fill})
|
||||
## ----- 存在字段填充设置 -----
|
||||
#if(${field.convert})
|
||||
@TableField(value = "${field.name}", fill = FieldFill.${field.fill})
|
||||
#else
|
||||
@TableField(fill = FieldFill.${field.fill})
|
||||
#end
|
||||
#elseif(${field.convert})
|
||||
@TableField("${field.name}")
|
||||
#end
|
||||
## 乐观锁注解
|
||||
#if(${versionFieldName}==${field.name})
|
||||
@Version
|
||||
#end
|
||||
## 逻辑删除注解
|
||||
#if(${logicDeleteFieldName}==${field.name})
|
||||
@TableLogic
|
||||
#end
|
||||
private ${field.propertyType} ${field.propertyName};
|
||||
#end
|
||||
## ---------- END 字段循环遍历 ----------
|
||||
|
||||
#if(!${entityLombokModel})
|
||||
#foreach($field in ${table.fields})
|
||||
#if(${field.propertyType.equals("boolean")})
|
||||
#set($getprefix="is")
|
||||
#else
|
||||
#set($getprefix="get")
|
||||
#end
|
||||
|
||||
public ${field.propertyType} ${getprefix}${field.capitalName}() {
|
||||
return ${field.propertyName};
|
||||
}
|
||||
|
||||
#if(${entityBuilderModel})
|
||||
public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
|
||||
#else
|
||||
public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
|
||||
#end
|
||||
this.${field.propertyName} = ${field.propertyName};
|
||||
#if(${entityBuilderModel})
|
||||
return this;
|
||||
#end
|
||||
}
|
||||
#end
|
||||
#end
|
||||
|
||||
#if(${entityColumnConstant})
|
||||
#foreach($field in ${table.fields})
|
||||
public static final String ${field.name.toUpperCase()} = "${field.name}";
|
||||
|
||||
#end
|
||||
#end
|
||||
#if(${activeRecord})
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
#if(${keyPropertyName})
|
||||
return this.${keyPropertyName};
|
||||
#else
|
||||
return null;
|
||||
#end
|
||||
}
|
||||
|
||||
#end
|
||||
#if(!${entityLombokModel})
|
||||
@Override
|
||||
public String toString() {
|
||||
return "${entity}{" +
|
||||
#foreach($field in ${table.fields})
|
||||
#if($!{foreach.index}==0)
|
||||
"${field.propertyName}=" + ${field.propertyName} +
|
||||
#else
|
||||
", ${field.propertyName}=" + ${field.propertyName} +
|
||||
#end
|
||||
#end
|
||||
"}";
|
||||
}
|
||||
#end
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
package ${package.Entity}
|
||||
|
||||
<#list table.importPackages as pkg>
|
||||
import ${pkg}
|
||||
</#list>
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* ${table.comment}
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
<#if table.convert>
|
||||
@TableName("${table.name}")
|
||||
</#if>
|
||||
<#if superEntityClass??>
|
||||
class ${entity} : ${superEntityClass}<#if activeRecord><${entity}></#if> {
|
||||
<#elseif activeRecord>
|
||||
class ${entity} : Model<${entity}>() {
|
||||
<#else>
|
||||
class ${entity} : Serializable {
|
||||
</#if>
|
||||
|
||||
<#-- ---------- BEGIN 字段循环遍历 ---------->
|
||||
<#list table.fields as field>
|
||||
<#if field.keyFlag>
|
||||
<#assign keyPropertyName="${field.propertyName}"/>
|
||||
</#if>
|
||||
|
||||
<#if field.comment!?length gt 0>
|
||||
/**
|
||||
* ${field.comment}
|
||||
*/
|
||||
</#if>
|
||||
<#if field.keyFlag>
|
||||
<#-- 主键 -->
|
||||
<#if field.keyIdentityFlag>
|
||||
@TableId(value = "${field.name}", type = IdType.AUTO)
|
||||
<#elseif idType ??>
|
||||
@TableId(value = "${field.name}", type = IdType.${idType})
|
||||
<#elseif field.convert>
|
||||
@TableId("${field.name}")
|
||||
</#if>
|
||||
<#-- 普通字段 -->
|
||||
<#elseif field.fill??>
|
||||
<#-- ----- 存在字段填充设置 ----->
|
||||
<#if field.convert>
|
||||
@TableField(value = "${field.name}", fill = FieldFill.${field.fill})
|
||||
<#else>
|
||||
@TableField(fill = FieldFill.${field.fill})
|
||||
</#if>
|
||||
<#elseif field.convert>
|
||||
@TableField("${field.name}")
|
||||
</#if>
|
||||
<#-- 乐观锁注解 -->
|
||||
<#if (versionFieldName!"") == field.name>
|
||||
@Version
|
||||
</#if>
|
||||
<#-- 逻辑删除注解 -->
|
||||
<#if (logicDeleteFieldName!"") == field.name>
|
||||
@TableLogic
|
||||
</#if>
|
||||
<#if field.propertyType == "Integer">
|
||||
var ${field.propertyName}: Int? = null
|
||||
<#else>
|
||||
var ${field.propertyName}: ${field.propertyType}? = null
|
||||
</#if>
|
||||
</#list>
|
||||
<#-- ---------- END 字段循环遍历 ---------->
|
||||
|
||||
|
||||
<#if entityColumnConstant>
|
||||
companion object {
|
||||
<#list table.fields as field>
|
||||
|
||||
const val ${field.name.toUpperCase()} : String = "${field.name}"
|
||||
|
||||
</#list>
|
||||
}
|
||||
|
||||
</#if>
|
||||
<#if activeRecord>
|
||||
override fun pkVal(): Serializable {
|
||||
<#if keyPropertyName??>
|
||||
return ${keyPropertyName}
|
||||
<#else>
|
||||
return null
|
||||
</#if>
|
||||
}
|
||||
|
||||
</#if>
|
||||
override fun toString(): String {
|
||||
return "${entity}{" +
|
||||
<#list table.fields as field>
|
||||
<#if field_index==0>
|
||||
"${field.propertyName}=" + ${field.propertyName} +
|
||||
<#else>
|
||||
", ${field.propertyName}=" + ${field.propertyName} +
|
||||
</#if>
|
||||
</#list>
|
||||
"}"
|
||||
}
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
package ${package.Entity};
|
||||
|
||||
#foreach($pkg in ${table.importPackages})
|
||||
import ${pkg};
|
||||
#end
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* $!{table.comment}
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
#if(${table.convert})
|
||||
@TableName("${table.name}")
|
||||
#end
|
||||
#if(${superEntityClass})
|
||||
class ${entity} : ${superEntityClass}#if(${activeRecord})<${entity}>#end() {
|
||||
#elseif(${activeRecord})
|
||||
class ${entity} : Model<${entity}>() {
|
||||
#else
|
||||
class ${entity} : Serializable {
|
||||
#end
|
||||
|
||||
## ---------- BEGIN 字段循环遍历 ----------
|
||||
#foreach($field in ${table.fields})
|
||||
#if(${field.keyFlag})
|
||||
#set($keyPropertyName=${field.propertyName})
|
||||
#end
|
||||
#if("$!field.comment" != "")
|
||||
/**
|
||||
* ${field.comment}
|
||||
*/
|
||||
#end
|
||||
#if(${field.keyFlag})
|
||||
## 主键
|
||||
#if(${field.keyIdentityFlag})
|
||||
@TableId(value = "${field.name}", type = IdType.AUTO)
|
||||
#elseif(!$null.isNull(${idType}) && "$!idType" != "")
|
||||
@TableId(value = "${field.name}", type = IdType.${idType})
|
||||
#elseif(${field.convert})
|
||||
@TableId("${field.name}")
|
||||
#end
|
||||
## 普通字段
|
||||
#elseif(${field.fill})
|
||||
## ----- 存在字段填充设置 -----
|
||||
#if(${field.convert})
|
||||
@TableField(value = "${field.name}", fill = FieldFill.${field.fill})
|
||||
#else
|
||||
@TableField(fill = FieldFill.${field.fill})
|
||||
#end
|
||||
#elseif(${field.convert})
|
||||
@TableField("${field.name}")
|
||||
#end
|
||||
## 乐观锁注解
|
||||
#if(${versionFieldName}==${field.name})
|
||||
@Version
|
||||
#end
|
||||
## 逻辑删除注解
|
||||
#if(${logicDeleteFieldName}==${field.name})
|
||||
@TableLogic
|
||||
#end
|
||||
var ${field.propertyName}: ${field.propertyType}? = null
|
||||
#end
|
||||
## ---------- END 字段循环遍历 ----------
|
||||
|
||||
|
||||
#if(${entityColumnConstant})
|
||||
companion object {
|
||||
#foreach($field in ${table.fields})
|
||||
|
||||
const val ${field.name.toUpperCase()} : String = "${field.name}"
|
||||
|
||||
#end
|
||||
}
|
||||
|
||||
#end
|
||||
#if(${activeRecord})
|
||||
override fun pkVal(): Serializable {
|
||||
#if(${keyPropertyName})
|
||||
return ${keyPropertyName}!!
|
||||
#else
|
||||
return id!!
|
||||
#end
|
||||
}
|
||||
|
||||
#end
|
||||
override fun toString(): String {
|
||||
return "${entity}{" +
|
||||
#foreach($field in ${table.fields})
|
||||
#if($!{foreach.index}==0)
|
||||
"${field.propertyName}=" + ${field.propertyName} +
|
||||
#else
|
||||
", ${field.propertyName}=" + ${field.propertyName} +
|
||||
#end
|
||||
#end
|
||||
"}"
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package ${package.Mapper};
|
||||
|
||||
import ${package.Entity}.${entity};
|
||||
import ${superMapperClassPackage};
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* ${table.comment!} Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
<#if kotlin>
|
||||
interface ${table.mapperName} : ${superMapperClass}<${entity}>
|
||||
<#else>
|
||||
public interface ${table.mapperName} extends ${superMapperClass}<${entity}> {
|
||||
|
||||
}
|
||||
</#if>
|
||||
@@ -1,20 +0,0 @@
|
||||
package ${package.Mapper};
|
||||
|
||||
import ${package.Entity}.${entity};
|
||||
import ${superMapperClassPackage};
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* $!{table.comment} Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
#if(${kotlin})
|
||||
interface ${table.mapperName} : ${superMapperClass}<${entity}>
|
||||
#else
|
||||
public interface ${table.mapperName} extends ${superMapperClass}<${entity}> {
|
||||
|
||||
}
|
||||
#end
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="${package.Mapper}.${table.mapperName}">
|
||||
|
||||
<#if enableCache>
|
||||
<!-- 开启二级缓存 -->
|
||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>
|
||||
|
||||
</#if>
|
||||
<#if baseResultMap>
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="${package.Entity}.${entity}">
|
||||
<#list table.fields as field>
|
||||
<#if field.keyFlag><#--生成主键排在第一位-->
|
||||
<id column="${field.name}" property="${field.propertyName}" />
|
||||
</#if>
|
||||
</#list>
|
||||
<#list table.commonFields as field><#--生成公共字段 -->
|
||||
<result column="${field.name}" property="${field.propertyName}" />
|
||||
</#list>
|
||||
<#list table.fields as field>
|
||||
<#if !field.keyFlag><#--生成普通字段 -->
|
||||
<result column="${field.name}" property="${field.propertyName}" />
|
||||
</#if>
|
||||
</#list>
|
||||
</resultMap>
|
||||
|
||||
</#if>
|
||||
<#if baseColumnList>
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
<#list table.commonFields as field>
|
||||
${field.name},
|
||||
</#list>
|
||||
${table.fieldNames}
|
||||
</sql>
|
||||
|
||||
</#if>
|
||||
</mapper>
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="${package.Mapper}.${table.mapperName}">
|
||||
|
||||
#if(${enableCache})
|
||||
<!-- 开启二级缓存 -->
|
||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>
|
||||
|
||||
#end
|
||||
#if(${baseResultMap})
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="${package.Entity}.${entity}">
|
||||
#foreach($field in ${table.fields})
|
||||
#if(${field.keyFlag})##生成主键排在第一位
|
||||
<id column="${field.name}" property="${field.propertyName}" />
|
||||
#end
|
||||
#end
|
||||
#foreach($field in ${table.commonFields})##生成公共字段
|
||||
<result column="${field.name}" property="${field.propertyName}" />
|
||||
#end
|
||||
#foreach($field in ${table.fields})
|
||||
#if(!${field.keyFlag})##生成普通字段
|
||||
<result column="${field.name}" property="${field.propertyName}" />
|
||||
#end
|
||||
#end
|
||||
</resultMap>
|
||||
|
||||
#end
|
||||
#if(${baseColumnList})
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
#foreach($field in ${table.commonFields})
|
||||
${field.name},
|
||||
#end
|
||||
${table.fieldNames}
|
||||
</sql>
|
||||
|
||||
#end
|
||||
</mapper>
|
||||
@@ -1,20 +0,0 @@
|
||||
package ${package.Service};
|
||||
|
||||
import ${package.Entity}.${entity};
|
||||
import ${superServiceClassPackage};
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* ${table.comment!} 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
<#if kotlin>
|
||||
interface ${table.serviceName} : ${superServiceClass}<${entity}>
|
||||
<#else>
|
||||
public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {
|
||||
|
||||
}
|
||||
</#if>
|
||||
@@ -1,20 +0,0 @@
|
||||
package ${package.Service};
|
||||
|
||||
import ${package.Entity}.${entity};
|
||||
import ${superServiceClassPackage};
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* $!{table.comment} 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
#if(${kotlin})
|
||||
interface ${table.serviceName} : ${superServiceClass}<${entity}>
|
||||
#else
|
||||
public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {
|
||||
|
||||
}
|
||||
#end
|
||||
@@ -1,26 +0,0 @@
|
||||
package ${package.ServiceImpl};
|
||||
|
||||
import ${package.Entity}.${entity};
|
||||
import ${package.Mapper}.${table.mapperName};
|
||||
import ${package.Service}.${table.serviceName};
|
||||
import ${superServiceImplClassPackage};
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* ${table.comment!} 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
@Service
|
||||
<#if kotlin>
|
||||
open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} {
|
||||
|
||||
}
|
||||
<#else>
|
||||
public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} {
|
||||
|
||||
}
|
||||
</#if>
|
||||
@@ -1,26 +0,0 @@
|
||||
package ${package.ServiceImpl};
|
||||
|
||||
import ${package.Entity}.${entity};
|
||||
import ${package.Mapper}.${table.mapperName};
|
||||
import ${package.Service}.${table.serviceName};
|
||||
import ${superServiceImplClassPackage};
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* $!{table.comment} 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author ${author}
|
||||
* @since ${date}
|
||||
*/
|
||||
@Service
|
||||
#if(${kotlin})
|
||||
open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} {
|
||||
|
||||
}
|
||||
#else
|
||||
public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} {
|
||||
|
||||
}
|
||||
#end
|
||||
Reference in New Issue
Block a user