diff --git a/ant-design-vue-jeecg/src/views/fieldx/FieldxList.vue b/ant-design-vue-jeecg/src/views/fieldx/FieldxList.vue new file mode 100644 index 0000000..7f52f7a --- /dev/null +++ b/ant-design-vue-jeecg/src/views/fieldx/FieldxList.vue @@ -0,0 +1,269 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/fieldx/modules/FieldxForm.vue b/ant-design-vue-jeecg/src/views/fieldx/modules/FieldxForm.vue new file mode 100644 index 0000000..624d684 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/fieldx/modules/FieldxForm.vue @@ -0,0 +1,211 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/fieldx/modules/FieldxModal.vue b/ant-design-vue-jeecg/src/views/fieldx/modules/FieldxModal.vue new file mode 100644 index 0000000..60f7968 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/fieldx/modules/FieldxModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/fieldx/modules/FieldxModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/fieldx/modules/FieldxModal__Style#Drawer.vue new file mode 100644 index 0000000..31dd74f --- /dev/null +++ b/ant-design-vue-jeecg/src/views/fieldx/modules/FieldxModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/tablex/TablexList.vue b/ant-design-vue-jeecg/src/views/tablex/TablexList.vue new file mode 100644 index 0000000..ff54bc7 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/tablex/TablexList.vue @@ -0,0 +1,214 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/tablex/modules/TablexForm.vue b/ant-design-vue-jeecg/src/views/tablex/modules/TablexForm.vue new file mode 100644 index 0000000..bcf9b44 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/tablex/modules/TablexForm.vue @@ -0,0 +1,157 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/tablex/modules/TablexModal.vue b/ant-design-vue-jeecg/src/views/tablex/modules/TablexModal.vue new file mode 100644 index 0000000..1d093d5 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/tablex/modules/TablexModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/tablex/modules/TablexModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/tablex/modules/TablexModal__Style#Drawer.vue new file mode 100644 index 0000000..88cc347 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/tablex/modules/TablexModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/controller/FieldxController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/controller/FieldxController.java new file mode 100644 index 0000000..76271e6 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/controller/FieldxController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.fieldx.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.fieldx.entity.Fieldx; +import org.jeecg.modules.fieldx.service.IFieldxService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 字段管理 + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +@Api(tags="字段管理") +@RestController +@RequestMapping("/fieldx/fieldx") +@Slf4j +public class FieldxController extends JeecgController { + @Autowired + private IFieldxService fieldxService; + + /** + * 分页列表查询 + * + * @param fieldx + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "字段管理-分页列表查询") + @ApiOperation(value="字段管理-分页列表查询", notes="字段管理-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(Fieldx fieldx, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(fieldx, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = fieldxService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param fieldx + * @return + */ + @AutoLog(value = "字段管理-添加") + @ApiOperation(value="字段管理-添加", notes="字段管理-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody Fieldx fieldx) { + fieldxService.save(fieldx); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param fieldx + * @return + */ + @AutoLog(value = "字段管理-编辑") + @ApiOperation(value="字段管理-编辑", notes="字段管理-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody Fieldx fieldx) { + fieldxService.updateById(fieldx); + 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) { + fieldxService.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.fieldxService.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) { + Fieldx fieldx = fieldxService.getById(id); + if(fieldx==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(fieldx); + } + + /** + * 导出excel + * + * @param request + * @param fieldx + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Fieldx fieldx) { + return super.exportXls(request, fieldx, Fieldx.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, Fieldx.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/entity/Fieldx.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/entity/Fieldx.java new file mode 100644 index 0000000..3af7a35 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/entity/Fieldx.java @@ -0,0 +1,129 @@ +package org.jeecg.modules.fieldx.entity; + +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("fieldx") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="fieldx对象", description="字段管理") +public class Fieldx 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) + @ApiModelProperty(value = "对应实体id") + private java.lang.String tableId; + /**中文名称*/ + @Excel(name = "中文名称", width = 15) + @ApiModelProperty(value = "中文名称") + private java.lang.String fieldName; + /**英文名称*/ + @Excel(name = "英文名称", width = 15) + @ApiModelProperty(value = "英文名称") + private java.lang.String fieldEnName; + /**数据类型*/ + @Excel(name = "数据类型", width = 15, dicCode = "date_type") + @Dict(dicCode = "date_type") + @ApiModelProperty(value = "数据类型") + private java.lang.Integer type; + /**数据长度*/ + @Excel(name = "数据长度", width = 15) + @ApiModelProperty(value = "数据长度") + private java.lang.Integer length; + /**浮点精度*/ + @Excel(name = "浮点精度", width = 15) + @ApiModelProperty(value = "浮点精度") + private java.lang.Integer accuracy; + /**显示形式*/ + @Excel(name = "显示形式", width = 15) + @ApiModelProperty(value = "显示形式") + private java.lang.String format; + /**是否主键*/ + @Excel(name = "是否主键", width = 15,dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "是否主键") + private java.lang.Integer isPk; + /**是否外键*/ + @Excel(name = "是否外键", width = 15,dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "是否外键") + private java.lang.Integer isFk; + /**关联实体*/ + @Excel(name = "关联实体", width = 15) + @ApiModelProperty(value = "关联实体") + private java.lang.String associateTable; + /**关联字段*/ + @Excel(name = "关联字段", width = 15) + @ApiModelProperty(value = "关联字段") + private java.lang.String associateField; + /**是否为空*/ + @Excel(name = "是否为空", width = 15,dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "是否为空") + private java.lang.Integer isNull; + /**是否重复*/ + @Excel(name = "是否重复", width = 15,dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "是否重复") + private java.lang.Integer isUniqueness; + /**字段规则*/ + @Excel(name = "字段规则", width = 15) + @ApiModelProperty(value = "字段规则") + private java.lang.String rule; + /**创建人*/ + @ApiModelProperty(value = "创建人") + 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.util.Date createTime; + /**修改人*/ + @ApiModelProperty(value = "修改人") + 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.util.Date updateTime; + /**字段状态*/ + @Excel(name = "字段状态", width = 15,dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "字段状态") + private java.lang.Integer status; + /**版本状态*/ + @Excel(name = "版本状态", width = 15 ,dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "版本状态") + private java.lang.Integer verisonStatus; + /**版本号*/ + @Excel(name = "版本号", width = 15) + @ApiModelProperty(value = "版本号") + private java.lang.Integer verison; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/mapper/FieldxMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/mapper/FieldxMapper.java new file mode 100644 index 0000000..53d9fa4 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/mapper/FieldxMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.fieldx.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.fieldx.entity.Fieldx; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 字段管理 + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +public interface FieldxMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/mapper/xml/FieldxMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/mapper/xml/FieldxMapper.xml new file mode 100644 index 0000000..ce3b749 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/mapper/xml/FieldxMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/IFieldxService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/IFieldxService.java new file mode 100644 index 0000000..e843e77 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/IFieldxService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.fieldx.service; + +import org.jeecg.modules.fieldx.entity.Fieldx; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 字段管理 + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +public interface IFieldxService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/impl/FieldxServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/impl/FieldxServiceImpl.java new file mode 100644 index 0000000..dc4985b --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/service/impl/FieldxServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.fieldx.service.impl; + +import org.jeecg.modules.fieldx.entity.Fieldx; +import org.jeecg.modules.fieldx.mapper.FieldxMapper; +import org.jeecg.modules.fieldx.service.IFieldxService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 字段管理 + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +@Service +public class FieldxServiceImpl extends ServiceImpl implements IFieldxService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/FieldxList.vue b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/FieldxList.vue new file mode 100644 index 0000000..415ccfa --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/FieldxList.vue @@ -0,0 +1,269 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/modules/FieldxForm.vue b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/modules/FieldxForm.vue new file mode 100644 index 0000000..5ea4d58 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/modules/FieldxForm.vue @@ -0,0 +1,211 @@ + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/modules/FieldxModal.vue b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/modules/FieldxModal.vue new file mode 100644 index 0000000..60f7968 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/modules/FieldxModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/modules/FieldxModal__Style#Drawer.vue b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/modules/FieldxModal__Style#Drawer.vue new file mode 100644 index 0000000..31dd74f --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/vue/modules/FieldxModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java new file mode 100644 index 0000000..bf6e642 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/controller/TablexController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.tablex.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.tablex.entity.Tablex; +import org.jeecg.modules.tablex.service.ITablexService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 实体表 + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +@Api(tags="实体表") +@RestController +@RequestMapping("/tablex/tablex") +@Slf4j +public class TablexController extends JeecgController { + @Autowired + private ITablexService tablexService; + + /** + * 分页列表查询 + * + * @param tablex + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "实体表-分页列表查询") + @ApiOperation(value="实体表-分页列表查询", notes="实体表-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(Tablex tablex, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(tablex, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = tablexService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param tablex + * @return + */ + @AutoLog(value = "实体表-添加") + @ApiOperation(value="实体表-添加", notes="实体表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody Tablex tablex) { + tablexService.save(tablex); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param tablex + * @return + */ + @AutoLog(value = "实体表-编辑") + @ApiOperation(value="实体表-编辑", notes="实体表-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody Tablex tablex) { + tablexService.updateById(tablex); + 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) { + 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); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/entity/Tablex.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/entity/Tablex.java new file mode 100644 index 0000000..586d057 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/entity/Tablex.java @@ -0,0 +1,89 @@ +package org.jeecg.modules.tablex.entity; + +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") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="tablex对象", description="实体表") +public class Tablex 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 = "创建人") + 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.util.Date createTime; + /**修改人*/ + @ApiModelProperty(value = "修改人") + 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.util.Date updateTime; + /**实体状态*/ + @Excel(name = "实体状态", width = 15,dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "实体状态") + private java.lang.Integer status; + /**版本状态*/ + @Excel(name = "版本状态", width = 15,dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "版本状态") + private java.lang.Integer verisonStatus; + /**版本号*/ + @Excel(name = "版本号", width = 15) + @ApiModelProperty(value = "版本号") + private java.lang.Integer verison; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java new file mode 100644 index 0000000..cc716b3 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/TablexMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.tablex.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.tablex.entity.Tablex; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 实体表 + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +public interface TablexMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml new file mode 100644 index 0000000..3e55de2 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/mapper/xml/TablexMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/ITablexService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/ITablexService.java new file mode 100644 index 0000000..d29852a --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/ITablexService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.tablex.service; + +import org.jeecg.modules.tablex.entity.Tablex; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 实体表 + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +public interface ITablexService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/TablexServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/TablexServiceImpl.java new file mode 100644 index 0000000..e105a94 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/service/impl/TablexServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.tablex.service.impl; + +import org.jeecg.modules.tablex.entity.Tablex; +import org.jeecg.modules.tablex.mapper.TablexMapper; +import org.jeecg.modules.tablex.service.ITablexService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 实体表 + * @Author: jeecg-boot + * @Date: 2023-04-10 + * @Version: V1.0 + */ +@Service +public class TablexServiceImpl extends ServiceImpl implements ITablexService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/TablexList.vue b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/TablexList.vue new file mode 100644 index 0000000..2ce1bcb --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/TablexList.vue @@ -0,0 +1,214 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/modules/TablexForm.vue b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/modules/TablexForm.vue new file mode 100644 index 0000000..273b4e2 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/modules/TablexForm.vue @@ -0,0 +1,157 @@ + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/modules/TablexModal.vue b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/modules/TablexModal.vue new file mode 100644 index 0000000..1d093d5 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/modules/TablexModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/modules/TablexModal__Style#Drawer.vue b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/modules/TablexModal__Style#Drawer.vue new file mode 100644 index 0000000..88cc347 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/tablex/vue/modules/TablexModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file