parent
bbabffe191
commit
682d8b0099
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -78,10 +78,8 @@ public class FlwDefinitionServiceImpl implements IFlwDefinitionService {
|
||||
LambdaQueryWrapper<FlowDefinition> wrapper = buildQueryWrapper(flowDefinition);
|
||||
wrapper.eq(FlowDefinition::getIsPublish, PublishStatus.PUBLISHED.getKey());
|
||||
Page<FlowDefinition> page = flowDefinitionMapper.selectPage(pageQuery.build(), wrapper);
|
||||
TableDataInfo<FlowDefinitionVo> build = TableDataInfo.build();
|
||||
build.setRows(BeanUtil.copyToList(page.getRecords(), FlowDefinitionVo.class));
|
||||
build.setTotal(page.getTotal());
|
||||
return build;
|
||||
List<FlowDefinitionVo> list = BeanUtil.copyToList(page.getRecords(), FlowDefinitionVo.class);
|
||||
return new TableDataInfo<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -96,10 +94,8 @@ public class FlwDefinitionServiceImpl implements IFlwDefinitionService {
|
||||
LambdaQueryWrapper<FlowDefinition> wrapper = buildQueryWrapper(flowDefinition);
|
||||
wrapper.in(FlowDefinition::getIsPublish, Arrays.asList(PublishStatus.UNPUBLISHED.getKey(), PublishStatus.EXPIRED.getKey()));
|
||||
Page<FlowDefinition> page = flowDefinitionMapper.selectPage(pageQuery.build(), wrapper);
|
||||
TableDataInfo<FlowDefinitionVo> build = TableDataInfo.build();
|
||||
build.setRows(BeanUtil.copyToList(page.getRecords(), FlowDefinitionVo.class));
|
||||
build.setTotal(page.getTotal());
|
||||
return build;
|
||||
List<FlowDefinitionVo> list = BeanUtil.copyToList(page.getRecords(), FlowDefinitionVo.class);
|
||||
return new TableDataInfo<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<FlowDefinition> buildQueryWrapper(FlowDefinition flowDefinition) {
|
||||
|
Loading…
Reference in New Issue
Block a user