|
|
|
|
@ -3,21 +3,21 @@ package org.dromara.generator.controller;
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
|
|
import cn.hutool.core.io.IoUtil;
|
|
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.dromara.common.core.domain.R;
|
|
|
|
|
import org.dromara.common.mybatis.helper.DataBaseHelper;
|
|
|
|
|
import org.dromara.common.web.core.BaseController;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
|
|
import org.dromara.common.log.annotation.Log;
|
|
|
|
|
import org.dromara.common.log.enums.BusinessType;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
|
|
import org.dromara.common.mybatis.helper.DataBaseHelper;
|
|
|
|
|
import org.dromara.common.web.core.BaseController;
|
|
|
|
|
import org.dromara.generator.domain.GenTable;
|
|
|
|
|
import org.dromara.generator.domain.GenTableColumn;
|
|
|
|
|
import org.dromara.generator.service.IGenTableService;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@ -80,11 +80,8 @@ public class GenController extends BaseController {
|
|
|
|
|
@SaCheckPermission("tool:gen:list")
|
|
|
|
|
@GetMapping(value = "/column/{tableId}")
|
|
|
|
|
public TableDataInfo<GenTableColumn> columnList(@PathVariable("tableId") Long tableId) {
|
|
|
|
|
TableDataInfo<GenTableColumn> dataInfo = new TableDataInfo<>();
|
|
|
|
|
List<GenTableColumn> list = genTableService.selectGenTableColumnListByTableId(tableId);
|
|
|
|
|
dataInfo.setRows(list);
|
|
|
|
|
dataInfo.setTotal(list.size());
|
|
|
|
|
return dataInfo;
|
|
|
|
|
return TableDataInfo.build(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|