Compare commits

..

No commits in common. '35db5e82827730685b87a2a26a756b33a98f0370' and 'a7c2c3bc82bed52a63429639c09f12083c00fb0b' have entirely different histories.

  1. 10
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  2. 471
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java
  3. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java
  4. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexVoMapper.java
  5. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml
  6. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexVoMapper.xml
  7. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/ITablexVoService.java
  8. 27
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/ITablexVoServiceImpl.java
  9. 90
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vo/TablexVo.java
  10. 4
      jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml
  11. 4
      jeecg-boot/jeecg-boot-module-system/src/main/resources/application-prod.yml
  12. 2
      jeecg-boot/jeecg-boot-module-system/src/main/resources/application-test.yml
  13. 2
      package-lock.json

@ -73,9 +73,7 @@
<a-button type="primary" icon="import">导入模块</a-button> <a-button type="primary" icon="import">导入模块</a-button>
<a-button type="primary" icon="import">导入功能</a-button> <a-button type="primary" icon="import">导入功能</a-button>
<a-button type="primary" icon="import">导入规则</a-button> <a-button type="primary" icon="import">导入规则</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="tablexImportExcelUrl" @change="handleImportExcel"> <a-button type="primary" icon="import">导入实体</a-button>
<a-button type="primary" icon="import">导入实体</a-button>
</a-upload>
<a-button type="primary" icon="import">导入字段</a-button> <a-button type="primary" icon="import">导入字段</a-button>
<a-button @click="fanhui" type="primary" icon="rollback">返回</a-button> <a-button @click="fanhui" type="primary" icon="rollback">返回</a-button>
@ -395,7 +393,6 @@ export default {
deleteBatch: "/modulex/modulex/deleteBatch", deleteBatch: "/modulex/modulex/deleteBatch",
exportXlsUrl: "/modulex/modulex/exportXls", exportXlsUrl: "/modulex/modulex/exportXls",
importExcelUrl: "modulex/modulex/importExcel", importExcelUrl: "modulex/modulex/importExcel",
tablexImportExcelUrl: "tablex/tablex/importExcel",
}, },
dictOptions: {}, dictOptions: {},
@ -421,10 +418,7 @@ export default {
// columnsdataIndex // columnsdataIndex
checkColumn: function () { checkColumn: function () {
return this.columns.map(item => item.title) return this.columns.map(item => item.title)
}, }
tablexImportExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.tablexImportExcelUrl}`;
},
}, },
methods: { methods: {
// //

@ -8,17 +8,9 @@ import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.models.auth.In; import io.swagger.models.auth.In;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.fieldx.controller.FieldxController; import org.jeecg.modules.fieldx.controller.FieldxController;
import org.jeecg.modules.fieldx.entity.Fieldx; import org.jeecg.modules.fieldx.entity.Fieldx;
@ -33,8 +25,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.tablex.service.ITablexVoService;
import org.jeecg.modules.tablex.vo.TablexVo;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ExportParams;
@ -62,300 +52,185 @@ import org.jeecg.common.aspect.annotation.AutoLog;
@RequestMapping("/tablex/tablex") @RequestMapping("/tablex/tablex")
@Slf4j @Slf4j
public class TablexController extends JeecgController<Tablex, ITablexService> { public class TablexController extends JeecgController<Tablex, ITablexService> {
@Autowired @Autowired
private ITablexService tablexService; private ITablexService tablexService;
@Autowired @Autowired
private IModulexService modulexService; private IModulexService modulexService;
@Autowired @Autowired
private IFieldxService fieldxService; private IFieldxService fieldxService;
@Autowired @Autowired
private FieldxController fieldxController; private FieldxController fieldxController;
@Autowired /**
private ITablexVoService tablexVoService; * 分页列表查询
*
/** * @param tablex
* 分页列表查询 * @param pageNo
* * @param pageSize
* @param tablex * @param req
* @param pageNo * @return
* @param pageSize */
* @param req @AutoLog(value = "实体表-分页列表查询")
* @return @ApiOperation(value="实体表-分页列表查询", notes="实体表-分页列表查询")
*/ @GetMapping(value = "/list")
@AutoLog(value = "实体表-分页列表查询") public Result<?> queryPageList(Tablex tablex,
@ApiOperation(value = "实体表-分页列表查询", notes = "实体表-分页列表查询") @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@GetMapping(value = "/list") @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
public Result<?> queryPageList(Tablex tablex, HttpServletRequest req) {
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, QueryWrapper<Tablex> queryWrapper = QueryGenerator.initQueryWrapper(tablex, req.getParameterMap());
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, Page<Tablex> page = new Page<Tablex>(pageNo, pageSize);
HttpServletRequest req) { IPage<Tablex> pageList = tablexService.page(page, queryWrapper);
QueryWrapper<Tablex> queryWrapper = QueryGenerator.initQueryWrapper(tablex, req.getParameterMap()); return Result.OK(pageList);
Page<Tablex> page = new Page<Tablex>(pageNo, pageSize); }
IPage<Tablex> pageList = tablexService.page(page, queryWrapper); @AutoLog(value = "实体管理-通过模块查询实体")
return Result.OK(pageList); @ApiOperation(value="实体管理-通过模块查询实体", notes="实体管理-通过模块查询实体")
} @GetMapping(value = "/getTableByModuleId")
public Result<?> getTableByModuleId(@RequestParam(name="moduleId",required=true) String moduleId){
/** if (moduleId!=null){
* 添加 List<Tablex> tablexList = tablexService.list(new QueryWrapper<Tablex>().eq("module_id", moduleId));
* ArrayList<HashMap> hashMaps = new ArrayList<>();
* @param tablex for (Tablex tablex:tablexList){
* @return HashMap<Object, Object> hashMap = new HashMap<>();
*/ hashMap.put("text",tablex.getTableName());
@AutoLog(value = "实体表-添加") hashMap.put("value",tablex.getId());
@ApiOperation(value = "实体表-添加", notes = "实体表-添加") hashMaps.add(hashMap);
@PostMapping(value = "/add") }
public Result<?> add(@RequestBody Tablex tablex) { return Result.OK(hashMaps);
List<Tablex> tablexList = tablexService.list(); }else return Result.error("未找到数据,请重试");
for (Tablex tablex1 : tablexList) {
if (tablex1.getModuleId().equals(tablex.getModuleId())) {
return Result.error("该模块已有实体,添加失败");
}
}
if (tablex.getModuleId() != null) {
Modulex modulex = modulexService.getById(tablex.getModuleId());
tablex.setTableName(modulex.getModuleName());
tablex.setTableEnName(modulex.getModuleEnName());
}
tablex.setVerison(1);
tablex.setTableStructure("CREATE TABLE '" + tablex.getTableEnName() + "' ();");
tablexService.save(tablex);
System.err.println(tablex.toString());
modulexService.setmodule(tablex.getId(), tablex.getModuleId());
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param tablex
* @return
*/
@AutoLog(value = "实体表-编辑")
@ApiOperation(value = "实体表-编辑", notes = "实体表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Tablex tablex) {
tablex.setVerison(tablex.getVerison() + 1);
List<Tablex> tablexList = tablexService.list();
for (Tablex tablex1 : tablexList) {
if (tablex1.getModuleId().equals(tablex.getModuleId())) {
return Result.error("该模块已有实体,编辑失败");
}
}
if (tablex.getModuleId() != null) {
Modulex modulex = modulexService.getById(tablex.getModuleId());
tablex.setTableName(modulex.getModuleName());
tablex.setTableEnName(modulex.getModuleEnName());
}
tablexService.updateById(tablex);
tablexService.updateSql(tablex.getId(), fieldxController.createSql(tablex.getId()));
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "实体表-通过id删除")
@ApiOperation(value = "实体表-通过id删除", notes = "实体表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
List<Fieldx> fieldxList = fieldxService.list(new QueryWrapper<Fieldx>().eq("table_id", id));
if (!fieldxList.isEmpty()) {
return Result.error("该表内已有字段,不能删除");
}
List<Fieldx> fieldxList1 = fieldxService.list(new QueryWrapper<Fieldx>().eq("associate_table", id));
if (!fieldxList1.isEmpty()) {
return Result.error("该表已被关联,不能删除");
}
tablexService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "实体表-批量删除")
@ApiOperation(value = "实体表-批量删除", notes = "实体表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.tablexService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "实体表-通过id查询")
@ApiOperation(value = "实体表-通过id查询", notes = "实体表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
Tablex tablex = tablexService.getById(id);
if (tablex == null) {
return Result.error("未找到对应数据");
}
return Result.OK(tablex);
}
/**
* 导出excel
*
* @param request
* @param tablex
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Tablex tablex) {
return super.exportXls(request, tablex, Tablex.class, "实体表");
} }
/**
* 添加
*
* @param tablex
* @return
*/
@AutoLog(value = "实体表-添加")
@ApiOperation(value="实体表-添加", notes="实体表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Tablex tablex) {
List<Tablex> tablexList = tablexService.list();
for (Tablex tablex1 : tablexList){
if (tablex1.getModuleId().equals(tablex.getModuleId())){
return Result.error("该模块已有实体,添加失败");
}
}
if (tablex.getModuleId() != null){
Modulex modulex = modulexService.getById(tablex.getModuleId());
tablex.setTableName(modulex.getModuleName());
tablex.setTableEnName(modulex.getModuleEnName());
}
tablex.setVerison(1);
tablex.setTableStructure("CREATE TABLE '"+tablex.getTableEnName()+"' ();");
tablexService.save(tablex);
System.err.println(tablex.toString());
modulexService.setmodule(tablex.getId(),tablex.getModuleId());
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param tablex
* @return
*/
@AutoLog(value = "实体表-编辑")
@ApiOperation(value="实体表-编辑", notes="实体表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Tablex tablex) {
tablex.setVerison(tablex.getVerison()+1);
// List<Tablex> tablexList = tablexService.list();
// for (Tablex tablex1 : tablexList){
// if (tablex1.getModuleId().equals(tablex.getModuleId())){
// return Result.error("该模块已有实体,编辑失败");
// }
// }
if (tablex.getModuleId() != null){
Modulex modulex = modulexService.getById(tablex.getModuleId());
tablex.setTableName(modulex.getModuleName());
tablex.setTableEnName(modulex.getModuleEnName());
}
tablexService.updateById(tablex);
tablexService.updateSql(tablex.getId(),fieldxController.createSql(tablex.getId()));
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "实体表-通过id删除")
@ApiOperation(value="实体表-通过id删除", notes="实体表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
List<Fieldx> fieldxList = fieldxService.list(new QueryWrapper<Fieldx>().eq("table_id", id));
if (!fieldxList.isEmpty()){
return Result.error("该表内已有字段,不能删除");
}
List<Fieldx> fieldxList1 = fieldxService.list(new QueryWrapper<Fieldx>().eq("associate_table", id));
if (!fieldxList1.isEmpty()){
return Result.error("该表已被关联,不能删除");
}
tablexService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "实体表-批量删除")
@ApiOperation(value="实体表-批量删除", notes="实体表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.tablexService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "实体表-通过id查询")
@ApiOperation(value="实体表-通过id查询", notes="实体表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
Tablex tablex = tablexService.getById(id);
if(tablex==null) {
return Result.error("未找到对应数据");
}
return Result.OK(tablex);
}
/**
* 导出excel
*
* @param request
* @param tablex
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Tablex tablex) {
return super.exportXls(request, tablex, Tablex.class, "实体表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Tablex.class);
}
/**
* 通过excel导入数据
*
* @param file
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(MultipartFile file) {
try {
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// 判断文件是否是表格
String originalFilename = file.getOriginalFilename();
if (StringUtils.isBlank(originalFilename) ||
(!originalFilename.endsWith("xls") &&
!originalFilename.endsWith("xlsx"))) {
return Result.error("文件格式不正确");
}
//获取上传文件对象
ImportParams params = new ImportParams();
params.setTitleRows(2);//表格标题行数,默认0
params.setHeadRows(1);//表头行数,默认1
params.setNeedSave(true);//是否需要保存上传的Excel,默认为false
List<TablexVo> list = null;
try {
//读取excel数据
list = ExcelImportUtil.importExcel(file.getInputStream(), TablexVo.class, params);
} catch (Exception e) {
return Result.error("文件读取失败");
}
//判断文件中是否存在数据
if (list == null || list.size() == 0) {
return Result.error("Excel数据为空");
}
for (TablexVo tablexVo : list) {
//判断当前存入行是否为空值
if (tablexVo.getModuleId() == null &&
tablexVo.getTableName() == null &&
tablexVo.getTableEnName() == null &&
tablexVo.getTableStructure() == null &&
tablexVo.getStructuralDiagram() == null &&
tablexVo.getStatus() == null &&
tablexVo.getVerisonStatus() == null &&
tablexVo.getVerison() == null) continue;
//判断版本号长度
String verison = tablexVo.getVerison();
if (verison.length() > 5) {
return Result.error("导入失败,版本号格式错误");
}
//存入临时表中
tablexVoService.save(tablexVo);
}
//从临时表中取出数据
List<TablexVo> voList = tablexVoService.list();
//删除临时表中的数据
tablexVoService.removeAll(voList);
if (voList.size() == 0) {
return Result.error("导入失败,数据为空");
}
Tablex tablex = new Tablex();
for (int i = 0; i < voList.size(); i++) {
String moduleId = voList.get(i).getModuleId();
if (moduleId == null || moduleId.equals("")){
return Result.error("对应模块填写不能为空");
}
LambdaQueryWrapper<Modulex> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(Modulex::getId,moduleId);
Modulex modulex = modulexService.getOne(queryWrapper);
if(modulex == null){
return Result.error("对应模块填写错误");
}
String modulexId = modulex.getId();
String status = voList.get(i).getStatus();
String verisonStatus = voList.get(i).getVerisonStatus();
//判断实体状态
int statusInt = status.equals("正常") ? 1 : status.equals("停用") ? 0 : status.equals("废弃") ? 9 : 3;
//判断版本状态
int verisonStatusInt = verisonStatus.equals("当前") ? 1 : verisonStatus.equals("历史") ? 0 : 3;
//判断对应模块
if (modulexId != null && voList.get(i).getModuleId() != null && !voList.get(i).getModuleId().equals("")) {
//判断中文名称
if (voList.get(i).getTableName() != null && !voList.get(i).getTableName().equals("") && !voList.get(i).getTableName().equals(modulex.getModuleName())) {
//判断英文名称
if (voList.get(i).getTableEnName() != null && !voList.get(i).getTableEnName().equals("") && !voList.get(i).getTableEnName().equals(modulex.getModuleEnName())) {
//判断实体状态
if (statusInt == 1 || statusInt == 0 || statusInt == 9) {
//判断版本状态
if (verisonStatusInt == 1 || verisonStatusInt == 0) {
//判断版本号
if (voList.get(i).getVerison() != null && !voList.get(i).getVerison().equals("")) {
tablex.setModuleId(voList.get(i).getModuleId());
tablex.setTableName(voList.get(i).getTableName());
tablex.setTableEnName(voList.get(i).getTableEnName());
tablex.setTableStructure(voList.get(i).getTableStructure());
tablex.setStructuralDiagram(voList.get(i).getStructuralDiagram());
tablex.setCreateBy(loginUser.getRealname());
tablex.setStatus(statusInt);
tablex.setVerisonStatus(verisonStatusInt);
tablex.setVerison(Integer.valueOf(voList.get(i).getVerison()));
//保存到真实表中
tablexService.save(tablex);
} else {
return Result.error("导入失败,第" + i + 1 + "行的版本号填写错误!");
}
} else {
return Result.error("导入失败,第" + i + 1 + "行的版本状态填写错误!");
}
} else {
return Result.error("导入失败,第" + i + 1 + "行的实体状态填写错误!");
}
} else {
return Result.error("导入失败,第" + i + 1 + "行的英文名称填写错误!");
}
} else {
return Result.error("导入失败,第" + i + 1 + "行的中文名称填写错误!");
}
} else {
return Result.error("导入失败,第" + i + 1 + "行的对应模块填写错误!");
}
}
} catch (Exception e) {
return Result.error("文件导入失败");
}
return Result.OK("文件导入成功!");
}
} }

@ -2,7 +2,6 @@ package org.jeecg.modules.tablex.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update; import org.apache.ibatis.annotations.Update;
import org.checkerframework.checker.guieffect.qual.UI; import org.checkerframework.checker.guieffect.qual.UI;
@ -15,7 +14,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @Date: 2023-04-10 * @Date: 2023-04-10
* @Version: V1.0 * @Version: V1.0
*/ */
@Mapper
public interface TablexMapper extends BaseMapper<Tablex> { public interface TablexMapper extends BaseMapper<Tablex> {
@Update("update tablex set table_structure = #{sql} where id = #{tableId}") @Update("update tablex set table_structure = #{sql} where id = #{tableId}")

@ -1,15 +0,0 @@
package org.jeecg.modules.tablex.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.jeecg.modules.tablex.vo.TablexVo;
/**
* @author Administrator
* @description 针对表tablex_vo的数据库操作Mapper
* @createDate 2023-07-10 19:52:43
* @Entity generator.domain.TablexVo
*/
@Mapper
public interface TablexVoMapper extends BaseMapper<TablexVo> {
}

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.tablex.mapper.TablexMapper"> <mapper namespace=".tablex.mapper.TablexMapper">
</mapper> </mapper>

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.tablex.mapper.TablexVoMapper">
</mapper>

@ -1,17 +0,0 @@
package org.jeecg.modules.tablex.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.tablex.entity.Tablex;
import org.jeecg.modules.tablex.vo.TablexVo;
import java.util.List;
/**
* @Description: 实体表
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Version: V1.0
*/
public interface ITablexVoService extends IService<TablexVo> {
void removeAll(List<TablexVo> voList);
}

@ -1,27 +0,0 @@
package org.jeecg.modules.tablex.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.tablex.entity.Tablex;
import org.jeecg.modules.tablex.mapper.TablexVoMapper;
import org.jeecg.modules.tablex.service.ITablexVoService;
import org.jeecg.modules.tablex.vo.TablexVo;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author Administrator
* @description 针对表tablex_vo的数据库操作Service实现
* @createDate 2023-07-10 19:52:43
*/
@Service
public class ITablexVoServiceImpl extends ServiceImpl<TablexVoMapper, TablexVo> implements ITablexVoService{
@Override
public void removeAll(List<TablexVo> voList) {
for (TablexVo tablexVo : voList){
removeById(tablexVo.getId());
}
}
}

@ -1,90 +0,0 @@
package org.jeecg.modules.tablex.vo;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 实体表
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Version: V1.0
*/
@Data
@TableName("tablex_vo")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class TablexVo implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**对应模块id*/
@Excel(name = "对应模块id", width = 15, dictTable = "modulex", dicText = "module_name", dicCode = "id")
@Dict(dictTable = "modulex", dicText = "module_name", dicCode = "id")
@ApiModelProperty(value = "对应模块id")
private java.lang.String moduleId;
/**中文名称*/
@Excel(name = "中文名称", width = 15)
@ApiModelProperty(value = "中文名称")
private java.lang.String tableName;
/**英文名称*/
@Excel(name = "英文名称", width = 15)
@ApiModelProperty(value = "英文名称")
private java.lang.String tableEnName;
/**表结构SQL*/
@Excel(name = "表结构SQL", width = 15)
@ApiModelProperty(value = "表结构SQL")
private java.lang.String tableStructure;
/**结构图*/
@Excel(name = "结构图", width = 15)
@ApiModelProperty(value = "结构图")
private java.lang.String structuralDiagram;
/**创建人*/
@ApiModelProperty(value = "创建人")
@Dict(dictTable = "sys_user", dicText = "username", dicCode = "id")
private java.lang.String createBy;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private java.lang.String createTime;
/**修改人*/
@ApiModelProperty(value = "修改人")
@Dict(dictTable = "sys_user", dicText = "username", dicCode = "id")
private java.lang.String updateBy;
/**修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "修改时间")
private java.lang.String updateTime;
/**实体状态*/
@Excel(name = "实体状态", width = 15,dicCode = "a_status")
@Dict(dicCode = "a_status")
@ApiModelProperty(value = "实体状态")
private java.lang.String status;
/**版本状态*/
@Excel(name = "版本状态", width = 15,dicCode = "verison_status")
@Dict(dicCode = "verison_status")
@ApiModelProperty(value = "版本状态")
private java.lang.String verisonStatus;
/**版本号*/
@Excel(name = "版本号", width = 15)
@ApiModelProperty(value = "版本号")
private java.lang.String verison;
}

@ -137,9 +137,9 @@ spring:
# driver-class-name: com.mysql.cj.jdbc.Driver # driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置 # 多数据源配置
#multi-datasource1: #multi-datasource1:
url: jdbc:mysql://localhost:3306/project_management?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai url: jdbc:mysql://182.92.169.222:3306/project_management?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root username: root
password: 157189 password: ycwl2022.
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置 #redis 配置
redis: redis:

@ -132,9 +132,9 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource: datasource:
master: master:
url: jdbc:mysql://localhost:3306/project_management?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai url: jdbc:mysql://182.92.169.222:3306/project_management?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root username: root
password: 157189 password: ycwl2022.
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置 # 多数据源配置
#multi-datasource1: #multi-datasource1:

@ -133,7 +133,7 @@ spring:
master: master:
url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root username: root
password: 157189 password: root
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置 # 多数据源配置
#multi-datasource1: #multi-datasource1:

2
package-lock.json generated

@ -1,5 +1,5 @@
{ {
"name": "projectManagement", "name": "education",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": {} "packages": {}

Loading…
Cancel
Save