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 65ddd933e..504db6bdd 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 @@ -477,7 +477,7 @@ public class SysDictController { if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(sysDict.getIsReadOnly())) { result.error500("固定字段,不可删除"); } else { - sysDict.setDelFlag(CommonConstant.DEL_FLAG_1); + sysDictService.updateDictDelFlag(CommonConstant.DEL_FLAG_1,id); result.success("删除成功!"); } }catch (Exception e) { @@ -504,7 +504,7 @@ public class SysDictController { if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(sysDict.getIsReadOnly())) { result.error500("包含固定字段,不可删除"); } else { - sysDict.setDelFlag(CommonConstant.DEL_FLAG_1); + sysDictService.removeByIds(Arrays.asList(ids.split(","))); result.success("删除成功!"); } } @@ -532,7 +532,7 @@ public class SysDictController { if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(joinSystem.getIsReadOnly())) { result.error500("包含固定字段,不可删除"); } else { - joinSystem.setDelFlag(CommonConstant.DEL_FLAG_1); + sysDictService.updateDictDelFlag(CommonConstant.DEL_FLAG_1,joinSystem.getId()); result.success("批量删除成功!"); } } diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysDictServiceImpl.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysDictServiceImpl.java index ca37bf190..edc05cd09 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysDictServiceImpl.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysDictServiceImpl.java @@ -41,11 +41,13 @@ import java.util.stream.Collectors; @Slf4j public class SysDictServiceImpl extends ServiceImpl implements ISysDictService { - @Autowired - private SysDictMapper sysDictMapper; - @Autowired - private SysDictItemMapper sysDictItemMapper; - @Resource + @Autowired + private SysDictMapper sysDictMapper; + + @Autowired + private SysDictItemMapper sysDictItemMapper; + + @Resource private RedisTemplate redisTemplate; /** @@ -191,24 +193,22 @@ public class SysDictServiceImpl extends ServiceImpl impl return texts; } - /** - * 查询选项内容--数据字典名称 - * @return - */ - @Override - public List queryDictName(String cut,SysDict sysDict) { - QueryWrapper queryWrapper = new QueryWrapper<>(); + /** + * 查询选项内容--数据字典名称 + * @return + */ + @Override + public List queryDictName(String cut,SysDict sysDict) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.select("id", "dict_name","dict_en_name", "attribute_type","dict_code").eq("is_tag_dict", 1); if (CutEnum.CN.getValue().equals(cut)) { - queryWrapper.select("id", "dict_name","dict_en_name", "attribute_type").eq("is_tag_dict", 1); return list(queryWrapper); }else{ - queryWrapper.select("id", "dict_name","dict_en_name", "attribute_type").eq("is_tag_dict", 1); List resetlist = list(queryWrapper); resetlist.stream().forEach(f->f.setDictName(f.getDictEnName())); return resetlist; } - - } + } /** * 根据字典类型id删除关联表中其对应的数据 @@ -382,7 +382,8 @@ public class SysDictServiceImpl extends ServiceImpl impl Integer count = sysDictMapper.selectCount(queryWrapper); return count; } - //TODO 代码加注释 + + //标签新增表单-查询选项内容 @Override public Integer queryExitDictName(SysDict sysDict) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); @@ -412,5 +413,4 @@ public class SysDictServiceImpl extends ServiceImpl impl return result; } - } 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 95f6d2dcc..3ce4d2400 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 @@ -111,6 +111,24 @@ public class OnlCgformTag implements Serializable { @ApiModelProperty(value = "字典名称") private java.lang.String dictId; + /**字典Code*/ + @Excel(name = "字典Code", width = 15, dictTable = "onl_cgform_field", dicText = "dict_field", dicCode = "dict_field") + @Dict(dictTable = "onl_cgform_field", dicText = "dict_field", dicCode = "dict_field") + @ApiModelProperty(value = "字典Code") + private java.lang.String dictField; + + /**字典表*/ + @Excel(name = "字典表", width = 15, dictTable = "onl_cgform_field", dicText = "dict_table", dicCode = "dict_table") + @Dict(dictTable = "onl_cgform_field", dicText = "dict_table", dicCode = "dict_table") + @ApiModelProperty(value = "字典表") + private java.lang.String dictTable; + + /**字典Text*/ + @Excel(name = "字典Text", width = 15, dictTable = "onl_cgform_field", dicText = "dict_text", dicCode = "dict_text") + @Dict(dictTable = "onl_cgform_field", dicText = "dict_text", dicCode = "dict_text") + @ApiModelProperty(value = "字典Text") + private java.lang.String dictText; + /**数据库字段长度*/ @Excel(name = "数据库字段长度", width = 15,dictTable = "onl_cgform_field", dicText = "db_length", dicCode = "db_length") @Dict(dictTable = "onl_cgform_field", dicText = "db_length", dicCode = "db_length") diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/impl/OnlCgformTagServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/impl/OnlCgformTagServiceImpl.java index 61f3e2a73..0be648dbd 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/impl/OnlCgformTagServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/service/impl/OnlCgformTagServiceImpl.java @@ -35,11 +35,16 @@ import java.util.Map; public class OnlCgformTagServiceImpl extends ServiceImpl implements IOnlCgformTagService { @Autowired private OnlCgformTagMapper onlCgformTagMapper; + @Autowired private OnlCgformFieldServiceImpl onlCgformFieldService; - private OnlCgformArea onlCgformArea; + @Autowired - OnlCgformAreaServiceImpl onlCgformAreaService; + private OnlCgformAreaServiceImpl onlCgformAreaService; + + @Autowired + private SysDictServiceImpl sysDictService; + /** * 保存 * @@ -59,6 +64,7 @@ public class OnlCgformTagServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); + if (StringUtils.isNotBlank(onlCgformTag.getDbFieldName())) { + queryWrapper.eq("db_field_txt", onlCgformTag.getDbFieldTxt())//字段中文名称 + .eq("field_show_type", onlCgformTag.getFieldShowType())//字段类型 + .eq("db_length",onlCgformTag.getDbLength());//字段长度 + } + Integer countTableData = onlCgformTagMapper.selectCount(queryWrapper); + System.out.println("z这里这里count="+countTableData); + return countTableData; } - save(onlCgformTag); - } - /** * 更新 * @@ -88,9 +113,12 @@ public class OnlCgformTagServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); - if (StringUtils.isNotBlank(onlCgformTag.getDbFieldName())) { - queryWrapper.eq(OnlCgformTag::getDbFieldName, onlCgformTag.getDbFieldName())//字段名字 - .eq(OnlCgformTag::getDbType, onlCgformTag.getDbType())//数据库字段类型 - .eq(OnlCgformTag::getDbLength,onlCgformTag.getDbLength());//字段长度 - } - Integer countTableData = onlCgformTagMapper.selectCount(queryWrapper); - return countTableData; - } - /** * 若区域下有标签字段 则无法删除 *