|
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.gis.common.base.exception.BaseRuntimeException;
|
|
|
+import com.gis.common.base.service.IBaseService;
|
|
|
import com.gis.common.constant.ErrorEnum;
|
|
|
import com.gis.common.util.BaseUtil;
|
|
|
import com.gis.common.util.Result;
|
|
@@ -22,7 +23,6 @@ import com.gis.db.service.TableService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -42,6 +42,9 @@ public class TableServiceImpl extends ServiceImpl<TableMapper, TableEntity> impl
|
|
|
@Autowired
|
|
|
FieldService fieldService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ IBaseService baseService;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public void addField(List<FieldEntity> param, String tableName) {
|
|
@@ -68,6 +71,7 @@ public class TableServiceImpl extends ServiceImpl<TableMapper, TableEntity> impl
|
|
|
BaseRuntimeException.isTrue(isExistByName(param.getName()), ErrorEnum.FAILURE_SYS_2010);
|
|
|
TableEntity entity = new TableEntity();
|
|
|
BeanUtils.copyProperties(param, entity);
|
|
|
+ entity.setCreatorId(baseService.getUserId());
|
|
|
this.save(entity);
|
|
|
|
|
|
// 建表
|