feat: 东区缴费分支初始化
This commit is contained in:
+1
-4
@@ -7,7 +7,6 @@ import com.yida.data.common.core.entity.QueryRequest;
|
||||
import com.yida.data.common.core.entity.constant.GeneratorConstant;
|
||||
import com.yida.data.common.core.entity.system.Column;
|
||||
import com.yida.data.common.core.entity.system.GeneratorConfig;
|
||||
import com.yida.data.common.core.entity.system.Table;
|
||||
import com.yida.data.common.core.exception.FebsException;
|
||||
import com.yida.data.common.core.utils.FebsUtil;
|
||||
import com.yida.data.common.core.utils.FileUtil;
|
||||
@@ -25,7 +24,6 @@ import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -89,8 +87,7 @@ public class GeneratorController {
|
||||
|
||||
generatorConfig.setTableName(name1);
|
||||
generatorConfig.setClassName(FebsUtil.underscoreToCamel(className));
|
||||
Table table = generatorService.getTable(GeneratorConstant.DATABASE_TYPE, datasource, name1);
|
||||
generatorConfig.setTableComment(Objects.nonNull(table) ? table.getRemark() : remark);
|
||||
generatorConfig.setTableComment(remark);
|
||||
// 生成代码到临时目录
|
||||
List<Column> columns = generatorService.getColumns(GeneratorConstant.DATABASE_TYPE, datasource, name1);
|
||||
generatorHelper.generateEntityFile(columns, generatorConfig);
|
||||
|
||||
-14
@@ -43,18 +43,4 @@ public interface GeneratorMapper {
|
||||
* @return 数据表列信息
|
||||
*/
|
||||
List<Column> getColumns(@Param("databaseType") String databaseType, @Param("schemaName") String schemaName, @Param("tableName") String tableName);
|
||||
|
||||
/**
|
||||
* 获取单个数据表
|
||||
*
|
||||
* @param databaseType databaseType
|
||||
* @param schemaName schemaName
|
||||
* @param tableName tableName
|
||||
* @return com.yida.data.common.core.entity.system.Table
|
||||
* @author ZYJ
|
||||
* @date 2023/5/19 11:12
|
||||
*/
|
||||
Table getTable(@Param("databaseType") String databaseType,
|
||||
@Param("schemaName") String schemaName,
|
||||
@Param("tableName") String tableName);
|
||||
}
|
||||
|
||||
-11
@@ -41,15 +41,4 @@ public interface GeneratorService {
|
||||
*/
|
||||
List<Column> getColumns(String databaseType, String schemaName, String tableName);
|
||||
|
||||
/**
|
||||
* 获取单个数据表
|
||||
*
|
||||
* @param databaseType databaseType
|
||||
* @param schemaName schemaName
|
||||
* @param tableName tableName
|
||||
* @return com.yida.data.common.core.entity.system.Table
|
||||
* @author ZYJ
|
||||
* @date 2023/5/19 11:18
|
||||
*/
|
||||
Table getTable(String databaseType, String schemaName, String tableName);
|
||||
}
|
||||
|
||||
-5
@@ -41,9 +41,4 @@ public class GeneratorServiceImpl implements GeneratorService {
|
||||
public List<Column> getColumns(String databaseType, String schemaName, String tableName) {
|
||||
return generatorMapper.getColumns(databaseType, schemaName, tableName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Table getTable(String databaseType, String schemaName, String tableName) {
|
||||
return generatorMapper.getTable(databaseType, schemaName, tableName);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -27,6 +27,6 @@ import java.util.List;
|
||||
public class ${className}ServiceImpl extends ServiceImpl
|
||||
<${className}Mapper, ${className}> implements ${className}Service {
|
||||
|
||||
|
||||
private final ${className}Mapper ${className?uncap_first}Mapper;
|
||||
|
||||
}
|
||||
|
||||
@@ -38,21 +38,4 @@
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = #{schemaName} AND TABLE_NAME = #{tableName}
|
||||
</select>
|
||||
|
||||
<!-- 获取单个数据表 -->
|
||||
<select id="getTable" resultType="com.yida.data.common.core.entity.system.Table">
|
||||
SELECT
|
||||
CREATE_TIME createTime,
|
||||
UPDATE_TIME updateTime,
|
||||
TABLE_ROWS dataRows,
|
||||
TABLE_NAME name,
|
||||
TABLE_COMMENT remark
|
||||
FROM
|
||||
information_schema.TABLES
|
||||
WHERE
|
||||
TABLE_SCHEMA = #{schemaName}
|
||||
<if test="tableName != null and tableName != ''">
|
||||
AND TABLE_NAME = #{tableName}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user