diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictController.java index 9063f575d..29da10d76 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictController.java @@ -73,6 +73,9 @@ public class SysDictController { @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { Result> result = new Result>(); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(sysDict, req.getParameterMap()); + if(StringUtils.isNotBlank("create_time")) { + queryWrapper.orderByDesc("create_time"); + } Page page = new Page(pageNo, pageSize); IPage pageList = sysDictService.page(page, queryWrapper); log.debug("查询当前页:"+pageList.getCurrent()); diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysDict.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysDict.java index b2553431f..76c2fccf3 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysDict.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysDict.java @@ -91,8 +91,7 @@ public class SysDict implements Serializable { /** * 是否为标签内容-数据字典(1是 0否) */ - @Excel(name = "是否为标签内容", width = 15)/*, dictTable = "sys_dict", dicText = "is_tag_dict", dicCode = "is_tag_dict") - @Dict(dictTable = "onl_cgform_field", dicText = "is_tag_dict", dicCode = "is_tag_dict")*/ + @Excel(name = "是否为标签内容", width = 15) private java.lang.Integer isTagDict; /** @@ -110,4 +109,9 @@ public class SysDict implements Serializable { @ApiModelProperty(value = "标签类型 1下拉选择 2树形结构") @Dict(dicCode = "attribute_type") private java.lang.String attributeType; + + /**逻辑删除标识 0未删 1已删*/ + @Excel(name = "逻辑删除标识 0未删 1已删", width = 15) + @ApiModelProperty(value = "逻辑删除标识 0未删 1已删") + private Integer isDelete; } \ No newline at end of file diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysDictItem.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysDictItem.java index cdf81d195..4c9b89b35 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysDictItem.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/entity/SysDictItem.java @@ -64,7 +64,6 @@ public class SysDictItem implements Serializable { @Excel(name = "排序", width = 15,type=4) private Integer sortOrder; - @TableField(exist = false) private String dictCode; @@ -83,8 +82,7 @@ public class SysDictItem implements Serializable { private Date updateTime; /**是否为标签内容-数据字典(1是 0否)*/ - @Excel(name = "是否为标签内容", width = 15)/*, dictTable = "sys_dict", dicText = "is_tag_dict", dicCode = "is_tag_dict") - @Dict(dictTable = "onl_cgform_field", dicText = "is_tag_dict", dicCode = "is_tag_dict")*/ + @Excel(name = "是否为标签内容", width = 15) private java.lang.Integer isTagDict; /**是否是只读(2字段固定,内部可配1固定字段 0非固定字段)*/ @@ -98,4 +96,9 @@ public class SysDictItem implements Serializable { @ApiModelProperty(value = "标签类型 1下拉选择 2树形结构") @Dict(dicCode = "attribute_type") private java.lang.String attributeType; + + /**逻辑删除标识 0未删 1已删*/ + @Excel(name = "逻辑删除标识 0未删 1已删", width = 15) + @ApiModelProperty(value = "逻辑删除标识 0未删 1已删") + private Integer isDelete; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformTagController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformTagController.java index 97d3f4a47..68413f1c7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformTagController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformTagController.java @@ -60,6 +60,9 @@ public class OnlCgformTagController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(onlCgformTag, req.getParameterMap()); Page page = new Page(pageNo, pageSize); + if(StringUtils.isNotBlank("create_time")) { + queryWrapper.orderByDesc("create_time"); + } IPage pageList = onlCgformTagService.page(page, queryWrapper); return Result.OK(pageList); } @@ -115,8 +118,12 @@ public class OnlCgformTagController extends JeroController add(@Validated @RequestBody OnlCgformTag onlCgformTag) { - onlCgformTagService.queryExitData(onlCgformTag); - onlCgformTagService.add(onlCgformTag); + Integer count=onlCgformTagService.queryExitData(onlCgformTag); + if (count > 0) { + onlCgformTag.setIsDelete(0); + } else { + onlCgformTagService.add(onlCgformTag); + } return Result.OK("添加成功!"); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/entity/OnlCgformTag.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/entity/OnlCgformTag.java index 2db1b8d17..76bd77087 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/entity/OnlCgformTag.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/entity/OnlCgformTag.java @@ -1,9 +1,6 @@ package com.jero.modules.tag.entity; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; import com.fasterxml.jackson.annotation.JsonFormat; import com.jero.common.aspect.annotation.Dict; import io.swagger.annotations.ApiModel; @@ -66,16 +63,15 @@ public class OnlCgformTag implements Serializable { private java.lang.String sysOrgCode; /**所属模块(1文档库,0文档拆分)*/ - @TableField(exist = false) @Excel(name = "所属模块(1文档库,0文档拆分", width = 15, dicCode = "module") @Dict(dicCode = "module") @ApiModelProperty(value = "所属模块(1文档库,0文档拆分") private java.lang.String isModel; - /**字段备注*/ - @Excel(name = "字段备注", width = 15,dictTable = "onl_cgform_field", dicText = "db_field_txt", dicCode = "db_field_txt") + /**属性名称*/ + @Excel(name = "属性名称", width = 15,dictTable = "onl_cgform_field", dicText = "db_field_txt", dicCode = "db_field_txt") @Dict(dictTable = "onl_cgform_field", dicText = "db_field_txt", dicCode = "db_field_txt") - @ApiModelProperty(value = "字段备注") + @ApiModelProperty(value = "属性名称") private java.lang.String dbFieldTxt; /**字段英文名称描述*/ @@ -159,4 +155,9 @@ public class OnlCgformTag implements Serializable { @ApiModelProperty(value = "搜索中心是否展示0否 1是") private java.lang.Integer isShowSearch; + /**逻辑删除标识 0未删 1已删*/ + @Excel(name = "逻辑删除标识 0未删 1已删", width = 15,dictTable = "onl_cgform_field", dicText = "is_delete", dicCode = "is_delete") + @Dict(dictTable = "onl_cgform_field", dicText = "is_delete", dicCode = "is_delete") + @ApiModelProperty(value = "逻辑删除标识 0未删 1已删") + private Integer isDelete; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/xml/OnlCgformTagMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/xml/OnlCgformTagMapper.xml index 77b6dfdb7..a98a3bc08 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/xml/OnlCgformTagMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/mapper/xml/OnlCgformTagMapper.xml @@ -24,5 +24,6 @@ + \ No newline at end of file