优化注释

This commit is contained in:
暮光:城中城
2019-01-06 21:48:07 +08:00
parent c25733b0e1
commit 691462d5e2
3 changed files with 245 additions and 246 deletions

View File

@@ -1,9 +1,10 @@
package com.zyplayer.doc.db.framework.db.bean; package com.zyplayer.doc.db.framework.db.bean;
/** /**
* @Author * 数据库配置信息
* @Date 2018/11/11 * @author 暮光:城中城
**/ * @since 2018年8月8日
*/
public class DbConfigBean { public class DbConfigBean {
private String driverClassName; private String driverClassName;
private String url; private String url;

View File

@@ -1,15 +1,9 @@
package com.zyplayer.doc.db.framework.db.mapper.base; package com.zyplayer.doc.db.framework.db.mapper.base;
import java.util.List; import com.zyplayer.doc.db.framework.db.dto.*;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.zyplayer.doc.db.framework.db.dto.ColumnInfoDto; import java.util.List;
import com.zyplayer.doc.db.framework.db.dto.DatabaseInfoDto;
import com.zyplayer.doc.db.framework.db.dto.QueryTableColumnDescDto;
import com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto;
import com.zyplayer.doc.db.framework.db.dto.TableDescDto;
import com.zyplayer.doc.db.framework.db.dto.TableInfoDto;
/** /**
* 数据库的mapper持有对象接口 * 数据库的mapper持有对象接口
@@ -22,7 +16,7 @@ public interface BaseMapper {
* 获取库列表 * 获取库列表
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月8日 * @since 2018年8月8日
* @return * @return 数据库列表
*/ */
List<DatabaseInfoDto> getDatabaseList(); List<DatabaseInfoDto> getDatabaseList();
@@ -30,8 +24,8 @@ public interface BaseMapper {
* 获取表列表 * 获取表列表
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月8日 * @since 2018年8月8日
* @param dbName * @param dbName 数据库名
* @return * @return 数据库表列表
*/ */
List<TableInfoDto> getTableList(@Param("dbName")String dbName); List<TableInfoDto> getTableList(@Param("dbName")String dbName);
@@ -39,9 +33,9 @@ public interface BaseMapper {
* 获取字段列表 * 获取字段列表
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月8日 * @since 2018年8月8日
* @param dbName * @param dbName 数据库名
* @param tableName * @param tableName 表名
* @return * @return 字段列表
*/ */
List<TableColumnDescDto> getTableColumnList(@Param("dbName") String dbName, @Param("tableName") String tableName); List<TableColumnDescDto> getTableColumnList(@Param("dbName") String dbName, @Param("tableName") String tableName);
@@ -49,8 +43,8 @@ public interface BaseMapper {
* 获取字段注释 * 获取字段注释
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月8日 * @since 2018年8月8日
* @param tableName * @param tableName 表名
* @return * @return 表字段注释
*/ */
List<TableColumnDescDto> getTableColumnDescList(@Param("tableName") String tableName); List<TableColumnDescDto> getTableColumnDescList(@Param("tableName") String tableName);
@@ -58,8 +52,9 @@ public interface BaseMapper {
* 模糊搜索表和字段 * 模糊搜索表和字段
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月8日 * @since 2018年8月8日
* @param searchText * @param dbName 数据库名
* @return * @param searchText 搜索内容
* @return 表和字段信息
*/ */
List<QueryTableColumnDescDto> getTableAndColumnBySearch(@Param("dbName") String dbName, @Param("searchText") String searchText); List<QueryTableColumnDescDto> getTableAndColumnBySearch(@Param("dbName") String dbName, @Param("searchText") String searchText);
@@ -68,7 +63,7 @@ public interface BaseMapper {
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月8日 * @since 2018年8月8日
* @param tableName 可不传,传了只查询指定表的注释 * @param tableName 可不传,传了只查询指定表的注释
* @return * @return 表注释
*/ */
List<TableDescDto> getTableDescList(@Param("tableName") String tableName); List<TableDescDto> getTableDescList(@Param("tableName") String tableName);
@@ -76,8 +71,8 @@ public interface BaseMapper {
* 增加表注释 * 增加表注释
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月8日 * @since 2018年8月8日
* @param tableName * @param tableName 表名
* @param newDesc * @param newDesc 新的注释
*/ */
void updateTableDesc(@Param("dbName") String dbName, @Param("tableName") String tableName, @Param("newDesc") String newDesc); void updateTableDesc(@Param("dbName") String dbName, @Param("tableName") String tableName, @Param("newDesc") String newDesc);
@@ -86,9 +81,11 @@ public interface BaseMapper {
* *
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月8日 * @since 2018年8月8日
* @param tableName * @param dbName 数据库名
* @param columnName * @param tableName 表名
* @param newDesc * @param columnName 字段名
* @param newDesc 新的注释
* @param columnInfo 字段信息
*/ */
void updateTableColumnDesc(@Param("dbName") String dbName, @Param("tableName") String tableName, void updateTableColumnDesc(@Param("dbName") String dbName, @Param("tableName") String tableName,
@Param("columnName") String columnName, @Param("newDesc") String newDesc, @Param("columnName") String columnName, @Param("newDesc") String newDesc,

View File

@@ -1,16 +1,14 @@
package com.zyplayer.doc.db.framework.json; package com.zyplayer.doc.db.framework.json;
import java.io.IOException;
import java.util.Date;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializeConfig; import com.alibaba.fastjson.serializer.SerializeConfig;
import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer; import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Date;
/** /**
* 数据库文档返回数据格式 * 数据库文档返回数据格式
* *
@@ -85,7 +83,8 @@ public class DocDbResponseJson implements ResponseJson {
* *
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月7日 * @since 2018年8月7日
* @return * @param errMsg 提示信息
* @return 对象
*/ */
public static DocDbResponseJson warn(String errMsg) { public static DocDbResponseJson warn(String errMsg) {
return new DocDbResponseJson(300, errMsg); return new DocDbResponseJson(300, errMsg);
@@ -96,7 +95,8 @@ public class DocDbResponseJson implements ResponseJson {
* *
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月7日 * @since 2018年8月7日
* @return * @param errMsg 错误信息
* @return 对象
*/ */
public static DocDbResponseJson error(String errMsg) { public static DocDbResponseJson error(String errMsg) {
return new DocDbResponseJson(500, errMsg); return new DocDbResponseJson(500, errMsg);
@@ -107,7 +107,7 @@ public class DocDbResponseJson implements ResponseJson {
* *
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月7日 * @since 2018年8月7日
* @return * @return 对象
*/ */
public static DocDbResponseJson ok() { public static DocDbResponseJson ok() {
return new DocDbResponseJson(); return new DocDbResponseJson();
@@ -118,7 +118,8 @@ public class DocDbResponseJson implements ResponseJson {
* *
* @author 暮光:城中城 * @author 暮光:城中城
* @since 2018年8月7日 * @since 2018年8月7日
* @return * @param data 数据
* @return 对象
*/ */
public static DocDbResponseJson ok(Object data) { public static DocDbResponseJson ok(Object data) {
return new DocDbResponseJson(data); return new DocDbResponseJson(data);