wip: 代码生成临时提交
This commit is contained in:
@@ -16,7 +16,7 @@ public interface DeptConverter {
|
||||
|
||||
DeptForm toForm(SysDept entity);
|
||||
|
||||
DeptVO convertToVo(SysDept entity);
|
||||
DeptVO toVo(SysDept entity);
|
||||
|
||||
SysDept toEntity(DeptForm deptForm);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.youlai.system.model.vo.DictPageVO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
/**
|
||||
* 字典 对象转换器
|
||||
* 字典对象转换器
|
||||
*
|
||||
* @author Ray Hao
|
||||
* @since 2022/6/8
|
||||
@@ -15,7 +15,7 @@ import org.mapstruct.Mapper;
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface DictConverter {
|
||||
|
||||
Page<DictPageVO> convertToPageVo(Page<SysDict> page);
|
||||
Page<DictPageVO> toPageVo(Page<SysDict> page);
|
||||
|
||||
DictForm toForm(SysDict entity);
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.youlai.system.converter;
|
||||
|
||||
import com.youlai.system.model.entity.GenConfig;
|
||||
import com.youlai.system.model.entity.GenFieldConfig;
|
||||
import com.youlai.system.model.form.GenConfigForm;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 代码生成配置转换器
|
||||
*
|
||||
* @author Ray
|
||||
* @since 2.10.0
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface GenConfigConverter {
|
||||
|
||||
@Mapping(source = "genConfig.tableName", target = "tableName")
|
||||
@Mapping(source = "genConfig.comment", target = "comment")
|
||||
@Mapping(source = "genConfig.moduleName", target = "moduleName")
|
||||
@Mapping(source = "genConfig.packageName", target = "packageName")
|
||||
@Mapping(source = "genConfig.entityName", target = "entityName")
|
||||
@Mapping(source = "genConfig.author", target = "author")
|
||||
@Mapping(source = "fieldConfigs", target = "fieldConfigs")
|
||||
GenConfigForm toGenConfigForm(GenConfig genConfig, List<GenFieldConfig> fieldConfigs);
|
||||
|
||||
List<GenConfigForm.FieldConfig> toFieldConfigList(List<GenFieldConfig> fieldConfigs);
|
||||
|
||||
@Mapping(source = "configId", target = "configId")
|
||||
@Mapping(source = "columnName", target = "columnName")
|
||||
@Mapping(source = "columnType", target = "columnType")
|
||||
@Mapping(source = "fieldName", target = "fieldName")
|
||||
@Mapping(source = "fieldType", target = "fieldType")
|
||||
@Mapping(source = "comment", target = "comment")
|
||||
@Mapping(source = "formType", target = "formType")
|
||||
@Mapping(source = "queryType", target = "queryType")
|
||||
@Mapping(source = "isShowInList", target = "isShowInList")
|
||||
@Mapping(source = "isShowInForm", target = "isShowInForm")
|
||||
@Mapping(source = "isShowInQuery", target = "isShowInQuery")
|
||||
@Mapping(source = "isRequired", target = "isRequired")
|
||||
GenConfigForm.FieldConfig toFieldConfig(GenFieldConfig genFieldConfig);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user