diff --git a/README.md b/README.md index f9ac1a99..f2b613bc 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ zyplayer-doc-swagger 原[swagger-mg-ui](https://gitee.com/zyplayer/swagger-mg-ui #### 打开方式 -1. 创建数据库:[zyplayer-doc-manage.sql](https://gitee.com/zyplayer/zyplayer-doc/blob/master/zyplayer-doc-manage/src/main/resources/sql/zyplayer-doc-manage.sql) +1. 创建数据库:[zyplayer_doc_manage.sql](https://gitee.com/zyplayer/zyplayer-doc/blob/master/zyplayer-doc-manage/src/main/resources/sql/zyplayer_doc_manage.sql) 2. 修改zyplayer-doc-manage项目的application.yml配置文件里面的数据库账号密码 diff --git a/zyplayer-doc-core/pom.xml b/zyplayer-doc-core/pom.xml index e58558fd..c0f1ef04 100644 --- a/zyplayer-doc-core/pom.xml +++ b/zyplayer-doc-core/pom.xml @@ -1,30 +1,38 @@ - + 4.0.0 com.zyplayer zyplayer-doc 1.0.0 - + com.zyplayer zyplayer-doc-core 1.0.0 zyplayer-doc-core - + http://maven.apache.org UTF-8 UTF-8 1.8 + - junit - junit - 3.8.1 - test + org.mybatis + mybatis-spring + 1.3.2 + compile + + + org.mybatis + mybatis + 3.4.6 + compile diff --git a/zyplayer-doc-db/src/main/java/com/zyplayer/doc/db/framework/configuration/ApplicationListenerBean.java b/zyplayer-doc-db/src/main/java/com/zyplayer/doc/db/framework/configuration/ApplicationListenerBean.java index 0b3e7199..5e6eb81f 100644 --- a/zyplayer-doc-db/src/main/java/com/zyplayer/doc/db/framework/configuration/ApplicationListenerBean.java +++ b/zyplayer-doc-db/src/main/java/com/zyplayer/doc/db/framework/configuration/ApplicationListenerBean.java @@ -9,6 +9,8 @@ import java.util.concurrent.atomic.AtomicInteger; import javax.sql.DataSource; import com.zyplayer.doc.db.framework.db.bean.DbConfigBean; +import com.zyplayer.doc.db.framework.db.interceptor.SqlLogInterceptor; +import org.apache.ibatis.plugin.Interceptor; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.SqlSessionTemplate; import org.springframework.beans.factory.annotation.Autowired; @@ -26,12 +28,12 @@ import com.zyplayer.doc.db.framework.db.bean.DatabaseRegistrationBean; @Component public class ApplicationListenerBean implements ApplicationListener { - + @Autowired DatabaseRegistrationBean databaseRegistrationBean; private volatile static boolean IS_INIT = false; - + @Override public void onApplicationEvent(ContextRefreshedEvent event) { if (databaseRegistrationBean == null || IS_INIT) { @@ -40,6 +42,7 @@ public class ApplicationListenerBean implements ApplicationListener databaseFactoryBeanList = new LinkedList<>(); for (DbConfigBean dbConfigBean : databaseRegistrationBean.getDbConfigList()) { try { @@ -99,6 +102,7 @@ public class ApplicationListenerBean implements ApplicationListener 1) { + parameter = invocation.getArgs()[1]; + } + BoundSql boundSql = mappedStatement.getBoundSql(parameter); + Configuration configuration = mappedStatement.getConfiguration(); + // 获取sql语句 + String sql = getSqlString(configuration, boundSql); + LOGGER.info(sql); + // 执行结果 + return invocation.proceed(); + } + + @Override + public Object plugin(Object target) { + if (target instanceof Executor) { + return Plugin.wrap(target, this); + } else { + return target; + } + } + + @Override + public void setProperties(Properties properties) { + } + + private String getParameterValue(Object obj) { + String value = null; + if (obj instanceof String) { + value = "'" + obj.toString() + "'"; + } else if (obj instanceof Date) { + DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.CHINA); + value = "'" + formatter.format(obj) + "'"; + //System.out.println(value); + } else { + if (obj != null) { + value = obj.toString(); + } else { + value = "'null'"; + } + } + return value; + } + + public String getSqlString(Configuration configuration, BoundSql boundSql) { + Object parameterObject = boundSql.getParameterObject(); + List parameterMappings = boundSql.getParameterMappings(); + StringBuilder sqlSb = new StringBuilder(boundSql.getSql().replaceAll("[\\s]+", " ")); + int fromIndex = 0; + if (parameterMappings.size() > 0 && parameterObject != null) { + TypeHandlerRegistry typeHandlerRegistry = configuration.getTypeHandlerRegistry(); + if (typeHandlerRegistry.hasTypeHandler(parameterObject.getClass())) { + //sqlSb = sqlSb.replaceFirst("\\?", getParameterValue(parameterObject)); + fromIndex = replacePlaceholder(sqlSb, fromIndex, getParameterValue(parameterObject)); + } else { + MetaObject metaObject = configuration.newMetaObject(parameterObject); + for (ParameterMapping parameterMapping : parameterMappings) { + String propertyName = parameterMapping.getProperty(); + if (metaObject.hasGetter(propertyName)) { + Object obj = metaObject.getValue(propertyName); + //sqlSb = sqlSb.replaceFirst("\\?", getParameterValue(obj)); + fromIndex = replacePlaceholder(sqlSb, fromIndex, getParameterValue(obj)); + } else if (boundSql.hasAdditionalParameter(propertyName)) { + Object obj = boundSql.getAdditionalParameter(propertyName); + //sqlSb = sqlSb.replaceFirst("\\?", getParameterValue(obj)); + fromIndex = replacePlaceholder(sqlSb, fromIndex, getParameterValue(obj)); + } + } + } + } + return sqlSb.toString(); + } + + /** + * 替换?占位符 + * @author 暮光:城中城 + * @since 2018年10月27日 + * @param sql + * @param fromIndex + * @param replaceStr + * @return + */ + private int replacePlaceholder(StringBuilder sql, int fromIndex, String replaceStr) { + int index = sql.indexOf("?", fromIndex); + if (index >= 0) { + sql.replace(index, index + 1, replaceStr); + } + return index + replaceStr.length(); + } +} + diff --git a/zyplayer-doc-db/src/main/java/com/zyplayer/doc/db/framework/db/mapper/mysql/MysqlBaseMapper.xml b/zyplayer-doc-db/src/main/java/com/zyplayer/doc/db/framework/db/mapper/mysql/MysqlBaseMapper.xml index 0ecc3cf7..e9af3acb 100644 --- a/zyplayer-doc-db/src/main/java/com/zyplayer/doc/db/framework/db/mapper/mysql/MysqlBaseMapper.xml +++ b/zyplayer-doc-db/src/main/java/com/zyplayer/doc/db/framework/db/mapper/mysql/MysqlBaseMapper.xml @@ -1,67 +1,68 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - alter table ${dbName}.${tableName} comment #{newDesc} - - - - alter table ${dbName}.${tableName} modify column ${columnName} - ${columnInfo.columnType} ${columnInfo.isNullable} ${columnInfo.columnDefault} ${columnInfo.extra} - comment #{newDesc} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + alter table ${dbName}.${tableName} comment #{newDesc} + + + + alter table ${dbName}.${tableName} modify column ${columnName} + ${columnInfo.columnType} ${columnInfo.isNullable} ${columnInfo.columnDefault} ${columnInfo.extra} + comment #{newDesc} - + diff --git a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/LoginController.java b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/LoginController.java index 67b8f5d4..bc67569b 100644 --- a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/LoginController.java +++ b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/web/manage/LoginController.java @@ -1,58 +1,66 @@ -package com.zyplayer.doc.manage.web.manage; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.lang.StringUtils; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.WebAttributes; -import org.springframework.security.web.savedrequest.HttpSessionRequestCache; -import org.springframework.security.web.savedrequest.RequestCache; -import org.springframework.security.web.savedrequest.SavedRequest; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.ModelAndView; - -import com.zyplayer.doc.core.json.DocResponseJson; - -@RestController -public class LoginController { - private RequestCache requestCache = new HttpSessionRequestCache(); - - @GetMapping(value = "/login") - public ModelAndView loginPage(HttpServletRequest request) { - return new ModelAndView("/statics/manage/login.html"); - } - - /** - * 如果是访问受限页面后,跳转到登录页的,则在targetUrl保存之前受限页面的路径,供页面调用 - * - * @param request - * @param response - * @return - */ - @GetMapping(value = "/login/success") - public DocResponseJson loginSuccess(HttpServletRequest request, HttpServletResponse response) { - SavedRequest savedRequest = requestCache.getRequest(request, response); - String targetUrl = null; - if (savedRequest != null) { - targetUrl = savedRequest.getRedirectUrl(); - } - if (StringUtils.isBlank(targetUrl)) { - targetUrl = "/"; - } - return DocResponseJson.ok(targetUrl); - } - - /** - * 获取异常信息返回给页面 - * @param request - * @param response - * @return - */ - @GetMapping(value = "/login/failure") - public DocResponseJson loginFailure(HttpServletRequest request, HttpServletResponse response) { - AuthenticationException ae = (AuthenticationException) request.getSession().getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION); - return DocResponseJson.warn(ae.getMessage()); - } +package com.zyplayer.doc.manage.web.manage; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.WebAttributes; +import org.springframework.security.web.savedrequest.HttpSessionRequestCache; +import org.springframework.security.web.savedrequest.RequestCache; +import org.springframework.security.web.savedrequest.SavedRequest; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.ModelAndView; + +import com.zyplayer.doc.core.json.DocResponseJson; + +@RestController +public class LoginController { + private RequestCache requestCache = new HttpSessionRequestCache(); + + @GetMapping(value = "/login") + public ModelAndView loginPage(HttpServletRequest request) { + return new ModelAndView("/statics/manage/login.html"); + } + +// @PostMapping(value = "/logout") +// public DocResponseJson logout(HttpServletRequest request) { +// +// return DocResponseJson.ok(); +// } + + /** + * 如果是访问受限页面后,跳转到登录页的,则在targetUrl保存之前受限页面的路径,供页面调用 + * + * @param request + * @param response + * @return + */ + @GetMapping(value = "/login/success") + public DocResponseJson loginSuccess(HttpServletRequest request, HttpServletResponse response) { + SavedRequest savedRequest = requestCache.getRequest(request, response); + String targetUrl = null; + if (savedRequest != null) { + targetUrl = savedRequest.getRedirectUrl(); + } + if (StringUtils.isBlank(targetUrl)) { + targetUrl = "/"; + } + return DocResponseJson.ok(targetUrl); + } + + /** + * 获取异常信息返回给页面 + * + * @param request + * @param response + * @return + */ + @GetMapping(value = "/login/failure") + public DocResponseJson loginFailure(HttpServletRequest request, HttpServletResponse response) { + AuthenticationException ae = (AuthenticationException) request.getSession().getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION); + return DocResponseJson.warn(ae.getMessage()); + } } \ No newline at end of file diff --git a/zyplayer-doc-manage/src/main/resources/application.yml b/zyplayer-doc-manage/src/main/resources/application.yml index b1a9718e..9d35216c 100644 --- a/zyplayer-doc-manage/src/main/resources/application.yml +++ b/zyplayer-doc-manage/src/main/resources/application.yml @@ -27,24 +27,24 @@ server: zyplayer: doc: - # zyplayer-doc-manage管理端的数据库配置 + # zyplayer_doc_manage管理端的数据库配置 manage: datasource: driverClassName: com.mysql.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/zyplayer-doc-manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false + url: jdbc:mysql://127.0.0.1:3306/zyplayer_doc_manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false username: root password: root # 数据库文档相关 - # 打开/zyplayer-doc-manage/doc-db.html即可看到这里配置的数据库的文档 + # 打开/zyplayer_doc_manage/doc-db.html即可看到这里配置的数据库的文档 db: dbConfigList: - driverClassName: com.mysql.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/zyplayer-doc-manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false + url: jdbc:mysql://127.0.0.1:3306/zyplayer_doc_manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false username: root password: root # 多个数据源直接这样累加 # - driverClassName: com.mysql.jdbc.Driver -# url: jdbc:mysql://127.0.0.1:3306/zyplayer-doc-manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false +# url: jdbc:mysql://127.0.0.1:3306/zyplayer_doc_manage?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false # username: root # password: root diff --git a/zyplayer-doc-manage/src/main/resources/sql/zyplayer-doc-manage.sql b/zyplayer-doc-manage/src/main/resources/sql/zyplayer_doc_manage.sql similarity index 78% rename from zyplayer-doc-manage/src/main/resources/sql/zyplayer-doc-manage.sql rename to zyplayer-doc-manage/src/main/resources/sql/zyplayer_doc_manage.sql index fe91f600..da35181f 100644 --- a/zyplayer-doc-manage/src/main/resources/sql/zyplayer-doc-manage.sql +++ b/zyplayer-doc-manage/src/main/resources/sql/zyplayer_doc_manage.sql @@ -5,13 +5,13 @@ Source Server Type : MySQL Source Server Version : 80012 Source Host : localhost:3306 - Source Schema : zyplayer-doc-manage + Source Schema : zyplayer_doc_manage Target Server Type : MySQL Target Server Version : 80012 File Encoding : 65001 - Date: 15/12/2018 22:34:43 + Date: 22/12/2018 22:58:00 */ SET NAMES utf8mb4; @@ -25,11 +25,11 @@ CREATE TABLE `auth_info` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增ID', `auth_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限名', `auth_desc` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限说明', - `can_edit` tinyint(4) NULL DEFAULT NULL COMMENT '是否可编辑 0=否 1=是', + `can_edit` tinyint(4) NULL DEFAULT 1 COMMENT '是否可编辑 0=否 1=是', `create_uid` bigint(20) NULL DEFAULT NULL COMMENT '创建人用户ID', `creation_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '权限信息表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of auth_info @@ -53,19 +53,11 @@ CREATE TABLE `user_auth` ( `creation_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 28 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户权限表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of user_auth -- ---------------------------- -INSERT INTO `user_auth` VALUES (1, 1, 1, 1, 1, 1, '2018-12-01 11:41:13', '2018-12-15 22:19:59'); -INSERT INTO `user_auth` VALUES (2, 1, 2, 1, 1, 1, '2018-12-15 19:51:13', '2018-12-15 22:19:59'); -INSERT INTO `user_auth` VALUES (3, 1, 3, 1, 1, 1, '2018-12-15 19:51:28', '2018-12-15 22:19:59'); -INSERT INTO `user_auth` VALUES (4, 1, 4, 1, 1, 1, '2018-12-15 19:51:40', '2018-12-15 22:19:59'); -INSERT INTO `user_auth` VALUES (5, 1, 1, 1, NULL, 0, '2018-12-15 22:19:59', NULL); -INSERT INTO `user_auth` VALUES (6, 1, 2, 1, NULL, 0, '2018-12-15 22:19:59', NULL); -INSERT INTO `user_auth` VALUES (7, 1, 3, 1, NULL, 0, '2018-12-15 22:19:59', NULL); -INSERT INTO `user_auth` VALUES (8, 1, 4, 1, NULL, 0, '2018-12-15 22:19:59', NULL); INSERT INTO `user_auth` VALUES (9, 2, 1, 1, NULL, 0, '2018-12-15 22:19:59', NULL); INSERT INTO `user_auth` VALUES (10, 2, 2, 1, NULL, 0, '2018-12-15 22:19:59', NULL); INSERT INTO `user_auth` VALUES (11, 2, 3, 1, NULL, 0, '2018-12-15 22:19:59', NULL); @@ -74,6 +66,10 @@ INSERT INTO `user_auth` VALUES (13, 3, 1, 1, NULL, 0, '2018-12-15 22:19:59', NUL INSERT INTO `user_auth` VALUES (14, 3, 2, 1, NULL, 0, '2018-12-15 22:19:59', NULL); INSERT INTO `user_auth` VALUES (15, 3, 3, 1, NULL, 0, '2018-12-15 22:19:59', NULL); INSERT INTO `user_auth` VALUES (16, 3, 4, 1, NULL, 0, '2018-12-15 22:19:59', NULL); +INSERT INTO `user_auth` VALUES (24, 1, 1, 1, NULL, 0, '2018-12-16 21:41:01', NULL); +INSERT INTO `user_auth` VALUES (25, 1, 2, 1, NULL, 0, '2018-12-16 21:41:01', NULL); +INSERT INTO `user_auth` VALUES (26, 1, 3, 1, NULL, 0, '2018-12-16 21:41:01', NULL); +INSERT INTO `user_auth` VALUES (27, 1, 4, 1, NULL, 0, '2018-12-16 21:41:01', NULL); -- ---------------------------- -- Table structure for user_info @@ -92,7 +88,7 @@ CREATE TABLE `user_info` ( `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `idx_userNo`(`user_no`) USING BTREE COMMENT '登录用户名' -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户信息表' ROW_FORMAT = Compact; -- ---------------------------- -- Records of user_info @@ -106,17 +102,16 @@ INSERT INTO `user_info` VALUES (3, '2', NULL, '11', '11', NULL, 0, '2018-12-15 2 -- ---------------------------- DROP TABLE IF EXISTS `zyplayer_storage`; CREATE TABLE `zyplayer_storage` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `doc_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `doc_value` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `creation_time` datetime(0) NULL DEFAULT NULL, - `update_time` datetime(0) NULL DEFAULT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键自增ID', + `doc_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数名字', + `doc_value` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数值', + `creation_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `key`(`doc_key`) USING BTREE COMMENT 'key唯一索引' -) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact; +) ENGINE = InnoDB AUTO_INCREMENT = 27 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '存储网页上相关的数据' ROW_FORMAT = Compact; -- ---------------------------- -- Records of zyplayer_storage -- ---------------------------- - SET FOREIGN_KEY_CHECKS = 1; diff --git a/zyplayer-doc-manage/src/main/webapp/statics/manage/home.html b/zyplayer-doc-manage/src/main/webapp/statics/manage/home.html index c67fead9..c33d340e 100644 --- a/zyplayer-doc-manage/src/main/webapp/statics/manage/home.html +++ b/zyplayer-doc-manage/src/main/webapp/statics/manage/home.html @@ -47,6 +47,13 @@
  • springfox-swagger-ui
  • +
  • + 信息管理 + +
  • @@ -115,6 +122,14 @@ $("#showLeftContent").hide(); changeContentWidth(360); }); + /** + * 退出登录 + */ + $(".user-signout").click(function () { + post(ctx + "logout", {}, function () {}, function () {}, function () { + location.reload(); + }); + }); /** * 页面导航切换 */ diff --git a/zyplayer-doc-manage/src/main/webapp/statics/manage/user/operation-log.html b/zyplayer-doc-manage/src/main/webapp/statics/manage/user/operation-log.html new file mode 100644 index 00000000..82fcf8a5 --- /dev/null +++ b/zyplayer-doc-manage/src/main/webapp/statics/manage/user/operation-log.html @@ -0,0 +1,40 @@ + + + + + + 操作日志 + + + + +
    + 操作日志,暂未开发 +
    + + + + + + + + + + + + + + + diff --git a/zyplayer-doc-swagger/src/main/resources/document.html b/zyplayer-doc-swagger/src/main/resources/document.html index 87c5eafb..a8f4f108 100644 --- a/zyplayer-doc-swagger/src/main/resources/document.html +++ b/zyplayer-doc-swagger/src/main/resources/document.html @@ -113,7 +113,6 @@
    @@ -203,7 +202,7 @@

    请求头 - +

    diff --git a/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/css/mg-ui.css b/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/css/mg-ui.css index e9879f91..6c0d9fa2 100644 --- a/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/css/mg-ui.css +++ b/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/css/mg-ui.css @@ -12,7 +12,9 @@ ul{list-style: none;list-style-type: none;} .tree-menu li li li li li li li li li li a{padding-left: 188px;} .table td, .table th {vertical-align: middle;} #tabDocInfo{position: absolute; bottom: 0;top: 60px;overflow-y: auto; right: 0; left: 10px;} -#tabOnlineDebug .param-response-box{position: absolute; bottom: 0;top: 100px;overflow-y: auto; right: 0; left: 10px;} +#tabOnlineDebug .param-response-box{position: absolute; bottom: 0;top: 100px;overflow-y: auto; right: 0; left: 10px;padding-right: 10px;} +#tabOnlineDebug .panel{margin-bottom: 10px;} +#requestParamForm .nav > li > a{padding: 6px 15px;} .local-storage{display: none;} @@ -20,6 +22,7 @@ ul{list-style: none;list-style-type: none;} .label{font-size: 100%;} .label-warning {background-color: #f9f5ee; color: #f1a325;} label{font-weight: normal;} +.overwrite-label{margin-bottom: 0;} .nav.gray{background-color: #f1f1f1;margin-bottom: 10px;} @@ -83,11 +86,12 @@ label{font-weight: normal;} .post-url-box .send-request .hide{display: none;} .param-box{} -.param-box .panel-collapse{padding: 10px;} +.param-box .panel-collapse{padding: 10px 10px 0 10px;} .param-box .nav{background-color: #f1f1f1;} +.param-box .table{margin-bottom: 0;} /* .param-box .nav > li > *{padding: 8px 25px;} */ .param-box .nav > li > span{position: relative; display: block;background-color: #ccc;padding: 9px 25px;} -.param-box .nav > .form-to-url{position: relative; display: block;padding: 10px 0 0 25px;} +.param-box .nav > .form-to-url{position: relative; display: block;padding: 8px 0 0 25px;} .param-box .nav > .form-to-url label{margin: 0;} .param-box .nav > .form-to-url input{margin: 0;} .param-box .tab-content .tab-param-pane{padding: 10px 10px 0 10px;} @@ -98,10 +102,10 @@ label{font-weight: normal;} .param-box .param-table tbody td:nth-child(3) i{cursor: pointer;color: #ccc;} .param-box .param-table tbody td:nth-child(3) i:hover{color: #888;} .param-box .param-table tbody tr.base td:last-child i{display: none;} -#bulkEditHeaderCheck{margin-left: 10px;} +#bulkEditHeaderCheck{margin: 0 0 0 10px;} #bulkEditHeader,#bulkEditForm{display: none;} -.response-box{margin-top: 20px;} +.response-box{margin-top: 10px;} .response-box .nav > li > *{padding: 8px 25px;} .response-box .nav > li span{position: relative; display: block;padding: 9px 25px;} .response-box .nav > li.info span{background-color: #ccc;} @@ -113,7 +117,7 @@ label{font-weight: normal;} #responseBodyJsonIframe{width: 100%;height: 300px;border: 0;} /* S-模拟请求 */ -#tabSimulationResult{padding: 10px 0;} +#tabSimulationResult{padding: 0 10px 0 0;position: absolute; bottom: 0;top: 60px;overflow-y: auto; right: 0; left: 10px;} /* E-模拟请求 */ /* S-JSON展示的样式 */