Interface DictImportReqConverter

All Superinterfaces:
io.github.xezzon.zeroweb.core.trait.From<io.github.xezzon.zeroweb.dict.DictImportReq, Dict>
All Known Implementing Classes:
DictImportReqConverterImpl

public interface DictImportReqConverter extends io.github.xezzon.zeroweb.core.trait.From<io.github.xezzon.zeroweb.dict.DictImportReq, Dict>

字典导入请求转换器

用于将 DictImportReq 转换为 Dict 实体对象。 在转换过程中忽略部分字段,由业务逻辑填充默认值。

Author:
xezzon
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    字典导入请求转换器实例
  • Method Summary

    Modifier and Type
    Method
    Description
    from(io.github.xezzon.zeroweb.dict.DictImportReq source)
    将字典导入请求转换为字典实体
  • Field Details

  • Method Details

    • from

      Dict from(io.github.xezzon.zeroweb.dict.DictImportReq source)

      将字典导入请求转换为字典实体

      转换规则:

      • 忽略 parentId,由上层调用者设置
      • 忽略 id,由数据库自动生成
      • enabled 设为常量 true
      • editable 设为常量 false
      • 忽略 children,该字段为瞬态字段
      • tag 使用请求值,如为空则使用 Dict.DICT_TAG 默认值
      Specified by:
      from in interface io.github.xezzon.zeroweb.core.trait.From<io.github.xezzon.zeroweb.dict.DictImportReq, Dict>
      Parameters:
      source - 字典导入请求
      Returns:
      字典实体对象