Commit d91caaef authored by 陈祥烨's avatar 陈祥烨

代码优化

parent 17d65ad5
package com.yeejoin.amos.api.tool.face.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.api.tool.face.model.DataBaseModel;
import com.yeejoin.amos.api.tool.face.model.RelationModel;
import com.yeejoin.amos.api.tool.face.model.RelationTreeModel;
import com.yeejoin.amos.api.tool.face.orm.dao.DataBaseMapper;
import com.yeejoin.amos.api.tool.face.orm.dao.RelationMapper;
import com.yeejoin.amos.api.tool.face.orm.entity.DataBase;
import com.yeejoin.amos.api.tool.face.orm.entity.Relation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -19,6 +23,8 @@ public class RelationService extends BaseService<RelationModel, Relation, Relati
@Autowired
DataBaseService dataBaseService;
@Autowired
DataBaseMapper dataBaseMapper;
/**
......@@ -67,6 +73,9 @@ public class RelationService extends BaseService<RelationModel, Relation, Relati
* 获取关系表转化为map
*/
public List<HashMap<String, String>> queryRelation(Connection connection) throws SQLException {
QueryWrapper<DataBase> wrapper = new QueryWrapper<>();
wrapper.eq("dbName", "amos_tool_library");
DataBase entity = dataBaseMapper.selectOne(wrapper);
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery("SELECT * FROM relation ;");
ResultSetMetaData data = resultSet.getMetaData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment